superdoc 2.20.1-next.9 → 2.21.0-next.2
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/chunks/{create-super-doc-ui-Cfwszc3b.es.js → create-super-doc-ui-0CZTlOvl.es.js} +571 -4
- package/dist/chunks/{create-super-doc-ui-j8Qm5SYa.cjs → create-super-doc-ui-yKesgn9b.cjs} +582 -3
- package/dist/collaboration-upgrade-engine.cjs +1 -1
- package/dist/collaboration-upgrade-engine.es.js +1 -1
- package/dist/document-api/src/contract/command-catalog.d.ts +1 -1
- package/dist/document-api/src/contract/operation-definitions.d.ts +3 -3
- package/dist/document-api/src/ranges/ranges.types.d.ts +7 -3
- package/dist/document-api/src/types/create.types.d.ts +91 -2
- package/dist/layout-engine/contracts/src/index.d.ts +37 -0
- package/dist/layout-engine/contracts/src/segment-geometry.d.ts +22 -6
- package/dist/layout-engine/layout-bridge/src/line-justify-adjustment.d.ts +106 -0
- package/dist/public/ui-react.cjs +1 -1
- package/dist/public/ui-react.es.js +1 -1
- package/dist/public/ui-vue.cjs +1 -1
- package/dist/public/ui-vue.es.js +1 -1
- package/dist/public/ui.cjs +1 -1
- package/dist/public/ui.es.js +1 -1
- package/dist/style.css +27 -27
- package/dist/style.layered.css +27 -27
- package/dist/superdoc/src/internal/diagnostics/interaction-history.d.ts +7 -1
- package/dist/superdoc/src/internal/diagnostics/workflow-recording.d.ts +73 -0
- package/dist/superdoc.cjs +11 -7
- package/dist/superdoc.es.js +11 -7
- package/dist-cdn/style.layered.css +1 -1
- package/dist-cdn/superdoc.min.css +1 -1
- package/dist-cdn/superdoc.min.js +39 -39
- package/package.json +2 -2
|
@@ -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" | "insert" | "delete" | "info" | "projectHtml" | "projectMarkdown" | "capabilities.check" | "format.apply" | "blocks.split" | "blocks.merge" | "blocks.move" | "lists.getState" | "lists.apply" | "lists.continue" | "lists.restart" | "lists.remove" | "format.paragraph.setMarkRunProps" | "tables.moveRow" | "tables.moveColumn" | "format.bold" | "format.strike" | "format.color" | "format.rtl" | "format.cs" | "format.shading" | "format.fontFamily" | "format.lang" | "format.fontSize" | "format.fontSizeCs" | "format.highlight" | "format.italic" | "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" | "get" | "getNode" | "getNodeById" | "getText" | "getMarkdown" | "getHtml" | "markdownToFragment" | "htmlToFragment" | "extract" | "clearContent" | "formatRange" | "blocks.findText" | "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" | "selection.extractOoxml" | "mutations.preview" | "mutations.apply" | "plan.execute" | "capabilities.get" | "capabilities.resolve" | "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" | "headerFooters.pageNumbers.get" | "headerFooters.pageNumbers.insert" | "headerFooters.pageNumbers.set" | "headerFooters.pageNumbers.remove" | "watermarks.apply" | "watermarks.list" | "watermarks.insert" | "watermarks.replace" | "watermarks.remove" | "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" | "insert" | "info" | "projectHtml" | "projectMarkdown" | "capabilities.check" | "format.apply" | "blocks.split" | "blocks.merge" | "blocks.move" | "lists.getState" | "lists.apply" | "lists.continue" | "lists.restart" | "lists.remove" | "format.paragraph.setMarkRunProps" | "tables.moveRow" | "tables.moveColumn" | "format.bold" | "format.strike" | "format.color" | "format.position" | "format.rtl" | "format.cs" | "format.shading" | "format.fontFamily" | "format.lang" | "format.fontSize" | "format.fontSizeCs" | "format.highlight" | "format.italic" | "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.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" | "get" | "getNode" | "getNodeById" | "getText" | "getMarkdown" | "getHtml" | "markdownToFragment" | "htmlToFragment" | "extract" | "clearContent" | "formatRange" | "blocks.findText" | "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" | "selection.extractOoxml" | "mutations.preview" | "mutations.apply" | "plan.execute" | "capabilities.get" | "capabilities.resolve" | "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" | "headerFooters.pageNumbers.get" | "headerFooters.pageNumbers.insert" | "headerFooters.pageNumbers.set" | "headerFooters.pageNumbers.remove" | "watermarks.apply" | "watermarks.list" | "watermarks.insert" | "watermarks.replace" | "watermarks.remove" | "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. */
|
|
@@ -3517,6 +3517,9 @@ export declare const OPERATION_DEFINITIONS: {
|
|
|
3517
3517
|
readonly "format.color": OperationDefinitionEntry & {
|
|
3518
3518
|
memberPath: "format.color";
|
|
3519
3519
|
};
|
|
3520
|
+
readonly "format.position": OperationDefinitionEntry & {
|
|
3521
|
+
memberPath: "format.position";
|
|
3522
|
+
};
|
|
3520
3523
|
readonly "format.rtl": OperationDefinitionEntry & {
|
|
3521
3524
|
memberPath: "format.rtl";
|
|
3522
3525
|
};
|
|
@@ -3586,9 +3589,6 @@ export declare const OPERATION_DEFINITIONS: {
|
|
|
3586
3589
|
readonly "format.vertAlign": OperationDefinitionEntry & {
|
|
3587
3590
|
memberPath: "format.vertAlign";
|
|
3588
3591
|
};
|
|
3589
|
-
readonly "format.position": OperationDefinitionEntry & {
|
|
3590
|
-
memberPath: "format.position";
|
|
3591
|
-
};
|
|
3592
3592
|
readonly "format.bCs": OperationDefinitionEntry & {
|
|
3593
3593
|
memberPath: "format.bCs";
|
|
3594
3594
|
};
|
|
@@ -39,15 +39,19 @@ export interface ResolveRangeInput {
|
|
|
39
39
|
export interface RangeBlockPreview {
|
|
40
40
|
nodeId: string;
|
|
41
41
|
nodeType: BlockNodeType;
|
|
42
|
+
/** Block text clipped to 200 characters. */
|
|
42
43
|
textPreview: string;
|
|
43
44
|
}
|
|
44
45
|
/** Preview metadata for the resolved range. */
|
|
45
46
|
export interface RangePreview {
|
|
46
|
-
/**
|
|
47
|
+
/**
|
|
48
|
+
* Concatenated text content across the range.
|
|
49
|
+
* Truncated above 2000 characters; see `truncated`.
|
|
50
|
+
*/
|
|
47
51
|
text: string;
|
|
48
|
-
/** Whether
|
|
52
|
+
/** Whether `text` was truncated above the 2000-character budget. */
|
|
49
53
|
truncated: boolean;
|
|
50
|
-
/** Per-block preview entries in document order. */
|
|
54
|
+
/** Per-block preview entries in document order (each textPreview capped at 200 characters). */
|
|
51
55
|
blocks: RangeBlockPreview[];
|
|
52
56
|
}
|
|
53
57
|
export interface ResolveRangeOutput {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { TextAddress } from './address.js';
|
|
2
2
|
import { BlockNodeAddress } from './base.js';
|
|
3
|
+
import { ResolvedHandle } from './discovery.js';
|
|
3
4
|
import { ReceiptFailure, ReceiptInsert } from './receipt.js';
|
|
4
5
|
import { StoryLocator } from './story.types.js';
|
|
5
6
|
export type ParagraphCreateLocation = {
|
|
@@ -18,13 +19,57 @@ export interface CreateParagraphInput {
|
|
|
18
19
|
in?: StoryLocator;
|
|
19
20
|
at?: ParagraphCreateLocation;
|
|
20
21
|
text?: string;
|
|
22
|
+
/**
|
|
23
|
+
* Explicit paragraph style id (e.g. `'BodyText'`) to apply instead of the
|
|
24
|
+
* document's default paragraph style. Neighboring styles and direct
|
|
25
|
+
* formatting are not inherited. An unknown style id fails
|
|
26
|
+
* with `INVALID_INPUT` and does not mutate the document.
|
|
27
|
+
*/
|
|
28
|
+
styleId?: string;
|
|
21
29
|
}
|
|
22
30
|
export interface CreateParagraphSuccessResult {
|
|
23
31
|
success: true;
|
|
24
32
|
paragraph: BlockNodeAddress;
|
|
25
33
|
insertionPoint: TextAddress;
|
|
26
34
|
trackedChangeRefs?: ReceiptInsert[];
|
|
27
|
-
/**
|
|
35
|
+
/**
|
|
36
|
+
* Mutation-ready handle for the created paragraph. `handle.ref` is an
|
|
37
|
+
* opaque, self-contained ref (the same shape `ranges.resolve` produces) —
|
|
38
|
+
* pass it directly to `format.apply`'s `ref` without needing to also pass
|
|
39
|
+
* `in`/story context, even for a header/footer paragraph. It is pinned to
|
|
40
|
+
* `evaluatedRevision` (`refStability: 'ephemeral'`), so it is valid for
|
|
41
|
+
* the immediate next mutation call only; chaining a second one after that
|
|
42
|
+
* needs a fresh ref from a discovery read (e.g. `blocks.list`,
|
|
43
|
+
* `query.match`). `paragraph.nodeId` remains stable across revisions for
|
|
44
|
+
* non-ref addressing (e.g. `{ target: { kind: 'block', nodeType, nodeId } }`).
|
|
45
|
+
*
|
|
46
|
+
* With `options.dryRun: true`, nothing was committed, so there is no real
|
|
47
|
+
* block to reference: `handle.ref` is the literal placeholder `'(dry-run)'`
|
|
48
|
+
* and `paragraph.nodeId`/`insertionPoint.blockId` are too. Do not pass a
|
|
49
|
+
* dry-run `handle.ref` to `format.apply` or any other mutation — it does
|
|
50
|
+
* not resolve and the call fails with `INVALID_TARGET`.
|
|
51
|
+
*
|
|
52
|
+
* With no `text` (an empty paragraph), `handle.ref` spans a zero-length
|
|
53
|
+
* range. This is not specific to create — `format.apply`'s "inline" action
|
|
54
|
+
* cannot format zero-length text in general (there are no characters to
|
|
55
|
+
* carry run properties), so chaining `handle.ref` into it fails with
|
|
56
|
+
* `INVALID_TARGET` for an empty create the same way it would for any other
|
|
57
|
+
* zero-length selection. Use paragraph-level actions with `paragraph` (its
|
|
58
|
+
* `nodeId`) instead, e.g. `styles.paragraph.setStyle` or
|
|
59
|
+
* `format.paragraph.setIndentation`, which target the whole block and do
|
|
60
|
+
* not need a non-empty text range.
|
|
61
|
+
*/
|
|
62
|
+
handle: ResolvedHandle;
|
|
63
|
+
/**
|
|
64
|
+
* Document revision immediately after this create committed. Pass as
|
|
65
|
+
* `expectedRevision` on the immediate next mutation call to chain without
|
|
66
|
+
* a `REVISION_MISMATCH` (SD-4886).
|
|
67
|
+
*/
|
|
68
|
+
evaluatedRevision: string;
|
|
69
|
+
/**
|
|
70
|
+
* @deprecated Use `handle.ref` instead. Kept as an alias of `handle.ref`
|
|
71
|
+
* for backward compatibility with existing callers of this field.
|
|
72
|
+
*/
|
|
28
73
|
ref?: string;
|
|
29
74
|
}
|
|
30
75
|
export interface CreateParagraphFailureResult {
|
|
@@ -40,13 +85,57 @@ export interface CreateHeadingInput {
|
|
|
40
85
|
level: HeadingLevel;
|
|
41
86
|
at?: HeadingCreateLocation;
|
|
42
87
|
text?: string;
|
|
88
|
+
/**
|
|
89
|
+
* Explicit paragraph style id to apply instead of the `Heading{level}`
|
|
90
|
+
* style normally derived from `level`. `level` still controls numbering
|
|
91
|
+
* suppression regardless of this override. An unknown style id fails with
|
|
92
|
+
* `INVALID_INPUT` and does not mutate the document.
|
|
93
|
+
*/
|
|
94
|
+
styleId?: string;
|
|
43
95
|
}
|
|
44
96
|
export interface CreateHeadingSuccessResult {
|
|
45
97
|
success: true;
|
|
46
98
|
heading: BlockNodeAddress;
|
|
47
99
|
insertionPoint: TextAddress;
|
|
48
100
|
trackedChangeRefs?: ReceiptInsert[];
|
|
49
|
-
/**
|
|
101
|
+
/**
|
|
102
|
+
* Mutation-ready handle for the created heading. `handle.ref` is an
|
|
103
|
+
* opaque, self-contained ref (the same shape `ranges.resolve` produces) —
|
|
104
|
+
* pass it directly to `format.apply`'s `ref` without needing to also pass
|
|
105
|
+
* `in`/story context, even for a header/footer heading. It is pinned to
|
|
106
|
+
* `evaluatedRevision` (`refStability: 'ephemeral'`), so it is valid for
|
|
107
|
+
* the immediate next mutation call only; chaining a second one after that
|
|
108
|
+
* needs a fresh ref from a discovery read (e.g. `blocks.list`,
|
|
109
|
+
* `query.match`). `heading.nodeId` remains stable across revisions for
|
|
110
|
+
* non-ref addressing (e.g. `{ target: { kind: 'block', nodeType, nodeId } }`).
|
|
111
|
+
*
|
|
112
|
+
* With `options.dryRun: true`, nothing was committed, so there is no real
|
|
113
|
+
* block to reference: `handle.ref` is the literal placeholder `'(dry-run)'`
|
|
114
|
+
* and `heading.nodeId`/`insertionPoint.blockId` are too. Do not pass a
|
|
115
|
+
* dry-run `handle.ref` to `format.apply` or any other mutation — it does
|
|
116
|
+
* not resolve and the call fails with `INVALID_TARGET`.
|
|
117
|
+
*
|
|
118
|
+
* With no `text` (an empty heading), `handle.ref` spans a zero-length
|
|
119
|
+
* range. This is not specific to create — `format.apply`'s "inline" action
|
|
120
|
+
* cannot format zero-length text in general (there are no characters to
|
|
121
|
+
* carry run properties), so chaining `handle.ref` into it fails with
|
|
122
|
+
* `INVALID_TARGET` for an empty create the same way it would for any other
|
|
123
|
+
* zero-length selection. Use paragraph-level actions with `heading` (its
|
|
124
|
+
* `nodeId`) instead, e.g. `styles.paragraph.setStyle` or
|
|
125
|
+
* `format.paragraph.setIndentation`, which target the whole block and do
|
|
126
|
+
* not need a non-empty text range.
|
|
127
|
+
*/
|
|
128
|
+
handle: ResolvedHandle;
|
|
129
|
+
/**
|
|
130
|
+
* Document revision immediately after this create committed. Pass as
|
|
131
|
+
* `expectedRevision` on the immediate next mutation call to chain without
|
|
132
|
+
* a `REVISION_MISMATCH` (SD-4886).
|
|
133
|
+
*/
|
|
134
|
+
evaluatedRevision: string;
|
|
135
|
+
/**
|
|
136
|
+
* @deprecated Use `handle.ref` instead. Kept as an alias of `handle.ref`
|
|
137
|
+
* for backward compatibility with existing callers of this field.
|
|
138
|
+
*/
|
|
50
139
|
ref?: string;
|
|
51
140
|
}
|
|
52
141
|
export interface CreateHeadingFailureResult {
|
|
@@ -1272,6 +1272,33 @@ export type ShapeGroupVectorChild = {
|
|
|
1272
1272
|
customGeometry?: CustomGeometryData;
|
|
1273
1273
|
shapeId?: string;
|
|
1274
1274
|
shapeName?: string;
|
|
1275
|
+
/**
|
|
1276
|
+
* SD-5244: canonical textbox story identity for an in-scope group
|
|
1277
|
+
* child (single-level, unrotated/unflipped group and child). Present
|
|
1278
|
+
* only when the child was successfully bound to an editor-core
|
|
1279
|
+
* textbox story; absent otherwise (see `textboxStaticReason`).
|
|
1280
|
+
*/
|
|
1281
|
+
textboxId?: string;
|
|
1282
|
+
/**
|
|
1283
|
+
* Canonical block content for the bound textbox story. Loosely typed
|
|
1284
|
+
* like `DrawingBlockBase.attrs`/`TextboxDrawing`'s own informal
|
|
1285
|
+
* `textboxBinding` attrs entry elsewhere in this file — group
|
|
1286
|
+
* children intentionally reuse that same "opaque round-trip" shape
|
|
1287
|
+
* rather than a dedicated type, so no new cross-package dependency on
|
|
1288
|
+
* v2-layout-adapter's `TextboxProjectionBinding` is introduced here.
|
|
1289
|
+
*/
|
|
1290
|
+
contentBlocks?: TextboxContentBlock[];
|
|
1291
|
+
/** Opaque kernel binding round-tripped for the story registration step; not consumed at this layer. */
|
|
1292
|
+
textboxBinding?: unknown;
|
|
1293
|
+
/** Opaque content-block identities round-tripped for the story registration step; not consumed at this layer. */
|
|
1294
|
+
textboxContentBlockIdentities?: unknown;
|
|
1295
|
+
/**
|
|
1296
|
+
* Present iff this child could not be (or was not) bound to an
|
|
1297
|
+
* editable textbox story — e.g. nested group, rotated/flipped group
|
|
1298
|
+
* or child, or a canonical binding was unavailable. Drives the
|
|
1299
|
+
* fail-closed rendering and clean-rejection paths.
|
|
1300
|
+
*/
|
|
1301
|
+
textboxStaticReason?: string;
|
|
1275
1302
|
};
|
|
1276
1303
|
};
|
|
1277
1304
|
export type ShapeGroupImageChild = {
|
|
@@ -2342,6 +2369,14 @@ export type DrawingMeasure = {
|
|
|
2342
2369
|
groupTransform?: ShapeGroupTransform;
|
|
2343
2370
|
/** Canonical block measurements for textbox content, when the drawing owns a textbox story. */
|
|
2344
2371
|
contentMeasures?: TextboxContentMeasure[];
|
|
2372
|
+
/**
|
|
2373
|
+
* SD-5244: canonical block measurements for editable shape-group children's
|
|
2374
|
+
* textbox content, keyed by each child's `textboxId`. Kept as a `Measure`/
|
|
2375
|
+
* `Layout`-side artifact — like `contentMeasures` above — rather than on
|
|
2376
|
+
* `ShapeGroupVectorChild.attrs`/`block.shapes`, which `layout-bridge`'s
|
|
2377
|
+
* cache hash serializes in full.
|
|
2378
|
+
*/
|
|
2379
|
+
groupChildContentMeasures?: Record<string, TextboxContentMeasure[]>;
|
|
2345
2380
|
};
|
|
2346
2381
|
export type TableCellMeasure = {
|
|
2347
2382
|
/** Multi-block cell measurements (new feature) */
|
|
@@ -2715,6 +2750,8 @@ export type DrawingFragment = {
|
|
|
2715
2750
|
/** V2 textbox story id for DrawingML textbox content painted inside this drawing. */
|
|
2716
2751
|
textboxId?: string;
|
|
2717
2752
|
contentMeasures?: TextboxContentMeasure[];
|
|
2753
|
+
/** SD-5244: see `DrawingMeasure.groupChildContentMeasures` — carried through onto the painted fragment for a `shapeGroup` drawing. */
|
|
2754
|
+
groupChildContentMeasures?: Record<string, TextboxContentMeasure[]>;
|
|
2718
2755
|
pmStart?: number;
|
|
2719
2756
|
pmEnd?: number;
|
|
2720
2757
|
sourceAnchor?: SourceAnchor;
|
|
@@ -43,10 +43,11 @@ export type NeutralSegmentGeometry = {
|
|
|
43
43
|
*/
|
|
44
44
|
export type NeutralLineGeometryFlags = {
|
|
45
45
|
/**
|
|
46
|
-
* Line participates in justified alignment.
|
|
47
|
-
*
|
|
48
|
-
*
|
|
49
|
-
*
|
|
46
|
+
* Line participates in justified alignment. When the line actually stretches
|
|
47
|
+
* (not the true last line of its paragraph, not tab-aligned), segment
|
|
48
|
+
* `x`/`width` already carry the exact painter-consistent slack — the same
|
|
49
|
+
* shared word-spacing / inter-character distribution the painter applies at
|
|
50
|
+
* paint time — so downstream caret math is exact, not approximate.
|
|
50
51
|
*/
|
|
51
52
|
justified?: boolean;
|
|
52
53
|
/** Line uses explicit tab/segment positioning (at least one segment has an explicit x). */
|
|
@@ -75,7 +76,15 @@ export type NeutralLineGeometry = {
|
|
|
75
76
|
lineHeight: number;
|
|
76
77
|
/** Container-space x where line content starts after indent + alignment (px). */
|
|
77
78
|
contentLeft: number;
|
|
78
|
-
/**
|
|
79
|
+
/**
|
|
80
|
+
* Content width of the line (px), matching what the painter actually
|
|
81
|
+
* renders: the natural measured width for an unstretched line, or the full
|
|
82
|
+
* available (post-slack) width for a justified line that is actually
|
|
83
|
+
* stretched (see {@link NeutralLineGeometryFlags.justified}). Consumers use
|
|
84
|
+
* this both as the coordinate-space bound for a point on the line and as
|
|
85
|
+
* the available width fed back into justify math, so it must track the
|
|
86
|
+
* rendered span, not always the natural one.
|
|
87
|
+
*/
|
|
79
88
|
contentWidth: number;
|
|
80
89
|
/** Resolved inline direction for the line. */
|
|
81
90
|
direction: NeutralTextDirection;
|
|
@@ -128,7 +137,14 @@ export type NeutralGeometryDiagnostic =
|
|
|
128
137
|
| {
|
|
129
138
|
code: 'unsupported-complex-bidi';
|
|
130
139
|
}
|
|
131
|
-
/**
|
|
140
|
+
/**
|
|
141
|
+
* Reserved for a justified-line case whose exact position cannot be proven
|
|
142
|
+
* (mirrors the fail-closed posture of the other diagnostics here). LTR
|
|
143
|
+
* justify is resolved exactly (see {@link NeutralLineGeometryFlags.justified})
|
|
144
|
+
* and RTL+justify fails closed with `unsupported-direction` before reaching
|
|
145
|
+
* per-line geometry, so no producer currently emits this code — kept for
|
|
146
|
+
* schema stability in case a future unresolved variant needs it.
|
|
147
|
+
*/
|
|
132
148
|
| {
|
|
133
149
|
code: 'approximate-justify';
|
|
134
150
|
}
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
import { FlowBlock, Line } from '../../contracts/src/index.js';
|
|
2
|
+
/**
|
|
3
|
+
* Shared, canvas-independent justify-adjustment calculation.
|
|
4
|
+
*
|
|
5
|
+
* Single source of truth for the per-line justify slack (word-spacing and
|
|
6
|
+
* inter-character distribution) so painter measurement, caret/hit-test
|
|
7
|
+
* geometry, and the editor-neutral segment-geometry substrate all agree on
|
|
8
|
+
* the same numbers. Depends only on `@superdoc/contracts` line/run data —
|
|
9
|
+
* no Canvas context — so it is safe to call from geometry producers that run
|
|
10
|
+
* without a live DOM.
|
|
11
|
+
*/
|
|
12
|
+
/**
|
|
13
|
+
* Represents the justify alignment adjustment applied to a line.
|
|
14
|
+
*
|
|
15
|
+
* When text is justified, the layout engine distributes extra space (slack)
|
|
16
|
+
* evenly across all space characters in the line. This type captures both
|
|
17
|
+
* the per-space adjustment amount and the total number of spaces, which are
|
|
18
|
+
* used by text measurement functions to accurately calculate character
|
|
19
|
+
* positions in justified text.
|
|
20
|
+
*
|
|
21
|
+
* @property extraPerSpace - Additional pixels to add after each space character (can be 0 for non-justified text)
|
|
22
|
+
* @property totalSpaces - Total count of space characters in the line (used for validation and debugging)
|
|
23
|
+
*/
|
|
24
|
+
export type JustifyAdjustment = {
|
|
25
|
+
extraPerSpace: number;
|
|
26
|
+
totalSpaces: number;
|
|
27
|
+
interCharacterSpacing: number;
|
|
28
|
+
interCharacterBoundaries: readonly number[];
|
|
29
|
+
};
|
|
30
|
+
export type GetJustifyAdjustmentParams = {
|
|
31
|
+
block: FlowBlock;
|
|
32
|
+
line: Line;
|
|
33
|
+
availableWidthOverride?: number;
|
|
34
|
+
alignmentOverride?: string;
|
|
35
|
+
isLastLineOfParagraph?: boolean;
|
|
36
|
+
paragraphEndsWithLineBreak?: boolean;
|
|
37
|
+
skipJustifyOverride?: boolean;
|
|
38
|
+
};
|
|
39
|
+
/**
|
|
40
|
+
* Counts the number of space characters in a text string.
|
|
41
|
+
*
|
|
42
|
+
* Only counts spaces that participate in CSS word-spacing behavior (regular
|
|
43
|
+
* space and non-breaking space). This is used for justify alignment
|
|
44
|
+
* calculations where extra width needs to be distributed proportionally
|
|
45
|
+
* across spaces.
|
|
46
|
+
*
|
|
47
|
+
* @param text - The text string to analyze
|
|
48
|
+
* @returns The count of space characters (regular space U+0020 and non-breaking space U+00A0)
|
|
49
|
+
*
|
|
50
|
+
* @example
|
|
51
|
+
* ```typescript
|
|
52
|
+
* countSpaces("Hello World"); // Returns: 1
|
|
53
|
+
* countSpaces("A B C"); // Returns: 2
|
|
54
|
+
* countSpaces("No-spaces"); // Returns: 0
|
|
55
|
+
* ```
|
|
56
|
+
*/
|
|
57
|
+
export declare const countSpaces: (text: string) => number;
|
|
58
|
+
/**
|
|
59
|
+
* Computes the per-space expansion applied when a line is justified.
|
|
60
|
+
*
|
|
61
|
+
* Uses shared justify utilities to ensure consistency with the painter's
|
|
62
|
+
* justify logic, which distributes slack (extra horizontal space) evenly
|
|
63
|
+
* across all space characters using CSS word-spacing.
|
|
64
|
+
*
|
|
65
|
+
* Algorithm:
|
|
66
|
+
* 1. Use shouldApplyJustify() to determine if justify should be applied (including last-line detection)
|
|
67
|
+
* 2. Count all space characters (or use pre-computed line.spaceCount)
|
|
68
|
+
* 3. Use calculateJustifySpacing() to compute per-space adjustment
|
|
69
|
+
* 4. Support negative slack for compressed lines (naturalWidth > availableWidth)
|
|
70
|
+
*
|
|
71
|
+
* Edge Cases:
|
|
72
|
+
* - Non-justify alignment: Returns zero adjustment
|
|
73
|
+
* - Last line of paragraph: Returns zero adjustment (unless paragraph ends with soft break)
|
|
74
|
+
* - No spaces: Returns zero adjustment (prevents division by zero)
|
|
75
|
+
* - Lines with author-defined tab stops: Returns zero adjustment
|
|
76
|
+
* - Compressed lines: Returns negative adjustment (naturalWidth used for slack calculation)
|
|
77
|
+
* - Empty runs array: Returns zero adjustment
|
|
78
|
+
*
|
|
79
|
+
* @param params - Named parameters for justify adjustment.
|
|
80
|
+
* @param params.block - The paragraph block containing the line
|
|
81
|
+
* @param params.line - The line to compute justify adjustment for
|
|
82
|
+
* @param params.availableWidthOverride - The available width for content (fragment width minus paragraph indents).
|
|
83
|
+
* Must match what the painter uses to ensure consistent justify spacing. If not provided,
|
|
84
|
+
* falls back to line.maxWidth or line.width.
|
|
85
|
+
* @param params.alignmentOverride - Optional alignment override (defaults to block.attrs.alignment)
|
|
86
|
+
* @param params.isLastLineOfParagraph - Whether this is the last line of the paragraph.
|
|
87
|
+
* If not provided, auto-derived from block/line: `line.toRun >= block.runs.length - 1`.
|
|
88
|
+
* Auto-derivation ensures measurement matches rendering. Returns false for empty runs arrays.
|
|
89
|
+
* @param params.paragraphEndsWithLineBreak - Whether the paragraph ends with a soft break (Shift+Enter).
|
|
90
|
+
* If not provided, auto-derived: `lastRun?.kind === 'lineBreak'`.
|
|
91
|
+
* Auto-derivation ensures measurement matches rendering. Returns false for empty runs arrays.
|
|
92
|
+
* @param params.skipJustifyOverride - Explicit override to skip justify
|
|
93
|
+
* @returns Object containing extraPerSpace (pixels to add after each space) and totalSpaces
|
|
94
|
+
*
|
|
95
|
+
* @example
|
|
96
|
+
* ```typescript
|
|
97
|
+
* // Line with 200px width in 250px available space, 5 spaces
|
|
98
|
+
* const adj = getJustifyAdjustment({ block, line, availableWidthOverride: 250, isLastLineOfParagraph: false });
|
|
99
|
+
* // Returns: { extraPerSpace: 10, totalSpaces: 5 } (50px slack / 5 spaces)
|
|
100
|
+
*
|
|
101
|
+
* // Last line of paragraph (no soft break)
|
|
102
|
+
* const adj = getJustifyAdjustment({ block, line, availableWidthOverride: 250, isLastLineOfParagraph: true });
|
|
103
|
+
* // Returns: { extraPerSpace: 0, totalSpaces: 5 } (last line not justified)
|
|
104
|
+
* ```
|
|
105
|
+
*/
|
|
106
|
+
export declare const getJustifyAdjustment: ({ block, line, availableWidthOverride, alignmentOverride, isLastLineOfParagraph, paragraphEndsWithLineBreak, skipJustifyOverride, }: GetJustifyAdjustmentParams) => JustifyAdjustment;
|
package/dist/public/ui-react.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_create_super_doc_ui = require("../chunks/create-super-doc-ui-
|
|
2
|
+
const require_create_super_doc_ui = require("../chunks/create-super-doc-ui-yKesgn9b.cjs");
|
|
3
3
|
const require_slice_source = require("../chunks/slice-source-CFaqq0Vo.cjs");
|
|
4
4
|
let react = require("react");
|
|
5
5
|
//#region src/public/ui/react.ts
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as createSuperDocUI } from "../chunks/create-super-doc-ui-
|
|
1
|
+
import { t as createSuperDocUI } from "../chunks/create-super-doc-ui-0CZTlOvl.es.js";
|
|
2
2
|
import { t as toSliceSource } from "../chunks/slice-source-gfOhG2MW.es.js";
|
|
3
3
|
import { createContext, createElement, useCallback, useContext, useEffect, useRef, useState } from "react";
|
|
4
4
|
//#region src/public/ui/react.ts
|
package/dist/public/ui-vue.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_create_super_doc_ui = require("../chunks/create-super-doc-ui-
|
|
2
|
+
const require_create_super_doc_ui = require("../chunks/create-super-doc-ui-yKesgn9b.cjs");
|
|
3
3
|
const require_slice_source = require("../chunks/slice-source-CFaqq0Vo.cjs");
|
|
4
4
|
let superdoc_entry_vue = require("vue");
|
|
5
5
|
//#region src/public/ui/vue.ts
|
package/dist/public/ui-vue.es.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as createSuperDocUI } from "../chunks/create-super-doc-ui-
|
|
1
|
+
import { t as createSuperDocUI } from "../chunks/create-super-doc-ui-0CZTlOvl.es.js";
|
|
2
2
|
import { t as toSliceSource } from "../chunks/slice-source-gfOhG2MW.es.js";
|
|
3
3
|
import { computed, inject, onScopeDispose, provide, shallowRef, toRaw, toValue, watch } from "vue";
|
|
4
4
|
//#region src/public/ui/vue.ts
|
package/dist/public/ui.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_create_super_doc_ui = require("../chunks/create-super-doc-ui-
|
|
2
|
+
const require_create_super_doc_ui = require("../chunks/create-super-doc-ui-yKesgn9b.cjs");
|
|
3
3
|
exports.BUILT_IN_COMMAND_IDS = require_create_super_doc_ui.BUILT_IN_COMMAND_IDS;
|
|
4
4
|
exports.createSuperDocUI = require_create_super_doc_ui.createSuperDocUI;
|
|
5
5
|
exports.shallowEqual = require_create_super_doc_ui.shallowEqual;
|
package/dist/public/ui.es.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as BUILT_IN_COMMAND_IDS, t as createSuperDocUI, u as shallowEqual } from "../chunks/create-super-doc-ui-
|
|
1
|
+
import { a as BUILT_IN_COMMAND_IDS, t as createSuperDocUI, u as shallowEqual } from "../chunks/create-super-doc-ui-0CZTlOvl.es.js";
|
|
2
2
|
export { BUILT_IN_COMMAND_IDS, createSuperDocUI, shallowEqual };
|