superdoc 2.25.0-next.16 → 2.25.0-next.18
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-BbTRF-Z9.cjs → create-super-doc-ui-DZIB6Pd4.cjs} +317 -165
- package/dist/chunks/{create-super-doc-ui-Cr_04XnJ.es.js → create-super-doc-ui-DqCrc6Vw.es.js} +312 -166
- package/dist/collaboration-upgrade-engine.cjs +1 -1
- package/dist/collaboration-upgrade-engine.es.js +1 -1
- package/dist/document-api/src/contract/operation-definitions.d.ts +1 -1
- package/dist/document-api/src/customXml/customXml.types.d.ts +1 -1
- package/dist/document-api/src/lists/lists.types.d.ts +2 -0
- package/dist/document-api/src/metadata/anchored-metadata.types.d.ts +1 -1
- package/dist/document-api/src/types/mutation-plan.types.d.ts +4 -2
- package/dist/layout-engine/layout-bridge/src/index.d.ts +2 -0
- package/dist/layout-engine/layout-bridge/src/neutral-segment-geometry.d.ts +18 -1
- package/dist/layout-engine/layout-bridge/src/visual-bidi-geometry.d.ts +37 -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 +1 -1
- package/dist/style.layered.css +1 -1
- package/dist/superdoc/src/public/ui/create-super-doc-ui.d.ts +7 -0
- package/dist/superdoc/src/stores/comments-store.d.ts +9 -3
- package/dist/superdoc/src/stores/superdoc-store.d.ts +27 -9
- package/dist/superdoc.cjs +98 -12
- package/dist/superdoc.es.js +98 -12
- 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
|
@@ -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.25.0-next.
|
|
22
|
+
superdocVersion: "2.25.0-next.18",
|
|
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.25.0-next.
|
|
21
|
+
superdocVersion: "2.25.0-next.18",
|
|
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
|
|
@@ -520,7 +520,7 @@ export declare const OPERATION_DEFINITIONS: {
|
|
|
520
520
|
};
|
|
521
521
|
readonly 'lists.insert': {
|
|
522
522
|
readonly memberPath: "lists.insert";
|
|
523
|
-
readonly description: "Insert a new list item before or after an existing list item. The new item inherits the target list context.";
|
|
523
|
+
readonly description: "Insert a new list item before or after an existing list item. The new item inherits the target list context. Optional inheritFrom selects a same-story list item for paragraph and run formatting without changing placement or numbering. When omitted, existing paragraph-creation formatting, including next-style handling, is preserved.";
|
|
524
524
|
readonly expectedResult: "Returns a ListsInsertResult with the new list item address and block ID.";
|
|
525
525
|
readonly requiresDocumentContext: true;
|
|
526
526
|
readonly metadata: CommandStaticMetadata;
|
|
@@ -34,7 +34,7 @@ export type CustomXmlPartTarget = {
|
|
|
34
34
|
export interface CustomXmlPartsListInput {
|
|
35
35
|
/**
|
|
36
36
|
* Filter by the XML namespace of the Storage Part's root element
|
|
37
|
-
* (e.g. `<
|
|
37
|
+
* (e.g. `<exampleRefs xmlns="urn:example:refs:1"/>` → `'urn:example:refs:1'`).
|
|
38
38
|
*
|
|
39
39
|
* Distinct from `schemaRef`: this is what the *data* declares; schemaRef
|
|
40
40
|
* is what the Properties Part declares as the associated XML schema's
|
|
@@ -90,6 +90,8 @@ export interface ListInsertInput {
|
|
|
90
90
|
target: ListItemAddress;
|
|
91
91
|
position: ListInsertPosition;
|
|
92
92
|
text?: string;
|
|
93
|
+
/** Copy paragraph and run formatting from this item; placement and numbering still come from target. Omit to preserve existing paragraph-creation formatting, including next-style handling. */
|
|
94
|
+
inheritFrom?: ListItemAddress;
|
|
93
95
|
}
|
|
94
96
|
export interface ListTargetInput {
|
|
95
97
|
target: ListItemAddress;
|
|
@@ -53,7 +53,7 @@ export interface AnchoredMetadataAttachInput {
|
|
|
53
53
|
*/
|
|
54
54
|
target: MetadataTarget;
|
|
55
55
|
/**
|
|
56
|
-
* Logical namespace for the metadata set, e.g. `'urn:
|
|
56
|
+
* Logical namespace for the metadata set, e.g. `'urn:example:citations:1'`.
|
|
57
57
|
* SuperDoc writes this as the `xmlns` of the `<refs>` element in the
|
|
58
58
|
* backing Custom XML Data Storage Part. All entries sharing a namespace
|
|
59
59
|
* share one part on disk.
|
|
@@ -72,9 +72,11 @@ export type TextRewriteStep = {
|
|
|
72
72
|
caseHandling?: 'exact' | 'preserve-match';
|
|
73
73
|
/**
|
|
74
74
|
* Style policy for the replacement text.
|
|
75
|
-
* When omitted,
|
|
76
|
-
* inline: { mode: 'preserve'
|
|
75
|
+
* When omitted, uses the native preserve policy:
|
|
76
|
+
* inline: { mode: 'preserve' }
|
|
77
77
|
* paragraph: { mode: 'preserve' }
|
|
78
|
+
* Explicit mark changes, uniformity requirements, and nonuniform-run
|
|
79
|
+
* strategies are unsupported and rejected before mutation.
|
|
78
80
|
*/
|
|
79
81
|
style?: StylePolicy;
|
|
80
82
|
};
|
|
@@ -211,3 +211,5 @@ export declare function pmPosToCharOffset(block: FlowBlock, line: Line, pmPos: n
|
|
|
211
211
|
* The returned offset is intended for visual X mapping, not for slicing PM text.
|
|
212
212
|
*/
|
|
213
213
|
export declare function pmPosToVisualCharOffset(block: FlowBlock, line: Line, pmPos: number): number;
|
|
214
|
+
export { measureVisualBidiFragment, type MeasuredVisualBidiFragment } from './neutral-segment-geometry.js';
|
|
215
|
+
export { measuredVisualBidiCaretX, measuredVisualBidiOffsetAtX, measuredVisualBidiRangeBands, isMeasuredVisualBidiLineCurrent, type MeasuredVisualBidiLine, } from './visual-bidi-geometry.js';
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { FontMeasureContext } from '../../../shared/font-system/src/index.js';
|
|
2
|
+
import { MeasuredVisualBidiLine } from './visual-bidi-geometry.js';
|
|
3
|
+
import { FlowBlock, Layout, LayoutStoryLocator, Measure, NeutralFragmentGeometry, NeutralSegmentGeometryReadback, ParaFragment, ParagraphBlock, ParagraphMeasure } from '../../contracts/src/index.js';
|
|
2
4
|
import { PageGeometryHelper } from './page-geometry-helper.js';
|
|
3
5
|
export type CollectSegmentGeometryOptions = {
|
|
4
6
|
/**
|
|
@@ -30,3 +32,18 @@ export type CollectSegmentGeometryOptions = {
|
|
|
30
32
|
* guessed rect.
|
|
31
33
|
*/
|
|
32
34
|
export declare function collectSegmentGeometry(layout: Layout, blocks: FlowBlock[], measures: Measure[], options?: CollectSegmentGeometryOptions): NeutralSegmentGeometryReadback;
|
|
35
|
+
export interface MeasuredVisualBidiFragment {
|
|
36
|
+
readonly geometry: NeutralFragmentGeometry;
|
|
37
|
+
readonly block: ParagraphBlock;
|
|
38
|
+
readonly measure: ParagraphMeasure;
|
|
39
|
+
readonly lines: ReadonlyMap<number, MeasuredVisualBidiLine>;
|
|
40
|
+
}
|
|
41
|
+
/** Private supplement; the frozen neutral readback keeps its unsupported diagnostic. */
|
|
42
|
+
export declare function measureVisualBidiFragment(input: {
|
|
43
|
+
base: NeutralFragmentGeometry;
|
|
44
|
+
fragment: ParaFragment;
|
|
45
|
+
block: ParagraphBlock;
|
|
46
|
+
measure: ParagraphMeasure;
|
|
47
|
+
pageTopY: number;
|
|
48
|
+
fontContext: FontMeasureContext;
|
|
49
|
+
}): MeasuredVisualBidiFragment | null;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { Line, NeutralLineGeometry, ParagraphBlock, TextRun } from '../../contracts/src/index.js';
|
|
2
|
+
import { FontMeasureContext } from '../../../shared/font-system/src/index.js';
|
|
3
|
+
export interface MeasuredVisualBidiCell {
|
|
4
|
+
readonly from: number;
|
|
5
|
+
readonly to: number;
|
|
6
|
+
readonly left: number;
|
|
7
|
+
readonly right: number;
|
|
8
|
+
readonly rtl: boolean;
|
|
9
|
+
}
|
|
10
|
+
/** Private measured data; source offsets stay in the line's logical UTF-16 space. */
|
|
11
|
+
export interface MeasuredVisualBidiLine {
|
|
12
|
+
readonly geometry: NeutralLineGeometry;
|
|
13
|
+
readonly cells: readonly MeasuredVisualBidiCell[];
|
|
14
|
+
readonly length: number;
|
|
15
|
+
}
|
|
16
|
+
/** This certificate deliberately excludes shaping classes not covered by the native proof. */
|
|
17
|
+
export declare function canMeasureVisualBidi(block: ParagraphBlock): block is ParagraphBlock & {
|
|
18
|
+
runs: [TextRun];
|
|
19
|
+
};
|
|
20
|
+
interface VisualBidiLineInput {
|
|
21
|
+
block: ParagraphBlock;
|
|
22
|
+
line: Line;
|
|
23
|
+
geometry: NeutralLineGeometry;
|
|
24
|
+
availableWidth: number;
|
|
25
|
+
fontContext: FontMeasureContext;
|
|
26
|
+
ownerCurrent?: () => boolean;
|
|
27
|
+
}
|
|
28
|
+
/** Same measured line, source paragraph and font generation as the captured neutral candidate. */
|
|
29
|
+
export declare function measureVisualBidiLine(input: VisualBidiLineInput): MeasuredVisualBidiLine | null;
|
|
30
|
+
export declare function isMeasuredVisualBidiLineCurrent(line: MeasuredVisualBidiLine, fontContext?: FontMeasureContext): boolean;
|
|
31
|
+
export declare function measuredVisualBidiCaretX(line: MeasuredVisualBidiLine, offset: number, affinity?: 'before' | 'after' | 'inside'): number | null;
|
|
32
|
+
export declare function measuredVisualBidiOffsetAtX(line: MeasuredVisualBidiLine, x: number): number | null;
|
|
33
|
+
export declare function measuredVisualBidiRangeBands(line: MeasuredVisualBidiLine, from: number, to: number): {
|
|
34
|
+
left: number;
|
|
35
|
+
right: number;
|
|
36
|
+
}[];
|
|
37
|
+
export {};
|
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-DZIB6Pd4.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-DqCrc6Vw.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-DZIB6Pd4.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-DqCrc6Vw.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-DZIB6Pd4.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 { d as shallowEqual, o as BUILT_IN_COMMAND_IDS, t as createSuperDocUI } from "../chunks/create-super-doc-ui-DqCrc6Vw.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) {
|