superdoc 2.28.0-next.1 → 2.28.0-next.10
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-D1eOhAjv.cjs → create-super-doc-ui-B4c55pFy.cjs} +420 -84
- package/dist/chunks/{create-super-doc-ui-B29zw5qD.es.js → create-super-doc-ui-C4Ka5Ph3.es.js} +415 -85
- package/dist/collaboration-upgrade-engine.cjs +1 -1
- package/dist/collaboration-upgrade-engine.es.js +1 -1
- package/dist/document-api/src/content-controls/content-controls.types.d.ts +11 -0
- package/dist/document-api/src/contract/command-catalog.d.ts +1 -1
- package/dist/document-api/src/contract/operation-definitions.d.ts +44 -44
- package/dist/document-api/src/contract/operation-registry.d.ts +4 -0
- package/dist/document-api/src/export/export.d.ts +3 -1
- package/dist/document-api/src/export/export.types.d.ts +8 -0
- package/dist/document-api/src/get-node/get-node.d.ts +10 -4
- package/dist/document-api/src/hyperlinks/hyperlinks.types.d.ts +2 -0
- package/dist/document-api/src/index.d.ts +2 -1
- package/dist/document-api/src/replace/replace.d.ts +4 -1
- package/dist/document-api/src/types/mutation-plan.types.d.ts +2 -0
- package/dist/document-api/src/types/track-changes.types.d.ts +10 -2
- package/dist/layout-engine/contracts/src/index.d.ts +2 -0
- package/dist/layout-engine/contracts/src/resolved-layout.d.ts +1 -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/shared/common/list-marker-utils.d.ts +3 -0
- package/dist/style.css +1 -1
- package/dist/style.layered.css +1 -1
- package/dist/superdoc/src/core/SuperDoc.d.ts +2 -6
- package/dist/superdoc/src/core/collaboration/resolve-v2-collaboration-target.d.ts +2 -0
- package/dist/superdoc/src/core/config/normalize-ui-config.d.ts +1 -0
- package/dist/superdoc/src/core/editor-runtime/types.d.ts +1 -0
- package/dist/superdoc/src/core/editor-runtime/v2/v2-editor-runtime-adapter.d.ts +2 -2
- package/dist/superdoc/src/core/extensions/types.d.ts +14 -3
- package/dist/superdoc/src/core/helpers/resolve-docx-export.d.ts +6 -0
- package/dist/superdoc/src/core/types/index.d.ts +35 -1
- package/dist/superdoc/src/core/v2-integration/v2-integration.d.ts +0 -8
- package/dist/superdoc/src/internal/toolbar/built-in/color-dropdown-helpers.d.ts +0 -1
- package/dist/superdoc/src/internal/toolbar/built-in/constants.d.ts +0 -2
- package/dist/superdoc/src/public/export-types.d.ts +3 -0
- package/dist/superdoc/src/public/ui/entity-at.d.ts +1 -0
- package/dist/superdoc/src/public/ui/format-painter-helpers.d.ts +0 -13
- package/dist/superdoc/src/public/ui/types.d.ts +16 -2
- package/dist/superdoc/src/public/ui.d.cts +14 -0
- package/dist/superdoc/src/public/ui.d.ts +1 -1
- package/dist/superdoc/src/stores/comments-store.d.ts +3 -57
- package/dist/superdoc/src/stores/superdoc-store.d.ts +9 -171
- package/dist/superdoc.cjs +363 -159
- package/dist/superdoc.es.js +363 -159
- package/dist/word-layout/src/types.d.ts +1 -0
- 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 +2 -2
- package/dist/footnote-table-order.docx +0 -0
- package/dist/images/altText_add.svg +0 -3
- package/dist/images/altText_disclaimer.svg +0 -3
- package/dist/images/altText_done.svg +0 -3
- package/dist/images/altText_spinner.svg +0 -30
- package/dist/images/altText_warning.svg +0 -3
- package/dist/images/annotation-check.svg +0 -11
- package/dist/images/annotation-comment.svg +0 -16
- package/dist/images/annotation-help.svg +0 -26
- package/dist/images/annotation-insert.svg +0 -10
- package/dist/images/annotation-key.svg +0 -11
- package/dist/images/annotation-newparagraph.svg +0 -11
- package/dist/images/annotation-noicon.svg +0 -7
- package/dist/images/annotation-note.svg +0 -42
- package/dist/images/annotation-paperclip.svg +0 -6
- package/dist/images/annotation-paragraph.svg +0 -16
- package/dist/images/annotation-pushpin.svg +0 -7
- package/dist/images/checkmark.svg +0 -5
- package/dist/images/comment-actionsButton.svg +0 -3
- package/dist/images/comment-closeButton.svg +0 -3
- package/dist/images/comment-editButton.svg +0 -8
- package/dist/images/comment-popup-editButton.svg +0 -5
- package/dist/images/cursor-editorFreeHighlight.svg +0 -6
- package/dist/images/cursor-editorFreeText.svg +0 -3
- package/dist/images/cursor-editorInk.svg +0 -4
- package/dist/images/cursor-editorTextHighlight.svg +0 -8
- package/dist/images/editor-toolbar-delete.svg +0 -5
- package/dist/images/editor-toolbar-edit.svg +0 -3
- package/dist/images/findbarButton-next.svg +0 -3
- package/dist/images/findbarButton-previous.svg +0 -3
- package/dist/images/gv-toolbarButton-download.svg +0 -3
- package/dist/images/loading-icon.gif +0 -0
- package/dist/images/loading.svg +0 -1
- package/dist/images/messageBar_closingButton.svg +0 -3
- package/dist/images/messageBar_info.svg +0 -3
- package/dist/images/messageBar_warning.svg +0 -3
- package/dist/images/pages_closeButton.svg +0 -3
- package/dist/images/pages_selected.svg +0 -7
- package/dist/images/pages_viewArrow.svg +0 -3
- package/dist/images/pages_viewButton.svg +0 -3
- package/dist/images/secondaryToolbarButton-documentProperties.svg +0 -3
- package/dist/images/secondaryToolbarButton-firstPage.svg +0 -3
- package/dist/images/secondaryToolbarButton-handTool.svg +0 -3
- package/dist/images/secondaryToolbarButton-lastPage.svg +0 -3
- package/dist/images/secondaryToolbarButton-rotateCcw.svg +0 -3
- package/dist/images/secondaryToolbarButton-rotateCw.svg +0 -3
- package/dist/images/secondaryToolbarButton-scrollHorizontal.svg +0 -3
- package/dist/images/secondaryToolbarButton-scrollPage.svg +0 -3
- package/dist/images/secondaryToolbarButton-scrollVertical.svg +0 -3
- package/dist/images/secondaryToolbarButton-scrollWrapped.svg +0 -3
- package/dist/images/secondaryToolbarButton-selectTool.svg +0 -3
- package/dist/images/secondaryToolbarButton-spreadEven.svg +0 -3
- package/dist/images/secondaryToolbarButton-spreadNone.svg +0 -3
- package/dist/images/secondaryToolbarButton-spreadOdd.svg +0 -3
- package/dist/images/toolbarButton-bookmark.svg +0 -3
- package/dist/images/toolbarButton-currentOutlineItem.svg +0 -3
- package/dist/images/toolbarButton-download.svg +0 -4
- package/dist/images/toolbarButton-editorFreeText.svg +0 -5
- package/dist/images/toolbarButton-editorHighlight.svg +0 -6
- package/dist/images/toolbarButton-editorInk.svg +0 -4
- package/dist/images/toolbarButton-editorSignature.svg +0 -6
- package/dist/images/toolbarButton-editorStamp.svg +0 -8
- package/dist/images/toolbarButton-menuArrow.svg +0 -3
- package/dist/images/toolbarButton-openFile.svg +0 -3
- package/dist/images/toolbarButton-pageDown.svg +0 -3
- package/dist/images/toolbarButton-pageUp.svg +0 -3
- package/dist/images/toolbarButton-presentationMode.svg +0 -3
- package/dist/images/toolbarButton-print.svg +0 -3
- package/dist/images/toolbarButton-search.svg +0 -3
- package/dist/images/toolbarButton-secondaryToolbarToggle.svg +0 -3
- package/dist/images/toolbarButton-viewAttachments.svg +0 -3
- package/dist/images/toolbarButton-viewLayers.svg +0 -3
- package/dist/images/toolbarButton-viewOutline.svg +0 -3
- package/dist/images/toolbarButton-viewThumbnail.svg +0 -3
- package/dist/images/toolbarButton-viewsManagerToggle.svg +0 -3
- package/dist/images/toolbarButton-zoomIn.svg +0 -3
- package/dist/images/toolbarButton-zoomOut.svg +0 -3
- package/dist/images/treeitem-collapsed.svg +0 -1
- package/dist/images/treeitem-expanded.svg +0 -1
- package/dist/superdoc/src/helpers/floor.d.ts +0 -1
- package/dist/superdoc/src/index.d.cts +0 -18
- package/dist/superdoc/src/index.d.ts +0 -14
- package/dist-cdn/footnote-table-order.docx +0 -0
|
@@ -7,7 +7,10 @@ import { BodyStoryLocator, StoryLocator } from '../types/story.types.js';
|
|
|
7
7
|
import { BlockNodeAddress } from '../types/base.js';
|
|
8
8
|
import { NestingPolicy } from '../types/placement.js';
|
|
9
9
|
import { SelectionMutationAdapter } from '../selection-mutation.js';
|
|
10
|
-
export
|
|
10
|
+
export declare const TEXT_REPLACEMENT_GRANULARITIES: readonly ["word", "phrase", "range"];
|
|
11
|
+
export type TextReplacementGranularity = (typeof TEXT_REPLACEMENT_GRANULARITIES)[number];
|
|
12
|
+
export declare function isTextReplacementGranularity(value: unknown): value is TextReplacementGranularity;
|
|
13
|
+
export declare function isSingleParagraphVisibleTextSelection(target: unknown): target is SelectionTarget;
|
|
11
14
|
/** Text replacement input: uses SelectionTarget / ref, or the complete main body. */
|
|
12
15
|
export type TextReplaceInput = {
|
|
13
16
|
target: SelectionTarget;
|
|
@@ -6,6 +6,7 @@ import { InlineRunPatch } from '../format/inline-run-patch.js';
|
|
|
6
6
|
import { SDFragment } from './fragment.js';
|
|
7
7
|
import { Placement, NestingPolicy } from './placement.js';
|
|
8
8
|
import { AffectedRef, ReceiptSuccess } from './receipt.js';
|
|
9
|
+
import { TextReplacementGranularity } from '../replace/replace.js';
|
|
9
10
|
import { ChangeMode } from '../write/write.js';
|
|
10
11
|
import { StoryLocator } from './story.types.js';
|
|
11
12
|
export type SelectWhere = {
|
|
@@ -70,6 +71,7 @@ export type TextRewriteStep = {
|
|
|
70
71
|
replacementMode?: 'literal' | 'regex-template';
|
|
71
72
|
/** Preserve the matched text's casing pattern instead of using replacement casing verbatim. */
|
|
72
73
|
caseHandling?: 'exact' | 'preserve-match';
|
|
74
|
+
replacementGranularity?: TextReplacementGranularity;
|
|
73
75
|
/**
|
|
74
76
|
* Style policy for the replacement text.
|
|
75
77
|
* When omitted, uses the native preserve policy:
|
|
@@ -579,7 +579,15 @@ export interface TrackChangeInfo {
|
|
|
579
579
|
author?: string;
|
|
580
580
|
authorEmail?: string;
|
|
581
581
|
authorImage?: string;
|
|
582
|
-
/**
|
|
582
|
+
/**
|
|
583
|
+
* Author initials (spec §3 required field, when known). Read from the revision
|
|
584
|
+
* wrapper: SuperDoc writes them as `initials` in the `urn:superdoc:tracked-change:1`
|
|
585
|
+
* namespace (behind `mc:Ignorable`, like `authorEmail`), so they survive save, reopen
|
|
586
|
+
* and collaboration; a `w:initials` attribute from an older source file is also read.
|
|
587
|
+
* When the wrapper carries neither, the initials of a comment by the same author
|
|
588
|
+
* name in the document are used. SuperDoc never writes `w:initials` on revision
|
|
589
|
+
* wrappers; source wrappers it keeps verbatim are left as they are.
|
|
590
|
+
*/
|
|
583
591
|
initials?: string;
|
|
584
592
|
date?: string;
|
|
585
593
|
/**
|
|
@@ -714,7 +722,7 @@ export interface TrackChangeDomain {
|
|
|
714
722
|
author?: string;
|
|
715
723
|
authorEmail?: string;
|
|
716
724
|
authorImage?: string;
|
|
717
|
-
/** Author initials. */
|
|
725
|
+
/** Author initials, resolved as on {@link TrackChangeInfo.initials}. */
|
|
718
726
|
initials?: string;
|
|
719
727
|
date?: string;
|
|
720
728
|
excerpt?: string;
|
|
@@ -312,6 +312,7 @@ export type RunMarks = {
|
|
|
312
312
|
bold?: boolean;
|
|
313
313
|
/** Italic text styling. */
|
|
314
314
|
italic?: boolean;
|
|
315
|
+
smallCaps?: boolean;
|
|
315
316
|
/** Additional letter spacing in pixels (positive for expanded, negative for condensed). */
|
|
316
317
|
letterSpacing?: number;
|
|
317
318
|
/** Horizontal glyph scale as a unitless multiplier (`1` = 100%, `0.9` = 90%). */
|
|
@@ -1960,6 +1961,7 @@ export type WordLayoutMarker = {
|
|
|
1960
1961
|
* ```
|
|
1961
1962
|
*/
|
|
1962
1963
|
export type WordLayoutConfig = {
|
|
1964
|
+
textStartMode?: 'paragraph';
|
|
1963
1965
|
/**
|
|
1964
1966
|
* Whether this list uses first-line indent mode (true for input-rule-created lists).
|
|
1965
1967
|
* When true, text positioning uses textStartPx instead of standard hanging indent calculations.
|
|
@@ -470,6 +470,7 @@ export type ResolvedHeaderFooterLayout = {
|
|
|
470
470
|
};
|
|
471
471
|
/** Resolved list marker rendering data with pre-computed positioning. */
|
|
472
472
|
export type ResolvedListMarkerItem = {
|
|
473
|
+
textStartPx?: number;
|
|
473
474
|
/** Marker text content (e.g., "1.", "a)", bullet). */
|
|
474
475
|
text: string;
|
|
475
476
|
/** Horizontal justification. */
|
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-B4c55pFy.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-C4Ka5Ph3.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-B4c55pFy.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-C4Ka5Ph3.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-B4c55pFy.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 {
|
|
1
|
+
import { p as shallowEqual, s as BUILT_IN_COMMAND_IDS, t as createSuperDocUI } from "../chunks/create-super-doc-ui-C4Ka5Ph3.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) {
|
|
@@ -96,6 +96,9 @@ export type MinimalMarker = {
|
|
|
96
96
|
* Contains the subset of word layout properties needed to determine text positioning.
|
|
97
97
|
*/
|
|
98
98
|
export type MinimalWordLayout = {
|
|
99
|
+
textStartMode?: 'paragraph';
|
|
100
|
+
firstLinePx?: number;
|
|
101
|
+
hangingPx?: number;
|
|
99
102
|
/** Whether this list uses first-line indent mode (input-rule created lists) */
|
|
100
103
|
firstLineIndentMode?: boolean;
|
|
101
104
|
/** Pre-calculated horizontal position where text should start */
|