document-model.js 3.1.0 → 3.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -3
- package/dist/content-json-schema-defs.cjs +288 -0
- package/dist/content-json-schema-defs.js +288 -0
- package/dist/content.cjs +11 -1
- package/dist/content.d.cts +254 -20
- package/dist/content.d.ts +254 -20
- package/dist/content.js +11 -1
- package/dist/index.cjs +21 -0
- package/dist/index.d.cts +2 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.js +2 -1
- package/dist/layout.d.cts +8 -8
- package/dist/layout.d.ts +8 -8
- package/dist/math-B7gZJeND.d.cts +210 -0
- package/dist/math-B7gZJeND.d.ts +210 -0
- package/dist/math.cjs +152 -0
- package/dist/math.d.cts +2 -0
- package/dist/math.d.ts +2 -0
- package/dist/math.js +132 -0
- package/dist/package.d.cts +245 -20
- package/dist/package.d.ts +245 -20
- package/dist/schema-io.cjs +1 -1
- package/dist/schema-io.js +1 -1
- package/dist/style.d.cts +2 -2
- package/dist/style.d.ts +2 -2
- package/package.json +1 -1
- package/schemas/content-document.schema.json +473 -19
- package/schemas/document-package.schema.json +2 -2
- package/schemas/layout-document.schema.json +1 -1
package/dist/content.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { ColorSchema } from "./color.js";
|
|
2
|
+
import { MathExpressionSchema, MathPresentationSchema, MathProvenanceSchema, SymbolTableSchema } from "./math.js";
|
|
2
3
|
import { BoxSchema, LayoutFrameSchema, MarginsSchema, PageSizeSchema } from "./geometry.js";
|
|
3
4
|
import { MathMlNodeSchema } from "./mathml.js";
|
|
4
5
|
import { LayoutMetadataSchema } from "./metadata.js";
|
|
@@ -352,38 +353,47 @@ const ContentDrawPageSchema = z.object({
|
|
|
352
353
|
});
|
|
353
354
|
const ContentFormulaSchema = z.object({
|
|
354
355
|
mathml: z.array(MathMlNodeSchema),
|
|
355
|
-
starMath: z.string().optional()
|
|
356
|
+
starMath: z.string().optional(),
|
|
357
|
+
presentation: MathPresentationSchema.optional(),
|
|
358
|
+
content: MathExpressionSchema.optional(),
|
|
359
|
+
provenance: MathProvenanceSchema.optional()
|
|
356
360
|
});
|
|
357
361
|
const CONTENT_FORMAT_VERSION = 3;
|
|
362
|
+
const contentDocumentSharedFields = { symbolTable: SymbolTableSchema.optional() };
|
|
358
363
|
const ContentDocumentSchema = z.discriminatedUnion("kind", [
|
|
359
364
|
z.object({
|
|
360
365
|
kind: z.literal("wordprocessing"),
|
|
361
366
|
formatVersion: z.literal(3),
|
|
362
367
|
metadata: LayoutMetadataSchema,
|
|
368
|
+
...contentDocumentSharedFields,
|
|
363
369
|
sections: z.array(ContentSectionSchema)
|
|
364
370
|
}),
|
|
365
371
|
z.object({
|
|
366
372
|
kind: z.literal("presentation"),
|
|
367
373
|
formatVersion: z.literal(3),
|
|
368
374
|
metadata: LayoutMetadataSchema,
|
|
375
|
+
...contentDocumentSharedFields,
|
|
369
376
|
slides: z.array(ContentSlideSchema)
|
|
370
377
|
}),
|
|
371
378
|
z.object({
|
|
372
379
|
kind: z.literal("spreadsheet"),
|
|
373
380
|
formatVersion: z.literal(3),
|
|
374
381
|
metadata: LayoutMetadataSchema,
|
|
382
|
+
...contentDocumentSharedFields,
|
|
375
383
|
sheets: z.array(ContentSheetSchema)
|
|
376
384
|
}),
|
|
377
385
|
z.object({
|
|
378
386
|
kind: z.literal("drawing"),
|
|
379
387
|
formatVersion: z.literal(3),
|
|
380
388
|
metadata: LayoutMetadataSchema,
|
|
389
|
+
...contentDocumentSharedFields,
|
|
381
390
|
pages: z.array(ContentDrawPageSchema)
|
|
382
391
|
}),
|
|
383
392
|
z.object({
|
|
384
393
|
kind: z.literal("formula"),
|
|
385
394
|
formatVersion: z.literal(3),
|
|
386
395
|
metadata: LayoutMetadataSchema,
|
|
396
|
+
...contentDocumentSharedFields,
|
|
387
397
|
formula: ContentFormulaSchema
|
|
388
398
|
})
|
|
389
399
|
]);
|
package/dist/index.cjs
CHANGED
|
@@ -2,6 +2,7 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
|
2
2
|
const require_a1 = require("./a1.cjs");
|
|
3
3
|
require("./codec.cjs");
|
|
4
4
|
const require_color = require("./color.cjs");
|
|
5
|
+
const require_math = require("./math.cjs");
|
|
5
6
|
const require_geometry = require("./geometry.cjs");
|
|
6
7
|
const require_mathml = require("./mathml.cjs");
|
|
7
8
|
const require_metadata = require("./metadata.cjs");
|
|
@@ -59,8 +60,10 @@ exports.ContentVectorSchema = require_content.ContentVectorSchema;
|
|
|
59
60
|
exports.DEFAULT_LAYOUT_FONT = require_style.DEFAULT_LAYOUT_FONT;
|
|
60
61
|
exports.DOCUMENT_PACKAGE_FORMAT_VERSION = require_package.DOCUMENT_PACKAGE_FORMAT_VERSION;
|
|
61
62
|
exports.DecimalStringSchema = require_content.DecimalStringSchema;
|
|
63
|
+
exports.DimensionVectorSchema = require_math.DimensionVectorSchema;
|
|
62
64
|
exports.DocumentPackageSchema = require_package.DocumentPackageSchema;
|
|
63
65
|
exports.EMBEDDED_OBJECT_KINDS = require_content_json_schema_defs.EMBEDDED_OBJECT_KINDS;
|
|
66
|
+
exports.ExactRationalSchema = require_math.ExactRationalSchema;
|
|
64
67
|
exports.LAYOUT_FORMAT_VERSION = require_layout.LAYOUT_FORMAT_VERSION;
|
|
65
68
|
exports.LayoutDocumentSchema = require_layout.LayoutDocumentSchema;
|
|
66
69
|
exports.LayoutEllipseSchema = require_layout.LayoutEllipseSchema;
|
|
@@ -80,6 +83,9 @@ exports.LayoutSubpathSchema = require_layout.LayoutSubpathSchema;
|
|
|
80
83
|
exports.LayoutTextSchema = require_layout.LayoutTextSchema;
|
|
81
84
|
exports.MAX_SAFE_INTEGER = require_content_json_schema_defs.MAX_SAFE_INTEGER;
|
|
82
85
|
exports.MarginsSchema = require_geometry.MarginsSchema;
|
|
86
|
+
exports.MathAppSchema = require_math.MathAppSchema;
|
|
87
|
+
exports.MathExpressionSchema = require_math.MathExpressionSchema;
|
|
88
|
+
exports.MathMatrixSchema = require_math.MathMatrixSchema;
|
|
83
89
|
exports.MathMlAttributeSchema = require_mathml.MathMlAttributeSchema;
|
|
84
90
|
exports.MathMlCdataSchema = require_mathml.MathMlCdataSchema;
|
|
85
91
|
exports.MathMlCommentSchema = require_mathml.MathMlCommentSchema;
|
|
@@ -88,12 +94,26 @@ exports.MathMlElementSchema = require_mathml.MathMlElementSchema;
|
|
|
88
94
|
exports.MathMlNodeSchema = require_mathml.MathMlNodeSchema;
|
|
89
95
|
exports.MathMlPiSchema = require_mathml.MathMlPiSchema;
|
|
90
96
|
exports.MathMlTextSchema = require_mathml.MathMlTextSchema;
|
|
97
|
+
exports.MathNormalisationContextSchema = require_math.MathNormalisationContextSchema;
|
|
98
|
+
exports.MathNumSchema = require_math.MathNumSchema;
|
|
99
|
+
exports.MathPresentationSchema = require_math.MathPresentationSchema;
|
|
100
|
+
exports.MathProdSchema = require_math.MathProdSchema;
|
|
101
|
+
exports.MathProvenanceSchema = require_math.MathProvenanceSchema;
|
|
102
|
+
exports.MathQtySchema = require_math.MathQtySchema;
|
|
103
|
+
exports.MathSumSchema = require_math.MathSumSchema;
|
|
104
|
+
exports.MathSymSchema = require_math.MathSymSchema;
|
|
105
|
+
exports.MathSymbolEntrySchema = require_math.MathSymbolEntrySchema;
|
|
106
|
+
exports.MathUncertaintySchema = require_math.MathUncertaintySchema;
|
|
107
|
+
exports.MathUnitSchema = require_math.MathUnitSchema;
|
|
108
|
+
exports.MathUnparsedSchema = require_math.MathUnparsedSchema;
|
|
91
109
|
exports.PAGE_SIZE_A4 = require_geometry.PAGE_SIZE_A4;
|
|
92
110
|
exports.PAGE_SIZE_LETTER = require_geometry.PAGE_SIZE_LETTER;
|
|
93
111
|
exports.PageSizeSchema = require_geometry.PageSizeSchema;
|
|
94
112
|
exports.SCHEMA_FILE_NAMES = require_schema_io.SCHEMA_FILE_NAMES;
|
|
113
|
+
exports.SI_BASE_DIMENSIONS = require_math.SI_BASE_DIMENSIONS;
|
|
95
114
|
exports.SLIDE_SIZE_STANDARD = require_geometry.SLIDE_SIZE_STANDARD;
|
|
96
115
|
exports.SLIDE_SIZE_WIDESCREEN = require_geometry.SLIDE_SIZE_WIDESCREEN;
|
|
116
|
+
exports.SymbolTableSchema = require_math.SymbolTableSchema;
|
|
97
117
|
exports.UnrecognizedDocumentSchemaError = require_schema_io.UnrecognizedDocumentSchemaError;
|
|
98
118
|
exports.cellReference = require_a1.cellReference;
|
|
99
119
|
exports.clampHeadingLevel = require_content.clampHeadingLevel;
|
|
@@ -105,6 +125,7 @@ exports.documentFromJson = require_schema_io.documentFromJson;
|
|
|
105
125
|
exports.documentPackageWithSchema = require_schema_io.documentPackageWithSchema;
|
|
106
126
|
exports.documentSchemaKindOf = require_schema_io.documentSchemaKindOf;
|
|
107
127
|
exports.isContentBlock = require_content.isContentBlock;
|
|
128
|
+
exports.isMathExpression = require_math.isMathExpression;
|
|
108
129
|
exports.isMathMlNode = require_mathml.isMathMlNode;
|
|
109
130
|
exports.layoutDocumentWithSchema = require_schema_io.layoutDocumentWithSchema;
|
|
110
131
|
exports.parseCellReference = require_a1.parseCellReference;
|
package/dist/index.d.cts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { CellPosition, CellRange, cellReference, columnIndexToLetters, columnLettersToIndex, parseCellReference, parseRangeReference, rangeReference } from "./a1.cjs";
|
|
2
2
|
import { _ as isMathMlNode, a as MathMlComment, c as MathMlDeclarationSchema, d as MathMlNode, f as MathMlNodeSchema, g as MathMlTextSchema, h as MathMlText, i as MathMlCdataSchema, l as MathMlElement, m as MathMlPiSchema, n as MathMlAttributeSchema, o as MathMlCommentSchema, p as MathMlPi, r as MathMlCdata, s as MathMlDeclaration, t as MathMlAttribute, u as MathMlElementSchema } from "./mathml-B1oTCtzc.cjs";
|
|
3
|
+
import { A as MathUncertaintySchema, C as MathSum, D as MathSymbolEntry, E as MathSymSchema, F as SI_BASE_DIMENSIONS, I as SiBaseDimension, L as SymbolTable, M as MathUnitSchema, N as MathUnparsed, O as MathSymbolEntrySchema, P as MathUnparsedSchema, R as SymbolTableSchema, S as MathQtySchema, T as MathSym, _ as MathProd, a as MathApp, b as MathProvenanceSchema, c as MathExpressionSchema, d as MathNormalisationContext, f as MathNormalisationContextSchema, g as MathPresentationSchema, h as MathPresentation, i as ExactRationalSchema, j as MathUnit, k as MathUncertainty, l as MathMatrix, m as MathNumSchema, n as DimensionVectorSchema, o as MathAppSchema, p as MathNum, r as ExactRational, s as MathExpression, t as DimensionVector, u as MathMatrixSchema, v as MathProdSchema, w as MathSumSchema, x as MathQty, y as MathProvenance, z as isMathExpression } from "./math-B7gZJeND.cjs";
|
|
3
4
|
import { a as rgbHexToColor, i as colorToRgbHex, n as Color, r as ColorSchema, t as COLOR_BLACK } from "./color-AELCDH_b.cjs";
|
|
4
5
|
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.cjs";
|
|
5
6
|
import { CONTENT_FORMAT_VERSION, ContentBlock, ContentBlockSchema, ContentBorder, ContentBorderSchema, ContentCellBorders, ContentCellBordersSchema, ContentCellValue, ContentCellValueSchema, ContentDocument, ContentDocumentSchema, ContentDrawPage, ContentDrawPageSchema, ContentEmbeddedObject, ContentEmbeddedObjectBlock, ContentEmbeddedObjectBlockSchema, ContentEmbeddedObjectKind, ContentEmbeddedObjectSchema, ContentFormula, ContentFormulaSchema, ContentImageBlock, ContentImageBlockSchema, ContentListMembership, ContentListMembershipSchema, ContentPageBreak, ContentPageBreakSchema, ContentParagraph, ContentParagraphSchema, ContentPathPoint, ContentPathPointSchema, ContentPathSegment, ContentPathSegmentSchema, ContentRun, ContentRunSchema, ContentSection, ContentSectionSchema, ContentShape, ContentShapeSchema, ContentSheet, ContentSheetCell, ContentSheetCellComment, ContentSheetCellCommentSchema, ContentSheetCellSchema, ContentSheetColumn, ContentSheetColumnSchema, ContentSheetImage, ContentSheetImageSchema, ContentSheetPrintRange, ContentSheetPrintRangeSchema, ContentSheetPrintSettings, ContentSheetPrintSettingsSchema, ContentSheetRepeatRange, ContentSheetRepeatRangeSchema, ContentSheetRow, ContentSheetRowSchema, ContentSheetSchema, ContentSlide, ContentSlideSchema, ContentStroke, ContentStrokeSchema, ContentStrokeStyle, ContentStrokeStyleSchema, ContentSubpath, ContentSubpathSchema, ContentTable, ContentTableCell, ContentTableCellSchema, ContentTableRow, ContentTableRowSchema, ContentTableSchema, ContentVector, ContentVectorSchema, DecimalString, DecimalStringSchema, FusedNode, clampHeadingLevel, isContentBlock } from "./content.cjs";
|
|
@@ -13,4 +14,4 @@ import { DOCUMENT_PACKAGE_FORMAT_VERSION, DocumentPackage, DocumentPackageSchema
|
|
|
13
14
|
import { ContentDocumentJson, DocumentJsonResult, DocumentPackageJson, DocumentSchemaKind, LayoutDocumentJson, SCHEMA_FILE_NAMES, UnrecognizedDocumentSchemaError, contentDocumentWithSchema, documentFromJson, documentPackageWithSchema, documentSchemaKindOf, layoutDocumentWithSchema, schemaUriFor } from "./schema-io.cjs";
|
|
14
15
|
import { StyledFragment, StyledRun, TextMeasurer, UnderlineMetrics, WrapOptions, WrappedLine } from "./text-layout.cjs";
|
|
15
16
|
import { MathAssembledGlyphs, MathBox, MathColor, MathFontMetrics, MathGlyphMetrics, MathGlyphPlacement, MathGlyphRun, MathLayoutItem, MathRule, MathStretchAxis, MathStretchGlyph, MathStretchResult, MathStroke, PositionedFormula } from "./math-layout.cjs";
|
|
16
|
-
export { Alignment, AlignmentSchema, Box, BoxSchema, COLOR_BLACK, CONTENT_DEFS, CONTENT_DOCUMENT_URI, CONTENT_FORMAT_VERSION, CellPosition, CellRange, Color, ColorSchema, ContentBlock, ContentBlockSchema, ContentBorder, ContentBorderSchema, ContentCellBorders, ContentCellBordersSchema, ContentCellValue, ContentCellValueSchema, ContentCodec, ContentDocument, ContentDocumentJson, ContentDocumentSchema, ContentDrawPage, ContentDrawPageSchema, ContentEmbeddedObject, ContentEmbeddedObjectBlock, ContentEmbeddedObjectBlockSchema, ContentEmbeddedObjectKind, ContentEmbeddedObjectSchema, ContentFormula, ContentFormulaSchema, ContentImageBlock, ContentImageBlockSchema, ContentListMembership, ContentListMembershipSchema, ContentPageBreak, ContentPageBreakSchema, ContentParagraph, ContentParagraphSchema, ContentPathPoint, ContentPathPointSchema, ContentPathSegment, ContentPathSegmentSchema, ContentRun, ContentRunSchema, ContentSection, ContentSectionSchema, ContentShape, ContentShapeSchema, ContentSheet, ContentSheetCell, ContentSheetCellComment, ContentSheetCellCommentSchema, ContentSheetCellSchema, ContentSheetColumn, ContentSheetColumnSchema, ContentSheetImage, ContentSheetImageSchema, ContentSheetPrintRange, ContentSheetPrintRangeSchema, ContentSheetPrintSettings, ContentSheetPrintSettingsSchema, ContentSheetRepeatRange, ContentSheetRepeatRangeSchema, ContentSheetRow, ContentSheetRowSchema, ContentSheetSchema, ContentSlide, ContentSlideSchema, ContentStroke, ContentStrokeSchema, ContentStrokeStyle, ContentStrokeStyleSchema, ContentSubpath, ContentSubpathSchema, ContentTable, ContentTableCell, ContentTableCellSchema, ContentTableRow, ContentTableRowSchema, ContentTableSchema, ContentVector, ContentVectorSchema, DEFAULT_LAYOUT_FONT, DOCUMENT_PACKAGE_FORMAT_VERSION, DecimalString, DecimalStringSchema, DocumentJsonResult, DocumentPackage, DocumentPackageJson, DocumentPackageSchema, DocumentSchemaKind, EMBEDDED_OBJECT_KINDS, FontFace, FontRegistryOptions, FontSubstitution, FusedNode, LAYOUT_FORMAT_VERSION, LayoutCodec, LayoutDocument, LayoutDocumentJson, LayoutDocumentSchema, LayoutEllipse, LayoutEllipseSchema, LayoutFont, LayoutFontSchema, LayoutFrame, LayoutFrameSchema, LayoutImage, LayoutImageAsset, LayoutImageAssetSchema, LayoutImageSchema, LayoutItem, LayoutItemSchema, LayoutLine, LayoutLineSchema, LayoutLink, LayoutLinkSchema, LayoutMetadata, LayoutMetadataSchema, LayoutPage, LayoutPageSchema, LayoutPath, LayoutPathSchema, LayoutPathSegment, LayoutPathSegmentSchema, LayoutRect, LayoutRectSchema, LayoutSubpath, LayoutSubpathSchema, LayoutText, LayoutTextSchema, MAX_SAFE_INTEGER, Margins, MarginsSchema, MathAssembledGlyphs, MathBox, MathColor, MathFontMetrics, MathGlyphMetrics, MathGlyphPlacement, MathGlyphRun, MathLayoutItem, MathMlAttribute, MathMlAttributeSchema, MathMlCdata, MathMlCdataSchema, MathMlComment, MathMlCommentSchema, MathMlDeclaration, MathMlDeclarationSchema, MathMlElement, MathMlElementSchema, MathMlNode, MathMlNodeSchema, MathMlPi, MathMlPiSchema, MathMlText, MathMlTextSchema, MathRule, MathStretchAxis, MathStretchGlyph, MathStretchResult, MathStroke, PAGE_SIZE_A4, PAGE_SIZE_LETTER, PageSize, PageSizeSchema, Point, PositionedFormula, ProvidedFont, SCHEMA_FILE_NAMES, SLIDE_SIZE_STANDARD, SLIDE_SIZE_WIDESCREEN, StyledFragment, StyledRun, TextMeasurer, UnderlineMetrics, UnrecognizedDocumentSchemaError, WrapOptions, WrappedLine, cellReference, clampHeadingLevel, colorToRgbHex, columnIndexToLetters, columnLettersToIndex, contentDocumentWithSchema, documentFromJson, documentPackageWithSchema, documentSchemaKindOf, isContentBlock, isMathMlNode, layoutDocumentWithSchema, parseCellReference, parseRangeReference, rangeReference, rgbHexToColor, schemaUriFor };
|
|
17
|
+
export { Alignment, AlignmentSchema, Box, BoxSchema, COLOR_BLACK, CONTENT_DEFS, CONTENT_DOCUMENT_URI, CONTENT_FORMAT_VERSION, CellPosition, CellRange, Color, ColorSchema, ContentBlock, ContentBlockSchema, ContentBorder, ContentBorderSchema, ContentCellBorders, ContentCellBordersSchema, ContentCellValue, ContentCellValueSchema, ContentCodec, ContentDocument, ContentDocumentJson, ContentDocumentSchema, ContentDrawPage, ContentDrawPageSchema, ContentEmbeddedObject, ContentEmbeddedObjectBlock, ContentEmbeddedObjectBlockSchema, ContentEmbeddedObjectKind, ContentEmbeddedObjectSchema, ContentFormula, ContentFormulaSchema, ContentImageBlock, ContentImageBlockSchema, ContentListMembership, ContentListMembershipSchema, ContentPageBreak, ContentPageBreakSchema, ContentParagraph, ContentParagraphSchema, ContentPathPoint, ContentPathPointSchema, ContentPathSegment, ContentPathSegmentSchema, ContentRun, ContentRunSchema, ContentSection, ContentSectionSchema, ContentShape, ContentShapeSchema, ContentSheet, ContentSheetCell, ContentSheetCellComment, ContentSheetCellCommentSchema, ContentSheetCellSchema, ContentSheetColumn, ContentSheetColumnSchema, ContentSheetImage, ContentSheetImageSchema, ContentSheetPrintRange, ContentSheetPrintRangeSchema, ContentSheetPrintSettings, ContentSheetPrintSettingsSchema, ContentSheetRepeatRange, ContentSheetRepeatRangeSchema, ContentSheetRow, ContentSheetRowSchema, ContentSheetSchema, ContentSlide, ContentSlideSchema, ContentStroke, ContentStrokeSchema, ContentStrokeStyle, ContentStrokeStyleSchema, ContentSubpath, ContentSubpathSchema, ContentTable, ContentTableCell, ContentTableCellSchema, ContentTableRow, ContentTableRowSchema, ContentTableSchema, ContentVector, ContentVectorSchema, DEFAULT_LAYOUT_FONT, DOCUMENT_PACKAGE_FORMAT_VERSION, DecimalString, DecimalStringSchema, DimensionVector, DimensionVectorSchema, DocumentJsonResult, DocumentPackage, DocumentPackageJson, DocumentPackageSchema, DocumentSchemaKind, EMBEDDED_OBJECT_KINDS, ExactRational, ExactRationalSchema, FontFace, FontRegistryOptions, FontSubstitution, FusedNode, LAYOUT_FORMAT_VERSION, LayoutCodec, LayoutDocument, LayoutDocumentJson, LayoutDocumentSchema, LayoutEllipse, LayoutEllipseSchema, LayoutFont, LayoutFontSchema, LayoutFrame, LayoutFrameSchema, LayoutImage, LayoutImageAsset, LayoutImageAssetSchema, LayoutImageSchema, LayoutItem, LayoutItemSchema, LayoutLine, LayoutLineSchema, LayoutLink, LayoutLinkSchema, LayoutMetadata, LayoutMetadataSchema, LayoutPage, LayoutPageSchema, LayoutPath, LayoutPathSchema, LayoutPathSegment, LayoutPathSegmentSchema, LayoutRect, LayoutRectSchema, LayoutSubpath, LayoutSubpathSchema, LayoutText, LayoutTextSchema, 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, ProvidedFont, SCHEMA_FILE_NAMES, SI_BASE_DIMENSIONS, SLIDE_SIZE_STANDARD, SLIDE_SIZE_WIDESCREEN, SiBaseDimension, StyledFragment, StyledRun, SymbolTable, SymbolTableSchema, TextMeasurer, UnderlineMetrics, UnrecognizedDocumentSchemaError, WrapOptions, WrappedLine, cellReference, clampHeadingLevel, colorToRgbHex, columnIndexToLetters, columnLettersToIndex, contentDocumentWithSchema, documentFromJson, documentPackageWithSchema, documentSchemaKindOf, isContentBlock, isMathExpression, isMathMlNode, layoutDocumentWithSchema, parseCellReference, parseRangeReference, rangeReference, rgbHexToColor, schemaUriFor };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { CellPosition, CellRange, cellReference, columnIndexToLetters, columnLettersToIndex, parseCellReference, parseRangeReference, rangeReference } from "./a1.js";
|
|
2
2
|
import { _ as isMathMlNode, a as MathMlComment, c as MathMlDeclarationSchema, d as MathMlNode, f as MathMlNodeSchema, g as MathMlTextSchema, h as MathMlText, i as MathMlCdataSchema, l as MathMlElement, m as MathMlPiSchema, n as MathMlAttributeSchema, o as MathMlCommentSchema, p as MathMlPi, r as MathMlCdata, s as MathMlDeclaration, t as MathMlAttribute, u as MathMlElementSchema } from "./mathml-B1oTCtzc.js";
|
|
3
|
+
import { A as MathUncertaintySchema, C as MathSum, D as MathSymbolEntry, E as MathSymSchema, F as SI_BASE_DIMENSIONS, I as SiBaseDimension, L as SymbolTable, M as MathUnitSchema, N as MathUnparsed, O as MathSymbolEntrySchema, P as MathUnparsedSchema, R as SymbolTableSchema, S as MathQtySchema, T as MathSym, _ as MathProd, a as MathApp, b as MathProvenanceSchema, c as MathExpressionSchema, d as MathNormalisationContext, f as MathNormalisationContextSchema, g as MathPresentationSchema, h as MathPresentation, i as ExactRationalSchema, j as MathUnit, k as MathUncertainty, l as MathMatrix, m as MathNumSchema, n as DimensionVectorSchema, o as MathAppSchema, p as MathNum, r as ExactRational, s as MathExpression, t as DimensionVector, u as MathMatrixSchema, v as MathProdSchema, w as MathSumSchema, x as MathQty, y as MathProvenance, z as isMathExpression } from "./math-B7gZJeND.js";
|
|
3
4
|
import { a as rgbHexToColor, i as colorToRgbHex, n as Color, r as ColorSchema, t as COLOR_BLACK } from "./color-AELCDH_b.js";
|
|
4
5
|
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";
|
|
5
6
|
import { CONTENT_FORMAT_VERSION, ContentBlock, ContentBlockSchema, ContentBorder, ContentBorderSchema, ContentCellBorders, ContentCellBordersSchema, ContentCellValue, ContentCellValueSchema, ContentDocument, ContentDocumentSchema, ContentDrawPage, ContentDrawPageSchema, ContentEmbeddedObject, ContentEmbeddedObjectBlock, ContentEmbeddedObjectBlockSchema, ContentEmbeddedObjectKind, ContentEmbeddedObjectSchema, ContentFormula, ContentFormulaSchema, ContentImageBlock, ContentImageBlockSchema, ContentListMembership, ContentListMembershipSchema, ContentPageBreak, ContentPageBreakSchema, ContentParagraph, ContentParagraphSchema, ContentPathPoint, ContentPathPointSchema, ContentPathSegment, ContentPathSegmentSchema, ContentRun, ContentRunSchema, ContentSection, ContentSectionSchema, ContentShape, ContentShapeSchema, ContentSheet, ContentSheetCell, ContentSheetCellComment, ContentSheetCellCommentSchema, ContentSheetCellSchema, ContentSheetColumn, ContentSheetColumnSchema, ContentSheetImage, ContentSheetImageSchema, ContentSheetPrintRange, ContentSheetPrintRangeSchema, ContentSheetPrintSettings, ContentSheetPrintSettingsSchema, ContentSheetRepeatRange, ContentSheetRepeatRangeSchema, ContentSheetRow, ContentSheetRowSchema, ContentSheetSchema, ContentSlide, ContentSlideSchema, ContentStroke, ContentStrokeSchema, ContentStrokeStyle, ContentStrokeStyleSchema, ContentSubpath, ContentSubpathSchema, ContentTable, ContentTableCell, ContentTableCellSchema, ContentTableRow, ContentTableRowSchema, ContentTableSchema, ContentVector, ContentVectorSchema, DecimalString, DecimalStringSchema, FusedNode, clampHeadingLevel, isContentBlock } from "./content.js";
|
|
@@ -13,4 +14,4 @@ import { DOCUMENT_PACKAGE_FORMAT_VERSION, DocumentPackage, DocumentPackageSchema
|
|
|
13
14
|
import { ContentDocumentJson, DocumentJsonResult, DocumentPackageJson, DocumentSchemaKind, LayoutDocumentJson, SCHEMA_FILE_NAMES, UnrecognizedDocumentSchemaError, contentDocumentWithSchema, documentFromJson, documentPackageWithSchema, documentSchemaKindOf, layoutDocumentWithSchema, schemaUriFor } from "./schema-io.js";
|
|
14
15
|
import { StyledFragment, StyledRun, TextMeasurer, UnderlineMetrics, WrapOptions, WrappedLine } from "./text-layout.js";
|
|
15
16
|
import { MathAssembledGlyphs, MathBox, MathColor, MathFontMetrics, MathGlyphMetrics, MathGlyphPlacement, MathGlyphRun, MathLayoutItem, MathRule, MathStretchAxis, MathStretchGlyph, MathStretchResult, MathStroke, PositionedFormula } from "./math-layout.js";
|
|
16
|
-
export { Alignment, AlignmentSchema, Box, BoxSchema, COLOR_BLACK, CONTENT_DEFS, CONTENT_DOCUMENT_URI, CONTENT_FORMAT_VERSION, CellPosition, CellRange, Color, ColorSchema, ContentBlock, ContentBlockSchema, ContentBorder, ContentBorderSchema, ContentCellBorders, ContentCellBordersSchema, ContentCellValue, ContentCellValueSchema, ContentCodec, ContentDocument, ContentDocumentJson, ContentDocumentSchema, ContentDrawPage, ContentDrawPageSchema, ContentEmbeddedObject, ContentEmbeddedObjectBlock, ContentEmbeddedObjectBlockSchema, ContentEmbeddedObjectKind, ContentEmbeddedObjectSchema, ContentFormula, ContentFormulaSchema, ContentImageBlock, ContentImageBlockSchema, ContentListMembership, ContentListMembershipSchema, ContentPageBreak, ContentPageBreakSchema, ContentParagraph, ContentParagraphSchema, ContentPathPoint, ContentPathPointSchema, ContentPathSegment, ContentPathSegmentSchema, ContentRun, ContentRunSchema, ContentSection, ContentSectionSchema, ContentShape, ContentShapeSchema, ContentSheet, ContentSheetCell, ContentSheetCellComment, ContentSheetCellCommentSchema, ContentSheetCellSchema, ContentSheetColumn, ContentSheetColumnSchema, ContentSheetImage, ContentSheetImageSchema, ContentSheetPrintRange, ContentSheetPrintRangeSchema, ContentSheetPrintSettings, ContentSheetPrintSettingsSchema, ContentSheetRepeatRange, ContentSheetRepeatRangeSchema, ContentSheetRow, ContentSheetRowSchema, ContentSheetSchema, ContentSlide, ContentSlideSchema, ContentStroke, ContentStrokeSchema, ContentStrokeStyle, ContentStrokeStyleSchema, ContentSubpath, ContentSubpathSchema, ContentTable, ContentTableCell, ContentTableCellSchema, ContentTableRow, ContentTableRowSchema, ContentTableSchema, ContentVector, ContentVectorSchema, DEFAULT_LAYOUT_FONT, DOCUMENT_PACKAGE_FORMAT_VERSION, DecimalString, DecimalStringSchema, DocumentJsonResult, DocumentPackage, DocumentPackageJson, DocumentPackageSchema, DocumentSchemaKind, EMBEDDED_OBJECT_KINDS, FontFace, FontRegistryOptions, FontSubstitution, FusedNode, LAYOUT_FORMAT_VERSION, LayoutCodec, LayoutDocument, LayoutDocumentJson, LayoutDocumentSchema, LayoutEllipse, LayoutEllipseSchema, LayoutFont, LayoutFontSchema, LayoutFrame, LayoutFrameSchema, LayoutImage, LayoutImageAsset, LayoutImageAssetSchema, LayoutImageSchema, LayoutItem, LayoutItemSchema, LayoutLine, LayoutLineSchema, LayoutLink, LayoutLinkSchema, LayoutMetadata, LayoutMetadataSchema, LayoutPage, LayoutPageSchema, LayoutPath, LayoutPathSchema, LayoutPathSegment, LayoutPathSegmentSchema, LayoutRect, LayoutRectSchema, LayoutSubpath, LayoutSubpathSchema, LayoutText, LayoutTextSchema, MAX_SAFE_INTEGER, Margins, MarginsSchema, MathAssembledGlyphs, MathBox, MathColor, MathFontMetrics, MathGlyphMetrics, MathGlyphPlacement, MathGlyphRun, MathLayoutItem, MathMlAttribute, MathMlAttributeSchema, MathMlCdata, MathMlCdataSchema, MathMlComment, MathMlCommentSchema, MathMlDeclaration, MathMlDeclarationSchema, MathMlElement, MathMlElementSchema, MathMlNode, MathMlNodeSchema, MathMlPi, MathMlPiSchema, MathMlText, MathMlTextSchema, MathRule, MathStretchAxis, MathStretchGlyph, MathStretchResult, MathStroke, PAGE_SIZE_A4, PAGE_SIZE_LETTER, PageSize, PageSizeSchema, Point, PositionedFormula, ProvidedFont, SCHEMA_FILE_NAMES, SLIDE_SIZE_STANDARD, SLIDE_SIZE_WIDESCREEN, StyledFragment, StyledRun, TextMeasurer, UnderlineMetrics, UnrecognizedDocumentSchemaError, WrapOptions, WrappedLine, cellReference, clampHeadingLevel, colorToRgbHex, columnIndexToLetters, columnLettersToIndex, contentDocumentWithSchema, documentFromJson, documentPackageWithSchema, documentSchemaKindOf, isContentBlock, isMathMlNode, layoutDocumentWithSchema, parseCellReference, parseRangeReference, rangeReference, rgbHexToColor, schemaUriFor };
|
|
17
|
+
export { Alignment, AlignmentSchema, Box, BoxSchema, COLOR_BLACK, CONTENT_DEFS, CONTENT_DOCUMENT_URI, CONTENT_FORMAT_VERSION, CellPosition, CellRange, Color, ColorSchema, ContentBlock, ContentBlockSchema, ContentBorder, ContentBorderSchema, ContentCellBorders, ContentCellBordersSchema, ContentCellValue, ContentCellValueSchema, ContentCodec, ContentDocument, ContentDocumentJson, ContentDocumentSchema, ContentDrawPage, ContentDrawPageSchema, ContentEmbeddedObject, ContentEmbeddedObjectBlock, ContentEmbeddedObjectBlockSchema, ContentEmbeddedObjectKind, ContentEmbeddedObjectSchema, ContentFormula, ContentFormulaSchema, ContentImageBlock, ContentImageBlockSchema, ContentListMembership, ContentListMembershipSchema, ContentPageBreak, ContentPageBreakSchema, ContentParagraph, ContentParagraphSchema, ContentPathPoint, ContentPathPointSchema, ContentPathSegment, ContentPathSegmentSchema, ContentRun, ContentRunSchema, ContentSection, ContentSectionSchema, ContentShape, ContentShapeSchema, ContentSheet, ContentSheetCell, ContentSheetCellComment, ContentSheetCellCommentSchema, ContentSheetCellSchema, ContentSheetColumn, ContentSheetColumnSchema, ContentSheetImage, ContentSheetImageSchema, ContentSheetPrintRange, ContentSheetPrintRangeSchema, ContentSheetPrintSettings, ContentSheetPrintSettingsSchema, ContentSheetRepeatRange, ContentSheetRepeatRangeSchema, ContentSheetRow, ContentSheetRowSchema, ContentSheetSchema, ContentSlide, ContentSlideSchema, ContentStroke, ContentStrokeSchema, ContentStrokeStyle, ContentStrokeStyleSchema, ContentSubpath, ContentSubpathSchema, ContentTable, ContentTableCell, ContentTableCellSchema, ContentTableRow, ContentTableRowSchema, ContentTableSchema, ContentVector, ContentVectorSchema, DEFAULT_LAYOUT_FONT, DOCUMENT_PACKAGE_FORMAT_VERSION, DecimalString, DecimalStringSchema, DimensionVector, DimensionVectorSchema, DocumentJsonResult, DocumentPackage, DocumentPackageJson, DocumentPackageSchema, DocumentSchemaKind, EMBEDDED_OBJECT_KINDS, ExactRational, ExactRationalSchema, FontFace, FontRegistryOptions, FontSubstitution, FusedNode, LAYOUT_FORMAT_VERSION, LayoutCodec, LayoutDocument, LayoutDocumentJson, LayoutDocumentSchema, LayoutEllipse, LayoutEllipseSchema, LayoutFont, LayoutFontSchema, LayoutFrame, LayoutFrameSchema, LayoutImage, LayoutImageAsset, LayoutImageAssetSchema, LayoutImageSchema, LayoutItem, LayoutItemSchema, LayoutLine, LayoutLineSchema, LayoutLink, LayoutLinkSchema, LayoutMetadata, LayoutMetadataSchema, LayoutPage, LayoutPageSchema, LayoutPath, LayoutPathSchema, LayoutPathSegment, LayoutPathSegmentSchema, LayoutRect, LayoutRectSchema, LayoutSubpath, LayoutSubpathSchema, LayoutText, LayoutTextSchema, 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, ProvidedFont, SCHEMA_FILE_NAMES, SI_BASE_DIMENSIONS, SLIDE_SIZE_STANDARD, SLIDE_SIZE_WIDESCREEN, SiBaseDimension, StyledFragment, StyledRun, SymbolTable, SymbolTableSchema, TextMeasurer, UnderlineMetrics, UnrecognizedDocumentSchemaError, WrapOptions, WrappedLine, cellReference, clampHeadingLevel, colorToRgbHex, columnIndexToLetters, columnLettersToIndex, contentDocumentWithSchema, documentFromJson, documentPackageWithSchema, documentSchemaKindOf, isContentBlock, isMathExpression, isMathMlNode, layoutDocumentWithSchema, parseCellReference, parseRangeReference, rangeReference, rgbHexToColor, schemaUriFor };
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { cellReference, columnIndexToLetters, columnLettersToIndex, parseCellReference, parseRangeReference, rangeReference } from "./a1.js";
|
|
2
2
|
import "./codec.js";
|
|
3
3
|
import { COLOR_BLACK, ColorSchema, colorToRgbHex, rgbHexToColor } from "./color.js";
|
|
4
|
+
import { DimensionVectorSchema, ExactRationalSchema, MathAppSchema, MathExpressionSchema, MathMatrixSchema, MathNormalisationContextSchema, MathNumSchema, MathPresentationSchema, MathProdSchema, MathProvenanceSchema, MathQtySchema, MathSumSchema, MathSymSchema, MathSymbolEntrySchema, MathUncertaintySchema, MathUnitSchema, MathUnparsedSchema, SI_BASE_DIMENSIONS, SymbolTableSchema, isMathExpression } from "./math.js";
|
|
4
5
|
import { BoxSchema, LayoutFrameSchema, MarginsSchema, PAGE_SIZE_A4, PAGE_SIZE_LETTER, PageSizeSchema, SLIDE_SIZE_STANDARD, SLIDE_SIZE_WIDESCREEN } from "./geometry.js";
|
|
5
6
|
import { MathMlAttributeSchema, MathMlCdataSchema, MathMlCommentSchema, MathMlDeclarationSchema, MathMlElementSchema, MathMlNodeSchema, MathMlPiSchema, MathMlTextSchema, isMathMlNode } from "./mathml.js";
|
|
6
7
|
import { LayoutMetadataSchema } from "./metadata.js";
|
|
@@ -13,4 +14,4 @@ import { CONTENT_DEFS, CONTENT_DOCUMENT_URI, EMBEDDED_OBJECT_KINDS, MAX_SAFE_INT
|
|
|
13
14
|
import "./font-port.js";
|
|
14
15
|
import "./text-layout.js";
|
|
15
16
|
import "./math-layout.js";
|
|
16
|
-
export { AlignmentSchema, BoxSchema, COLOR_BLACK, CONTENT_DEFS, CONTENT_DOCUMENT_URI, CONTENT_FORMAT_VERSION, ColorSchema, ContentBlockSchema, ContentBorderSchema, ContentCellBordersSchema, ContentCellValueSchema, ContentDocumentSchema, ContentDrawPageSchema, ContentEmbeddedObjectBlockSchema, ContentEmbeddedObjectSchema, ContentFormulaSchema, ContentImageBlockSchema, ContentListMembershipSchema, ContentPageBreakSchema, ContentParagraphSchema, ContentPathPointSchema, ContentPathSegmentSchema, ContentRunSchema, ContentSectionSchema, ContentShapeSchema, ContentSheetCellCommentSchema, ContentSheetCellSchema, ContentSheetColumnSchema, ContentSheetImageSchema, ContentSheetPrintRangeSchema, ContentSheetPrintSettingsSchema, ContentSheetRepeatRangeSchema, ContentSheetRowSchema, ContentSheetSchema, ContentSlideSchema, ContentStrokeSchema, ContentStrokeStyleSchema, ContentSubpathSchema, ContentTableCellSchema, ContentTableRowSchema, ContentTableSchema, ContentVectorSchema, DEFAULT_LAYOUT_FONT, DOCUMENT_PACKAGE_FORMAT_VERSION, DecimalStringSchema, DocumentPackageSchema, EMBEDDED_OBJECT_KINDS, LAYOUT_FORMAT_VERSION, LayoutDocumentSchema, LayoutEllipseSchema, LayoutFontSchema, LayoutFrameSchema, LayoutImageAssetSchema, LayoutImageSchema, LayoutItemSchema, LayoutLineSchema, LayoutLinkSchema, LayoutMetadataSchema, LayoutPageSchema, LayoutPathSchema, LayoutPathSegmentSchema, LayoutRectSchema, LayoutSubpathSchema, LayoutTextSchema, MAX_SAFE_INTEGER, MarginsSchema, MathMlAttributeSchema, MathMlCdataSchema, MathMlCommentSchema, MathMlDeclarationSchema, MathMlElementSchema, MathMlNodeSchema, MathMlPiSchema, MathMlTextSchema, PAGE_SIZE_A4, PAGE_SIZE_LETTER, PageSizeSchema, SCHEMA_FILE_NAMES, SLIDE_SIZE_STANDARD, SLIDE_SIZE_WIDESCREEN, UnrecognizedDocumentSchemaError, cellReference, clampHeadingLevel, colorToRgbHex, columnIndexToLetters, columnLettersToIndex, contentDocumentWithSchema, documentFromJson, documentPackageWithSchema, documentSchemaKindOf, isContentBlock, isMathMlNode, layoutDocumentWithSchema, parseCellReference, parseRangeReference, rangeReference, rgbHexToColor, schemaUriFor };
|
|
17
|
+
export { AlignmentSchema, BoxSchema, COLOR_BLACK, CONTENT_DEFS, CONTENT_DOCUMENT_URI, CONTENT_FORMAT_VERSION, ColorSchema, ContentBlockSchema, ContentBorderSchema, ContentCellBordersSchema, ContentCellValueSchema, ContentDocumentSchema, ContentDrawPageSchema, ContentEmbeddedObjectBlockSchema, ContentEmbeddedObjectSchema, ContentFormulaSchema, ContentImageBlockSchema, ContentListMembershipSchema, ContentPageBreakSchema, ContentParagraphSchema, ContentPathPointSchema, ContentPathSegmentSchema, ContentRunSchema, ContentSectionSchema, ContentShapeSchema, ContentSheetCellCommentSchema, ContentSheetCellSchema, ContentSheetColumnSchema, ContentSheetImageSchema, ContentSheetPrintRangeSchema, ContentSheetPrintSettingsSchema, ContentSheetRepeatRangeSchema, ContentSheetRowSchema, ContentSheetSchema, ContentSlideSchema, ContentStrokeSchema, ContentStrokeStyleSchema, ContentSubpathSchema, ContentTableCellSchema, ContentTableRowSchema, ContentTableSchema, ContentVectorSchema, DEFAULT_LAYOUT_FONT, DOCUMENT_PACKAGE_FORMAT_VERSION, DecimalStringSchema, DimensionVectorSchema, DocumentPackageSchema, EMBEDDED_OBJECT_KINDS, ExactRationalSchema, LAYOUT_FORMAT_VERSION, LayoutDocumentSchema, LayoutEllipseSchema, LayoutFontSchema, LayoutFrameSchema, LayoutImageAssetSchema, LayoutImageSchema, LayoutItemSchema, LayoutLineSchema, LayoutLinkSchema, LayoutMetadataSchema, LayoutPageSchema, LayoutPathSchema, LayoutPathSegmentSchema, LayoutRectSchema, LayoutSubpathSchema, LayoutTextSchema, 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, SCHEMA_FILE_NAMES, SI_BASE_DIMENSIONS, SLIDE_SIZE_STANDARD, SLIDE_SIZE_WIDESCREEN, SymbolTableSchema, UnrecognizedDocumentSchemaError, cellReference, clampHeadingLevel, colorToRgbHex, columnIndexToLetters, columnLettersToIndex, contentDocumentWithSchema, documentFromJson, documentPackageWithSchema, documentSchemaKindOf, isContentBlock, isMathExpression, isMathMlNode, layoutDocumentWithSchema, parseCellReference, parseRangeReference, rangeReference, rgbHexToColor, schemaUriFor };
|
package/dist/layout.d.cts
CHANGED
|
@@ -9,12 +9,12 @@ declare const LayoutTextSchema: z.ZodObject<{
|
|
|
9
9
|
font: z.ZodObject<{
|
|
10
10
|
family: z.ZodString;
|
|
11
11
|
weight: z.ZodEnum<{
|
|
12
|
-
bold: "bold";
|
|
13
12
|
normal: "normal";
|
|
13
|
+
bold: "bold";
|
|
14
14
|
}>;
|
|
15
15
|
style: z.ZodEnum<{
|
|
16
|
-
italic: "italic";
|
|
17
16
|
normal: "normal";
|
|
17
|
+
italic: "italic";
|
|
18
18
|
}>;
|
|
19
19
|
}, z.core.$strip>;
|
|
20
20
|
sizePt: z.ZodNumber;
|
|
@@ -202,12 +202,12 @@ declare const LayoutItemSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
202
202
|
font: z.ZodObject<{
|
|
203
203
|
family: z.ZodString;
|
|
204
204
|
weight: z.ZodEnum<{
|
|
205
|
-
bold: "bold";
|
|
206
205
|
normal: "normal";
|
|
206
|
+
bold: "bold";
|
|
207
207
|
}>;
|
|
208
208
|
style: z.ZodEnum<{
|
|
209
|
-
italic: "italic";
|
|
210
209
|
normal: "normal";
|
|
210
|
+
italic: "italic";
|
|
211
211
|
}>;
|
|
212
212
|
}, z.core.$strip>;
|
|
213
213
|
sizePt: z.ZodNumber;
|
|
@@ -353,12 +353,12 @@ declare const LayoutPageSchema: z.ZodObject<{
|
|
|
353
353
|
font: z.ZodObject<{
|
|
354
354
|
family: z.ZodString;
|
|
355
355
|
weight: z.ZodEnum<{
|
|
356
|
-
bold: "bold";
|
|
357
356
|
normal: "normal";
|
|
357
|
+
bold: "bold";
|
|
358
358
|
}>;
|
|
359
359
|
style: z.ZodEnum<{
|
|
360
|
-
italic: "italic";
|
|
361
360
|
normal: "normal";
|
|
361
|
+
italic: "italic";
|
|
362
362
|
}>;
|
|
363
363
|
}, z.core.$strip>;
|
|
364
364
|
sizePt: z.ZodNumber;
|
|
@@ -528,12 +528,12 @@ declare const LayoutDocumentSchema: z.ZodObject<{
|
|
|
528
528
|
font: z.ZodObject<{
|
|
529
529
|
family: z.ZodString;
|
|
530
530
|
weight: z.ZodEnum<{
|
|
531
|
-
bold: "bold";
|
|
532
531
|
normal: "normal";
|
|
532
|
+
bold: "bold";
|
|
533
533
|
}>;
|
|
534
534
|
style: z.ZodEnum<{
|
|
535
|
-
italic: "italic";
|
|
536
535
|
normal: "normal";
|
|
536
|
+
italic: "italic";
|
|
537
537
|
}>;
|
|
538
538
|
}, z.core.$strip>;
|
|
539
539
|
sizePt: z.ZodNumber;
|
package/dist/layout.d.ts
CHANGED
|
@@ -9,12 +9,12 @@ declare const LayoutTextSchema: z.ZodObject<{
|
|
|
9
9
|
font: z.ZodObject<{
|
|
10
10
|
family: z.ZodString;
|
|
11
11
|
weight: z.ZodEnum<{
|
|
12
|
-
bold: "bold";
|
|
13
12
|
normal: "normal";
|
|
13
|
+
bold: "bold";
|
|
14
14
|
}>;
|
|
15
15
|
style: z.ZodEnum<{
|
|
16
|
-
italic: "italic";
|
|
17
16
|
normal: "normal";
|
|
17
|
+
italic: "italic";
|
|
18
18
|
}>;
|
|
19
19
|
}, z.core.$strip>;
|
|
20
20
|
sizePt: z.ZodNumber;
|
|
@@ -202,12 +202,12 @@ declare const LayoutItemSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
202
202
|
font: z.ZodObject<{
|
|
203
203
|
family: z.ZodString;
|
|
204
204
|
weight: z.ZodEnum<{
|
|
205
|
-
bold: "bold";
|
|
206
205
|
normal: "normal";
|
|
206
|
+
bold: "bold";
|
|
207
207
|
}>;
|
|
208
208
|
style: z.ZodEnum<{
|
|
209
|
-
italic: "italic";
|
|
210
209
|
normal: "normal";
|
|
210
|
+
italic: "italic";
|
|
211
211
|
}>;
|
|
212
212
|
}, z.core.$strip>;
|
|
213
213
|
sizePt: z.ZodNumber;
|
|
@@ -353,12 +353,12 @@ declare const LayoutPageSchema: z.ZodObject<{
|
|
|
353
353
|
font: z.ZodObject<{
|
|
354
354
|
family: z.ZodString;
|
|
355
355
|
weight: z.ZodEnum<{
|
|
356
|
-
bold: "bold";
|
|
357
356
|
normal: "normal";
|
|
357
|
+
bold: "bold";
|
|
358
358
|
}>;
|
|
359
359
|
style: z.ZodEnum<{
|
|
360
|
-
italic: "italic";
|
|
361
360
|
normal: "normal";
|
|
361
|
+
italic: "italic";
|
|
362
362
|
}>;
|
|
363
363
|
}, z.core.$strip>;
|
|
364
364
|
sizePt: z.ZodNumber;
|
|
@@ -528,12 +528,12 @@ declare const LayoutDocumentSchema: z.ZodObject<{
|
|
|
528
528
|
font: z.ZodObject<{
|
|
529
529
|
family: z.ZodString;
|
|
530
530
|
weight: z.ZodEnum<{
|
|
531
|
-
bold: "bold";
|
|
532
531
|
normal: "normal";
|
|
532
|
+
bold: "bold";
|
|
533
533
|
}>;
|
|
534
534
|
style: z.ZodEnum<{
|
|
535
|
-
italic: "italic";
|
|
536
535
|
normal: "normal";
|
|
536
|
+
italic: "italic";
|
|
537
537
|
}>;
|
|
538
538
|
}, z.core.$strip>;
|
|
539
539
|
sizePt: z.ZodNumber;
|
|
@@ -0,0 +1,210 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
//#region src/math.d.ts
|
|
3
|
+
declare const ExactRationalSchema: z.ZodObject<{
|
|
4
|
+
numerator: z.ZodString;
|
|
5
|
+
denominator: z.ZodString;
|
|
6
|
+
}, z.core.$strip>;
|
|
7
|
+
type ExactRational = z.infer<typeof ExactRationalSchema>;
|
|
8
|
+
declare const SI_BASE_DIMENSIONS: readonly ["length", "mass", "time", "electricCurrent", "thermodynamicTemperature", "amountOfSubstance", "luminousIntensity"];
|
|
9
|
+
type SiBaseDimension = (typeof SI_BASE_DIMENSIONS)[number];
|
|
10
|
+
declare const DimensionVectorSchema: z.ZodRecord<z.ZodEnum<{
|
|
11
|
+
time: "time";
|
|
12
|
+
length: "length";
|
|
13
|
+
mass: "mass";
|
|
14
|
+
electricCurrent: "electricCurrent";
|
|
15
|
+
thermodynamicTemperature: "thermodynamicTemperature";
|
|
16
|
+
amountOfSubstance: "amountOfSubstance";
|
|
17
|
+
luminousIntensity: "luminousIntensity";
|
|
18
|
+
}> & z.core.$partial, z.ZodNumber>;
|
|
19
|
+
type DimensionVector = z.infer<typeof DimensionVectorSchema>;
|
|
20
|
+
declare const MathUnitSchema: z.ZodObject<{
|
|
21
|
+
id: z.ZodString;
|
|
22
|
+
symbol: z.ZodString;
|
|
23
|
+
name: z.ZodOptional<z.ZodString>;
|
|
24
|
+
dimension: z.ZodRecord<z.ZodEnum<{
|
|
25
|
+
time: "time";
|
|
26
|
+
length: "length";
|
|
27
|
+
mass: "mass";
|
|
28
|
+
electricCurrent: "electricCurrent";
|
|
29
|
+
thermodynamicTemperature: "thermodynamicTemperature";
|
|
30
|
+
amountOfSubstance: "amountOfSubstance";
|
|
31
|
+
luminousIntensity: "luminousIntensity";
|
|
32
|
+
}> & z.core.$partial, z.ZodNumber>;
|
|
33
|
+
factorToSi: z.ZodObject<{
|
|
34
|
+
numerator: z.ZodString;
|
|
35
|
+
denominator: z.ZodString;
|
|
36
|
+
}, z.core.$strip>;
|
|
37
|
+
offsetToSi: z.ZodOptional<z.ZodObject<{
|
|
38
|
+
numerator: z.ZodString;
|
|
39
|
+
denominator: z.ZodString;
|
|
40
|
+
}, z.core.$strip>>;
|
|
41
|
+
context: z.ZodOptional<z.ZodString>;
|
|
42
|
+
}, z.core.$strip>;
|
|
43
|
+
type MathUnit = z.infer<typeof MathUnitSchema>;
|
|
44
|
+
declare const MathNormalisationContextSchema: z.ZodObject<{
|
|
45
|
+
id: z.ZodString;
|
|
46
|
+
bases: z.ZodArray<z.ZodObject<{
|
|
47
|
+
unit: z.ZodString;
|
|
48
|
+
value: z.ZodObject<{
|
|
49
|
+
numerator: z.ZodString;
|
|
50
|
+
denominator: z.ZodString;
|
|
51
|
+
}, z.core.$strip>;
|
|
52
|
+
}, z.core.$strip>>;
|
|
53
|
+
}, z.core.$strip>;
|
|
54
|
+
type MathNormalisationContext = z.infer<typeof MathNormalisationContextSchema>;
|
|
55
|
+
declare const MathSymbolEntrySchema: z.ZodObject<{
|
|
56
|
+
glyph: z.ZodString;
|
|
57
|
+
scope: z.ZodString;
|
|
58
|
+
id: z.ZodString;
|
|
59
|
+
quantityKind: z.ZodOptional<z.ZodString>;
|
|
60
|
+
preferredUnit: z.ZodOptional<z.ZodString>;
|
|
61
|
+
definitionSource: z.ZodOptional<z.ZodString>;
|
|
62
|
+
}, z.core.$strip>;
|
|
63
|
+
type MathSymbolEntry = z.infer<typeof MathSymbolEntrySchema>;
|
|
64
|
+
declare const SymbolTableSchema: z.ZodObject<{
|
|
65
|
+
symbols: z.ZodArray<z.ZodObject<{
|
|
66
|
+
glyph: z.ZodString;
|
|
67
|
+
scope: z.ZodString;
|
|
68
|
+
id: z.ZodString;
|
|
69
|
+
quantityKind: z.ZodOptional<z.ZodString>;
|
|
70
|
+
preferredUnit: z.ZodOptional<z.ZodString>;
|
|
71
|
+
definitionSource: z.ZodOptional<z.ZodString>;
|
|
72
|
+
}, z.core.$strip>>;
|
|
73
|
+
units: z.ZodArray<z.ZodObject<{
|
|
74
|
+
id: z.ZodString;
|
|
75
|
+
symbol: z.ZodString;
|
|
76
|
+
name: z.ZodOptional<z.ZodString>;
|
|
77
|
+
dimension: z.ZodRecord<z.ZodEnum<{
|
|
78
|
+
time: "time";
|
|
79
|
+
length: "length";
|
|
80
|
+
mass: "mass";
|
|
81
|
+
electricCurrent: "electricCurrent";
|
|
82
|
+
thermodynamicTemperature: "thermodynamicTemperature";
|
|
83
|
+
amountOfSubstance: "amountOfSubstance";
|
|
84
|
+
luminousIntensity: "luminousIntensity";
|
|
85
|
+
}> & z.core.$partial, z.ZodNumber>;
|
|
86
|
+
factorToSi: z.ZodObject<{
|
|
87
|
+
numerator: z.ZodString;
|
|
88
|
+
denominator: z.ZodString;
|
|
89
|
+
}, z.core.$strip>;
|
|
90
|
+
offsetToSi: z.ZodOptional<z.ZodObject<{
|
|
91
|
+
numerator: z.ZodString;
|
|
92
|
+
denominator: z.ZodString;
|
|
93
|
+
}, z.core.$strip>>;
|
|
94
|
+
context: z.ZodOptional<z.ZodString>;
|
|
95
|
+
}, z.core.$strip>>;
|
|
96
|
+
contexts: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
97
|
+
id: z.ZodString;
|
|
98
|
+
bases: z.ZodArray<z.ZodObject<{
|
|
99
|
+
unit: z.ZodString;
|
|
100
|
+
value: z.ZodObject<{
|
|
101
|
+
numerator: z.ZodString;
|
|
102
|
+
denominator: z.ZodString;
|
|
103
|
+
}, z.core.$strip>;
|
|
104
|
+
}, z.core.$strip>>;
|
|
105
|
+
}, z.core.$strip>>>;
|
|
106
|
+
}, z.core.$strip>;
|
|
107
|
+
type SymbolTable = z.infer<typeof SymbolTableSchema>;
|
|
108
|
+
declare const MathPresentationSchema: z.ZodObject<{
|
|
109
|
+
latex: z.ZodString;
|
|
110
|
+
}, z.core.$strip>;
|
|
111
|
+
type MathPresentation = z.infer<typeof MathPresentationSchema>;
|
|
112
|
+
declare const MathProvenanceSchema: z.ZodObject<{
|
|
113
|
+
source: z.ZodString;
|
|
114
|
+
pageRef: z.ZodOptional<z.ZodString>;
|
|
115
|
+
editTrail: z.ZodArray<z.ZodString>;
|
|
116
|
+
}, z.core.$strip>;
|
|
117
|
+
type MathProvenance = z.infer<typeof MathProvenanceSchema>;
|
|
118
|
+
declare const MathUncertaintySchema: z.ZodObject<{
|
|
119
|
+
magnitude: z.ZodObject<{
|
|
120
|
+
numerator: z.ZodString;
|
|
121
|
+
denominator: z.ZodString;
|
|
122
|
+
}, z.core.$strip>;
|
|
123
|
+
unit: z.ZodOptional<z.ZodString>;
|
|
124
|
+
coverageFactor: z.ZodOptional<z.ZodNumber>;
|
|
125
|
+
}, z.core.$strip>;
|
|
126
|
+
type MathUncertainty = z.infer<typeof MathUncertaintySchema>;
|
|
127
|
+
declare const MathNumSchema: z.ZodObject<{
|
|
128
|
+
numerator: z.ZodString;
|
|
129
|
+
denominator: z.ZodString;
|
|
130
|
+
kind: z.ZodLiteral<"num">;
|
|
131
|
+
}, z.core.$strip>;
|
|
132
|
+
type MathNum = z.infer<typeof MathNumSchema>;
|
|
133
|
+
declare const MathQtySchema: z.ZodObject<{
|
|
134
|
+
kind: z.ZodLiteral<"qty">;
|
|
135
|
+
value: z.ZodObject<{
|
|
136
|
+
numerator: z.ZodString;
|
|
137
|
+
denominator: z.ZodString;
|
|
138
|
+
}, z.core.$strip>;
|
|
139
|
+
unit: z.ZodString;
|
|
140
|
+
uncertainty: z.ZodOptional<z.ZodObject<{
|
|
141
|
+
magnitude: z.ZodObject<{
|
|
142
|
+
numerator: z.ZodString;
|
|
143
|
+
denominator: z.ZodString;
|
|
144
|
+
}, z.core.$strip>;
|
|
145
|
+
unit: z.ZodOptional<z.ZodString>;
|
|
146
|
+
coverageFactor: z.ZodOptional<z.ZodNumber>;
|
|
147
|
+
}, z.core.$strip>>;
|
|
148
|
+
}, z.core.$strip>;
|
|
149
|
+
type MathQty = z.infer<typeof MathQtySchema>;
|
|
150
|
+
declare const MathSymSchema: z.ZodObject<{
|
|
151
|
+
kind: z.ZodLiteral<"sym">;
|
|
152
|
+
id: z.ZodString;
|
|
153
|
+
}, z.core.$strip>;
|
|
154
|
+
type MathSym = z.infer<typeof MathSymSchema>;
|
|
155
|
+
declare const MathUnparsedSchema: z.ZodObject<{
|
|
156
|
+
kind: z.ZodLiteral<"unparsed">;
|
|
157
|
+
latex: z.ZodString;
|
|
158
|
+
}, z.core.$strip>;
|
|
159
|
+
type MathUnparsed = z.infer<typeof MathUnparsedSchema>;
|
|
160
|
+
interface MathApp {
|
|
161
|
+
kind: 'app';
|
|
162
|
+
operator: string;
|
|
163
|
+
args: MathExpression[];
|
|
164
|
+
}
|
|
165
|
+
interface MathSum {
|
|
166
|
+
kind: 'sum';
|
|
167
|
+
binder: string;
|
|
168
|
+
lower: MathExpression;
|
|
169
|
+
upper: MathExpression;
|
|
170
|
+
body: MathExpression;
|
|
171
|
+
}
|
|
172
|
+
interface MathProd {
|
|
173
|
+
kind: 'prod';
|
|
174
|
+
binder: string;
|
|
175
|
+
lower: MathExpression;
|
|
176
|
+
upper: MathExpression;
|
|
177
|
+
body: MathExpression;
|
|
178
|
+
}
|
|
179
|
+
interface MathMatrix {
|
|
180
|
+
kind: 'matrix';
|
|
181
|
+
rows: MathExpression[][];
|
|
182
|
+
}
|
|
183
|
+
type MathExpression = MathNum | MathQty | MathSym | MathApp | MathSum | MathProd | MathMatrix | MathUnparsed;
|
|
184
|
+
declare function isMathExpression(value: unknown): value is MathExpression;
|
|
185
|
+
declare const MathExpressionSchema: z.ZodCustom<MathExpression, MathExpression>;
|
|
186
|
+
declare const MathAppSchema: z.ZodObject<{
|
|
187
|
+
kind: z.ZodLiteral<"app">;
|
|
188
|
+
operator: z.ZodString;
|
|
189
|
+
args: z.ZodArray<z.ZodCustom<MathExpression, MathExpression>>;
|
|
190
|
+
}, z.core.$strip>;
|
|
191
|
+
declare const MathSumSchema: z.ZodObject<{
|
|
192
|
+
binder: z.ZodString;
|
|
193
|
+
lower: z.ZodCustom<MathExpression, MathExpression>;
|
|
194
|
+
upper: z.ZodCustom<MathExpression, MathExpression>;
|
|
195
|
+
body: z.ZodCustom<MathExpression, MathExpression>;
|
|
196
|
+
kind: z.ZodLiteral<"sum">;
|
|
197
|
+
}, z.core.$strip>;
|
|
198
|
+
declare const MathProdSchema: z.ZodObject<{
|
|
199
|
+
binder: z.ZodString;
|
|
200
|
+
lower: z.ZodCustom<MathExpression, MathExpression>;
|
|
201
|
+
upper: z.ZodCustom<MathExpression, MathExpression>;
|
|
202
|
+
body: z.ZodCustom<MathExpression, MathExpression>;
|
|
203
|
+
kind: z.ZodLiteral<"prod">;
|
|
204
|
+
}, z.core.$strip>;
|
|
205
|
+
declare const MathMatrixSchema: z.ZodObject<{
|
|
206
|
+
kind: z.ZodLiteral<"matrix">;
|
|
207
|
+
rows: z.ZodArray<z.ZodArray<z.ZodCustom<MathExpression, MathExpression>>>;
|
|
208
|
+
}, z.core.$strip>;
|
|
209
|
+
//#endregion
|
|
210
|
+
export { MathUncertaintySchema as A, MathSum as C, MathSymbolEntry as D, MathSymSchema as E, SI_BASE_DIMENSIONS as F, SiBaseDimension as I, SymbolTable as L, MathUnitSchema as M, MathUnparsed as N, MathSymbolEntrySchema as O, MathUnparsedSchema as P, SymbolTableSchema as R, MathQtySchema as S, MathSym as T, MathProd as _, MathApp as a, MathProvenanceSchema as b, MathExpressionSchema as c, MathNormalisationContext as d, MathNormalisationContextSchema as f, MathPresentationSchema as g, MathPresentation as h, ExactRationalSchema as i, MathUnit as j, MathUncertainty as k, MathMatrix as l, MathNumSchema as m, DimensionVectorSchema as n, MathAppSchema as o, MathNum as p, ExactRational as r, MathExpression as s, DimensionVector as t, MathMatrixSchema as u, MathProdSchema as v, MathSumSchema as w, MathQty as x, MathProvenance as y, isMathExpression as z };
|