superdoc 2.0.0-next.27 → 2.0.0-next.29
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/{PdfViewer-XZg0nr8y.es.js → PdfViewer-CNOtyS-I.es.js} +1 -1
- package/dist/chunks/{PdfViewer-BtuYf2yM.cjs → PdfViewer-CoFiGAhm.cjs} +1 -1
- package/dist/chunks/{create-super-doc-ui-Dvl3EZsv.es.js → create-super-doc-ui-BKVf2uCM.es.js} +660 -159
- package/dist/chunks/{create-super-doc-ui-pYMthdDn.cjs → create-super-doc-ui-BXehf3i3.cjs} +660 -159
- 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/track-changes/track-changes.d.ts +6 -2
- package/dist/document-api/src/types/clipboard.d.ts +5 -1
- package/dist/document-api/src/types/table-operations.types.d.ts +6 -4
- package/dist/document-api/src/types/track-changes.types.d.ts +15 -0
- package/dist/layout-engine/contracts/src/incremental-dependency.d.ts +10 -0
- package/dist/layout-engine/contracts/src/index.d.ts +38 -0
- package/dist/layout-engine/layout-bridge/src/incrementalLayout.d.ts +40 -1
- package/dist/layout-engine/layout-engine/src/index.d.ts +17 -0
- package/dist/layout-engine/layout-engine/src/paginator.d.ts +16 -0
- package/dist/layout-engine/layout-engine/src/paragraph-layout-eligibility.d.ts +1 -4
- package/dist/public/ui-react.cjs +1 -1
- package/dist/public/ui-react.es.js +1 -1
- package/dist/public/ui.cjs +1 -1
- package/dist/public/ui.es.js +1 -1
- package/dist/style.css +130 -86
- package/dist/style.layered.css +130 -86
- package/dist/superdoc/src/components/CommentsLayer/floating-comment-positioning.d.ts +1 -2
- package/dist/superdoc/src/core/types/index.d.ts +7 -0
- package/dist/superdoc/src/helpers/v2-review-mutation-impact.d.ts +4 -1
- package/dist/superdoc/src/helpers/v2-review-mutation-reconciler.d.ts +6 -5
- package/dist/superdoc/src/public/ui/reasons.d.ts +8 -0
- package/dist/superdoc/src/stores/comments-store.d.ts +17 -11
- package/dist/superdoc/src/stores/helpers/floating-comment-instances.d.ts +2 -10
- package/dist/superdoc/src/stores/helpers/tracked-change-thread-index.d.ts +14 -0
- package/dist/superdoc/src/stores/superdoc-store.d.ts +51 -33
- package/dist/superdoc.cjs +531 -135
- package/dist/superdoc.es.js +531 -135
- package/dist-cdn/style.layered.css +1 -1
- package/dist-cdn/superdoc.min.css +1 -1
- package/dist-cdn/superdoc.min.js +37 -37
- package/package.json +2 -2
|
@@ -7,7 +7,7 @@ const COLLABORATION_UPGRADE_ENGINE_MINIMUM_NODE_MAJOR = 20;
|
|
|
7
7
|
var PRIVATE_ENGINE_INFO = (0, __superdoc_docx_engine_collaboration_upgrade_engine.getCollaborationUpgradeEngineInfo)();
|
|
8
8
|
var ENGINE_INFO = Object.freeze({
|
|
9
9
|
...PRIVATE_ENGINE_INFO,
|
|
10
|
-
superdocVersion: "2.0.0-next.
|
|
10
|
+
superdocVersion: "2.0.0-next.29",
|
|
11
11
|
roomSchemaVersion: Object.freeze({ ...PRIVATE_ENGINE_INFO.roomSchemaVersion }),
|
|
12
12
|
supportedBundleVersions: SUPPORTED_COLLABORATION_UPGRADE_BUNDLE_VERSIONS,
|
|
13
13
|
supportedV1ReaderContractVersions: SUPPORTED_V1_READER_CONTRACT_VERSIONS
|
|
@@ -6,7 +6,7 @@ const COLLABORATION_UPGRADE_ENGINE_MINIMUM_NODE_MAJOR = 20;
|
|
|
6
6
|
var PRIVATE_ENGINE_INFO = getCollaborationUpgradeEngineInfo$1();
|
|
7
7
|
var ENGINE_INFO = Object.freeze({
|
|
8
8
|
...PRIVATE_ENGINE_INFO,
|
|
9
|
-
superdocVersion: "2.0.0-next.
|
|
9
|
+
superdocVersion: "2.0.0-next.29",
|
|
10
10
|
roomSchemaVersion: Object.freeze({ ...PRIVATE_ENGINE_INFO.roomSchemaVersion }),
|
|
11
11
|
supportedBundleVersions: SUPPORTED_COLLABORATION_UPGRADE_BUNDLE_VERSIONS,
|
|
12
12
|
supportedV1ReaderContractVersions: SUPPORTED_V1_READER_CONTRACT_VERSIONS
|
|
@@ -976,7 +976,7 @@ export declare const OPERATION_DEFINITIONS: {
|
|
|
976
976
|
};
|
|
977
977
|
readonly 'trackChanges.decide': {
|
|
978
978
|
readonly memberPath: "trackChanges.decide";
|
|
979
|
-
readonly description: "Accept or reject tracked changes by logical id, by selected text range, by logical anchor range ({ anchor, relativeStart, relativeEnd }), or every active change in the document. Range targets may include overlap / side selectors and may partially resolve a change, splitting surviving content into new fragments with stable ids. Legacy `{ id, range: { kind: \"partial\", ... } }` targets are promoted only when the active adapter supports `decide()`; legacy fallback adapters fail closed with `INVALID_INPUT`. `input.expectedRevision` is accepted as a compatibility alias for mutation options.";
|
|
979
|
+
readonly description: "Accept or reject tracked changes by logical id, by several logical ids atomically, by selected text range, by logical anchor range ({ anchor, relativeStart, relativeEnd }), or every active change in the document. Range targets may include overlap / side selectors and may partially resolve a change, splitting surviving content into new fragments with stable ids. Legacy `{ id, range: { kind: \"partial\", ... } }` targets are promoted only when the active adapter supports `decide()`; legacy fallback adapters fail closed with `INVALID_INPUT`. `input.expectedRevision` is accepted as a compatibility alias for mutation options.";
|
|
980
980
|
readonly expectedResult: "Returns a Receipt. `removed` lists retired tracked-change ids; `inserted` lists successor fragment ids produced by partial range splits; `invalidatedRefs` lists every retired tracked-change ref plus cascade-deleted comment ids; `remappedRefs` carries surviving comment anchors moved by the decision; `affectedStories` lists touched stories; `textRangeShifts` reports per-story visible-text deltas; `txId` correlates with history. Failures: SPAN_FRAGMENTED when a range crosses an indivisible boundary, CAPABILITY_UNAVAILABLE for formatting / structural / move targets (not yet supported), TARGET_NOT_FOUND for retired ids or zero overlap, STALE_REVISION for stale expectedRevision, REVISION_MISMATCH for stale range coverage, NO_OP when { kind: 'all' } resolves an empty target set.";
|
|
981
981
|
readonly requiresDocumentContext: true;
|
|
982
982
|
readonly metadata: CommandStaticMetadata;
|
|
@@ -72,6 +72,10 @@ export type ReviewDecideTarget = {
|
|
|
72
72
|
story?: StoryLocator;
|
|
73
73
|
side?: ReviewDecideIdTargetSide;
|
|
74
74
|
moveRole?: ReviewDecideTargetMoveRole;
|
|
75
|
+
} | {
|
|
76
|
+
/** Resolve several whole logical changes in one atomic history unit. */
|
|
77
|
+
kind: 'ids';
|
|
78
|
+
ids: string[];
|
|
75
79
|
} | ReviewDecideTextRangeTarget | ReviewDecideLogicalRangeTarget | {
|
|
76
80
|
kind: 'all';
|
|
77
81
|
story?: StoryLocator | 'all';
|
|
@@ -153,7 +157,7 @@ export declare function executeTrackChangesGet(adapter: TrackChangesAdapter, inp
|
|
|
153
157
|
* {@link RevisionGuardOptions} rather than `MutationOptions`.
|
|
154
158
|
*
|
|
155
159
|
* Validates the canonical discriminated target shape
|
|
156
|
-
* (`{ kind: 'id' | 'range' | 'all' }`) and transparently promotes the
|
|
160
|
+
* (`{ kind: 'id' | 'ids' | 'range' | 'all' }`) and transparently promotes the
|
|
157
161
|
* legacy `{ id, story? }` / `{ scope: 'all' }` shapes. Adapters that
|
|
158
162
|
* implement the new {@link TrackChangesAdapter.decide} entrypoint receive
|
|
159
163
|
* the normalized canonical input; older adapters that only expose
|
|
@@ -163,7 +167,7 @@ export declare function executeTrackChangesGet(adapter: TrackChangesAdapter, inp
|
|
|
163
167
|
export declare function executeTrackChangesDecide(adapter: TrackChangesAdapter, rawInput: ReviewDecideInput, options?: RevisionGuardOptions): Receipt;
|
|
164
168
|
/**
|
|
165
169
|
* Validate and normalize a `trackChanges.decide` input into the canonical
|
|
166
|
-
* `{ kind: 'id' | 'range' | 'all' }` target shape. Exposed for adapters /
|
|
170
|
+
* `{ kind: 'id' | 'ids' | 'range' | 'all' }` target shape. Exposed for adapters /
|
|
167
171
|
* tests that need to share the same validation surface.
|
|
168
172
|
*/
|
|
169
173
|
export declare function validateReviewDecideInput(rawInput: ReviewDecideInput): ReviewDecideRangeInput;
|
|
@@ -75,10 +75,14 @@ export interface SDPasteParagraphBlock {
|
|
|
75
75
|
* Portable list membership intent. Without `numbering`, the kernel always
|
|
76
76
|
* materializes a fresh definition. With `numbering`, the existing identity
|
|
77
77
|
* is retained when the destination defines the same list kind; otherwise
|
|
78
|
-
* this intent is the cross-document fallback.
|
|
78
|
+
* this intent is the cross-document fallback. `level` is zero-based and
|
|
79
|
+
* bounded to OOXML's nine list levels; omitted means level 0.
|
|
79
80
|
*/
|
|
80
81
|
listIntent?: {
|
|
81
82
|
kind: 'bullet' | 'ordered';
|
|
83
|
+
level?: number;
|
|
84
|
+
/** True on the first block of a distinct adjacent portable list. */
|
|
85
|
+
startsNewList?: boolean;
|
|
82
86
|
};
|
|
83
87
|
/**
|
|
84
88
|
* Pre-validated direct `<w:pPr>` properties. Same-document copy carries the
|
|
@@ -109,15 +109,17 @@ export type TableAnchorLocation = {
|
|
|
109
109
|
*/
|
|
110
110
|
export type TableCreateLocation = TableAnchorLocation
|
|
111
111
|
/**
|
|
112
|
-
* Split the target paragraph at
|
|
113
|
-
*
|
|
114
|
-
*
|
|
115
|
-
*
|
|
112
|
+
* Split the target paragraph at an offset and insert the table as a
|
|
113
|
+
* standalone block between the head/tail halves (Word semantics: a table
|
|
114
|
+
* cannot splice into a paragraph's runs). Offsets are visible-text by
|
|
115
|
+
* default; use `coordinateSpace: 'tracked'` for a deletion-inclusive caret
|
|
116
|
+
* coordinate. Body paragraphs only for now.
|
|
116
117
|
*/
|
|
117
118
|
| {
|
|
118
119
|
kind: 'inParagraph';
|
|
119
120
|
target: BlockNodeAddress;
|
|
120
121
|
offset: number;
|
|
122
|
+
coordinateSpace?: 'visible' | 'tracked';
|
|
121
123
|
};
|
|
122
124
|
/**
|
|
123
125
|
* Generic success result for table mutation operations.
|
|
@@ -448,6 +448,17 @@ export interface TrackChangeImagePreview {
|
|
|
448
448
|
/** Accessible label for clients that render the preview. */
|
|
449
449
|
alt?: string;
|
|
450
450
|
}
|
|
451
|
+
/**
|
|
452
|
+
* Authoritative block address for review navigation. Consumers use this
|
|
453
|
+
* instead of interpreting the shape-specific {@link TrackChangeTarget}
|
|
454
|
+
* union. `role` records which semantic carrier supplied the address.
|
|
455
|
+
*/
|
|
456
|
+
export interface TrackChangeNavigationTarget {
|
|
457
|
+
kind: 'block';
|
|
458
|
+
story: StoryLocator;
|
|
459
|
+
blockId: string;
|
|
460
|
+
role: 'primary' | 'move-source' | 'move-destination' | 'formatting-carrier' | 'structural-carrier';
|
|
461
|
+
}
|
|
451
462
|
export interface TrackChangeInfo {
|
|
452
463
|
address: TrackedChangeAddress;
|
|
453
464
|
/** Stable SuperDoc logical tracked-change id (spec §3 / §4). */
|
|
@@ -459,6 +470,8 @@ export interface TrackChangeInfo {
|
|
|
459
470
|
state?: TrackChangeState;
|
|
460
471
|
/** Logical target description. */
|
|
461
472
|
target?: TrackChangeTarget;
|
|
473
|
+
/** Stable story/block address for focus and virtualized materialization. */
|
|
474
|
+
navigationTarget?: TrackChangeNavigationTarget;
|
|
462
475
|
/** Semantic before-state needed to reject the change. */
|
|
463
476
|
before?: TrackChangeSnapshot;
|
|
464
477
|
/** Semantic after-state needed to accept the change. */
|
|
@@ -598,6 +611,8 @@ export interface TrackChangeDomain {
|
|
|
598
611
|
state?: TrackChangeState;
|
|
599
612
|
/** Logical target summary for list consumers when the compact projection can provide it safely. */
|
|
600
613
|
target?: TrackChangeTarget;
|
|
614
|
+
/** Stable story/block address for focus and virtualized materialization. */
|
|
615
|
+
navigationTarget?: TrackChangeNavigationTarget;
|
|
601
616
|
/** Move side metadata for paired tracked moves. */
|
|
602
617
|
move?: TrackChangeMoveSides;
|
|
603
618
|
/** Direction of a paired move in document order, when source/destination order is known. */
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Stable dependency classes that an incremental page checkpoint may fence.
|
|
3
|
+
*
|
|
4
|
+
* This list is proof metadata, never a feature switch. Producers must name
|
|
5
|
+
* every retained dependency that required the checkpoint; consumers reject
|
|
6
|
+
* empty, duplicate, or unknown lists instead of trusting a generic boolean.
|
|
7
|
+
*/
|
|
8
|
+
export type PageCheckpointDependencyClass = 'multiple-sections' | 'furniture-page-tokens' | 'non-balanceable-multi-column-sections' | 'body-anchored-objects' | 'footnotes' | 'page-references' | 'keep-constraints' | 'tables' | 'furniture-anchored-objects';
|
|
9
|
+
export declare const PAGE_CHECKPOINT_DEPENDENCY_CLASSES: readonly ["multiple-sections", "furniture-page-tokens", "non-balanceable-multi-column-sections", "body-anchored-objects", "footnotes", "page-references", "keep-constraints", "tables", "furniture-anchored-objects"];
|
|
10
|
+
export declare function areValidPageCheckpointDependencyClasses(value: unknown): value is readonly PageCheckpointDependencyClass[];
|
|
@@ -1749,6 +1749,11 @@ export type ListBlock = {
|
|
|
1749
1749
|
sourceAnchor?: SourceAnchor;
|
|
1750
1750
|
};
|
|
1751
1751
|
export type FlowBlock = ParagraphBlock | ImageBlock | DrawingBlock | ListBlock | TableBlock | SectionBreakBlock | PageBreakBlock | ColumnBreakBlock;
|
|
1752
|
+
export declare const isReviewableSectionBoundaryMarkerBlock: (block: FlowBlock | null | undefined) => boolean;
|
|
1753
|
+
/** Shared eligibility for paragraphs the layout loop deliberately omits. */
|
|
1754
|
+
export declare const shouldSkipParagraphDuringLayout: (blocks: FlowBlock[], index: number) => boolean;
|
|
1755
|
+
/** True only for block kinds that produce an addressable layout fragment. */
|
|
1756
|
+
export declare const doesFlowBlockProduceLayoutFragment: (blocks: FlowBlock[], index: number) => boolean;
|
|
1752
1757
|
export type ColumnLayout = {
|
|
1753
1758
|
count: number;
|
|
1754
1759
|
gap: number;
|
|
@@ -2355,6 +2360,36 @@ export type HeaderFooterLayout = {
|
|
|
2355
2360
|
renderHeight?: number;
|
|
2356
2361
|
pages: HeaderFooterPage[];
|
|
2357
2362
|
};
|
|
2363
|
+
/**
|
|
2364
|
+
* Engine-owned paginator state immediately before a top-level paragraph.
|
|
2365
|
+
* Incremental layout may resume from this state only after independently
|
|
2366
|
+
* proving that every preceding fragment on the page is stable.
|
|
2367
|
+
*/
|
|
2368
|
+
export type LayoutBlockResumeCheckpoint = {
|
|
2369
|
+
blockId: BlockId;
|
|
2370
|
+
pageIndex: number;
|
|
2371
|
+
prefixFragmentCount: number;
|
|
2372
|
+
cursorY: number;
|
|
2373
|
+
maxCursorY: number;
|
|
2374
|
+
columnIndex: number;
|
|
2375
|
+
trailingSpacing: number;
|
|
2376
|
+
lastParagraphStyleId?: string;
|
|
2377
|
+
lastParagraphContextualSpacing: boolean;
|
|
2378
|
+
lastParagraphBorderHash?: string;
|
|
2379
|
+
constraintBoundaries: readonly {
|
|
2380
|
+
y: number;
|
|
2381
|
+
columns: ColumnLayout;
|
|
2382
|
+
}[];
|
|
2383
|
+
activeConstraintIndex: number;
|
|
2384
|
+
footnoteDemandThisPage: number;
|
|
2385
|
+
footnoteRefsThisPage: number;
|
|
2386
|
+
footnoteAnchorsThisPage: readonly {
|
|
2387
|
+
pmPos: number;
|
|
2388
|
+
refId: string;
|
|
2389
|
+
fullHeight: number;
|
|
2390
|
+
firstLineHeight: number;
|
|
2391
|
+
}[];
|
|
2392
|
+
};
|
|
2358
2393
|
/** Final layout output ready for painting. */
|
|
2359
2394
|
export type Layout = {
|
|
2360
2395
|
pageSize: {
|
|
@@ -2380,6 +2415,8 @@ export type Layout = {
|
|
|
2380
2415
|
* from DOM-derived positions back to the current ProseMirror document state.
|
|
2381
2416
|
*/
|
|
2382
2417
|
layoutEpoch?: number;
|
|
2418
|
+
/** Exact paragraph-boundary resume sidecar; never inferred from painted geometry. */
|
|
2419
|
+
blockResumeCheckpoints?: ReadonlyMap<BlockId, LayoutBlockResumeCheckpoint>;
|
|
2383
2420
|
};
|
|
2384
2421
|
export type WrapTextMode = 'bothSides' | 'left' | 'right' | 'largest';
|
|
2385
2422
|
export type WrapExclusion = {
|
|
@@ -2402,4 +2439,5 @@ export declare const extractHeaderFooterSpace: (margins?: PageMargins | null) =>
|
|
|
2402
2439
|
export type { ResolvedLayout, ResolvedPage, ResolvedPaintItem, ResolvedGroupItem, ResolvedFragmentItem, ResolvedParagraphContent, ResolvedTextLineItem, ResolvedDropCapItem, ResolvedListMarkerItem, ResolvedTableItem, ResolvedImageItem, ResolvedDrawingItem, ResolvedHeaderFooterPage, ResolvedHeaderFooterLayout, } from './resolved-layout.js';
|
|
2403
2440
|
export { isResolvedTableItem, isResolvedImageItem, isResolvedDrawingItem } from './resolved-layout.js';
|
|
2404
2441
|
export { expandRunsForInlineNewlines, isEmptyInlineSdtPlaceholderRun, isEmptySdtPlaceholderRun, sliceRunsForLine, } from './run-helpers.js';
|
|
2442
|
+
export { PAGE_CHECKPOINT_DEPENDENCY_CLASSES, areValidPageCheckpointDependencyClasses, type PageCheckpointDependencyClass, } from './incremental-dependency.js';
|
|
2405
2443
|
export * as Engines from './engines/index.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { FlowBlock, Layout, Measure, HeaderFooterLayout, ParagraphBlock, ParagraphMeasure } from '../../contracts/src/index.js';
|
|
1
|
+
import { PageCheckpointDependencyClass, FlowBlock, Layout, Measure, HeaderFooterLayout, ParagraphBlock, ParagraphMeasure, ColumnLayout } from '../../contracts/src/index.js';
|
|
2
2
|
import { FontMeasureContext } from '../../../shared/font-system/src/index.js';
|
|
3
3
|
import { LayoutOptions, HeaderFooterConstraints } from '../../layout-engine/src/index.js';
|
|
4
4
|
import { computeDirtyRegions } from './diff.js';
|
|
@@ -33,10 +33,22 @@ export type HeaderFooterLayoutResult = {
|
|
|
33
33
|
*/
|
|
34
34
|
export type FootnoteReserveSeed = {
|
|
35
35
|
reserves: number[];
|
|
36
|
+
/** Sparse page indexes that held a reserve, ledger, or injected note slice. */
|
|
37
|
+
notePageIndexes?: number[];
|
|
36
38
|
separatorSpacingBefore: number | undefined;
|
|
37
39
|
fontSignature: string;
|
|
38
40
|
measurementWidth: number;
|
|
39
41
|
measurementHeight: number;
|
|
42
|
+
/** Exact note measurement width retained with unchanged section geometry. */
|
|
43
|
+
footnoteMeasurementWidth?: number;
|
|
44
|
+
/** Section-column inputs used to derive the retained note measurement width. */
|
|
45
|
+
sectionColumnsByIndex?: Map<number, ColumnLayout>;
|
|
46
|
+
/** Exact note block objects retained by the host's authoritative note-bundle proof. */
|
|
47
|
+
noteBlocksByBlockId?: Map<string, FlowBlock>;
|
|
48
|
+
/** Measures paired with `noteBlocksByBlockId`; object identity is revalidated before reuse. */
|
|
49
|
+
noteMeasuresByBlockId?: Map<string, Measure>;
|
|
50
|
+
noteBodyHeightById?: Map<string, number>;
|
|
51
|
+
noteFirstLineHeightById?: Map<string, number>;
|
|
40
52
|
};
|
|
41
53
|
export type IncrementalLayoutResult = {
|
|
42
54
|
layout: Layout;
|
|
@@ -165,6 +177,12 @@ type IncrementalPaginationProofBase = {
|
|
|
165
177
|
blockIdsUnchanged: true;
|
|
166
178
|
blockIdsUnique: true;
|
|
167
179
|
renderInputsUnchanged: true;
|
|
180
|
+
/** The retained dependency scan proved that no body or furniture PAGE_REF token exists. */
|
|
181
|
+
pageReferencesAbsent: boolean;
|
|
182
|
+
pageReferenceDependencyClosure?: {
|
|
183
|
+
referenceBlockIds: readonly string[];
|
|
184
|
+
targetBookmarkIds: readonly string[];
|
|
185
|
+
};
|
|
168
186
|
};
|
|
169
187
|
export type IncrementalPaginationProof = IncrementalPaginationProofBase & ({
|
|
170
188
|
profile: 'single-section-local-text';
|
|
@@ -181,6 +199,12 @@ export type IncrementalPaginationProof = IncrementalPaginationProofBase & ({
|
|
|
181
199
|
profile: 'page-checkpoint-local-text';
|
|
182
200
|
globalDependenciesAbsent: false;
|
|
183
201
|
globalDependenciesFencedByPageCheckpoint: true;
|
|
202
|
+
admittedDependencyClasses: readonly PageCheckpointDependencyClass[];
|
|
203
|
+
localKeepDependencyClosure?: {
|
|
204
|
+
checkpointPageIndex: number;
|
|
205
|
+
checkpointBlockId: string | null;
|
|
206
|
+
predecessorBlockId: string | null;
|
|
207
|
+
};
|
|
184
208
|
/**
|
|
185
209
|
* SD-3772 D1: the host proved (via the shared
|
|
186
210
|
* `hasGenuinelyUnequalExplicitColumnWidths` predicate) that no
|
|
@@ -226,6 +250,14 @@ export type IncrementalLayoutReuseOptions = {
|
|
|
226
250
|
}> | null;
|
|
227
251
|
/** Retained key index used for O(1) convergence candidate lookup. */
|
|
228
252
|
previousPageStartKeyIndex?: ReadonlyMap<string, readonly number[]> | null;
|
|
253
|
+
/**
|
|
254
|
+
* Host-proved note-only refresh. Body ids are unchanged reference anchors;
|
|
255
|
+
* only the named note projections may differ from the retained note plane.
|
|
256
|
+
*/
|
|
257
|
+
provedNoteOnlyRefresh?: {
|
|
258
|
+
noteIds: readonly string[];
|
|
259
|
+
bodyReferenceBlockIds: readonly string[];
|
|
260
|
+
};
|
|
229
261
|
};
|
|
230
262
|
export declare const measureCache: MeasureCache<Measure>;
|
|
231
263
|
/**
|
|
@@ -269,6 +301,13 @@ export declare function incrementalLayout(previousBlocks: FlowBlock[], _previous
|
|
|
269
301
|
previousFontSignature?: string;
|
|
270
302
|
}, warmStart?: {
|
|
271
303
|
footnoteReserveSeed?: FootnoteReserveSeed | null;
|
|
304
|
+
/** Host proved the authoritative note projection bundle was retained exactly. */
|
|
305
|
+
noteMeasurePlaneRetainedExact?: true;
|
|
306
|
+
/** Extra note/decorative planes paired with the retained note bundle. */
|
|
307
|
+
retainedFootnoteExtras?: {
|
|
308
|
+
blocks: FlowBlock[];
|
|
309
|
+
measures: Measure[];
|
|
310
|
+
};
|
|
272
311
|
}, layoutReuse?: IncrementalLayoutReuseOptions, measureReuseProof?: IncrementalMeasureReuseProof, execution?: IncrementalLayoutExecutionControl): Promise<IncrementalLayoutResult>;
|
|
273
312
|
/**
|
|
274
313
|
* Normalizes a margin value, using a fallback for undefined or non-finite values.
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { ColumnLayout, FlowBlock, HeaderFooterLayout, Layout, Measure, Page, ParagraphBlock, ParagraphMeasure, SectionMetadata, FlowMode, DocumentBackground } from '../../contracts/src/index.js';
|
|
2
|
+
import { PageState, ConstraintBoundary } from './paginator.js';
|
|
2
3
|
type PageSize = {
|
|
3
4
|
w: number;
|
|
4
5
|
h: number;
|
|
@@ -197,6 +198,22 @@ export type LayoutOptions = {
|
|
|
197
198
|
};
|
|
198
199
|
/** Resolved active column layout at the resumed boundary. */
|
|
199
200
|
activeColumns?: ColumnLayout;
|
|
201
|
+
/** Engine-authored exact state for a paragraph boundary inside the first emitted page. */
|
|
202
|
+
initialPageState?: {
|
|
203
|
+
prefixFragments: readonly Page['fragments'][number][];
|
|
204
|
+
cursorY: number;
|
|
205
|
+
maxCursorY: number;
|
|
206
|
+
columnIndex: number;
|
|
207
|
+
trailingSpacing: number;
|
|
208
|
+
lastParagraphStyleId?: string;
|
|
209
|
+
lastParagraphContextualSpacing: boolean;
|
|
210
|
+
lastParagraphBorderHash?: string;
|
|
211
|
+
constraintBoundaries: readonly ConstraintBoundary[];
|
|
212
|
+
activeConstraintIndex: number;
|
|
213
|
+
footnoteDemandThisPage: number;
|
|
214
|
+
footnoteRefsThisPage: number;
|
|
215
|
+
footnoteAnchorsThisPage: readonly PageState['footnoteAnchorsThisPage'][number][];
|
|
216
|
+
};
|
|
200
217
|
};
|
|
201
218
|
/**
|
|
202
219
|
* Optional page-boundary stop callback. Called after a page has completed
|
|
@@ -73,6 +73,22 @@ export type PaginatorOptions = {
|
|
|
73
73
|
h: number;
|
|
74
74
|
};
|
|
75
75
|
getActiveColumns(): ColumnLayout;
|
|
76
|
+
/** Exact first-page state from an engine-authored paragraph checkpoint. */
|
|
77
|
+
initialPageState?: {
|
|
78
|
+
prefixFragments: readonly Page['fragments'][number][];
|
|
79
|
+
cursorY: number;
|
|
80
|
+
maxCursorY: number;
|
|
81
|
+
columnIndex: number;
|
|
82
|
+
trailingSpacing: number;
|
|
83
|
+
lastParagraphStyleId?: string;
|
|
84
|
+
lastParagraphContextualSpacing: boolean;
|
|
85
|
+
lastParagraphBorderHash?: string;
|
|
86
|
+
constraintBoundaries: readonly ConstraintBoundary[];
|
|
87
|
+
activeConstraintIndex: number;
|
|
88
|
+
footnoteDemandThisPage: number;
|
|
89
|
+
footnoteRefsThisPage: number;
|
|
90
|
+
footnoteAnchorsThisPage: readonly PageState['footnoteAnchorsThisPage'][number][];
|
|
91
|
+
};
|
|
76
92
|
pageNumberOffset?: number;
|
|
77
93
|
createPage(number: number, pageMargins: PageMargins, pageSizeOverride?: {
|
|
78
94
|
w: number;
|
|
@@ -1,4 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export declare const isReviewableSectionBoundaryMarkerBlock: (block: FlowBlock | null | undefined) => boolean;
|
|
3
|
-
/** Paragraphs omitted by the main layout loop must not receive anchored objects. */
|
|
4
|
-
export declare const shouldSkipParagraphDuringLayout: (blocks: FlowBlock[], index: number) => boolean;
|
|
1
|
+
export { isReviewableSectionBoundaryMarkerBlock, shouldSkipParagraphDuringLayout } from '../../contracts/src/index.js';
|
package/dist/public/ui-react.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
2
|
const require_rolldown_runtime = require("../chunks/rolldown-runtime-_dR15c8t.cjs");
|
|
3
|
-
const require_create_super_doc_ui = require("../chunks/create-super-doc-ui-
|
|
3
|
+
const require_create_super_doc_ui = require("../chunks/create-super-doc-ui-BXehf3i3.cjs");
|
|
4
4
|
let react = require("react");
|
|
5
5
|
var SuperDocUIContext = (0, react.createContext)(null);
|
|
6
6
|
function SuperDocUIProvider(props) {
|
|
@@ -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-BKVf2uCM.es.js";
|
|
2
2
|
import { createContext, createElement, useCallback, useContext, useEffect, useRef, useState } from "react";
|
|
3
3
|
var SuperDocUIContext = createContext(null);
|
|
4
4
|
function SuperDocUIProvider(props) {
|
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-BXehf3i3.cjs");
|
|
3
3
|
exports.BUILT_IN_COMMAND_IDS = require_create_super_doc_ui.BUILT_IN_COMMAND_IDS;
|
|
4
4
|
exports.createSuperDocUI = require_create_super_doc_ui.createSuperDocUI;
|
|
5
5
|
exports.shallowEqual = require_create_super_doc_ui.shallowEqual;
|
package/dist/public/ui.es.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as BUILT_IN_COMMAND_IDS, r as shallowEqual, t as createSuperDocUI } from "../chunks/create-super-doc-ui-
|
|
1
|
+
import { n as BUILT_IN_COMMAND_IDS, r as shallowEqual, t as createSuperDocUI } from "../chunks/create-super-doc-ui-BKVf2uCM.es.js";
|
|
2
2
|
export { BUILT_IN_COMMAND_IDS, createSuperDocUI, shallowEqual };
|