sdoc-editor-cli 0.10.1 → 0.12.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/sdoc.js
CHANGED
|
@@ -253,7 +253,7 @@ var COMMAND_NAMES = [
|
|
|
253
253
|
"create"
|
|
254
254
|
];
|
|
255
255
|
var READ_PROJECTIONS = ["catalog", "target", "section", "document"];
|
|
256
|
-
var READ_CATALOG_KINDS = ["blocks", "outline", "references", "referenceables"];
|
|
256
|
+
var READ_CATALOG_KINDS = ["blocks", "outline", "references", "referenceables", "endnotes"];
|
|
257
257
|
var ArgumentError = class extends Error {
|
|
258
258
|
code;
|
|
259
259
|
constructor(code, message) {
|
|
@@ -1067,7 +1067,7 @@ function migrateAttributes(node) {
|
|
|
1067
1067
|
|
|
1068
1068
|
// ../shared/document/generated/documentValidators.js
|
|
1069
1069
|
var validateEnvelope = validate10;
|
|
1070
|
-
var schema11 = { "$schema": "http://json-schema.org/draft-07/schema#", "$id": "https://sdoc.dev/schema/v1.0.json", "title": "Structured Document (.sdoc / .tiptap.json)", "description": "Schema for .sdoc and .tiptap.json files \u2014 a structured document format based on a tree of typed nodes with optional marks and attributes.", "type": "object", "required": ["sdoc", "doc"], "properties": { "sdoc": { "type": "string", "description": "Schema version of this .sdoc/.tiptap.json file.", "enum": ["1.0"] }, "meta": { "$ref": "#/definitions/metadata" }, "doc": { "$ref": "#/definitions/docNode" } }, "additionalProperties": false, "definitions": { "metadata": { "type": "object", "description": "Document metadata for management and traceability.", "properties": { "title": { "type": "string", "description": "Document title." }, "author": { "type": "string", "description": "Author name or identifier." }, "version": { "type": "string", "description": "Document version string (e.g. '1.0', '2.3')." }, "created": { "type": "string", "format": "date-time", "description": "ISO 8601 creation timestamp." }, "modified": { "type": "string", "format": "date-time", "description": "ISO 8601 last-modified timestamp." }, "settings": { "$ref": "#/definitions/documentSettings" }, "template": { "$ref": "#/definitions/templateMetadata" } }, "additionalProperties": true }, "templateMetadata": { "type": "object", "description": "Reusable template catalog metadata. Personal templates additionally require a user:<uuid> id at the catalog boundary.", "properties": { "id": { "type": "string", "maxLength": 128 }, "name": { "type": "string", "maxLength": 200 }, "description": { "type": "string", "maxLength": 2e3 }, "category": { "type": "string", "maxLength": 100 }, "titleNodeId": { "type": "string", "maxLength": 200 } }, "additionalProperties": true }, "documentSettings": { "type": "object", "description": "Per-document settings that override workspace defaults.", "properties": { "headingNumbering": { "type": "boolean", "description": "Enable automatic heading numbering." }, "headingStartNumber": { "type": "integer", "minimum": 0, "description": "Starting number for automatic H1 heading numbering." }, "headingDecoration": { "type": "boolean", "description": "Enable heading border-bottom decoration." }, "headingH1Color": { "type": "string", "pattern": "^#[0-9a-fA-F]{3,8}$", "description": "H1 heading number color." }, "headingH2Color": { "type": "string", "pattern": "^#[0-9a-fA-F]{3,8}$", "description": "H2 heading number color." }, "headingH3Color": { "type": "string", "pattern": "^#[0-9a-fA-F]{3,8}$", "description": "H3 heading number color." }, "headingH4Color": { "type": "string", "pattern": "^#[0-9a-fA-F]{3,8}$", "description": "H4 heading number color." }, "headingH5Color": { "type": "string", "pattern": "^#[0-9a-fA-F]{3,8}$", "description": "H5 heading number color." }, "headingH6Color": { "type": "string", "pattern": "^#[0-9a-fA-F]{3,8}$", "description": "H6 heading number color." }, "captionStyle": { "type": "string", "enum": ["ieee", "iso", "modern", "korean"], "description": "Caption formatting preset." }, "captionNumbering": { "type": "string", "enum": ["sequential", "hierarchical"], "description": "Caption numbering mode." }, "equationNumbering": { "type": "string", "enum": ["sequential", "hierarchical"], "description": "Equation numbering mode." }, "crossRefIncludeCaption": { "type": "boolean", "description": "Include caption text in generated cross-reference labels." }, "slideCssPath": { "type": "string" }, "htmlCssPath": { "type": "string" }, "pdfScale": { "type": "number", "minimum": 10, "maximum": 200 }, "selfContained": { "type": "string", "enum": ["none", "images-only", "full"] }, "slideBreakLevel": { "type": "string", "enum": ["h1-only", "h1-h2-vertical"] }, "slideTransition": { "type": "string", "enum": ["none", "fade", "slide", "convex", "concave", "zoom"] }, "showTitleSlide": { "type": "boolean" }, "outputDir": { "type": "string" } }, "additionalProperties": false }, "docNode": { "type": "object", "required": ["type"], "properties": { "type": { "const": "doc" }, "content": { "type": "array", "items": { "$ref": "#/definitions/blockNode" } } }, "additionalProperties": false }, "blockNode": { "oneOf": [{ "$ref": "#/definitions/headingNode" }, { "$ref": "#/definitions/paragraphNode" }, { "$ref": "#/definitions/bulletListNode" }, { "$ref": "#/definitions/orderedListNode" }, { "$ref": "#/definitions/taskListNode" }, { "$ref": "#/definitions/codeBlockNode" }, { "$ref": "#/definitions/tableNode" }, { "$ref": "#/definitions/imageNode" }, { "$ref": "#/definitions/mathBlockNode" }, { "$ref": "#/definitions/diagramNode" }, { "$ref": "#/definitions/blockquoteNode" }, { "$ref": "#/definitions/calloutNode" }, { "$ref": "#/definitions/horizontalRuleNode" }, { "$ref": "#/definitions/hardBreakNode" }] }, "inlineNode": { "oneOf": [{ "$ref": "#/definitions/textNode" }, { "$ref": "#/definitions/mathInlineNode" }, { "$ref": "#/definitions/hardBreakNode" }] }, "headingNode": { "type": "object", "required": ["type", "attrs"], "properties": { "type": { "const": "heading" }, "attrs": { "type": "object", "required": ["level"], "properties": { "level": { "type": "integer", "minimum": 1, "maximum": 6 }, "id": { "type": ["string", "null"], "description": "Anchor id for cross-references." }, "textAlign": { "type": ["string", "null"], "enum": ["left", "center", "right", "justify", null] }, "numbered": { "type": ["boolean", "null"], "description": "false\uBA74 \uC790\uB3D9 \uBC88\uD638 \uB9E4\uAE40\uC5D0\uC11C \uC81C\uC678 (\uC608: Introduction, Glossary, References). \uC0DD\uB7B5 \uB610\uB294 null\uC774\uBA74 \uBC88\uD638 \uB9E4\uAE40 \uB300\uC0C1." } }, "additionalProperties": false }, "content": { "type": "array", "items": { "$ref": "#/definitions/inlineNode" } } }, "additionalProperties": false }, "paragraphNode": { "type": "object", "required": ["type"], "properties": { "type": { "const": "paragraph" }, "attrs": { "type": "object", "properties": { "textAlign": { "type": ["string", "null"], "enum": ["left", "center", "right", "justify", null] } }, "additionalProperties": false }, "content": { "type": "array", "items": { "$ref": "#/definitions/inlineNode" } } }, "additionalProperties": false }, "bulletListNode": { "type": "object", "required": ["type"], "properties": { "type": { "const": "bulletList" }, "content": { "type": "array", "items": { "$ref": "#/definitions/listItemNode" } } }, "additionalProperties": false }, "orderedListNode": { "type": "object", "required": ["type"], "properties": { "type": { "const": "orderedList" }, "attrs": { "type": "object", "properties": { "start": { "type": ["integer", "null"], "default": 1 }, "type": { "type": ["string", "null"] } }, "additionalProperties": false }, "content": { "type": "array", "items": { "$ref": "#/definitions/listItemNode" } } }, "additionalProperties": false }, "listItemNode": { "type": "object", "required": ["type"], "properties": { "type": { "const": "listItem" }, "content": { "type": "array", "items": { "$ref": "#/definitions/blockNode" } } }, "additionalProperties": false }, "taskListNode": { "type": "object", "required": ["type"], "properties": { "type": { "const": "taskList" }, "content": { "type": "array", "items": { "$ref": "#/definitions/taskItemNode" } } }, "additionalProperties": false }, "taskItemNode": { "type": "object", "required": ["type"], "properties": { "type": { "const": "taskItem" }, "attrs": { "type": "object", "properties": { "checked": { "type": "boolean" } } }, "content": { "type": "array", "items": { "$ref": "#/definitions/blockNode" } } }, "additionalProperties": false }, "codeBlockNode": { "type": "object", "required": ["type"], "properties": { "type": { "const": "codeBlock" }, "attrs": { "type": "object", "properties": { "language": { "type": ["string", "null"] } }, "additionalProperties": false }, "content": { "type": "array", "items": { "$ref": "#/definitions/textNode" } } }, "additionalProperties": false }, "tableNode": { "type": "object", "required": ["type"], "properties": { "type": { "const": "table" }, "attrs": { "type": "object", "properties": { "caption": { "type": ["string", "null"], "description": "Table caption text." }, "align": { "type": "string", "enum": ["left", "center", "right"], "default": "left" }, "width": { "type": "string", "description": "CSS width value (e.g., '100%', '50%', 'auto').", "default": "auto" }, "id": { "type": ["string", "null"], "description": "Anchor id for cross-references." } }, "additionalProperties": false }, "content": { "type": "array", "items": { "$ref": "#/definitions/tableRowNode" } } }, "additionalProperties": false }, "tableRowNode": { "type": "object", "required": ["type"], "properties": { "type": { "const": "tableRow" }, "content": { "type": "array", "items": { "oneOf": [{ "$ref": "#/definitions/tableCellNode" }, { "$ref": "#/definitions/tableHeaderNode" }] } } }, "additionalProperties": false }, "tableCellNode": { "type": "object", "required": ["type"], "properties": { "type": { "const": "tableCell" }, "attrs": { "type": "object", "properties": { "colspan": { "type": "integer", "minimum": 1, "default": 1 }, "rowspan": { "type": "integer", "minimum": 1, "default": 1 }, "colwidth": { "type": ["array", "null"], "items": { "type": "integer" } }, "align": { "type": ["string", "null"], "enum": ["left", "center", "right", null] } }, "additionalProperties": false }, "content": { "type": "array", "items": { "$ref": "#/definitions/blockNode" } } }, "additionalProperties": false }, "tableHeaderNode": { "type": "object", "required": ["type"], "properties": { "type": { "const": "tableHeader" }, "attrs": { "type": "object", "properties": { "colspan": { "type": "integer", "minimum": 1, "default": 1 }, "rowspan": { "type": "integer", "minimum": 1, "default": 1 }, "colwidth": { "type": ["array", "null"], "items": { "type": "integer" } }, "align": { "type": ["string", "null"], "enum": ["left", "center", "right", null] } }, "additionalProperties": false }, "content": { "type": "array", "items": { "$ref": "#/definitions/blockNode" } } }, "additionalProperties": false }, "imageNode": { "type": "object", "required": ["type"], "properties": { "type": { "const": "image" }, "attrs": { "type": "object", "properties": { "src": { "type": "string", "description": "Relative path to the image file (e.g., './images/photo.png')." }, "alt": { "type": ["string", "null"], "description": "Alternative text for accessibility." }, "title": { "type": ["string", "null"], "description": "Image title (tooltip)." }, "caption": { "type": ["string", "null"], "description": "Image caption text." }, "align": { "type": "string", "enum": ["left", "center", "right"], "default": "center" }, "width": { "type": ["string", "number", "null"] }, "height": { "type": ["string", "number", "null"] }, "id": { "type": ["string", "null"], "description": "Anchor id for cross-references." } }, "additionalProperties": false } }, "additionalProperties": false }, "mathBlockNode": { "type": "object", "required": ["type"], "properties": { "type": { "const": "mathBlock" }, "attrs": { "type": "object", "required": ["latex"], "properties": { "latex": { "type": "string", "description": "LaTeX math expression." }, "id": { "type": ["string", "null"], "description": "Anchor id for cross-references." } }, "additionalProperties": false } }, "additionalProperties": false }, "mathInlineNode": { "type": "object", "required": ["type"], "properties": { "type": { "const": "mathInline" }, "attrs": { "type": "object", "required": ["latex"], "properties": { "latex": { "type": "string", "description": "LaTeX math expression." } }, "additionalProperties": false } }, "additionalProperties": false }, "diagramNode": { "type": "object", "required": ["type"], "properties": { "type": { "const": "diagram" }, "attrs": { "type": "object", "required": ["language", "code"], "properties": { "language": { "type": "string", "description": "Diagram language, e.g. mermaid, plantuml, d2." }, "code": { "type": "string", "description": "Diagram source code." } }, "additionalProperties": false } }, "additionalProperties": false }, "hardBreakNode": { "type": "object", "required": ["type"], "properties": { "type": { "const": "hardBreak" } }, "additionalProperties": false }, "horizontalRuleNode": { "type": "object", "required": ["type"], "properties": { "type": { "const": "horizontalRule" }, "attrs": { "type": "object", "properties": { "id": { "type": ["string", "null"], "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" } }, "additionalProperties": false } }, "additionalProperties": false }, "blockquoteNode": { "type": "object", "required": ["type"], "properties": { "type": { "const": "blockquote" }, "content": { "type": "array", "items": { "$ref": "#/definitions/blockNode" } } }, "additionalProperties": false }, "calloutNode": { "type": "object", "required": ["type"], "properties": { "type": { "const": "callout" }, "attrs": { "type": "object", "properties": { "variant": { "type": "string", "enum": ["note", "info", "tip", "warning", "danger"], "description": "Visual style of the callout block." } }, "additionalProperties": false }, "content": { "type": "array", "items": { "$ref": "#/definitions/blockNode" } } }, "additionalProperties": false }, "textNode": { "type": "object", "required": ["type"], "properties": { "type": { "const": "text" }, "text": { "type": "string" }, "marks": { "type": "array", "items": { "$ref": "#/definitions/mark" } } }, "additionalProperties": false }, "mark": { "type": "object", "required": ["type"], "properties": { "type": { "type": "string", "enum": ["bold", "italic", "underline", "strike", "code", "link", "textStyle", "highlight", "subscript", "superscript"] }, "attrs": { "type": "object", "description": "Mark-specific attributes (e.g., href for link).", "properties": { "href": { "type": ["string", "null"] }, "target": { "type": ["string", "null"] }, "rel": { "type": ["string", "null"] }, "class": { "type": ["string", "null"] }, "title": { "type": ["string", "null"] }, "color": { "type": "string" } }, "additionalProperties": false } }, "additionalProperties": false }, "anyNode": { "type": "object", "description": "A generic Tiptap JSON node for contracts that carry node fragments. Persisted documents continue to use the more specific node definitions above.", "required": ["type"], "properties": { "type": { "type": "string", "minLength": 1 }, "attrs": { "type": "object" }, "content": { "type": "array", "items": { "$ref": "#/definitions/anyNode" } }, "marks": { "type": "array", "items": { "type": "object", "required": ["type"], "properties": { "type": { "type": "string", "minLength": 1 }, "attrs": { "type": "object" } }, "additionalProperties": true } }, "text": { "type": "string" } }, "additionalProperties": true } } };
|
|
1070
|
+
var schema11 = { "$schema": "http://json-schema.org/draft-07/schema#", "$id": "https://sdoc.dev/schema/v1.0.json", "title": "Structured Document (.sdoc / .tiptap.json)", "description": "Schema for .sdoc and .tiptap.json files \u2014 a structured document format based on a tree of typed nodes with optional marks and attributes.", "type": "object", "required": ["sdoc", "doc"], "properties": { "sdoc": { "type": "string", "description": "Schema version of this .sdoc/.tiptap.json file.", "enum": ["1.0"] }, "meta": { "$ref": "#/definitions/metadata" }, "doc": { "$ref": "#/definitions/docNode" } }, "additionalProperties": false, "definitions": { "metadata": { "type": "object", "description": "Document metadata for management and traceability.", "properties": { "title": { "type": "string", "description": "Document title." }, "author": { "type": "string", "description": "Author name or identifier." }, "version": { "type": "string", "description": "Document version string (e.g. '1.0', '2.3')." }, "created": { "type": "string", "format": "date-time", "description": "ISO 8601 creation timestamp." }, "modified": { "type": "string", "format": "date-time", "description": "ISO 8601 last-modified timestamp." }, "settings": { "$ref": "#/definitions/documentSettings" }, "template": { "$ref": "#/definitions/templateMetadata" } }, "additionalProperties": true }, "templateMetadata": { "type": "object", "description": "Reusable template catalog metadata. Personal templates additionally require a user:<uuid> id at the catalog boundary.", "properties": { "id": { "type": "string", "maxLength": 128 }, "name": { "type": "string", "maxLength": 200 }, "description": { "type": "string", "maxLength": 2e3 }, "category": { "type": "string", "maxLength": 100 }, "titleNodeId": { "type": "string", "maxLength": 200 } }, "additionalProperties": true }, "documentSettings": { "type": "object", "description": "Per-document settings that override workspace defaults.", "properties": { "headingNumbering": { "type": "boolean", "description": "Enable automatic heading numbering." }, "headingStartNumber": { "type": "integer", "minimum": 0, "description": "Starting number for automatic H1 heading numbering." }, "headingDecoration": { "type": "boolean", "description": "Enable heading border-bottom decoration." }, "headingH1Color": { "type": "string", "pattern": "^#[0-9a-fA-F]{3,8}$", "description": "H1 heading number color." }, "headingH2Color": { "type": "string", "pattern": "^#[0-9a-fA-F]{3,8}$", "description": "H2 heading number color." }, "headingH3Color": { "type": "string", "pattern": "^#[0-9a-fA-F]{3,8}$", "description": "H3 heading number color." }, "headingH4Color": { "type": "string", "pattern": "^#[0-9a-fA-F]{3,8}$", "description": "H4 heading number color." }, "headingH5Color": { "type": "string", "pattern": "^#[0-9a-fA-F]{3,8}$", "description": "H5 heading number color." }, "headingH6Color": { "type": "string", "pattern": "^#[0-9a-fA-F]{3,8}$", "description": "H6 heading number color." }, "captionStyle": { "type": "string", "enum": ["ieee", "iso", "modern", "korean"], "description": "Caption formatting preset." }, "captionNumbering": { "type": "string", "enum": ["sequential", "hierarchical"], "description": "Caption numbering mode." }, "equationNumbering": { "type": "string", "enum": ["sequential", "hierarchical"], "description": "Equation numbering mode." }, "crossRefIncludeCaption": { "type": "boolean", "description": "Include caption text in generated cross-reference labels." }, "slideCssPath": { "type": "string" }, "htmlCssPath": { "type": "string" }, "pdfScale": { "type": "number", "minimum": 10, "maximum": 200 }, "selfContained": { "type": "string", "enum": ["none", "images-only", "full"] }, "slideBreakLevel": { "type": "string", "enum": ["h1-only", "h1-h2-vertical"] }, "slideTransition": { "type": "string", "enum": ["none", "fade", "slide", "convex", "concave", "zoom"] }, "showTitleSlide": { "type": "boolean" }, "outputDir": { "type": "string" } }, "additionalProperties": false }, "legacyReferenceId": { "type": ["string", "null"], "description": "Backward-compatible cross-reference anchor. Existing .sdoc 1.0 documents allowed any string; newly authored IDs should follow stableId." }, "stableId": { "type": "string", "minLength": 1, "maxLength": 128, "not": { "pattern": "^provisional:" }, "description": "Optional stable block identity. Omit attrs.id when absent; when present, authored values are non-empty strings of at most 128 Unicode code points and cannot use the reserved provisional: namespace." }, "historicalHorizontalRuleId": { "type": ["string", "null"], "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$", "description": "Historical horizontal-rule ID shape retained for .sdoc 1.0 compatibility; it is collision-reserved but is not an operation identity or cross-reference anchor." }, "docNode": { "type": "object", "required": ["type"], "properties": { "type": { "const": "doc" }, "content": { "type": "array", "items": { "$ref": "#/definitions/blockNode" } } }, "additionalProperties": false }, "blockNode": { "oneOf": [{ "$ref": "#/definitions/headingNode" }, { "$ref": "#/definitions/paragraphNode" }, { "$ref": "#/definitions/bulletListNode" }, { "$ref": "#/definitions/orderedListNode" }, { "$ref": "#/definitions/taskListNode" }, { "$ref": "#/definitions/codeBlockNode" }, { "$ref": "#/definitions/tableNode" }, { "$ref": "#/definitions/imageNode" }, { "$ref": "#/definitions/mathBlockNode" }, { "$ref": "#/definitions/diagramNode" }, { "$ref": "#/definitions/blockquoteNode" }, { "$ref": "#/definitions/calloutNode" }, { "$ref": "#/definitions/horizontalRuleNode" }, { "$ref": "#/definitions/hardBreakNode" }] }, "inlineNode": { "oneOf": [{ "$ref": "#/definitions/textNode" }, { "$ref": "#/definitions/mathInlineNode" }, { "$ref": "#/definitions/endnoteNode" }, { "$ref": "#/definitions/hardBreakNode" }] }, "headingNode": { "type": "object", "required": ["type", "attrs"], "properties": { "type": { "const": "heading" }, "attrs": { "type": "object", "required": ["level"], "properties": { "level": { "type": "integer", "minimum": 1, "maximum": 6 }, "id": { "$ref": "#/definitions/legacyReferenceId" }, "textAlign": { "type": ["string", "null"], "enum": ["left", "center", "right", "justify", null] }, "numbered": { "type": ["boolean", "null"], "description": "false\uBA74 \uC790\uB3D9 \uBC88\uD638 \uB9E4\uAE40\uC5D0\uC11C \uC81C\uC678 (\uC608: Introduction, Glossary, References). \uC0DD\uB7B5 \uB610\uB294 null\uC774\uBA74 \uBC88\uD638 \uB9E4\uAE40 \uB300\uC0C1." } }, "additionalProperties": false }, "content": { "type": "array", "items": { "$ref": "#/definitions/inlineNode" } } }, "additionalProperties": false }, "paragraphNode": { "type": "object", "required": ["type"], "properties": { "type": { "const": "paragraph" }, "attrs": { "type": "object", "properties": { "textAlign": { "type": ["string", "null"], "enum": ["left", "center", "right", "justify", null] }, "id": { "$ref": "#/definitions/stableId" } }, "additionalProperties": false }, "content": { "type": "array", "items": { "$ref": "#/definitions/inlineNode" } } }, "additionalProperties": false }, "bulletListNode": { "type": "object", "required": ["type"], "properties": { "type": { "const": "bulletList" }, "attrs": { "type": "object", "properties": { "id": { "$ref": "#/definitions/stableId" } }, "additionalProperties": false }, "content": { "type": "array", "items": { "$ref": "#/definitions/listItemNode" } } }, "additionalProperties": false }, "orderedListNode": { "type": "object", "required": ["type"], "properties": { "type": { "const": "orderedList" }, "attrs": { "type": "object", "properties": { "start": { "type": ["integer", "null"], "default": 1 }, "type": { "type": ["string", "null"] }, "id": { "$ref": "#/definitions/stableId" } }, "additionalProperties": false }, "content": { "type": "array", "items": { "$ref": "#/definitions/listItemNode" } } }, "additionalProperties": false }, "listItemNode": { "type": "object", "required": ["type"], "properties": { "type": { "const": "listItem" }, "attrs": { "type": "object", "properties": { "id": { "$ref": "#/definitions/stableId" } }, "additionalProperties": false }, "content": { "type": "array", "items": { "$ref": "#/definitions/blockNode" } } }, "additionalProperties": false }, "taskListNode": { "type": "object", "required": ["type"], "properties": { "type": { "const": "taskList" }, "attrs": { "type": "object", "properties": { "id": { "$ref": "#/definitions/stableId" } }, "additionalProperties": false }, "content": { "type": "array", "items": { "$ref": "#/definitions/taskItemNode" } } }, "additionalProperties": false }, "taskItemNode": { "type": "object", "required": ["type"], "properties": { "type": { "const": "taskItem" }, "attrs": { "type": "object", "properties": { "checked": { "type": "boolean" } } }, "content": { "type": "array", "items": { "$ref": "#/definitions/blockNode" } } }, "additionalProperties": false }, "codeBlockNode": { "type": "object", "required": ["type"], "properties": { "type": { "const": "codeBlock" }, "attrs": { "type": "object", "properties": { "language": { "type": ["string", "null"] }, "id": { "$ref": "#/definitions/stableId" } }, "additionalProperties": false }, "content": { "type": "array", "items": { "$ref": "#/definitions/textNode" } } }, "additionalProperties": false }, "tableNode": { "type": "object", "required": ["type"], "properties": { "type": { "const": "table" }, "attrs": { "type": "object", "properties": { "caption": { "type": ["string", "null"], "description": "Table caption text." }, "align": { "type": "string", "enum": ["left", "center", "right"], "default": "left" }, "width": { "type": "string", "description": "CSS width value (e.g., '100%', '50%', 'auto').", "default": "auto" }, "id": { "$ref": "#/definitions/legacyReferenceId" } }, "additionalProperties": false }, "content": { "type": "array", "items": { "$ref": "#/definitions/tableRowNode" } } }, "additionalProperties": false }, "tableRowNode": { "type": "object", "required": ["type"], "properties": { "type": { "const": "tableRow" }, "content": { "type": "array", "items": { "oneOf": [{ "$ref": "#/definitions/tableCellNode" }, { "$ref": "#/definitions/tableHeaderNode" }] } } }, "additionalProperties": false }, "tableCellNode": { "type": "object", "required": ["type"], "properties": { "type": { "const": "tableCell" }, "attrs": { "type": "object", "properties": { "colspan": { "type": "integer", "minimum": 1, "default": 1 }, "rowspan": { "type": "integer", "minimum": 1, "default": 1 }, "colwidth": { "type": ["array", "null"], "items": { "type": "integer" } }, "align": { "type": ["string", "null"], "enum": ["left", "center", "right", null] } }, "additionalProperties": false }, "content": { "type": "array", "items": { "$ref": "#/definitions/blockNode" } } }, "additionalProperties": false }, "tableHeaderNode": { "type": "object", "required": ["type"], "properties": { "type": { "const": "tableHeader" }, "attrs": { "type": "object", "properties": { "colspan": { "type": "integer", "minimum": 1, "default": 1 }, "rowspan": { "type": "integer", "minimum": 1, "default": 1 }, "colwidth": { "type": ["array", "null"], "items": { "type": "integer" } }, "align": { "type": ["string", "null"], "enum": ["left", "center", "right", null] } }, "additionalProperties": false }, "content": { "type": "array", "items": { "$ref": "#/definitions/blockNode" } } }, "additionalProperties": false }, "imageNode": { "type": "object", "required": ["type"], "properties": { "type": { "const": "image" }, "attrs": { "type": "object", "properties": { "src": { "type": "string", "description": "Relative path to the image file (e.g., './images/photo.png')." }, "alt": { "type": ["string", "null"], "description": "Alternative text for accessibility." }, "title": { "type": ["string", "null"], "description": "Image title (tooltip)." }, "caption": { "type": ["string", "null"], "description": "Image caption text." }, "align": { "type": "string", "enum": ["left", "center", "right"], "default": "center" }, "width": { "type": ["string", "number", "null"] }, "height": { "type": ["string", "number", "null"] }, "id": { "$ref": "#/definitions/legacyReferenceId" } }, "additionalProperties": false } }, "additionalProperties": false }, "mathBlockNode": { "type": "object", "required": ["type"], "properties": { "type": { "const": "mathBlock" }, "attrs": { "type": "object", "required": ["latex"], "properties": { "latex": { "type": "string", "description": "LaTeX math expression." }, "id": { "$ref": "#/definitions/legacyReferenceId" } }, "additionalProperties": false } }, "additionalProperties": false }, "mathInlineNode": { "type": "object", "required": ["type"], "properties": { "type": { "const": "mathInline" }, "attrs": { "type": "object", "required": ["latex"], "properties": { "latex": { "type": "string", "description": "LaTeX math expression." } }, "additionalProperties": false } }, "additionalProperties": false }, "endnoteNode": { "type": "object", "required": ["type", "attrs"], "properties": { "type": { "const": "endnote" }, "attrs": { "type": "object", "required": ["id", "body"], "properties": { "id": { "$ref": "#/definitions/stableId" }, "body": { "type": "string", "pattern": "^[^\\r\\n]*$", "description": "Single-line plain-text endnote body. The document-end list is derived from this canonical value." } }, "additionalProperties": false } }, "additionalProperties": false }, "diagramNode": { "type": "object", "required": ["type"], "properties": { "type": { "const": "diagram" }, "attrs": { "type": "object", "required": ["language", "code"], "properties": { "language": { "type": "string", "description": "Diagram language, e.g. mermaid, plantuml, d2." }, "code": { "type": "string", "description": "Diagram source code." }, "id": { "$ref": "#/definitions/stableId" } }, "additionalProperties": false } }, "additionalProperties": false }, "hardBreakNode": { "type": "object", "required": ["type"], "properties": { "type": { "const": "hardBreak" } }, "additionalProperties": false }, "horizontalRuleNode": { "type": "object", "required": ["type"], "properties": { "type": { "const": "horizontalRule" }, "attrs": { "type": "object", "properties": { "id": { "$ref": "#/definitions/historicalHorizontalRuleId" } }, "additionalProperties": false } }, "additionalProperties": false }, "blockquoteNode": { "type": "object", "required": ["type"], "properties": { "type": { "const": "blockquote" }, "attrs": { "type": "object", "properties": { "id": { "$ref": "#/definitions/stableId" } }, "additionalProperties": false }, "content": { "type": "array", "items": { "$ref": "#/definitions/blockNode" } } }, "additionalProperties": false }, "calloutNode": { "type": "object", "required": ["type"], "properties": { "type": { "const": "callout" }, "attrs": { "type": "object", "properties": { "variant": { "type": "string", "enum": ["note", "info", "tip", "warning", "danger"], "description": "Visual style of the callout block." }, "id": { "$ref": "#/definitions/stableId" } }, "additionalProperties": false }, "content": { "type": "array", "items": { "$ref": "#/definitions/blockNode" } } }, "additionalProperties": false }, "textNode": { "type": "object", "required": ["type"], "properties": { "type": { "const": "text" }, "text": { "type": "string" }, "marks": { "type": "array", "items": { "$ref": "#/definitions/mark" } } }, "additionalProperties": false }, "mark": { "type": "object", "required": ["type"], "properties": { "type": { "type": "string", "enum": ["bold", "italic", "underline", "strike", "code", "link", "textStyle", "highlight", "subscript", "superscript"] }, "attrs": { "type": "object", "description": "Mark-specific attributes (e.g., href for link).", "properties": { "href": { "type": ["string", "null"] }, "target": { "type": ["string", "null"] }, "rel": { "type": ["string", "null"] }, "class": { "type": ["string", "null"] }, "title": { "type": ["string", "null"] }, "color": { "type": "string" } }, "additionalProperties": false } }, "additionalProperties": false }, "anyNode": { "type": "object", "description": "A generic Tiptap JSON node for contracts that carry node fragments. Persisted documents continue to use the more specific node definitions above.", "required": ["type"], "properties": { "type": { "type": "string", "minLength": 1 }, "attrs": { "type": "object" }, "content": { "type": "array", "items": { "$ref": "#/definitions/anyNode" } }, "marks": { "type": "array", "items": { "type": "object", "required": ["type"], "properties": { "type": { "type": "string", "minLength": 1 }, "attrs": { "type": "object" } }, "additionalProperties": true } }, "text": { "type": "string" } }, "additionalProperties": true } } };
|
|
1071
1071
|
var schema13 = { "type": "object", "description": "Per-document settings that override workspace defaults.", "properties": { "headingNumbering": { "type": "boolean", "description": "Enable automatic heading numbering." }, "headingStartNumber": { "type": "integer", "minimum": 0, "description": "Starting number for automatic H1 heading numbering." }, "headingDecoration": { "type": "boolean", "description": "Enable heading border-bottom decoration." }, "headingH1Color": { "type": "string", "pattern": "^#[0-9a-fA-F]{3,8}$", "description": "H1 heading number color." }, "headingH2Color": { "type": "string", "pattern": "^#[0-9a-fA-F]{3,8}$", "description": "H2 heading number color." }, "headingH3Color": { "type": "string", "pattern": "^#[0-9a-fA-F]{3,8}$", "description": "H3 heading number color." }, "headingH4Color": { "type": "string", "pattern": "^#[0-9a-fA-F]{3,8}$", "description": "H4 heading number color." }, "headingH5Color": { "type": "string", "pattern": "^#[0-9a-fA-F]{3,8}$", "description": "H5 heading number color." }, "headingH6Color": { "type": "string", "pattern": "^#[0-9a-fA-F]{3,8}$", "description": "H6 heading number color." }, "captionStyle": { "type": "string", "enum": ["ieee", "iso", "modern", "korean"], "description": "Caption formatting preset." }, "captionNumbering": { "type": "string", "enum": ["sequential", "hierarchical"], "description": "Caption numbering mode." }, "equationNumbering": { "type": "string", "enum": ["sequential", "hierarchical"], "description": "Equation numbering mode." }, "crossRefIncludeCaption": { "type": "boolean", "description": "Include caption text in generated cross-reference labels." }, "slideCssPath": { "type": "string" }, "htmlCssPath": { "type": "string" }, "pdfScale": { "type": "number", "minimum": 10, "maximum": 200 }, "selfContained": { "type": "string", "enum": ["none", "images-only", "full"] }, "slideBreakLevel": { "type": "string", "enum": ["h1-only", "h1-h2-vertical"] }, "slideTransition": { "type": "string", "enum": ["none", "fade", "slide", "convex", "concave", "zoom"] }, "showTitleSlide": { "type": "boolean" }, "outputDir": { "type": "string" } }, "additionalProperties": false };
|
|
1072
1072
|
var formats0 = require_formats().fullFormats["date-time"];
|
|
1073
1073
|
var func2 = Object.prototype.hasOwnProperty;
|
|
@@ -1702,11 +1702,9 @@ function validate11(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
1702
1702
|
validate11.errors = vErrors;
|
|
1703
1703
|
return errors === 0;
|
|
1704
1704
|
}
|
|
1705
|
-
var
|
|
1706
|
-
var
|
|
1707
|
-
var
|
|
1708
|
-
var schema17 = { "type": "object", "required": ["type", "attrs"], "properties": { "type": { "const": "heading" }, "attrs": { "type": "object", "required": ["level"], "properties": { "level": { "type": "integer", "minimum": 1, "maximum": 6 }, "id": { "type": ["string", "null"], "description": "Anchor id for cross-references." }, "textAlign": { "type": ["string", "null"], "enum": ["left", "center", "right", "justify", null] }, "numbered": { "type": ["boolean", "null"], "description": "false\uBA74 \uC790\uB3D9 \uBC88\uD638 \uB9E4\uAE40\uC5D0\uC11C \uC81C\uC678 (\uC608: Introduction, Glossary, References). \uC0DD\uB7B5 \uB610\uB294 null\uC774\uBA74 \uBC88\uD638 \uB9E4\uAE40 \uB300\uC0C1." } }, "additionalProperties": false }, "content": { "type": "array", "items": { "$ref": "#/definitions/inlineNode" } } }, "additionalProperties": false };
|
|
1709
|
-
var schema20 = { "type": "object", "required": ["type"], "properties": { "type": { "type": "string", "enum": ["bold", "italic", "underline", "strike", "code", "link", "textStyle", "highlight", "subscript", "superscript"] }, "attrs": { "type": "object", "description": "Mark-specific attributes (e.g., href for link).", "properties": { "href": { "type": ["string", "null"] }, "target": { "type": ["string", "null"] }, "rel": { "type": ["string", "null"] }, "class": { "type": ["string", "null"] }, "title": { "type": ["string", "null"] }, "color": { "type": "string" } }, "additionalProperties": false } }, "additionalProperties": false };
|
|
1705
|
+
var schema17 = { "type": "object", "required": ["type", "attrs"], "properties": { "type": { "const": "heading" }, "attrs": { "type": "object", "required": ["level"], "properties": { "level": { "type": "integer", "minimum": 1, "maximum": 6 }, "id": { "$ref": "#/definitions/legacyReferenceId" }, "textAlign": { "type": ["string", "null"], "enum": ["left", "center", "right", "justify", null] }, "numbered": { "type": ["boolean", "null"], "description": "false\uBA74 \uC790\uB3D9 \uBC88\uD638 \uB9E4\uAE40\uC5D0\uC11C \uC81C\uC678 (\uC608: Introduction, Glossary, References). \uC0DD\uB7B5 \uB610\uB294 null\uC774\uBA74 \uBC88\uD638 \uB9E4\uAE40 \uB300\uC0C1." } }, "additionalProperties": false }, "content": { "type": "array", "items": { "$ref": "#/definitions/inlineNode" } } }, "additionalProperties": false };
|
|
1706
|
+
var schema18 = { "type": ["string", "null"], "description": "Backward-compatible cross-reference anchor. Existing .sdoc 1.0 documents allowed any string; newly authored IDs should follow stableId." };
|
|
1707
|
+
var schema21 = { "type": "object", "required": ["type"], "properties": { "type": { "type": "string", "enum": ["bold", "italic", "underline", "strike", "code", "link", "textStyle", "highlight", "subscript", "superscript"] }, "attrs": { "type": "object", "description": "Mark-specific attributes (e.g., href for link).", "properties": { "href": { "type": ["string", "null"] }, "target": { "type": ["string", "null"] }, "rel": { "type": ["string", "null"] }, "class": { "type": ["string", "null"] }, "title": { "type": ["string", "null"] }, "color": { "type": "string" } }, "additionalProperties": false } }, "additionalProperties": false };
|
|
1710
1708
|
function validate17(data, { instancePath = "", parentData, parentDataProperty, rootData = data } = {}) {
|
|
1711
1709
|
let vErrors = null;
|
|
1712
1710
|
let errors = 0;
|
|
@@ -1792,7 +1790,7 @@ function validate17(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
1792
1790
|
errors++;
|
|
1793
1791
|
}
|
|
1794
1792
|
if (!(data4 === "bold" || data4 === "italic" || data4 === "underline" || data4 === "strike" || data4 === "code" || data4 === "link" || data4 === "textStyle" || data4 === "highlight" || data4 === "subscript" || data4 === "superscript")) {
|
|
1795
|
-
const err7 = { instancePath: instancePath + "/marks/" + i0 + "/type", schemaPath: "#/definitions/mark/properties/type/enum", keyword: "enum", params: { allowedValues:
|
|
1793
|
+
const err7 = { instancePath: instancePath + "/marks/" + i0 + "/type", schemaPath: "#/definitions/mark/properties/type/enum", keyword: "enum", params: { allowedValues: schema21.properties.type.enum }, message: "must be equal to one of the allowed values" };
|
|
1796
1794
|
if (vErrors === null) {
|
|
1797
1795
|
vErrors = [err7];
|
|
1798
1796
|
} else {
|
|
@@ -1818,7 +1816,7 @@ function validate17(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
1818
1816
|
if (data5.href !== void 0) {
|
|
1819
1817
|
let data6 = data5.href;
|
|
1820
1818
|
if (typeof data6 !== "string" && data6 !== null) {
|
|
1821
|
-
const err9 = { instancePath: instancePath + "/marks/" + i0 + "/attrs/href", schemaPath: "#/definitions/mark/properties/attrs/properties/href/type", keyword: "type", params: { type:
|
|
1819
|
+
const err9 = { instancePath: instancePath + "/marks/" + i0 + "/attrs/href", schemaPath: "#/definitions/mark/properties/attrs/properties/href/type", keyword: "type", params: { type: schema21.properties.attrs.properties.href.type }, message: "must be string,null" };
|
|
1822
1820
|
if (vErrors === null) {
|
|
1823
1821
|
vErrors = [err9];
|
|
1824
1822
|
} else {
|
|
@@ -1830,7 +1828,7 @@ function validate17(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
1830
1828
|
if (data5.target !== void 0) {
|
|
1831
1829
|
let data7 = data5.target;
|
|
1832
1830
|
if (typeof data7 !== "string" && data7 !== null) {
|
|
1833
|
-
const err10 = { instancePath: instancePath + "/marks/" + i0 + "/attrs/target", schemaPath: "#/definitions/mark/properties/attrs/properties/target/type", keyword: "type", params: { type:
|
|
1831
|
+
const err10 = { instancePath: instancePath + "/marks/" + i0 + "/attrs/target", schemaPath: "#/definitions/mark/properties/attrs/properties/target/type", keyword: "type", params: { type: schema21.properties.attrs.properties.target.type }, message: "must be string,null" };
|
|
1834
1832
|
if (vErrors === null) {
|
|
1835
1833
|
vErrors = [err10];
|
|
1836
1834
|
} else {
|
|
@@ -1842,7 +1840,7 @@ function validate17(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
1842
1840
|
if (data5.rel !== void 0) {
|
|
1843
1841
|
let data8 = data5.rel;
|
|
1844
1842
|
if (typeof data8 !== "string" && data8 !== null) {
|
|
1845
|
-
const err11 = { instancePath: instancePath + "/marks/" + i0 + "/attrs/rel", schemaPath: "#/definitions/mark/properties/attrs/properties/rel/type", keyword: "type", params: { type:
|
|
1843
|
+
const err11 = { instancePath: instancePath + "/marks/" + i0 + "/attrs/rel", schemaPath: "#/definitions/mark/properties/attrs/properties/rel/type", keyword: "type", params: { type: schema21.properties.attrs.properties.rel.type }, message: "must be string,null" };
|
|
1846
1844
|
if (vErrors === null) {
|
|
1847
1845
|
vErrors = [err11];
|
|
1848
1846
|
} else {
|
|
@@ -1854,7 +1852,7 @@ function validate17(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
1854
1852
|
if (data5.class !== void 0) {
|
|
1855
1853
|
let data9 = data5.class;
|
|
1856
1854
|
if (typeof data9 !== "string" && data9 !== null) {
|
|
1857
|
-
const err12 = { instancePath: instancePath + "/marks/" + i0 + "/attrs/class", schemaPath: "#/definitions/mark/properties/attrs/properties/class/type", keyword: "type", params: { type:
|
|
1855
|
+
const err12 = { instancePath: instancePath + "/marks/" + i0 + "/attrs/class", schemaPath: "#/definitions/mark/properties/attrs/properties/class/type", keyword: "type", params: { type: schema21.properties.attrs.properties.class.type }, message: "must be string,null" };
|
|
1858
1856
|
if (vErrors === null) {
|
|
1859
1857
|
vErrors = [err12];
|
|
1860
1858
|
} else {
|
|
@@ -1866,7 +1864,7 @@ function validate17(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
1866
1864
|
if (data5.title !== void 0) {
|
|
1867
1865
|
let data10 = data5.title;
|
|
1868
1866
|
if (typeof data10 !== "string" && data10 !== null) {
|
|
1869
|
-
const err13 = { instancePath: instancePath + "/marks/" + i0 + "/attrs/title", schemaPath: "#/definitions/mark/properties/attrs/properties/title/type", keyword: "type", params: { type:
|
|
1867
|
+
const err13 = { instancePath: instancePath + "/marks/" + i0 + "/attrs/title", schemaPath: "#/definitions/mark/properties/attrs/properties/title/type", keyword: "type", params: { type: schema21.properties.attrs.properties.title.type }, message: "must be string,null" };
|
|
1870
1868
|
if (vErrors === null) {
|
|
1871
1869
|
vErrors = [err13];
|
|
1872
1870
|
} else {
|
|
@@ -1928,6 +1926,191 @@ function validate17(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
1928
1926
|
validate17.errors = vErrors;
|
|
1929
1927
|
return errors === 0;
|
|
1930
1928
|
}
|
|
1929
|
+
var pattern6 = new RegExp("^provisional:", "u");
|
|
1930
|
+
var pattern7 = new RegExp("^[^\\r\\n]*$", "u");
|
|
1931
|
+
function validate19(data, { instancePath = "", parentData, parentDataProperty, rootData = data } = {}) {
|
|
1932
|
+
let vErrors = null;
|
|
1933
|
+
let errors = 0;
|
|
1934
|
+
if (data && typeof data == "object" && !Array.isArray(data)) {
|
|
1935
|
+
if (data.type === void 0) {
|
|
1936
|
+
const err0 = { instancePath, schemaPath: "#/required", keyword: "required", params: { missingProperty: "type" }, message: "must have required property 'type'" };
|
|
1937
|
+
if (vErrors === null) {
|
|
1938
|
+
vErrors = [err0];
|
|
1939
|
+
} else {
|
|
1940
|
+
vErrors.push(err0);
|
|
1941
|
+
}
|
|
1942
|
+
errors++;
|
|
1943
|
+
}
|
|
1944
|
+
if (data.attrs === void 0) {
|
|
1945
|
+
const err1 = { instancePath, schemaPath: "#/required", keyword: "required", params: { missingProperty: "attrs" }, message: "must have required property 'attrs'" };
|
|
1946
|
+
if (vErrors === null) {
|
|
1947
|
+
vErrors = [err1];
|
|
1948
|
+
} else {
|
|
1949
|
+
vErrors.push(err1);
|
|
1950
|
+
}
|
|
1951
|
+
errors++;
|
|
1952
|
+
}
|
|
1953
|
+
for (const key0 in data) {
|
|
1954
|
+
if (!(key0 === "type" || key0 === "attrs")) {
|
|
1955
|
+
const err2 = { instancePath, schemaPath: "#/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key0 }, message: "must NOT have additional properties" };
|
|
1956
|
+
if (vErrors === null) {
|
|
1957
|
+
vErrors = [err2];
|
|
1958
|
+
} else {
|
|
1959
|
+
vErrors.push(err2);
|
|
1960
|
+
}
|
|
1961
|
+
errors++;
|
|
1962
|
+
}
|
|
1963
|
+
}
|
|
1964
|
+
if (data.type !== void 0) {
|
|
1965
|
+
if ("endnote" !== data.type) {
|
|
1966
|
+
const err3 = { instancePath: instancePath + "/type", schemaPath: "#/properties/type/const", keyword: "const", params: { allowedValue: "endnote" }, message: "must be equal to constant" };
|
|
1967
|
+
if (vErrors === null) {
|
|
1968
|
+
vErrors = [err3];
|
|
1969
|
+
} else {
|
|
1970
|
+
vErrors.push(err3);
|
|
1971
|
+
}
|
|
1972
|
+
errors++;
|
|
1973
|
+
}
|
|
1974
|
+
}
|
|
1975
|
+
if (data.attrs !== void 0) {
|
|
1976
|
+
let data1 = data.attrs;
|
|
1977
|
+
if (data1 && typeof data1 == "object" && !Array.isArray(data1)) {
|
|
1978
|
+
if (data1.id === void 0) {
|
|
1979
|
+
const err4 = { instancePath: instancePath + "/attrs", schemaPath: "#/properties/attrs/required", keyword: "required", params: { missingProperty: "id" }, message: "must have required property 'id'" };
|
|
1980
|
+
if (vErrors === null) {
|
|
1981
|
+
vErrors = [err4];
|
|
1982
|
+
} else {
|
|
1983
|
+
vErrors.push(err4);
|
|
1984
|
+
}
|
|
1985
|
+
errors++;
|
|
1986
|
+
}
|
|
1987
|
+
if (data1.body === void 0) {
|
|
1988
|
+
const err5 = { instancePath: instancePath + "/attrs", schemaPath: "#/properties/attrs/required", keyword: "required", params: { missingProperty: "body" }, message: "must have required property 'body'" };
|
|
1989
|
+
if (vErrors === null) {
|
|
1990
|
+
vErrors = [err5];
|
|
1991
|
+
} else {
|
|
1992
|
+
vErrors.push(err5);
|
|
1993
|
+
}
|
|
1994
|
+
errors++;
|
|
1995
|
+
}
|
|
1996
|
+
for (const key1 in data1) {
|
|
1997
|
+
if (!(key1 === "id" || key1 === "body")) {
|
|
1998
|
+
const err6 = { instancePath: instancePath + "/attrs", schemaPath: "#/properties/attrs/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key1 }, message: "must NOT have additional properties" };
|
|
1999
|
+
if (vErrors === null) {
|
|
2000
|
+
vErrors = [err6];
|
|
2001
|
+
} else {
|
|
2002
|
+
vErrors.push(err6);
|
|
2003
|
+
}
|
|
2004
|
+
errors++;
|
|
2005
|
+
}
|
|
2006
|
+
}
|
|
2007
|
+
if (data1.id !== void 0) {
|
|
2008
|
+
let data2 = data1.id;
|
|
2009
|
+
const _errs9 = errors;
|
|
2010
|
+
const _errs10 = errors;
|
|
2011
|
+
if (typeof data2 === "string") {
|
|
2012
|
+
if (!pattern6.test(data2)) {
|
|
2013
|
+
const err7 = {};
|
|
2014
|
+
if (vErrors === null) {
|
|
2015
|
+
vErrors = [err7];
|
|
2016
|
+
} else {
|
|
2017
|
+
vErrors.push(err7);
|
|
2018
|
+
}
|
|
2019
|
+
errors++;
|
|
2020
|
+
}
|
|
2021
|
+
}
|
|
2022
|
+
var valid3 = _errs10 === errors;
|
|
2023
|
+
if (valid3) {
|
|
2024
|
+
const err8 = { instancePath: instancePath + "/attrs/id", schemaPath: "#/definitions/stableId/not", keyword: "not", params: {}, message: "must NOT be valid" };
|
|
2025
|
+
if (vErrors === null) {
|
|
2026
|
+
vErrors = [err8];
|
|
2027
|
+
} else {
|
|
2028
|
+
vErrors.push(err8);
|
|
2029
|
+
}
|
|
2030
|
+
errors++;
|
|
2031
|
+
} else {
|
|
2032
|
+
errors = _errs9;
|
|
2033
|
+
if (vErrors !== null) {
|
|
2034
|
+
if (_errs9) {
|
|
2035
|
+
vErrors.length = _errs9;
|
|
2036
|
+
} else {
|
|
2037
|
+
vErrors = null;
|
|
2038
|
+
}
|
|
2039
|
+
}
|
|
2040
|
+
}
|
|
2041
|
+
if (typeof data2 === "string") {
|
|
2042
|
+
if (func3(data2) > 128) {
|
|
2043
|
+
const err9 = { instancePath: instancePath + "/attrs/id", schemaPath: "#/definitions/stableId/maxLength", keyword: "maxLength", params: { limit: 128 }, message: "must NOT have more than 128 characters" };
|
|
2044
|
+
if (vErrors === null) {
|
|
2045
|
+
vErrors = [err9];
|
|
2046
|
+
} else {
|
|
2047
|
+
vErrors.push(err9);
|
|
2048
|
+
}
|
|
2049
|
+
errors++;
|
|
2050
|
+
}
|
|
2051
|
+
if (func3(data2) < 1) {
|
|
2052
|
+
const err10 = { instancePath: instancePath + "/attrs/id", schemaPath: "#/definitions/stableId/minLength", keyword: "minLength", params: { limit: 1 }, message: "must NOT have fewer than 1 characters" };
|
|
2053
|
+
if (vErrors === null) {
|
|
2054
|
+
vErrors = [err10];
|
|
2055
|
+
} else {
|
|
2056
|
+
vErrors.push(err10);
|
|
2057
|
+
}
|
|
2058
|
+
errors++;
|
|
2059
|
+
}
|
|
2060
|
+
} else {
|
|
2061
|
+
const err11 = { instancePath: instancePath + "/attrs/id", schemaPath: "#/definitions/stableId/type", keyword: "type", params: { type: "string" }, message: "must be string" };
|
|
2062
|
+
if (vErrors === null) {
|
|
2063
|
+
vErrors = [err11];
|
|
2064
|
+
} else {
|
|
2065
|
+
vErrors.push(err11);
|
|
2066
|
+
}
|
|
2067
|
+
errors++;
|
|
2068
|
+
}
|
|
2069
|
+
}
|
|
2070
|
+
if (data1.body !== void 0) {
|
|
2071
|
+
let data3 = data1.body;
|
|
2072
|
+
if (typeof data3 === "string") {
|
|
2073
|
+
if (!pattern7.test(data3)) {
|
|
2074
|
+
const err12 = { instancePath: instancePath + "/attrs/body", schemaPath: "#/properties/attrs/properties/body/pattern", keyword: "pattern", params: { pattern: "^[^\\r\\n]*$" }, message: 'must match pattern "^[^\\r\\n]*$"' };
|
|
2075
|
+
if (vErrors === null) {
|
|
2076
|
+
vErrors = [err12];
|
|
2077
|
+
} else {
|
|
2078
|
+
vErrors.push(err12);
|
|
2079
|
+
}
|
|
2080
|
+
errors++;
|
|
2081
|
+
}
|
|
2082
|
+
} else {
|
|
2083
|
+
const err13 = { instancePath: instancePath + "/attrs/body", schemaPath: "#/properties/attrs/properties/body/type", keyword: "type", params: { type: "string" }, message: "must be string" };
|
|
2084
|
+
if (vErrors === null) {
|
|
2085
|
+
vErrors = [err13];
|
|
2086
|
+
} else {
|
|
2087
|
+
vErrors.push(err13);
|
|
2088
|
+
}
|
|
2089
|
+
errors++;
|
|
2090
|
+
}
|
|
2091
|
+
}
|
|
2092
|
+
} else {
|
|
2093
|
+
const err14 = { instancePath: instancePath + "/attrs", schemaPath: "#/properties/attrs/type", keyword: "type", params: { type: "object" }, message: "must be object" };
|
|
2094
|
+
if (vErrors === null) {
|
|
2095
|
+
vErrors = [err14];
|
|
2096
|
+
} else {
|
|
2097
|
+
vErrors.push(err14);
|
|
2098
|
+
}
|
|
2099
|
+
errors++;
|
|
2100
|
+
}
|
|
2101
|
+
}
|
|
2102
|
+
} else {
|
|
2103
|
+
const err15 = { instancePath, schemaPath: "#/type", keyword: "type", params: { type: "object" }, message: "must be object" };
|
|
2104
|
+
if (vErrors === null) {
|
|
2105
|
+
vErrors = [err15];
|
|
2106
|
+
} else {
|
|
2107
|
+
vErrors.push(err15);
|
|
2108
|
+
}
|
|
2109
|
+
errors++;
|
|
2110
|
+
}
|
|
2111
|
+
validate19.errors = vErrors;
|
|
2112
|
+
return errors === 0;
|
|
2113
|
+
}
|
|
1931
2114
|
function validate16(data, { instancePath = "", parentData, parentDataProperty, rootData = data } = {}) {
|
|
1932
2115
|
let vErrors = null;
|
|
1933
2116
|
let errors = 0;
|
|
@@ -2040,55 +2223,70 @@ function validate16(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
2040
2223
|
passing0 = 1;
|
|
2041
2224
|
}
|
|
2042
2225
|
const _errs12 = errors;
|
|
2043
|
-
if (data
|
|
2044
|
-
|
|
2045
|
-
|
|
2046
|
-
|
|
2047
|
-
|
|
2048
|
-
|
|
2049
|
-
|
|
2050
|
-
|
|
2051
|
-
|
|
2226
|
+
if (!validate19(data, { instancePath, parentData, parentDataProperty, rootData })) {
|
|
2227
|
+
vErrors = vErrors === null ? validate19.errors : vErrors.concat(validate19.errors);
|
|
2228
|
+
errors = vErrors.length;
|
|
2229
|
+
}
|
|
2230
|
+
var _valid0 = _errs12 === errors;
|
|
2231
|
+
if (_valid0 && valid0) {
|
|
2232
|
+
valid0 = false;
|
|
2233
|
+
passing0 = [passing0, 2];
|
|
2234
|
+
} else {
|
|
2235
|
+
if (_valid0) {
|
|
2236
|
+
valid0 = true;
|
|
2237
|
+
passing0 = 2;
|
|
2052
2238
|
}
|
|
2053
|
-
|
|
2054
|
-
|
|
2055
|
-
|
|
2239
|
+
const _errs13 = errors;
|
|
2240
|
+
if (data && typeof data == "object" && !Array.isArray(data)) {
|
|
2241
|
+
if (data.type === void 0) {
|
|
2242
|
+
const err8 = { instancePath, schemaPath: "#/definitions/hardBreakNode/required", keyword: "required", params: { missingProperty: "type" }, message: "must have required property 'type'" };
|
|
2056
2243
|
if (vErrors === null) {
|
|
2057
|
-
vErrors = [
|
|
2244
|
+
vErrors = [err8];
|
|
2058
2245
|
} else {
|
|
2059
|
-
vErrors.push(
|
|
2246
|
+
vErrors.push(err8);
|
|
2060
2247
|
}
|
|
2061
2248
|
errors++;
|
|
2062
2249
|
}
|
|
2063
|
-
|
|
2064
|
-
|
|
2065
|
-
|
|
2066
|
-
|
|
2067
|
-
|
|
2068
|
-
|
|
2069
|
-
|
|
2070
|
-
|
|
2250
|
+
for (const key2 in data) {
|
|
2251
|
+
if (!(key2 === "type")) {
|
|
2252
|
+
const err9 = { instancePath, schemaPath: "#/definitions/hardBreakNode/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key2 }, message: "must NOT have additional properties" };
|
|
2253
|
+
if (vErrors === null) {
|
|
2254
|
+
vErrors = [err9];
|
|
2255
|
+
} else {
|
|
2256
|
+
vErrors.push(err9);
|
|
2257
|
+
}
|
|
2258
|
+
errors++;
|
|
2259
|
+
}
|
|
2260
|
+
}
|
|
2261
|
+
if (data.type !== void 0) {
|
|
2262
|
+
if ("hardBreak" !== data.type) {
|
|
2263
|
+
const err10 = { instancePath: instancePath + "/type", schemaPath: "#/definitions/hardBreakNode/properties/type/const", keyword: "const", params: { allowedValue: "hardBreak" }, message: "must be equal to constant" };
|
|
2264
|
+
if (vErrors === null) {
|
|
2265
|
+
vErrors = [err10];
|
|
2266
|
+
} else {
|
|
2267
|
+
vErrors.push(err10);
|
|
2268
|
+
}
|
|
2269
|
+
errors++;
|
|
2071
2270
|
}
|
|
2072
|
-
errors++;
|
|
2073
2271
|
}
|
|
2074
|
-
}
|
|
2075
|
-
} else {
|
|
2076
|
-
const err11 = { instancePath, schemaPath: "#/definitions/hardBreakNode/type", keyword: "type", params: { type: "object" }, message: "must be object" };
|
|
2077
|
-
if (vErrors === null) {
|
|
2078
|
-
vErrors = [err11];
|
|
2079
2272
|
} else {
|
|
2080
|
-
|
|
2273
|
+
const err11 = { instancePath, schemaPath: "#/definitions/hardBreakNode/type", keyword: "type", params: { type: "object" }, message: "must be object" };
|
|
2274
|
+
if (vErrors === null) {
|
|
2275
|
+
vErrors = [err11];
|
|
2276
|
+
} else {
|
|
2277
|
+
vErrors.push(err11);
|
|
2278
|
+
}
|
|
2279
|
+
errors++;
|
|
2081
2280
|
}
|
|
2082
|
-
errors
|
|
2083
|
-
|
|
2084
|
-
|
|
2085
|
-
|
|
2086
|
-
|
|
2087
|
-
|
|
2088
|
-
|
|
2089
|
-
|
|
2090
|
-
|
|
2091
|
-
passing0 = 2;
|
|
2281
|
+
var _valid0 = _errs13 === errors;
|
|
2282
|
+
if (_valid0 && valid0) {
|
|
2283
|
+
valid0 = false;
|
|
2284
|
+
passing0 = [passing0, 3];
|
|
2285
|
+
} else {
|
|
2286
|
+
if (_valid0) {
|
|
2287
|
+
valid0 = true;
|
|
2288
|
+
passing0 = 3;
|
|
2289
|
+
}
|
|
2092
2290
|
}
|
|
2093
2291
|
}
|
|
2094
2292
|
}
|
|
@@ -2215,7 +2413,7 @@ function validate15(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
2215
2413
|
if (data1.id !== void 0) {
|
|
2216
2414
|
let data3 = data1.id;
|
|
2217
2415
|
if (typeof data3 !== "string" && data3 !== null) {
|
|
2218
|
-
const err9 = { instancePath: instancePath + "/attrs/id", schemaPath: "#/
|
|
2416
|
+
const err9 = { instancePath: instancePath + "/attrs/id", schemaPath: "#/definitions/legacyReferenceId/type", keyword: "type", params: { type: schema18.type }, message: "must be string,null" };
|
|
2219
2417
|
if (vErrors === null) {
|
|
2220
2418
|
vErrors = [err9];
|
|
2221
2419
|
} else {
|
|
@@ -2299,8 +2497,8 @@ function validate15(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
2299
2497
|
validate15.errors = vErrors;
|
|
2300
2498
|
return errors === 0;
|
|
2301
2499
|
}
|
|
2302
|
-
var
|
|
2303
|
-
function
|
|
2500
|
+
var schema26 = { "type": "object", "required": ["type"], "properties": { "type": { "const": "paragraph" }, "attrs": { "type": "object", "properties": { "textAlign": { "type": ["string", "null"], "enum": ["left", "center", "right", "justify", null] }, "id": { "$ref": "#/definitions/stableId" } }, "additionalProperties": false }, "content": { "type": "array", "items": { "$ref": "#/definitions/inlineNode" } } }, "additionalProperties": false };
|
|
2501
|
+
function validate23(data, { instancePath = "", parentData, parentDataProperty, rootData = data } = {}) {
|
|
2304
2502
|
let vErrors = null;
|
|
2305
2503
|
let errors = 0;
|
|
2306
2504
|
if (data && typeof data == "object" && !Array.isArray(data)) {
|
|
@@ -2339,7 +2537,7 @@ function validate21(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
2339
2537
|
let data1 = data.attrs;
|
|
2340
2538
|
if (data1 && typeof data1 == "object" && !Array.isArray(data1)) {
|
|
2341
2539
|
for (const key1 in data1) {
|
|
2342
|
-
if (!(key1 === "textAlign")) {
|
|
2540
|
+
if (!(key1 === "textAlign" || key1 === "id")) {
|
|
2343
2541
|
const err3 = { instancePath: instancePath + "/attrs", schemaPath: "#/properties/attrs/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key1 }, message: "must NOT have additional properties" };
|
|
2344
2542
|
if (vErrors === null) {
|
|
2345
2543
|
vErrors = [err3];
|
|
@@ -2352,7 +2550,7 @@ function validate21(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
2352
2550
|
if (data1.textAlign !== void 0) {
|
|
2353
2551
|
let data2 = data1.textAlign;
|
|
2354
2552
|
if (typeof data2 !== "string" && data2 !== null) {
|
|
2355
|
-
const err4 = { instancePath: instancePath + "/attrs/textAlign", schemaPath: "#/properties/attrs/properties/textAlign/type", keyword: "type", params: { type:
|
|
2553
|
+
const err4 = { instancePath: instancePath + "/attrs/textAlign", schemaPath: "#/properties/attrs/properties/textAlign/type", keyword: "type", params: { type: schema26.properties.attrs.properties.textAlign.type }, message: "must be string,null" };
|
|
2356
2554
|
if (vErrors === null) {
|
|
2357
2555
|
vErrors = [err4];
|
|
2358
2556
|
} else {
|
|
@@ -2361,7 +2559,7 @@ function validate21(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
2361
2559
|
errors++;
|
|
2362
2560
|
}
|
|
2363
2561
|
if (!(data2 === "left" || data2 === "center" || data2 === "right" || data2 === "justify" || data2 === null)) {
|
|
2364
|
-
const err5 = { instancePath: instancePath + "/attrs/textAlign", schemaPath: "#/properties/attrs/properties/textAlign/enum", keyword: "enum", params: { allowedValues:
|
|
2562
|
+
const err5 = { instancePath: instancePath + "/attrs/textAlign", schemaPath: "#/properties/attrs/properties/textAlign/enum", keyword: "enum", params: { allowedValues: schema26.properties.attrs.properties.textAlign.enum }, message: "must be equal to one of the allowed values" };
|
|
2365
2563
|
if (vErrors === null) {
|
|
2366
2564
|
vErrors = [err5];
|
|
2367
2565
|
} else {
|
|
@@ -2370,50 +2568,113 @@ function validate21(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
2370
2568
|
errors++;
|
|
2371
2569
|
}
|
|
2372
2570
|
}
|
|
2571
|
+
if (data1.id !== void 0) {
|
|
2572
|
+
let data3 = data1.id;
|
|
2573
|
+
const _errs11 = errors;
|
|
2574
|
+
const _errs12 = errors;
|
|
2575
|
+
if (typeof data3 === "string") {
|
|
2576
|
+
if (!pattern6.test(data3)) {
|
|
2577
|
+
const err6 = {};
|
|
2578
|
+
if (vErrors === null) {
|
|
2579
|
+
vErrors = [err6];
|
|
2580
|
+
} else {
|
|
2581
|
+
vErrors.push(err6);
|
|
2582
|
+
}
|
|
2583
|
+
errors++;
|
|
2584
|
+
}
|
|
2585
|
+
}
|
|
2586
|
+
var valid3 = _errs12 === errors;
|
|
2587
|
+
if (valid3) {
|
|
2588
|
+
const err7 = { instancePath: instancePath + "/attrs/id", schemaPath: "#/definitions/stableId/not", keyword: "not", params: {}, message: "must NOT be valid" };
|
|
2589
|
+
if (vErrors === null) {
|
|
2590
|
+
vErrors = [err7];
|
|
2591
|
+
} else {
|
|
2592
|
+
vErrors.push(err7);
|
|
2593
|
+
}
|
|
2594
|
+
errors++;
|
|
2595
|
+
} else {
|
|
2596
|
+
errors = _errs11;
|
|
2597
|
+
if (vErrors !== null) {
|
|
2598
|
+
if (_errs11) {
|
|
2599
|
+
vErrors.length = _errs11;
|
|
2600
|
+
} else {
|
|
2601
|
+
vErrors = null;
|
|
2602
|
+
}
|
|
2603
|
+
}
|
|
2604
|
+
}
|
|
2605
|
+
if (typeof data3 === "string") {
|
|
2606
|
+
if (func3(data3) > 128) {
|
|
2607
|
+
const err8 = { instancePath: instancePath + "/attrs/id", schemaPath: "#/definitions/stableId/maxLength", keyword: "maxLength", params: { limit: 128 }, message: "must NOT have more than 128 characters" };
|
|
2608
|
+
if (vErrors === null) {
|
|
2609
|
+
vErrors = [err8];
|
|
2610
|
+
} else {
|
|
2611
|
+
vErrors.push(err8);
|
|
2612
|
+
}
|
|
2613
|
+
errors++;
|
|
2614
|
+
}
|
|
2615
|
+
if (func3(data3) < 1) {
|
|
2616
|
+
const err9 = { instancePath: instancePath + "/attrs/id", schemaPath: "#/definitions/stableId/minLength", keyword: "minLength", params: { limit: 1 }, message: "must NOT have fewer than 1 characters" };
|
|
2617
|
+
if (vErrors === null) {
|
|
2618
|
+
vErrors = [err9];
|
|
2619
|
+
} else {
|
|
2620
|
+
vErrors.push(err9);
|
|
2621
|
+
}
|
|
2622
|
+
errors++;
|
|
2623
|
+
}
|
|
2624
|
+
} else {
|
|
2625
|
+
const err10 = { instancePath: instancePath + "/attrs/id", schemaPath: "#/definitions/stableId/type", keyword: "type", params: { type: "string" }, message: "must be string" };
|
|
2626
|
+
if (vErrors === null) {
|
|
2627
|
+
vErrors = [err10];
|
|
2628
|
+
} else {
|
|
2629
|
+
vErrors.push(err10);
|
|
2630
|
+
}
|
|
2631
|
+
errors++;
|
|
2632
|
+
}
|
|
2633
|
+
}
|
|
2373
2634
|
} else {
|
|
2374
|
-
const
|
|
2635
|
+
const err11 = { instancePath: instancePath + "/attrs", schemaPath: "#/properties/attrs/type", keyword: "type", params: { type: "object" }, message: "must be object" };
|
|
2375
2636
|
if (vErrors === null) {
|
|
2376
|
-
vErrors = [
|
|
2637
|
+
vErrors = [err11];
|
|
2377
2638
|
} else {
|
|
2378
|
-
vErrors.push(
|
|
2639
|
+
vErrors.push(err11);
|
|
2379
2640
|
}
|
|
2380
2641
|
errors++;
|
|
2381
2642
|
}
|
|
2382
2643
|
}
|
|
2383
2644
|
if (data.content !== void 0) {
|
|
2384
|
-
let
|
|
2385
|
-
if (Array.isArray(
|
|
2386
|
-
const len0 =
|
|
2387
|
-
for (let i0 = 0; i0 < len0; i0++) {
|
|
2388
|
-
if (!validate16(
|
|
2645
|
+
let data4 = data.content;
|
|
2646
|
+
if (Array.isArray(data4)) {
|
|
2647
|
+
const len0 = data4.length;
|
|
2648
|
+
for (let i0 = 0; i0 < len0; i0++) {
|
|
2649
|
+
if (!validate16(data4[i0], { instancePath: instancePath + "/content/" + i0, parentData: data4, parentDataProperty: i0, rootData })) {
|
|
2389
2650
|
vErrors = vErrors === null ? validate16.errors : vErrors.concat(validate16.errors);
|
|
2390
2651
|
errors = vErrors.length;
|
|
2391
2652
|
}
|
|
2392
2653
|
}
|
|
2393
2654
|
} else {
|
|
2394
|
-
const
|
|
2655
|
+
const err12 = { instancePath: instancePath + "/content", schemaPath: "#/properties/content/type", keyword: "type", params: { type: "array" }, message: "must be array" };
|
|
2395
2656
|
if (vErrors === null) {
|
|
2396
|
-
vErrors = [
|
|
2657
|
+
vErrors = [err12];
|
|
2397
2658
|
} else {
|
|
2398
|
-
vErrors.push(
|
|
2659
|
+
vErrors.push(err12);
|
|
2399
2660
|
}
|
|
2400
2661
|
errors++;
|
|
2401
2662
|
}
|
|
2402
2663
|
}
|
|
2403
2664
|
} else {
|
|
2404
|
-
const
|
|
2665
|
+
const err13 = { instancePath, schemaPath: "#/type", keyword: "type", params: { type: "object" }, message: "must be object" };
|
|
2405
2666
|
if (vErrors === null) {
|
|
2406
|
-
vErrors = [
|
|
2667
|
+
vErrors = [err13];
|
|
2407
2668
|
} else {
|
|
2408
|
-
vErrors.push(
|
|
2669
|
+
vErrors.push(err13);
|
|
2409
2670
|
}
|
|
2410
2671
|
errors++;
|
|
2411
2672
|
}
|
|
2412
|
-
|
|
2673
|
+
validate23.errors = vErrors;
|
|
2413
2674
|
return errors === 0;
|
|
2414
2675
|
}
|
|
2415
2676
|
var wrapper0 = { validate: validate14 };
|
|
2416
|
-
function
|
|
2677
|
+
function validate27(data, { instancePath = "", parentData, parentDataProperty, rootData = data } = {}) {
|
|
2417
2678
|
let vErrors = null;
|
|
2418
2679
|
let errors = 0;
|
|
2419
2680
|
if (data && typeof data == "object" && !Array.isArray(data)) {
|
|
@@ -2427,7 +2688,7 @@ function validate25(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
2427
2688
|
errors++;
|
|
2428
2689
|
}
|
|
2429
2690
|
for (const key0 in data) {
|
|
2430
|
-
if (!(key0 === "type" || key0 === "content")) {
|
|
2691
|
+
if (!(key0 === "type" || key0 === "attrs" || key0 === "content")) {
|
|
2431
2692
|
const err1 = { instancePath, schemaPath: "#/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key0 }, message: "must NOT have additional properties" };
|
|
2432
2693
|
if (vErrors === null) {
|
|
2433
2694
|
vErrors = [err1];
|
|
@@ -2448,39 +2709,126 @@ function validate25(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
2448
2709
|
errors++;
|
|
2449
2710
|
}
|
|
2450
2711
|
}
|
|
2712
|
+
if (data.attrs !== void 0) {
|
|
2713
|
+
let data1 = data.attrs;
|
|
2714
|
+
if (data1 && typeof data1 == "object" && !Array.isArray(data1)) {
|
|
2715
|
+
for (const key1 in data1) {
|
|
2716
|
+
if (!(key1 === "id")) {
|
|
2717
|
+
const err3 = { instancePath: instancePath + "/attrs", schemaPath: "#/properties/attrs/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key1 }, message: "must NOT have additional properties" };
|
|
2718
|
+
if (vErrors === null) {
|
|
2719
|
+
vErrors = [err3];
|
|
2720
|
+
} else {
|
|
2721
|
+
vErrors.push(err3);
|
|
2722
|
+
}
|
|
2723
|
+
errors++;
|
|
2724
|
+
}
|
|
2725
|
+
}
|
|
2726
|
+
if (data1.id !== void 0) {
|
|
2727
|
+
let data2 = data1.id;
|
|
2728
|
+
const _errs9 = errors;
|
|
2729
|
+
const _errs10 = errors;
|
|
2730
|
+
if (typeof data2 === "string") {
|
|
2731
|
+
if (!pattern6.test(data2)) {
|
|
2732
|
+
const err4 = {};
|
|
2733
|
+
if (vErrors === null) {
|
|
2734
|
+
vErrors = [err4];
|
|
2735
|
+
} else {
|
|
2736
|
+
vErrors.push(err4);
|
|
2737
|
+
}
|
|
2738
|
+
errors++;
|
|
2739
|
+
}
|
|
2740
|
+
}
|
|
2741
|
+
var valid3 = _errs10 === errors;
|
|
2742
|
+
if (valid3) {
|
|
2743
|
+
const err5 = { instancePath: instancePath + "/attrs/id", schemaPath: "#/definitions/stableId/not", keyword: "not", params: {}, message: "must NOT be valid" };
|
|
2744
|
+
if (vErrors === null) {
|
|
2745
|
+
vErrors = [err5];
|
|
2746
|
+
} else {
|
|
2747
|
+
vErrors.push(err5);
|
|
2748
|
+
}
|
|
2749
|
+
errors++;
|
|
2750
|
+
} else {
|
|
2751
|
+
errors = _errs9;
|
|
2752
|
+
if (vErrors !== null) {
|
|
2753
|
+
if (_errs9) {
|
|
2754
|
+
vErrors.length = _errs9;
|
|
2755
|
+
} else {
|
|
2756
|
+
vErrors = null;
|
|
2757
|
+
}
|
|
2758
|
+
}
|
|
2759
|
+
}
|
|
2760
|
+
if (typeof data2 === "string") {
|
|
2761
|
+
if (func3(data2) > 128) {
|
|
2762
|
+
const err6 = { instancePath: instancePath + "/attrs/id", schemaPath: "#/definitions/stableId/maxLength", keyword: "maxLength", params: { limit: 128 }, message: "must NOT have more than 128 characters" };
|
|
2763
|
+
if (vErrors === null) {
|
|
2764
|
+
vErrors = [err6];
|
|
2765
|
+
} else {
|
|
2766
|
+
vErrors.push(err6);
|
|
2767
|
+
}
|
|
2768
|
+
errors++;
|
|
2769
|
+
}
|
|
2770
|
+
if (func3(data2) < 1) {
|
|
2771
|
+
const err7 = { instancePath: instancePath + "/attrs/id", schemaPath: "#/definitions/stableId/minLength", keyword: "minLength", params: { limit: 1 }, message: "must NOT have fewer than 1 characters" };
|
|
2772
|
+
if (vErrors === null) {
|
|
2773
|
+
vErrors = [err7];
|
|
2774
|
+
} else {
|
|
2775
|
+
vErrors.push(err7);
|
|
2776
|
+
}
|
|
2777
|
+
errors++;
|
|
2778
|
+
}
|
|
2779
|
+
} else {
|
|
2780
|
+
const err8 = { instancePath: instancePath + "/attrs/id", schemaPath: "#/definitions/stableId/type", keyword: "type", params: { type: "string" }, message: "must be string" };
|
|
2781
|
+
if (vErrors === null) {
|
|
2782
|
+
vErrors = [err8];
|
|
2783
|
+
} else {
|
|
2784
|
+
vErrors.push(err8);
|
|
2785
|
+
}
|
|
2786
|
+
errors++;
|
|
2787
|
+
}
|
|
2788
|
+
}
|
|
2789
|
+
} else {
|
|
2790
|
+
const err9 = { instancePath: instancePath + "/attrs", schemaPath: "#/properties/attrs/type", keyword: "type", params: { type: "object" }, message: "must be object" };
|
|
2791
|
+
if (vErrors === null) {
|
|
2792
|
+
vErrors = [err9];
|
|
2793
|
+
} else {
|
|
2794
|
+
vErrors.push(err9);
|
|
2795
|
+
}
|
|
2796
|
+
errors++;
|
|
2797
|
+
}
|
|
2798
|
+
}
|
|
2451
2799
|
if (data.content !== void 0) {
|
|
2452
|
-
let
|
|
2453
|
-
if (Array.isArray(
|
|
2454
|
-
const len0 =
|
|
2800
|
+
let data3 = data.content;
|
|
2801
|
+
if (Array.isArray(data3)) {
|
|
2802
|
+
const len0 = data3.length;
|
|
2455
2803
|
for (let i0 = 0; i0 < len0; i0++) {
|
|
2456
|
-
if (!wrapper0.validate(
|
|
2804
|
+
if (!wrapper0.validate(data3[i0], { instancePath: instancePath + "/content/" + i0, parentData: data3, parentDataProperty: i0, rootData })) {
|
|
2457
2805
|
vErrors = vErrors === null ? wrapper0.validate.errors : vErrors.concat(wrapper0.validate.errors);
|
|
2458
2806
|
errors = vErrors.length;
|
|
2459
2807
|
}
|
|
2460
2808
|
}
|
|
2461
2809
|
} else {
|
|
2462
|
-
const
|
|
2810
|
+
const err10 = { instancePath: instancePath + "/content", schemaPath: "#/properties/content/type", keyword: "type", params: { type: "array" }, message: "must be array" };
|
|
2463
2811
|
if (vErrors === null) {
|
|
2464
|
-
vErrors = [
|
|
2812
|
+
vErrors = [err10];
|
|
2465
2813
|
} else {
|
|
2466
|
-
vErrors.push(
|
|
2814
|
+
vErrors.push(err10);
|
|
2467
2815
|
}
|
|
2468
2816
|
errors++;
|
|
2469
2817
|
}
|
|
2470
2818
|
}
|
|
2471
2819
|
} else {
|
|
2472
|
-
const
|
|
2820
|
+
const err11 = { instancePath, schemaPath: "#/type", keyword: "type", params: { type: "object" }, message: "must be object" };
|
|
2473
2821
|
if (vErrors === null) {
|
|
2474
|
-
vErrors = [
|
|
2822
|
+
vErrors = [err11];
|
|
2475
2823
|
} else {
|
|
2476
|
-
vErrors.push(
|
|
2824
|
+
vErrors.push(err11);
|
|
2477
2825
|
}
|
|
2478
2826
|
errors++;
|
|
2479
2827
|
}
|
|
2480
|
-
|
|
2828
|
+
validate27.errors = vErrors;
|
|
2481
2829
|
return errors === 0;
|
|
2482
2830
|
}
|
|
2483
|
-
function
|
|
2831
|
+
function validate26(data, { instancePath = "", parentData, parentDataProperty, rootData = data } = {}) {
|
|
2484
2832
|
let vErrors = null;
|
|
2485
2833
|
let errors = 0;
|
|
2486
2834
|
if (data && typeof data == "object" && !Array.isArray(data)) {
|
|
@@ -2494,7 +2842,7 @@ function validate24(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
2494
2842
|
errors++;
|
|
2495
2843
|
}
|
|
2496
2844
|
for (const key0 in data) {
|
|
2497
|
-
if (!(key0 === "type" || key0 === "content")) {
|
|
2845
|
+
if (!(key0 === "type" || key0 === "attrs" || key0 === "content")) {
|
|
2498
2846
|
const err1 = { instancePath, schemaPath: "#/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key0 }, message: "must NOT have additional properties" };
|
|
2499
2847
|
if (vErrors === null) {
|
|
2500
2848
|
vErrors = [err1];
|
|
@@ -2515,40 +2863,127 @@ function validate24(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
2515
2863
|
errors++;
|
|
2516
2864
|
}
|
|
2517
2865
|
}
|
|
2866
|
+
if (data.attrs !== void 0) {
|
|
2867
|
+
let data1 = data.attrs;
|
|
2868
|
+
if (data1 && typeof data1 == "object" && !Array.isArray(data1)) {
|
|
2869
|
+
for (const key1 in data1) {
|
|
2870
|
+
if (!(key1 === "id")) {
|
|
2871
|
+
const err3 = { instancePath: instancePath + "/attrs", schemaPath: "#/properties/attrs/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key1 }, message: "must NOT have additional properties" };
|
|
2872
|
+
if (vErrors === null) {
|
|
2873
|
+
vErrors = [err3];
|
|
2874
|
+
} else {
|
|
2875
|
+
vErrors.push(err3);
|
|
2876
|
+
}
|
|
2877
|
+
errors++;
|
|
2878
|
+
}
|
|
2879
|
+
}
|
|
2880
|
+
if (data1.id !== void 0) {
|
|
2881
|
+
let data2 = data1.id;
|
|
2882
|
+
const _errs9 = errors;
|
|
2883
|
+
const _errs10 = errors;
|
|
2884
|
+
if (typeof data2 === "string") {
|
|
2885
|
+
if (!pattern6.test(data2)) {
|
|
2886
|
+
const err4 = {};
|
|
2887
|
+
if (vErrors === null) {
|
|
2888
|
+
vErrors = [err4];
|
|
2889
|
+
} else {
|
|
2890
|
+
vErrors.push(err4);
|
|
2891
|
+
}
|
|
2892
|
+
errors++;
|
|
2893
|
+
}
|
|
2894
|
+
}
|
|
2895
|
+
var valid3 = _errs10 === errors;
|
|
2896
|
+
if (valid3) {
|
|
2897
|
+
const err5 = { instancePath: instancePath + "/attrs/id", schemaPath: "#/definitions/stableId/not", keyword: "not", params: {}, message: "must NOT be valid" };
|
|
2898
|
+
if (vErrors === null) {
|
|
2899
|
+
vErrors = [err5];
|
|
2900
|
+
} else {
|
|
2901
|
+
vErrors.push(err5);
|
|
2902
|
+
}
|
|
2903
|
+
errors++;
|
|
2904
|
+
} else {
|
|
2905
|
+
errors = _errs9;
|
|
2906
|
+
if (vErrors !== null) {
|
|
2907
|
+
if (_errs9) {
|
|
2908
|
+
vErrors.length = _errs9;
|
|
2909
|
+
} else {
|
|
2910
|
+
vErrors = null;
|
|
2911
|
+
}
|
|
2912
|
+
}
|
|
2913
|
+
}
|
|
2914
|
+
if (typeof data2 === "string") {
|
|
2915
|
+
if (func3(data2) > 128) {
|
|
2916
|
+
const err6 = { instancePath: instancePath + "/attrs/id", schemaPath: "#/definitions/stableId/maxLength", keyword: "maxLength", params: { limit: 128 }, message: "must NOT have more than 128 characters" };
|
|
2917
|
+
if (vErrors === null) {
|
|
2918
|
+
vErrors = [err6];
|
|
2919
|
+
} else {
|
|
2920
|
+
vErrors.push(err6);
|
|
2921
|
+
}
|
|
2922
|
+
errors++;
|
|
2923
|
+
}
|
|
2924
|
+
if (func3(data2) < 1) {
|
|
2925
|
+
const err7 = { instancePath: instancePath + "/attrs/id", schemaPath: "#/definitions/stableId/minLength", keyword: "minLength", params: { limit: 1 }, message: "must NOT have fewer than 1 characters" };
|
|
2926
|
+
if (vErrors === null) {
|
|
2927
|
+
vErrors = [err7];
|
|
2928
|
+
} else {
|
|
2929
|
+
vErrors.push(err7);
|
|
2930
|
+
}
|
|
2931
|
+
errors++;
|
|
2932
|
+
}
|
|
2933
|
+
} else {
|
|
2934
|
+
const err8 = { instancePath: instancePath + "/attrs/id", schemaPath: "#/definitions/stableId/type", keyword: "type", params: { type: "string" }, message: "must be string" };
|
|
2935
|
+
if (vErrors === null) {
|
|
2936
|
+
vErrors = [err8];
|
|
2937
|
+
} else {
|
|
2938
|
+
vErrors.push(err8);
|
|
2939
|
+
}
|
|
2940
|
+
errors++;
|
|
2941
|
+
}
|
|
2942
|
+
}
|
|
2943
|
+
} else {
|
|
2944
|
+
const err9 = { instancePath: instancePath + "/attrs", schemaPath: "#/properties/attrs/type", keyword: "type", params: { type: "object" }, message: "must be object" };
|
|
2945
|
+
if (vErrors === null) {
|
|
2946
|
+
vErrors = [err9];
|
|
2947
|
+
} else {
|
|
2948
|
+
vErrors.push(err9);
|
|
2949
|
+
}
|
|
2950
|
+
errors++;
|
|
2951
|
+
}
|
|
2952
|
+
}
|
|
2518
2953
|
if (data.content !== void 0) {
|
|
2519
|
-
let
|
|
2520
|
-
if (Array.isArray(
|
|
2521
|
-
const len0 =
|
|
2954
|
+
let data3 = data.content;
|
|
2955
|
+
if (Array.isArray(data3)) {
|
|
2956
|
+
const len0 = data3.length;
|
|
2522
2957
|
for (let i0 = 0; i0 < len0; i0++) {
|
|
2523
|
-
if (!
|
|
2524
|
-
vErrors = vErrors === null ?
|
|
2958
|
+
if (!validate27(data3[i0], { instancePath: instancePath + "/content/" + i0, parentData: data3, parentDataProperty: i0, rootData })) {
|
|
2959
|
+
vErrors = vErrors === null ? validate27.errors : vErrors.concat(validate27.errors);
|
|
2525
2960
|
errors = vErrors.length;
|
|
2526
2961
|
}
|
|
2527
2962
|
}
|
|
2528
2963
|
} else {
|
|
2529
|
-
const
|
|
2964
|
+
const err10 = { instancePath: instancePath + "/content", schemaPath: "#/properties/content/type", keyword: "type", params: { type: "array" }, message: "must be array" };
|
|
2530
2965
|
if (vErrors === null) {
|
|
2531
|
-
vErrors = [
|
|
2966
|
+
vErrors = [err10];
|
|
2532
2967
|
} else {
|
|
2533
|
-
vErrors.push(
|
|
2968
|
+
vErrors.push(err10);
|
|
2534
2969
|
}
|
|
2535
2970
|
errors++;
|
|
2536
2971
|
}
|
|
2537
2972
|
}
|
|
2538
2973
|
} else {
|
|
2539
|
-
const
|
|
2974
|
+
const err11 = { instancePath, schemaPath: "#/type", keyword: "type", params: { type: "object" }, message: "must be object" };
|
|
2540
2975
|
if (vErrors === null) {
|
|
2541
|
-
vErrors = [
|
|
2976
|
+
vErrors = [err11];
|
|
2542
2977
|
} else {
|
|
2543
|
-
vErrors.push(
|
|
2978
|
+
vErrors.push(err11);
|
|
2544
2979
|
}
|
|
2545
2980
|
errors++;
|
|
2546
2981
|
}
|
|
2547
|
-
|
|
2982
|
+
validate26.errors = vErrors;
|
|
2548
2983
|
return errors === 0;
|
|
2549
2984
|
}
|
|
2550
|
-
var
|
|
2551
|
-
function
|
|
2985
|
+
var schema32 = { "type": "object", "required": ["type"], "properties": { "type": { "const": "orderedList" }, "attrs": { "type": "object", "properties": { "start": { "type": ["integer", "null"], "default": 1 }, "type": { "type": ["string", "null"] }, "id": { "$ref": "#/definitions/stableId" } }, "additionalProperties": false }, "content": { "type": "array", "items": { "$ref": "#/definitions/listItemNode" } } }, "additionalProperties": false };
|
|
2986
|
+
function validate30(data, { instancePath = "", parentData, parentDataProperty, rootData = data } = {}) {
|
|
2552
2987
|
let vErrors = null;
|
|
2553
2988
|
let errors = 0;
|
|
2554
2989
|
if (data && typeof data == "object" && !Array.isArray(data)) {
|
|
@@ -2587,7 +3022,7 @@ function validate28(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
2587
3022
|
let data1 = data.attrs;
|
|
2588
3023
|
if (data1 && typeof data1 == "object" && !Array.isArray(data1)) {
|
|
2589
3024
|
for (const key1 in data1) {
|
|
2590
|
-
if (!(key1 === "start" || key1 === "type")) {
|
|
3025
|
+
if (!(key1 === "start" || key1 === "type" || key1 === "id")) {
|
|
2591
3026
|
const err3 = { instancePath: instancePath + "/attrs", schemaPath: "#/properties/attrs/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key1 }, message: "must NOT have additional properties" };
|
|
2592
3027
|
if (vErrors === null) {
|
|
2593
3028
|
vErrors = [err3];
|
|
@@ -2600,7 +3035,7 @@ function validate28(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
2600
3035
|
if (data1.start !== void 0) {
|
|
2601
3036
|
let data2 = data1.start;
|
|
2602
3037
|
if (!(typeof data2 == "number" && (!(data2 % 1) && !isNaN(data2))) && data2 !== null) {
|
|
2603
|
-
const err4 = { instancePath: instancePath + "/attrs/start", schemaPath: "#/properties/attrs/properties/start/type", keyword: "type", params: { type:
|
|
3038
|
+
const err4 = { instancePath: instancePath + "/attrs/start", schemaPath: "#/properties/attrs/properties/start/type", keyword: "type", params: { type: schema32.properties.attrs.properties.start.type }, message: "must be integer,null" };
|
|
2604
3039
|
if (vErrors === null) {
|
|
2605
3040
|
vErrors = [err4];
|
|
2606
3041
|
} else {
|
|
@@ -2612,7 +3047,7 @@ function validate28(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
2612
3047
|
if (data1.type !== void 0) {
|
|
2613
3048
|
let data3 = data1.type;
|
|
2614
3049
|
if (typeof data3 !== "string" && data3 !== null) {
|
|
2615
|
-
const err5 = { instancePath: instancePath + "/attrs/type", schemaPath: "#/properties/attrs/properties/type/type", keyword: "type", params: { type:
|
|
3050
|
+
const err5 = { instancePath: instancePath + "/attrs/type", schemaPath: "#/properties/attrs/properties/type/type", keyword: "type", params: { type: schema32.properties.attrs.properties.type.type }, message: "must be string,null" };
|
|
2616
3051
|
if (vErrors === null) {
|
|
2617
3052
|
vErrors = [err5];
|
|
2618
3053
|
} else {
|
|
@@ -2621,49 +3056,112 @@ function validate28(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
2621
3056
|
errors++;
|
|
2622
3057
|
}
|
|
2623
3058
|
}
|
|
3059
|
+
if (data1.id !== void 0) {
|
|
3060
|
+
let data4 = data1.id;
|
|
3061
|
+
const _errs13 = errors;
|
|
3062
|
+
const _errs14 = errors;
|
|
3063
|
+
if (typeof data4 === "string") {
|
|
3064
|
+
if (!pattern6.test(data4)) {
|
|
3065
|
+
const err6 = {};
|
|
3066
|
+
if (vErrors === null) {
|
|
3067
|
+
vErrors = [err6];
|
|
3068
|
+
} else {
|
|
3069
|
+
vErrors.push(err6);
|
|
3070
|
+
}
|
|
3071
|
+
errors++;
|
|
3072
|
+
}
|
|
3073
|
+
}
|
|
3074
|
+
var valid3 = _errs14 === errors;
|
|
3075
|
+
if (valid3) {
|
|
3076
|
+
const err7 = { instancePath: instancePath + "/attrs/id", schemaPath: "#/definitions/stableId/not", keyword: "not", params: {}, message: "must NOT be valid" };
|
|
3077
|
+
if (vErrors === null) {
|
|
3078
|
+
vErrors = [err7];
|
|
3079
|
+
} else {
|
|
3080
|
+
vErrors.push(err7);
|
|
3081
|
+
}
|
|
3082
|
+
errors++;
|
|
3083
|
+
} else {
|
|
3084
|
+
errors = _errs13;
|
|
3085
|
+
if (vErrors !== null) {
|
|
3086
|
+
if (_errs13) {
|
|
3087
|
+
vErrors.length = _errs13;
|
|
3088
|
+
} else {
|
|
3089
|
+
vErrors = null;
|
|
3090
|
+
}
|
|
3091
|
+
}
|
|
3092
|
+
}
|
|
3093
|
+
if (typeof data4 === "string") {
|
|
3094
|
+
if (func3(data4) > 128) {
|
|
3095
|
+
const err8 = { instancePath: instancePath + "/attrs/id", schemaPath: "#/definitions/stableId/maxLength", keyword: "maxLength", params: { limit: 128 }, message: "must NOT have more than 128 characters" };
|
|
3096
|
+
if (vErrors === null) {
|
|
3097
|
+
vErrors = [err8];
|
|
3098
|
+
} else {
|
|
3099
|
+
vErrors.push(err8);
|
|
3100
|
+
}
|
|
3101
|
+
errors++;
|
|
3102
|
+
}
|
|
3103
|
+
if (func3(data4) < 1) {
|
|
3104
|
+
const err9 = { instancePath: instancePath + "/attrs/id", schemaPath: "#/definitions/stableId/minLength", keyword: "minLength", params: { limit: 1 }, message: "must NOT have fewer than 1 characters" };
|
|
3105
|
+
if (vErrors === null) {
|
|
3106
|
+
vErrors = [err9];
|
|
3107
|
+
} else {
|
|
3108
|
+
vErrors.push(err9);
|
|
3109
|
+
}
|
|
3110
|
+
errors++;
|
|
3111
|
+
}
|
|
3112
|
+
} else {
|
|
3113
|
+
const err10 = { instancePath: instancePath + "/attrs/id", schemaPath: "#/definitions/stableId/type", keyword: "type", params: { type: "string" }, message: "must be string" };
|
|
3114
|
+
if (vErrors === null) {
|
|
3115
|
+
vErrors = [err10];
|
|
3116
|
+
} else {
|
|
3117
|
+
vErrors.push(err10);
|
|
3118
|
+
}
|
|
3119
|
+
errors++;
|
|
3120
|
+
}
|
|
3121
|
+
}
|
|
2624
3122
|
} else {
|
|
2625
|
-
const
|
|
3123
|
+
const err11 = { instancePath: instancePath + "/attrs", schemaPath: "#/properties/attrs/type", keyword: "type", params: { type: "object" }, message: "must be object" };
|
|
2626
3124
|
if (vErrors === null) {
|
|
2627
|
-
vErrors = [
|
|
3125
|
+
vErrors = [err11];
|
|
2628
3126
|
} else {
|
|
2629
|
-
vErrors.push(
|
|
3127
|
+
vErrors.push(err11);
|
|
2630
3128
|
}
|
|
2631
3129
|
errors++;
|
|
2632
3130
|
}
|
|
2633
3131
|
}
|
|
2634
3132
|
if (data.content !== void 0) {
|
|
2635
|
-
let
|
|
2636
|
-
if (Array.isArray(
|
|
2637
|
-
const len0 =
|
|
3133
|
+
let data5 = data.content;
|
|
3134
|
+
if (Array.isArray(data5)) {
|
|
3135
|
+
const len0 = data5.length;
|
|
2638
3136
|
for (let i0 = 0; i0 < len0; i0++) {
|
|
2639
|
-
if (!
|
|
2640
|
-
vErrors = vErrors === null ?
|
|
3137
|
+
if (!validate27(data5[i0], { instancePath: instancePath + "/content/" + i0, parentData: data5, parentDataProperty: i0, rootData })) {
|
|
3138
|
+
vErrors = vErrors === null ? validate27.errors : vErrors.concat(validate27.errors);
|
|
2641
3139
|
errors = vErrors.length;
|
|
2642
3140
|
}
|
|
2643
3141
|
}
|
|
2644
3142
|
} else {
|
|
2645
|
-
const
|
|
3143
|
+
const err12 = { instancePath: instancePath + "/content", schemaPath: "#/properties/content/type", keyword: "type", params: { type: "array" }, message: "must be array" };
|
|
2646
3144
|
if (vErrors === null) {
|
|
2647
|
-
vErrors = [
|
|
3145
|
+
vErrors = [err12];
|
|
2648
3146
|
} else {
|
|
2649
|
-
vErrors.push(
|
|
3147
|
+
vErrors.push(err12);
|
|
2650
3148
|
}
|
|
2651
3149
|
errors++;
|
|
2652
3150
|
}
|
|
2653
3151
|
}
|
|
2654
3152
|
} else {
|
|
2655
|
-
const
|
|
3153
|
+
const err13 = { instancePath, schemaPath: "#/type", keyword: "type", params: { type: "object" }, message: "must be object" };
|
|
2656
3154
|
if (vErrors === null) {
|
|
2657
|
-
vErrors = [
|
|
3155
|
+
vErrors = [err13];
|
|
2658
3156
|
} else {
|
|
2659
|
-
vErrors.push(
|
|
3157
|
+
vErrors.push(err13);
|
|
2660
3158
|
}
|
|
2661
3159
|
errors++;
|
|
2662
3160
|
}
|
|
2663
|
-
|
|
3161
|
+
validate30.errors = vErrors;
|
|
2664
3162
|
return errors === 0;
|
|
2665
3163
|
}
|
|
2666
|
-
function
|
|
3164
|
+
function validate34(data, { instancePath = "", parentData, parentDataProperty, rootData = data } = {}) {
|
|
2667
3165
|
let vErrors = null;
|
|
2668
3166
|
let errors = 0;
|
|
2669
3167
|
if (data && typeof data == "object" && !Array.isArray(data)) {
|
|
@@ -2751,10 +3249,10 @@ function validate32(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
2751
3249
|
}
|
|
2752
3250
|
errors++;
|
|
2753
3251
|
}
|
|
2754
|
-
|
|
3252
|
+
validate34.errors = vErrors;
|
|
2755
3253
|
return errors === 0;
|
|
2756
3254
|
}
|
|
2757
|
-
function
|
|
3255
|
+
function validate33(data, { instancePath = "", parentData, parentDataProperty, rootData = data } = {}) {
|
|
2758
3256
|
let vErrors = null;
|
|
2759
3257
|
let errors = 0;
|
|
2760
3258
|
if (data && typeof data == "object" && !Array.isArray(data)) {
|
|
@@ -2768,7 +3266,7 @@ function validate31(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
2768
3266
|
errors++;
|
|
2769
3267
|
}
|
|
2770
3268
|
for (const key0 in data) {
|
|
2771
|
-
if (!(key0 === "type" || key0 === "content")) {
|
|
3269
|
+
if (!(key0 === "type" || key0 === "attrs" || key0 === "content")) {
|
|
2772
3270
|
const err1 = { instancePath, schemaPath: "#/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key0 }, message: "must NOT have additional properties" };
|
|
2773
3271
|
if (vErrors === null) {
|
|
2774
3272
|
vErrors = [err1];
|
|
@@ -2789,40 +3287,127 @@ function validate31(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
2789
3287
|
errors++;
|
|
2790
3288
|
}
|
|
2791
3289
|
}
|
|
2792
|
-
if (data.
|
|
2793
|
-
let data1 = data.
|
|
2794
|
-
if (Array.isArray(data1)) {
|
|
2795
|
-
const
|
|
2796
|
-
|
|
2797
|
-
|
|
2798
|
-
|
|
2799
|
-
|
|
2800
|
-
|
|
2801
|
-
|
|
2802
|
-
|
|
2803
|
-
|
|
2804
|
-
|
|
2805
|
-
|
|
2806
|
-
|
|
2807
|
-
|
|
2808
|
-
|
|
2809
|
-
|
|
3290
|
+
if (data.attrs !== void 0) {
|
|
3291
|
+
let data1 = data.attrs;
|
|
3292
|
+
if (data1 && typeof data1 == "object" && !Array.isArray(data1)) {
|
|
3293
|
+
for (const key1 in data1) {
|
|
3294
|
+
if (!(key1 === "id")) {
|
|
3295
|
+
const err3 = { instancePath: instancePath + "/attrs", schemaPath: "#/properties/attrs/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key1 }, message: "must NOT have additional properties" };
|
|
3296
|
+
if (vErrors === null) {
|
|
3297
|
+
vErrors = [err3];
|
|
3298
|
+
} else {
|
|
3299
|
+
vErrors.push(err3);
|
|
3300
|
+
}
|
|
3301
|
+
errors++;
|
|
3302
|
+
}
|
|
3303
|
+
}
|
|
3304
|
+
if (data1.id !== void 0) {
|
|
3305
|
+
let data2 = data1.id;
|
|
3306
|
+
const _errs9 = errors;
|
|
3307
|
+
const _errs10 = errors;
|
|
3308
|
+
if (typeof data2 === "string") {
|
|
3309
|
+
if (!pattern6.test(data2)) {
|
|
3310
|
+
const err4 = {};
|
|
3311
|
+
if (vErrors === null) {
|
|
3312
|
+
vErrors = [err4];
|
|
3313
|
+
} else {
|
|
3314
|
+
vErrors.push(err4);
|
|
3315
|
+
}
|
|
3316
|
+
errors++;
|
|
3317
|
+
}
|
|
3318
|
+
}
|
|
3319
|
+
var valid3 = _errs10 === errors;
|
|
3320
|
+
if (valid3) {
|
|
3321
|
+
const err5 = { instancePath: instancePath + "/attrs/id", schemaPath: "#/definitions/stableId/not", keyword: "not", params: {}, message: "must NOT be valid" };
|
|
3322
|
+
if (vErrors === null) {
|
|
3323
|
+
vErrors = [err5];
|
|
3324
|
+
} else {
|
|
3325
|
+
vErrors.push(err5);
|
|
3326
|
+
}
|
|
3327
|
+
errors++;
|
|
3328
|
+
} else {
|
|
3329
|
+
errors = _errs9;
|
|
3330
|
+
if (vErrors !== null) {
|
|
3331
|
+
if (_errs9) {
|
|
3332
|
+
vErrors.length = _errs9;
|
|
3333
|
+
} else {
|
|
3334
|
+
vErrors = null;
|
|
3335
|
+
}
|
|
3336
|
+
}
|
|
3337
|
+
}
|
|
3338
|
+
if (typeof data2 === "string") {
|
|
3339
|
+
if (func3(data2) > 128) {
|
|
3340
|
+
const err6 = { instancePath: instancePath + "/attrs/id", schemaPath: "#/definitions/stableId/maxLength", keyword: "maxLength", params: { limit: 128 }, message: "must NOT have more than 128 characters" };
|
|
3341
|
+
if (vErrors === null) {
|
|
3342
|
+
vErrors = [err6];
|
|
3343
|
+
} else {
|
|
3344
|
+
vErrors.push(err6);
|
|
3345
|
+
}
|
|
3346
|
+
errors++;
|
|
3347
|
+
}
|
|
3348
|
+
if (func3(data2) < 1) {
|
|
3349
|
+
const err7 = { instancePath: instancePath + "/attrs/id", schemaPath: "#/definitions/stableId/minLength", keyword: "minLength", params: { limit: 1 }, message: "must NOT have fewer than 1 characters" };
|
|
3350
|
+
if (vErrors === null) {
|
|
3351
|
+
vErrors = [err7];
|
|
3352
|
+
} else {
|
|
3353
|
+
vErrors.push(err7);
|
|
3354
|
+
}
|
|
3355
|
+
errors++;
|
|
3356
|
+
}
|
|
3357
|
+
} else {
|
|
3358
|
+
const err8 = { instancePath: instancePath + "/attrs/id", schemaPath: "#/definitions/stableId/type", keyword: "type", params: { type: "string" }, message: "must be string" };
|
|
3359
|
+
if (vErrors === null) {
|
|
3360
|
+
vErrors = [err8];
|
|
3361
|
+
} else {
|
|
3362
|
+
vErrors.push(err8);
|
|
3363
|
+
}
|
|
3364
|
+
errors++;
|
|
3365
|
+
}
|
|
3366
|
+
}
|
|
3367
|
+
} else {
|
|
3368
|
+
const err9 = { instancePath: instancePath + "/attrs", schemaPath: "#/properties/attrs/type", keyword: "type", params: { type: "object" }, message: "must be object" };
|
|
3369
|
+
if (vErrors === null) {
|
|
3370
|
+
vErrors = [err9];
|
|
3371
|
+
} else {
|
|
3372
|
+
vErrors.push(err9);
|
|
3373
|
+
}
|
|
3374
|
+
errors++;
|
|
3375
|
+
}
|
|
3376
|
+
}
|
|
3377
|
+
if (data.content !== void 0) {
|
|
3378
|
+
let data3 = data.content;
|
|
3379
|
+
if (Array.isArray(data3)) {
|
|
3380
|
+
const len0 = data3.length;
|
|
3381
|
+
for (let i0 = 0; i0 < len0; i0++) {
|
|
3382
|
+
if (!validate34(data3[i0], { instancePath: instancePath + "/content/" + i0, parentData: data3, parentDataProperty: i0, rootData })) {
|
|
3383
|
+
vErrors = vErrors === null ? validate34.errors : vErrors.concat(validate34.errors);
|
|
3384
|
+
errors = vErrors.length;
|
|
3385
|
+
}
|
|
3386
|
+
}
|
|
3387
|
+
} else {
|
|
3388
|
+
const err10 = { instancePath: instancePath + "/content", schemaPath: "#/properties/content/type", keyword: "type", params: { type: "array" }, message: "must be array" };
|
|
3389
|
+
if (vErrors === null) {
|
|
3390
|
+
vErrors = [err10];
|
|
3391
|
+
} else {
|
|
3392
|
+
vErrors.push(err10);
|
|
3393
|
+
}
|
|
3394
|
+
errors++;
|
|
2810
3395
|
}
|
|
2811
3396
|
}
|
|
2812
3397
|
} else {
|
|
2813
|
-
const
|
|
3398
|
+
const err11 = { instancePath, schemaPath: "#/type", keyword: "type", params: { type: "object" }, message: "must be object" };
|
|
2814
3399
|
if (vErrors === null) {
|
|
2815
|
-
vErrors = [
|
|
3400
|
+
vErrors = [err11];
|
|
2816
3401
|
} else {
|
|
2817
|
-
vErrors.push(
|
|
3402
|
+
vErrors.push(err11);
|
|
2818
3403
|
}
|
|
2819
3404
|
errors++;
|
|
2820
3405
|
}
|
|
2821
|
-
|
|
3406
|
+
validate33.errors = vErrors;
|
|
2822
3407
|
return errors === 0;
|
|
2823
3408
|
}
|
|
2824
|
-
var
|
|
2825
|
-
function
|
|
3409
|
+
var schema37 = { "type": "object", "required": ["type"], "properties": { "type": { "const": "codeBlock" }, "attrs": { "type": "object", "properties": { "language": { "type": ["string", "null"] }, "id": { "$ref": "#/definitions/stableId" } }, "additionalProperties": false }, "content": { "type": "array", "items": { "$ref": "#/definitions/textNode" } } }, "additionalProperties": false };
|
|
3410
|
+
function validate37(data, { instancePath = "", parentData, parentDataProperty, rootData = data } = {}) {
|
|
2826
3411
|
let vErrors = null;
|
|
2827
3412
|
let errors = 0;
|
|
2828
3413
|
if (data && typeof data == "object" && !Array.isArray(data)) {
|
|
@@ -2861,7 +3446,7 @@ function validate35(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
2861
3446
|
let data1 = data.attrs;
|
|
2862
3447
|
if (data1 && typeof data1 == "object" && !Array.isArray(data1)) {
|
|
2863
3448
|
for (const key1 in data1) {
|
|
2864
|
-
if (!(key1 === "language")) {
|
|
3449
|
+
if (!(key1 === "language" || key1 === "id")) {
|
|
2865
3450
|
const err3 = { instancePath: instancePath + "/attrs", schemaPath: "#/properties/attrs/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key1 }, message: "must NOT have additional properties" };
|
|
2866
3451
|
if (vErrors === null) {
|
|
2867
3452
|
vErrors = [err3];
|
|
@@ -2874,7 +3459,7 @@ function validate35(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
2874
3459
|
if (data1.language !== void 0) {
|
|
2875
3460
|
let data2 = data1.language;
|
|
2876
3461
|
if (typeof data2 !== "string" && data2 !== null) {
|
|
2877
|
-
const err4 = { instancePath: instancePath + "/attrs/language", schemaPath: "#/properties/attrs/properties/language/type", keyword: "type", params: { type:
|
|
3462
|
+
const err4 = { instancePath: instancePath + "/attrs/language", schemaPath: "#/properties/attrs/properties/language/type", keyword: "type", params: { type: schema37.properties.attrs.properties.language.type }, message: "must be string,null" };
|
|
2878
3463
|
if (vErrors === null) {
|
|
2879
3464
|
vErrors = [err4];
|
|
2880
3465
|
} else {
|
|
@@ -2883,51 +3468,114 @@ function validate35(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
2883
3468
|
errors++;
|
|
2884
3469
|
}
|
|
2885
3470
|
}
|
|
3471
|
+
if (data1.id !== void 0) {
|
|
3472
|
+
let data3 = data1.id;
|
|
3473
|
+
const _errs11 = errors;
|
|
3474
|
+
const _errs12 = errors;
|
|
3475
|
+
if (typeof data3 === "string") {
|
|
3476
|
+
if (!pattern6.test(data3)) {
|
|
3477
|
+
const err5 = {};
|
|
3478
|
+
if (vErrors === null) {
|
|
3479
|
+
vErrors = [err5];
|
|
3480
|
+
} else {
|
|
3481
|
+
vErrors.push(err5);
|
|
3482
|
+
}
|
|
3483
|
+
errors++;
|
|
3484
|
+
}
|
|
3485
|
+
}
|
|
3486
|
+
var valid3 = _errs12 === errors;
|
|
3487
|
+
if (valid3) {
|
|
3488
|
+
const err6 = { instancePath: instancePath + "/attrs/id", schemaPath: "#/definitions/stableId/not", keyword: "not", params: {}, message: "must NOT be valid" };
|
|
3489
|
+
if (vErrors === null) {
|
|
3490
|
+
vErrors = [err6];
|
|
3491
|
+
} else {
|
|
3492
|
+
vErrors.push(err6);
|
|
3493
|
+
}
|
|
3494
|
+
errors++;
|
|
3495
|
+
} else {
|
|
3496
|
+
errors = _errs11;
|
|
3497
|
+
if (vErrors !== null) {
|
|
3498
|
+
if (_errs11) {
|
|
3499
|
+
vErrors.length = _errs11;
|
|
3500
|
+
} else {
|
|
3501
|
+
vErrors = null;
|
|
3502
|
+
}
|
|
3503
|
+
}
|
|
3504
|
+
}
|
|
3505
|
+
if (typeof data3 === "string") {
|
|
3506
|
+
if (func3(data3) > 128) {
|
|
3507
|
+
const err7 = { instancePath: instancePath + "/attrs/id", schemaPath: "#/definitions/stableId/maxLength", keyword: "maxLength", params: { limit: 128 }, message: "must NOT have more than 128 characters" };
|
|
3508
|
+
if (vErrors === null) {
|
|
3509
|
+
vErrors = [err7];
|
|
3510
|
+
} else {
|
|
3511
|
+
vErrors.push(err7);
|
|
3512
|
+
}
|
|
3513
|
+
errors++;
|
|
3514
|
+
}
|
|
3515
|
+
if (func3(data3) < 1) {
|
|
3516
|
+
const err8 = { instancePath: instancePath + "/attrs/id", schemaPath: "#/definitions/stableId/minLength", keyword: "minLength", params: { limit: 1 }, message: "must NOT have fewer than 1 characters" };
|
|
3517
|
+
if (vErrors === null) {
|
|
3518
|
+
vErrors = [err8];
|
|
3519
|
+
} else {
|
|
3520
|
+
vErrors.push(err8);
|
|
3521
|
+
}
|
|
3522
|
+
errors++;
|
|
3523
|
+
}
|
|
3524
|
+
} else {
|
|
3525
|
+
const err9 = { instancePath: instancePath + "/attrs/id", schemaPath: "#/definitions/stableId/type", keyword: "type", params: { type: "string" }, message: "must be string" };
|
|
3526
|
+
if (vErrors === null) {
|
|
3527
|
+
vErrors = [err9];
|
|
3528
|
+
} else {
|
|
3529
|
+
vErrors.push(err9);
|
|
3530
|
+
}
|
|
3531
|
+
errors++;
|
|
3532
|
+
}
|
|
3533
|
+
}
|
|
2886
3534
|
} else {
|
|
2887
|
-
const
|
|
3535
|
+
const err10 = { instancePath: instancePath + "/attrs", schemaPath: "#/properties/attrs/type", keyword: "type", params: { type: "object" }, message: "must be object" };
|
|
2888
3536
|
if (vErrors === null) {
|
|
2889
|
-
vErrors = [
|
|
3537
|
+
vErrors = [err10];
|
|
2890
3538
|
} else {
|
|
2891
|
-
vErrors.push(
|
|
3539
|
+
vErrors.push(err10);
|
|
2892
3540
|
}
|
|
2893
3541
|
errors++;
|
|
2894
3542
|
}
|
|
2895
3543
|
}
|
|
2896
3544
|
if (data.content !== void 0) {
|
|
2897
|
-
let
|
|
2898
|
-
if (Array.isArray(
|
|
2899
|
-
const len0 =
|
|
3545
|
+
let data4 = data.content;
|
|
3546
|
+
if (Array.isArray(data4)) {
|
|
3547
|
+
const len0 = data4.length;
|
|
2900
3548
|
for (let i0 = 0; i0 < len0; i0++) {
|
|
2901
|
-
if (!validate17(
|
|
3549
|
+
if (!validate17(data4[i0], { instancePath: instancePath + "/content/" + i0, parentData: data4, parentDataProperty: i0, rootData })) {
|
|
2902
3550
|
vErrors = vErrors === null ? validate17.errors : vErrors.concat(validate17.errors);
|
|
2903
3551
|
errors = vErrors.length;
|
|
2904
3552
|
}
|
|
2905
3553
|
}
|
|
2906
3554
|
} else {
|
|
2907
|
-
const
|
|
3555
|
+
const err11 = { instancePath: instancePath + "/content", schemaPath: "#/properties/content/type", keyword: "type", params: { type: "array" }, message: "must be array" };
|
|
2908
3556
|
if (vErrors === null) {
|
|
2909
|
-
vErrors = [
|
|
3557
|
+
vErrors = [err11];
|
|
2910
3558
|
} else {
|
|
2911
|
-
vErrors.push(
|
|
3559
|
+
vErrors.push(err11);
|
|
2912
3560
|
}
|
|
2913
3561
|
errors++;
|
|
2914
3562
|
}
|
|
2915
3563
|
}
|
|
2916
3564
|
} else {
|
|
2917
|
-
const
|
|
3565
|
+
const err12 = { instancePath, schemaPath: "#/type", keyword: "type", params: { type: "object" }, message: "must be object" };
|
|
2918
3566
|
if (vErrors === null) {
|
|
2919
|
-
vErrors = [
|
|
3567
|
+
vErrors = [err12];
|
|
2920
3568
|
} else {
|
|
2921
|
-
vErrors.push(
|
|
3569
|
+
vErrors.push(err12);
|
|
2922
3570
|
}
|
|
2923
3571
|
errors++;
|
|
2924
3572
|
}
|
|
2925
|
-
|
|
3573
|
+
validate37.errors = vErrors;
|
|
2926
3574
|
return errors === 0;
|
|
2927
3575
|
}
|
|
2928
|
-
var
|
|
2929
|
-
var
|
|
2930
|
-
function
|
|
3576
|
+
var schema39 = { "type": "object", "required": ["type"], "properties": { "type": { "const": "table" }, "attrs": { "type": "object", "properties": { "caption": { "type": ["string", "null"], "description": "Table caption text." }, "align": { "type": "string", "enum": ["left", "center", "right"], "default": "left" }, "width": { "type": "string", "description": "CSS width value (e.g., '100%', '50%', 'auto').", "default": "auto" }, "id": { "$ref": "#/definitions/legacyReferenceId" } }, "additionalProperties": false }, "content": { "type": "array", "items": { "$ref": "#/definitions/tableRowNode" } } }, "additionalProperties": false };
|
|
3577
|
+
var schema42 = { "type": "object", "required": ["type"], "properties": { "type": { "const": "tableCell" }, "attrs": { "type": "object", "properties": { "colspan": { "type": "integer", "minimum": 1, "default": 1 }, "rowspan": { "type": "integer", "minimum": 1, "default": 1 }, "colwidth": { "type": ["array", "null"], "items": { "type": "integer" } }, "align": { "type": ["string", "null"], "enum": ["left", "center", "right", null] } }, "additionalProperties": false }, "content": { "type": "array", "items": { "$ref": "#/definitions/blockNode" } } }, "additionalProperties": false };
|
|
3578
|
+
function validate42(data, { instancePath = "", parentData, parentDataProperty, rootData = data } = {}) {
|
|
2931
3579
|
let vErrors = null;
|
|
2932
3580
|
let errors = 0;
|
|
2933
3581
|
if (data && typeof data == "object" && !Array.isArray(data)) {
|
|
@@ -3025,7 +3673,7 @@ function validate40(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
3025
3673
|
if (data1.colwidth !== void 0) {
|
|
3026
3674
|
let data4 = data1.colwidth;
|
|
3027
3675
|
if (!Array.isArray(data4) && data4 !== null) {
|
|
3028
|
-
const err8 = { instancePath: instancePath + "/attrs/colwidth", schemaPath: "#/properties/attrs/properties/colwidth/type", keyword: "type", params: { type:
|
|
3676
|
+
const err8 = { instancePath: instancePath + "/attrs/colwidth", schemaPath: "#/properties/attrs/properties/colwidth/type", keyword: "type", params: { type: schema42.properties.attrs.properties.colwidth.type }, message: "must be array,null" };
|
|
3029
3677
|
if (vErrors === null) {
|
|
3030
3678
|
vErrors = [err8];
|
|
3031
3679
|
} else {
|
|
@@ -3052,7 +3700,7 @@ function validate40(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
3052
3700
|
if (data1.align !== void 0) {
|
|
3053
3701
|
let data6 = data1.align;
|
|
3054
3702
|
if (typeof data6 !== "string" && data6 !== null) {
|
|
3055
|
-
const err10 = { instancePath: instancePath + "/attrs/align", schemaPath: "#/properties/attrs/properties/align/type", keyword: "type", params: { type:
|
|
3703
|
+
const err10 = { instancePath: instancePath + "/attrs/align", schemaPath: "#/properties/attrs/properties/align/type", keyword: "type", params: { type: schema42.properties.attrs.properties.align.type }, message: "must be string,null" };
|
|
3056
3704
|
if (vErrors === null) {
|
|
3057
3705
|
vErrors = [err10];
|
|
3058
3706
|
} else {
|
|
@@ -3061,7 +3709,7 @@ function validate40(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
3061
3709
|
errors++;
|
|
3062
3710
|
}
|
|
3063
3711
|
if (!(data6 === "left" || data6 === "center" || data6 === "right" || data6 === null)) {
|
|
3064
|
-
const err11 = { instancePath: instancePath + "/attrs/align", schemaPath: "#/properties/attrs/properties/align/enum", keyword: "enum", params: { allowedValues:
|
|
3712
|
+
const err11 = { instancePath: instancePath + "/attrs/align", schemaPath: "#/properties/attrs/properties/align/enum", keyword: "enum", params: { allowedValues: schema42.properties.attrs.properties.align.enum }, message: "must be equal to one of the allowed values" };
|
|
3065
3713
|
if (vErrors === null) {
|
|
3066
3714
|
vErrors = [err11];
|
|
3067
3715
|
} else {
|
|
@@ -3109,11 +3757,11 @@ function validate40(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
3109
3757
|
}
|
|
3110
3758
|
errors++;
|
|
3111
3759
|
}
|
|
3112
|
-
|
|
3760
|
+
validate42.errors = vErrors;
|
|
3113
3761
|
return errors === 0;
|
|
3114
3762
|
}
|
|
3115
|
-
var
|
|
3116
|
-
function
|
|
3763
|
+
var schema43 = { "type": "object", "required": ["type"], "properties": { "type": { "const": "tableHeader" }, "attrs": { "type": "object", "properties": { "colspan": { "type": "integer", "minimum": 1, "default": 1 }, "rowspan": { "type": "integer", "minimum": 1, "default": 1 }, "colwidth": { "type": ["array", "null"], "items": { "type": "integer" } }, "align": { "type": ["string", "null"], "enum": ["left", "center", "right", null] } }, "additionalProperties": false }, "content": { "type": "array", "items": { "$ref": "#/definitions/blockNode" } } }, "additionalProperties": false };
|
|
3764
|
+
function validate44(data, { instancePath = "", parentData, parentDataProperty, rootData = data } = {}) {
|
|
3117
3765
|
let vErrors = null;
|
|
3118
3766
|
let errors = 0;
|
|
3119
3767
|
if (data && typeof data == "object" && !Array.isArray(data)) {
|
|
@@ -3211,7 +3859,7 @@ function validate42(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
3211
3859
|
if (data1.colwidth !== void 0) {
|
|
3212
3860
|
let data4 = data1.colwidth;
|
|
3213
3861
|
if (!Array.isArray(data4) && data4 !== null) {
|
|
3214
|
-
const err8 = { instancePath: instancePath + "/attrs/colwidth", schemaPath: "#/properties/attrs/properties/colwidth/type", keyword: "type", params: { type:
|
|
3862
|
+
const err8 = { instancePath: instancePath + "/attrs/colwidth", schemaPath: "#/properties/attrs/properties/colwidth/type", keyword: "type", params: { type: schema43.properties.attrs.properties.colwidth.type }, message: "must be array,null" };
|
|
3215
3863
|
if (vErrors === null) {
|
|
3216
3864
|
vErrors = [err8];
|
|
3217
3865
|
} else {
|
|
@@ -3238,7 +3886,7 @@ function validate42(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
3238
3886
|
if (data1.align !== void 0) {
|
|
3239
3887
|
let data6 = data1.align;
|
|
3240
3888
|
if (typeof data6 !== "string" && data6 !== null) {
|
|
3241
|
-
const err10 = { instancePath: instancePath + "/attrs/align", schemaPath: "#/properties/attrs/properties/align/type", keyword: "type", params: { type:
|
|
3889
|
+
const err10 = { instancePath: instancePath + "/attrs/align", schemaPath: "#/properties/attrs/properties/align/type", keyword: "type", params: { type: schema43.properties.attrs.properties.align.type }, message: "must be string,null" };
|
|
3242
3890
|
if (vErrors === null) {
|
|
3243
3891
|
vErrors = [err10];
|
|
3244
3892
|
} else {
|
|
@@ -3247,7 +3895,7 @@ function validate42(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
3247
3895
|
errors++;
|
|
3248
3896
|
}
|
|
3249
3897
|
if (!(data6 === "left" || data6 === "center" || data6 === "right" || data6 === null)) {
|
|
3250
|
-
const err11 = { instancePath: instancePath + "/attrs/align", schemaPath: "#/properties/attrs/properties/align/enum", keyword: "enum", params: { allowedValues:
|
|
3898
|
+
const err11 = { instancePath: instancePath + "/attrs/align", schemaPath: "#/properties/attrs/properties/align/enum", keyword: "enum", params: { allowedValues: schema43.properties.attrs.properties.align.enum }, message: "must be equal to one of the allowed values" };
|
|
3251
3899
|
if (vErrors === null) {
|
|
3252
3900
|
vErrors = [err11];
|
|
3253
3901
|
} else {
|
|
@@ -3295,10 +3943,10 @@ function validate42(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
3295
3943
|
}
|
|
3296
3944
|
errors++;
|
|
3297
3945
|
}
|
|
3298
|
-
|
|
3946
|
+
validate44.errors = vErrors;
|
|
3299
3947
|
return errors === 0;
|
|
3300
3948
|
}
|
|
3301
|
-
function
|
|
3949
|
+
function validate41(data, { instancePath = "", parentData, parentDataProperty, rootData = data } = {}) {
|
|
3302
3950
|
let vErrors = null;
|
|
3303
3951
|
let errors = 0;
|
|
3304
3952
|
if (data && typeof data == "object" && !Array.isArray(data)) {
|
|
@@ -3343,8 +3991,8 @@ function validate39(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
3343
3991
|
let valid3 = false;
|
|
3344
3992
|
let passing0 = null;
|
|
3345
3993
|
const _errs7 = errors;
|
|
3346
|
-
if (!
|
|
3347
|
-
vErrors = vErrors === null ?
|
|
3994
|
+
if (!validate42(data2, { instancePath: instancePath + "/content/" + i0, parentData: data1, parentDataProperty: i0, rootData })) {
|
|
3995
|
+
vErrors = vErrors === null ? validate42.errors : vErrors.concat(validate42.errors);
|
|
3348
3996
|
errors = vErrors.length;
|
|
3349
3997
|
}
|
|
3350
3998
|
var _valid0 = _errs7 === errors;
|
|
@@ -3353,8 +4001,8 @@ function validate39(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
3353
4001
|
passing0 = 0;
|
|
3354
4002
|
}
|
|
3355
4003
|
const _errs8 = errors;
|
|
3356
|
-
if (!
|
|
3357
|
-
vErrors = vErrors === null ?
|
|
4004
|
+
if (!validate44(data2, { instancePath: instancePath + "/content/" + i0, parentData: data1, parentDataProperty: i0, rootData })) {
|
|
4005
|
+
vErrors = vErrors === null ? validate44.errors : vErrors.concat(validate44.errors);
|
|
3358
4006
|
errors = vErrors.length;
|
|
3359
4007
|
}
|
|
3360
4008
|
var _valid0 = _errs8 === errors;
|
|
@@ -3405,10 +4053,10 @@ function validate39(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
3405
4053
|
}
|
|
3406
4054
|
errors++;
|
|
3407
4055
|
}
|
|
3408
|
-
|
|
4056
|
+
validate41.errors = vErrors;
|
|
3409
4057
|
return errors === 0;
|
|
3410
4058
|
}
|
|
3411
|
-
function
|
|
4059
|
+
function validate40(data, { instancePath = "", parentData, parentDataProperty, rootData = data } = {}) {
|
|
3412
4060
|
let vErrors = null;
|
|
3413
4061
|
let errors = 0;
|
|
3414
4062
|
if (data && typeof data == "object" && !Array.isArray(data)) {
|
|
@@ -3460,7 +4108,7 @@ function validate38(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
3460
4108
|
if (data1.caption !== void 0) {
|
|
3461
4109
|
let data2 = data1.caption;
|
|
3462
4110
|
if (typeof data2 !== "string" && data2 !== null) {
|
|
3463
|
-
const err4 = { instancePath: instancePath + "/attrs/caption", schemaPath: "#/properties/attrs/properties/caption/type", keyword: "type", params: { type:
|
|
4111
|
+
const err4 = { instancePath: instancePath + "/attrs/caption", schemaPath: "#/properties/attrs/properties/caption/type", keyword: "type", params: { type: schema39.properties.attrs.properties.caption.type }, message: "must be string,null" };
|
|
3464
4112
|
if (vErrors === null) {
|
|
3465
4113
|
vErrors = [err4];
|
|
3466
4114
|
} else {
|
|
@@ -3481,7 +4129,7 @@ function validate38(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
3481
4129
|
errors++;
|
|
3482
4130
|
}
|
|
3483
4131
|
if (!(data3 === "left" || data3 === "center" || data3 === "right")) {
|
|
3484
|
-
const err6 = { instancePath: instancePath + "/attrs/align", schemaPath: "#/properties/attrs/properties/align/enum", keyword: "enum", params: { allowedValues:
|
|
4132
|
+
const err6 = { instancePath: instancePath + "/attrs/align", schemaPath: "#/properties/attrs/properties/align/enum", keyword: "enum", params: { allowedValues: schema39.properties.attrs.properties.align.enum }, message: "must be equal to one of the allowed values" };
|
|
3485
4133
|
if (vErrors === null) {
|
|
3486
4134
|
vErrors = [err6];
|
|
3487
4135
|
} else {
|
|
@@ -3504,7 +4152,7 @@ function validate38(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
3504
4152
|
if (data1.id !== void 0) {
|
|
3505
4153
|
let data5 = data1.id;
|
|
3506
4154
|
if (typeof data5 !== "string" && data5 !== null) {
|
|
3507
|
-
const err8 = { instancePath: instancePath + "/attrs/id", schemaPath: "#/
|
|
4155
|
+
const err8 = { instancePath: instancePath + "/attrs/id", schemaPath: "#/definitions/legacyReferenceId/type", keyword: "type", params: { type: schema18.type }, message: "must be string,null" };
|
|
3508
4156
|
if (vErrors === null) {
|
|
3509
4157
|
vErrors = [err8];
|
|
3510
4158
|
} else {
|
|
@@ -3528,8 +4176,8 @@ function validate38(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
3528
4176
|
if (Array.isArray(data6)) {
|
|
3529
4177
|
const len0 = data6.length;
|
|
3530
4178
|
for (let i0 = 0; i0 < len0; i0++) {
|
|
3531
|
-
if (!
|
|
3532
|
-
vErrors = vErrors === null ?
|
|
4179
|
+
if (!validate41(data6[i0], { instancePath: instancePath + "/content/" + i0, parentData: data6, parentDataProperty: i0, rootData })) {
|
|
4180
|
+
vErrors = vErrors === null ? validate41.errors : vErrors.concat(validate41.errors);
|
|
3533
4181
|
errors = vErrors.length;
|
|
3534
4182
|
}
|
|
3535
4183
|
}
|
|
@@ -3552,77 +4200,10 @@ function validate38(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
3552
4200
|
}
|
|
3553
4201
|
errors++;
|
|
3554
4202
|
}
|
|
3555
|
-
|
|
3556
|
-
return errors === 0;
|
|
3557
|
-
}
|
|
3558
|
-
function validate46(data, { instancePath = "", parentData, parentDataProperty, rootData = data } = {}) {
|
|
3559
|
-
let vErrors = null;
|
|
3560
|
-
let errors = 0;
|
|
3561
|
-
if (data && typeof data == "object" && !Array.isArray(data)) {
|
|
3562
|
-
if (data.type === void 0) {
|
|
3563
|
-
const err0 = { instancePath, schemaPath: "#/required", keyword: "required", params: { missingProperty: "type" }, message: "must have required property 'type'" };
|
|
3564
|
-
if (vErrors === null) {
|
|
3565
|
-
vErrors = [err0];
|
|
3566
|
-
} else {
|
|
3567
|
-
vErrors.push(err0);
|
|
3568
|
-
}
|
|
3569
|
-
errors++;
|
|
3570
|
-
}
|
|
3571
|
-
for (const key0 in data) {
|
|
3572
|
-
if (!(key0 === "type" || key0 === "content")) {
|
|
3573
|
-
const err1 = { instancePath, schemaPath: "#/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key0 }, message: "must NOT have additional properties" };
|
|
3574
|
-
if (vErrors === null) {
|
|
3575
|
-
vErrors = [err1];
|
|
3576
|
-
} else {
|
|
3577
|
-
vErrors.push(err1);
|
|
3578
|
-
}
|
|
3579
|
-
errors++;
|
|
3580
|
-
}
|
|
3581
|
-
}
|
|
3582
|
-
if (data.type !== void 0) {
|
|
3583
|
-
if ("blockquote" !== data.type) {
|
|
3584
|
-
const err2 = { instancePath: instancePath + "/type", schemaPath: "#/properties/type/const", keyword: "const", params: { allowedValue: "blockquote" }, message: "must be equal to constant" };
|
|
3585
|
-
if (vErrors === null) {
|
|
3586
|
-
vErrors = [err2];
|
|
3587
|
-
} else {
|
|
3588
|
-
vErrors.push(err2);
|
|
3589
|
-
}
|
|
3590
|
-
errors++;
|
|
3591
|
-
}
|
|
3592
|
-
}
|
|
3593
|
-
if (data.content !== void 0) {
|
|
3594
|
-
let data1 = data.content;
|
|
3595
|
-
if (Array.isArray(data1)) {
|
|
3596
|
-
const len0 = data1.length;
|
|
3597
|
-
for (let i0 = 0; i0 < len0; i0++) {
|
|
3598
|
-
if (!wrapper0.validate(data1[i0], { instancePath: instancePath + "/content/" + i0, parentData: data1, parentDataProperty: i0, rootData })) {
|
|
3599
|
-
vErrors = vErrors === null ? wrapper0.validate.errors : vErrors.concat(wrapper0.validate.errors);
|
|
3600
|
-
errors = vErrors.length;
|
|
3601
|
-
}
|
|
3602
|
-
}
|
|
3603
|
-
} else {
|
|
3604
|
-
const err3 = { instancePath: instancePath + "/content", schemaPath: "#/properties/content/type", keyword: "type", params: { type: "array" }, message: "must be array" };
|
|
3605
|
-
if (vErrors === null) {
|
|
3606
|
-
vErrors = [err3];
|
|
3607
|
-
} else {
|
|
3608
|
-
vErrors.push(err3);
|
|
3609
|
-
}
|
|
3610
|
-
errors++;
|
|
3611
|
-
}
|
|
3612
|
-
}
|
|
3613
|
-
} else {
|
|
3614
|
-
const err4 = { instancePath, schemaPath: "#/type", keyword: "type", params: { type: "object" }, message: "must be object" };
|
|
3615
|
-
if (vErrors === null) {
|
|
3616
|
-
vErrors = [err4];
|
|
3617
|
-
} else {
|
|
3618
|
-
vErrors.push(err4);
|
|
3619
|
-
}
|
|
3620
|
-
errors++;
|
|
3621
|
-
}
|
|
3622
|
-
validate46.errors = vErrors;
|
|
4203
|
+
validate40.errors = vErrors;
|
|
3623
4204
|
return errors === 0;
|
|
3624
4205
|
}
|
|
3625
|
-
var
|
|
4206
|
+
var schema44 = { "type": "object", "required": ["type"], "properties": { "type": { "const": "image" }, "attrs": { "type": "object", "properties": { "src": { "type": "string", "description": "Relative path to the image file (e.g., './images/photo.png')." }, "alt": { "type": ["string", "null"], "description": "Alternative text for accessibility." }, "title": { "type": ["string", "null"], "description": "Image title (tooltip)." }, "caption": { "type": ["string", "null"], "description": "Image caption text." }, "align": { "type": "string", "enum": ["left", "center", "right"], "default": "center" }, "width": { "type": ["string", "number", "null"] }, "height": { "type": ["string", "number", "null"] }, "id": { "$ref": "#/definitions/legacyReferenceId" } }, "additionalProperties": false } }, "additionalProperties": false };
|
|
3626
4207
|
function validate48(data, { instancePath = "", parentData, parentDataProperty, rootData = data } = {}) {
|
|
3627
4208
|
let vErrors = null;
|
|
3628
4209
|
let errors = 0;
|
|
@@ -3637,7 +4218,7 @@ function validate48(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
3637
4218
|
errors++;
|
|
3638
4219
|
}
|
|
3639
4220
|
for (const key0 in data) {
|
|
3640
|
-
if (!(key0 === "type" || key0 === "attrs"
|
|
4221
|
+
if (!(key0 === "type" || key0 === "attrs")) {
|
|
3641
4222
|
const err1 = { instancePath, schemaPath: "#/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key0 }, message: "must NOT have additional properties" };
|
|
3642
4223
|
if (vErrors === null) {
|
|
3643
4224
|
vErrors = [err1];
|
|
@@ -3648,8 +4229,8 @@ function validate48(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
3648
4229
|
}
|
|
3649
4230
|
}
|
|
3650
4231
|
if (data.type !== void 0) {
|
|
3651
|
-
if ("
|
|
3652
|
-
const err2 = { instancePath: instancePath + "/type", schemaPath: "#/properties/type/const", keyword: "const", params: { allowedValue: "
|
|
4232
|
+
if ("image" !== data.type) {
|
|
4233
|
+
const err2 = { instancePath: instancePath + "/type", schemaPath: "#/properties/type/const", keyword: "const", params: { allowedValue: "image" }, message: "must be equal to constant" };
|
|
3653
4234
|
if (vErrors === null) {
|
|
3654
4235
|
vErrors = [err2];
|
|
3655
4236
|
} else {
|
|
@@ -3662,7 +4243,7 @@ function validate48(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
3662
4243
|
let data1 = data.attrs;
|
|
3663
4244
|
if (data1 && typeof data1 == "object" && !Array.isArray(data1)) {
|
|
3664
4245
|
for (const key1 in data1) {
|
|
3665
|
-
if (!(key1 === "
|
|
4246
|
+
if (!(key1 === "src" || key1 === "alt" || key1 === "title" || key1 === "caption" || key1 === "align" || key1 === "width" || key1 === "height" || key1 === "id")) {
|
|
3666
4247
|
const err3 = { instancePath: instancePath + "/attrs", schemaPath: "#/properties/attrs/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key1 }, message: "must NOT have additional properties" };
|
|
3667
4248
|
if (vErrors === null) {
|
|
3668
4249
|
vErrors = [err3];
|
|
@@ -3672,10 +4253,9 @@ function validate48(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
3672
4253
|
errors++;
|
|
3673
4254
|
}
|
|
3674
4255
|
}
|
|
3675
|
-
if (data1.
|
|
3676
|
-
|
|
3677
|
-
|
|
3678
|
-
const err4 = { instancePath: instancePath + "/attrs/variant", schemaPath: "#/properties/attrs/properties/variant/type", keyword: "type", params: { type: "string" }, message: "must be string" };
|
|
4256
|
+
if (data1.src !== void 0) {
|
|
4257
|
+
if (typeof data1.src !== "string") {
|
|
4258
|
+
const err4 = { instancePath: instancePath + "/attrs/src", schemaPath: "#/properties/attrs/properties/src/type", keyword: "type", params: { type: "string" }, message: "must be string" };
|
|
3679
4259
|
if (vErrors === null) {
|
|
3680
4260
|
vErrors = [err4];
|
|
3681
4261
|
} else {
|
|
@@ -3683,14 +4263,801 @@ function validate48(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
3683
4263
|
}
|
|
3684
4264
|
errors++;
|
|
3685
4265
|
}
|
|
3686
|
-
|
|
3687
|
-
|
|
4266
|
+
}
|
|
4267
|
+
if (data1.alt !== void 0) {
|
|
4268
|
+
let data3 = data1.alt;
|
|
4269
|
+
if (typeof data3 !== "string" && data3 !== null) {
|
|
4270
|
+
const err5 = { instancePath: instancePath + "/attrs/alt", schemaPath: "#/properties/attrs/properties/alt/type", keyword: "type", params: { type: schema44.properties.attrs.properties.alt.type }, message: "must be string,null" };
|
|
3688
4271
|
if (vErrors === null) {
|
|
3689
4272
|
vErrors = [err5];
|
|
3690
4273
|
} else {
|
|
3691
4274
|
vErrors.push(err5);
|
|
3692
4275
|
}
|
|
3693
|
-
errors++;
|
|
4276
|
+
errors++;
|
|
4277
|
+
}
|
|
4278
|
+
}
|
|
4279
|
+
if (data1.title !== void 0) {
|
|
4280
|
+
let data4 = data1.title;
|
|
4281
|
+
if (typeof data4 !== "string" && data4 !== null) {
|
|
4282
|
+
const err6 = { instancePath: instancePath + "/attrs/title", schemaPath: "#/properties/attrs/properties/title/type", keyword: "type", params: { type: schema44.properties.attrs.properties.title.type }, message: "must be string,null" };
|
|
4283
|
+
if (vErrors === null) {
|
|
4284
|
+
vErrors = [err6];
|
|
4285
|
+
} else {
|
|
4286
|
+
vErrors.push(err6);
|
|
4287
|
+
}
|
|
4288
|
+
errors++;
|
|
4289
|
+
}
|
|
4290
|
+
}
|
|
4291
|
+
if (data1.caption !== void 0) {
|
|
4292
|
+
let data5 = data1.caption;
|
|
4293
|
+
if (typeof data5 !== "string" && data5 !== null) {
|
|
4294
|
+
const err7 = { instancePath: instancePath + "/attrs/caption", schemaPath: "#/properties/attrs/properties/caption/type", keyword: "type", params: { type: schema44.properties.attrs.properties.caption.type }, message: "must be string,null" };
|
|
4295
|
+
if (vErrors === null) {
|
|
4296
|
+
vErrors = [err7];
|
|
4297
|
+
} else {
|
|
4298
|
+
vErrors.push(err7);
|
|
4299
|
+
}
|
|
4300
|
+
errors++;
|
|
4301
|
+
}
|
|
4302
|
+
}
|
|
4303
|
+
if (data1.align !== void 0) {
|
|
4304
|
+
let data6 = data1.align;
|
|
4305
|
+
if (typeof data6 !== "string") {
|
|
4306
|
+
const err8 = { instancePath: instancePath + "/attrs/align", schemaPath: "#/properties/attrs/properties/align/type", keyword: "type", params: { type: "string" }, message: "must be string" };
|
|
4307
|
+
if (vErrors === null) {
|
|
4308
|
+
vErrors = [err8];
|
|
4309
|
+
} else {
|
|
4310
|
+
vErrors.push(err8);
|
|
4311
|
+
}
|
|
4312
|
+
errors++;
|
|
4313
|
+
}
|
|
4314
|
+
if (!(data6 === "left" || data6 === "center" || data6 === "right")) {
|
|
4315
|
+
const err9 = { instancePath: instancePath + "/attrs/align", schemaPath: "#/properties/attrs/properties/align/enum", keyword: "enum", params: { allowedValues: schema44.properties.attrs.properties.align.enum }, message: "must be equal to one of the allowed values" };
|
|
4316
|
+
if (vErrors === null) {
|
|
4317
|
+
vErrors = [err9];
|
|
4318
|
+
} else {
|
|
4319
|
+
vErrors.push(err9);
|
|
4320
|
+
}
|
|
4321
|
+
errors++;
|
|
4322
|
+
}
|
|
4323
|
+
}
|
|
4324
|
+
if (data1.width !== void 0) {
|
|
4325
|
+
let data7 = data1.width;
|
|
4326
|
+
if (typeof data7 !== "string" && !(typeof data7 == "number") && data7 !== null) {
|
|
4327
|
+
const err10 = { instancePath: instancePath + "/attrs/width", schemaPath: "#/properties/attrs/properties/width/type", keyword: "type", params: { type: schema44.properties.attrs.properties.width.type }, message: "must be string,number,null" };
|
|
4328
|
+
if (vErrors === null) {
|
|
4329
|
+
vErrors = [err10];
|
|
4330
|
+
} else {
|
|
4331
|
+
vErrors.push(err10);
|
|
4332
|
+
}
|
|
4333
|
+
errors++;
|
|
4334
|
+
}
|
|
4335
|
+
}
|
|
4336
|
+
if (data1.height !== void 0) {
|
|
4337
|
+
let data8 = data1.height;
|
|
4338
|
+
if (typeof data8 !== "string" && !(typeof data8 == "number") && data8 !== null) {
|
|
4339
|
+
const err11 = { instancePath: instancePath + "/attrs/height", schemaPath: "#/properties/attrs/properties/height/type", keyword: "type", params: { type: schema44.properties.attrs.properties.height.type }, message: "must be string,number,null" };
|
|
4340
|
+
if (vErrors === null) {
|
|
4341
|
+
vErrors = [err11];
|
|
4342
|
+
} else {
|
|
4343
|
+
vErrors.push(err11);
|
|
4344
|
+
}
|
|
4345
|
+
errors++;
|
|
4346
|
+
}
|
|
4347
|
+
}
|
|
4348
|
+
if (data1.id !== void 0) {
|
|
4349
|
+
let data9 = data1.id;
|
|
4350
|
+
if (typeof data9 !== "string" && data9 !== null) {
|
|
4351
|
+
const err12 = { instancePath: instancePath + "/attrs/id", schemaPath: "#/definitions/legacyReferenceId/type", keyword: "type", params: { type: schema18.type }, message: "must be string,null" };
|
|
4352
|
+
if (vErrors === null) {
|
|
4353
|
+
vErrors = [err12];
|
|
4354
|
+
} else {
|
|
4355
|
+
vErrors.push(err12);
|
|
4356
|
+
}
|
|
4357
|
+
errors++;
|
|
4358
|
+
}
|
|
4359
|
+
}
|
|
4360
|
+
} else {
|
|
4361
|
+
const err13 = { instancePath: instancePath + "/attrs", schemaPath: "#/properties/attrs/type", keyword: "type", params: { type: "object" }, message: "must be object" };
|
|
4362
|
+
if (vErrors === null) {
|
|
4363
|
+
vErrors = [err13];
|
|
4364
|
+
} else {
|
|
4365
|
+
vErrors.push(err13);
|
|
4366
|
+
}
|
|
4367
|
+
errors++;
|
|
4368
|
+
}
|
|
4369
|
+
}
|
|
4370
|
+
} else {
|
|
4371
|
+
const err14 = { instancePath, schemaPath: "#/type", keyword: "type", params: { type: "object" }, message: "must be object" };
|
|
4372
|
+
if (vErrors === null) {
|
|
4373
|
+
vErrors = [err14];
|
|
4374
|
+
} else {
|
|
4375
|
+
vErrors.push(err14);
|
|
4376
|
+
}
|
|
4377
|
+
errors++;
|
|
4378
|
+
}
|
|
4379
|
+
validate48.errors = vErrors;
|
|
4380
|
+
return errors === 0;
|
|
4381
|
+
}
|
|
4382
|
+
function validate50(data, { instancePath = "", parentData, parentDataProperty, rootData = data } = {}) {
|
|
4383
|
+
let vErrors = null;
|
|
4384
|
+
let errors = 0;
|
|
4385
|
+
if (data && typeof data == "object" && !Array.isArray(data)) {
|
|
4386
|
+
if (data.type === void 0) {
|
|
4387
|
+
const err0 = { instancePath, schemaPath: "#/required", keyword: "required", params: { missingProperty: "type" }, message: "must have required property 'type'" };
|
|
4388
|
+
if (vErrors === null) {
|
|
4389
|
+
vErrors = [err0];
|
|
4390
|
+
} else {
|
|
4391
|
+
vErrors.push(err0);
|
|
4392
|
+
}
|
|
4393
|
+
errors++;
|
|
4394
|
+
}
|
|
4395
|
+
for (const key0 in data) {
|
|
4396
|
+
if (!(key0 === "type" || key0 === "attrs")) {
|
|
4397
|
+
const err1 = { instancePath, schemaPath: "#/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key0 }, message: "must NOT have additional properties" };
|
|
4398
|
+
if (vErrors === null) {
|
|
4399
|
+
vErrors = [err1];
|
|
4400
|
+
} else {
|
|
4401
|
+
vErrors.push(err1);
|
|
4402
|
+
}
|
|
4403
|
+
errors++;
|
|
4404
|
+
}
|
|
4405
|
+
}
|
|
4406
|
+
if (data.type !== void 0) {
|
|
4407
|
+
if ("mathBlock" !== data.type) {
|
|
4408
|
+
const err2 = { instancePath: instancePath + "/type", schemaPath: "#/properties/type/const", keyword: "const", params: { allowedValue: "mathBlock" }, message: "must be equal to constant" };
|
|
4409
|
+
if (vErrors === null) {
|
|
4410
|
+
vErrors = [err2];
|
|
4411
|
+
} else {
|
|
4412
|
+
vErrors.push(err2);
|
|
4413
|
+
}
|
|
4414
|
+
errors++;
|
|
4415
|
+
}
|
|
4416
|
+
}
|
|
4417
|
+
if (data.attrs !== void 0) {
|
|
4418
|
+
let data1 = data.attrs;
|
|
4419
|
+
if (data1 && typeof data1 == "object" && !Array.isArray(data1)) {
|
|
4420
|
+
if (data1.latex === void 0) {
|
|
4421
|
+
const err3 = { instancePath: instancePath + "/attrs", schemaPath: "#/properties/attrs/required", keyword: "required", params: { missingProperty: "latex" }, message: "must have required property 'latex'" };
|
|
4422
|
+
if (vErrors === null) {
|
|
4423
|
+
vErrors = [err3];
|
|
4424
|
+
} else {
|
|
4425
|
+
vErrors.push(err3);
|
|
4426
|
+
}
|
|
4427
|
+
errors++;
|
|
4428
|
+
}
|
|
4429
|
+
for (const key1 in data1) {
|
|
4430
|
+
if (!(key1 === "latex" || key1 === "id")) {
|
|
4431
|
+
const err4 = { instancePath: instancePath + "/attrs", schemaPath: "#/properties/attrs/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key1 }, message: "must NOT have additional properties" };
|
|
4432
|
+
if (vErrors === null) {
|
|
4433
|
+
vErrors = [err4];
|
|
4434
|
+
} else {
|
|
4435
|
+
vErrors.push(err4);
|
|
4436
|
+
}
|
|
4437
|
+
errors++;
|
|
4438
|
+
}
|
|
4439
|
+
}
|
|
4440
|
+
if (data1.latex !== void 0) {
|
|
4441
|
+
if (typeof data1.latex !== "string") {
|
|
4442
|
+
const err5 = { instancePath: instancePath + "/attrs/latex", schemaPath: "#/properties/attrs/properties/latex/type", keyword: "type", params: { type: "string" }, message: "must be string" };
|
|
4443
|
+
if (vErrors === null) {
|
|
4444
|
+
vErrors = [err5];
|
|
4445
|
+
} else {
|
|
4446
|
+
vErrors.push(err5);
|
|
4447
|
+
}
|
|
4448
|
+
errors++;
|
|
4449
|
+
}
|
|
4450
|
+
}
|
|
4451
|
+
if (data1.id !== void 0) {
|
|
4452
|
+
let data3 = data1.id;
|
|
4453
|
+
if (typeof data3 !== "string" && data3 !== null) {
|
|
4454
|
+
const err6 = { instancePath: instancePath + "/attrs/id", schemaPath: "#/definitions/legacyReferenceId/type", keyword: "type", params: { type: schema18.type }, message: "must be string,null" };
|
|
4455
|
+
if (vErrors === null) {
|
|
4456
|
+
vErrors = [err6];
|
|
4457
|
+
} else {
|
|
4458
|
+
vErrors.push(err6);
|
|
4459
|
+
}
|
|
4460
|
+
errors++;
|
|
4461
|
+
}
|
|
4462
|
+
}
|
|
4463
|
+
} else {
|
|
4464
|
+
const err7 = { instancePath: instancePath + "/attrs", schemaPath: "#/properties/attrs/type", keyword: "type", params: { type: "object" }, message: "must be object" };
|
|
4465
|
+
if (vErrors === null) {
|
|
4466
|
+
vErrors = [err7];
|
|
4467
|
+
} else {
|
|
4468
|
+
vErrors.push(err7);
|
|
4469
|
+
}
|
|
4470
|
+
errors++;
|
|
4471
|
+
}
|
|
4472
|
+
}
|
|
4473
|
+
} else {
|
|
4474
|
+
const err8 = { instancePath, schemaPath: "#/type", keyword: "type", params: { type: "object" }, message: "must be object" };
|
|
4475
|
+
if (vErrors === null) {
|
|
4476
|
+
vErrors = [err8];
|
|
4477
|
+
} else {
|
|
4478
|
+
vErrors.push(err8);
|
|
4479
|
+
}
|
|
4480
|
+
errors++;
|
|
4481
|
+
}
|
|
4482
|
+
validate50.errors = vErrors;
|
|
4483
|
+
return errors === 0;
|
|
4484
|
+
}
|
|
4485
|
+
function validate52(data, { instancePath = "", parentData, parentDataProperty, rootData = data } = {}) {
|
|
4486
|
+
let vErrors = null;
|
|
4487
|
+
let errors = 0;
|
|
4488
|
+
if (data && typeof data == "object" && !Array.isArray(data)) {
|
|
4489
|
+
if (data.type === void 0) {
|
|
4490
|
+
const err0 = { instancePath, schemaPath: "#/required", keyword: "required", params: { missingProperty: "type" }, message: "must have required property 'type'" };
|
|
4491
|
+
if (vErrors === null) {
|
|
4492
|
+
vErrors = [err0];
|
|
4493
|
+
} else {
|
|
4494
|
+
vErrors.push(err0);
|
|
4495
|
+
}
|
|
4496
|
+
errors++;
|
|
4497
|
+
}
|
|
4498
|
+
for (const key0 in data) {
|
|
4499
|
+
if (!(key0 === "type" || key0 === "attrs")) {
|
|
4500
|
+
const err1 = { instancePath, schemaPath: "#/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key0 }, message: "must NOT have additional properties" };
|
|
4501
|
+
if (vErrors === null) {
|
|
4502
|
+
vErrors = [err1];
|
|
4503
|
+
} else {
|
|
4504
|
+
vErrors.push(err1);
|
|
4505
|
+
}
|
|
4506
|
+
errors++;
|
|
4507
|
+
}
|
|
4508
|
+
}
|
|
4509
|
+
if (data.type !== void 0) {
|
|
4510
|
+
if ("diagram" !== data.type) {
|
|
4511
|
+
const err2 = { instancePath: instancePath + "/type", schemaPath: "#/properties/type/const", keyword: "const", params: { allowedValue: "diagram" }, message: "must be equal to constant" };
|
|
4512
|
+
if (vErrors === null) {
|
|
4513
|
+
vErrors = [err2];
|
|
4514
|
+
} else {
|
|
4515
|
+
vErrors.push(err2);
|
|
4516
|
+
}
|
|
4517
|
+
errors++;
|
|
4518
|
+
}
|
|
4519
|
+
}
|
|
4520
|
+
if (data.attrs !== void 0) {
|
|
4521
|
+
let data1 = data.attrs;
|
|
4522
|
+
if (data1 && typeof data1 == "object" && !Array.isArray(data1)) {
|
|
4523
|
+
if (data1.language === void 0) {
|
|
4524
|
+
const err3 = { instancePath: instancePath + "/attrs", schemaPath: "#/properties/attrs/required", keyword: "required", params: { missingProperty: "language" }, message: "must have required property 'language'" };
|
|
4525
|
+
if (vErrors === null) {
|
|
4526
|
+
vErrors = [err3];
|
|
4527
|
+
} else {
|
|
4528
|
+
vErrors.push(err3);
|
|
4529
|
+
}
|
|
4530
|
+
errors++;
|
|
4531
|
+
}
|
|
4532
|
+
if (data1.code === void 0) {
|
|
4533
|
+
const err4 = { instancePath: instancePath + "/attrs", schemaPath: "#/properties/attrs/required", keyword: "required", params: { missingProperty: "code" }, message: "must have required property 'code'" };
|
|
4534
|
+
if (vErrors === null) {
|
|
4535
|
+
vErrors = [err4];
|
|
4536
|
+
} else {
|
|
4537
|
+
vErrors.push(err4);
|
|
4538
|
+
}
|
|
4539
|
+
errors++;
|
|
4540
|
+
}
|
|
4541
|
+
for (const key1 in data1) {
|
|
4542
|
+
if (!(key1 === "language" || key1 === "code" || key1 === "id")) {
|
|
4543
|
+
const err5 = { instancePath: instancePath + "/attrs", schemaPath: "#/properties/attrs/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key1 }, message: "must NOT have additional properties" };
|
|
4544
|
+
if (vErrors === null) {
|
|
4545
|
+
vErrors = [err5];
|
|
4546
|
+
} else {
|
|
4547
|
+
vErrors.push(err5);
|
|
4548
|
+
}
|
|
4549
|
+
errors++;
|
|
4550
|
+
}
|
|
4551
|
+
}
|
|
4552
|
+
if (data1.language !== void 0) {
|
|
4553
|
+
if (typeof data1.language !== "string") {
|
|
4554
|
+
const err6 = { instancePath: instancePath + "/attrs/language", schemaPath: "#/properties/attrs/properties/language/type", keyword: "type", params: { type: "string" }, message: "must be string" };
|
|
4555
|
+
if (vErrors === null) {
|
|
4556
|
+
vErrors = [err6];
|
|
4557
|
+
} else {
|
|
4558
|
+
vErrors.push(err6);
|
|
4559
|
+
}
|
|
4560
|
+
errors++;
|
|
4561
|
+
}
|
|
4562
|
+
}
|
|
4563
|
+
if (data1.code !== void 0) {
|
|
4564
|
+
if (typeof data1.code !== "string") {
|
|
4565
|
+
const err7 = { instancePath: instancePath + "/attrs/code", schemaPath: "#/properties/attrs/properties/code/type", keyword: "type", params: { type: "string" }, message: "must be string" };
|
|
4566
|
+
if (vErrors === null) {
|
|
4567
|
+
vErrors = [err7];
|
|
4568
|
+
} else {
|
|
4569
|
+
vErrors.push(err7);
|
|
4570
|
+
}
|
|
4571
|
+
errors++;
|
|
4572
|
+
}
|
|
4573
|
+
}
|
|
4574
|
+
if (data1.id !== void 0) {
|
|
4575
|
+
let data4 = data1.id;
|
|
4576
|
+
const _errs13 = errors;
|
|
4577
|
+
const _errs14 = errors;
|
|
4578
|
+
if (typeof data4 === "string") {
|
|
4579
|
+
if (!pattern6.test(data4)) {
|
|
4580
|
+
const err8 = {};
|
|
4581
|
+
if (vErrors === null) {
|
|
4582
|
+
vErrors = [err8];
|
|
4583
|
+
} else {
|
|
4584
|
+
vErrors.push(err8);
|
|
4585
|
+
}
|
|
4586
|
+
errors++;
|
|
4587
|
+
}
|
|
4588
|
+
}
|
|
4589
|
+
var valid3 = _errs14 === errors;
|
|
4590
|
+
if (valid3) {
|
|
4591
|
+
const err9 = { instancePath: instancePath + "/attrs/id", schemaPath: "#/definitions/stableId/not", keyword: "not", params: {}, message: "must NOT be valid" };
|
|
4592
|
+
if (vErrors === null) {
|
|
4593
|
+
vErrors = [err9];
|
|
4594
|
+
} else {
|
|
4595
|
+
vErrors.push(err9);
|
|
4596
|
+
}
|
|
4597
|
+
errors++;
|
|
4598
|
+
} else {
|
|
4599
|
+
errors = _errs13;
|
|
4600
|
+
if (vErrors !== null) {
|
|
4601
|
+
if (_errs13) {
|
|
4602
|
+
vErrors.length = _errs13;
|
|
4603
|
+
} else {
|
|
4604
|
+
vErrors = null;
|
|
4605
|
+
}
|
|
4606
|
+
}
|
|
4607
|
+
}
|
|
4608
|
+
if (typeof data4 === "string") {
|
|
4609
|
+
if (func3(data4) > 128) {
|
|
4610
|
+
const err10 = { instancePath: instancePath + "/attrs/id", schemaPath: "#/definitions/stableId/maxLength", keyword: "maxLength", params: { limit: 128 }, message: "must NOT have more than 128 characters" };
|
|
4611
|
+
if (vErrors === null) {
|
|
4612
|
+
vErrors = [err10];
|
|
4613
|
+
} else {
|
|
4614
|
+
vErrors.push(err10);
|
|
4615
|
+
}
|
|
4616
|
+
errors++;
|
|
4617
|
+
}
|
|
4618
|
+
if (func3(data4) < 1) {
|
|
4619
|
+
const err11 = { instancePath: instancePath + "/attrs/id", schemaPath: "#/definitions/stableId/minLength", keyword: "minLength", params: { limit: 1 }, message: "must NOT have fewer than 1 characters" };
|
|
4620
|
+
if (vErrors === null) {
|
|
4621
|
+
vErrors = [err11];
|
|
4622
|
+
} else {
|
|
4623
|
+
vErrors.push(err11);
|
|
4624
|
+
}
|
|
4625
|
+
errors++;
|
|
4626
|
+
}
|
|
4627
|
+
} else {
|
|
4628
|
+
const err12 = { instancePath: instancePath + "/attrs/id", schemaPath: "#/definitions/stableId/type", keyword: "type", params: { type: "string" }, message: "must be string" };
|
|
4629
|
+
if (vErrors === null) {
|
|
4630
|
+
vErrors = [err12];
|
|
4631
|
+
} else {
|
|
4632
|
+
vErrors.push(err12);
|
|
4633
|
+
}
|
|
4634
|
+
errors++;
|
|
4635
|
+
}
|
|
4636
|
+
}
|
|
4637
|
+
} else {
|
|
4638
|
+
const err13 = { instancePath: instancePath + "/attrs", schemaPath: "#/properties/attrs/type", keyword: "type", params: { type: "object" }, message: "must be object" };
|
|
4639
|
+
if (vErrors === null) {
|
|
4640
|
+
vErrors = [err13];
|
|
4641
|
+
} else {
|
|
4642
|
+
vErrors.push(err13);
|
|
4643
|
+
}
|
|
4644
|
+
errors++;
|
|
4645
|
+
}
|
|
4646
|
+
}
|
|
4647
|
+
} else {
|
|
4648
|
+
const err14 = { instancePath, schemaPath: "#/type", keyword: "type", params: { type: "object" }, message: "must be object" };
|
|
4649
|
+
if (vErrors === null) {
|
|
4650
|
+
vErrors = [err14];
|
|
4651
|
+
} else {
|
|
4652
|
+
vErrors.push(err14);
|
|
4653
|
+
}
|
|
4654
|
+
errors++;
|
|
4655
|
+
}
|
|
4656
|
+
validate52.errors = vErrors;
|
|
4657
|
+
return errors === 0;
|
|
4658
|
+
}
|
|
4659
|
+
function validate54(data, { instancePath = "", parentData, parentDataProperty, rootData = data } = {}) {
|
|
4660
|
+
let vErrors = null;
|
|
4661
|
+
let errors = 0;
|
|
4662
|
+
if (data && typeof data == "object" && !Array.isArray(data)) {
|
|
4663
|
+
if (data.type === void 0) {
|
|
4664
|
+
const err0 = { instancePath, schemaPath: "#/required", keyword: "required", params: { missingProperty: "type" }, message: "must have required property 'type'" };
|
|
4665
|
+
if (vErrors === null) {
|
|
4666
|
+
vErrors = [err0];
|
|
4667
|
+
} else {
|
|
4668
|
+
vErrors.push(err0);
|
|
4669
|
+
}
|
|
4670
|
+
errors++;
|
|
4671
|
+
}
|
|
4672
|
+
for (const key0 in data) {
|
|
4673
|
+
if (!(key0 === "type" || key0 === "attrs" || key0 === "content")) {
|
|
4674
|
+
const err1 = { instancePath, schemaPath: "#/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key0 }, message: "must NOT have additional properties" };
|
|
4675
|
+
if (vErrors === null) {
|
|
4676
|
+
vErrors = [err1];
|
|
4677
|
+
} else {
|
|
4678
|
+
vErrors.push(err1);
|
|
4679
|
+
}
|
|
4680
|
+
errors++;
|
|
4681
|
+
}
|
|
4682
|
+
}
|
|
4683
|
+
if (data.type !== void 0) {
|
|
4684
|
+
if ("blockquote" !== data.type) {
|
|
4685
|
+
const err2 = { instancePath: instancePath + "/type", schemaPath: "#/properties/type/const", keyword: "const", params: { allowedValue: "blockquote" }, message: "must be equal to constant" };
|
|
4686
|
+
if (vErrors === null) {
|
|
4687
|
+
vErrors = [err2];
|
|
4688
|
+
} else {
|
|
4689
|
+
vErrors.push(err2);
|
|
4690
|
+
}
|
|
4691
|
+
errors++;
|
|
4692
|
+
}
|
|
4693
|
+
}
|
|
4694
|
+
if (data.attrs !== void 0) {
|
|
4695
|
+
let data1 = data.attrs;
|
|
4696
|
+
if (data1 && typeof data1 == "object" && !Array.isArray(data1)) {
|
|
4697
|
+
for (const key1 in data1) {
|
|
4698
|
+
if (!(key1 === "id")) {
|
|
4699
|
+
const err3 = { instancePath: instancePath + "/attrs", schemaPath: "#/properties/attrs/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key1 }, message: "must NOT have additional properties" };
|
|
4700
|
+
if (vErrors === null) {
|
|
4701
|
+
vErrors = [err3];
|
|
4702
|
+
} else {
|
|
4703
|
+
vErrors.push(err3);
|
|
4704
|
+
}
|
|
4705
|
+
errors++;
|
|
4706
|
+
}
|
|
4707
|
+
}
|
|
4708
|
+
if (data1.id !== void 0) {
|
|
4709
|
+
let data2 = data1.id;
|
|
4710
|
+
const _errs9 = errors;
|
|
4711
|
+
const _errs10 = errors;
|
|
4712
|
+
if (typeof data2 === "string") {
|
|
4713
|
+
if (!pattern6.test(data2)) {
|
|
4714
|
+
const err4 = {};
|
|
4715
|
+
if (vErrors === null) {
|
|
4716
|
+
vErrors = [err4];
|
|
4717
|
+
} else {
|
|
4718
|
+
vErrors.push(err4);
|
|
4719
|
+
}
|
|
4720
|
+
errors++;
|
|
4721
|
+
}
|
|
4722
|
+
}
|
|
4723
|
+
var valid3 = _errs10 === errors;
|
|
4724
|
+
if (valid3) {
|
|
4725
|
+
const err5 = { instancePath: instancePath + "/attrs/id", schemaPath: "#/definitions/stableId/not", keyword: "not", params: {}, message: "must NOT be valid" };
|
|
4726
|
+
if (vErrors === null) {
|
|
4727
|
+
vErrors = [err5];
|
|
4728
|
+
} else {
|
|
4729
|
+
vErrors.push(err5);
|
|
4730
|
+
}
|
|
4731
|
+
errors++;
|
|
4732
|
+
} else {
|
|
4733
|
+
errors = _errs9;
|
|
4734
|
+
if (vErrors !== null) {
|
|
4735
|
+
if (_errs9) {
|
|
4736
|
+
vErrors.length = _errs9;
|
|
4737
|
+
} else {
|
|
4738
|
+
vErrors = null;
|
|
4739
|
+
}
|
|
4740
|
+
}
|
|
4741
|
+
}
|
|
4742
|
+
if (typeof data2 === "string") {
|
|
4743
|
+
if (func3(data2) > 128) {
|
|
4744
|
+
const err6 = { instancePath: instancePath + "/attrs/id", schemaPath: "#/definitions/stableId/maxLength", keyword: "maxLength", params: { limit: 128 }, message: "must NOT have more than 128 characters" };
|
|
4745
|
+
if (vErrors === null) {
|
|
4746
|
+
vErrors = [err6];
|
|
4747
|
+
} else {
|
|
4748
|
+
vErrors.push(err6);
|
|
4749
|
+
}
|
|
4750
|
+
errors++;
|
|
4751
|
+
}
|
|
4752
|
+
if (func3(data2) < 1) {
|
|
4753
|
+
const err7 = { instancePath: instancePath + "/attrs/id", schemaPath: "#/definitions/stableId/minLength", keyword: "minLength", params: { limit: 1 }, message: "must NOT have fewer than 1 characters" };
|
|
4754
|
+
if (vErrors === null) {
|
|
4755
|
+
vErrors = [err7];
|
|
4756
|
+
} else {
|
|
4757
|
+
vErrors.push(err7);
|
|
4758
|
+
}
|
|
4759
|
+
errors++;
|
|
4760
|
+
}
|
|
4761
|
+
} else {
|
|
4762
|
+
const err8 = { instancePath: instancePath + "/attrs/id", schemaPath: "#/definitions/stableId/type", keyword: "type", params: { type: "string" }, message: "must be string" };
|
|
4763
|
+
if (vErrors === null) {
|
|
4764
|
+
vErrors = [err8];
|
|
4765
|
+
} else {
|
|
4766
|
+
vErrors.push(err8);
|
|
4767
|
+
}
|
|
4768
|
+
errors++;
|
|
4769
|
+
}
|
|
4770
|
+
}
|
|
4771
|
+
} else {
|
|
4772
|
+
const err9 = { instancePath: instancePath + "/attrs", schemaPath: "#/properties/attrs/type", keyword: "type", params: { type: "object" }, message: "must be object" };
|
|
4773
|
+
if (vErrors === null) {
|
|
4774
|
+
vErrors = [err9];
|
|
4775
|
+
} else {
|
|
4776
|
+
vErrors.push(err9);
|
|
4777
|
+
}
|
|
4778
|
+
errors++;
|
|
4779
|
+
}
|
|
4780
|
+
}
|
|
4781
|
+
if (data.content !== void 0) {
|
|
4782
|
+
let data3 = data.content;
|
|
4783
|
+
if (Array.isArray(data3)) {
|
|
4784
|
+
const len0 = data3.length;
|
|
4785
|
+
for (let i0 = 0; i0 < len0; i0++) {
|
|
4786
|
+
if (!wrapper0.validate(data3[i0], { instancePath: instancePath + "/content/" + i0, parentData: data3, parentDataProperty: i0, rootData })) {
|
|
4787
|
+
vErrors = vErrors === null ? wrapper0.validate.errors : vErrors.concat(wrapper0.validate.errors);
|
|
4788
|
+
errors = vErrors.length;
|
|
4789
|
+
}
|
|
4790
|
+
}
|
|
4791
|
+
} else {
|
|
4792
|
+
const err10 = { instancePath: instancePath + "/content", schemaPath: "#/properties/content/type", keyword: "type", params: { type: "array" }, message: "must be array" };
|
|
4793
|
+
if (vErrors === null) {
|
|
4794
|
+
vErrors = [err10];
|
|
4795
|
+
} else {
|
|
4796
|
+
vErrors.push(err10);
|
|
4797
|
+
}
|
|
4798
|
+
errors++;
|
|
4799
|
+
}
|
|
4800
|
+
}
|
|
4801
|
+
} else {
|
|
4802
|
+
const err11 = { instancePath, schemaPath: "#/type", keyword: "type", params: { type: "object" }, message: "must be object" };
|
|
4803
|
+
if (vErrors === null) {
|
|
4804
|
+
vErrors = [err11];
|
|
4805
|
+
} else {
|
|
4806
|
+
vErrors.push(err11);
|
|
4807
|
+
}
|
|
4808
|
+
errors++;
|
|
4809
|
+
}
|
|
4810
|
+
validate54.errors = vErrors;
|
|
4811
|
+
return errors === 0;
|
|
4812
|
+
}
|
|
4813
|
+
var schema52 = { "type": "object", "required": ["type"], "properties": { "type": { "const": "callout" }, "attrs": { "type": "object", "properties": { "variant": { "type": "string", "enum": ["note", "info", "tip", "warning", "danger"], "description": "Visual style of the callout block." }, "id": { "$ref": "#/definitions/stableId" } }, "additionalProperties": false }, "content": { "type": "array", "items": { "$ref": "#/definitions/blockNode" } } }, "additionalProperties": false };
|
|
4814
|
+
function validate56(data, { instancePath = "", parentData, parentDataProperty, rootData = data } = {}) {
|
|
4815
|
+
let vErrors = null;
|
|
4816
|
+
let errors = 0;
|
|
4817
|
+
if (data && typeof data == "object" && !Array.isArray(data)) {
|
|
4818
|
+
if (data.type === void 0) {
|
|
4819
|
+
const err0 = { instancePath, schemaPath: "#/required", keyword: "required", params: { missingProperty: "type" }, message: "must have required property 'type'" };
|
|
4820
|
+
if (vErrors === null) {
|
|
4821
|
+
vErrors = [err0];
|
|
4822
|
+
} else {
|
|
4823
|
+
vErrors.push(err0);
|
|
4824
|
+
}
|
|
4825
|
+
errors++;
|
|
4826
|
+
}
|
|
4827
|
+
for (const key0 in data) {
|
|
4828
|
+
if (!(key0 === "type" || key0 === "attrs" || key0 === "content")) {
|
|
4829
|
+
const err1 = { instancePath, schemaPath: "#/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key0 }, message: "must NOT have additional properties" };
|
|
4830
|
+
if (vErrors === null) {
|
|
4831
|
+
vErrors = [err1];
|
|
4832
|
+
} else {
|
|
4833
|
+
vErrors.push(err1);
|
|
4834
|
+
}
|
|
4835
|
+
errors++;
|
|
4836
|
+
}
|
|
4837
|
+
}
|
|
4838
|
+
if (data.type !== void 0) {
|
|
4839
|
+
if ("callout" !== data.type) {
|
|
4840
|
+
const err2 = { instancePath: instancePath + "/type", schemaPath: "#/properties/type/const", keyword: "const", params: { allowedValue: "callout" }, message: "must be equal to constant" };
|
|
4841
|
+
if (vErrors === null) {
|
|
4842
|
+
vErrors = [err2];
|
|
4843
|
+
} else {
|
|
4844
|
+
vErrors.push(err2);
|
|
4845
|
+
}
|
|
4846
|
+
errors++;
|
|
4847
|
+
}
|
|
4848
|
+
}
|
|
4849
|
+
if (data.attrs !== void 0) {
|
|
4850
|
+
let data1 = data.attrs;
|
|
4851
|
+
if (data1 && typeof data1 == "object" && !Array.isArray(data1)) {
|
|
4852
|
+
for (const key1 in data1) {
|
|
4853
|
+
if (!(key1 === "variant" || key1 === "id")) {
|
|
4854
|
+
const err3 = { instancePath: instancePath + "/attrs", schemaPath: "#/properties/attrs/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key1 }, message: "must NOT have additional properties" };
|
|
4855
|
+
if (vErrors === null) {
|
|
4856
|
+
vErrors = [err3];
|
|
4857
|
+
} else {
|
|
4858
|
+
vErrors.push(err3);
|
|
4859
|
+
}
|
|
4860
|
+
errors++;
|
|
4861
|
+
}
|
|
4862
|
+
}
|
|
4863
|
+
if (data1.variant !== void 0) {
|
|
4864
|
+
let data2 = data1.variant;
|
|
4865
|
+
if (typeof data2 !== "string") {
|
|
4866
|
+
const err4 = { instancePath: instancePath + "/attrs/variant", schemaPath: "#/properties/attrs/properties/variant/type", keyword: "type", params: { type: "string" }, message: "must be string" };
|
|
4867
|
+
if (vErrors === null) {
|
|
4868
|
+
vErrors = [err4];
|
|
4869
|
+
} else {
|
|
4870
|
+
vErrors.push(err4);
|
|
4871
|
+
}
|
|
4872
|
+
errors++;
|
|
4873
|
+
}
|
|
4874
|
+
if (!(data2 === "note" || data2 === "info" || data2 === "tip" || data2 === "warning" || data2 === "danger")) {
|
|
4875
|
+
const err5 = { instancePath: instancePath + "/attrs/variant", schemaPath: "#/properties/attrs/properties/variant/enum", keyword: "enum", params: { allowedValues: schema52.properties.attrs.properties.variant.enum }, message: "must be equal to one of the allowed values" };
|
|
4876
|
+
if (vErrors === null) {
|
|
4877
|
+
vErrors = [err5];
|
|
4878
|
+
} else {
|
|
4879
|
+
vErrors.push(err5);
|
|
4880
|
+
}
|
|
4881
|
+
errors++;
|
|
4882
|
+
}
|
|
4883
|
+
}
|
|
4884
|
+
if (data1.id !== void 0) {
|
|
4885
|
+
let data3 = data1.id;
|
|
4886
|
+
const _errs11 = errors;
|
|
4887
|
+
const _errs12 = errors;
|
|
4888
|
+
if (typeof data3 === "string") {
|
|
4889
|
+
if (!pattern6.test(data3)) {
|
|
4890
|
+
const err6 = {};
|
|
4891
|
+
if (vErrors === null) {
|
|
4892
|
+
vErrors = [err6];
|
|
4893
|
+
} else {
|
|
4894
|
+
vErrors.push(err6);
|
|
4895
|
+
}
|
|
4896
|
+
errors++;
|
|
4897
|
+
}
|
|
4898
|
+
}
|
|
4899
|
+
var valid3 = _errs12 === errors;
|
|
4900
|
+
if (valid3) {
|
|
4901
|
+
const err7 = { instancePath: instancePath + "/attrs/id", schemaPath: "#/definitions/stableId/not", keyword: "not", params: {}, message: "must NOT be valid" };
|
|
4902
|
+
if (vErrors === null) {
|
|
4903
|
+
vErrors = [err7];
|
|
4904
|
+
} else {
|
|
4905
|
+
vErrors.push(err7);
|
|
4906
|
+
}
|
|
4907
|
+
errors++;
|
|
4908
|
+
} else {
|
|
4909
|
+
errors = _errs11;
|
|
4910
|
+
if (vErrors !== null) {
|
|
4911
|
+
if (_errs11) {
|
|
4912
|
+
vErrors.length = _errs11;
|
|
4913
|
+
} else {
|
|
4914
|
+
vErrors = null;
|
|
4915
|
+
}
|
|
4916
|
+
}
|
|
4917
|
+
}
|
|
4918
|
+
if (typeof data3 === "string") {
|
|
4919
|
+
if (func3(data3) > 128) {
|
|
4920
|
+
const err8 = { instancePath: instancePath + "/attrs/id", schemaPath: "#/definitions/stableId/maxLength", keyword: "maxLength", params: { limit: 128 }, message: "must NOT have more than 128 characters" };
|
|
4921
|
+
if (vErrors === null) {
|
|
4922
|
+
vErrors = [err8];
|
|
4923
|
+
} else {
|
|
4924
|
+
vErrors.push(err8);
|
|
4925
|
+
}
|
|
4926
|
+
errors++;
|
|
4927
|
+
}
|
|
4928
|
+
if (func3(data3) < 1) {
|
|
4929
|
+
const err9 = { instancePath: instancePath + "/attrs/id", schemaPath: "#/definitions/stableId/minLength", keyword: "minLength", params: { limit: 1 }, message: "must NOT have fewer than 1 characters" };
|
|
4930
|
+
if (vErrors === null) {
|
|
4931
|
+
vErrors = [err9];
|
|
4932
|
+
} else {
|
|
4933
|
+
vErrors.push(err9);
|
|
4934
|
+
}
|
|
4935
|
+
errors++;
|
|
4936
|
+
}
|
|
4937
|
+
} else {
|
|
4938
|
+
const err10 = { instancePath: instancePath + "/attrs/id", schemaPath: "#/definitions/stableId/type", keyword: "type", params: { type: "string" }, message: "must be string" };
|
|
4939
|
+
if (vErrors === null) {
|
|
4940
|
+
vErrors = [err10];
|
|
4941
|
+
} else {
|
|
4942
|
+
vErrors.push(err10);
|
|
4943
|
+
}
|
|
4944
|
+
errors++;
|
|
4945
|
+
}
|
|
4946
|
+
}
|
|
4947
|
+
} else {
|
|
4948
|
+
const err11 = { instancePath: instancePath + "/attrs", schemaPath: "#/properties/attrs/type", keyword: "type", params: { type: "object" }, message: "must be object" };
|
|
4949
|
+
if (vErrors === null) {
|
|
4950
|
+
vErrors = [err11];
|
|
4951
|
+
} else {
|
|
4952
|
+
vErrors.push(err11);
|
|
4953
|
+
}
|
|
4954
|
+
errors++;
|
|
4955
|
+
}
|
|
4956
|
+
}
|
|
4957
|
+
if (data.content !== void 0) {
|
|
4958
|
+
let data4 = data.content;
|
|
4959
|
+
if (Array.isArray(data4)) {
|
|
4960
|
+
const len0 = data4.length;
|
|
4961
|
+
for (let i0 = 0; i0 < len0; i0++) {
|
|
4962
|
+
if (!wrapper0.validate(data4[i0], { instancePath: instancePath + "/content/" + i0, parentData: data4, parentDataProperty: i0, rootData })) {
|
|
4963
|
+
vErrors = vErrors === null ? wrapper0.validate.errors : vErrors.concat(wrapper0.validate.errors);
|
|
4964
|
+
errors = vErrors.length;
|
|
4965
|
+
}
|
|
4966
|
+
}
|
|
4967
|
+
} else {
|
|
4968
|
+
const err12 = { instancePath: instancePath + "/content", schemaPath: "#/properties/content/type", keyword: "type", params: { type: "array" }, message: "must be array" };
|
|
4969
|
+
if (vErrors === null) {
|
|
4970
|
+
vErrors = [err12];
|
|
4971
|
+
} else {
|
|
4972
|
+
vErrors.push(err12);
|
|
4973
|
+
}
|
|
4974
|
+
errors++;
|
|
4975
|
+
}
|
|
4976
|
+
}
|
|
4977
|
+
} else {
|
|
4978
|
+
const err13 = { instancePath, schemaPath: "#/type", keyword: "type", params: { type: "object" }, message: "must be object" };
|
|
4979
|
+
if (vErrors === null) {
|
|
4980
|
+
vErrors = [err13];
|
|
4981
|
+
} else {
|
|
4982
|
+
vErrors.push(err13);
|
|
4983
|
+
}
|
|
4984
|
+
errors++;
|
|
4985
|
+
}
|
|
4986
|
+
validate56.errors = vErrors;
|
|
4987
|
+
return errors === 0;
|
|
4988
|
+
}
|
|
4989
|
+
var schema55 = { "type": ["string", "null"], "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$", "description": "Historical horizontal-rule ID shape retained for .sdoc 1.0 compatibility; it is collision-reserved but is not an operation identity or cross-reference anchor." };
|
|
4990
|
+
var pattern17 = new RegExp("^[A-Za-z][A-Za-z0-9._:-]*$", "u");
|
|
4991
|
+
function validate58(data, { instancePath = "", parentData, parentDataProperty, rootData = data } = {}) {
|
|
4992
|
+
let vErrors = null;
|
|
4993
|
+
let errors = 0;
|
|
4994
|
+
if (data && typeof data == "object" && !Array.isArray(data)) {
|
|
4995
|
+
if (data.type === void 0) {
|
|
4996
|
+
const err0 = { instancePath, schemaPath: "#/required", keyword: "required", params: { missingProperty: "type" }, message: "must have required property 'type'" };
|
|
4997
|
+
if (vErrors === null) {
|
|
4998
|
+
vErrors = [err0];
|
|
4999
|
+
} else {
|
|
5000
|
+
vErrors.push(err0);
|
|
5001
|
+
}
|
|
5002
|
+
errors++;
|
|
5003
|
+
}
|
|
5004
|
+
for (const key0 in data) {
|
|
5005
|
+
if (!(key0 === "type" || key0 === "attrs")) {
|
|
5006
|
+
const err1 = { instancePath, schemaPath: "#/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key0 }, message: "must NOT have additional properties" };
|
|
5007
|
+
if (vErrors === null) {
|
|
5008
|
+
vErrors = [err1];
|
|
5009
|
+
} else {
|
|
5010
|
+
vErrors.push(err1);
|
|
5011
|
+
}
|
|
5012
|
+
errors++;
|
|
5013
|
+
}
|
|
5014
|
+
}
|
|
5015
|
+
if (data.type !== void 0) {
|
|
5016
|
+
if ("horizontalRule" !== data.type) {
|
|
5017
|
+
const err2 = { instancePath: instancePath + "/type", schemaPath: "#/properties/type/const", keyword: "const", params: { allowedValue: "horizontalRule" }, message: "must be equal to constant" };
|
|
5018
|
+
if (vErrors === null) {
|
|
5019
|
+
vErrors = [err2];
|
|
5020
|
+
} else {
|
|
5021
|
+
vErrors.push(err2);
|
|
5022
|
+
}
|
|
5023
|
+
errors++;
|
|
5024
|
+
}
|
|
5025
|
+
}
|
|
5026
|
+
if (data.attrs !== void 0) {
|
|
5027
|
+
let data1 = data.attrs;
|
|
5028
|
+
if (data1 && typeof data1 == "object" && !Array.isArray(data1)) {
|
|
5029
|
+
for (const key1 in data1) {
|
|
5030
|
+
if (!(key1 === "id")) {
|
|
5031
|
+
const err3 = { instancePath: instancePath + "/attrs", schemaPath: "#/properties/attrs/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key1 }, message: "must NOT have additional properties" };
|
|
5032
|
+
if (vErrors === null) {
|
|
5033
|
+
vErrors = [err3];
|
|
5034
|
+
} else {
|
|
5035
|
+
vErrors.push(err3);
|
|
5036
|
+
}
|
|
5037
|
+
errors++;
|
|
5038
|
+
}
|
|
5039
|
+
}
|
|
5040
|
+
if (data1.id !== void 0) {
|
|
5041
|
+
let data2 = data1.id;
|
|
5042
|
+
if (typeof data2 !== "string" && data2 !== null) {
|
|
5043
|
+
const err4 = { instancePath: instancePath + "/attrs/id", schemaPath: "#/definitions/historicalHorizontalRuleId/type", keyword: "type", params: { type: schema55.type }, message: "must be string,null" };
|
|
5044
|
+
if (vErrors === null) {
|
|
5045
|
+
vErrors = [err4];
|
|
5046
|
+
} else {
|
|
5047
|
+
vErrors.push(err4);
|
|
5048
|
+
}
|
|
5049
|
+
errors++;
|
|
5050
|
+
}
|
|
5051
|
+
if (typeof data2 === "string") {
|
|
5052
|
+
if (!pattern17.test(data2)) {
|
|
5053
|
+
const err5 = { instancePath: instancePath + "/attrs/id", schemaPath: "#/definitions/historicalHorizontalRuleId/pattern", keyword: "pattern", params: { pattern: "^[A-Za-z][A-Za-z0-9._:-]*$" }, message: 'must match pattern "^[A-Za-z][A-Za-z0-9._:-]*$"' };
|
|
5054
|
+
if (vErrors === null) {
|
|
5055
|
+
vErrors = [err5];
|
|
5056
|
+
} else {
|
|
5057
|
+
vErrors.push(err5);
|
|
5058
|
+
}
|
|
5059
|
+
errors++;
|
|
5060
|
+
}
|
|
3694
5061
|
}
|
|
3695
5062
|
}
|
|
3696
5063
|
} else {
|
|
@@ -3703,39 +5070,18 @@ function validate48(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
3703
5070
|
errors++;
|
|
3704
5071
|
}
|
|
3705
5072
|
}
|
|
3706
|
-
if (data.content !== void 0) {
|
|
3707
|
-
let data3 = data.content;
|
|
3708
|
-
if (Array.isArray(data3)) {
|
|
3709
|
-
const len0 = data3.length;
|
|
3710
|
-
for (let i0 = 0; i0 < len0; i0++) {
|
|
3711
|
-
if (!wrapper0.validate(data3[i0], { instancePath: instancePath + "/content/" + i0, parentData: data3, parentDataProperty: i0, rootData })) {
|
|
3712
|
-
vErrors = vErrors === null ? wrapper0.validate.errors : vErrors.concat(wrapper0.validate.errors);
|
|
3713
|
-
errors = vErrors.length;
|
|
3714
|
-
}
|
|
3715
|
-
}
|
|
3716
|
-
} else {
|
|
3717
|
-
const err7 = { instancePath: instancePath + "/content", schemaPath: "#/properties/content/type", keyword: "type", params: { type: "array" }, message: "must be array" };
|
|
3718
|
-
if (vErrors === null) {
|
|
3719
|
-
vErrors = [err7];
|
|
3720
|
-
} else {
|
|
3721
|
-
vErrors.push(err7);
|
|
3722
|
-
}
|
|
3723
|
-
errors++;
|
|
3724
|
-
}
|
|
3725
|
-
}
|
|
3726
5073
|
} else {
|
|
3727
|
-
const
|
|
5074
|
+
const err7 = { instancePath, schemaPath: "#/type", keyword: "type", params: { type: "object" }, message: "must be object" };
|
|
3728
5075
|
if (vErrors === null) {
|
|
3729
|
-
vErrors = [
|
|
5076
|
+
vErrors = [err7];
|
|
3730
5077
|
} else {
|
|
3731
|
-
vErrors.push(
|
|
5078
|
+
vErrors.push(err7);
|
|
3732
5079
|
}
|
|
3733
5080
|
errors++;
|
|
3734
5081
|
}
|
|
3735
|
-
|
|
5082
|
+
validate58.errors = vErrors;
|
|
3736
5083
|
return errors === 0;
|
|
3737
5084
|
}
|
|
3738
|
-
var pattern6 = new RegExp("^[A-Za-z][A-Za-z0-9._:-]*$", "u");
|
|
3739
5085
|
function validate14(data, { instancePath = "", parentData, parentDataProperty, rootData = data } = {}) {
|
|
3740
5086
|
let vErrors = null;
|
|
3741
5087
|
let errors = 0;
|
|
@@ -3753,8 +5099,8 @@ function validate14(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
3753
5099
|
passing0 = 0;
|
|
3754
5100
|
}
|
|
3755
5101
|
const _errs2 = errors;
|
|
3756
|
-
if (!
|
|
3757
|
-
vErrors = vErrors === null ?
|
|
5102
|
+
if (!validate23(data, { instancePath, parentData, parentDataProperty, rootData })) {
|
|
5103
|
+
vErrors = vErrors === null ? validate23.errors : vErrors.concat(validate23.errors);
|
|
3758
5104
|
errors = vErrors.length;
|
|
3759
5105
|
}
|
|
3760
5106
|
var _valid0 = _errs2 === errors;
|
|
@@ -3767,8 +5113,8 @@ function validate14(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
3767
5113
|
passing0 = 1;
|
|
3768
5114
|
}
|
|
3769
5115
|
const _errs3 = errors;
|
|
3770
|
-
if (!
|
|
3771
|
-
vErrors = vErrors === null ?
|
|
5116
|
+
if (!validate26(data, { instancePath, parentData, parentDataProperty, rootData })) {
|
|
5117
|
+
vErrors = vErrors === null ? validate26.errors : vErrors.concat(validate26.errors);
|
|
3772
5118
|
errors = vErrors.length;
|
|
3773
5119
|
}
|
|
3774
5120
|
var _valid0 = _errs3 === errors;
|
|
@@ -3781,8 +5127,8 @@ function validate14(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
3781
5127
|
passing0 = 2;
|
|
3782
5128
|
}
|
|
3783
5129
|
const _errs4 = errors;
|
|
3784
|
-
if (!
|
|
3785
|
-
vErrors = vErrors === null ?
|
|
5130
|
+
if (!validate30(data, { instancePath, parentData, parentDataProperty, rootData })) {
|
|
5131
|
+
vErrors = vErrors === null ? validate30.errors : vErrors.concat(validate30.errors);
|
|
3786
5132
|
errors = vErrors.length;
|
|
3787
5133
|
}
|
|
3788
5134
|
var _valid0 = _errs4 === errors;
|
|
@@ -3795,8 +5141,8 @@ function validate14(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
3795
5141
|
passing0 = 3;
|
|
3796
5142
|
}
|
|
3797
5143
|
const _errs5 = errors;
|
|
3798
|
-
if (!
|
|
3799
|
-
vErrors = vErrors === null ?
|
|
5144
|
+
if (!validate33(data, { instancePath, parentData, parentDataProperty, rootData })) {
|
|
5145
|
+
vErrors = vErrors === null ? validate33.errors : vErrors.concat(validate33.errors);
|
|
3800
5146
|
errors = vErrors.length;
|
|
3801
5147
|
}
|
|
3802
5148
|
var _valid0 = _errs5 === errors;
|
|
@@ -3809,8 +5155,8 @@ function validate14(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
3809
5155
|
passing0 = 4;
|
|
3810
5156
|
}
|
|
3811
5157
|
const _errs6 = errors;
|
|
3812
|
-
if (!
|
|
3813
|
-
vErrors = vErrors === null ?
|
|
5158
|
+
if (!validate37(data, { instancePath, parentData, parentDataProperty, rootData })) {
|
|
5159
|
+
vErrors = vErrors === null ? validate37.errors : vErrors.concat(validate37.errors);
|
|
3814
5160
|
errors = vErrors.length;
|
|
3815
5161
|
}
|
|
3816
5162
|
var _valid0 = _errs6 === errors;
|
|
@@ -3823,8 +5169,8 @@ function validate14(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
3823
5169
|
passing0 = 5;
|
|
3824
5170
|
}
|
|
3825
5171
|
const _errs7 = errors;
|
|
3826
|
-
if (!
|
|
3827
|
-
vErrors = vErrors === null ?
|
|
5172
|
+
if (!validate40(data, { instancePath, parentData, parentDataProperty, rootData })) {
|
|
5173
|
+
vErrors = vErrors === null ? validate40.errors : vErrors.concat(validate40.errors);
|
|
3828
5174
|
errors = vErrors.length;
|
|
3829
5175
|
}
|
|
3830
5176
|
var _valid0 = _errs7 === errors;
|
|
@@ -3837,174 +5183,9 @@ function validate14(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
3837
5183
|
passing0 = 6;
|
|
3838
5184
|
}
|
|
3839
5185
|
const _errs8 = errors;
|
|
3840
|
-
if (data
|
|
3841
|
-
|
|
3842
|
-
|
|
3843
|
-
if (vErrors === null) {
|
|
3844
|
-
vErrors = [err0];
|
|
3845
|
-
} else {
|
|
3846
|
-
vErrors.push(err0);
|
|
3847
|
-
}
|
|
3848
|
-
errors++;
|
|
3849
|
-
}
|
|
3850
|
-
for (const key0 in data) {
|
|
3851
|
-
if (!(key0 === "type" || key0 === "attrs")) {
|
|
3852
|
-
const err1 = { instancePath, schemaPath: "#/definitions/imageNode/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key0 }, message: "must NOT have additional properties" };
|
|
3853
|
-
if (vErrors === null) {
|
|
3854
|
-
vErrors = [err1];
|
|
3855
|
-
} else {
|
|
3856
|
-
vErrors.push(err1);
|
|
3857
|
-
}
|
|
3858
|
-
errors++;
|
|
3859
|
-
}
|
|
3860
|
-
}
|
|
3861
|
-
if (data.type !== void 0) {
|
|
3862
|
-
if ("image" !== data.type) {
|
|
3863
|
-
const err2 = { instancePath: instancePath + "/type", schemaPath: "#/definitions/imageNode/properties/type/const", keyword: "const", params: { allowedValue: "image" }, message: "must be equal to constant" };
|
|
3864
|
-
if (vErrors === null) {
|
|
3865
|
-
vErrors = [err2];
|
|
3866
|
-
} else {
|
|
3867
|
-
vErrors.push(err2);
|
|
3868
|
-
}
|
|
3869
|
-
errors++;
|
|
3870
|
-
}
|
|
3871
|
-
}
|
|
3872
|
-
if (data.attrs !== void 0) {
|
|
3873
|
-
let data1 = data.attrs;
|
|
3874
|
-
if (data1 && typeof data1 == "object" && !Array.isArray(data1)) {
|
|
3875
|
-
for (const key1 in data1) {
|
|
3876
|
-
if (!(key1 === "src" || key1 === "alt" || key1 === "title" || key1 === "caption" || key1 === "align" || key1 === "width" || key1 === "height" || key1 === "id")) {
|
|
3877
|
-
const err3 = { instancePath: instancePath + "/attrs", schemaPath: "#/definitions/imageNode/properties/attrs/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key1 }, message: "must NOT have additional properties" };
|
|
3878
|
-
if (vErrors === null) {
|
|
3879
|
-
vErrors = [err3];
|
|
3880
|
-
} else {
|
|
3881
|
-
vErrors.push(err3);
|
|
3882
|
-
}
|
|
3883
|
-
errors++;
|
|
3884
|
-
}
|
|
3885
|
-
}
|
|
3886
|
-
if (data1.src !== void 0) {
|
|
3887
|
-
if (typeof data1.src !== "string") {
|
|
3888
|
-
const err4 = { instancePath: instancePath + "/attrs/src", schemaPath: "#/definitions/imageNode/properties/attrs/properties/src/type", keyword: "type", params: { type: "string" }, message: "must be string" };
|
|
3889
|
-
if (vErrors === null) {
|
|
3890
|
-
vErrors = [err4];
|
|
3891
|
-
} else {
|
|
3892
|
-
vErrors.push(err4);
|
|
3893
|
-
}
|
|
3894
|
-
errors++;
|
|
3895
|
-
}
|
|
3896
|
-
}
|
|
3897
|
-
if (data1.alt !== void 0) {
|
|
3898
|
-
let data3 = data1.alt;
|
|
3899
|
-
if (typeof data3 !== "string" && data3 !== null) {
|
|
3900
|
-
const err5 = { instancePath: instancePath + "/attrs/alt", schemaPath: "#/definitions/imageNode/properties/attrs/properties/alt/type", keyword: "type", params: { type: schema34.properties.attrs.properties.alt.type }, message: "must be string,null" };
|
|
3901
|
-
if (vErrors === null) {
|
|
3902
|
-
vErrors = [err5];
|
|
3903
|
-
} else {
|
|
3904
|
-
vErrors.push(err5);
|
|
3905
|
-
}
|
|
3906
|
-
errors++;
|
|
3907
|
-
}
|
|
3908
|
-
}
|
|
3909
|
-
if (data1.title !== void 0) {
|
|
3910
|
-
let data4 = data1.title;
|
|
3911
|
-
if (typeof data4 !== "string" && data4 !== null) {
|
|
3912
|
-
const err6 = { instancePath: instancePath + "/attrs/title", schemaPath: "#/definitions/imageNode/properties/attrs/properties/title/type", keyword: "type", params: { type: schema34.properties.attrs.properties.title.type }, message: "must be string,null" };
|
|
3913
|
-
if (vErrors === null) {
|
|
3914
|
-
vErrors = [err6];
|
|
3915
|
-
} else {
|
|
3916
|
-
vErrors.push(err6);
|
|
3917
|
-
}
|
|
3918
|
-
errors++;
|
|
3919
|
-
}
|
|
3920
|
-
}
|
|
3921
|
-
if (data1.caption !== void 0) {
|
|
3922
|
-
let data5 = data1.caption;
|
|
3923
|
-
if (typeof data5 !== "string" && data5 !== null) {
|
|
3924
|
-
const err7 = { instancePath: instancePath + "/attrs/caption", schemaPath: "#/definitions/imageNode/properties/attrs/properties/caption/type", keyword: "type", params: { type: schema34.properties.attrs.properties.caption.type }, message: "must be string,null" };
|
|
3925
|
-
if (vErrors === null) {
|
|
3926
|
-
vErrors = [err7];
|
|
3927
|
-
} else {
|
|
3928
|
-
vErrors.push(err7);
|
|
3929
|
-
}
|
|
3930
|
-
errors++;
|
|
3931
|
-
}
|
|
3932
|
-
}
|
|
3933
|
-
if (data1.align !== void 0) {
|
|
3934
|
-
let data6 = data1.align;
|
|
3935
|
-
if (typeof data6 !== "string") {
|
|
3936
|
-
const err8 = { instancePath: instancePath + "/attrs/align", schemaPath: "#/definitions/imageNode/properties/attrs/properties/align/type", keyword: "type", params: { type: "string" }, message: "must be string" };
|
|
3937
|
-
if (vErrors === null) {
|
|
3938
|
-
vErrors = [err8];
|
|
3939
|
-
} else {
|
|
3940
|
-
vErrors.push(err8);
|
|
3941
|
-
}
|
|
3942
|
-
errors++;
|
|
3943
|
-
}
|
|
3944
|
-
if (!(data6 === "left" || data6 === "center" || data6 === "right")) {
|
|
3945
|
-
const err9 = { instancePath: instancePath + "/attrs/align", schemaPath: "#/definitions/imageNode/properties/attrs/properties/align/enum", keyword: "enum", params: { allowedValues: schema34.properties.attrs.properties.align.enum }, message: "must be equal to one of the allowed values" };
|
|
3946
|
-
if (vErrors === null) {
|
|
3947
|
-
vErrors = [err9];
|
|
3948
|
-
} else {
|
|
3949
|
-
vErrors.push(err9);
|
|
3950
|
-
}
|
|
3951
|
-
errors++;
|
|
3952
|
-
}
|
|
3953
|
-
}
|
|
3954
|
-
if (data1.width !== void 0) {
|
|
3955
|
-
let data7 = data1.width;
|
|
3956
|
-
if (typeof data7 !== "string" && !(typeof data7 == "number") && data7 !== null) {
|
|
3957
|
-
const err10 = { instancePath: instancePath + "/attrs/width", schemaPath: "#/definitions/imageNode/properties/attrs/properties/width/type", keyword: "type", params: { type: schema34.properties.attrs.properties.width.type }, message: "must be string,number,null" };
|
|
3958
|
-
if (vErrors === null) {
|
|
3959
|
-
vErrors = [err10];
|
|
3960
|
-
} else {
|
|
3961
|
-
vErrors.push(err10);
|
|
3962
|
-
}
|
|
3963
|
-
errors++;
|
|
3964
|
-
}
|
|
3965
|
-
}
|
|
3966
|
-
if (data1.height !== void 0) {
|
|
3967
|
-
let data8 = data1.height;
|
|
3968
|
-
if (typeof data8 !== "string" && !(typeof data8 == "number") && data8 !== null) {
|
|
3969
|
-
const err11 = { instancePath: instancePath + "/attrs/height", schemaPath: "#/definitions/imageNode/properties/attrs/properties/height/type", keyword: "type", params: { type: schema34.properties.attrs.properties.height.type }, message: "must be string,number,null" };
|
|
3970
|
-
if (vErrors === null) {
|
|
3971
|
-
vErrors = [err11];
|
|
3972
|
-
} else {
|
|
3973
|
-
vErrors.push(err11);
|
|
3974
|
-
}
|
|
3975
|
-
errors++;
|
|
3976
|
-
}
|
|
3977
|
-
}
|
|
3978
|
-
if (data1.id !== void 0) {
|
|
3979
|
-
let data9 = data1.id;
|
|
3980
|
-
if (typeof data9 !== "string" && data9 !== null) {
|
|
3981
|
-
const err12 = { instancePath: instancePath + "/attrs/id", schemaPath: "#/definitions/imageNode/properties/attrs/properties/id/type", keyword: "type", params: { type: schema34.properties.attrs.properties.id.type }, message: "must be string,null" };
|
|
3982
|
-
if (vErrors === null) {
|
|
3983
|
-
vErrors = [err12];
|
|
3984
|
-
} else {
|
|
3985
|
-
vErrors.push(err12);
|
|
3986
|
-
}
|
|
3987
|
-
errors++;
|
|
3988
|
-
}
|
|
3989
|
-
}
|
|
3990
|
-
} else {
|
|
3991
|
-
const err13 = { instancePath: instancePath + "/attrs", schemaPath: "#/definitions/imageNode/properties/attrs/type", keyword: "type", params: { type: "object" }, message: "must be object" };
|
|
3992
|
-
if (vErrors === null) {
|
|
3993
|
-
vErrors = [err13];
|
|
3994
|
-
} else {
|
|
3995
|
-
vErrors.push(err13);
|
|
3996
|
-
}
|
|
3997
|
-
errors++;
|
|
3998
|
-
}
|
|
3999
|
-
}
|
|
4000
|
-
} else {
|
|
4001
|
-
const err14 = { instancePath, schemaPath: "#/definitions/imageNode/type", keyword: "type", params: { type: "object" }, message: "must be object" };
|
|
4002
|
-
if (vErrors === null) {
|
|
4003
|
-
vErrors = [err14];
|
|
4004
|
-
} else {
|
|
4005
|
-
vErrors.push(err14);
|
|
4006
|
-
}
|
|
4007
|
-
errors++;
|
|
5186
|
+
if (!validate48(data, { instancePath, parentData, parentDataProperty, rootData })) {
|
|
5187
|
+
vErrors = vErrors === null ? validate48.errors : vErrors.concat(validate48.errors);
|
|
5188
|
+
errors = vErrors.length;
|
|
4008
5189
|
}
|
|
4009
5190
|
var _valid0 = _errs8 === errors;
|
|
4010
5191
|
if (_valid0 && valid0) {
|
|
@@ -4015,105 +5196,12 @@ function validate14(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
4015
5196
|
valid0 = true;
|
|
4016
5197
|
passing0 = 7;
|
|
4017
5198
|
}
|
|
4018
|
-
const
|
|
4019
|
-
if (data
|
|
4020
|
-
|
|
4021
|
-
|
|
4022
|
-
if (vErrors === null) {
|
|
4023
|
-
vErrors = [err15];
|
|
4024
|
-
} else {
|
|
4025
|
-
vErrors.push(err15);
|
|
4026
|
-
}
|
|
4027
|
-
errors++;
|
|
4028
|
-
}
|
|
4029
|
-
for (const key2 in data) {
|
|
4030
|
-
if (!(key2 === "type" || key2 === "attrs")) {
|
|
4031
|
-
const err16 = { instancePath, schemaPath: "#/definitions/mathBlockNode/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key2 }, message: "must NOT have additional properties" };
|
|
4032
|
-
if (vErrors === null) {
|
|
4033
|
-
vErrors = [err16];
|
|
4034
|
-
} else {
|
|
4035
|
-
vErrors.push(err16);
|
|
4036
|
-
}
|
|
4037
|
-
errors++;
|
|
4038
|
-
}
|
|
4039
|
-
}
|
|
4040
|
-
if (data.type !== void 0) {
|
|
4041
|
-
if ("mathBlock" !== data.type) {
|
|
4042
|
-
const err17 = { instancePath: instancePath + "/type", schemaPath: "#/definitions/mathBlockNode/properties/type/const", keyword: "const", params: { allowedValue: "mathBlock" }, message: "must be equal to constant" };
|
|
4043
|
-
if (vErrors === null) {
|
|
4044
|
-
vErrors = [err17];
|
|
4045
|
-
} else {
|
|
4046
|
-
vErrors.push(err17);
|
|
4047
|
-
}
|
|
4048
|
-
errors++;
|
|
4049
|
-
}
|
|
4050
|
-
}
|
|
4051
|
-
if (data.attrs !== void 0) {
|
|
4052
|
-
let data11 = data.attrs;
|
|
4053
|
-
if (data11 && typeof data11 == "object" && !Array.isArray(data11)) {
|
|
4054
|
-
if (data11.latex === void 0) {
|
|
4055
|
-
const err18 = { instancePath: instancePath + "/attrs", schemaPath: "#/definitions/mathBlockNode/properties/attrs/required", keyword: "required", params: { missingProperty: "latex" }, message: "must have required property 'latex'" };
|
|
4056
|
-
if (vErrors === null) {
|
|
4057
|
-
vErrors = [err18];
|
|
4058
|
-
} else {
|
|
4059
|
-
vErrors.push(err18);
|
|
4060
|
-
}
|
|
4061
|
-
errors++;
|
|
4062
|
-
}
|
|
4063
|
-
for (const key3 in data11) {
|
|
4064
|
-
if (!(key3 === "latex" || key3 === "id")) {
|
|
4065
|
-
const err19 = { instancePath: instancePath + "/attrs", schemaPath: "#/definitions/mathBlockNode/properties/attrs/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key3 }, message: "must NOT have additional properties" };
|
|
4066
|
-
if (vErrors === null) {
|
|
4067
|
-
vErrors = [err19];
|
|
4068
|
-
} else {
|
|
4069
|
-
vErrors.push(err19);
|
|
4070
|
-
}
|
|
4071
|
-
errors++;
|
|
4072
|
-
}
|
|
4073
|
-
}
|
|
4074
|
-
if (data11.latex !== void 0) {
|
|
4075
|
-
if (typeof data11.latex !== "string") {
|
|
4076
|
-
const err20 = { instancePath: instancePath + "/attrs/latex", schemaPath: "#/definitions/mathBlockNode/properties/attrs/properties/latex/type", keyword: "type", params: { type: "string" }, message: "must be string" };
|
|
4077
|
-
if (vErrors === null) {
|
|
4078
|
-
vErrors = [err20];
|
|
4079
|
-
} else {
|
|
4080
|
-
vErrors.push(err20);
|
|
4081
|
-
}
|
|
4082
|
-
errors++;
|
|
4083
|
-
}
|
|
4084
|
-
}
|
|
4085
|
-
if (data11.id !== void 0) {
|
|
4086
|
-
let data13 = data11.id;
|
|
4087
|
-
if (typeof data13 !== "string" && data13 !== null) {
|
|
4088
|
-
const err21 = { instancePath: instancePath + "/attrs/id", schemaPath: "#/definitions/mathBlockNode/properties/attrs/properties/id/type", keyword: "type", params: { type: schema35.properties.attrs.properties.id.type }, message: "must be string,null" };
|
|
4089
|
-
if (vErrors === null) {
|
|
4090
|
-
vErrors = [err21];
|
|
4091
|
-
} else {
|
|
4092
|
-
vErrors.push(err21);
|
|
4093
|
-
}
|
|
4094
|
-
errors++;
|
|
4095
|
-
}
|
|
4096
|
-
}
|
|
4097
|
-
} else {
|
|
4098
|
-
const err22 = { instancePath: instancePath + "/attrs", schemaPath: "#/definitions/mathBlockNode/properties/attrs/type", keyword: "type", params: { type: "object" }, message: "must be object" };
|
|
4099
|
-
if (vErrors === null) {
|
|
4100
|
-
vErrors = [err22];
|
|
4101
|
-
} else {
|
|
4102
|
-
vErrors.push(err22);
|
|
4103
|
-
}
|
|
4104
|
-
errors++;
|
|
4105
|
-
}
|
|
4106
|
-
}
|
|
4107
|
-
} else {
|
|
4108
|
-
const err23 = { instancePath, schemaPath: "#/definitions/mathBlockNode/type", keyword: "type", params: { type: "object" }, message: "must be object" };
|
|
4109
|
-
if (vErrors === null) {
|
|
4110
|
-
vErrors = [err23];
|
|
4111
|
-
} else {
|
|
4112
|
-
vErrors.push(err23);
|
|
4113
|
-
}
|
|
4114
|
-
errors++;
|
|
5199
|
+
const _errs9 = errors;
|
|
5200
|
+
if (!validate50(data, { instancePath, parentData, parentDataProperty, rootData })) {
|
|
5201
|
+
vErrors = vErrors === null ? validate50.errors : vErrors.concat(validate50.errors);
|
|
5202
|
+
errors = vErrors.length;
|
|
4115
5203
|
}
|
|
4116
|
-
var _valid0 =
|
|
5204
|
+
var _valid0 = _errs9 === errors;
|
|
4117
5205
|
if (_valid0 && valid0) {
|
|
4118
5206
|
valid0 = false;
|
|
4119
5207
|
passing0 = [passing0, 8];
|
|
@@ -4122,113 +5210,12 @@ function validate14(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
4122
5210
|
valid0 = true;
|
|
4123
5211
|
passing0 = 8;
|
|
4124
5212
|
}
|
|
4125
|
-
const
|
|
4126
|
-
if (data
|
|
4127
|
-
|
|
4128
|
-
|
|
4129
|
-
if (vErrors === null) {
|
|
4130
|
-
vErrors = [err24];
|
|
4131
|
-
} else {
|
|
4132
|
-
vErrors.push(err24);
|
|
4133
|
-
}
|
|
4134
|
-
errors++;
|
|
4135
|
-
}
|
|
4136
|
-
for (const key4 in data) {
|
|
4137
|
-
if (!(key4 === "type" || key4 === "attrs")) {
|
|
4138
|
-
const err25 = { instancePath, schemaPath: "#/definitions/diagramNode/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key4 }, message: "must NOT have additional properties" };
|
|
4139
|
-
if (vErrors === null) {
|
|
4140
|
-
vErrors = [err25];
|
|
4141
|
-
} else {
|
|
4142
|
-
vErrors.push(err25);
|
|
4143
|
-
}
|
|
4144
|
-
errors++;
|
|
4145
|
-
}
|
|
4146
|
-
}
|
|
4147
|
-
if (data.type !== void 0) {
|
|
4148
|
-
if ("diagram" !== data.type) {
|
|
4149
|
-
const err26 = { instancePath: instancePath + "/type", schemaPath: "#/definitions/diagramNode/properties/type/const", keyword: "const", params: { allowedValue: "diagram" }, message: "must be equal to constant" };
|
|
4150
|
-
if (vErrors === null) {
|
|
4151
|
-
vErrors = [err26];
|
|
4152
|
-
} else {
|
|
4153
|
-
vErrors.push(err26);
|
|
4154
|
-
}
|
|
4155
|
-
errors++;
|
|
4156
|
-
}
|
|
4157
|
-
}
|
|
4158
|
-
if (data.attrs !== void 0) {
|
|
4159
|
-
let data15 = data.attrs;
|
|
4160
|
-
if (data15 && typeof data15 == "object" && !Array.isArray(data15)) {
|
|
4161
|
-
if (data15.language === void 0) {
|
|
4162
|
-
const err27 = { instancePath: instancePath + "/attrs", schemaPath: "#/definitions/diagramNode/properties/attrs/required", keyword: "required", params: { missingProperty: "language" }, message: "must have required property 'language'" };
|
|
4163
|
-
if (vErrors === null) {
|
|
4164
|
-
vErrors = [err27];
|
|
4165
|
-
} else {
|
|
4166
|
-
vErrors.push(err27);
|
|
4167
|
-
}
|
|
4168
|
-
errors++;
|
|
4169
|
-
}
|
|
4170
|
-
if (data15.code === void 0) {
|
|
4171
|
-
const err28 = { instancePath: instancePath + "/attrs", schemaPath: "#/definitions/diagramNode/properties/attrs/required", keyword: "required", params: { missingProperty: "code" }, message: "must have required property 'code'" };
|
|
4172
|
-
if (vErrors === null) {
|
|
4173
|
-
vErrors = [err28];
|
|
4174
|
-
} else {
|
|
4175
|
-
vErrors.push(err28);
|
|
4176
|
-
}
|
|
4177
|
-
errors++;
|
|
4178
|
-
}
|
|
4179
|
-
for (const key5 in data15) {
|
|
4180
|
-
if (!(key5 === "language" || key5 === "code")) {
|
|
4181
|
-
const err29 = { instancePath: instancePath + "/attrs", schemaPath: "#/definitions/diagramNode/properties/attrs/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key5 }, message: "must NOT have additional properties" };
|
|
4182
|
-
if (vErrors === null) {
|
|
4183
|
-
vErrors = [err29];
|
|
4184
|
-
} else {
|
|
4185
|
-
vErrors.push(err29);
|
|
4186
|
-
}
|
|
4187
|
-
errors++;
|
|
4188
|
-
}
|
|
4189
|
-
}
|
|
4190
|
-
if (data15.language !== void 0) {
|
|
4191
|
-
if (typeof data15.language !== "string") {
|
|
4192
|
-
const err30 = { instancePath: instancePath + "/attrs/language", schemaPath: "#/definitions/diagramNode/properties/attrs/properties/language/type", keyword: "type", params: { type: "string" }, message: "must be string" };
|
|
4193
|
-
if (vErrors === null) {
|
|
4194
|
-
vErrors = [err30];
|
|
4195
|
-
} else {
|
|
4196
|
-
vErrors.push(err30);
|
|
4197
|
-
}
|
|
4198
|
-
errors++;
|
|
4199
|
-
}
|
|
4200
|
-
}
|
|
4201
|
-
if (data15.code !== void 0) {
|
|
4202
|
-
if (typeof data15.code !== "string") {
|
|
4203
|
-
const err31 = { instancePath: instancePath + "/attrs/code", schemaPath: "#/definitions/diagramNode/properties/attrs/properties/code/type", keyword: "type", params: { type: "string" }, message: "must be string" };
|
|
4204
|
-
if (vErrors === null) {
|
|
4205
|
-
vErrors = [err31];
|
|
4206
|
-
} else {
|
|
4207
|
-
vErrors.push(err31);
|
|
4208
|
-
}
|
|
4209
|
-
errors++;
|
|
4210
|
-
}
|
|
4211
|
-
}
|
|
4212
|
-
} else {
|
|
4213
|
-
const err32 = { instancePath: instancePath + "/attrs", schemaPath: "#/definitions/diagramNode/properties/attrs/type", keyword: "type", params: { type: "object" }, message: "must be object" };
|
|
4214
|
-
if (vErrors === null) {
|
|
4215
|
-
vErrors = [err32];
|
|
4216
|
-
} else {
|
|
4217
|
-
vErrors.push(err32);
|
|
4218
|
-
}
|
|
4219
|
-
errors++;
|
|
4220
|
-
}
|
|
4221
|
-
}
|
|
4222
|
-
} else {
|
|
4223
|
-
const err33 = { instancePath, schemaPath: "#/definitions/diagramNode/type", keyword: "type", params: { type: "object" }, message: "must be object" };
|
|
4224
|
-
if (vErrors === null) {
|
|
4225
|
-
vErrors = [err33];
|
|
4226
|
-
} else {
|
|
4227
|
-
vErrors.push(err33);
|
|
4228
|
-
}
|
|
4229
|
-
errors++;
|
|
5213
|
+
const _errs10 = errors;
|
|
5214
|
+
if (!validate52(data, { instancePath, parentData, parentDataProperty, rootData })) {
|
|
5215
|
+
vErrors = vErrors === null ? validate52.errors : vErrors.concat(validate52.errors);
|
|
5216
|
+
errors = vErrors.length;
|
|
4230
5217
|
}
|
|
4231
|
-
var _valid0 =
|
|
5218
|
+
var _valid0 = _errs10 === errors;
|
|
4232
5219
|
if (_valid0 && valid0) {
|
|
4233
5220
|
valid0 = false;
|
|
4234
5221
|
passing0 = [passing0, 9];
|
|
@@ -4237,12 +5224,12 @@ function validate14(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
4237
5224
|
valid0 = true;
|
|
4238
5225
|
passing0 = 9;
|
|
4239
5226
|
}
|
|
4240
|
-
const
|
|
4241
|
-
if (!
|
|
4242
|
-
vErrors = vErrors === null ?
|
|
5227
|
+
const _errs11 = errors;
|
|
5228
|
+
if (!validate54(data, { instancePath, parentData, parentDataProperty, rootData })) {
|
|
5229
|
+
vErrors = vErrors === null ? validate54.errors : vErrors.concat(validate54.errors);
|
|
4243
5230
|
errors = vErrors.length;
|
|
4244
5231
|
}
|
|
4245
|
-
var _valid0 =
|
|
5232
|
+
var _valid0 = _errs11 === errors;
|
|
4246
5233
|
if (_valid0 && valid0) {
|
|
4247
5234
|
valid0 = false;
|
|
4248
5235
|
passing0 = [passing0, 10];
|
|
@@ -4251,12 +5238,12 @@ function validate14(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
4251
5238
|
valid0 = true;
|
|
4252
5239
|
passing0 = 10;
|
|
4253
5240
|
}
|
|
4254
|
-
const
|
|
4255
|
-
if (!
|
|
4256
|
-
vErrors = vErrors === null ?
|
|
5241
|
+
const _errs12 = errors;
|
|
5242
|
+
if (!validate56(data, { instancePath, parentData, parentDataProperty, rootData })) {
|
|
5243
|
+
vErrors = vErrors === null ? validate56.errors : vErrors.concat(validate56.errors);
|
|
4257
5244
|
errors = vErrors.length;
|
|
4258
5245
|
}
|
|
4259
|
-
var _valid0 =
|
|
5246
|
+
var _valid0 = _errs12 === errors;
|
|
4260
5247
|
if (_valid0 && valid0) {
|
|
4261
5248
|
valid0 = false;
|
|
4262
5249
|
passing0 = [passing0, 11];
|
|
@@ -4265,96 +5252,12 @@ function validate14(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
4265
5252
|
valid0 = true;
|
|
4266
5253
|
passing0 = 11;
|
|
4267
5254
|
}
|
|
4268
|
-
const
|
|
4269
|
-
if (data
|
|
4270
|
-
|
|
4271
|
-
|
|
4272
|
-
if (vErrors === null) {
|
|
4273
|
-
vErrors = [err34];
|
|
4274
|
-
} else {
|
|
4275
|
-
vErrors.push(err34);
|
|
4276
|
-
}
|
|
4277
|
-
errors++;
|
|
4278
|
-
}
|
|
4279
|
-
for (const key6 in data) {
|
|
4280
|
-
if (!(key6 === "type" || key6 === "attrs")) {
|
|
4281
|
-
const err35 = { instancePath, schemaPath: "#/definitions/horizontalRuleNode/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key6 }, message: "must NOT have additional properties" };
|
|
4282
|
-
if (vErrors === null) {
|
|
4283
|
-
vErrors = [err35];
|
|
4284
|
-
} else {
|
|
4285
|
-
vErrors.push(err35);
|
|
4286
|
-
}
|
|
4287
|
-
errors++;
|
|
4288
|
-
}
|
|
4289
|
-
}
|
|
4290
|
-
if (data.type !== void 0) {
|
|
4291
|
-
if ("horizontalRule" !== data.type) {
|
|
4292
|
-
const err36 = { instancePath: instancePath + "/type", schemaPath: "#/definitions/horizontalRuleNode/properties/type/const", keyword: "const", params: { allowedValue: "horizontalRule" }, message: "must be equal to constant" };
|
|
4293
|
-
if (vErrors === null) {
|
|
4294
|
-
vErrors = [err36];
|
|
4295
|
-
} else {
|
|
4296
|
-
vErrors.push(err36);
|
|
4297
|
-
}
|
|
4298
|
-
errors++;
|
|
4299
|
-
}
|
|
4300
|
-
}
|
|
4301
|
-
if (data.attrs !== void 0) {
|
|
4302
|
-
let data19 = data.attrs;
|
|
4303
|
-
if (data19 && typeof data19 == "object" && !Array.isArray(data19)) {
|
|
4304
|
-
for (const key7 in data19) {
|
|
4305
|
-
if (!(key7 === "id")) {
|
|
4306
|
-
const err37 = { instancePath: instancePath + "/attrs", schemaPath: "#/definitions/horizontalRuleNode/properties/attrs/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key7 }, message: "must NOT have additional properties" };
|
|
4307
|
-
if (vErrors === null) {
|
|
4308
|
-
vErrors = [err37];
|
|
4309
|
-
} else {
|
|
4310
|
-
vErrors.push(err37);
|
|
4311
|
-
}
|
|
4312
|
-
errors++;
|
|
4313
|
-
}
|
|
4314
|
-
}
|
|
4315
|
-
if (data19.id !== void 0) {
|
|
4316
|
-
let data20 = data19.id;
|
|
4317
|
-
if (typeof data20 !== "string" && data20 !== null) {
|
|
4318
|
-
const err38 = { instancePath: instancePath + "/attrs/id", schemaPath: "#/definitions/horizontalRuleNode/properties/attrs/properties/id/type", keyword: "type", params: { type: schema39.properties.attrs.properties.id.type }, message: "must be string,null" };
|
|
4319
|
-
if (vErrors === null) {
|
|
4320
|
-
vErrors = [err38];
|
|
4321
|
-
} else {
|
|
4322
|
-
vErrors.push(err38);
|
|
4323
|
-
}
|
|
4324
|
-
errors++;
|
|
4325
|
-
}
|
|
4326
|
-
if (typeof data20 === "string") {
|
|
4327
|
-
if (!pattern6.test(data20)) {
|
|
4328
|
-
const err39 = { instancePath: instancePath + "/attrs/id", schemaPath: "#/definitions/horizontalRuleNode/properties/attrs/properties/id/pattern", keyword: "pattern", params: { pattern: "^[A-Za-z][A-Za-z0-9._:-]*$" }, message: 'must match pattern "^[A-Za-z][A-Za-z0-9._:-]*$"' };
|
|
4329
|
-
if (vErrors === null) {
|
|
4330
|
-
vErrors = [err39];
|
|
4331
|
-
} else {
|
|
4332
|
-
vErrors.push(err39);
|
|
4333
|
-
}
|
|
4334
|
-
errors++;
|
|
4335
|
-
}
|
|
4336
|
-
}
|
|
4337
|
-
}
|
|
4338
|
-
} else {
|
|
4339
|
-
const err40 = { instancePath: instancePath + "/attrs", schemaPath: "#/definitions/horizontalRuleNode/properties/attrs/type", keyword: "type", params: { type: "object" }, message: "must be object" };
|
|
4340
|
-
if (vErrors === null) {
|
|
4341
|
-
vErrors = [err40];
|
|
4342
|
-
} else {
|
|
4343
|
-
vErrors.push(err40);
|
|
4344
|
-
}
|
|
4345
|
-
errors++;
|
|
4346
|
-
}
|
|
4347
|
-
}
|
|
4348
|
-
} else {
|
|
4349
|
-
const err41 = { instancePath, schemaPath: "#/definitions/horizontalRuleNode/type", keyword: "type", params: { type: "object" }, message: "must be object" };
|
|
4350
|
-
if (vErrors === null) {
|
|
4351
|
-
vErrors = [err41];
|
|
4352
|
-
} else {
|
|
4353
|
-
vErrors.push(err41);
|
|
4354
|
-
}
|
|
4355
|
-
errors++;
|
|
5255
|
+
const _errs13 = errors;
|
|
5256
|
+
if (!validate58(data, { instancePath, parentData, parentDataProperty, rootData })) {
|
|
5257
|
+
vErrors = vErrors === null ? validate58.errors : vErrors.concat(validate58.errors);
|
|
5258
|
+
errors = vErrors.length;
|
|
4356
5259
|
}
|
|
4357
|
-
var _valid0 =
|
|
5260
|
+
var _valid0 = _errs13 === errors;
|
|
4358
5261
|
if (_valid0 && valid0) {
|
|
4359
5262
|
valid0 = false;
|
|
4360
5263
|
passing0 = [passing0, 12];
|
|
@@ -4363,49 +5266,49 @@ function validate14(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
4363
5266
|
valid0 = true;
|
|
4364
5267
|
passing0 = 12;
|
|
4365
5268
|
}
|
|
4366
|
-
const
|
|
5269
|
+
const _errs14 = errors;
|
|
4367
5270
|
if (data && typeof data == "object" && !Array.isArray(data)) {
|
|
4368
5271
|
if (data.type === void 0) {
|
|
4369
|
-
const
|
|
5272
|
+
const err0 = { instancePath, schemaPath: "#/definitions/hardBreakNode/required", keyword: "required", params: { missingProperty: "type" }, message: "must have required property 'type'" };
|
|
4370
5273
|
if (vErrors === null) {
|
|
4371
|
-
vErrors = [
|
|
5274
|
+
vErrors = [err0];
|
|
4372
5275
|
} else {
|
|
4373
|
-
vErrors.push(
|
|
5276
|
+
vErrors.push(err0);
|
|
4374
5277
|
}
|
|
4375
5278
|
errors++;
|
|
4376
5279
|
}
|
|
4377
|
-
for (const
|
|
4378
|
-
if (!(
|
|
4379
|
-
const
|
|
5280
|
+
for (const key0 in data) {
|
|
5281
|
+
if (!(key0 === "type")) {
|
|
5282
|
+
const err1 = { instancePath, schemaPath: "#/definitions/hardBreakNode/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key0 }, message: "must NOT have additional properties" };
|
|
4380
5283
|
if (vErrors === null) {
|
|
4381
|
-
vErrors = [
|
|
5284
|
+
vErrors = [err1];
|
|
4382
5285
|
} else {
|
|
4383
|
-
vErrors.push(
|
|
5286
|
+
vErrors.push(err1);
|
|
4384
5287
|
}
|
|
4385
5288
|
errors++;
|
|
4386
5289
|
}
|
|
4387
5290
|
}
|
|
4388
5291
|
if (data.type !== void 0) {
|
|
4389
5292
|
if ("hardBreak" !== data.type) {
|
|
4390
|
-
const
|
|
5293
|
+
const err2 = { instancePath: instancePath + "/type", schemaPath: "#/definitions/hardBreakNode/properties/type/const", keyword: "const", params: { allowedValue: "hardBreak" }, message: "must be equal to constant" };
|
|
4391
5294
|
if (vErrors === null) {
|
|
4392
|
-
vErrors = [
|
|
5295
|
+
vErrors = [err2];
|
|
4393
5296
|
} else {
|
|
4394
|
-
vErrors.push(
|
|
5297
|
+
vErrors.push(err2);
|
|
4395
5298
|
}
|
|
4396
5299
|
errors++;
|
|
4397
5300
|
}
|
|
4398
5301
|
}
|
|
4399
5302
|
} else {
|
|
4400
|
-
const
|
|
5303
|
+
const err3 = { instancePath, schemaPath: "#/definitions/hardBreakNode/type", keyword: "type", params: { type: "object" }, message: "must be object" };
|
|
4401
5304
|
if (vErrors === null) {
|
|
4402
|
-
vErrors = [
|
|
5305
|
+
vErrors = [err3];
|
|
4403
5306
|
} else {
|
|
4404
|
-
vErrors.push(
|
|
5307
|
+
vErrors.push(err3);
|
|
4405
5308
|
}
|
|
4406
5309
|
errors++;
|
|
4407
5310
|
}
|
|
4408
|
-
var _valid0 =
|
|
5311
|
+
var _valid0 = _errs14 === errors;
|
|
4409
5312
|
if (_valid0 && valid0) {
|
|
4410
5313
|
valid0 = false;
|
|
4411
5314
|
passing0 = [passing0, 13];
|
|
@@ -4428,11 +5331,11 @@ function validate14(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
4428
5331
|
}
|
|
4429
5332
|
}
|
|
4430
5333
|
if (!valid0) {
|
|
4431
|
-
const
|
|
5334
|
+
const err4 = { instancePath, schemaPath: "#/oneOf", keyword: "oneOf", params: { passingSchemas: passing0 }, message: "must match exactly one schema in oneOf" };
|
|
4432
5335
|
if (vErrors === null) {
|
|
4433
|
-
vErrors = [
|
|
5336
|
+
vErrors = [err4];
|
|
4434
5337
|
} else {
|
|
4435
|
-
vErrors.push(
|
|
5338
|
+
vErrors.push(err4);
|
|
4436
5339
|
}
|
|
4437
5340
|
errors++;
|
|
4438
5341
|
} else {
|
|
@@ -4594,8 +5497,8 @@ function validate10(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
4594
5497
|
validate10.errors = vErrors;
|
|
4595
5498
|
return errors === 0;
|
|
4596
5499
|
}
|
|
4597
|
-
var validateDoc =
|
|
4598
|
-
function
|
|
5500
|
+
var validateDoc = validate62;
|
|
5501
|
+
function validate62(data, { instancePath = "", parentData, parentDataProperty, rootData = data } = {}) {
|
|
4599
5502
|
let vErrors = null;
|
|
4600
5503
|
let errors = 0;
|
|
4601
5504
|
if (data && typeof data == "object" && !Array.isArray(data)) {
|
|
@@ -4659,11 +5562,11 @@ function validate52(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
4659
5562
|
}
|
|
4660
5563
|
errors++;
|
|
4661
5564
|
}
|
|
4662
|
-
|
|
5565
|
+
validate62.errors = vErrors;
|
|
4663
5566
|
return errors === 0;
|
|
4664
5567
|
}
|
|
4665
|
-
var validateSettingsSchema =
|
|
4666
|
-
function
|
|
5568
|
+
var validateSettingsSchema = validate64;
|
|
5569
|
+
function validate64(data, { instancePath = "", parentData, parentDataProperty, rootData = data } = {}) {
|
|
4667
5570
|
let vErrors = null;
|
|
4668
5571
|
let errors = 0;
|
|
4669
5572
|
if (data && typeof data == "object" && !Array.isArray(data)) {
|
|
@@ -5076,7 +5979,7 @@ function validate54(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
5076
5979
|
}
|
|
5077
5980
|
errors++;
|
|
5078
5981
|
}
|
|
5079
|
-
|
|
5982
|
+
validate64.errors = vErrors;
|
|
5080
5983
|
return errors === 0;
|
|
5081
5984
|
}
|
|
5082
5985
|
|
|
@@ -5326,6 +6229,49 @@ function normalizeSafeLinkUrl(value) {
|
|
|
5326
6229
|
return { ok: true, url };
|
|
5327
6230
|
}
|
|
5328
6231
|
|
|
6232
|
+
// ../shared/document/nodeIdentity.ts
|
|
6233
|
+
var MAX_AUTHORED_PERSISTENT_ID_LENGTH = 128;
|
|
6234
|
+
var PROVISIONAL_ID_PREFIX = "provisional:";
|
|
6235
|
+
var REFERENCEABLE_NODE_TYPES = /* @__PURE__ */ new Set([
|
|
6236
|
+
"heading",
|
|
6237
|
+
"image",
|
|
6238
|
+
"table",
|
|
6239
|
+
"mathBlock"
|
|
6240
|
+
]);
|
|
6241
|
+
var OPTIONAL_IDENTITY_NODE_TYPES = /* @__PURE__ */ new Set([
|
|
6242
|
+
"paragraph",
|
|
6243
|
+
"bulletList",
|
|
6244
|
+
"orderedList",
|
|
6245
|
+
"listItem",
|
|
6246
|
+
"taskList",
|
|
6247
|
+
"codeBlock",
|
|
6248
|
+
"blockquote",
|
|
6249
|
+
"callout",
|
|
6250
|
+
"diagram"
|
|
6251
|
+
]);
|
|
6252
|
+
var REQUIRED_IDENTITY_NODE_TYPES = /* @__PURE__ */ new Set([
|
|
6253
|
+
"endnote"
|
|
6254
|
+
]);
|
|
6255
|
+
var IDENTITY_BEARING_NODE_TYPES = /* @__PURE__ */ new Set([
|
|
6256
|
+
...REFERENCEABLE_NODE_TYPES,
|
|
6257
|
+
...OPTIONAL_IDENTITY_NODE_TYPES,
|
|
6258
|
+
...REQUIRED_IDENTITY_NODE_TYPES
|
|
6259
|
+
]);
|
|
6260
|
+
var ID_COLLISION_NODE_TYPES = /* @__PURE__ */ new Set([
|
|
6261
|
+
...IDENTITY_BEARING_NODE_TYPES,
|
|
6262
|
+
"horizontalRule"
|
|
6263
|
+
]);
|
|
6264
|
+
function persistedIdFor(node) {
|
|
6265
|
+
const id = node.attrs?.id;
|
|
6266
|
+
return typeof id === "string" && id.length > 0 ? id : void 0;
|
|
6267
|
+
}
|
|
6268
|
+
function isAuthorablePersistentId(value) {
|
|
6269
|
+
return value.length > 0 && unicodeCodePointLength(value) <= MAX_AUTHORED_PERSISTENT_ID_LENGTH && !value.startsWith(PROVISIONAL_ID_PREFIX);
|
|
6270
|
+
}
|
|
6271
|
+
function truncatePersistentId(value, maximum = MAX_AUTHORED_PERSISTENT_ID_LENGTH) {
|
|
6272
|
+
return Array.from(value).slice(0, maximum).join("");
|
|
6273
|
+
}
|
|
6274
|
+
|
|
5329
6275
|
// ../shared/document/numbering.ts
|
|
5330
6276
|
var textOf = (node) => node.text ?? node.content?.map(textOf).join("") ?? "";
|
|
5331
6277
|
var stringAttr = (node, name) => {
|
|
@@ -5349,6 +6295,7 @@ function buildNumberingIndex(doc, policy) {
|
|
|
5349
6295
|
let localFigure = 0;
|
|
5350
6296
|
let localTable = 0;
|
|
5351
6297
|
let localEquation = 0;
|
|
6298
|
+
let globalEndnote = 0;
|
|
5352
6299
|
const resetPaths = new Set(policy.counterResetPaths ?? []);
|
|
5353
6300
|
const add = (node, entry) => {
|
|
5354
6301
|
entries.push(entry);
|
|
@@ -5404,6 +6351,23 @@ function buildNumberingIndex(doc, policy) {
|
|
|
5404
6351
|
});
|
|
5405
6352
|
continue;
|
|
5406
6353
|
}
|
|
6354
|
+
if (node.type === "endnote") {
|
|
6355
|
+
globalEndnote += 1;
|
|
6356
|
+
const number2 = String(globalEndnote);
|
|
6357
|
+
const title2 = stringAttr(node, "body") ?? "";
|
|
6358
|
+
add(node, {
|
|
6359
|
+
kind: "endnote",
|
|
6360
|
+
id: stringAttr(node, "id"),
|
|
6361
|
+
path,
|
|
6362
|
+
number: number2,
|
|
6363
|
+
baseLabel: number2,
|
|
6364
|
+
displayLabel: number2,
|
|
6365
|
+
referenceLabel: number2,
|
|
6366
|
+
title: title2,
|
|
6367
|
+
numbered: true
|
|
6368
|
+
});
|
|
6369
|
+
continue;
|
|
6370
|
+
}
|
|
5407
6371
|
let kind;
|
|
5408
6372
|
let number = "";
|
|
5409
6373
|
let prefix = "";
|
|
@@ -5475,10 +6439,18 @@ function assignAutoIds(doc) {
|
|
|
5475
6439
|
let imageCounter = 0;
|
|
5476
6440
|
let tableCounter = 0;
|
|
5477
6441
|
let equationCounter = 0;
|
|
6442
|
+
let endnoteCounter = 0;
|
|
5478
6443
|
const uniqueGeneratedId = (base) => {
|
|
5479
|
-
|
|
6444
|
+
const boundedBase = truncatePersistentId(base);
|
|
6445
|
+
let id = boundedBase;
|
|
5480
6446
|
let suffix = 2;
|
|
5481
|
-
while (reservedExistingIds.has(id) || assignedIds.has(id))
|
|
6447
|
+
while (reservedExistingIds.has(id) || assignedIds.has(id)) {
|
|
6448
|
+
const renderedSuffix = `-${suffix++}`;
|
|
6449
|
+
id = `${truncatePersistentId(
|
|
6450
|
+
boundedBase,
|
|
6451
|
+
MAX_AUTHORED_PERSISTENT_ID_LENGTH - renderedSuffix.length
|
|
6452
|
+
)}${renderedSuffix}`;
|
|
6453
|
+
}
|
|
5482
6454
|
assignedIds.add(id);
|
|
5483
6455
|
return id;
|
|
5484
6456
|
};
|
|
@@ -5503,6 +6475,7 @@ function assignAutoIds(doc) {
|
|
|
5503
6475
|
if (node.type === "image") generatedBase = `figure-${++imageCounter}`;
|
|
5504
6476
|
if (node.type === "table") generatedBase = `table-${++tableCounter}`;
|
|
5505
6477
|
if (node.type === "mathBlock") generatedBase = `eq-${++equationCounter}`;
|
|
6478
|
+
if (node.type === "endnote") generatedBase = `endnote-${++endnoteCounter}`;
|
|
5506
6479
|
if (!generatedBase) return node;
|
|
5507
6480
|
const existing = attrString(node, "id");
|
|
5508
6481
|
const id = existing ? preserveExistingId(existing) : uniqueGeneratedId(generatedBase);
|
|
@@ -5661,14 +6634,13 @@ var MAX_CATALOG_LIMIT = 1e4;
|
|
|
5661
6634
|
var DEFAULT_SUMMARY_LENGTH = 120;
|
|
5662
6635
|
var MIN_SUMMARY_LENGTH = 20;
|
|
5663
6636
|
var MAX_SUMMARY_LENGTH = 500;
|
|
5664
|
-
var REFERENCEABLE = /* @__PURE__ */ new Set(["heading", "image", "table", "mathBlock"]);
|
|
5665
6637
|
var RENAMABLE_ID_TYPES = /* @__PURE__ */ new Set(["heading", "table"]);
|
|
5666
6638
|
var NON_BLOCK = /* @__PURE__ */ new Set([
|
|
5667
6639
|
"doc",
|
|
5668
6640
|
"text",
|
|
5669
6641
|
"mathInline",
|
|
5670
|
-
"
|
|
5671
|
-
"
|
|
6642
|
+
"endnote",
|
|
6643
|
+
"tableRow"
|
|
5672
6644
|
]);
|
|
5673
6645
|
var PORTABLE_SETTING_KEYS = /* @__PURE__ */ new Set([
|
|
5674
6646
|
"headingNumbering",
|
|
@@ -5781,6 +6753,15 @@ function load(bytes) {
|
|
|
5781
6753
|
);
|
|
5782
6754
|
}
|
|
5783
6755
|
if (!contract.ok) {
|
|
6756
|
+
const invalidIdDiagnostic = contract.diagnostics.find((item) => item.path.endsWith("/attrs/id"));
|
|
6757
|
+
if (invalidIdDiagnostic) {
|
|
6758
|
+
return failure(
|
|
6759
|
+
"document",
|
|
6760
|
+
"INVALID_ID",
|
|
6761
|
+
`persistent id is invalid: ${invalidIdDiagnostic.message}`,
|
|
6762
|
+
invalidIdDiagnostic.path
|
|
6763
|
+
);
|
|
6764
|
+
}
|
|
5784
6765
|
return {
|
|
5785
6766
|
ok: false,
|
|
5786
6767
|
category: "document",
|
|
@@ -5826,15 +6807,23 @@ function checkLimits(doc) {
|
|
|
5826
6807
|
return void 0;
|
|
5827
6808
|
}
|
|
5828
6809
|
function analyze(doc) {
|
|
5829
|
-
const
|
|
6810
|
+
const collisionIds = /* @__PURE__ */ new Set();
|
|
6811
|
+
const referenceableIds = /* @__PURE__ */ new Set();
|
|
5830
6812
|
const duplicates = [];
|
|
6813
|
+
const invalidIds = [];
|
|
5831
6814
|
let missingIds = false;
|
|
5832
6815
|
for (const { node } of walkDocument(doc)) {
|
|
5833
|
-
const id =
|
|
6816
|
+
const id = persistedIdFor(node);
|
|
5834
6817
|
if (id) {
|
|
5835
|
-
if (
|
|
5836
|
-
|
|
5837
|
-
|
|
6818
|
+
if (OPTIONAL_IDENTITY_NODE_TYPES.has(node.type) && !isAuthorablePersistentId(id)) {
|
|
6819
|
+
invalidIds.push(id);
|
|
6820
|
+
}
|
|
6821
|
+
if (ID_COLLISION_NODE_TYPES.has(node.type)) {
|
|
6822
|
+
if (collisionIds.has(id)) duplicates.push(id);
|
|
6823
|
+
collisionIds.add(id);
|
|
6824
|
+
}
|
|
6825
|
+
if (REFERENCEABLE_NODE_TYPES.has(node.type)) referenceableIds.add(id);
|
|
6826
|
+
} else if (REFERENCEABLE_NODE_TYPES.has(node.type)) missingIds = true;
|
|
5838
6827
|
}
|
|
5839
6828
|
const violations = /* @__PURE__ */ new Map();
|
|
5840
6829
|
const addViolation = (kind, value) => {
|
|
@@ -5853,7 +6842,7 @@ function analyze(doc) {
|
|
|
5853
6842
|
if (typeof href !== "string") continue;
|
|
5854
6843
|
const normalized = normalizeSafeLinkUrl(href);
|
|
5855
6844
|
if (!normalized.ok) addViolation("link", href.trim());
|
|
5856
|
-
else if (normalized.url.startsWith("#") && !
|
|
6845
|
+
else if (normalized.url.startsWith("#") && !referenceableIds.has(normalized.url.slice(1))) {
|
|
5857
6846
|
addViolation("dangling", normalized.url);
|
|
5858
6847
|
}
|
|
5859
6848
|
}
|
|
@@ -5863,8 +6852,9 @@ function analyze(doc) {
|
|
|
5863
6852
|
message: `${entry.slice(entry.indexOf(":") + 1)} (${count})`,
|
|
5864
6853
|
severity: "warning"
|
|
5865
6854
|
}));
|
|
5866
|
-
return {
|
|
6855
|
+
return { duplicates, invalidIds, violations, warnings, missingIds };
|
|
5867
6856
|
}
|
|
6857
|
+
var invalidIdFailure = (state) => state.invalidIds.length ? failure("document", "INVALID_ID", `invalid persistent id: ${state.invalidIds[0]}`) : void 0;
|
|
5868
6858
|
var nodeAt = (root, path) => {
|
|
5869
6859
|
let current = root;
|
|
5870
6860
|
for (const index of path) current = current?.content?.[index];
|
|
@@ -5873,17 +6863,21 @@ var nodeAt = (root, path) => {
|
|
|
5873
6863
|
var isTargetPath = (value) => Array.isArray(value) && value.length <= MAX_DEPTH && value.every((item) => Number.isSafeInteger(item) && Number(item) >= 0);
|
|
5874
6864
|
var provisionalId = (revision, path, node) => `provisional:${computeRevision(`${revision}:${pathKey(path)}:${node.type}`).slice(7, 23)}`;
|
|
5875
6865
|
var operationTargetFor = (revision, path, node) => {
|
|
5876
|
-
const id =
|
|
5877
|
-
|
|
6866
|
+
const id = persistedIdFor(node);
|
|
6867
|
+
const identityId = IDENTITY_BEARING_NODE_TYPES.has(node.type) ? id : void 0;
|
|
6868
|
+
const targetId = identityId ?? (REFERENCEABLE_NODE_TYPES.has(node.type) ? provisionalId(revision, path, node) : void 0);
|
|
6869
|
+
return targetId ? { kind: "id", id: targetId, expectedType: node.type } : { kind: "snapshot", path: [...path], nodeType: node.type, digest: nodeDigest(node) };
|
|
5878
6870
|
};
|
|
5879
6871
|
function indexTargets(root, revision) {
|
|
5880
6872
|
const byId = /* @__PURE__ */ new Map();
|
|
5881
6873
|
const paths = /* @__PURE__ */ new Map();
|
|
5882
6874
|
for (const { node, path } of walkDocument(root)) {
|
|
5883
6875
|
paths.set(node, [...path]);
|
|
5884
|
-
const id = node.
|
|
5885
|
-
if (
|
|
5886
|
-
else if (
|
|
6876
|
+
const id = IDENTITY_BEARING_NODE_TYPES.has(node.type) ? persistedIdFor(node) : void 0;
|
|
6877
|
+
if (id) byId.set(id, node);
|
|
6878
|
+
else if (REFERENCEABLE_NODE_TYPES.has(node.type)) {
|
|
6879
|
+
byId.set(provisionalId(revision, path, node), node);
|
|
6880
|
+
}
|
|
5887
6881
|
}
|
|
5888
6882
|
return { byId, paths };
|
|
5889
6883
|
}
|
|
@@ -6075,7 +7069,7 @@ function narrowRequest(value) {
|
|
|
6075
7069
|
};
|
|
6076
7070
|
}
|
|
6077
7071
|
var SHA256_PATTERN = /^sha256:[0-9a-f]{64}$/;
|
|
6078
|
-
var READ_CATALOG_KINDS2 = /* @__PURE__ */ new Set(["blocks", "outline", "references", "referenceables"]);
|
|
7072
|
+
var READ_CATALOG_KINDS2 = /* @__PURE__ */ new Set(["blocks", "outline", "references", "referenceables", "endnotes"]);
|
|
6079
7073
|
var isBoundedInteger = (value, maximum) => Number.isSafeInteger(value) && Number(value) >= 1 && Number(value) <= maximum;
|
|
6080
7074
|
function narrowReadRequest(value) {
|
|
6081
7075
|
if (!isRecord3(value) || value.contract !== "sdoc.read/1" || value.projection !== "catalog" && value.projection !== "target" && value.projection !== "section" && value.projection !== "document" || value.expectedRevision !== void 0 && (typeof value.expectedRevision !== "string" || !SHA256_PATTERN.test(value.expectedRevision))) {
|
|
@@ -6204,11 +7198,12 @@ function catalogItems(loaded, kind, maxSummaryLength, start, maximum) {
|
|
|
6204
7198
|
const ids = /* @__PURE__ */ new Set();
|
|
6205
7199
|
if (kind === "references") {
|
|
6206
7200
|
for (const { node } of walkDocument(loaded.envelope.doc)) {
|
|
6207
|
-
const id = node
|
|
6208
|
-
if (
|
|
7201
|
+
const id = persistedIdFor(node);
|
|
7202
|
+
if (REFERENCEABLE_NODE_TYPES.has(node.type) && id) ids.add(id);
|
|
6209
7203
|
}
|
|
6210
7204
|
}
|
|
6211
7205
|
let seen = 0;
|
|
7206
|
+
let endnoteNumber = 0;
|
|
6212
7207
|
let exhausted = true;
|
|
6213
7208
|
const add = (create) => {
|
|
6214
7209
|
if (seen >= start) items.push(create());
|
|
@@ -6221,8 +7216,10 @@ function catalogItems(loaded, kind, maxSummaryLength, start, maximum) {
|
|
|
6221
7216
|
};
|
|
6222
7217
|
traversal:
|
|
6223
7218
|
for (const { node, path } of walkDocument(loaded.envelope.doc)) {
|
|
6224
|
-
|
|
6225
|
-
const
|
|
7219
|
+
if (node.type === "endnote") endnoteNumber += 1;
|
|
7220
|
+
const persistedId = persistedIdFor(node);
|
|
7221
|
+
const id = IDENTITY_BEARING_NODE_TYPES.has(node.type) ? persistedId : void 0;
|
|
7222
|
+
const provisional = !id && REFERENCEABLE_NODE_TYPES.has(node.type) ? provisionalId(loaded.revision, path, node) : void 0;
|
|
6226
7223
|
if (kind === "blocks" && !NON_BLOCK.has(node.type)) {
|
|
6227
7224
|
if (add(() => ({
|
|
6228
7225
|
type: node.type,
|
|
@@ -6250,13 +7247,20 @@ function catalogItems(loaded, kind, maxSummaryLength, start, maximum) {
|
|
|
6250
7247
|
}
|
|
6251
7248
|
}
|
|
6252
7249
|
}
|
|
6253
|
-
} else if (kind === "referenceables" &&
|
|
7250
|
+
} else if (kind === "referenceables" && REFERENCEABLE_NODE_TYPES.has(node.type)) {
|
|
6254
7251
|
if (add(() => ({
|
|
6255
7252
|
type: node.type,
|
|
6256
7253
|
...id ? { id } : {},
|
|
6257
7254
|
...provisional ? { provisionalId: provisional } : {},
|
|
6258
7255
|
path: [...path]
|
|
6259
7256
|
}))) break;
|
|
7257
|
+
} else if (kind === "endnotes" && node.type === "endnote" && id) {
|
|
7258
|
+
if (add(() => ({
|
|
7259
|
+
id,
|
|
7260
|
+
number: endnoteNumber,
|
|
7261
|
+
body: typeof node.attrs?.body === "string" ? node.attrs.body : "",
|
|
7262
|
+
path: [...path]
|
|
7263
|
+
}))) break;
|
|
6260
7264
|
}
|
|
6261
7265
|
}
|
|
6262
7266
|
return { items, seen, exhausted };
|
|
@@ -6265,6 +7269,7 @@ function catalogData(kind, items) {
|
|
|
6265
7269
|
if (kind === "blocks") return { kind, items };
|
|
6266
7270
|
if (kind === "outline") return { kind, items };
|
|
6267
7271
|
if (kind === "references") return { kind, items };
|
|
7272
|
+
if (kind === "referenceables") return { kind, items };
|
|
6268
7273
|
return { kind, items };
|
|
6269
7274
|
}
|
|
6270
7275
|
var readQueryDigest = (value) => computeRevision(JSON.stringify(stableValue(value)));
|
|
@@ -6434,6 +7439,13 @@ function applyOne(envelope, op, targets) {
|
|
|
6434
7439
|
if (newLevel < 1 || newLevel > 6) {
|
|
6435
7440
|
return failure("argument", "INVALID_HEADING_LEVEL", `resulting heading level ${newLevel} is out of range 1-6`);
|
|
6436
7441
|
}
|
|
7442
|
+
if (op.id !== void 0 && !isAuthorablePersistentId(op.id)) {
|
|
7443
|
+
return failure(
|
|
7444
|
+
"argument",
|
|
7445
|
+
"INVALID_NEW_ID",
|
|
7446
|
+
"id must be non-empty, at most 128 Unicode code points, and outside the reserved provisional: namespace"
|
|
7447
|
+
);
|
|
7448
|
+
}
|
|
6437
7449
|
const heading = {
|
|
6438
7450
|
type: "heading",
|
|
6439
7451
|
attrs: { level: newLevel, ...op.id ? { id: op.id } : {} },
|
|
@@ -6458,15 +7470,15 @@ function applyOne(envelope, op, targets) {
|
|
|
6458
7470
|
if (!target) return failure("conflict", "TARGET_REMOVED", "target is unavailable");
|
|
6459
7471
|
if (target.type === "heading") return failure("argument", "SECTION_OPERATION_REQUIRED", "heading replacement requires a section operation");
|
|
6460
7472
|
if (op.block.type !== target.type) return failure("argument", "NODE_TYPE_CHANGE", "replaceBlock must preserve node type");
|
|
6461
|
-
const oldId = target
|
|
6462
|
-
const newId = op.block
|
|
6463
|
-
if (oldId
|
|
7473
|
+
const oldId = persistedIdFor(target);
|
|
7474
|
+
const newId = persistedIdFor(op.block);
|
|
7475
|
+
if (oldId && newId && oldId !== newId) {
|
|
6464
7476
|
return failure("argument", "ID_CHANGE_FORBIDDEN", "replaceBlock must preserve the existing id");
|
|
6465
7477
|
}
|
|
6466
7478
|
const location = findCurrent(root, target);
|
|
6467
7479
|
if (!location) return failure("conflict", "TARGET_REMOVED", "target was removed");
|
|
6468
7480
|
const replacement = clone(op.block);
|
|
6469
|
-
if (oldId
|
|
7481
|
+
if (oldId) replacement.attrs = { ...replacement.attrs, id: oldId };
|
|
6470
7482
|
location.parent.content?.splice(location.index, 1, replacement);
|
|
6471
7483
|
for (const [key, value] of targets) {
|
|
6472
7484
|
if (value === target) targets.set(key, replacement);
|
|
@@ -6581,11 +7593,12 @@ function applyOne(envelope, op, targets) {
|
|
|
6581
7593
|
);
|
|
6582
7594
|
}
|
|
6583
7595
|
const newId = op.newId;
|
|
6584
|
-
if (!
|
|
6585
|
-
return failure(
|
|
6586
|
-
|
|
6587
|
-
|
|
6588
|
-
|
|
7596
|
+
if (!isAuthorablePersistentId(newId)) {
|
|
7597
|
+
return failure(
|
|
7598
|
+
"argument",
|
|
7599
|
+
"INVALID_NEW_ID",
|
|
7600
|
+
"newId must be non-empty, at most 128 Unicode code points, and outside the reserved provisional: namespace"
|
|
7601
|
+
);
|
|
6589
7602
|
}
|
|
6590
7603
|
if (oldId === newId) return operationEvent(op, oldId, newId);
|
|
6591
7604
|
for (const { node } of walkDocument(root)) {
|
|
@@ -6623,6 +7636,8 @@ function inspectDocumentBytes(bytes, options = {}) {
|
|
|
6623
7636
|
const loaded = load(bytes);
|
|
6624
7637
|
if (isFailure(loaded)) return loaded;
|
|
6625
7638
|
const state = analyze(loaded.envelope.doc);
|
|
7639
|
+
const invalidId = invalidIdFailure(state);
|
|
7640
|
+
if (invalidId) return invalidId;
|
|
6626
7641
|
if (state.duplicates.length) {
|
|
6627
7642
|
return failure("document", "DUPLICATE_ID", `duplicate id: ${state.duplicates[0]}`);
|
|
6628
7643
|
}
|
|
@@ -6631,16 +7646,29 @@ function inspectDocumentBytes(bytes, options = {}) {
|
|
|
6631
7646
|
const outline = [];
|
|
6632
7647
|
const references = [];
|
|
6633
7648
|
const referenceables = [];
|
|
7649
|
+
const endnotes = [];
|
|
6634
7650
|
const blocks = [];
|
|
6635
7651
|
let blockCount = 0;
|
|
7652
|
+
let endnoteNumber = 0;
|
|
6636
7653
|
const ids = /* @__PURE__ */ new Set();
|
|
6637
7654
|
for (const { node } of walkDocument(loaded.envelope.doc)) {
|
|
6638
|
-
const id = node
|
|
6639
|
-
if (
|
|
7655
|
+
const id = persistedIdFor(node);
|
|
7656
|
+
if (REFERENCEABLE_NODE_TYPES.has(node.type) && id) ids.add(id);
|
|
6640
7657
|
}
|
|
6641
7658
|
for (const { node, path } of walkDocument(loaded.envelope.doc)) {
|
|
6642
|
-
|
|
6643
|
-
|
|
7659
|
+
if (node.type === "endnote") {
|
|
7660
|
+
endnoteNumber += 1;
|
|
7661
|
+
const id2 = persistedIdFor(node);
|
|
7662
|
+
if (id2 && endnotes.length < maxBlocks) endnotes.push({
|
|
7663
|
+
id: id2,
|
|
7664
|
+
number: endnoteNumber,
|
|
7665
|
+
body: typeof node.attrs?.body === "string" ? node.attrs.body : "",
|
|
7666
|
+
path: [...path]
|
|
7667
|
+
});
|
|
7668
|
+
}
|
|
7669
|
+
const persistedId = persistedIdFor(node);
|
|
7670
|
+
const id = IDENTITY_BEARING_NODE_TYPES.has(node.type) ? persistedId : void 0;
|
|
7671
|
+
const provisional = !id && REFERENCEABLE_NODE_TYPES.has(node.type) ? provisionalId(loaded.revision, path, node) : void 0;
|
|
6644
7672
|
if (node.type === "heading" && outline.length < maxBlocks) outline.push({
|
|
6645
7673
|
...id ? { id } : {},
|
|
6646
7674
|
...provisional ? { provisionalId: provisional } : {},
|
|
@@ -6648,7 +7676,7 @@ function inspectDocumentBytes(bytes, options = {}) {
|
|
|
6648
7676
|
text: textOf2(node).slice(0, maxSummary),
|
|
6649
7677
|
path: [...path]
|
|
6650
7678
|
});
|
|
6651
|
-
if (
|
|
7679
|
+
if (REFERENCEABLE_NODE_TYPES.has(node.type) && referenceables.length < maxBlocks) referenceables.push({
|
|
6652
7680
|
type: node.type,
|
|
6653
7681
|
...id ? { id } : {},
|
|
6654
7682
|
...provisional ? { provisionalId: provisional } : {},
|
|
@@ -6720,6 +7748,7 @@ function inspectDocumentBytes(bytes, options = {}) {
|
|
|
6720
7748
|
outline,
|
|
6721
7749
|
references,
|
|
6722
7750
|
referenceables,
|
|
7751
|
+
endnotes,
|
|
6723
7752
|
blocks,
|
|
6724
7753
|
blockCount,
|
|
6725
7754
|
blocksTruncated: blocks.length < blockCount,
|
|
@@ -6736,6 +7765,8 @@ function projectDocumentBytes(bytes, requestUnknown) {
|
|
|
6736
7765
|
return failure("conflict", "STALE_REVISION", "expected revision does not match document bytes");
|
|
6737
7766
|
}
|
|
6738
7767
|
const state = analyze(loaded.envelope.doc);
|
|
7768
|
+
const invalidId = invalidIdFailure(state);
|
|
7769
|
+
if (invalidId) return invalidId;
|
|
6739
7770
|
if (state.duplicates.length) {
|
|
6740
7771
|
return failure("document", "DUPLICATE_ID", `duplicate id: ${state.duplicates[0]}`);
|
|
6741
7772
|
}
|
|
@@ -6909,6 +7940,8 @@ function validateDocumentBytes(bytes) {
|
|
|
6909
7940
|
const loaded = load(bytes);
|
|
6910
7941
|
if (isFailure(loaded)) return loaded;
|
|
6911
7942
|
const state = analyze(loaded.envelope.doc);
|
|
7943
|
+
const invalidId = invalidIdFailure(state);
|
|
7944
|
+
if (invalidId) return invalidId;
|
|
6912
7945
|
if (state.duplicates.length) {
|
|
6913
7946
|
return failure("document", "DUPLICATE_ID", `duplicate id: ${state.duplicates[0]}`);
|
|
6914
7947
|
}
|
|
@@ -6944,6 +7977,8 @@ function applyOperationRequest(bytes, requestUnknown, options = {}) {
|
|
|
6944
7977
|
const baseline = analyze(loaded.envelope.doc);
|
|
6945
7978
|
const originalSettings = resolveSettings(loaded.envelope.meta.settings, options.externalSettings);
|
|
6946
7979
|
const originalNumbering = numberingById(loaded.envelope.doc, originalSettings);
|
|
7980
|
+
const invalidId = invalidIdFailure(baseline);
|
|
7981
|
+
if (invalidId) return invalidId;
|
|
6947
7982
|
if (baseline.duplicates.length) {
|
|
6948
7983
|
return failure("document", "DUPLICATE_ID", `duplicate id: ${baseline.duplicates[0]}`);
|
|
6949
7984
|
}
|
|
@@ -6994,6 +8029,8 @@ function applyOperationRequest(bytes, requestUnknown, options = {}) {
|
|
|
6994
8029
|
};
|
|
6995
8030
|
}
|
|
6996
8031
|
const rawState = analyze(envelope.doc);
|
|
8032
|
+
const rawInvalidId = invalidIdFailure(rawState);
|
|
8033
|
+
if (rawInvalidId) return rawInvalidId;
|
|
6997
8034
|
if (rawState.duplicates.length) {
|
|
6998
8035
|
return failure("document", "DUPLICATE_ID", `duplicate id: ${rawState.duplicates[0]}`);
|
|
6999
8036
|
}
|
|
@@ -7051,6 +8088,8 @@ function applyOperationRequest(bytes, requestUnknown, options = {}) {
|
|
|
7051
8088
|
"operation introduces or increases an integrity violation"
|
|
7052
8089
|
);
|
|
7053
8090
|
}
|
|
8091
|
+
const afterInvalidId = invalidIdFailure(after);
|
|
8092
|
+
if (afterInvalidId) return afterInvalidId;
|
|
7054
8093
|
if (after.duplicates.length) {
|
|
7055
8094
|
return failure("document", "DUPLICATE_ID", `duplicate id: ${after.duplicates[0]}`);
|
|
7056
8095
|
}
|
|
@@ -7981,7 +9020,7 @@ function capabilitiesRecord(cliVersion) {
|
|
|
7981
9020
|
readMaxNodes: 1e5
|
|
7982
9021
|
},
|
|
7983
9022
|
projections: ["catalog", "target", "section", "document"],
|
|
7984
|
-
catalogKinds: ["blocks", "outline", "references", "referenceables"],
|
|
9023
|
+
catalogKinds: ["blocks", "outline", "references", "referenceables", "endnotes"],
|
|
7985
9024
|
builtInTemplateIds: getBuiltInTemplates().map((template) => template.descriptor.id)
|
|
7986
9025
|
};
|
|
7987
9026
|
}
|
|
@@ -8030,7 +9069,7 @@ var COMMAND_HELP = {
|
|
|
8030
9069
|
options: [
|
|
8031
9070
|
...COMMON_OUTPUT,
|
|
8032
9071
|
" --projection <kind> catalog, target, section, or document",
|
|
8033
|
-
" --catalog <kind> blocks (default), outline, references, or
|
|
9072
|
+
" --catalog <kind> blocks (default), outline, references, referenceables, or endnotes",
|
|
8034
9073
|
" --target-id <id> Select one block or section by persistent ID",
|
|
8035
9074
|
" --target-path </1/0> Select by slash-separated content indexes",
|
|
8036
9075
|
" --limit <count> Positive catalog page entry limit",
|
|
@@ -8318,6 +9357,7 @@ function renderHumanSuccess(value) {
|
|
|
8318
9357
|
lines.push(` - H${String(outline.level ?? "?")} ${String(outline.text ?? "")}`);
|
|
8319
9358
|
}
|
|
8320
9359
|
}
|
|
9360
|
+
if (Array.isArray(value.endnotes)) lines.push(`Endnotes: ${value.endnotes.length}`);
|
|
8321
9361
|
if (Array.isArray(value.blocks)) lines.push(`Blocks: ${value.blocks.length}`);
|
|
8322
9362
|
}
|
|
8323
9363
|
} else if (command === "validate") {
|
|
@@ -8439,7 +9479,7 @@ async function createDocumentPlan(documentPath, options = {}) {
|
|
|
8439
9479
|
}
|
|
8440
9480
|
|
|
8441
9481
|
// src/main.ts
|
|
8442
|
-
var VERSION = true ? "0.
|
|
9482
|
+
var VERSION = true ? "0.12.0" : packageMetadata.version;
|
|
8443
9483
|
var DEFAULT_DEPENDENCIES = {
|
|
8444
9484
|
replaceDocument: atomicReplace,
|
|
8445
9485
|
createDocument: atomicCreate
|