document-schema 7.12.0 → 7.14.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 +6 -0
- package/dist/codec.d.cts +1 -1
- package/dist/codec.d.ts +1 -1
- package/dist/{construct-C4XiF8OW.d.cts → construct-C9cYkjnd.d.cts} +6 -6
- package/dist/{construct-C4XiF8OW.d.ts → construct-C9cYkjnd.d.ts} +6 -6
- package/dist/construct.d.cts +1 -1
- package/dist/construct.d.ts +1 -1
- package/dist/{content-DnNAXdH_.d.cts → content-BNUhgRbB.d.cts} +129 -126
- package/dist/{content-vx3Mbnjy.d.ts → content-CYPkduUB.d.ts} +129 -126
- package/dist/content-json-schema-defs.cjs +2 -1
- package/dist/content-json-schema-defs.js +2 -1
- package/dist/content.cjs +3 -2
- package/dist/content.d.cts +1 -1
- package/dist/content.d.ts +1 -1
- package/dist/content.js +3 -2
- package/dist/decompose.d.cts +2 -2
- package/dist/decompose.d.ts +2 -2
- package/dist/definitions.d.cts +1 -1
- package/dist/definitions.d.ts +1 -1
- package/dist/factor-styles.d.cts +1 -1
- package/dist/factor-styles.d.ts +1 -1
- package/dist/flatten.d.cts +1 -1
- package/dist/flatten.d.ts +1 -1
- package/dist/index.cjs +2 -0
- package/dist/index.d.cts +5 -5
- package/dist/index.d.ts +5 -5
- package/dist/index.js +2 -2
- package/dist/{package-node-DMS4Zrfi.d.cts → package-node-C1HxQdNK.d.cts} +47 -47
- package/dist/{package-node-CjEahULr.d.ts → package-node-DdotoNEU.d.ts} +47 -47
- package/dist/package-node.d.cts +1 -1
- package/dist/package-node.d.ts +1 -1
- package/dist/package.d.cts +2 -2
- package/dist/package.d.ts +2 -2
- package/dist/schema-io.cjs +2 -2
- package/dist/schema-io.d.cts +1 -1
- package/dist/schema-io.d.ts +1 -1
- package/dist/schema-io.js +2 -2
- package/dist/table-grid.cjs +85 -0
- package/dist/table-grid.d.cts +50 -2
- package/dist/table-grid.d.ts +50 -2
- package/dist/table-grid.js +84 -1
- package/package.json +1 -1
- package/schemas/content-document.schema.json +19 -16
- package/schemas/document-tree.schema.json +6 -3
package/README.md
CHANGED
|
@@ -330,6 +330,12 @@ Well-formedness is a per-entry range check — `0 <= startRun <= endRun <= runs.
|
|
|
330
330
|
|
|
331
331
|
Two harmonisations the inventories asked for are also deliberately absent. There is **no `fieldType` enum**: `instruction` is required and verbatim, so nothing is lost without one, and #24 asks for exactly one new vocabulary — `link`'s internal targets — rather than one per kind, with the four inventories' own corpus gate still standing before a field-type member set could be frozen honestly. And a **sheet-scoped named range** (xlsx defined names and tables, ODF `table:named-expressions`) is a definitions-table entry, not an `anchor`: a sheet group's children are its images and embedded documents, never a block flow, so there is no extent for an anchor to wrap — which is the odf inventory's own verdict for the identical construct.
|
|
332
332
|
|
|
333
|
+
## The table grid rule
|
|
334
|
+
|
|
335
|
+
A `ContentTable` row's `cells` array is dense: one entry per grid column, so a cell's index is its grid column. A merged region is an anchor entry carrying `colSpan`/`rowSpan` plus a block-less entry at every other position it covers, and `walkTableGrid` classifies every entry as an anchor or as covered. `ContentTableCell` states the rule in full; the schema cannot enforce it, since it is a property of a whole table and not of any one cell.
|
|
336
|
+
|
|
337
|
+
`findTableGridFault(table)` is the one shared definition of when a table contradicts it, in the same way `findConstructMarkerImbalance` is for bracket balance. It never throws: it returns a descriptor of the first fault in reading order, or `undefined` for a conforming table. The faults are rows of differing lengths (`raggedRow`), blocks on a covered position (`coveredContent`), a span stated by a covered position (`coveredSpan`, which is how a second anchor starting inside another region shows up), an anchor reaching past the last column or row (`anchorOverrunsColumns`, `anchorOverrunsRows`), and an anchor reaching a position an earlier region already covers (`overlappingAnchors`). `describeTableGridFault` states a descriptor in one sentence for a writer that refuses or reports it, and every table writer in the family runs the check rather than deciding for itself what a covered position's blocks mean.
|
|
338
|
+
|
|
333
339
|
## The residue channel
|
|
334
340
|
|
|
335
341
|
[#22](https://github.com/ExaDev/document-schema.js/issues/22)'s second channel, landed by [#718](https://github.com/ExaDev/documents.js/issues/718) (`src/source.ts`): a quarantined **`source: { format, xml }`** value for what has no cross-format meaning — a WordprocessingML proofing mark, a custom XML payload, a markdown raw-HTML block's remainder, a PDF XMP packet. `format` is a closed enum naming the producing format (one member per reader the workspace has today), so a consumer can tell residue it may restore from residue it must leave alone without reading the text; `xml` is that format's own serialisation, validated as opaque text and nothing more.
|
package/dist/codec.d.cts
CHANGED
package/dist/codec.d.ts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
//#region src/construct.d.ts
|
|
3
3
|
declare const ContentControlTypeSchema: z.ZodEnum<{
|
|
4
|
-
date: "date";
|
|
5
4
|
richText: "richText";
|
|
6
5
|
plainText: "plainText";
|
|
7
6
|
checkbox: "checkbox";
|
|
8
7
|
dropDown: "dropDown";
|
|
9
8
|
comboBox: "comboBox";
|
|
9
|
+
date: "date";
|
|
10
10
|
picture: "picture";
|
|
11
11
|
repeatingSection: "repeatingSection";
|
|
12
12
|
button: "button";
|
|
@@ -23,12 +23,12 @@ type ContentControlLock = z.infer<typeof ContentControlLockSchema>;
|
|
|
23
23
|
declare const ContentControlDescriptorSchema: z.ZodObject<{
|
|
24
24
|
kind: z.ZodLiteral<"contentControl">;
|
|
25
25
|
controlType: z.ZodEnum<{
|
|
26
|
-
date: "date";
|
|
27
26
|
richText: "richText";
|
|
28
27
|
plainText: "plainText";
|
|
29
28
|
checkbox: "checkbox";
|
|
30
29
|
dropDown: "dropDown";
|
|
31
30
|
comboBox: "comboBox";
|
|
31
|
+
date: "date";
|
|
32
32
|
picture: "picture";
|
|
33
33
|
repeatingSection: "repeatingSection";
|
|
34
34
|
button: "button";
|
|
@@ -94,19 +94,19 @@ declare const FieldDescriptorSchema: z.ZodObject<{
|
|
|
94
94
|
}, z.core.$strict>;
|
|
95
95
|
type FieldDescriptor = z.infer<typeof FieldDescriptorSchema>;
|
|
96
96
|
declare const AnchorTypeSchema: z.ZodEnum<{
|
|
97
|
-
comment: "comment";
|
|
98
97
|
bookmark: "bookmark";
|
|
99
98
|
footnote: "footnote";
|
|
100
99
|
endnote: "endnote";
|
|
100
|
+
comment: "comment";
|
|
101
101
|
}>;
|
|
102
102
|
type AnchorType = z.infer<typeof AnchorTypeSchema>;
|
|
103
103
|
declare const AnchorDescriptorSchema: z.ZodObject<{
|
|
104
104
|
kind: z.ZodLiteral<"anchor">;
|
|
105
105
|
anchorType: z.ZodEnum<{
|
|
106
|
-
comment: "comment";
|
|
107
106
|
bookmark: "bookmark";
|
|
108
107
|
footnote: "footnote";
|
|
109
108
|
endnote: "endnote";
|
|
109
|
+
comment: "comment";
|
|
110
110
|
}>;
|
|
111
111
|
name: z.ZodString;
|
|
112
112
|
definition: z.ZodOptional<z.ZodString>;
|
|
@@ -252,12 +252,12 @@ type DivisionDescriptor = z.infer<typeof DivisionDescriptorSchema>;
|
|
|
252
252
|
declare const ConstructDescriptorSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
253
253
|
kind: z.ZodLiteral<"contentControl">;
|
|
254
254
|
controlType: z.ZodEnum<{
|
|
255
|
-
date: "date";
|
|
256
255
|
richText: "richText";
|
|
257
256
|
plainText: "plainText";
|
|
258
257
|
checkbox: "checkbox";
|
|
259
258
|
dropDown: "dropDown";
|
|
260
259
|
comboBox: "comboBox";
|
|
260
|
+
date: "date";
|
|
261
261
|
picture: "picture";
|
|
262
262
|
repeatingSection: "repeatingSection";
|
|
263
263
|
button: "button";
|
|
@@ -321,10 +321,10 @@ declare const ConstructDescriptorSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
321
321
|
}, z.core.$strict>, z.ZodObject<{
|
|
322
322
|
kind: z.ZodLiteral<"anchor">;
|
|
323
323
|
anchorType: z.ZodEnum<{
|
|
324
|
-
comment: "comment";
|
|
325
324
|
bookmark: "bookmark";
|
|
326
325
|
footnote: "footnote";
|
|
327
326
|
endnote: "endnote";
|
|
327
|
+
comment: "comment";
|
|
328
328
|
}>;
|
|
329
329
|
name: z.ZodString;
|
|
330
330
|
definition: z.ZodOptional<z.ZodString>;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
//#region src/construct.d.ts
|
|
3
3
|
declare const ContentControlTypeSchema: z.ZodEnum<{
|
|
4
|
-
date: "date";
|
|
5
4
|
richText: "richText";
|
|
6
5
|
plainText: "plainText";
|
|
7
6
|
checkbox: "checkbox";
|
|
8
7
|
dropDown: "dropDown";
|
|
9
8
|
comboBox: "comboBox";
|
|
9
|
+
date: "date";
|
|
10
10
|
picture: "picture";
|
|
11
11
|
repeatingSection: "repeatingSection";
|
|
12
12
|
button: "button";
|
|
@@ -23,12 +23,12 @@ type ContentControlLock = z.infer<typeof ContentControlLockSchema>;
|
|
|
23
23
|
declare const ContentControlDescriptorSchema: z.ZodObject<{
|
|
24
24
|
kind: z.ZodLiteral<"contentControl">;
|
|
25
25
|
controlType: z.ZodEnum<{
|
|
26
|
-
date: "date";
|
|
27
26
|
richText: "richText";
|
|
28
27
|
plainText: "plainText";
|
|
29
28
|
checkbox: "checkbox";
|
|
30
29
|
dropDown: "dropDown";
|
|
31
30
|
comboBox: "comboBox";
|
|
31
|
+
date: "date";
|
|
32
32
|
picture: "picture";
|
|
33
33
|
repeatingSection: "repeatingSection";
|
|
34
34
|
button: "button";
|
|
@@ -94,19 +94,19 @@ declare const FieldDescriptorSchema: z.ZodObject<{
|
|
|
94
94
|
}, z.core.$strict>;
|
|
95
95
|
type FieldDescriptor = z.infer<typeof FieldDescriptorSchema>;
|
|
96
96
|
declare const AnchorTypeSchema: z.ZodEnum<{
|
|
97
|
-
comment: "comment";
|
|
98
97
|
bookmark: "bookmark";
|
|
99
98
|
footnote: "footnote";
|
|
100
99
|
endnote: "endnote";
|
|
100
|
+
comment: "comment";
|
|
101
101
|
}>;
|
|
102
102
|
type AnchorType = z.infer<typeof AnchorTypeSchema>;
|
|
103
103
|
declare const AnchorDescriptorSchema: z.ZodObject<{
|
|
104
104
|
kind: z.ZodLiteral<"anchor">;
|
|
105
105
|
anchorType: z.ZodEnum<{
|
|
106
|
-
comment: "comment";
|
|
107
106
|
bookmark: "bookmark";
|
|
108
107
|
footnote: "footnote";
|
|
109
108
|
endnote: "endnote";
|
|
109
|
+
comment: "comment";
|
|
110
110
|
}>;
|
|
111
111
|
name: z.ZodString;
|
|
112
112
|
definition: z.ZodOptional<z.ZodString>;
|
|
@@ -252,12 +252,12 @@ type DivisionDescriptor = z.infer<typeof DivisionDescriptorSchema>;
|
|
|
252
252
|
declare const ConstructDescriptorSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
253
253
|
kind: z.ZodLiteral<"contentControl">;
|
|
254
254
|
controlType: z.ZodEnum<{
|
|
255
|
-
date: "date";
|
|
256
255
|
richText: "richText";
|
|
257
256
|
plainText: "plainText";
|
|
258
257
|
checkbox: "checkbox";
|
|
259
258
|
dropDown: "dropDown";
|
|
260
259
|
comboBox: "comboBox";
|
|
260
|
+
date: "date";
|
|
261
261
|
picture: "picture";
|
|
262
262
|
repeatingSection: "repeatingSection";
|
|
263
263
|
button: "button";
|
|
@@ -321,10 +321,10 @@ declare const ConstructDescriptorSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
321
321
|
}, z.core.$strict>, z.ZodObject<{
|
|
322
322
|
kind: z.ZodLiteral<"anchor">;
|
|
323
323
|
anchorType: z.ZodEnum<{
|
|
324
|
-
comment: "comment";
|
|
325
324
|
bookmark: "bookmark";
|
|
326
325
|
footnote: "footnote";
|
|
327
326
|
endnote: "endnote";
|
|
327
|
+
comment: "comment";
|
|
328
328
|
}>;
|
|
329
329
|
name: z.ZodString;
|
|
330
330
|
definition: z.ZodOptional<z.ZodString>;
|
package/dist/construct.d.cts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
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-
|
|
1
|
+
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.cjs";
|
|
2
2
|
export { AnchorDescriptor, AnchorDescriptorSchema, AnchorType, AnchorTypeSchema, ConstructDescriptor, ConstructDescriptorSchema, ContentControlDescriptor, ContentControlDescriptorSchema, ContentControlLock, ContentControlLockSchema, ContentControlType, ContentControlTypeSchema, DivisionDescriptor, DivisionDescriptorSchema, DivisionSource, DivisionSourceSchema, FieldDescriptor, FieldDescriptorSchema, LinkDescriptor, LinkDescriptorSchema, LinkTarget, LinkTargetSchema, ProvenanceChange, ProvenanceChangeSchema, ProvenanceDescriptor, ProvenanceDescriptorSchema };
|
package/dist/construct.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
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-
|
|
1
|
+
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";
|
|
2
2
|
export { AnchorDescriptor, AnchorDescriptorSchema, AnchorType, AnchorTypeSchema, ConstructDescriptor, ConstructDescriptorSchema, ContentControlDescriptor, ContentControlDescriptorSchema, ContentControlLock, ContentControlLockSchema, ContentControlType, ContentControlTypeSchema, DivisionDescriptor, DivisionDescriptorSchema, DivisionSource, DivisionSourceSchema, FieldDescriptor, FieldDescriptorSchema, LinkDescriptor, LinkDescriptorSchema, LinkTarget, LinkTargetSchema, ProvenanceChange, ProvenanceChangeSchema, ProvenanceDescriptor, ProvenanceDescriptorSchema };
|