document-schema 7.15.2 → 7.15.3

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.
Files changed (53) hide show
  1. package/dist/codec.d.cts +3 -3
  2. package/dist/codec.d.ts +3 -3
  3. package/dist/{content-BMrK9SrW.d.ts → content-1yGdeaVT.d.ts} +5905 -2549
  4. package/dist/{content-Dg9cb8mF.d.cts → content-CSf8z9NW.d.cts} +5905 -2549
  5. package/dist/content-json-schema-defs.cjs +5 -5
  6. package/dist/content-json-schema-defs.js +5 -5
  7. package/dist/content.cjs +7 -3
  8. package/dist/content.d.cts +1 -1
  9. package/dist/content.d.ts +1 -1
  10. package/dist/content.js +7 -3
  11. package/dist/decompose.cjs +5 -0
  12. package/dist/decompose.d.cts +4 -3
  13. package/dist/decompose.d.ts +4 -3
  14. package/dist/decompose.js +5 -1
  15. package/dist/definitions.d.cts +1 -1
  16. package/dist/definitions.d.ts +1 -1
  17. package/dist/factor-styles.cjs +2 -0
  18. package/dist/factor-styles.d.cts +1 -1
  19. package/dist/factor-styles.d.ts +1 -1
  20. package/dist/factor-styles.js +4 -2
  21. package/dist/flatten.cjs +5 -0
  22. package/dist/flatten.d.cts +3 -2
  23. package/dist/flatten.d.ts +3 -2
  24. package/dist/flatten.js +5 -1
  25. package/dist/index.cjs +2 -4
  26. package/dist/index.d.cts +5 -5
  27. package/dist/index.d.ts +5 -5
  28. package/dist/index.js +3 -7
  29. package/dist/math-layout.d.cts +2 -2
  30. package/dist/math-layout.d.ts +2 -2
  31. package/dist/math.cjs +7 -5
  32. package/dist/math.js +7 -5
  33. package/dist/mathml.cjs +3 -1
  34. package/dist/mathml.js +3 -1
  35. package/dist/{package-node-gA3Kpgl2.d.ts → package-node-CpE1BAqK.d.ts} +1 -1
  36. package/dist/{package-node-wxNXHAov.d.cts → package-node-ng7Yimj9.d.cts} +1 -1
  37. package/dist/package-node.d.cts +1 -1
  38. package/dist/package-node.d.ts +1 -1
  39. package/dist/package.d.cts +1 -1
  40. package/dist/package.d.ts +1 -1
  41. package/dist/schema-io.cjs +7 -2
  42. package/dist/schema-io.d.cts +3 -2
  43. package/dist/schema-io.d.ts +3 -2
  44. package/dist/schema-io.js +7 -3
  45. package/dist/table-grid.cjs +5 -0
  46. package/dist/table-grid.d.cts +3 -2
  47. package/dist/table-grid.d.ts +3 -2
  48. package/dist/table-grid.js +5 -1
  49. package/dist/text-layout.d.cts +6 -6
  50. package/dist/text-layout.d.ts +6 -6
  51. package/package.json +1 -1
  52. package/schemas/content-document.schema.json +16 -16
  53. package/schemas/document-tree.schema.json +3 -3
