document-schema 4.3.3 → 7.6.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +274 -95
- package/dist/border-weight.cjs +26 -0
- package/dist/border-weight.d.cts +12 -0
- package/dist/border-weight.d.ts +12 -0
- package/dist/border-weight.js +23 -0
- package/dist/codec.d.cts +1 -1
- package/dist/codec.d.ts +1 -1
- package/dist/{construct-CdQuI9f5.d.cts → construct-C9cYkjnd.d.cts} +242 -2
- package/dist/{construct-CdQuI9f5.d.ts → construct-C9cYkjnd.d.ts} +242 -2
- package/dist/construct.cjs +13 -6
- package/dist/construct.d.cts +1 -1
- package/dist/construct.d.ts +1 -1
- package/dist/construct.js +13 -6
- package/dist/content-CIIFuBbn.d.cts +10273 -0
- package/dist/content-json-schema-defs.cjs +1056 -189
- package/dist/content-json-schema-defs.js +1056 -189
- package/dist/content-wL5-wetq.d.ts +10273 -0
- package/dist/content.cjs +514 -36
- package/dist/content.d.cts +2 -2
- package/dist/content.d.ts +2 -2
- package/dist/content.js +488 -37
- package/dist/decompose.cjs +7 -17
- package/dist/decompose.d.cts +5 -5
- package/dist/decompose.d.ts +5 -5
- package/dist/decompose.js +7 -17
- package/dist/definitions.cjs +5 -1
- package/dist/definitions.d.cts +37 -1
- package/dist/definitions.d.ts +37 -1
- package/dist/definitions.js +5 -1
- package/dist/factor-styles.cjs +14 -8
- package/dist/factor-styles.d.cts +6 -6
- package/dist/factor-styles.d.ts +6 -6
- package/dist/factor-styles.js +15 -9
- package/dist/flatten.cjs +5 -5
- package/dist/flatten.d.cts +4 -4
- package/dist/flatten.d.ts +4 -4
- package/dist/flatten.js +5 -5
- package/dist/font-port.d.cts +2 -2
- package/dist/font-port.d.ts +2 -2
- package/dist/index.cjs +54 -14
- package/dist/index.d.cts +14 -12
- package/dist/index.d.ts +14 -12
- package/dist/index.js +12 -10
- package/dist/{math-B7gZJeND.d.cts → math-BScHxedi.d.cts} +100 -17
- package/dist/{math-B7gZJeND.d.ts → math-BScHxedi.d.ts} +100 -17
- package/dist/math-layout.d.cts +6 -6
- package/dist/math-layout.d.ts +6 -6
- package/dist/math.cjs +32 -6
- package/dist/math.d.cts +2 -2
- package/dist/math.d.ts +2 -2
- package/dist/math.js +29 -7
- package/dist/{mathml-B1oTCtzc.d.cts → mathml-Czqc1mdZ.d.cts} +3 -3
- package/dist/{mathml-B1oTCtzc.d.ts → mathml-Czqc1mdZ.d.ts} +3 -3
- package/dist/mathml.cjs +9 -2
- package/dist/mathml.d.cts +1 -1
- package/dist/mathml.d.ts +1 -1
- package/dist/mathml.js +9 -2
- package/dist/metadata.cjs +12 -1
- package/dist/metadata.d.cts +13 -0
- package/dist/metadata.d.ts +13 -0
- package/dist/metadata.js +12 -1
- package/dist/package-node-C9iYNIXi.d.cts +1989 -0
- package/dist/package-node-C_rpWAh2.d.ts +1989 -0
- package/dist/package-node.cjs +21 -21
- package/dist/package-node.d.cts +2 -2
- package/dist/package-node.d.ts +2 -2
- package/dist/package-node.js +14 -14
- package/dist/package.cjs +5 -3
- package/dist/package.d.cts +258 -13
- package/dist/package.d.ts +258 -13
- package/dist/package.js +5 -3
- package/dist/schema-io.cjs +21 -11
- package/dist/schema-io.d.cts +13 -9
- package/dist/schema-io.d.ts +13 -9
- package/dist/schema-io.js +21 -12
- package/dist/source-Bas5ol6f.d.cts +43 -0
- package/dist/source-Bas5ol6f.d.ts +43 -0
- package/dist/source.cjs +27 -0
- package/dist/source.d.cts +2 -0
- package/dist/source.d.ts +2 -0
- package/dist/source.js +25 -0
- package/dist/style-D06NwxAJ.d.cts +29 -0
- package/dist/style-D06NwxAJ.d.ts +29 -0
- package/dist/style.cjs +2 -0
- package/dist/style.d.cts +2 -24
- package/dist/style.d.ts +2 -24
- package/dist/style.js +2 -1
- package/dist/text-layout.d.cts +1 -1
- package/dist/text-layout.d.ts +1 -1
- package/package.json +28 -29
- package/schemas/content-document.schema.json +6623 -1694
- package/schemas/{document-package.schema.json → document-tree.schema.json} +1826 -143
- package/dist/content-BmqzegMG.d.cts +0 -2481
- package/dist/content-CIwPb_yh.d.ts +0 -2481
- package/dist/package-node-C7RiYhyk.d.ts +0 -459
- package/dist/package-node-a9CyRaD3.d.cts +0 -459
|
@@ -35,14 +35,13 @@ declare const MathMlPiSchema: z.ZodObject<{
|
|
|
35
35
|
}, z.core.$strip>;
|
|
36
36
|
type MathMlPi = z.infer<typeof MathMlPiSchema>;
|
|
37
37
|
interface MathMlElement {
|
|
38
|
-
type:
|
|
38
|
+
type: "element";
|
|
39
39
|
tag: string;
|
|
40
40
|
attributes: MathMlAttribute[];
|
|
41
41
|
children: MathMlNode[];
|
|
42
42
|
}
|
|
43
43
|
type MathMlNode = MathMlText | MathMlCdata | MathMlComment | MathMlDeclaration | MathMlPi | MathMlElement;
|
|
44
44
|
declare function isMathMlNode(value: unknown): value is MathMlNode;
|
|
45
|
-
declare const MathMlNodeSchema: z.ZodCustom<MathMlNode, MathMlNode>;
|
|
46
45
|
declare const MathMlElementSchema: z.ZodObject<{
|
|
47
46
|
type: z.ZodLiteral<"element">;
|
|
48
47
|
tag: z.ZodString;
|
|
@@ -50,7 +49,8 @@ declare const MathMlElementSchema: z.ZodObject<{
|
|
|
50
49
|
name: z.ZodString;
|
|
51
50
|
value: z.ZodString;
|
|
52
51
|
}, z.core.$strip>>;
|
|
53
|
-
children: z.ZodArray<z.
|
|
52
|
+
children: z.ZodLazy<z.ZodArray<z.ZodType<MathMlNode, MathMlNode, z.core.$ZodTypeInternals<MathMlNode, MathMlNode>>>>;
|
|
54
53
|
}, z.core.$strip>;
|
|
54
|
+
declare const MathMlNodeSchema: z.ZodType<MathMlNode, MathMlNode>;
|
|
55
55
|
//#endregion
|
|
56
56
|
export { isMathMlNode as _, MathMlComment as a, MathMlDeclarationSchema as c, MathMlNode as d, MathMlNodeSchema as f, MathMlTextSchema as g, MathMlText as h, MathMlCdataSchema as i, MathMlElement as l, MathMlPiSchema as m, MathMlAttributeSchema as n, MathMlCommentSchema as o, MathMlPi as p, MathMlCdata as r, MathMlDeclaration as s, MathMlAttribute as t, MathMlElementSchema as u };
|
package/dist/mathml.cjs
CHANGED
|
@@ -41,13 +41,20 @@ 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 MathMlNodeSchema = zod.z.custom(isMathMlNode);
|
|
45
44
|
const MathMlElementSchema = zod.z.object({
|
|
46
45
|
type: zod.z.literal("element"),
|
|
47
46
|
tag: zod.z.string(),
|
|
48
47
|
attributes: zod.z.array(MathMlAttributeSchema),
|
|
49
|
-
children: zod.z.array(MathMlNodeSchema)
|
|
48
|
+
children: zod.z.lazy(() => zod.z.array(MathMlNodeSchema))
|
|
50
49
|
});
|
|
50
|
+
const MathMlNodeSchema = zod.z.discriminatedUnion("type", [
|
|
51
|
+
MathMlTextSchema,
|
|
52
|
+
MathMlCdataSchema,
|
|
53
|
+
MathMlCommentSchema,
|
|
54
|
+
MathMlDeclarationSchema,
|
|
55
|
+
MathMlPiSchema,
|
|
56
|
+
MathMlElementSchema
|
|
57
|
+
]);
|
|
51
58
|
//#endregion
|
|
52
59
|
exports.MathMlAttributeSchema = MathMlAttributeSchema;
|
|
53
60
|
exports.MathMlCdataSchema = MathMlCdataSchema;
|
package/dist/mathml.d.cts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
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-
|
|
1
|
+
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-Czqc1mdZ.cjs";
|
|
2
2
|
export { MathMlAttribute, MathMlAttributeSchema, MathMlCdata, MathMlCdataSchema, MathMlComment, MathMlCommentSchema, MathMlDeclaration, MathMlDeclarationSchema, MathMlElement, MathMlElementSchema, MathMlNode, MathMlNodeSchema, MathMlPi, MathMlPiSchema, MathMlText, MathMlTextSchema, isMathMlNode };
|
package/dist/mathml.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
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-
|
|
1
|
+
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-Czqc1mdZ.js";
|
|
2
2
|
export { MathMlAttribute, MathMlAttributeSchema, MathMlCdata, MathMlCdataSchema, MathMlComment, MathMlCommentSchema, MathMlDeclaration, MathMlDeclarationSchema, MathMlElement, MathMlElementSchema, MathMlNode, MathMlNodeSchema, MathMlPi, MathMlPiSchema, MathMlText, MathMlTextSchema, isMathMlNode };
|
package/dist/mathml.js
CHANGED
|
@@ -40,12 +40,19 @@ 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 MathMlNodeSchema = z.custom(isMathMlNode);
|
|
44
43
|
const MathMlElementSchema = z.object({
|
|
45
44
|
type: z.literal("element"),
|
|
46
45
|
tag: z.string(),
|
|
47
46
|
attributes: z.array(MathMlAttributeSchema),
|
|
48
|
-
children: z.array(MathMlNodeSchema)
|
|
47
|
+
children: z.lazy(() => z.array(MathMlNodeSchema))
|
|
49
48
|
});
|
|
49
|
+
const MathMlNodeSchema = z.discriminatedUnion("type", [
|
|
50
|
+
MathMlTextSchema,
|
|
51
|
+
MathMlCdataSchema,
|
|
52
|
+
MathMlCommentSchema,
|
|
53
|
+
MathMlDeclarationSchema,
|
|
54
|
+
MathMlPiSchema,
|
|
55
|
+
MathMlElementSchema
|
|
56
|
+
]);
|
|
50
57
|
//#endregion
|
|
51
58
|
export { MathMlAttributeSchema, MathMlCdataSchema, MathMlCommentSchema, MathMlDeclarationSchema, MathMlElementSchema, MathMlNodeSchema, MathMlPiSchema, MathMlTextSchema, isMathMlNode };
|
package/dist/metadata.cjs
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
+
const require_style = require("./style.cjs");
|
|
2
3
|
let zod = require("zod");
|
|
3
4
|
//#region src/metadata.ts
|
|
4
5
|
const LayoutMetadataSchema = zod.z.object({
|
|
@@ -9,7 +10,17 @@ const LayoutMetadataSchema = zod.z.object({
|
|
|
9
10
|
creator: zod.z.string().optional(),
|
|
10
11
|
producer: zod.z.string().optional(),
|
|
11
12
|
createdIso: zod.z.string().optional(),
|
|
12
|
-
modifiedIso: zod.z.string().optional()
|
|
13
|
+
modifiedIso: zod.z.string().optional(),
|
|
14
|
+
lastPrintedIso: zod.z.string().optional(),
|
|
15
|
+
language: zod.z.string().optional(),
|
|
16
|
+
direction: require_style.TextDirectionSchema.optional(),
|
|
17
|
+
publisher: zod.z.string().optional(),
|
|
18
|
+
contributor: zod.z.string().optional(),
|
|
19
|
+
rights: zod.z.string().optional(),
|
|
20
|
+
identifier: zod.z.string().optional(),
|
|
21
|
+
comments: zod.z.string().optional(),
|
|
22
|
+
company: zod.z.string().optional(),
|
|
23
|
+
manager: zod.z.string().optional()
|
|
13
24
|
});
|
|
14
25
|
//#endregion
|
|
15
26
|
exports.LayoutMetadataSchema = LayoutMetadataSchema;
|
package/dist/metadata.d.cts
CHANGED
|
@@ -9,6 +9,19 @@ declare const LayoutMetadataSchema: z.ZodObject<{
|
|
|
9
9
|
producer: z.ZodOptional<z.ZodString>;
|
|
10
10
|
createdIso: z.ZodOptional<z.ZodString>;
|
|
11
11
|
modifiedIso: z.ZodOptional<z.ZodString>;
|
|
12
|
+
lastPrintedIso: z.ZodOptional<z.ZodString>;
|
|
13
|
+
language: z.ZodOptional<z.ZodString>;
|
|
14
|
+
direction: z.ZodOptional<z.ZodEnum<{
|
|
15
|
+
ltr: "ltr";
|
|
16
|
+
rtl: "rtl";
|
|
17
|
+
}>>;
|
|
18
|
+
publisher: z.ZodOptional<z.ZodString>;
|
|
19
|
+
contributor: z.ZodOptional<z.ZodString>;
|
|
20
|
+
rights: z.ZodOptional<z.ZodString>;
|
|
21
|
+
identifier: z.ZodOptional<z.ZodString>;
|
|
22
|
+
comments: z.ZodOptional<z.ZodString>;
|
|
23
|
+
company: z.ZodOptional<z.ZodString>;
|
|
24
|
+
manager: z.ZodOptional<z.ZodString>;
|
|
12
25
|
}, z.core.$strip>;
|
|
13
26
|
type LayoutMetadata = z.infer<typeof LayoutMetadataSchema>;
|
|
14
27
|
//#endregion
|
package/dist/metadata.d.ts
CHANGED
|
@@ -9,6 +9,19 @@ declare const LayoutMetadataSchema: z.ZodObject<{
|
|
|
9
9
|
producer: z.ZodOptional<z.ZodString>;
|
|
10
10
|
createdIso: z.ZodOptional<z.ZodString>;
|
|
11
11
|
modifiedIso: z.ZodOptional<z.ZodString>;
|
|
12
|
+
lastPrintedIso: z.ZodOptional<z.ZodString>;
|
|
13
|
+
language: z.ZodOptional<z.ZodString>;
|
|
14
|
+
direction: z.ZodOptional<z.ZodEnum<{
|
|
15
|
+
ltr: "ltr";
|
|
16
|
+
rtl: "rtl";
|
|
17
|
+
}>>;
|
|
18
|
+
publisher: z.ZodOptional<z.ZodString>;
|
|
19
|
+
contributor: z.ZodOptional<z.ZodString>;
|
|
20
|
+
rights: z.ZodOptional<z.ZodString>;
|
|
21
|
+
identifier: z.ZodOptional<z.ZodString>;
|
|
22
|
+
comments: z.ZodOptional<z.ZodString>;
|
|
23
|
+
company: z.ZodOptional<z.ZodString>;
|
|
24
|
+
manager: z.ZodOptional<z.ZodString>;
|
|
12
25
|
}, z.core.$strip>;
|
|
13
26
|
type LayoutMetadata = z.infer<typeof LayoutMetadataSchema>;
|
|
14
27
|
//#endregion
|
package/dist/metadata.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { TextDirectionSchema } from "./style.js";
|
|
1
2
|
import { z } from "zod";
|
|
2
3
|
//#region src/metadata.ts
|
|
3
4
|
const LayoutMetadataSchema = z.object({
|
|
@@ -8,7 +9,17 @@ const LayoutMetadataSchema = z.object({
|
|
|
8
9
|
creator: z.string().optional(),
|
|
9
10
|
producer: z.string().optional(),
|
|
10
11
|
createdIso: z.string().optional(),
|
|
11
|
-
modifiedIso: z.string().optional()
|
|
12
|
+
modifiedIso: z.string().optional(),
|
|
13
|
+
lastPrintedIso: z.string().optional(),
|
|
14
|
+
language: z.string().optional(),
|
|
15
|
+
direction: TextDirectionSchema.optional(),
|
|
16
|
+
publisher: z.string().optional(),
|
|
17
|
+
contributor: z.string().optional(),
|
|
18
|
+
rights: z.string().optional(),
|
|
19
|
+
identifier: z.string().optional(),
|
|
20
|
+
comments: z.string().optional(),
|
|
21
|
+
company: z.string().optional(),
|
|
22
|
+
manager: z.string().optional()
|
|
12
23
|
});
|
|
13
24
|
//#endregion
|
|
14
25
|
export { LayoutMetadataSchema };
|