superdoc 2.29.0-next.3 → 2.29.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/chunks/{FindReplaceSurface-BKVHzhQ4.es.js → FindReplaceSurface-B_5ggdWg.es.js} +1 -1
- package/dist/chunks/{FindReplaceSurface-BNDrJ6VS.cjs → FindReplaceSurface-fVHxPXtn.cjs} +1 -1
- package/dist/chunks/{PasswordPromptSurface-6mF6Azda.es.js → PasswordPromptSurface-CZqhDQQ1.es.js} +1 -1
- package/dist/chunks/{PasswordPromptSurface-BNkaztaP.cjs → PasswordPromptSurface-x8GNmMJT.cjs} +1 -1
- package/dist/chunks/{PdfViewer-D4lVeOJu.es.js → PdfViewer-CW09MNrB.es.js} +70 -105
- package/dist/chunks/{PdfViewer-boENOZdF.cjs → PdfViewer-CkrAHpC-.cjs} +74 -109
- package/dist/chunks/{_plugin-vue_export-helper-6MBoygIY.cjs → _plugin-vue_export-helper-BkbCxNeT.cjs} +31 -7
- package/dist/chunks/{_plugin-vue_export-helper-CsJQtMvr.es.js → _plugin-vue_export-helper-DRPRMkeA.es.js} +20 -8
- package/dist/chunks/{constants-DpXuDx_g.cjs → constants-BeeNZoQp.cjs} +1 -1
- package/dist/chunks/{constants-B6VBlmKp.es.js → constants-BvNs_ybI.es.js} +1 -1
- package/dist/chunks/{create-super-doc-ui-BFt8agAI.es.js → create-super-doc-ui-Dc8dQAMc.es.js} +89 -137
- package/dist/chunks/{create-super-doc-ui-BAGOnYGM.cjs → create-super-doc-ui-L60GhVAX.cjs} +211 -259
- package/dist/collaboration-upgrade-engine.cjs +1 -1
- package/dist/collaboration-upgrade-engine.es.js +1 -1
- package/dist/document-api/src/capabilities/html-markdown-support.d.ts +4 -6
- package/dist/document-api/src/comments/comments.d.ts +2 -0
- package/dist/document-api/src/contract/command-catalog.d.ts +1 -1
- package/dist/document-api/src/contract/operation-definitions.d.ts +2 -2
- package/dist/document-api/src/contract/operation-registry.d.ts +10 -9
- package/dist/document-api/src/index.d.ts +8 -7
- package/dist/document-api/src/insert/insert.d.ts +2 -2
- package/dist/document-api/src/replace/replace.d.ts +3 -2
- package/dist/document-api/src/types/address.d.ts +3 -0
- package/dist/document-api/src/types/temporary-mutation.d.ts +5 -1
- package/dist/document-api/src/write/write.d.ts +12 -6
- 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 +1 -1
- package/dist/style.layered.css +1 -1
- package/dist/superdoc/src/SuperDoc.vue.d.ts +132 -58
- package/dist/superdoc/src/components/CommentsLayer/CommentDialog.vue.d.ts +28 -13
- package/dist/superdoc/src/components/CommentsLayer/collect-removed-comment-ids.d.ts +11 -1
- package/dist/superdoc/src/components/CommentsLayer/collect-tracked-change-thread.d.ts +19 -2
- package/dist/superdoc/src/components/CommentsLayer/comment-urls.d.ts +1 -1
- package/dist/superdoc/src/components/CommentsLayer/commentsList/super-comments-list.d.ts +23 -20
- package/dist/superdoc/src/components/CommentsLayer/floating-comment-positioning.d.ts +24 -23
- package/dist/superdoc/src/components/CommentsLayer/helpers.d.ts +1 -4
- package/dist/superdoc/src/components/CommentsLayer/tracked-change-threading.d.ts +16 -2
- package/dist/superdoc/src/components/CommentsLayer/use-comment.d.ts +28 -13
- package/dist/superdoc/src/components/PdfViewer/PdfViewer.vue.d.ts +132 -45
- package/dist/superdoc/src/components/PdfViewer/PdfViewerDocument.vue.d.ts +62 -16
- package/dist/superdoc/src/components/PdfViewer/PdfViewerPage.vue.d.ts +77 -17
- package/dist/superdoc/src/components/PdfViewer/pdf-viewer-types.d.ts +45 -0
- package/dist/superdoc/src/components/Whiteboard/WhiteboardLayer.vue.d.ts +80 -16
- package/dist/superdoc/src/components/Whiteboard/WhiteboardPage.vue.d.ts +48 -13
- package/dist/superdoc/src/components/Whiteboard/use-whiteboard.d.ts +30 -15
- package/dist/superdoc/src/components/Whiteboard/whiteboard-types.d.ts +13 -0
- package/dist/superdoc/src/components/surfaces/focusable-selector.d.ts +1 -5
- package/dist/superdoc/src/components/surfaces/watermark-surface-runtime.d.ts +7 -7
- package/dist/superdoc/src/composables/find-shortcut-owner.d.ts +16 -9
- package/dist/superdoc/src/composables/replace-continuation.d.ts +11 -15
- package/dist/superdoc/src/composables/use-comment-small-screen.d.ts +11 -7
- package/dist/superdoc/src/composables/use-compact-comment-popover.d.ts +44 -18
- package/dist/superdoc/src/composables/use-document.d.ts +1210 -30
- package/dist/superdoc/src/composables/use-field.d.ts +88 -25
- package/dist/superdoc/src/composables/use-find-replace.d.ts +13 -3
- package/dist/superdoc/src/composables/use-password-prompt.d.ts +23 -24
- package/dist/superdoc/src/composables/use-viewport-fit.d.ts +62 -26
- package/dist/superdoc/src/composables/useUiFontFamily.d.ts +3 -11
- package/dist/superdoc/src/core/SuperDoc.d.ts +4 -4
- package/dist/superdoc/src/core/collaboration/collaboration-comments.d.ts +9 -4
- package/dist/superdoc/src/core/collaboration/helpers.d.ts +20 -3
- package/dist/superdoc/src/core/collaboration/permissions.d.ts +15 -10
- package/dist/superdoc/src/core/collaboration/resolve-v2-collaboration-target.d.ts +4 -3
- package/dist/superdoc/src/core/collaboration/v2-awareness-bridge.d.ts +2 -1
- package/dist/superdoc/src/core/config/merge-comments-config.d.ts +1 -5
- package/dist/superdoc/src/core/config/merge-defined.d.ts +3 -8
- package/dist/superdoc/src/core/config/normalize-hyperlinks-config.d.ts +7 -12
- package/dist/superdoc/src/core/config/normalize-surfaces-config.d.ts +9 -12
- package/dist/superdoc/src/core/config/normalize-ui-config.d.ts +1 -12
- package/dist/superdoc/src/core/create-app.d.ts +13 -24
- package/dist/superdoc/src/core/editor-runtime/conformance/fake-v2-runtime.d.ts +2 -1
- package/dist/superdoc/src/core/editor-runtime/editor-runtime-registry.d.ts +2 -1
- package/dist/superdoc/src/core/editor-runtime/index.d.ts +1 -1
- package/dist/superdoc/src/core/editor-runtime/types.d.ts +2 -1
- package/dist/superdoc/src/core/editor-runtime/v2/v2-session-shortcut-routes.d.ts +1 -1
- package/dist/superdoc/src/core/helpers/export.d.ts +3 -2
- package/dist/superdoc/src/core/helpers/file.d.ts +8 -45
- package/dist/superdoc/src/core/helpers/normalize-track-changes-config.d.ts +6 -60
- package/dist/superdoc/src/core/pdf/helpers/constants.d.ts +2 -2
- package/dist/superdoc/src/core/pdf/helpers/floor.d.ts +1 -1
- package/dist/superdoc/src/core/pdf/helpers/range.d.ts +1 -1
- package/dist/superdoc/src/core/pdf/helpers/read-file.d.ts +1 -1
- package/dist/superdoc/src/core/pdf/pdf-adapter.d.ts +28 -61
- package/dist/superdoc/src/core/superdoc-ui-owner.d.ts +1 -1
- package/dist/superdoc/src/core/surface-manager.d.ts +21 -83
- package/dist/superdoc/src/core/types/index.d.ts +41 -23
- package/dist/superdoc/src/core/v2-integration/browser-peer-runtime.d.ts +5 -3
- package/dist/superdoc/src/core/v2-integration/cdn-engine-loader.d.ts +3 -13
- package/dist/superdoc/src/core/v2-integration/internal-vue-runtime.d.ts +64 -59
- package/dist/superdoc/src/core/v2-integration/v2-integration.d.ts +10 -10
- package/dist/superdoc/src/core/whiteboard/Whiteboard.d.ts +22 -208
- package/dist/superdoc/src/core/whiteboard/WhiteboardPage.d.ts +163 -189
- package/dist/superdoc/src/core/whiteboard/helpers/createTextarea.d.ts +14 -1
- package/dist/superdoc/src/core/whiteboard/helpers/flattenPoints.d.ts +1 -1
- package/dist/superdoc/src/core/whiteboard/helpers/getRandomId.d.ts +1 -1
- package/dist/superdoc/src/helpers/comment-focus.d.ts +21 -4
- package/dist/superdoc/src/helpers/deprecation.d.ts +5 -11
- package/dist/superdoc/src/helpers/interaction-trace.d.ts +7 -24
- package/dist/superdoc/src/helpers/mark-raw-component.d.ts +1 -0
- package/dist/superdoc/src/helpers/object-guards.d.ts +2 -5
- package/dist/superdoc/src/helpers/selection-source.d.ts +1 -1
- package/dist/superdoc/src/helpers/use-selection.d.ts +35 -15
- package/dist/superdoc/src/helpers/v2-author-required-rejection.d.ts +8 -11
- package/dist/superdoc/src/helpers/v2-bulk-decision-event.d.ts +9 -7
- package/dist/superdoc/src/helpers/v2-keyboard-edit-rejection.d.ts +8 -7
- package/dist/superdoc/src/helpers/v2-mutation-exception.d.ts +12 -8
- package/dist/superdoc/src/helpers/v2-review-target.d.ts +11 -1
- package/dist/superdoc/src/helpers/v2-selection-sync.d.ts +40 -14
- package/dist/superdoc/src/helpers/v2-typing-mutation-event.d.ts +14 -5
- package/dist/superdoc/src/icons.d.ts +11 -19
- package/dist/superdoc/src/internal/diagnostics/diagnostic-dedupe.d.ts +6 -15
- package/dist/superdoc/src/internal/diagnostics/translate-diagnostic.d.ts +6 -4
- package/dist/superdoc/src/internal/toolbar/built-in/AIWriter.vue.d.ts +2 -2
- package/dist/superdoc/src/internal/toolbar/built-in/ButtonGroup.vue.d.ts +4 -24
- package/dist/superdoc/src/internal/toolbar/built-in/FontFamilyCombobox.vue.d.ts +34 -0
- package/dist/superdoc/src/internal/toolbar/built-in/FontSizeCombobox.vue.d.ts +34 -0
- package/dist/superdoc/src/internal/toolbar/built-in/LinkInput.vue.d.ts +1 -1
- package/dist/superdoc/src/internal/toolbar/built-in/PageNumberMenu.vue.d.ts +25 -15
- package/dist/superdoc/src/internal/toolbar/built-in/Toolbar.vue.d.ts +9 -3
- package/dist/superdoc/src/internal/toolbar/built-in/ToolbarComboBox.vue.d.ts +12 -14
- package/dist/superdoc/src/internal/toolbar/built-in/ToolbarDropdown.vue.d.ts +1 -11
- package/dist/superdoc/src/internal/toolbar/built-in/color-dropdown-helpers.d.ts +9 -19
- package/dist/superdoc/src/internal/toolbar/built-in/constants.d.ts +14 -45
- package/dist/superdoc/src/internal/toolbar/built-in/default-items.d.ts +34 -17
- package/dist/superdoc/src/internal/toolbar/built-in/font-options.d.ts +15 -1
- package/dist/superdoc/src/internal/toolbar/built-in/font-typeahead.d.ts +37 -7
- package/dist/superdoc/src/internal/toolbar/built-in/format-negation.d.ts +10 -4
- package/dist/superdoc/src/internal/toolbar/built-in/general.d.ts +12 -1
- package/dist/superdoc/src/internal/toolbar/built-in/helpers.d.ts +9 -4
- package/dist/superdoc/src/internal/toolbar/built-in/list-style-buttons.d.ts +2 -2
- package/dist/superdoc/src/internal/toolbar/built-in/page-number-feedback.d.ts +4 -5
- package/dist/superdoc/src/internal/toolbar/built-in/scroll-helpers.d.ts +3 -4
- package/dist/superdoc/src/internal/toolbar/built-in/toolbar-focus-helpers.d.ts +10 -2
- package/dist/superdoc/src/internal/toolbar/built-in/toolbarIcons.d.ts +78 -145
- package/dist/superdoc/src/internal/toolbar/built-in/toolbarTexts.d.ts +61 -61
- package/dist/superdoc/src/internal/toolbar/built-in/url-safety.d.ts +11 -3
- package/dist/superdoc/src/internal/toolbar/built-in/use-toolbar-item.d.ts +110 -48
- package/dist/superdoc/src/internal/toolbar/built-in-toolbar.d.ts +11 -30
- package/dist/superdoc/src/internal/toolbar/compatibility-catalog.d.ts +4 -3
- package/dist/superdoc/src/internal/toolbar/image-upload.d.ts +29 -39
- package/dist/superdoc/src/internal/toolbar/toolbar-item-aliases.d.ts +1 -1
- package/dist/superdoc/src/public/browser-document-api.d.ts +5 -4
- package/dist/superdoc/src/public/index.d.cts +26 -0
- package/dist/superdoc/src/public/index.d.ts +13 -0
- package/dist/superdoc/src/public/ui/commands.d.ts +14 -13
- package/dist/superdoc/src/public/ui/create-super-doc-ui.d.ts +1 -1
- package/dist/superdoc/src/public/ui/entity-at.d.ts +2 -1
- package/dist/superdoc/src/public/ui/format-painter-helpers.d.ts +2 -8
- package/dist/superdoc/src/public/ui/style-match-patch.d.ts +2 -2
- package/dist/superdoc/src/public/ui/types.d.ts +1 -1
- package/dist/superdoc/src/stores/comments-store.d.ts +231 -105
- package/dist/superdoc/src/stores/helpers/comment-document-scope.d.ts +22 -0
- package/dist/superdoc/src/stores/helpers/comment-grouping.d.ts +30 -0
- package/dist/superdoc/src/stores/helpers/comment-identity.d.ts +40 -0
- package/dist/superdoc/src/stores/helpers/floating-comment-instances.d.ts +48 -13
- package/dist/superdoc/src/stores/helpers/pending-selection-snapshot.d.ts +17 -0
- package/dist/superdoc/src/stores/helpers/tracked-change-compaction.d.ts +16 -0
- package/dist/superdoc/src/stores/helpers/tracked-change-decision.d.ts +45 -0
- package/dist/superdoc/src/stores/helpers/tracked-change-identity.d.ts +19 -0
- package/dist/superdoc/src/stores/helpers/tracked-change-row-values.d.ts +0 -4
- package/dist/superdoc/src/stores/helpers/tracked-change-thread-index.d.ts +21 -24
- package/dist/superdoc/src/stores/superdoc-store.d.ts +694 -316
- package/dist/superdoc.cjs +1804 -2782
- package/dist/superdoc.es.js +1720 -2699
- package/dist-cdn/style.layered.css +1 -1
- package/dist-cdn/superdoc.min.css +1 -1
- package/dist-cdn/superdoc.min.js +42 -42
- package/package.json +3 -2
- package/dist/superdoc/src/internal/toolbar/index.d.ts +0 -10
- package/dist/superdoc/src/main.d.ts +0 -1
|
@@ -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.29.0
|
|
22
|
+
superdocVersion: "2.29.0",
|
|
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.29.0
|
|
21
|
+
superdocVersion: "2.29.0",
|
|
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
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { RichContentInsertInput } from '../insert/insert.js';
|
|
2
|
-
import { RichContentReplaceInput, ReplaceMutationOptions } from '../replace/replace.js';
|
|
3
|
-
import { ChangeMode,
|
|
2
|
+
import { RichContentReplaceInput, ReplaceMutationOptions, TrackedReplaceMutationOptions } from '../replace/replace.js';
|
|
3
|
+
import { ChangeMode, RichContentMutationOptions, TrackedRichContentMutationOptions } from '../write/write.js';
|
|
4
4
|
import { ProjectHtmlInput, ProjectMarkdownInput, SDContentProjectionResult, SDProjectionReviewMode, SDResolvedProjectionScope } from '../types/content-projection.js';
|
|
5
5
|
import { SDFragment } from '../types/fragment.js';
|
|
6
6
|
import { SDError, SDHtmlMarkdownOutcome, SDMutationConversionReport, SDMutationReceipt } from '../types/sd-contract.js';
|
|
@@ -15,13 +15,11 @@ export interface SDHtmlMarkdownCheckGuard {
|
|
|
15
15
|
export type SDHtmlMarkdownSupportCheckInput = {
|
|
16
16
|
operation: 'insert';
|
|
17
17
|
input: RichContentInsertInput;
|
|
18
|
-
options?:
|
|
19
|
-
changeMode?: ChangeMode;
|
|
20
|
-
} & TrackedAttribution;
|
|
18
|
+
options?: Pick<RichContentMutationOptions, 'changeMode' | 'author' | 'date'> | Pick<TrackedRichContentMutationOptions, 'changeMode' | 'author' | 'date'>;
|
|
21
19
|
} | {
|
|
22
20
|
operation: 'replace';
|
|
23
21
|
input: RichContentReplaceInput;
|
|
24
|
-
options?: Pick<ReplaceMutationOptions, 'changeMode' | 'replaceMode' | 'expectedSnapshotId'>
|
|
22
|
+
options?: Pick<ReplaceMutationOptions, 'changeMode' | 'replaceMode' | 'expectedSnapshotId' | 'author' | 'date'> | Pick<TrackedReplaceMutationOptions, 'changeMode' | 'replaceMode' | 'expectedSnapshotId' | 'author' | 'date'>;
|
|
25
23
|
} | {
|
|
26
24
|
operation: 'projectHtml';
|
|
27
25
|
input?: ProjectHtmlInput;
|
|
@@ -25,6 +25,7 @@ export interface AddCommentInput extends CommentCreateAttributionInput {
|
|
|
25
25
|
target?: CommentTarget;
|
|
26
26
|
/** The comment body text. */
|
|
27
27
|
text: string;
|
|
28
|
+
expectedText?: string;
|
|
28
29
|
}
|
|
29
30
|
export interface EditCommentInput {
|
|
30
31
|
commentId: string;
|
|
@@ -114,6 +115,7 @@ export interface CommentsCreateInput extends CommentCreateAttributionInput {
|
|
|
114
115
|
* both when they contain the same value.
|
|
115
116
|
*/
|
|
116
117
|
parentId?: string;
|
|
118
|
+
expectedText?: string;
|
|
117
119
|
}
|
|
118
120
|
/**
|
|
119
121
|
* Input for `comments.patch`: field-level patch on an existing comment.
|
|
@@ -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" | "insert" | "info" | "selection.extractOoxml" | "selection.current" | "selection.releaseSnapshot" | "format.readSelection" | "projectHtml" | "projectMarkdown" | "capabilities.check" | "format.apply" | "comments.patch" | "trackChanges.decide" | "styles.getCatalog" | "blocks.delete" | "comments.create" | "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.cs" | "format.shading" | "format.rtl" | "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.dstrike" | "format.vertAlign" | "format.bCs" | "format.iCs" | "format.snapToGrid" | "format.oMath" | "format.letterSpacing" | "format.charScale" | "format.kerning" | "format.fitText" | "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.deleteRange" | "styles.apply" | "styles.create" | "styles.getTheme" | "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.delete" | "comments.get" | "comments.list" | "trackChanges.list" | "trackChanges.get" | "query.match" | "ranges.resolve" | "mutations.beginTemporary" | "mutations.replaceTemporary" | "mutations.rollbackTemporary" | "mutations.commitTemporary" | "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: ("insert" | "replace" | "find" | "delete" | "info" | "selection.extractOoxml" | "selection.current" | "selection.releaseSnapshot" | "format.readSelection" | "projectHtml" | "projectMarkdown" | "capabilities.check" | "format.apply" | "comments.patch" | "trackChanges.decide" | "styles.getCatalog" | "blocks.delete" | "comments.create" | "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.cs" | "format.shading" | "format.rtl" | "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.dstrike" | "format.vertAlign" | "format.bCs" | "format.iCs" | "format.snapToGrid" | "format.oMath" | "format.letterSpacing" | "format.charScale" | "format.kerning" | "format.fitText" | "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.deleteRange" | "styles.apply" | "styles.create" | "styles.getTheme" | "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.delete" | "comments.get" | "comments.list" | "trackChanges.list" | "trackChanges.get" | "query.match" | "ranges.resolve" | "mutations.beginTemporary" | "mutations.replaceTemporary" | "mutations.rollbackTemporary" | "mutations.commitTemporary" | "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. */
|
|
@@ -933,8 +933,8 @@ export declare const OPERATION_DEFINITIONS: {
|
|
|
933
933
|
};
|
|
934
934
|
readonly 'comments.create': {
|
|
935
935
|
readonly memberPath: "comments.create";
|
|
936
|
-
readonly description: "Create a new comment thread (or reply when parentCommentId is given). Accepts TextAddress / TextTarget anchors, or a TrackedChangeCommentTarget that names a logical tracked-change id. The tracked-change target accepts both the explicit kind form and the Labs-compatible trackedChangeId-only form; the adapter normalizes it to a Word-compatible content anchor on the requested revision side. Callers may supply a durable externalId, or use the v1-compatible caller-supplied commentId alias, plus author fields and arbitrary JSON metadata for integration correlation. The caller-owned id remains distinct from the generated Word-compatible commentId.";
|
|
937
|
-
readonly expectedResult: "Returns a Receipt with the new commentId in `id` and `inserted` on success; rejects whitespace-only bodies, unsupported anchor contexts, and cross-story targets. Tracked-change comment targets support insertion, deletion, replacement, and paired-move revisions; they fail with `TARGET_NOT_FOUND` for stale ids, `CAPABILITY_UNAVAILABLE` for formatting / structural revisions and unpaired move sides, and `INVALID_TARGET` for incompatible side requests or ambiguous replacement targets that omit a required `side`.";
|
|
936
|
+
readonly description: "Create a new comment thread (or reply when parentCommentId is given). Accepts TextAddress / TextTarget anchors, or a TrackedChangeCommentTarget that names a logical tracked-change id. The tracked-change target accepts both the explicit kind form and the Labs-compatible trackedChangeId-only form; the adapter normalizes it to a Word-compatible content anchor on the requested revision side. Callers may supply a durable externalId, or use the v1-compatible caller-supplied commentId alias, plus author fields and arbitrary JSON metadata for integration correlation. The caller-owned id remains distinct from the generated Word-compatible commentId. Pass expectedText with a single-paragraph text target to refuse the comment when the text at that target has changed since it was selected.";
|
|
937
|
+
readonly expectedResult: "Returns a Receipt with the new commentId in `id` and `inserted` on success; rejects whitespace-only bodies, unsupported anchor contexts, and cross-story targets. When expectedText is given and the target text differs, fails with `PRECONDITION_FAILED` before any change. Tracked-change comment targets support insertion, deletion, replacement, and paired-move revisions; they fail with `TARGET_NOT_FOUND` for stale ids, `CAPABILITY_UNAVAILABLE` for formatting / structural revisions and unpaired move sides, and `INVALID_TARGET` for incompatible side requests or ambiguous replacement targets that omit a required `side`.";
|
|
938
938
|
readonly requiresDocumentContext: true;
|
|
939
939
|
readonly metadata: CommandStaticMetadata;
|
|
940
940
|
readonly referenceDocPath: "comments/create.mdx";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { DocumentApiSurface } from '../index.js';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import { InsertInput } from '../insert/insert.js';
|
|
3
|
+
import { ReplaceInput, TrackedReplaceMutationOptions } from '../replace/replace.js';
|
|
4
4
|
import { BodyStoryLocator } from '../types/story.types.js';
|
|
5
5
|
import { OperationCancellation } from '../write/operation-cancellation.js';
|
|
6
|
-
import {
|
|
6
|
+
import { TrackedRichContentMutationOptions } from '../write/write.js';
|
|
7
7
|
import { OPERATION_DEFINITIONS } from './operation-definitions.js';
|
|
8
8
|
import { OperationId } from './types.js';
|
|
9
9
|
type ResolveMemberPath<T, Path extends string> = Path extends `${infer Head}.${infer Tail}` ? Head extends keyof T ? ResolveMemberPath<T[Head], Tail> : never : Path extends keyof T ? T[Path] : never;
|
|
@@ -32,19 +32,20 @@ type MethodInvokeRequest<T extends OperationId> = OperationRegistry[T]['options'
|
|
|
32
32
|
input: OperationRegistry[T]['input'];
|
|
33
33
|
options?: OperationRegistry[T]['options'];
|
|
34
34
|
};
|
|
35
|
-
type
|
|
35
|
+
type AttributedInvokeRequest<T extends OperationId> = T extends 'insert' ? {
|
|
36
36
|
operationId: T;
|
|
37
|
-
input:
|
|
38
|
-
options:
|
|
37
|
+
input: InsertInput;
|
|
38
|
+
options: TrackedRichContentMutationOptions & OperationCancellation;
|
|
39
39
|
} : T extends 'replace' ? {
|
|
40
40
|
operationId: T;
|
|
41
|
-
input: Exclude<
|
|
41
|
+
input: Exclude<ReplaceInput, {
|
|
42
42
|
target: BodyStoryLocator;
|
|
43
|
+
text: string;
|
|
43
44
|
}>;
|
|
44
|
-
options:
|
|
45
|
+
options: TrackedReplaceMutationOptions;
|
|
45
46
|
} : never;
|
|
46
47
|
/** Typed invoke request narrowed by `operationId` and supported content shape. */
|
|
47
|
-
export type InvokeRequest<T extends OperationId> = MethodInvokeRequest<T> |
|
|
48
|
+
export type InvokeRequest<T extends OperationId> = MethodInvokeRequest<T> | AttributedInvokeRequest<T>;
|
|
48
49
|
/** Typed invoke result narrowed by `operationId`. */
|
|
49
50
|
export type InvokeResult<T extends OperationId> = T extends 'mutations.preview' | 'mutations.apply' ? Promise<OperationRegistry[T]['output']> : T extends 'plan.execute' ? OperationRegistry[T]['output'] | Promise<OperationRegistry[T]['output']> : OperationRegistry[T]['output'];
|
|
50
51
|
export type OperationCall<T extends OperationId> = InvokeRequest<T> extends infer Request ? (Request extends unknown ? Omit<Request, 'operationId'> : never) : never;
|
|
@@ -26,12 +26,12 @@ import { InsertInput } from './insert/insert.js';
|
|
|
26
26
|
import { ResolveRangeInput, ResolveRangeOutput } from './ranges/ranges.types.js';
|
|
27
27
|
import { SelectionApi, SelectionAdapter } from './selection/selection.js';
|
|
28
28
|
import { ListsAdapter, ListsApi } from './lists/lists.js';
|
|
29
|
-
import { ReplaceInput, ReplaceMutationOptions } from './replace/replace.js';
|
|
29
|
+
import { ReplaceInput, ReplaceMutationOptions, TrackedReplaceMutationOptions } from './replace/replace.js';
|
|
30
30
|
import { CreateAdapter, CreateApi } from './create/create.js';
|
|
31
31
|
import { BlocksAdapter, BlocksApi } from './blocks/blocks.js';
|
|
32
32
|
import { TableLocator, TableMutationResult, TablesConvertFromTextInput, TablesMoveInput, TablesSplitInput, TablesConvertToTextInput, TablesSetLayoutInput, TablesInsertRowInput, TablesDeleteRowInput, TablesMoveRowInput, TablesSetRowHeightInput, TablesDistributeRowsInput, TablesSetRowOptionsInput, TablesInsertColumnInput, TablesDeleteColumnInput, TablesMoveColumnInput, TablesSetColumnWidthInput, TablesDistributeColumnsInput, TablesInsertCellInput, TablesDeleteCellInput, TablesMergeCellsInput, TablesUnmergeCellsInput, TablesSplitCellInput, TablesSetCellPropertiesInput, TablesSetCellTextInput, TablesSortInput, TablesSetAltTextInput, TablesSetStyleInput, TablesClearStyleInput, TablesSetStyleOptionInput, TablesSetBorderInput, TablesClearBorderInput, TablesApplyBorderPresetInput, TablesSetShadingInput, TablesClearShadingInput, TablesSetTablePaddingInput, TablesSetCellPaddingInput, TablesSetCellSpacingInput, TablesClearCellSpacingInput, TablesApplyStyleInput, TablesSetBordersInput, TablesSetTableOptionsInput, TablesApplyPresetInput, TablesGetInput, TablesGetOutput, TablesGetCellsInput, TablesGetCellsOutput, TablesGetPropertiesInput, TablesGetPropertiesOutput, TablesGetStylesInput, TablesGetStylesOutput, TablesSetDefaultStyleInput, TablesClearDefaultStyleInput } from './types/table-operations.types.js';
|
|
33
33
|
import { TrackChangesAdapter, TrackChangesApi } from './track-changes/track-changes.js';
|
|
34
|
-
import { MutationOptions, RichContentMutationOptions,
|
|
34
|
+
import { MutationOptions, RichContentMutationOptions, TrackedRichContentMutationOptions, TextMutationOptions, WriteAdapter } from './write/write.js';
|
|
35
35
|
import { OperationCancellation } from './write/operation-cancellation.js';
|
|
36
36
|
import { SelectionMutationAdapter } from './selection-mutation.js';
|
|
37
37
|
import { CapabilitiesAdapter, DocumentApiCapabilities, OperationCapabilityResolveInput, OperationCapabilityResolveResult } from './capabilities/capabilities.js';
|
|
@@ -109,7 +109,7 @@ export type { GetMarkdownAdapter, GetMarkdownInput } from './get-markdown/get-ma
|
|
|
109
109
|
export type { GetHtmlAdapter, GetHtmlInput } from './get-html/get-html.js';
|
|
110
110
|
export type { InfoAdapter, InfoInput } from './info/info.js';
|
|
111
111
|
export type { ExtractAdapter, ExtractInput } from './extract/extract.js';
|
|
112
|
-
export type { WriteAdapter, WriteRequest, RichContentMutationOptions, TrackedAttribution, TrackedTextMutationOptions, TextMutationOptions, } from './write/write.js';
|
|
112
|
+
export type { WriteAdapter, WriteRequest, RichContentMutationOptions, TrackedAttribution, TrackedRichContentMutationOptions, TrackedTextMutationOptions, TextMutationOptions, } from './write/write.js';
|
|
113
113
|
export type { OperationCancellation, OperationCancellationCode } from './write/operation-cancellation.js';
|
|
114
114
|
export { OperationCancellationError, assertOperationCanStart, indeterminateOperation, splitOperationCancellation, } from './write/operation-cancellation.js';
|
|
115
115
|
export type { FormatInlineAliasApi, FormatInlineAliasInput, FormatBoldInput, FormatItalicInput, FormatRangeInput, FormatUnderlineInput, FormatStrikethroughInput, StyleApplyInput, StyleApplyOptions, } from './format/format.js';
|
|
@@ -185,7 +185,7 @@ export type { MutationReceiptBridgeContext, StructuralReceiptParams } from './re
|
|
|
185
185
|
export { isBlockNodeAddress } from './validation-primitives.js';
|
|
186
186
|
export type { InsertInput, InsertContentType, TextInsertInput, PlainTextInsertInput, RichContentInsertInput, NativeOoxmlInsertInput, LegacyInsertInput, } from './insert/insert.js';
|
|
187
187
|
export { isStructuralInsertInput } from './insert/insert.js';
|
|
188
|
-
export type { ReplaceInput, TextReplaceInput, TextReplacementGranularity, RichContentReplaceInput, ReplaceMutationOptions, NativeOoxmlReplaceInput, SnapshotReplaceInput, ParagraphTextReplaceInput, } from './replace/replace.js';
|
|
188
|
+
export type { ReplaceInput, TextReplaceInput, TextReplacementGranularity, RichContentReplaceInput, ReplaceMutationOptions, TrackedReplaceMutationOptions, NativeOoxmlReplaceInput, SnapshotReplaceInput, ParagraphTextReplaceInput, } from './replace/replace.js';
|
|
189
189
|
export { executeReplace, isStructuralReplaceInput, isRichContentReplaceInput, TEXT_REPLACEMENT_GRANULARITIES, isTextReplacementGranularity, isSingleParagraphVisibleTextSelection, } from './replace/replace.js';
|
|
190
190
|
export { executeFind } from './find/find.js';
|
|
191
191
|
export { validateDocumentFragment, validateSDFragment } from './validation/fragment-validator.js';
|
|
@@ -362,14 +362,15 @@ export interface DocumentApiSurface {
|
|
|
362
362
|
* Insert content at a target location.
|
|
363
363
|
* If target is omitted, inserts at the end of the document.
|
|
364
364
|
*/
|
|
365
|
-
insert(input:
|
|
365
|
+
insert(input: InsertInput, options: TrackedRichContentMutationOptions & OperationCancellation): SDMutationReceipt;
|
|
366
366
|
insert(input: InsertInput, options?: RichContentMutationOptions & OperationCancellation): SDMutationReceipt;
|
|
367
367
|
/**
|
|
368
368
|
* Replace text at a target range.
|
|
369
369
|
*/
|
|
370
|
-
replace(input: Exclude<
|
|
370
|
+
replace(input: Exclude<ReplaceInput, {
|
|
371
371
|
target: import('./types/story.types.js').BodyStoryLocator;
|
|
372
|
-
|
|
372
|
+
text: string;
|
|
373
|
+
}>, options: TrackedReplaceMutationOptions): SDMutationReceipt;
|
|
373
374
|
replace(input: ReplaceInput, options?: ReplaceMutationOptions): SDMutationReceipt;
|
|
374
375
|
/**
|
|
375
376
|
* Delete text at a target range.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { OoxmlContentSource } from '../selection/selection.types.js';
|
|
2
|
-
import { RichContentMutationOptions, TextMutationOptions, WriteAdapter } from '../write/write.js';
|
|
2
|
+
import { RichContentMutationOptions, TextMutationOptions, TrackedRichContentMutationOptions, WriteAdapter } from '../write/write.js';
|
|
3
3
|
import { SelectionTarget, TargetLocator, SDMutationReceipt } from '../types/index.js';
|
|
4
4
|
import { SDInsertInput } from '../types/structural-input.js';
|
|
5
5
|
import { StoryLocator } from '../types/story.types.js';
|
|
@@ -80,5 +80,5 @@ export declare function validateInsertInput(input: unknown): asserts input is In
|
|
|
80
80
|
* @param options - Optional mutation options (changeMode, dryRun, expectedRevision).
|
|
81
81
|
* @returns Receipt indicating success/failure and mutation metadata.
|
|
82
82
|
*/
|
|
83
|
-
export declare function executeInsert(selectionAdapter: SelectionMutationAdapter, writeAdapter: WriteAdapter, input: InsertInput, options?: (RichContentMutationOptions | TextMutationOptions) & OperationCancellation): SDMutationReceipt;
|
|
83
|
+
export declare function executeInsert(selectionAdapter: SelectionMutationAdapter, writeAdapter: WriteAdapter, input: InsertInput, options?: (RichContentMutationOptions | TrackedRichContentMutationOptions | TextMutationOptions) & OperationCancellation): SDMutationReceipt;
|
|
84
84
|
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { OoxmlContentSource } from '../selection/selection.types.js';
|
|
2
|
-
import { RichContentMutationOptions, TextMutationOptions, WriteAdapter } from '../write/write.js';
|
|
2
|
+
import { RichContentMutationOptions, TextMutationOptions, TrackedRichContentMutationOptions, WriteAdapter } from '../write/write.js';
|
|
3
3
|
import { SelectionTarget } from '../types/address.js';
|
|
4
4
|
import { SDMutationReceipt } from '../types/sd-contract.js';
|
|
5
5
|
import { SDReplaceInput } from '../types/structural-input.js';
|
|
@@ -81,7 +81,8 @@ export interface ReplaceMutationOptions extends RichContentMutationOptions {
|
|
|
81
81
|
/** Compare the addressed paragraph with an unchanged retained snapshot before committing. */
|
|
82
82
|
expectedSnapshotId?: string;
|
|
83
83
|
}
|
|
84
|
-
type
|
|
84
|
+
export type TrackedReplaceMutationOptions = TrackedRichContentMutationOptions & Pick<ReplaceMutationOptions, 'replaceMode' | 'expectedSnapshotId'>;
|
|
85
|
+
type ReplaceExecutionOptions = ReplaceMutationOptions | TrackedReplaceMutationOptions | (TextMutationOptions & {
|
|
85
86
|
replaceMode?: never;
|
|
86
87
|
expectedSnapshotId?: never;
|
|
87
88
|
});
|
|
@@ -17,6 +17,7 @@ export type Range = {
|
|
|
17
17
|
export type TextCoordinateSpace = 'visible' | 'tracked';
|
|
18
18
|
export type TextAddress = {
|
|
19
19
|
kind: 'text';
|
|
20
|
+
captureState?: string;
|
|
20
21
|
blockId: string;
|
|
21
22
|
range: Range;
|
|
22
23
|
/** Story containing this text. Omit for body (backward compatible). */
|
|
@@ -47,6 +48,7 @@ export type TextSegment = {
|
|
|
47
48
|
*/
|
|
48
49
|
export type TextTarget = {
|
|
49
50
|
kind: 'text';
|
|
51
|
+
captureState?: string;
|
|
50
52
|
segments: [TextSegment, ...TextSegment[]];
|
|
51
53
|
/** Story containing this text target. Omit for body (backward compatible). */
|
|
52
54
|
story?: StoryLocator;
|
|
@@ -93,6 +95,7 @@ export type SelectionPoint = {
|
|
|
93
95
|
*/
|
|
94
96
|
export type SelectionTarget = {
|
|
95
97
|
kind: 'selection';
|
|
98
|
+
captureState?: string;
|
|
96
99
|
start: SelectionPoint;
|
|
97
100
|
end: SelectionPoint;
|
|
98
101
|
/** Story containing this selection. Omit for body (backward compatible). */
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { DocumentApiSurface } from '../index.js';
|
|
2
2
|
import { ReceiptEntity, ReceiptFailureResult, ReceiptSuccess } from './receipt.js';
|
|
3
3
|
import { PlainTextInsertInput } from '../insert/insert.js';
|
|
4
|
-
import { ParagraphTextReplaceInput, ReplaceMutationOptions, TextReplaceInput } from '../replace/replace.js';
|
|
4
|
+
import { ParagraphTextReplaceInput, ReplaceMutationOptions, TextReplaceInput, TrackedReplaceMutationOptions } from '../replace/replace.js';
|
|
5
5
|
import { MutationOptions, TrackedTextMutationOptions } from '../write/write.js';
|
|
6
6
|
import { BodyStoryLocator } from './story.types.js';
|
|
7
7
|
type TemporaryCall<Name extends string, Method extends (...args: never[]) => unknown> = {
|
|
@@ -37,6 +37,10 @@ export type TemporaryMutationOperation = {
|
|
|
37
37
|
operation: 'replace';
|
|
38
38
|
input: ParagraphTextReplaceInput;
|
|
39
39
|
options?: ReplaceMutationOptions;
|
|
40
|
+
} | {
|
|
41
|
+
operation: 'replace';
|
|
42
|
+
input: ParagraphTextReplaceInput;
|
|
43
|
+
options: TrackedReplaceMutationOptions;
|
|
40
44
|
} | TemporaryCall<'delete', DocumentApiSurface['delete']> | TemporaryCall<'blocks.delete', DocumentApiSurface['blocks']['delete']> | TemporaryCall<'trackChanges.decide', DocumentApiSurface['trackChanges']['decide']> | {
|
|
41
45
|
operation: 'comments.create';
|
|
42
46
|
input: TemporaryCommentInput;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { TextMutationReceipt, SDMutationReceipt } from '../types/index.js';
|
|
2
2
|
import { InsertInput } from '../insert/insert.js';
|
|
3
|
-
import { ReplaceMutationOptions, ReplaceInput } from '../replace/replace.js';
|
|
3
|
+
import { ReplaceMutationOptions, ReplaceInput, TrackedReplaceMutationOptions } from '../replace/replace.js';
|
|
4
4
|
import { StoryLocator } from '../types/story.types.js';
|
|
5
5
|
import { SDHtmlMarkdownCheckGuard } from '../capabilities/html-markdown-support.js';
|
|
6
6
|
export type ChangeMode = 'direct' | 'tracked';
|
|
@@ -50,16 +50,22 @@ export interface TrackedAttribution {
|
|
|
50
50
|
/** ISO 8601 UTC revision timestamp. Omitted values use the transaction time. */
|
|
51
51
|
date?: string;
|
|
52
52
|
}
|
|
53
|
-
export interface RichContentMutationOptions extends MutationOptions
|
|
53
|
+
export interface RichContentMutationOptions extends MutationOptions {
|
|
54
|
+
author?: never;
|
|
55
|
+
date?: never;
|
|
54
56
|
/** Guard returned by `doc.capabilities.check` for an exact rich write. */
|
|
55
57
|
supportCheck?: SDHtmlMarkdownCheckGuard;
|
|
56
58
|
}
|
|
57
59
|
export interface TrackedTextMutationOptions extends MutationOptions, TrackedAttribution {
|
|
58
60
|
changeMode: 'tracked';
|
|
59
61
|
}
|
|
60
|
-
export type
|
|
62
|
+
export type TrackedRichContentMutationOptions = TrackedTextMutationOptions & Pick<RichContentMutationOptions, 'supportCheck'>;
|
|
63
|
+
export type TextMutationOptions = (MutationOptions & {
|
|
64
|
+
author?: never;
|
|
65
|
+
date?: never;
|
|
66
|
+
}) | TrackedTextMutationOptions;
|
|
61
67
|
export declare function normalizeTextMutationOptions(options?: RichContentMutationOptions | TextMutationOptions): RichContentMutationOptions | TrackedTextMutationOptions;
|
|
62
|
-
export declare function normalizeRichMutationOptions(options: (MutationOptions & TrackedAttribution &
|
|
68
|
+
export declare function normalizeRichMutationOptions(options: (MutationOptions & TrackedAttribution & Pick<RichContentMutationOptions, 'supportCheck'>) | undefined, supportCheckOperation?: 'insert' | 'replace'): RichContentMutationOptions | TrackedRichContentMutationOptions;
|
|
63
69
|
/**
|
|
64
70
|
* Text insertion request: target-less insert at document end.
|
|
65
71
|
*
|
|
@@ -87,9 +93,9 @@ export interface WriteAdapter {
|
|
|
87
93
|
readonly supportsNativeOoxml?: boolean;
|
|
88
94
|
write(request: InsertWriteRequest, options?: TextMutationOptions): TextMutationReceipt;
|
|
89
95
|
/** Structured insert for SDFragment or markdown/html content. Returns SDMutationReceipt. */
|
|
90
|
-
insertStructured(input: InsertInput, options?: RichContentMutationOptions): SDMutationReceipt;
|
|
96
|
+
insertStructured(input: InsertInput, options?: RichContentMutationOptions | TrackedRichContentMutationOptions): SDMutationReceipt;
|
|
91
97
|
/** Structured replace for SDFragment or markdown/html content. Returns SDMutationReceipt. */
|
|
92
|
-
replaceStructured(input: ReplaceInput, options?: ReplaceMutationOptions): SDMutationReceipt;
|
|
98
|
+
replaceStructured(input: ReplaceInput, options?: ReplaceMutationOptions | TrackedReplaceMutationOptions): SDMutationReceipt;
|
|
93
99
|
}
|
|
94
100
|
export declare function normalizeMutationOptions(options?: MutationOptions | RichContentMutationOptions, supportCheckOperation?: 'insert' | 'replace'): RichContentMutationOptions;
|
|
95
101
|
export declare function executeWrite(adapter: WriteAdapter, request: InsertWriteRequest, options?: TextMutationOptions): TextMutationReceipt;
|
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-L60GhVAX.cjs");
|
|
3
3
|
const require_slice_source = require("../chunks/slice-source-CFaqq0Vo.cjs");
|
|
4
4
|
let react = require("react");
|
|
5
5
|
let use_sync_external_store_shim = require("use-sync-external-store/shim");
|
|
@@ -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-Dc8dQAMc.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
|
import { useSyncExternalStore } from "use-sync-external-store/shim";
|
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-L60GhVAX.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-Dc8dQAMc.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-L60GhVAX.cjs");
|
|
3
3
|
//#region ../document-api/src/types/receipt.ts
|
|
4
4
|
/** Read a known failure.details.reason without assuming every failure has one. */
|
|
5
5
|
function getDocumentApiRejectionReason(details) {
|
package/dist/public/ui.es.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { m as shallowEqual, s as BUILT_IN_COMMAND_IDS, t as createSuperDocUI } from "../chunks/create-super-doc-ui-
|
|
1
|
+
import { m as shallowEqual, s as BUILT_IN_COMMAND_IDS, t as createSuperDocUI } from "../chunks/create-super-doc-ui-Dc8dQAMc.es.js";
|
|
2
2
|
//#region ../document-api/src/types/receipt.ts
|
|
3
3
|
/** Read a known failure.details.reason without assuming every failure has one. */
|
|
4
4
|
function getDocumentApiRejectionReason(details) {
|