package/dist/index.d.ts CHANGED
@@ -6,11 +6,11 @@ import { a as rgbHexToColor, i as colorToRgbHex, n as Color, r as ColorSchema, t
6
6
  import { a as Margins, c as PAGE_SIZE_LETTER, d as Point, f as SLIDE_SIZE_STANDARD, i as LayoutFrameSchema, l as PageSize, n as BoxSchema, o as MarginsSchema, p as SLIDE_SIZE_WIDESCREEN, r as LayoutFrame, s as PAGE_SIZE_A4, t as Box, u as PageSizeSchema } from "./geometry-CvcjSwnA.js";
7
7
  import { i as SourceResidueSchema, n as SourceFormatSchema, r as SourceResidue, t as SourceFormat } from "./source-Bas5ol6f.js";
8
8
  import { a as LayoutFontSchema, i as LayoutFont, n as AlignmentSchema, o as TextDirection, r as DEFAULT_LAYOUT_FONT, s as TextDirectionSchema, t as Alignment } from "./style-BGMcYrD2.js";
9
- import { $ as ContentHatchStyleSchema, $t as ContentSheetRepeatRange, A as ContentEmbeddedObjectKind, An as ImageFormat, At as ContentSheetCellComment, B as ContentFloatPosition, Bn as findRunConstructFault, Bt as ContentSheetConditionalFormatValueSchema, C as ContentDocument, Cn as ContentTranscriptSchema, Ct as ContentRunSchema, D as ContentEmbeddedObject, Dn as DecimalStringSchema, Dt as ContentShapeSchema, E as ContentDrawPageSchema, En as DecimalString, Et as ContentShape, F as ContentFloatAlignSchema, Fn as SheetRuleOperator, Ft as ContentSheetConditionalFormat, G as ContentFormulaSchema, Gn as resolveCellFillColor, Gt as ContentSheetImage, H as ContentFont, Hn as isContentConstructEnd, Ht as ContentSheetDataValidationSchema, I as ContentFloatAxis, In as SheetRuleOperatorSchema, It as ContentSheetConditionalFormatSchema, J as ContentGradientStyle, Jt as ContentSheetPrintRangeSchema, K as ContentGradientFill, Kn as unrecognizedFillKind, Kt as ContentSheetImageSchema, L as ContentFloatAxisSchema, Ln as clampHeadingLevel, Lt as ContentSheetConditionalFormatStyle, M as ContentFillPattern, Mn as RunConstructExtent, Mt as ContentSheetCellSchema, N as ContentFillPatternSchema, Nn as RunConstructExtentSchema, Nt as ContentSheetColumn, O as ContentEmbeddedObjectBlock, On as FusedNode, Ot as ContentSheet, P as ContentFloatAlign, Pn as RunConstructFault, Pt as ContentSheetColumnSchema, Q as ContentHatchStyle, Qt as ContentSheetRangeSchema, R as ContentFloatOrigin, Rn as contentDocumentSharedFields, Rt as ContentSheetConditionalFormatStyleSchema, S as ContentDefinedNameSchema, Sn as ContentTranscript, St as ContentRun, T as ContentDrawPage, Tn as ContentVectorSchema, Tt as ContentSectionSchema, U as ContentFontSchema, Un as isContentConstructStart, Ut as ContentSheetDataValidationType, V as ContentFloatPositionSchema, Vn as isContentBlock, Vt as ContentSheetDataValidation, W as ContentFormula, Wn as isRunConstructExtent, Wt as ContentSheetDataValidationTypeSchema, X as ContentHatchFill, Xt as ContentSheetPrintSettingsSchema, Y as ContentGradientStyleSchema, Yt as ContentSheetPrintSettings, Z as ContentHatchFillSchema, Zt as ContentSheetRange, _ as ContentConstructEnd, _n as ContentTableColumn, _t as ContentParagraphSchema, a as ContentBlock, an as ContentSlideSchema, at as ContentInterpretationSchema, b as ContentConstructStartSchema, bn as ContentTableRowSchema, bt as ContentPathSegment, c as ContentBorderSchema, cn as ContentStrokeDashSchema, ct as ContentOrigin, d as ContentCellFill, dn as ContentStrokeStyleSchema, dt as ContentPageBreakSchema, en as ContentSheetRepeatRangeSchema, et as ContentImageBlock, f as ContentCellFillSchema, fn as ContentSubpath, ft as ContentPageFurniture, g as ContentCellValueSchema, gn as ContentTableCellSchema, gt as ContentParagraphBordersSchema, h as ContentCellValue, hn as ContentTableCell, ht as ContentParagraphBorders, i as ContentBitmapFillSchema, in as ContentSlide, it as ContentInterpretation, j as ContentEmbeddedObjectSchema, jn as RUN_FONT_PROPERTY_SHAPE, jt as ContentSheetCellCommentSchema, k as ContentEmbeddedObjectBlockSchema, kn as IMAGE_FORMATS, kt as ContentSheetCell, l as ContentCellBorders, ln as ContentStrokeSchema, lt as ContentOriginSchema, m as ContentCellPatternTypeSchema, mn as ContentTable, mt as ContentParagraph, n as ConstructMarkerImbalance, nn as ContentSheetRowSchema, nt as ContentImageOriginal, o as ContentBlockSchema, on as ContentStroke, ot as ContentListMembership, p as ContentCellPatternType, pn as ContentSubpathSchema, pt as ContentPageFurnitureSchema, q as ContentGradientFillSchema, qt as ContentSheetPrintRange, r as ContentBitmapFill, rn as ContentSheetSchema, rt as ContentImageOriginalSchema, s as ContentBorder, sn as ContentStrokeDash, st as ContentListMembershipSchema, t as CONTENT_ANNOTATION_FIELDS, tn as ContentSheetRow, tt as ContentImageBlockSchema, u as ContentCellBordersSchema, un as ContentStrokeStyle, ut as ContentPageBreak, v as ContentConstructEndSchema, vn as ContentTableColumnSchema, vt as ContentPathPoint, w as ContentDocumentSchema, wn as ContentVector, wt as ContentSection, x as ContentDefinedName, xn as ContentTableSchema, xt as ContentPathSegmentSchema, y as ContentConstructStart, yn as ContentTableRow, yt as ContentPathPointSchema, z as ContentFloatOriginSchema, zn as findConstructMarkerImbalance, zt as ContentSheetConditionalFormatValue } from "./content-BMrK9SrW.js";
9
+ import { $ as ContentHatchStyleSchema, $t as ContentSheetRepeatRange, A as ContentEmbeddedObjectKind, An as ImageFormat, At as ContentSheetCellComment, B as ContentFloatPosition, Bn as findRunConstructFault, Bt as ContentSheetConditionalFormatValueSchema, C as ContentDocument, Cn as ContentTranscriptSchema, Ct as ContentRunSchema, D as ContentEmbeddedObject, Dn as DecimalStringSchema, Dt as ContentShapeSchema, E as ContentDrawPageSchema, En as DecimalString, Et as ContentShape, F as ContentFloatAlignSchema, Fn as SheetRuleOperator, Ft as ContentSheetConditionalFormat, G as ContentFormulaSchema, Gn as resolveCellFillColor, Gt as ContentSheetImage, H as ContentFont, Hn as isContentConstructEnd, Ht as ContentSheetDataValidationSchema, I as ContentFloatAxis, In as SheetRuleOperatorSchema, It as ContentSheetConditionalFormatSchema, J as ContentGradientStyle, Jt as ContentSheetPrintRangeSchema, K as ContentGradientFill, Kn as unrecognizedFillKind, Kt as ContentSheetImageSchema, L as ContentFloatAxisSchema, Ln as clampHeadingLevel, Lt as ContentSheetConditionalFormatStyle, M as ContentFillPattern, Mn as RunConstructExtent, Mt as ContentSheetCellSchema, N as ContentFillPatternSchema, Nn as RunConstructExtentSchema, Nt as ContentSheetColumn, O as ContentEmbeddedObjectBlock, On as FusedNode, Ot as ContentSheet, P as ContentFloatAlign, Pn as RunConstructFault, Pt as ContentSheetColumnSchema, Q as ContentHatchStyle, Qt as ContentSheetRangeSchema, R as ContentFloatOrigin, Rn as contentDocumentSharedFields, Rt as ContentSheetConditionalFormatStyleSchema, S as ContentDefinedNameSchema, Sn as ContentTranscript, St as ContentRun, T as ContentDrawPage, Tn as ContentVectorSchema, Tt as ContentSectionSchema, U as ContentFontSchema, Un as isContentConstructStart, Ut as ContentSheetDataValidationType, V as ContentFloatPositionSchema, Vn as isContentBlock, Vt as ContentSheetDataValidation, W as ContentFormula, Wn as isRunConstructExtent, Wt as ContentSheetDataValidationTypeSchema, X as ContentHatchFill, Xt as ContentSheetPrintSettingsSchema, Y as ContentGradientStyleSchema, Yt as ContentSheetPrintSettings, Z as ContentHatchFillSchema, Zt as ContentSheetRange, _ as ContentConstructEnd, _n as ContentTableColumn, _t as ContentParagraphSchema, a as ContentBlock, an as ContentSlideSchema, at as ContentInterpretationSchema, b as ContentConstructStartSchema, bn as ContentTableRowSchema, bt as ContentPathSegment, c as ContentBorderSchema, cn as ContentStrokeDashSchema, ct as ContentOrigin, d as ContentCellFill, dn as ContentStrokeStyleSchema, dt as ContentPageBreakSchema, en as ContentSheetRepeatRangeSchema, et as ContentImageBlock, f as ContentCellFillSchema, fn as ContentSubpath, ft as ContentPageFurniture, g as ContentCellValueSchema, gn as ContentTableCellSchema, gt as ContentParagraphBordersSchema, h as ContentCellValue, hn as ContentTableCell, ht as ContentParagraphBorders, i as ContentBitmapFillSchema, in as ContentSlide, it as ContentInterpretation, j as ContentEmbeddedObjectSchema, jn as RUN_FONT_PROPERTY_SHAPE, jt as ContentSheetCellCommentSchema, k as ContentEmbeddedObjectBlockSchema, kn as IMAGE_FORMATS, kt as ContentSheetCell, l as ContentCellBorders, ln as ContentStrokeSchema, lt as ContentOriginSchema, m as ContentCellPatternTypeSchema, mn as ContentTable, mt as ContentParagraph, n as ConstructMarkerImbalance, nn as ContentSheetRowSchema, nt as ContentImageOriginal, o as ContentBlockSchema, on as ContentStroke, ot as ContentListMembership, p as ContentCellPatternType, pn as ContentSubpathSchema, pt as ContentPageFurnitureSchema, q as ContentGradientFillSchema, qt as ContentSheetPrintRange, r as ContentBitmapFill, rn as ContentSheetSchema, rt as ContentImageOriginalSchema, s as ContentBorder, sn as ContentStrokeDash, st as ContentListMembershipSchema, t as CONTENT_ANNOTATION_FIELDS, tn as ContentSheetRow, tt as ContentImageBlockSchema, u as ContentCellBordersSchema, un as ContentStrokeStyle, ut as ContentPageBreak, v as ContentConstructEndSchema, vn as ContentTableColumnSchema, vt as ContentPathPoint, w as ContentDocumentSchema, wn as ContentVector, wt as ContentSection, x as ContentDefinedName, xn as ContentTableSchema, xt as ContentPathSegmentSchema, y as ContentConstructStart, yn as ContentTableRow, yt as ContentPathPointSchema, z as ContentFloatOriginSchema, zn as findConstructMarkerImbalance, zt as ContentSheetConditionalFormatValue } from "./content-1yGdeaVT.js";
10
10
  import { ContentCodec } from "./codec.js";
11
11
  import { C as ProvenanceChange, E as ProvenanceDescriptorSchema, S as LinkTargetSchema, T as ProvenanceDescriptor, _ as FieldDescriptor, a as ConstructDescriptor, b as LinkDescriptorSchema, c as ContentControlDescriptorSchema, d as ContentControlType, f as ContentControlTypeSchema, g as DivisionSourceSchema, h as DivisionSource, i as AnchorTypeSchema, l as ContentControlLock, m as DivisionDescriptorSchema, n as AnchorDescriptorSchema, o as ConstructDescriptorSchema, p as DivisionDescriptor, r as AnchorType, s as ContentControlDescriptor, t as AnchorDescriptor, u as ContentControlLockSchema, v as FieldDescriptorSchema, w as ProvenanceChangeSchema, x as LinkTarget, y as LinkDescriptor } from "./construct-C9cYkjnd.js";
12
12
  import { CONTENT_DEFS, CONTENT_DOCUMENT_URI, EMBEDDED_OBJECT_KINDS, MAX_SAFE_INTEGER } from "./content-json-schema-defs.js";
13
- import { $ as isSheetGroupNode, A as SheetDescriptor, B as TreeGroup, C as ShapeConstructGroupNode, D as ShapeGroupNode, E as ShapeDescriptorSchema, F as SlideDescriptorSchema, G as TreeNodeSchema, H as TreeLeaf, I as SlideGroupNode, J as isListGroupNode, K as isDrawPageGroupNode, L as SlideGroupSchema, M as SheetGroupNode, N as SheetGroupSchema, O as ShapeGroupSchema, P as SlideDescriptor, Q as isShapeGroupNode, R as TreeBlockLeaf, S as ShapeChild, T as ShapeDescriptor, U as TreeLeafSchema, V as TreeGroupSchema, W as TreeNode, X as isSectionGroupNode, Y as isSectionConstructGroupNode, Z as isShapeConstructGroupNode, _ as SectionConstructGroupSchema, a as DrawPageGroupSchema, b as SectionGroupNode, c as HeadingParagraph, d as ListGroupNode, et as isSlideGroupNode, f as ListGroupSchema, g as SectionConstructGroupNode, h as SectionChild, i as DrawPageGroupNode, it as isTreeNode, j as SheetDescriptorSchema, k as SheetChild, l as HeadingParagraphSchema, m as ListParagraphSchema, n as DrawPageDescriptor, nt as isTreeGroup, o as HeadingGroupNode, p as ListParagraph, q as isHeadingGroupNode, r as DrawPageDescriptorSchema, rt as isTreeLeaf, s as HeadingGroupSchema, t as DrawPageChild, tt as isTreeBlockLeaf, u as ListChild, v as SectionDescriptor, w as ShapeConstructGroupSchema, x as SectionGroupSchema, y as SectionDescriptorSchema, z as TreeBlockLeafSchema } from "./package-node-gA3Kpgl2.js";
13
+ import { $ as isSheetGroupNode, A as SheetDescriptor, B as TreeGroup, C as ShapeConstructGroupNode, D as ShapeGroupNode, E as ShapeDescriptorSchema, F as SlideDescriptorSchema, G as TreeNodeSchema, H as TreeLeaf, I as SlideGroupNode, J as isListGroupNode, K as isDrawPageGroupNode, L as SlideGroupSchema, M as SheetGroupNode, N as SheetGroupSchema, O as ShapeGroupSchema, P as SlideDescriptor, Q as isShapeGroupNode, R as TreeBlockLeaf, S as ShapeChild, T as ShapeDescriptor, U as TreeLeafSchema, V as TreeGroupSchema, W as TreeNode, X as isSectionGroupNode, Y as isSectionConstructGroupNode, Z as isShapeConstructGroupNode, _ as SectionConstructGroupSchema, a as DrawPageGroupSchema, b as SectionGroupNode, c as HeadingParagraph, d as ListGroupNode, et as isSlideGroupNode, f as ListGroupSchema, g as SectionConstructGroupNode, h as SectionChild, i as DrawPageGroupNode, it as isTreeNode, j as SheetDescriptorSchema, k as SheetChild, l as HeadingParagraphSchema, m as ListParagraphSchema, n as DrawPageDescriptor, nt as isTreeGroup, o as HeadingGroupNode, p as ListParagraph, q as isHeadingGroupNode, r as DrawPageDescriptorSchema, rt as isTreeLeaf, s as HeadingGroupSchema, t as DrawPageChild, tt as isTreeBlockLeaf, u as ListChild, v as SectionDescriptor, w as ShapeConstructGroupSchema, x as SectionGroupSchema, y as SectionDescriptorSchema, z as TreeBlockLeafSchema } from "./package-node-CpE1BAqK.js";
14
14
  import { ConstructMarkerImbalanceError, TreeChildren, decompose } from "./decompose.js";
15
15
  import { DefinitionEntry, DefinitionEntrySchema, DefinitionsTable, DefinitionsTableSchema, StyleEntry, StyleEntrySchema, StyleParagraphProperties, StyleParagraphPropertiesSchema, StyleRunProperties, StyleRunPropertiesSchema, StylesTable, StylesTableSchema, applyParagraphStyleProperties, applyRunStyleProperties, overlayStyleEntries, resolveStyleChain } from "./definitions.js";
16
16
  import { DocumentTree, DocumentTreeSchema, TreeEmbeddedFont, TreeEmbeddedFontSchema } from "./package.js";
@@ -18,8 +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, TableGridFault, TableGridPosition, denseTableRows, describeTableGridFault, findTableGridFault, placeAnchorTableRows, tableCellColumnSpan, tableCellRowSpan, tableGridColumnCount, walkTableGrid } from "./table-grid.js";
22
- import { ContentDocumentJson, DocumentJsonResult, DocumentPackageRenamedError, DocumentSchemaKind, DocumentTreeJson, LayoutSchemaDemotedError, SCHEMA_FILE_NAMES, SchemaVersionMismatchError, UnrecognizedDocumentSchemaError, contentDocumentWithSchema, documentFromJson, documentSchemaKindOf, documentTreeWithSchema, schemaUriFor } from "./schema-io.js";
21
+ import { AnchorTableRow, PositionedTableCell, PositionedTableRow, TableGridAnchor, TableGridCovered, TableGridFault, TableGridPosition, assertNeverTableGridFaultKind, denseTableRows, describeTableGridFault, findTableGridFault, placeAnchorTableRows, tableCellColumnSpan, tableCellRowSpan, tableGridColumnCount, walkTableGrid } from "./table-grid.js";
22
+ import { ContentDocumentJson, DocumentJsonResult, DocumentPackageRenamedError, DocumentSchemaKind, DocumentTreeJson, LayoutSchemaDemotedError, SCHEMA_FILE_NAMES, SchemaVersionMismatchError, UnrecognizedDocumentSchemaError, assertNeverDocumentSchemaKind, contentDocumentWithSchema, documentFromJson, documentSchemaKindOf, documentTreeWithSchema, schemaUriFor } from "./schema-io.js";
23
23
  import { StyledFragment, StyledRun, TextMeasurer, UnderlineMetrics, WrapOptions, WrappedLine } from "./text-layout.js";
