superdoc 2.7.0-next.7 → 2.7.0-next.8

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.
@@ -19,7 +19,7 @@ var COLLABORATION_UPGRADE_ENGINE_MINIMUM_NODE_MAJOR = 20;
19
19
  var PRIVATE_ENGINE_INFO = (0, _superdoc_docx_engine_collaboration_upgrade_engine.getCollaborationUpgradeEngineInfo)();
20
20
  var ENGINE_INFO = Object.freeze({
21
21
  ...PRIVATE_ENGINE_INFO,
22
- superdocVersion: "2.7.0-next.7",
22
+ superdocVersion: "2.7.0-next.8",
23
23
  roomSchemaVersion: Object.freeze({ ...PRIVATE_ENGINE_INFO.roomSchemaVersion }),
24
24
  supportedBundleVersions: SUPPORTED_COLLABORATION_UPGRADE_BUNDLE_VERSIONS,
25
25
  supportedV1ReaderContractVersions: SUPPORTED_V1_READER_CONTRACT_VERSIONS
@@ -18,7 +18,7 @@ var COLLABORATION_UPGRADE_ENGINE_MINIMUM_NODE_MAJOR = 20;
18
18
  var PRIVATE_ENGINE_INFO = getCollaborationUpgradeEngineInfo$1();
19
19
  var ENGINE_INFO = Object.freeze({
20
20
  ...PRIVATE_ENGINE_INFO,
21
- superdocVersion: "2.7.0-next.7",
21
+ superdocVersion: "2.7.0-next.8",
22
22
  roomSchemaVersion: Object.freeze({ ...PRIVATE_ENGINE_INFO.roomSchemaVersion }),
23
23
  supportedBundleVersions: SUPPORTED_COLLABORATION_UPGRADE_BUNDLE_VERSIONS,
24
24
  supportedV1ReaderContractVersions: SUPPORTED_V1_READER_CONTRACT_VERSIONS
@@ -0,0 +1,3 @@
1
+ import { SDProjectionReadInput } from '../types/content-projection.js';
2
+ export declare function validateProjectionReadInput(input: unknown, operationName: string, allowedFields: ReadonlySet<string>): asserts input is SDProjectionReadInput;
3
+ export declare function validateOptionalBoolean(value: unknown, field: string, operationName: string): void;
@@ -1,7 +1,7 @@
1
1
  import { CommandCatalog, CommandStaticMetadata, OperationId } from './types.js';
2
2
  export declare const COMMAND_CATALOG: CommandCatalog;
3
3
  /** Operation IDs whose catalog entry has `mutates: true`. */
4
- export declare const MUTATING_OPERATION_IDS: ("replace" | "find" | "delete" | "get" | "insert" | "info" | "format.apply" | "blocks.split" | "blocks.merge" | "blocks.move" | "lists.getState" | "lists.apply" | "lists.continue" | "lists.restart" | "lists.remove" | "format.paragraph.setMarkRunProps" | "tables.moveRow" | "format.bold" | "format.strike" | "format.color" | "format.italic" | "format.rtl" | "format.cs" | "format.shading" | "format.fontFamily" | "format.lang" | "format.fontSize" | "format.fontSizeCs" | "format.highlight" | "format.underline" | "format.caps" | "format.smallCaps" | "format.outline" | "format.shadow" | "format.emboss" | "format.imprint" | "format.vanish" | "format.webHidden" | "format.specVanish" | "format.border" | "format.fitText" | "format.dstrike" | "format.vertAlign" | "format.position" | "format.bCs" | "format.iCs" | "format.snapToGrid" | "format.oMath" | "format.letterSpacing" | "format.charScale" | "format.kerning" | "format.rStyle" | "format.rFonts" | "format.eastAsianLayout" | "format.em" | "format.ligatures" | "format.numForm" | "format.numSpacing" | "format.stylisticSets" | "format.contextualAlternates" | "getNode" | "getNodeById" | "getText" | "getMarkdown" | "getHtml" | "markdownToFragment" | "htmlToFragment" | "extract" | "clearContent" | "formatRange" | "blocks.list" | "blocks.delete" | "blocks.deleteRange" | "styles.apply" | "styles.getCatalog" | "templates.apply" | "create.paragraph" | "create.heading" | "create.sectionBreak" | "sections.list" | "sections.get" | "sections.setBreakType" | "sections.setPageMargins" | "sections.setHeaderFooterMargins" | "sections.setPageSetup" | "sections.setColumns" | "sections.setLineNumbering" | "sections.setPageNumbering" | "sections.setTitlePage" | "sections.setOddEvenHeadersFooters" | "sections.setVerticalAlign" | "sections.setSectionDirection" | "sections.setHeaderFooterRef" | "sections.clearHeaderFooterRef" | "sections.setLinkToPrevious" | "sections.setPageBorders" | "sections.clearPageBorders" | "styles.paragraph.setStyle" | "styles.paragraph.setStyleRef" | "styles.paragraph.clearStyle" | "format.paragraph.resetDirectFormatting" | "format.paragraph.setAlignment" | "format.paragraph.clearAlignment" | "format.paragraph.setIndentation" | "format.paragraph.clearIndentation" | "format.paragraph.setSpacing" | "format.paragraph.clearSpacing" | "format.paragraph.setKeepOptions" | "format.paragraph.setOutlineLevel" | "format.paragraph.setFlowOptions" | "format.paragraph.setTabStop" | "format.paragraph.clearTabStop" | "format.paragraph.clearAllTabStops" | "format.paragraph.setBorder" | "format.paragraph.clearBorder" | "format.paragraph.setShading" | "format.paragraph.clearShading" | "format.paragraph.setDirection" | "format.paragraph.clearDirection" | "format.paragraph.setNumbering" | "lists.list" | "lists.get" | "lists.insert" | "lists.create" | "lists.attach" | "lists.detach" | "lists.delete" | "lists.indent" | "lists.outdent" | "lists.join" | "lists.canJoin" | "lists.separate" | "lists.merge" | "lists.split" | "lists.setLevel" | "lists.setValue" | "lists.continuePrevious" | "lists.canContinuePrevious" | "lists.setLevelRestart" | "lists.convertToText" | "lists.applyTemplate" | "lists.applyPreset" | "lists.setType" | "lists.captureTemplate" | "lists.setLevelNumbering" | "lists.setLevelBullet" | "lists.setLevelPictureBullet" | "lists.setLevelAlignment" | "lists.setLevelIndents" | "lists.setLevelTrailingCharacter" | "lists.setLevelMarkerFont" | "lists.clearLevelOverrides" | "lists.getStyle" | "lists.applyStyle" | "lists.restartAt" | "lists.setLevelNumberStyle" | "lists.setLevelText" | "lists.setLevelStart" | "lists.setLevelLayout" | "comments.create" | "comments.patch" | "comments.delete" | "comments.get" | "comments.list" | "trackChanges.list" | "trackChanges.get" | "trackChanges.decide" | "query.match" | "ranges.resolve" | "selection.current" | "mutations.preview" | "mutations.apply" | "plan.execute" | "capabilities.get" | "create.table" | "tables.convertFromText" | "tables.delete" | "tables.clearContents" | "tables.move" | "tables.split" | "tables.convertToText" | "tables.setLayout" | "tables.insertRow" | "tables.deleteRow" | "tables.setRowHeight" | "tables.distributeRows" | "tables.setRowOptions" | "tables.insertColumn" | "tables.deleteColumn" | "tables.setColumnWidth" | "tables.distributeColumns" | "tables.insertCell" | "tables.deleteCell" | "tables.mergeCells" | "tables.unmergeCells" | "tables.splitCell" | "tables.setCellProperties" | "tables.setCellText" | "tables.sort" | "tables.setAltText" | "tables.setStyle" | "tables.clearStyle" | "tables.setStyleOption" | "tables.setBorder" | "tables.clearBorder" | "tables.applyBorderPreset" | "tables.setShading" | "tables.clearShading" | "tables.setTablePadding" | "tables.setCellPadding" | "tables.setCellSpacing" | "tables.clearCellSpacing" | "tables.applyStyle" | "tables.setBorders" | "tables.setTableOptions" | "tables.applyPreset" | "tables.get" | "tables.getCells" | "tables.getProperties" | "tables.getStyles" | "tables.setDefaultStyle" | "tables.clearDefaultStyle" | "create.tableOfContents" | "toc.list" | "toc.get" | "toc.configure" | "toc.update" | "toc.remove" | "toc.markEntry" | "toc.unmarkEntry" | "toc.listEntries" | "toc.getEntry" | "toc.editEntry" | "history.get" | "history.undo" | "history.redo" | "create.image" | "images.list" | "images.get" | "images.delete" | "images.move" | "images.convertToInline" | "images.convertToFloating" | "images.setSize" | "images.setWrapType" | "images.setWrapSide" | "images.setWrapDistances" | "images.setPosition" | "images.setAnchorOptions" | "images.setZOrder" | "images.scale" | "images.setLockAspectRatio" | "images.rotate" | "images.flip" | "images.crop" | "images.resetCrop" | "images.replaceSource" | "images.setAltText" | "images.setDecorative" | "images.setName" | "images.setHyperlink" | "images.insertCaption" | "images.updateCaption" | "images.removeCaption" | "hyperlinks.list" | "hyperlinks.get" | "hyperlinks.wrap" | "hyperlinks.insert" | "hyperlinks.patch" | "hyperlinks.remove" | "headerFooters.list" | "headerFooters.get" | "headerFooters.resolve" | "headerFooters.refs.set" | "headerFooters.refs.clear" | "headerFooters.refs.setLinkedToPrevious" | "headerFooters.parts.list" | "headerFooters.parts.create" | "headerFooters.parts.delete" | "create.contentControl" | "contentControls.list" | "contentControls.get" | "contentControls.listInRange" | "contentControls.selectByTag" | "contentControls.selectByTitle" | "contentControls.listChildren" | "contentControls.getParent" | "contentControls.wrap" | "contentControls.unwrap" | "contentControls.delete" | "contentControls.copy" | "contentControls.move" | "contentControls.patch" | "contentControls.setLockMode" | "contentControls.setType" | "contentControls.getContent" | "contentControls.replaceContent" | "contentControls.clearContent" | "contentControls.appendContent" | "contentControls.prependContent" | "contentControls.insertBefore" | "contentControls.insertAfter" | "contentControls.getBinding" | "contentControls.setBinding" | "contentControls.clearBinding" | "contentControls.getRawProperties" | "contentControls.patchRawProperties" | "contentControls.validateWordCompatibility" | "contentControls.normalizeWordCompatibility" | "contentControls.normalizeTagPayload" | "contentControls.text.setMultiline" | "contentControls.text.setValue" | "contentControls.text.clearValue" | "contentControls.date.setValue" | "contentControls.date.clearValue" | "contentControls.date.setDisplayFormat" | "contentControls.date.setDisplayLocale" | "contentControls.date.setStorageFormat" | "contentControls.date.setCalendar" | "contentControls.checkbox.getState" | "contentControls.checkbox.setState" | "contentControls.checkbox.toggle" | "contentControls.checkbox.setSymbolPair" | "contentControls.choiceList.getItems" | "contentControls.choiceList.setItems" | "contentControls.choiceList.setSelected" | "contentControls.repeatingSection.listItems" | "contentControls.repeatingSection.insertItemBefore" | "contentControls.repeatingSection.insertItemAfter" | "contentControls.repeatingSection.cloneItem" | "contentControls.repeatingSection.deleteItem" | "contentControls.repeatingSection.setAllowInsertDelete" | "contentControls.group.wrap" | "contentControls.group.ungroup" | "bookmarks.list" | "bookmarks.get" | "bookmarks.insert" | "bookmarks.rename" | "bookmarks.remove" | "footnotes.list" | "footnotes.get" | "footnotes.insert" | "footnotes.update" | "footnotes.remove" | "footnotes.configure" | "clipboard.parse" | "clipboard.insert" | "clipboard.serializeSelection" | "crossRefs.list" | "crossRefs.get" | "crossRefs.insert" | "crossRefs.rebuild" | "crossRefs.remove" | "index.list" | "index.get" | "index.insert" | "index.configure" | "index.rebuild" | "index.remove" | "index.entries.list" | "index.entries.get" | "index.entries.insert" | "index.entries.update" | "index.entries.remove" | "captions.list" | "captions.get" | "captions.insert" | "captions.update" | "captions.remove" | "captions.configure" | "fields.list" | "fields.get" | "fields.insert" | "fields.rebuild" | "fields.remove" | "citations.list" | "citations.get" | "citations.insert" | "citations.update" | "citations.remove" | "citations.sources.list" | "citations.sources.get" | "citations.sources.insert" | "citations.sources.update" | "citations.sources.remove" | "citations.bibliography.get" | "citations.bibliography.insert" | "citations.bibliography.rebuild" | "citations.bibliography.configure" | "citations.bibliography.remove" | "authorities.list" | "authorities.get" | "authorities.insert" | "authorities.configure" | "authorities.rebuild" | "authorities.remove" | "authorities.entries.list" | "authorities.entries.get" | "authorities.entries.insert" | "authorities.entries.update" | "authorities.entries.remove" | "diff.capture" | "diff.compare" | "diff.apply" | "export.toDocx" | "protection.get" | "protection.setEditingRestriction" | "protection.clearEditingRestriction" | "permissionRanges.list" | "permissionRanges.get" | "permissionRanges.create" | "permissionRanges.remove" | "permissionRanges.updatePrincipal" | "customXml.parts.list" | "customXml.parts.get" | "customXml.parts.create" | "customXml.parts.patch" | "customXml.parts.remove" | "metadata.attach" | "metadata.list" | "metadata.get" | "metadata.update" | "metadata.remove" | "metadata.resolve")[];
4
+ export declare const MUTATING_OPERATION_IDS: ("replace" | "find" | "delete" | "get" | "insert" | "info" | "format.apply" | "blocks.split" | "blocks.merge" | "blocks.move" | "lists.getState" | "lists.apply" | "lists.continue" | "lists.restart" | "lists.remove" | "format.paragraph.setMarkRunProps" | "tables.moveRow" | "format.bold" | "format.strike" | "format.color" | "format.italic" | "format.rtl" | "format.cs" | "format.shading" | "format.fontFamily" | "format.lang" | "format.fontSize" | "format.fontSizeCs" | "format.highlight" | "format.underline" | "format.caps" | "format.smallCaps" | "format.outline" | "format.shadow" | "format.emboss" | "format.imprint" | "format.vanish" | "format.webHidden" | "format.specVanish" | "format.border" | "format.fitText" | "format.dstrike" | "format.vertAlign" | "format.position" | "format.bCs" | "format.iCs" | "format.snapToGrid" | "format.oMath" | "format.letterSpacing" | "format.charScale" | "format.kerning" | "format.rStyle" | "format.rFonts" | "format.eastAsianLayout" | "format.em" | "format.ligatures" | "format.numForm" | "format.numSpacing" | "format.stylisticSets" | "format.contextualAlternates" | "getNode" | "getNodeById" | "getText" | "getMarkdown" | "getHtml" | "projectMarkdown" | "projectHtml" | "markdownToFragment" | "htmlToFragment" | "extract" | "clearContent" | "formatRange" | "blocks.list" | "blocks.delete" | "blocks.deleteRange" | "styles.apply" | "styles.getCatalog" | "templates.apply" | "create.paragraph" | "create.heading" | "create.sectionBreak" | "sections.list" | "sections.get" | "sections.setBreakType" | "sections.setPageMargins" | "sections.setHeaderFooterMargins" | "sections.setPageSetup" | "sections.setColumns" | "sections.setLineNumbering" | "sections.setPageNumbering" | "sections.setTitlePage" | "sections.setOddEvenHeadersFooters" | "sections.setVerticalAlign" | "sections.setSectionDirection" | "sections.setHeaderFooterRef" | "sections.clearHeaderFooterRef" | "sections.setLinkToPrevious" | "sections.setPageBorders" | "sections.clearPageBorders" | "styles.paragraph.setStyle" | "styles.paragraph.setStyleRef" | "styles.paragraph.clearStyle" | "format.paragraph.resetDirectFormatting" | "format.paragraph.setAlignment" | "format.paragraph.clearAlignment" | "format.paragraph.setIndentation" | "format.paragraph.clearIndentation" | "format.paragraph.setSpacing" | "format.paragraph.clearSpacing" | "format.paragraph.setKeepOptions" | "format.paragraph.setOutlineLevel" | "format.paragraph.setFlowOptions" | "format.paragraph.setTabStop" | "format.paragraph.clearTabStop" | "format.paragraph.clearAllTabStops" | "format.paragraph.setBorder" | "format.paragraph.clearBorder" | "format.paragraph.setShading" | "format.paragraph.clearShading" | "format.paragraph.setDirection" | "format.paragraph.clearDirection" | "format.paragraph.setNumbering" | "lists.list" | "lists.get" | "lists.insert" | "lists.create" | "lists.attach" | "lists.detach" | "lists.delete" | "lists.indent" | "lists.outdent" | "lists.join" | "lists.canJoin" | "lists.separate" | "lists.merge" | "lists.split" | "lists.setLevel" | "lists.setValue" | "lists.continuePrevious" | "lists.canContinuePrevious" | "lists.setLevelRestart" | "lists.convertToText" | "lists.applyTemplate" | "lists.applyPreset" | "lists.setType" | "lists.captureTemplate" | "lists.setLevelNumbering" | "lists.setLevelBullet" | "lists.setLevelPictureBullet" | "lists.setLevelAlignment" | "lists.setLevelIndents" | "lists.setLevelTrailingCharacter" | "lists.setLevelMarkerFont" | "lists.clearLevelOverrides" | "lists.getStyle" | "lists.applyStyle" | "lists.restartAt" | "lists.setLevelNumberStyle" | "lists.setLevelText" | "lists.setLevelStart" | "lists.setLevelLayout" | "comments.create" | "comments.patch" | "comments.delete" | "comments.get" | "comments.list" | "trackChanges.list" | "trackChanges.get" | "trackChanges.decide" | "query.match" | "ranges.resolve" | "selection.current" | "mutations.preview" | "mutations.apply" | "plan.execute" | "capabilities.get" | "create.table" | "tables.convertFromText" | "tables.delete" | "tables.clearContents" | "tables.move" | "tables.split" | "tables.convertToText" | "tables.setLayout" | "tables.insertRow" | "tables.deleteRow" | "tables.setRowHeight" | "tables.distributeRows" | "tables.setRowOptions" | "tables.insertColumn" | "tables.deleteColumn" | "tables.setColumnWidth" | "tables.distributeColumns" | "tables.insertCell" | "tables.deleteCell" | "tables.mergeCells" | "tables.unmergeCells" | "tables.splitCell" | "tables.setCellProperties" | "tables.setCellText" | "tables.sort" | "tables.setAltText" | "tables.setStyle" | "tables.clearStyle" | "tables.setStyleOption" | "tables.setBorder" | "tables.clearBorder" | "tables.applyBorderPreset" | "tables.setShading" | "tables.clearShading" | "tables.setTablePadding" | "tables.setCellPadding" | "tables.setCellSpacing" | "tables.clearCellSpacing" | "tables.applyStyle" | "tables.setBorders" | "tables.setTableOptions" | "tables.applyPreset" | "tables.get" | "tables.getCells" | "tables.getProperties" | "tables.getStyles" | "tables.setDefaultStyle" | "tables.clearDefaultStyle" | "create.tableOfContents" | "toc.list" | "toc.get" | "toc.configure" | "toc.update" | "toc.remove" | "toc.markEntry" | "toc.unmarkEntry" | "toc.listEntries" | "toc.getEntry" | "toc.editEntry" | "history.get" | "history.undo" | "history.redo" | "create.image" | "images.list" | "images.get" | "images.delete" | "images.move" | "images.convertToInline" | "images.convertToFloating" | "images.setSize" | "images.setWrapType" | "images.setWrapSide" | "images.setWrapDistances" | "images.setPosition" | "images.setAnchorOptions" | "images.setZOrder" | "images.scale" | "images.setLockAspectRatio" | "images.rotate" | "images.flip" | "images.crop" | "images.resetCrop" | "images.replaceSource" | "images.setAltText" | "images.setDecorative" | "images.setName" | "images.setHyperlink" | "images.insertCaption" | "images.updateCaption" | "images.removeCaption" | "hyperlinks.list" | "hyperlinks.get" | "hyperlinks.wrap" | "hyperlinks.insert" | "hyperlinks.patch" | "hyperlinks.remove" | "headerFooters.list" | "headerFooters.get" | "headerFooters.resolve" | "headerFooters.refs.set" | "headerFooters.refs.clear" | "headerFooters.refs.setLinkedToPrevious" | "headerFooters.parts.list" | "headerFooters.parts.create" | "headerFooters.parts.delete" | "create.contentControl" | "contentControls.list" | "contentControls.get" | "contentControls.listInRange" | "contentControls.selectByTag" | "contentControls.selectByTitle" | "contentControls.listChildren" | "contentControls.getParent" | "contentControls.wrap" | "contentControls.unwrap" | "contentControls.delete" | "contentControls.copy" | "contentControls.move" | "contentControls.patch" | "contentControls.setLockMode" | "contentControls.setType" | "contentControls.getContent" | "contentControls.replaceContent" | "contentControls.clearContent" | "contentControls.appendContent" | "contentControls.prependContent" | "contentControls.insertBefore" | "contentControls.insertAfter" | "contentControls.getBinding" | "contentControls.setBinding" | "contentControls.clearBinding" | "contentControls.getRawProperties" | "contentControls.patchRawProperties" | "contentControls.validateWordCompatibility" | "contentControls.normalizeWordCompatibility" | "contentControls.normalizeTagPayload" | "contentControls.text.setMultiline" | "contentControls.text.setValue" | "contentControls.text.clearValue" | "contentControls.date.setValue" | "contentControls.date.clearValue" | "contentControls.date.setDisplayFormat" | "contentControls.date.setDisplayLocale" | "contentControls.date.setStorageFormat" | "contentControls.date.setCalendar" | "contentControls.checkbox.getState" | "contentControls.checkbox.setState" | "contentControls.checkbox.toggle" | "contentControls.checkbox.setSymbolPair" | "contentControls.choiceList.getItems" | "contentControls.choiceList.setItems" | "contentControls.choiceList.setSelected" | "contentControls.repeatingSection.listItems" | "contentControls.repeatingSection.insertItemBefore" | "contentControls.repeatingSection.insertItemAfter" | "contentControls.repeatingSection.cloneItem" | "contentControls.repeatingSection.deleteItem" | "contentControls.repeatingSection.setAllowInsertDelete" | "contentControls.group.wrap" | "contentControls.group.ungroup" | "bookmarks.list" | "bookmarks.get" | "bookmarks.insert" | "bookmarks.rename" | "bookmarks.remove" | "footnotes.list" | "footnotes.get" | "footnotes.insert" | "footnotes.update" | "footnotes.remove" | "footnotes.configure" | "clipboard.parse" | "clipboard.insert" | "clipboard.serializeSelection" | "crossRefs.list" | "crossRefs.get" | "crossRefs.insert" | "crossRefs.rebuild" | "crossRefs.remove" | "index.list" | "index.get" | "index.insert" | "index.configure" | "index.rebuild" | "index.remove" | "index.entries.list" | "index.entries.get" | "index.entries.insert" | "index.entries.update" | "index.entries.remove" | "captions.list" | "captions.get" | "captions.insert" | "captions.update" | "captions.remove" | "captions.configure" | "fields.list" | "fields.get" | "fields.insert" | "fields.rebuild" | "fields.remove" | "citations.list" | "citations.get" | "citations.insert" | "citations.update" | "citations.remove" | "citations.sources.list" | "citations.sources.get" | "citations.sources.insert" | "citations.sources.update" | "citations.sources.remove" | "citations.bibliography.get" | "citations.bibliography.insert" | "citations.bibliography.rebuild" | "citations.bibliography.configure" | "citations.bibliography.remove" | "authorities.list" | "authorities.get" | "authorities.insert" | "authorities.configure" | "authorities.rebuild" | "authorities.remove" | "authorities.entries.list" | "authorities.entries.get" | "authorities.entries.insert" | "authorities.entries.update" | "authorities.entries.remove" | "diff.capture" | "diff.compare" | "diff.apply" | "export.toDocx" | "protection.get" | "protection.setEditingRestriction" | "protection.clearEditingRestriction" | "permissionRanges.list" | "permissionRanges.get" | "permissionRanges.create" | "permissionRanges.remove" | "permissionRanges.updatePrincipal" | "customXml.parts.list" | "customXml.parts.get" | "customXml.parts.create" | "customXml.parts.patch" | "customXml.parts.remove" | "metadata.attach" | "metadata.list" | "metadata.get" | "metadata.update" | "metadata.remove" | "metadata.resolve")[];
5
5
  /** Maps each operation to its human-readable description. */
6
6
  export declare const OPERATION_DESCRIPTION_MAP: Record<OperationId, string>;
7
7
  /** Maps each operation to whether it requires an open document to execute. */
@@ -3481,6 +3481,28 @@ export declare const OPERATION_DEFINITIONS: {
3481
3481
  readonly intentGroup: "get_content";
3482
3482
  readonly intentAction: "html";
3483
3483
  };
3484
+ readonly projectMarkdown: {
3485
+ readonly memberPath: "projectMarkdown";
3486
+ readonly description: "Project document content as Markdown with review, scope, diagnostics, and provenance metadata.";
3487
+ readonly expectedResult: "Returns a Promise resolving to a detailed Markdown content projection result.";
3488
+ readonly requiresDocumentContext: true;
3489
+ readonly metadata: CommandStaticMetadata;
3490
+ readonly referenceDocPath: "project-markdown.mdx";
3491
+ readonly referenceGroup: "core";
3492
+ readonly intentGroup: "get_content";
3493
+ readonly intentAction: "markdown_projection";
3494
+ };
3495
+ readonly projectHtml: {
3496
+ readonly memberPath: "projectHtml";
3497
+ readonly description: "Project document content as HTML with review, scope, diagnostics, and provenance metadata.";
3498
+ readonly expectedResult: "Returns a Promise resolving to a detailed HTML content projection result.";
3499
+ readonly requiresDocumentContext: true;
3500
+ readonly metadata: CommandStaticMetadata;
3501
+ readonly referenceDocPath: "project-html.mdx";
3502
+ readonly referenceGroup: "core";
3503
+ readonly intentGroup: "get_content";
3504
+ readonly intentAction: "html_projection";
3505
+ };
3484
3506
  readonly markdownToFragment: {
3485
3507
  readonly memberPath: "markdownToFragment";
3486
3508
  readonly description: "Convert a Markdown string into an SDM/1 structural fragment.";
@@ -11,6 +11,7 @@ import { GetNodeByIdInput } from '../get-node/get-node.js';
11
11
  import { GetTextInput } from '../get-text/get-text.js';
12
12
  import { GetMarkdownInput } from '../get-markdown/get-markdown.js';
13
13
  import { GetHtmlInput } from '../get-html/get-html.js';
14
+ import { ProjectHtmlInput, ProjectMarkdownInput, SDContentProjectionResult } from '../types/content-projection.js';
14
15
  import { MarkdownToFragmentInput } from '../markdown-to-fragment/markdown-to-fragment.js';
15
16
  import { HtmlToFragmentInput } from '../html-to-fragment/html-to-fragment.js';
16
17
  import { InfoInput } from '../info/info.js';
@@ -103,6 +104,16 @@ export interface OperationRegistry extends FormatInlineAliasOperationRegistry {
103
104
  options: never;
104
105
  output: string;
105
106
  };
107
+ projectMarkdown: {
108
+ input: ProjectMarkdownInput;
109
+ options: never;
110
+ output: Promise<SDContentProjectionResult<'markdown'>>;
111
+ };
112
+ projectHtml: {
113
+ input: ProjectHtmlInput;
114
+ options: never;
115
+ output: Promise<SDContentProjectionResult<'html'>>;
116
+ };
106
117
  markdownToFragment: {
107
118
  input: MarkdownToFragmentInput;
108
119
  options: never;
@@ -1,10 +1,10 @@
1
- import { StoryLocator } from '../types/story.types.js';
2
- export interface GetHtmlInput {
3
- /** Restrict the read to a specific story. Omit for body (backward compatible). */
4
- in?: StoryLocator;
1
+ import { SDProjectionReadInput } from '../types/content-projection.js';
2
+ export interface GetHtmlInput extends SDProjectionReadInput {
5
3
  /**
6
- * Convert SuperDoc's internal flat-list representation to proper nested
7
- * `<ol>`/`<ul>` HTML. Defaults to `true`.
4
+ * Accepted for compatibility and ignored by V2. V2 always emits canonical
5
+ * nested semantic lists.
6
+ *
7
+ * @deprecated replaceWith=canonical nested V2 output compat-indefinitely=existing callers may keep passing the option
8
8
  */
9
9
  unflattenLists?: boolean;
10
10
  }
@@ -1,7 +1,5 @@
1
- import { StoryLocator } from '../types/story.types.js';
2
- export interface GetMarkdownInput {
3
- /** Restrict the read to a specific story. Omit for body (backward compatible). */
4
- in?: StoryLocator;
1
+ import { SDProjectionReadInput } from '../types/content-projection.js';
2
+ export interface GetMarkdownInput extends SDProjectionReadInput {
5
3
  }
6
4
  /**
7
5
  * Engine-specific adapter that the getMarkdown API delegates to.
@@ -12,6 +12,9 @@ import { SDDocument } from './types/fragment.js';
12
12
  import { GetTextAdapter, GetTextInput } from './get-text/get-text.js';
13
13
  import { GetMarkdownAdapter, GetMarkdownInput } from './get-markdown/get-markdown.js';
14
14
  import { GetHtmlAdapter, GetHtmlInput } from './get-html/get-html.js';
15
+ import { ProjectHtmlAdapter } from './project-html/project-html.js';
16
+ import { ProjectMarkdownAdapter } from './project-markdown/project-markdown.js';
17
+ import { ProjectHtmlInput, ProjectMarkdownInput, SDContentProjectionResult } from './types/content-projection.js';
15
18
  import { MarkdownToFragmentAdapter, MarkdownToFragmentInput } from './markdown-to-fragment/markdown-to-fragment.js';
16
19
  import { HtmlToFragmentAdapter, HtmlToFragmentInput } from './html-to-fragment/html-to-fragment.js';
17
20
  import { SDHtmlToFragmentResult, SDMarkdownToFragmentResult } from './types/sd-contract.js';
@@ -79,6 +82,10 @@ export type { MarkdownToFragmentInput, MarkdownToFragmentAdapter, } from './mark
79
82
  export { executeMarkdownToFragment } from './markdown-to-fragment/markdown-to-fragment.js';
80
83
  export type { HtmlToFragmentInput, HtmlToFragmentAdapter } from './html-to-fragment/html-to-fragment.js';
81
84
  export { executeHtmlToFragment } from './html-to-fragment/html-to-fragment.js';
85
+ export type { ProjectHtmlAdapter } from './project-html/project-html.js';
86
+ export { executeProjectHtml } from './project-html/project-html.js';
87
+ export type { ProjectMarkdownAdapter } from './project-markdown/project-markdown.js';
88
+ export { executeProjectMarkdown } from './project-markdown/project-markdown.js';
82
89
  export type { HistoryState, HistoryActionResult, HistoryNoopReason, SDHistoryStatus, SDHistoryCollaborationMeta, } from './history/history.types.js';
83
90
  export { executeTrackChangesGet, executeTrackChangesList, executeTrackChangesDecide, } from './track-changes/track-changes.js';
84
91
  export { createPlanApi, type PlanApi, type PlanExecuteInput, type PlanExecuteEntry, type PlanExecuteEntryExpect, type PlanExecuteResult, type PlanEntryReceipt, type PlanEntryReceiptStatus, type PlanExecuteFailure, type PlanCaptureRefMarker, type PlanProjectTextOffsetMarker, } from './plan/plan.js';
@@ -287,6 +294,8 @@ export interface DocumentApi {
287
294
  * Return the full document content as an HTML string.
288
295
  */
289
296
  getHtml(input: GetHtmlInput): string;
297
+ projectHtml(input: ProjectHtmlInput): Promise<SDContentProjectionResult<'html'>>;
298
+ projectMarkdown(input: ProjectMarkdownInput): Promise<SDContentProjectionResult<'markdown'>>;
290
299
  /**
291
300
  * Convert a Markdown string into an SDM/1 structural fragment.
292
301
  */
@@ -509,6 +518,8 @@ export interface DocumentApiAdapters {
509
518
  getText: GetTextAdapter;
510
519
  getMarkdown: GetMarkdownAdapter;
511
520
  getHtml: GetHtmlAdapter;
521
+ projectHtml?: ProjectHtmlAdapter;
522
+ projectMarkdown?: ProjectMarkdownAdapter;
512
523
  markdownToFragment: MarkdownToFragmentAdapter;
513
524
  htmlToFragment?: HtmlToFragmentAdapter;
514
525
  info: InfoAdapter;
@@ -0,0 +1,5 @@
1
+ import { ProjectHtmlInput, SDContentProjectionResult } from '../types/content-projection.js';
2
+ export interface ProjectHtmlAdapter {
3
+ projectHtml(input: ProjectHtmlInput): Promise<SDContentProjectionResult<'html'>>;
4
+ }
5
+ export declare function executeProjectHtml(adapter: ProjectHtmlAdapter | undefined, input: ProjectHtmlInput): Promise<SDContentProjectionResult<'html'>>;
@@ -0,0 +1,5 @@
1
+ import { ProjectMarkdownInput, SDContentProjectionResult } from '../types/content-projection.js';
2
+ export interface ProjectMarkdownAdapter {
3
+ projectMarkdown(input: ProjectMarkdownInput): Promise<SDContentProjectionResult<'markdown'>>;
4
+ }
5
+ export declare function executeProjectMarkdown(adapter: ProjectMarkdownAdapter | undefined, input: ProjectMarkdownInput): Promise<SDContentProjectionResult<'markdown'>>;
@@ -50,6 +50,8 @@ export type TextTarget = {
50
50
  segments: [TextSegment, ...TextSegment[]];
51
51
  /** Story containing this text target. Omit for body (backward compatible). */
52
52
  story?: StoryLocator;
53
+ /** Coordinate space for segment offsets. Omitted means `visible`. */
54
+ coordinateSpace?: TextCoordinateSpace;
53
55
  };
54
56
  /**
55
57
  * Block node types valid as `nodeEdge` selection anchors.
@@ -0,0 +1,126 @@
1
+ import { BlockNodeAddress, BlockNodeType } from './base.js';
2
+ import { Range, SelectionTarget, TextTarget } from './address.js';
3
+ import { StoryLocator } from './story.types.js';
4
+ import { SDDiagnostic } from './sd-contract.js';
5
+ export declare const SD_PROJECTION_FORMATS: readonly ["html", "markdown"];
6
+ export type SDProjectionFormat = (typeof SD_PROJECTION_FORMATS)[number];
7
+ export declare const SD_PROJECTION_REVIEW_MODES: readonly ["final", "original", "redline"];
8
+ export type SDProjectionReviewMode = (typeof SD_PROJECTION_REVIEW_MODES)[number];
9
+ export declare const SD_PROJECTION_STATUSES: readonly ["success", "warning", "failed"];
10
+ export type SDProjectionStatus = (typeof SD_PROJECTION_STATUSES)[number];
11
+ export declare const SD_PROJECTION_DIAGNOSTIC_CODES: readonly ["projection-normalized-construct", "projection-downgraded-construct", "projection-unsupported-construct", "projection-placeholder-emitted", "projection-annotation-omitted", "projection-numbering-unresolved", "projection-source-coverage-incomplete", "projection-scope-unsupported", "projection-limit-exceeded", "projection-revision-changed", "projection-malformed-source"];
12
+ export type SDProjectionDiagnosticCode = (typeof SD_PROJECTION_DIAGNOSTIC_CODES)[number];
13
+ export declare const SD_PROJECTION_CONSTRUCTS: readonly ["document", "source", "text", "paragraph", "emptyParagraph", "softBreak", "lineBreak", "heading", "bold", "italic", "underline", "strike", "hyperlink", "list", "listLabel", "table", "tableHeader", "tableRow", "tableCell", "colSpan", "rowSpan", "horizontalRule", "inlineCode", "codeBlock", "image", "field", "contentControl", "math", "drawing", "embeddedObject", "sectionBreak", "pageBreak", "columnBreak", "trackedChange", "comment", "scope", "placeholder"];
14
+ export type SDProjectionConstruct = (typeof SD_PROJECTION_CONSTRUCTS)[number];
15
+ export declare const SD_PROJECTION_DISPOSITIONS: readonly ["preserved", "normalized", "downgraded", "placeholder", "omitted", "rejected"];
16
+ export type SDProjectionDisposition = (typeof SD_PROJECTION_DISPOSITIONS)[number];
17
+ export type SDProjectionScope = BlockNodeAddress | SelectionTarget;
18
+ export interface SDProjectionReadInput {
19
+ in?: StoryLocator;
20
+ reviewMode?: SDProjectionReviewMode;
21
+ scope?: SDProjectionScope;
22
+ }
23
+ export interface ProjectHtmlInput extends SDProjectionReadInput {
24
+ includeSourceMap?: boolean;
25
+ }
26
+ export interface ProjectMarkdownInput extends SDProjectionReadInput {
27
+ includeSourceMap?: boolean;
28
+ }
29
+ export type SDResolvedProjectionScope = {
30
+ kind: 'story';
31
+ } | {
32
+ kind: 'block';
33
+ target: BlockNodeAddress;
34
+ } | {
35
+ kind: 'range';
36
+ target: SelectionTarget & {
37
+ coordinateSpace: 'tracked';
38
+ };
39
+ };
40
+ export type SDProjectionBlockMapEntry = {
41
+ nodeType: BlockNodeType;
42
+ output: Range;
43
+ parentBlockId?: string;
44
+ changeIds?: string[];
45
+ commentIds?: string[];
46
+ } & ({
47
+ identity: 'public';
48
+ blockId: string;
49
+ } | {
50
+ identity: 'unavailable';
51
+ identityUnavailableReason: 'positionDerivedFallback';
52
+ blockId?: never;
53
+ });
54
+ export type SDProjectionDiagnostic = Omit<SDDiagnostic, 'code' | 'construct' | 'disposition' | 'lossy' | 'source'> & {
55
+ code: SDProjectionDiagnosticCode;
56
+ construct: SDProjectionConstruct;
57
+ disposition: SDProjectionDisposition;
58
+ lossy: boolean;
59
+ source: {
60
+ story: StoryLocator;
61
+ blockId?: string;
62
+ range?: Range;
63
+ coordinateSpace?: 'tracked';
64
+ changeIds?: string[];
65
+ commentIds?: string[];
66
+ };
67
+ output?: {
68
+ format: SDProjectionFormat;
69
+ range?: Range;
70
+ };
71
+ };
72
+ export interface SDProjectionSourceMap {
73
+ version: 'sd-projection-source-map/1';
74
+ outputCoordinateSpace: 'utf16';
75
+ sourceCoordinateSpace: 'tracked';
76
+ entries: SDProjectionSourceMapEntry[];
77
+ }
78
+ export type SDProjectionSourceMapEntry = {
79
+ kind: 'text';
80
+ output: Range;
81
+ source: TextTarget & {
82
+ coordinateSpace: 'tracked';
83
+ };
84
+ blockId: string;
85
+ changeIds?: string[];
86
+ commentIds?: string[];
87
+ } | ({
88
+ kind: 'synthetic';
89
+ output: Range;
90
+ role: 'listLabel' | 'placeholder';
91
+ changeIds?: string[];
92
+ commentIds?: string[];
93
+ } & ({
94
+ identity: 'public';
95
+ blockId: string;
96
+ } | {
97
+ identity: 'unavailable';
98
+ identityUnavailableReason: 'positionDerivedFallback';
99
+ blockId?: never;
100
+ }));
101
+ export interface SDProjectionAnnotation {
102
+ kind: 'trackedChange' | 'comment';
103
+ id: string;
104
+ blockIds: string[];
105
+ sourceTarget?: TextTarget;
106
+ outputRanges: Range[];
107
+ status: 'emitted' | 'partiallyEmitted' | 'omitted';
108
+ omittedReason?: 'reviewMode' | 'unsupported';
109
+ side?: 'inserted' | 'deleted' | 'source' | 'destination' | 'formatting';
110
+ }
111
+ export interface SDContentProjectionResult<TFormat extends SDProjectionFormat = SDProjectionFormat> {
112
+ format: TFormat;
113
+ content: string;
114
+ status: SDProjectionStatus;
115
+ reviewMode: SDProjectionReviewMode;
116
+ evaluatedRevision: string;
117
+ story: StoryLocator;
118
+ scope: SDResolvedProjectionScope;
119
+ lossy: boolean;
120
+ diagnostics: SDProjectionDiagnostic[];
121
+ blocks: SDProjectionBlockMapEntry[];
122
+ annotations: SDProjectionAnnotation[];
123
+ sourceMap?: SDProjectionSourceMap;
124
+ }
125
+ export declare function deriveSDProjectionStatus(diagnostics: readonly Pick<SDProjectionDiagnostic, 'severity' | 'lossy'>[]): SDProjectionStatus;
126
+ export declare function validateSDProjectionSourceMap(sourceMap: SDProjectionSourceMap, contentLength: number): boolean;
@@ -29,3 +29,4 @@ export * from './adapter-result.js';
29
29
  export * from './structural-input.js';
30
30
  export * from './story.types.js';
31
31
  export * from './clipboard.js';
32
+ export * from './content-projection.js';
package/dist/superdoc.cjs CHANGED
@@ -43514,7 +43514,7 @@ var SuperDoc = class extends require_eventemitter3.import_eventemitter3.default
43514
43514
  this.config.colors = shuffleArray(this.config.colors);
43515
43515
  this.userColorMap = /* @__PURE__ */ new Map();
43516
43516
  this.colorIndex = 0;
43517
- this.version = "2.7.0-next.7";
43517
+ this.version = "2.7.0-next.8";
43518
43518
  this.#log("🦋 [superdoc] Using SuperDoc version:", this.version);
43519
43519
  this.superdocId = config.superdocId || require_uuid.v4();
43520
43520
  this.colors = this.config.colors ?? [];
@@ -43447,7 +43447,7 @@ var SuperDoc = class extends import_eventemitter3.default {
43447
43447
  this.config.colors = shuffleArray(this.config.colors);
43448
43448
  this.userColorMap = /* @__PURE__ */ new Map();
43449
43449
  this.colorIndex = 0;
43450
- this.version = "2.7.0-next.7";
43450
+ this.version = "2.7.0-next.8";
43451
43451
  this.#log("🦋 [superdoc] Using SuperDoc version:", this.version);
43452
43452
  this.superdocId = config.superdocId || v4();
43453
43453
  this.colors = this.config.colors ?? [];
@@ -7,6 +7,8 @@ export { createNumberingManager } from './numbering-manager.js';
7
7
  export type { NumberingManager, NumberingManagerSnapshot, NumberingCursor } from './numbering-manager.js';
8
8
  export { computeWordListMarker } from './list-marker.js';
9
9
  export type { ComputeWordListMarkerInput, ComputeWordListMarkerResult, WordListMarkerDefinition, } from './list-marker.js';
10
+ export { createReviewAwareWordNumberingSequence, reviewAwareWordNumberingCounterScope, } from './review-aware-numbering.js';
11
+ export type { ReviewAwareNumberingMembership, ReviewAwareNumberingStateMode, ReviewAwareWordMarkerFact, ReviewAwareWordNumberingDefinition, ReviewAwareWordNumberingResult, ReviewAwareWordNumberingSequence, ReviewAwareWordNumberingSnapshot, } from './review-aware-numbering.js';
10
12
  /**
11
13
  * Computes the complete layout properties for a Word paragraph, including indentation,
12
14
  * tabs, and optional list marker positioning.
@@ -19,6 +19,14 @@ export interface WordListMarkerDefinition {
19
19
  numFmt?: string;
20
20
  /** Custom format string when `numFmt === 'custom'`. */
21
21
  customFormat?: string;
22
+ /** True when the level carries Word's legal-numbering semantics. */
23
+ isLegal?: boolean;
24
+ /** Effective numbering formats for placeholders that reference each level. */
25
+ levelNumberingFormats?: Array<{
26
+ ilvl: number;
27
+ numFmt?: string;
28
+ customFormat?: string;
29
+ }>;
22
30
  /** `w:suff`. Defaults to `tab` when absent. */
23
31
  suffix?: string;
24
32
  /** `w:lvlJc`. Defaults to `left`. */
@@ -0,0 +1,41 @@
1
+ import { ComputeWordListMarkerResult, WordListMarkerDefinition } from './list-marker.js';
2
+ import { NumberingCursor, NumberingManager, NumberingManagerSnapshot } from './numbering-manager.js';
3
+ export type ReviewAwareNumberingMembership = 'ordinary' | 'inserted' | 'deleted' | 'malformed';
4
+ export type ReviewAwareNumberingStateMode = 'snapshot' | 'cursor';
5
+ export interface ReviewAwareWordNumberingDefinition extends WordListMarkerDefinition {
6
+ restartNumberingAfterBreak?: boolean;
7
+ }
8
+ export type ReviewAwareWordMarkerFact = {
9
+ status: 'resolved';
10
+ result: ComputeWordListMarkerResult;
11
+ } | {
12
+ status: 'unresolved';
13
+ reason: 'missingLvlText' | 'malformedMembership';
14
+ };
15
+ export interface ReviewAwareWordNumberingResult {
16
+ final: ReviewAwareWordMarkerFact | null;
17
+ original: ReviewAwareWordMarkerFact | null;
18
+ redline: ReviewAwareWordMarkerFact;
19
+ }
20
+ export interface ReviewAwareWordNumberingSnapshot {
21
+ live?: NumberingManagerSnapshot | NumberingCursor;
22
+ original?: NumberingManagerSnapshot | NumberingCursor;
23
+ liveSectionEpoch: number;
24
+ originalSectionEpoch: number;
25
+ }
26
+ export interface ReviewAwareWordNumberingSequence {
27
+ advance(input: {
28
+ definition: ReviewAwareWordNumberingDefinition;
29
+ paragraphOrdinal: number;
30
+ membership: ReviewAwareNumberingMembership;
31
+ }): ReviewAwareWordNumberingResult;
32
+ advanceSectionBreak(membership: ReviewAwareNumberingMembership): void;
33
+ captureSnapshot(): ReviewAwareWordNumberingSnapshot;
34
+ restoreSnapshot(snapshot: ReviewAwareWordNumberingSnapshot | null): void;
35
+ counterScope(definition: ReviewAwareWordNumberingDefinition, plane: 'live' | 'original'): string;
36
+ retainedState(): readonly [NumberingManager, NumberingManager];
37
+ }
38
+ export declare function createReviewAwareWordNumberingSequence(options?: {
39
+ stateMode?: ReviewAwareNumberingStateMode;
40
+ }): ReviewAwareWordNumberingSequence;
41
+ export declare function reviewAwareWordNumberingCounterScope(definition: ReviewAwareWordNumberingDefinition, plane: 'live' | 'original', epochs: Pick<ReviewAwareWordNumberingSnapshot, 'liveSectionEpoch' | 'originalSectionEpoch'>): string;