24
24
  import { MathAssembledGlyphs, MathBox, MathColor, MathFontMetrics, MathGlyphMetrics, MathGlyphPlacement, MathGlyphRun, MathLayoutItem, MathRule, MathStretchAxis, MathStretchGlyph, MathStretchResult, MathStroke, PositionedFormula } from "./math-layout.js";
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, ContentTableColumn, ContentTableColumnSchema, 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, TableGridFault, 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, describeTableGridFault, documentFromJson, documentSchemaKindOf, documentTreeWithSchema, factorStyles, findConstructMarkerImbalance, findRunConstructFault, findTableGridFault, 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 };
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, type 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, ContentTableColumn, ContentTableColumnSchema, 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, type FontFace, type FontRegistryOptions, type 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, type MathAssembledGlyphs, type MathBox, type MathColor, MathExpression, MathExpressionSchema, type MathFontMetrics, type MathGlyphMetrics, type MathGlyphPlacement, type MathGlyphRun, type 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, type MathRule, type MathStretchAxis, type MathStretchGlyph, type MathStretchResult, type MathStroke, MathSum, MathSumSchema, MathSym, MathSymSchema, MathSymbolEntry, MathSymbolEntrySchema, MathUncertainty, MathUncertaintySchema, MathUnit, MathUnitSchema, MathUnparsed, MathUnparsedSchema, PAGE_SIZE_A4, PAGE_SIZE_LETTER, PageSize, PageSizeSchema, Point, type PositionedFormula, PositionedTableCell, PositionedTableRow, ProvenanceChange, ProvenanceChangeSchema, ProvenanceDescriptor, ProvenanceDescriptorSchema, type 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, type StyledFragment, type StyledRun, StylesTable, StylesTableSchema, SymbolTable, SymbolTableSchema, TableGridAnchor, TableGridCovered, TableGridFault, TableGridPosition, TextDirection, TextDirectionSchema, type TextMeasurer, TreeBlockLeaf, TreeBlockLeafSchema, type TreeChildren, TreeEmbeddedFont, TreeEmbeddedFontSchema, TreeGroup, TreeGroupSchema, TreeLeaf, TreeLeafSchema, TreeNode, TreeNodeSchema, type UnderlineMetrics, UnrecognizedDocumentSchemaError, type WrapOptions, type WrappedLine, applyParagraphStyleProperties, applyRunStyleProperties, assembleTree, assertNeverDocumentSchemaKind, assertNeverTableGridFaultKind, borderWeightForWidthPt, cellReference, clampHeadingLevel, colorToRgbHex, columnIndexToLetters, columnLettersToIndex, contentDocumentSharedFields, contentDocumentWithSchema, dashedBorderWeightForWidthPt, decompose, denseTableRows, describeTableGridFault, documentFromJson, documentSchemaKindOf, documentTreeWithSchema, factorStyles, findConstructMarkerImbalance, findRunConstructFault, findTableGridFault, 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
@@ -1,6 +1,5 @@
1
1
  import { cellReference, columnIndexToLetters, columnLettersToIndex, parseCellReference, parseRangeReference, rangeReference } from "./a1.js";
2
2
  import { BORDER_WIDTH_PT, borderWeightForWidthPt, dashedBorderWeightForWidthPt } from "./border-weight.js";
3
- import "./codec.js";
4
3
  import { COLOR_BLACK, ColorSchema, colorToRgbHex, rgbHexToColor } from "./color.js";
5
4
  import { SourceFormatSchema, SourceResidueSchema } from "./source.js";
6
5
  import { AnchorDescriptorSchema, AnchorTypeSchema, ConstructDescriptorSchema, ContentControlDescriptorSchema, ContentControlLockSchema, ContentControlTypeSchema, DivisionDescriptorSchema, DivisionSourceSchema, FieldDescriptorSchema, LinkDescriptorSchema, LinkTargetSchema, ProvenanceChangeSchema, ProvenanceDescriptorSchema } from "./construct.js";
@@ -13,13 +12,10 @@ import { CONTENT_ANNOTATION_FIELDS, ContentBitmapFillSchema, ContentBlockSchema,
13
12
  import { DefinitionEntrySchema, DefinitionsTableSchema, StyleEntrySchema, StyleParagraphPropertiesSchema, StyleRunPropertiesSchema, StylesTableSchema, applyParagraphStyleProperties, applyRunStyleProperties, overlayStyleEntries, resolveStyleChain } from "./definitions.js";
14
13
  import { DrawPageDescriptorSchema, DrawPageGroupSchema, HeadingGroupSchema, HeadingParagraphSchema, ListGroupSchema, ListParagraphSchema, SectionConstructGroupSchema, SectionDescriptorSchema, SectionGroupSchema, ShapeConstructGroupSchema, ShapeDescriptorSchema, ShapeGroupSchema, SheetDescriptorSchema, SheetGroupSchema, SlideDescriptorSchema, SlideGroupSchema, TreeBlockLeafSchema, TreeGroupSchema, TreeLeafSchema, TreeNodeSchema, isDrawPageGroupNode, isHeadingGroupNode, isListGroupNode, isSectionConstructGroupNode, isSectionGroupNode, isShapeConstructGroupNode, isShapeGroupNode, isSheetGroupNode, isSlideGroupNode, isTreeBlockLeaf, isTreeGroup, isTreeLeaf, isTreeNode } from "./package-node.js";
15
14
  import { DocumentTreeSchema, TreeEmbeddedFontSchema } from "./package.js";
16
- import { DocumentPackageRenamedError, LayoutSchemaDemotedError, SCHEMA_FILE_NAMES, SchemaVersionMismatchError, UnrecognizedDocumentSchemaError, contentDocumentWithSchema, documentFromJson, documentSchemaKindOf, documentTreeWithSchema, schemaUriFor } from "./schema-io.js";
15
+ import { DocumentPackageRenamedError, LayoutSchemaDemotedError, SCHEMA_FILE_NAMES, SchemaVersionMismatchError, UnrecognizedDocumentSchemaError, assertNeverDocumentSchemaKind, contentDocumentWithSchema, documentFromJson, documentSchemaKindOf, documentTreeWithSchema, schemaUriFor } from "./schema-io.js";
17
16
  import { CONTENT_DEFS, CONTENT_DOCUMENT_URI, EMBEDDED_OBJECT_KINDS, MAX_SAFE_INTEGER } from "./content-json-schema-defs.js";
18
17
  import { ConstructMarkerImbalanceError, decompose } from "./decompose.js";
19
18
  import { flattenTree } from "./flatten.js";
20
19
  import { assembleTree, factorStyles } from "./factor-styles.js";
21
- import "./font-port.js";
22
- import { denseTableRows, describeTableGridFault, findTableGridFault, placeAnchorTableRows, tableCellColumnSpan, tableCellRowSpan, tableGridColumnCount, walkTableGrid } from "./table-grid.js";
23
- import "./text-layout.js";
24
- import "./math-layout.js";
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, ContentTableColumnSchema, 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, describeTableGridFault, documentFromJson, documentSchemaKindOf, documentTreeWithSchema, factorStyles, findConstructMarkerImbalance, findRunConstructFault, findTableGridFault, 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 };
20
+ import { assertNeverTableGridFaultKind, denseTableRows, describeTableGridFault, findTableGridFault, placeAnchorTableRows, tableCellColumnSpan, tableCellRowSpan, tableGridColumnCount, walkTableGrid } from "./table-grid.js";
21
+ 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, ContentTableColumnSchema, 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, assertNeverDocumentSchemaKind, assertNeverTableGridFaultKind, borderWeightForWidthPt, cellReference, clampHeadingLevel, colorToRgbHex, columnIndexToLetters, columnLettersToIndex, contentDocumentSharedFields, contentDocumentWithSchema, dashedBorderWeightForWidthPt, decompose, denseTableRows, describeTableGridFault, documentFromJson, documentSchemaKindOf, documentTreeWithSchema, factorStyles, findConstructMarkerImbalance, findRunConstructFault, findTableGridFault, 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 };
@@ -100,8 +100,8 @@ interface MathFontMetrics {
100
100
  readonly scriptPercentScaleDown: number;
101
101
  readonly scriptScriptPercentScaleDown: number;
102
102
  readonly defaultRuleThicknessPt: number;
103
- glyph(codePoint: number, sizePt: number): MathGlyphMetrics | undefined;
104
- stretch(codePoint: number, axis: MathStretchAxis, targetSizePt: number, sizePt: number): MathStretchResult | undefined;
103
+ readonly glyph: (codePoint: number, sizePt: number) => MathGlyphMetrics | undefined;
104
+ readonly stretch: (codePoint: number, axis: MathStretchAxis, targetSizePt: number, sizePt: number) => MathStretchResult | undefined;
105
105
  }
106
106
  interface PositionedFormula {
107
107
  readonly pageIndex: number;
@@ -100,8 +100,8 @@ interface MathFontMetrics {
100
100
  readonly scriptPercentScaleDown: number;
101
101
  readonly scriptScriptPercentScaleDown: number;
102
102
  readonly defaultRuleThicknessPt: number;
103
- glyph(codePoint: number, sizePt: number): MathGlyphMetrics | undefined;
104
- stretch(codePoint: number, axis: MathStretchAxis, targetSizePt: number, sizePt: number): MathStretchResult | undefined;
103
+ readonly glyph: (codePoint: number, sizePt: number) => MathGlyphMetrics | undefined;
104
+ readonly stretch: (codePoint: number, axis: MathStretchAxis, targetSizePt: number, sizePt: number) => MathStretchResult | undefined;
105
105
  }
106
106
  interface PositionedFormula {
107
107
  readonly pageIndex: number;
package/dist/math.cjs CHANGED
@@ -105,16 +105,17 @@ function isMathExpression(value) {
105
105
  if (kind === "unparsed") return typeof value.latex === "string";
106
106
  return false;
107
107
  }
108
+ const mathExpressionSchemaBox = {};
108
109
  const MathAppSchema = zod.z.object({
109
110
  kind: zod.z.literal("app"),
110
111
  operator: zod.z.string(),
111
- args: zod.z.lazy(() => zod.z.array(MathExpressionSchema))
112
+ args: zod.z.lazy(() => zod.z.array(mathExpressionSchemaBox.value))
112
113
  });
113
114
  const BINDER_SCHEMA_FIELDS = {
114
115
  binder: zod.z.string(),
115
- lower: zod.z.lazy(() => MathExpressionSchema),
116
- upper: zod.z.lazy(() => MathExpressionSchema),
117
- body: zod.z.lazy(() => MathExpressionSchema)
116
+ lower: zod.z.lazy(() => mathExpressionSchemaBox.value),
117
+ upper: zod.z.lazy(() => mathExpressionSchemaBox.value),
118
+ body: zod.z.lazy(() => mathExpressionSchemaBox.value)
118
119
  };
119
120
  const MathSumSchema = zod.z.object({
120
121
  kind: zod.z.literal("sum"),
@@ -126,7 +127,7 @@ const MathProdSchema = zod.z.object({
126
127
  });
127
128
  const MathMatrixSchema = zod.z.object({
128
129
  kind: zod.z.literal("matrix"),
129
- rows: zod.z.lazy(() => zod.z.array(zod.z.array(MathExpressionSchema)))
130
+ rows: zod.z.lazy(() => zod.z.array(zod.z.array(mathExpressionSchemaBox.value)))
130
131
  }).refine((matrix) => new Set(matrix.rows.map((row) => row.length)).size <= 1, { message: "matrix rows must all have the same number of columns" });
131
132
  const MathExpressionSchema = zod.z.discriminatedUnion("kind", [
132
133
  MathNumSchema,
@@ -138,6 +139,7 @@ const MathExpressionSchema = zod.z.discriminatedUnion("kind", [
138
139
  MathMatrixSchema,
139
140
  MathUnparsedSchema
140
141
  ]);
142
+ mathExpressionSchemaBox.value = MathExpressionSchema;
141
143
  const QuantitySchema = zod.z.object({
142
144
  kind: zod.z.literal("quantity"),
143
145
  magnitude: zod.z.number(),
package/dist/math.js CHANGED
@@ -104,16 +104,17 @@ function isMathExpression(value) {
104
104
  if (kind === "unparsed") return typeof value.latex === "string";
105
105
  return false;
106
106
  }
107
+ const mathExpressionSchemaBox = {};
107
108
  const MathAppSchema = z.object({
108
109
  kind: z.literal("app"),
109
110
  operator: z.string(),
110
- args: z.lazy(() => z.array(MathExpressionSchema))
111
+ args: z.lazy(() => z.array(mathExpressionSchemaBox.value))
111
112
  });
112
113
  const BINDER_SCHEMA_FIELDS = {
113
114
  binder: z.string(),
114
- lower: z.lazy(() => MathExpressionSchema),
115
- upper: z.lazy(() => MathExpressionSchema),
116
- body: z.lazy(() => MathExpressionSchema)
115
+ lower: z.lazy(() => mathExpressionSchemaBox.value),
116
+ upper: z.lazy(() => mathExpressionSchemaBox.value),
117
+ body: z.lazy(() => mathExpressionSchemaBox.value)
117
118
  };
118
119
  const MathSumSchema = z.object({
119
120
  kind: z.literal("sum"),
@@ -125,7 +126,7 @@ const MathProdSchema = z.object({
125
126
  });
126
127
  const MathMatrixSchema = z.object({
127
128
  kind: z.literal("matrix"),
128
- rows: z.lazy(() => z.array(z.array(MathExpressionSchema)))
129
+ rows: z.lazy(() => z.array(z.array(mathExpressionSchemaBox.value)))
129
130
  }).refine((matrix) => new Set(matrix.rows.map((row) => row.length)).size <= 1, { message: "matrix rows must all have the same number of columns" });
130
131
  const MathExpressionSchema = z.discriminatedUnion("kind", [
131
132
  MathNumSchema,
@@ -137,6 +138,7 @@ const MathExpressionSchema = z.discriminatedUnion("kind", [
137
138
  MathMatrixSchema,
138
139
  MathUnparsedSchema
139
140
  ]);
141
+ mathExpressionSchemaBox.value = MathExpressionSchema;
140
142
  const QuantitySchema = z.object({
141
143
  kind: z.literal("quantity"),
142
144
  magnitude: z.number(),
package/dist/mathml.cjs CHANGED
@@ -41,11 +41,12 @@ function isMathMlNode(value) {
41
41
  if (type === "element") return typeof value.tag === "string" && Array.isArray(value.attributes) && value.attributes.every(isMathMlAttribute) && Array.isArray(value.children) && value.children.every(isMathMlNode);
42
42
  return false;
43
43
  }
44
+ const mathMlNodeSchemaBox = {};
44
45
  const MathMlElementSchema = zod.z.object({
45
46
  type: zod.z.literal("element"),
46
47
  tag: zod.z.string(),
47
48
  attributes: zod.z.array(MathMlAttributeSchema),
48
- children: zod.z.lazy(() => zod.z.array(MathMlNodeSchema))
49
+ children: zod.z.lazy(() => zod.z.array(mathMlNodeSchemaBox.value))
49
50
  });
50
51
  const MathMlNodeSchema = zod.z.discriminatedUnion("type", [
51
52
  MathMlTextSchema,
@@ -55,6 +56,7 @@ const MathMlNodeSchema = zod.z.discriminatedUnion("type", [
55
56
  MathMlPiSchema,
56
57
  MathMlElementSchema
57
58
  ]);
59
+ mathMlNodeSchemaBox.value = MathMlNodeSchema;
58
60
  //#endregion
59
61
  exports.MathMlAttributeSchema = MathMlAttributeSchema;
60
62
  exports.MathMlCdataSchema = MathMlCdataSchema;
package/dist/mathml.js CHANGED
@@ -40,11 +40,12 @@ function isMathMlNode(value) {
40
40
  if (type === "element") return typeof value.tag === "string" && Array.isArray(value.attributes) && value.attributes.every(isMathMlAttribute) && Array.isArray(value.children) && value.children.every(isMathMlNode);
41
41
  return false;
42
42
  }
43
+ const mathMlNodeSchemaBox = {};
43
44
  const MathMlElementSchema = z.object({
44
45
  type: z.literal("element"),
45
46
  tag: z.string(),
46
47
  attributes: z.array(MathMlAttributeSchema),
47
- children: z.lazy(() => z.array(MathMlNodeSchema))
48
+ children: z.lazy(() => z.array(mathMlNodeSchemaBox.value))
48
49
  });
49
50
  const MathMlNodeSchema = z.discriminatedUnion("type", [
50
51
  MathMlTextSchema,
@@ -54,5 +55,6 @@ const MathMlNodeSchema = z.discriminatedUnion("type", [
54
55
  MathMlPiSchema,
55
56
  MathMlElementSchema
56
57
  ]);
58
+ mathMlNodeSchemaBox.value = MathMlNodeSchema;
57
59
  //#endregion
58
60
  export { MathMlAttributeSchema, MathMlCdataSchema, MathMlCommentSchema, MathMlDeclarationSchema, MathMlElementSchema, MathMlNodeSchema, MathMlPiSchema, MathMlTextSchema, isMathMlNode };
@@ -1,4 +1,4 @@
1
- import { D as ContentEmbeddedObject, Gt as ContentSheetImage, W as ContentFormula, _ as ContentConstructEnd, a as ContentBlock, wn as ContentVector, y as ContentConstructStart } from "./content-BMrK9SrW.js";
1
+ import { D as ContentEmbeddedObject, Gt as ContentSheetImage, W as ContentFormula, _ as ContentConstructEnd, a as ContentBlock, wn as ContentVector, y as ContentConstructStart } from "./content-1yGdeaVT.js";
2
2
  import { a as ConstructDescriptor } from "./construct-C9cYkjnd.js";
3
3
  import { z } from "zod";
4
4
  //#region src/package-node.d.ts
@@ -1,4 +1,4 @@
1
- import { D as ContentEmbeddedObject, Gt as ContentSheetImage, W as ContentFormula, _ as ContentConstructEnd, a as ContentBlock, wn as ContentVector, y as ContentConstructStart } from "./content-Dg9cb8mF.cjs";
1
+ import { D as ContentEmbeddedObject, Gt as ContentSheetImage, W as ContentFormula, _ as ContentConstructEnd, a as ContentBlock, wn as ContentVector, y as ContentConstructStart } from "./content-CSf8z9NW.cjs";
2
2
  import { a as ConstructDescriptor } from "./construct-C9cYkjnd.cjs";
3
3
  import { z } from "zod";
4
4
  //#region src/package-node.d.ts
@@ -1,2 +1,2 @@
1
- import { $ as isSheetGroupNode, A as SheetDescriptor, B as TreeGroup, C as ShapeConstructGroupNode, D as ShapeGroupNode, E as ShapeDescriptorSchema, F as SlideDescriptorSchema, G as TreeNodeSchema, H as TreeLeaf, I as SlideGroupNode, J as isListGroupNode, K as isDrawPageGroupNode, L as SlideGroupSchema, M as SheetGroupNode, N as SheetGroupSchema, O as ShapeGroupSchema, P as SlideDescriptor, Q as isShapeGroupNode, R as TreeBlockLeaf, S as ShapeChild, T as ShapeDescriptor, U as TreeLeafSchema, V as TreeGroupSchema, W as TreeNode, X as isSectionGroupNode, Y as isSectionConstructGroupNode, Z as isShapeConstructGroupNode, _ as SectionConstructGroupSchema, a as DrawPageGroupSchema, b as SectionGroupNode, c as HeadingParagraph, d as ListGroupNode, et as isSlideGroupNode, f as ListGroupSchema, g as SectionConstructGroupNode, h as SectionChild, i as DrawPageGroupNode, it as isTreeNode, j as SheetDescriptorSchema, k as SheetChild, l as HeadingParagraphSchema, m as ListParagraphSchema, n as DrawPageDescriptor, nt as isTreeGroup, o as HeadingGroupNode, p as ListParagraph, q as isHeadingGroupNode, r as DrawPageDescriptorSchema, rt as isTreeLeaf, s as HeadingGroupSchema, t as DrawPageChild, tt as isTreeBlockLeaf, u as ListChild, v as SectionDescriptor, w as ShapeConstructGroupSchema, x as SectionGroupSchema, y as SectionDescriptorSchema, z as TreeBlockLeafSchema } from "./package-node-wxNXHAov.cjs";
1
+ import { $ as isSheetGroupNode, A as SheetDescriptor, B as TreeGroup, C as ShapeConstructGroupNode, D as ShapeGroupNode, E as ShapeDescriptorSchema, F as SlideDescriptorSchema, G as TreeNodeSchema, H as TreeLeaf, I as SlideGroupNode, J as isListGroupNode, K as isDrawPageGroupNode, L as SlideGroupSchema, M as SheetGroupNode, N as SheetGroupSchema, O as ShapeGroupSchema, P as SlideDescriptor, Q as isShapeGroupNode, R as TreeBlockLeaf, S as ShapeChild, T as ShapeDescriptor, U as TreeLeafSchema, V as TreeGroupSchema, W as TreeNode, X as isSectionGroupNode, Y as isSectionConstructGroupNode, Z as isShapeConstructGroupNode, _ as SectionConstructGroupSchema, a as DrawPageGroupSchema, b as SectionGroupNode, c as HeadingParagraph, d as ListGroupNode, et as isSlideGroupNode, f as ListGroupSchema, g as SectionConstructGroupNode, h as SectionChild, i as DrawPageGroupNode, it as isTreeNode, j as SheetDescriptorSchema, k as SheetChild, l as HeadingParagraphSchema, m as ListParagraphSchema, n as DrawPageDescriptor, nt as isTreeGroup, o as HeadingGroupNode, p as ListParagraph, q as isHeadingGroupNode, r as DrawPageDescriptorSchema, rt as isTreeLeaf, s as HeadingGroupSchema, t as DrawPageChild, tt as isTreeBlockLeaf, u as ListChild, v as SectionDescriptor, w as ShapeConstructGroupSchema, x as SectionGroupSchema, y as SectionDescriptorSchema, z as TreeBlockLeafSchema } from "./package-node-ng7Yimj9.cjs";
2
2
  export { DrawPageChild, DrawPageDescriptor, DrawPageDescriptorSchema, DrawPageGroupNode, DrawPageGroupSchema, HeadingGroupNode, HeadingGroupSchema, HeadingParagraph, HeadingParagraphSchema, ListChild, ListGroupNode, ListGroupSchema, ListParagraph, ListParagraphSchema, SectionChild, SectionConstructGroupNode, SectionConstructGroupSchema, SectionDescriptor, SectionDescriptorSchema, SectionGroupNode, SectionGroupSchema, ShapeChild, ShapeConstructGroupNode, ShapeConstructGroupSchema, ShapeDescriptor, ShapeDescriptorSchema, ShapeGroupNode, ShapeGroupSchema, SheetChild, SheetDescriptor, SheetDescriptorSchema, SheetGroupNode, SheetGroupSchema, SlideDescriptor, SlideDescriptorSchema, SlideGroupNode, SlideGroupSchema, TreeBlockLeaf, TreeBlockLeafSchema, TreeGroup, TreeGroupSchema, TreeLeaf, TreeLeafSchema, TreeNode, TreeNodeSchema, isDrawPageGroupNode, isHeadingGroupNode, isListGroupNode, isSectionConstructGroupNode, isSectionGroupNode, isShapeConstructGroupNode, isShapeGroupNode, isSheetGroupNode, isSlideGroupNode, isTreeBlockLeaf, isTreeGroup, isTreeLeaf, isTreeNode };
@@ -1,2 +1,2 @@
1
- import { $ as isSheetGroupNode, A as SheetDescriptor, B as TreeGroup, C as ShapeConstructGroupNode, D as ShapeGroupNode, E as ShapeDescriptorSchema, F as SlideDescriptorSchema, G as TreeNodeSchema, H as TreeLeaf, I as SlideGroupNode, J as isListGroupNode, K as isDrawPageGroupNode, L as SlideGroupSchema, M as SheetGroupNode, N as SheetGroupSchema, O as ShapeGroupSchema, P as SlideDescriptor, Q as isShapeGroupNode, R as TreeBlockLeaf, S as ShapeChild, T as ShapeDescriptor, U as TreeLeafSchema, V as TreeGroupSchema, W as TreeNode, X as isSectionGroupNode, Y as isSectionConstructGroupNode, Z as isShapeConstructGroupNode, _ as SectionConstructGroupSchema, a as DrawPageGroupSchema, b as SectionGroupNode, c as HeadingParagraph, d as ListGroupNode, et as isSlideGroupNode, f as ListGroupSchema, g as SectionConstructGroupNode, h as SectionChild, i as DrawPageGroupNode, it as isTreeNode, j as SheetDescriptorSchema, k as SheetChild, l as HeadingParagraphSchema, m as ListParagraphSchema, n as DrawPageDescriptor, nt as isTreeGroup, o as HeadingGroupNode, p as ListParagraph, q as isHeadingGroupNode, r as DrawPageDescriptorSchema, rt as isTreeLeaf, s as HeadingGroupSchema, t as DrawPageChild, tt as isTreeBlockLeaf, u as ListChild, v as SectionDescriptor, w as ShapeConstructGroupSchema, x as SectionGroupSchema, y as SectionDescriptorSchema, z as TreeBlockLeafSchema } from "./package-node-gA3Kpgl2.js";
1
+ import { $ as isSheetGroupNode, A as SheetDescriptor, B as TreeGroup, C as ShapeConstructGroupNode, D as ShapeGroupNode, E as ShapeDescriptorSchema, F as SlideDescriptorSchema, G as TreeNodeSchema, H as TreeLeaf, I as SlideGroupNode, J as isListGroupNode, K as isDrawPageGroupNode, L as SlideGroupSchema, M as SheetGroupNode, N as SheetGroupSchema, O as ShapeGroupSchema, P as SlideDescriptor, Q as isShapeGroupNode, R as TreeBlockLeaf, S as ShapeChild, T as ShapeDescriptor, U as TreeLeafSchema, V as TreeGroupSchema, W as TreeNode, X as isSectionGroupNode, Y as isSectionConstructGroupNode, Z as isShapeConstructGroupNode, _ as SectionConstructGroupSchema, a as DrawPageGroupSchema, b as SectionGroupNode, c as HeadingParagraph, d as ListGroupNode, et as isSlideGroupNode, f as ListGroupSchema, g as SectionConstructGroupNode, h as SectionChild, i as DrawPageGroupNode, it as isTreeNode, j as SheetDescriptorSchema, k as SheetChild, l as HeadingParagraphSchema, m as ListParagraphSchema, n as DrawPageDescriptor, nt as isTreeGroup, o as HeadingGroupNode, p as ListParagraph, q as isHeadingGroupNode, r as DrawPageDescriptorSchema, rt as isTreeLeaf, s as HeadingGroupSchema, t as DrawPageChild, tt as isTreeBlockLeaf, u as ListChild, v as SectionDescriptor, w as ShapeConstructGroupSchema, x as SectionGroupSchema, y as SectionDescriptorSchema, z as TreeBlockLeafSchema } from "./package-node-CpE1BAqK.js";
2
2
  export { DrawPageChild, DrawPageDescriptor, DrawPageDescriptorSchema, DrawPageGroupNode, DrawPageGroupSchema, HeadingGroupNode, HeadingGroupSchema, HeadingParagraph, HeadingParagraphSchema, ListChild, ListGroupNode, ListGroupSchema, ListParagraph, ListParagraphSchema, SectionChild, SectionConstructGroupNode, SectionConstructGroupSchema, SectionDescriptor, SectionDescriptorSchema, SectionGroupNode, SectionGroupSchema, ShapeChild, ShapeConstructGroupNode, ShapeConstructGroupSchema, ShapeDescriptor, ShapeDescriptorSchema, ShapeGroupNode, ShapeGroupSchema, SheetChild, SheetDescriptor, SheetDescriptorSchema, SheetGroupNode, SheetGroupSchema, SlideDescriptor, SlideDescriptorSchema, SlideGroupNode, SlideGroupSchema, TreeBlockLeaf, TreeBlockLeafSchema, TreeGroup, TreeGroupSchema, TreeLeaf, TreeLeafSchema, TreeNode, TreeNodeSchema, isDrawPageGroupNode, isHeadingGroupNode, isListGroupNode, isSectionConstructGroupNode, isSectionGroupNode, isShapeConstructGroupNode, isShapeGroupNode, isSheetGroupNode, isSlideGroupNode, isTreeBlockLeaf, isTreeGroup, isTreeLeaf, isTreeNode };
@@ -1,6 +1,6 @@
1
1
  import { d as MathMlNode } from "./mathml-Czqc1mdZ.cjs";
2
2
  import { p as MathExpression } from "./math-BScHxedi.cjs";
3
- import { I as SlideGroupNode, M as SheetGroupNode, b as SectionGroupNode, i as DrawPageGroupNode } from "./package-node-wxNXHAov.cjs";
3
+ import { I as SlideGroupNode, M as SheetGroupNode, b as SectionGroupNode, i as DrawPageGroupNode } from "./package-node-ng7Yimj9.cjs";
4
4
  import { z } from "zod";
5
5
  //#region src/package.d.ts
6
6
  declare const TreeEmbeddedFontSchema: z.ZodObject<{
package/dist/package.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import { d as MathMlNode } from "./mathml-Czqc1mdZ.js";
2
2
  import { p as MathExpression } from "./math-BScHxedi.js";
3
- import { I as SlideGroupNode, M as SheetGroupNode, b as SectionGroupNode, i as DrawPageGroupNode } from "./package-node-gA3Kpgl2.js";
3
+ import { I as SlideGroupNode, M as SheetGroupNode, b as SectionGroupNode, i as DrawPageGroupNode } from "./package-node-CpE1BAqK.js";
4
4
  import { z } from "zod";
5
5
  //#region src/package.d.ts
6
6
  declare const TreeEmbeddedFontSchema: z.ZodObject<{
@@ -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.15.2/schemas/${SCHEMA_FILE_NAMES[kind]}`;
10
+ return `https://cdn.jsdelivr.net/npm/document-schema.js@7.15.3/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) {
@@ -94,6 +94,9 @@ var SchemaVersionMismatchError = class extends Error {
94
94
  this.installedVersion = installedVersion;
95
95
  }
96
96
  };
97
+ function assertNeverDocumentSchemaKind(value) {
98
+ throw new Error(`documentFromJson: unhandled DocumentSchemaKind ${JSON.stringify(value)}`);
99
+ }
97
100
  function documentFromJson(value) {
98
101
  if (!isRecord(value) || typeof value.$schema !== "string") throw new UnrecognizedDocumentSchemaError(isRecord(value) ? value.$schema : void 0);
99
102
  const parts = parseSchemaUri(value.$schema);
@@ -102,7 +105,7 @@ function documentFromJson(value) {
102
105
  if (parts.stem === "document-package") throw new DocumentPackageRenamedError(value.$schema);
103
106
  const kind = kindForFileStem(parts.stem);
104
107
  if (kind === void 0) throw new UnrecognizedDocumentSchemaError(value.$schema);
105
- if (majorVersionOf(parts.version) !== majorVersionOf("7.15.2")) throw new SchemaVersionMismatchError(value.$schema, parts.version, "7.15.2");
108
+ if (majorVersionOf(parts.version) !== majorVersionOf("7.15.3")) throw new SchemaVersionMismatchError(value.$schema, parts.version, "7.15.3");
106
109
  switch (kind) {
107
110
  case "DocumentTree": return {
108
111
  kind,
@@ -113,6 +116,7 @@ function documentFromJson(value) {
113
116
  value: require_content.ContentDocumentSchema.parse(value)
114
117
  };
115
118
  }
119
+ return assertNeverDocumentSchemaKind(kind);
116
120
  }
117
121
  //#endregion
118
122
  exports.DocumentPackageRenamedError = DocumentPackageRenamedError;
@@ -120,6 +124,7 @@ exports.LayoutSchemaDemotedError = LayoutSchemaDemotedError;
120
124
  exports.SCHEMA_FILE_NAMES = SCHEMA_FILE_NAMES;
121
125
  exports.SchemaVersionMismatchError = SchemaVersionMismatchError;
122
126
  exports.UnrecognizedDocumentSchemaError = UnrecognizedDocumentSchemaError;
127
+ exports.assertNeverDocumentSchemaKind = assertNeverDocumentSchemaKind;
123
128
  exports.contentDocumentWithSchema = contentDocumentWithSchema;
124
129
  exports.documentFromJson = documentFromJson;
125
130
  exports.documentSchemaKindOf = documentSchemaKindOf;
@@ -1,4 +1,4 @@
1
- import { C as ContentDocument } from "./content-Dg9cb8mF.cjs";
1
+ import { C as ContentDocument } from "./content-CSf8z9NW.cjs";
2
2
  import { DocumentTree } from "./package.cjs";
3
3
  //#region src/schema-io.d.ts
4
4
  type DocumentSchemaKind = "DocumentTree" | "ContentDocument";
@@ -38,6 +38,7 @@ type DocumentJsonResult = {
38
38
  kind: "ContentDocument";
39
39
  value: ContentDocument;
40
40
  };
41
+ declare function assertNeverDocumentSchemaKind(value: never): never;
41
42
  declare function documentFromJson(value: unknown): DocumentJsonResult;
42
43
  //#endregion
43
- export { ContentDocumentJson, DocumentJsonResult, DocumentPackageRenamedError, DocumentSchemaKind, DocumentTreeJson, LayoutSchemaDemotedError, SCHEMA_FILE_NAMES, SchemaVersionMismatchError, UnrecognizedDocumentSchemaError, contentDocumentWithSchema, documentFromJson, documentSchemaKindOf, documentTreeWithSchema, schemaUriFor };
44
+ export { ContentDocumentJson, DocumentJsonResult, DocumentPackageRenamedError, DocumentSchemaKind, DocumentTreeJson, LayoutSchemaDemotedError, SCHEMA_FILE_NAMES, SchemaVersionMismatchError, UnrecognizedDocumentSchemaError, assertNeverDocumentSchemaKind, contentDocumentWithSchema, documentFromJson, documentSchemaKindOf, documentTreeWithSchema, schemaUriFor };
@@ -1,4 +1,4 @@
1
- import { C as ContentDocument } from "./content-BMrK9SrW.js";
1
+ import { C as ContentDocument } from "./content-1yGdeaVT.js";
2
2
  import { DocumentTree } from "./package.js";
3
3
  //#region src/schema-io.d.ts
4
4
  type DocumentSchemaKind = "DocumentTree" | "ContentDocument";
@@ -38,6 +38,7 @@ type DocumentJsonResult = {
38
38
  kind: "ContentDocument";
39
39
  value: ContentDocument;
40
40
  };
41
+ declare function assertNeverDocumentSchemaKind(value: never): never;
41
42
  declare function documentFromJson(value: unknown): DocumentJsonResult;
42
43
  //#endregion
43
- export { ContentDocumentJson, DocumentJsonResult, DocumentPackageRenamedError, DocumentSchemaKind, DocumentTreeJson, LayoutSchemaDemotedError, SCHEMA_FILE_NAMES, SchemaVersionMismatchError, UnrecognizedDocumentSchemaError, contentDocumentWithSchema, documentFromJson, documentSchemaKindOf, documentTreeWithSchema, schemaUriFor };
44
+ export { ContentDocumentJson, DocumentJsonResult, DocumentPackageRenamedError, DocumentSchemaKind, DocumentTreeJson, LayoutSchemaDemotedError, SCHEMA_FILE_NAMES, SchemaVersionMismatchError, UnrecognizedDocumentSchemaError, assertNeverDocumentSchemaKind, contentDocumentWithSchema, documentFromJson, documentSchemaKindOf, documentTreeWithSchema, schemaUriFor };
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.15.2/schemas/${SCHEMA_FILE_NAMES[kind]}`;
9
+ return `https://cdn.jsdelivr.net/npm/document-schema.js@7.15.3/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) {
@@ -93,6 +93,9 @@ var SchemaVersionMismatchError = class extends Error {
93
93
  this.installedVersion = installedVersion;
94
94
  }
95
95
  };
96
+ function assertNeverDocumentSchemaKind(value) {
97
+ throw new Error(`documentFromJson: unhandled DocumentSchemaKind ${JSON.stringify(value)}`);
98
+ }
96
99
  function documentFromJson(value) {
97
100
  if (!isRecord(value) || typeof value.$schema !== "string") throw new UnrecognizedDocumentSchemaError(isRecord(value) ? value.$schema : void 0);
98
101
  const parts = parseSchemaUri(value.$schema);
@@ -101,7 +104,7 @@ function documentFromJson(value) {
101
104
  if (parts.stem === "document-package") throw new DocumentPackageRenamedError(value.$schema);
102
105
  const kind = kindForFileStem(parts.stem);
103
106
  if (kind === void 0) throw new UnrecognizedDocumentSchemaError(value.$schema);
104
- if (majorVersionOf(parts.version) !== majorVersionOf("7.15.2")) throw new SchemaVersionMismatchError(value.$schema, parts.version, "7.15.2");
107
+ if (majorVersionOf(parts.version) !== majorVersionOf("7.15.3")) throw new SchemaVersionMismatchError(value.$schema, parts.version, "7.15.3");
105
108
  switch (kind) {
106
109
  case "DocumentTree": return {
107
110
  kind,
@@ -112,6 +115,7 @@ function documentFromJson(value) {
112
115
  value: ContentDocumentSchema.parse(value)
113
116
  };
114
117
  }
118
+ return assertNeverDocumentSchemaKind(kind);
115
119
  }
116
120
  //#endregion
117
- export { DocumentPackageRenamedError, LayoutSchemaDemotedError, SCHEMA_FILE_NAMES, SchemaVersionMismatchError, UnrecognizedDocumentSchemaError, contentDocumentWithSchema, documentFromJson, documentSchemaKindOf, documentTreeWithSchema, schemaUriFor };
121
+ export { DocumentPackageRenamedError, LayoutSchemaDemotedError, SCHEMA_FILE_NAMES, SchemaVersionMismatchError, UnrecognizedDocumentSchemaError, assertNeverDocumentSchemaKind, contentDocumentWithSchema, documentFromJson, documentSchemaKindOf, documentTreeWithSchema, schemaUriFor };
@@ -118,6 +118,9 @@ function findTableGridFault(table) {
118
118
  if (fault !== void 0) return fault;
119
119
  }
120
120
  }
121
+ function assertNeverTableGridFaultKind(value) {
122
+ throw new Error(`describeTableGridFault: unhandled TableGridFault kind ${JSON.stringify(value)}`);
123
+ }
121
124
  /**
122
125
  * One sentence stating a fault in words, for a writer that refuses or reports a table the grid rule does not admit: it names the fault by its position and, where the fault involves a second region, by that region's anchor. Indices are 0-based, matching every index in the descriptor. The sentence carries no entry point or format of its own, so each caller prefixes whatever names its own operation.
123
126
  */
@@ -130,6 +133,7 @@ function describeTableGridFault(fault) {
130
133
  case "anchorOverrunsRows": return `the merged region anchored at row ${String(fault.rowIndex)}, column ${String(fault.columnIndex)} spans past the last row of the table`;
131
134
  case "overlappingAnchors": return `the merged region anchored at row ${String(fault.rowIndex)}, column ${String(fault.columnIndex)} overlaps the region anchored at row ${String(fault.earlierAnchorRowIndex)}, column ${String(fault.earlierAnchorColumnIndex)}, but a grid position belongs to one region only`;
132
135
  }
136
+ return assertNeverTableGridFaultKind(fault);
133
137
  }
134
138
  function placedGridWidth(rows, columnCount) {
135
139
  let width = columnCount;
@@ -194,6 +198,7 @@ function placeAnchorTableRows(rows, columnCount) {
194
198
  return denseTableRows(positionAnchorRows(rows), columnCount);
195
199
  }
196
200
  //#endregion
201
+ exports.assertNeverTableGridFaultKind = assertNeverTableGridFaultKind;
197
202
  exports.denseTableRows = denseTableRows;
198
203
  exports.describeTableGridFault = describeTableGridFault;
199
204
  exports.findTableGridFault = findTableGridFault;
@@ -1,5 +1,5 @@
1
1
  import { o as TextDirection } from "./style-BGMcYrD2.cjs";
2
- import { hn as ContentTableCell, mn as ContentTable, yn as ContentTableRow } from "./content-Dg9cb8mF.cjs";
2
+ import { hn as ContentTableCell, mn as ContentTable, yn as ContentTableRow } from "./content-CSf8z9NW.cjs";
3
3
  //#region src/table-grid.d.ts
4
4
  /** The number of grid columns a cell occupies; an absent `colSpan` means the cell occupies its own column only. */
5
5
  declare function tableCellColumnSpan(cell: ContentTableCell): number;
@@ -75,6 +75,7 @@ type TableGridFault = {
75
75
  * The check states the whole of the rule and nothing beyond it: a table with no rows, or whose rows are all empty, has no fault, and neither `columns` nor a cell's own properties other than its blocks and spans are consulted.
76
76
  */
77
77
  declare function findTableGridFault(table: ContentTable): TableGridFault | undefined;
78
+ declare function assertNeverTableGridFaultKind(value: never): never;
78
79
  /**
79
80
  * One sentence stating a fault in words, for a writer that refuses or reports a table the grid rule does not admit: it names the fault by its position and, where the fault involves a second region, by that region's anchor. Indices are 0-based, matching every index in the descriptor. The sentence carries no entry point or format of its own, so each caller prefixes whatever names its own operation.
80
81
  */
@@ -111,4 +112,4 @@ interface AnchorTableRow {
111
112
  */
112
113
  declare function placeAnchorTableRows(rows: readonly AnchorTableRow[], columnCount: number): ContentTableRow[];
113
114
  //#endregion
114
- export { AnchorTableRow, PositionedTableCell, PositionedTableRow, TableGridAnchor, TableGridCovered, TableGridFault, TableGridPosition, denseTableRows, describeTableGridFault, findTableGridFault, placeAnchorTableRows, tableCellColumnSpan, tableCellRowSpan, tableGridColumnCount, walkTableGrid };
115
+ export { AnchorTableRow, PositionedTableCell, PositionedTableRow, TableGridAnchor, TableGridCovered, TableGridFault, TableGridPosition, assertNeverTableGridFaultKind, denseTableRows, describeTableGridFault, findTableGridFault, placeAnchorTableRows, tableCellColumnSpan, tableCellRowSpan, tableGridColumnCount, walkTableGrid };
@@ -1,5 +1,5 @@
1
1
  import { o as TextDirection } from "./style-BGMcYrD2.js";
2
- import { hn as ContentTableCell, mn as ContentTable, yn as ContentTableRow } from "./content-BMrK9SrW.js";
2
+ import { hn as ContentTableCell, mn as ContentTable, yn as ContentTableRow } from "./content-1yGdeaVT.js";
3
3
  //#region src/table-grid.d.ts
4
4
  /** The number of grid columns a cell occupies; an absent `colSpan` means the cell occupies its own column only. */
5
5
  declare function tableCellColumnSpan(cell: ContentTableCell): number;
@@ -75,6 +75,7 @@ type TableGridFault = {
75
75
  * The check states the whole of the rule and nothing beyond it: a table with no rows, or whose rows are all empty, has no fault, and neither `columns` nor a cell's own properties other than its blocks and spans are consulted.
76
76
  */
77
77
  declare function findTableGridFault(table: ContentTable): TableGridFault | undefined;
78
+ declare function assertNeverTableGridFaultKind(value: never): never;
78
79
  /**
79
80
  * One sentence stating a fault in words, for a writer that refuses or reports a table the grid rule does not admit: it names the fault by its position and, where the fault involves a second region, by that region's anchor. Indices are 0-based, matching every index in the descriptor. The sentence carries no entry point or format of its own, so each caller prefixes whatever names its own operation.
80
81
  */
@@ -111,4 +112,4 @@ interface AnchorTableRow {
111
112
  */
112
113
  declare function placeAnchorTableRows(rows: readonly AnchorTableRow[], columnCount: number): ContentTableRow[];
113
114
  //#endregion
114
- export { AnchorTableRow, PositionedTableCell, PositionedTableRow, TableGridAnchor, TableGridCovered, TableGridFault, TableGridPosition, denseTableRows, describeTableGridFault, findTableGridFault, placeAnchorTableRows, tableCellColumnSpan, tableCellRowSpan, tableGridColumnCount, walkTableGrid };
115
+ export { AnchorTableRow, PositionedTableCell, PositionedTableRow, TableGridAnchor, TableGridCovered, TableGridFault, TableGridPosition, assertNeverTableGridFaultKind, denseTableRows, describeTableGridFault, findTableGridFault, placeAnchorTableRows, tableCellColumnSpan, tableCellRowSpan, tableGridColumnCount, walkTableGrid };
@@ -117,6 +117,9 @@ function findTableGridFault(table) {
117
117
  if (fault !== void 0) return fault;
118
118
  }
119
119
  }
120
+ function assertNeverTableGridFaultKind(value) {
121
+ throw new Error(`describeTableGridFault: unhandled TableGridFault kind ${JSON.stringify(value)}`);
122
+ }
120
123
  /**
121
124
  * One sentence stating a fault in words, for a writer that refuses or reports a table the grid rule does not admit: it names the fault by its position and, where the fault involves a second region, by that region's anchor. Indices are 0-based, matching every index in the descriptor. The sentence carries no entry point or format of its own, so each caller prefixes whatever names its own operation.
122
125
  */
@@ -129,6 +132,7 @@ function describeTableGridFault(fault) {
129
132
  case "anchorOverrunsRows": return `the merged region anchored at row ${String(fault.rowIndex)}, column ${String(fault.columnIndex)} spans past the last row of the table`;
130
133
  case "overlappingAnchors": return `the merged region anchored at row ${String(fault.rowIndex)}, column ${String(fault.columnIndex)} overlaps the region anchored at row ${String(fault.earlierAnchorRowIndex)}, column ${String(fault.earlierAnchorColumnIndex)}, but a grid position belongs to one region only`;
131
134
  }
135
+ return assertNeverTableGridFaultKind(fault);
132
136
  }
133
137
  function placedGridWidth(rows, columnCount) {
134
138
  let width = columnCount;
@@ -193,4 +197,4 @@ function placeAnchorTableRows(rows, columnCount) {
193
197
  return denseTableRows(positionAnchorRows(rows), columnCount);
194
198
  }
195
199
  //#endregion
196
- export { denseTableRows, describeTableGridFault, findTableGridFault, placeAnchorTableRows, tableCellColumnSpan, tableCellRowSpan, tableGridColumnCount, walkTableGrid };
200
+ export { assertNeverTableGridFaultKind, denseTableRows, describeTableGridFault, findTableGridFault, placeAnchorTableRows, tableCellColumnSpan, tableCellRowSpan, tableGridColumnCount, walkTableGrid };
@@ -6,12 +6,12 @@ interface UnderlineMetrics {
6
6
  readonly thicknessPt: number;
7
7
  }
8
8
  interface TextMeasurer {
9
- widthOfTextAtSize(text: string, font: Readonly<LayoutFont>, sizePt: number): number;
10
- lineHeightAtSize(font: Readonly<LayoutFont>, sizePt: number): number;
11
- ascenderAtSize(font: Readonly<LayoutFont>, sizePt: number): number;
12
- descenderAtSize(font: Readonly<LayoutFont>, sizePt: number): number;
13
- underlineAtSize(font: Readonly<LayoutFont>, sizePt: number): UnderlineMetrics;
14
- horizontalScaleFor(font: Readonly<LayoutFont>): number;
9
+ readonly widthOfTextAtSize: (text: string, font: Readonly<LayoutFont>, sizePt: number) => number;
10
+ readonly lineHeightAtSize: (font: Readonly<LayoutFont>, sizePt: number) => number;
11
+ readonly ascenderAtSize: (font: Readonly<LayoutFont>, sizePt: number) => number;
12
+ readonly descenderAtSize: (font: Readonly<LayoutFont>, sizePt: number) => number;
13
+ readonly underlineAtSize: (font: Readonly<LayoutFont>, sizePt: number) => UnderlineMetrics;
14
+ readonly horizontalScaleFor: (font: Readonly<LayoutFont>) => number;
15
15
  }
16
16
  interface StyledRun {
17
17
  readonly text: string;
@@ -6,12 +6,12 @@ interface UnderlineMetrics {
6
6
  readonly thicknessPt: number;
7
7
  }
8
8
  interface TextMeasurer {
9
- widthOfTextAtSize(text: string, font: Readonly<LayoutFont>, sizePt: number): number;
10
- lineHeightAtSize(font: Readonly<LayoutFont>, sizePt: number): number;
11
- ascenderAtSize(font: Readonly<LayoutFont>, sizePt: number): number;
12
- descenderAtSize(font: Readonly<LayoutFont>, sizePt: number): number;
13
- underlineAtSize(font: Readonly<LayoutFont>, sizePt: number): UnderlineMetrics;
14
- horizontalScaleFor(font: Readonly<LayoutFont>): number;
9
+ readonly widthOfTextAtSize: (text: string, font: Readonly<LayoutFont>, sizePt: number) => number;
10
+ readonly lineHeightAtSize: (font: Readonly<LayoutFont>, sizePt: number) => number;
11
+ readonly ascenderAtSize: (font: Readonly<LayoutFont>, sizePt: number) => number;
12
+ readonly descenderAtSize: (font: Readonly<LayoutFont>, sizePt: number) => number;
13
+ readonly underlineAtSize: (font: Readonly<LayoutFont>, sizePt: number) => UnderlineMetrics;
14
+ readonly horizontalScaleFor: (font: Readonly<LayoutFont>) => number;
15
15
  }
16
16
  interface StyledRun {
17
17
  readonly text: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "document-schema",
3
- "version": "7.15.2",
3
+ "version": "7.15.3",
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": {