superdoc 2.12.0-next.8 → 2.12.0-next.9
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/collaboration-upgrade-engine.cjs +1 -1
- package/dist/collaboration-upgrade-engine.es.js +1 -1
- package/dist/layout-engine/contracts/src/index.d.ts +1 -1
- package/dist/layout-engine/contracts/src/run-helpers.d.ts +8 -0
- package/dist/layout-engine/layout-bridge/src/cache.d.ts +5 -4
- package/dist/layout-engine/layout-bridge/src/incrementalLayout.d.ts +4 -1
- package/dist/layout-engine/layout-bridge/src/note-marker-measure-key.d.ts +3 -0
- package/dist/shared/font-system/src/index.d.ts +1 -1
- package/dist/shared/font-system/src/resolver.d.ts +11 -0
- package/dist/superdoc.cjs +2 -2
- package/dist/superdoc.es.js +2 -2
- package/dist-cdn/superdoc.min.js +3 -3
- 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.12.0-next.
|
|
22
|
+
superdocVersion: "2.12.0-next.9",
|
|
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.12.0-next.
|
|
21
|
+
superdocVersion: "2.12.0-next.9",
|
|
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
|
|
@@ -2836,7 +2836,7 @@ export declare const extractHeaderFooterSpace: (margins?: PageMargins | null) =>
|
|
|
2836
2836
|
};
|
|
2837
2837
|
export type { ResolvedLayout, ResolvedPage, ResolvedPaintItem, ResolvedGroupItem, ResolvedFragmentItem, ResolvedParagraphContent, ResolvedTextLineItem, ResolvedDropCapItem, ResolvedListMarkerItem, ResolvedTableItem, ResolvedImageItem, ResolvedDrawingItem, ResolvedHeaderFooterPage, ResolvedHeaderFooterLayout, } from './resolved-layout.js';
|
|
2838
2838
|
export { isResolvedTableItem, isResolvedImageItem, isResolvedDrawingItem } from './resolved-layout.js';
|
|
2839
|
-
export { expandRunsForInlineNewlines, isEmptyInlineSdtPlaceholderRun, isEmptySdtPlaceholderRun, sliceRunsForLine, usesPositionedTextGeometry, } from './run-helpers.js';
|
|
2839
|
+
export { expandRunsForInlineNewlines, isBodyNoteReferenceRun, isNoteLabelRun, isNumberedNoteMarkerRun, isEmptyInlineSdtPlaceholderRun, isEmptySdtPlaceholderRun, NOTE_LABEL_MARKER_ATTR, NOTE_REFERENCE_MARKER_ATTR, sliceRunsForLine, usesPositionedTextGeometry, } from './run-helpers.js';
|
|
2840
2840
|
export { INLINE_OBJECT_REPLACEMENT_CHARACTER, flattenParagraphVisibleText, mapVisibleRangeToRunSlices, type ParagraphVisibleRunSlice, } from './paragraph-visible-text.js';
|
|
2841
2841
|
export { inlineBoxStyleSignature, isFiniteNonNegativeInteger, normalizeInlineBoxLogicalSides, type InlineBoxLogicalSides, type ResolvedInlineBoxLogicalSides, } from './inline-box.js';
|
|
2842
2842
|
export { INCREMENTAL_DEPENDENCY_CERTIFICATE_CLASSES, PAGE_CHECKPOINT_DEPENDENCY_CLASSES, areValidPageCheckpointDependencyClasses, isValidIncrementalDependencyOwnerVersion, isValidNonFlowingPageRelativeAnchorDependencyProof, isValidPageCheckpointDependencyCertificate, type IncrementalDependencyCertificateClass, type IncrementalDependencyOwnerVersion, type NonFlowingPageRelativeAnchorDependencyProof, type PageCheckpointDependencyCertificate, type PageCheckpointDependencyClass, } from './incremental-dependency.js';
|
|
@@ -1,4 +1,12 @@
|
|
|
1
1
|
import { FlowBlock, Line, Run, TextRun } from './index.js';
|
|
2
|
+
export declare const NOTE_REFERENCE_MARKER_ATTR = "data-v2-note-ref";
|
|
3
|
+
export declare const NOTE_LABEL_MARKER_ATTR = "data-v2-note-label";
|
|
4
|
+
/** Body note markers paint text but occupy one source-coordinate unit. */
|
|
5
|
+
export declare function isBodyNoteReferenceRun(run: Run): boolean;
|
|
6
|
+
/** Synthetic note-band or appended-endnote label keyed to its source note. */
|
|
7
|
+
export declare function isNoteLabelRun(run: Run): boolean;
|
|
8
|
+
/** Numbered marker text whose measurement identity can use digit capabilities. */
|
|
9
|
+
export declare function isNumberedNoteMarkerRun(run: Run): boolean;
|
|
2
10
|
export declare function isEmptySdtPlaceholderRun(run: Run): run is TextRun & {
|
|
3
11
|
visualPlaceholder: 'emptyInlineSdt' | 'emptyBlockSdt';
|
|
4
12
|
};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { FlowBlock } from '../../contracts/src/index.js';
|
|
2
|
+
import { FontMeasureCapabilities } from '../../../shared/font-system/src/index.js';
|
|
2
3
|
/**
|
|
3
4
|
* Generates a cache key hash from a block's content, incorporating text,
|
|
4
5
|
* formatting, and embedded block data.
|
|
@@ -23,7 +24,7 @@ import { FlowBlock } from '../../contracts/src/index.js';
|
|
|
23
24
|
* content component of that key, so adopting a previous measure on hash
|
|
24
25
|
* equality is exactly as sound as a cache hit.
|
|
25
26
|
*/
|
|
26
|
-
export declare const hashMeasureContent: (block: FlowBlock) => string;
|
|
27
|
+
export declare const hashMeasureContent: (block: FlowBlock, capabilities?: FontMeasureCapabilities) => string;
|
|
27
28
|
/**
|
|
28
29
|
* Cache statistics with LRU eviction tracking
|
|
29
30
|
*/
|
|
@@ -80,12 +81,12 @@ export declare class MeasureCache<T> {
|
|
|
80
81
|
* @param height - The height dimension for cache key
|
|
81
82
|
* @returns The cached value or undefined
|
|
82
83
|
*/
|
|
83
|
-
get(block: FlowBlock | null | undefined, width: number, height: number, fontSignature?: string): T | undefined;
|
|
84
|
+
get(block: FlowBlock | null | undefined, width: number, height: number, fontSignature?: string, capabilities?: FontMeasureCapabilities): T | undefined;
|
|
84
85
|
/**
|
|
85
86
|
* Compose the complete content, constraint, and font key once for a cache
|
|
86
87
|
* read followed by an insertion in the same measurement transaction.
|
|
87
88
|
*/
|
|
88
|
-
prepareKey(block: FlowBlock | null | undefined, width: number, height: number, fontSignature?: string): PreparedMeasureCacheKey | undefined;
|
|
89
|
+
prepareKey(block: FlowBlock | null | undefined, width: number, height: number, fontSignature?: string, capabilities?: FontMeasureCapabilities): PreparedMeasureCacheKey | undefined;
|
|
89
90
|
getPrepared(key: PreparedMeasureCacheKey | undefined): T | undefined;
|
|
90
91
|
/**
|
|
91
92
|
* Store a measure in the cache for the given block and dimensions.
|
|
@@ -96,7 +97,7 @@ export declare class MeasureCache<T> {
|
|
|
96
97
|
* @param height - The height dimension for cache key
|
|
97
98
|
* @param value - The value to cache
|
|
98
99
|
*/
|
|
99
|
-
set(block: FlowBlock | null | undefined, width: number, height: number, value: T, fontSignature?: string): void;
|
|
100
|
+
set(block: FlowBlock | null | undefined, width: number, height: number, value: T, fontSignature?: string, capabilities?: FontMeasureCapabilities): void;
|
|
100
101
|
setPrepared(key: PreparedMeasureCacheKey | undefined, blockId: string | undefined, value: T): void;
|
|
101
102
|
/**
|
|
102
103
|
* Invalidates cached measurements for specific block IDs.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { NonFlowingPageRelativeAnchorDependencyProof, PageCheckpointDependencyClass, FlowBlock, Layout, LayoutBlockResumeCheckpoint, Measure, Page, HeaderFooterLayout, ColumnLayout } from '../../contracts/src/index.js';
|
|
2
|
-
import { FontMeasureContext } from '../../../shared/font-system/src/index.js';
|
|
2
|
+
import { FontMeasureCapabilities, FontMeasureContext } from '../../../shared/font-system/src/index.js';
|
|
3
3
|
import { LayoutOptions, HeaderFooterConstraints, LayoutExecutionCheckpoint } from '../../layout-engine/src/index.js';
|
|
4
4
|
import { computeDirtyRegions } from './diff.js';
|
|
5
5
|
import { MeasureCache } from './cache.js';
|
|
@@ -534,10 +534,13 @@ export declare function incrementalLayout(previousBlocks: FlowBlock[], _previous
|
|
|
534
534
|
}, previousMeasures?: Measure[] | null, fontRuntime?: {
|
|
535
535
|
fontContext?: FontMeasureContext;
|
|
536
536
|
previousFontSignature?: string;
|
|
537
|
+
fontCapabilities?: FontMeasureCapabilities;
|
|
537
538
|
}, warmStart?: {
|
|
538
539
|
footnoteReserveSeed?: FootnoteReserveSeed | null;
|
|
539
540
|
/** Host proved the authoritative note projection bundle was retained exactly. */
|
|
540
541
|
noteMeasurePlaneRetainedExact?: true;
|
|
542
|
+
/** Host proved this seed is an exact, geometry-equivalent subset of the current note plane. */
|
|
543
|
+
noteMeasurePlaneRetainedSubset?: true;
|
|
541
544
|
/** Extra note/decorative planes paired with the retained note bundle. */
|
|
542
545
|
retainedFootnoteExtras?: {
|
|
543
546
|
blocks: FlowBlock[];
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
*/
|
|
16
16
|
export type { FontLoadStatus, FontFaceSource, FontFaceDescriptor, RegisteredFace, RegisterFaceResult, FontLoadResult, FontLoadSummary, FontFaceRequest, FontFaceLoadResult, FontAssetUrlContext, FontAssetUrlResolver, RequiredFace, } from './types.js';
|
|
17
17
|
export { SETTLED_STATUSES, isSettled } from './types.js';
|
|
18
|
-
export type { FontResolution, FontResolutionReason, FaceKey, HasFace, FontMeasureContext, ResolvePhysicalFamily, ResolveNaturalLineMultiplier, } from './resolver.js';
|
|
18
|
+
export type { FontResolution, FontResolutionReason, FaceKey, HasFace, FontMeasureCapabilities, FontMeasureContext, FontMeasureFace, ResolvePhysicalFamily, ResolveNaturalLineMultiplier, } from './resolver.js';
|
|
19
19
|
export { FontResolver, createFontResolver, insertFontFamilyBeforeGeneric } from './resolver.js';
|
|
20
20
|
export { resolveFontFamily, resolvePhysicalFamily, resolvePrimaryPhysicalFamily, resolvePhysicalFamilies, resolveFace, DEFAULT_FONT_MEASURE_CONTEXT, } from './resolver.js';
|
|
21
21
|
export { getFontConfigVersion, bumpFontConfigVersion, __resetFontConfigVersion } from './epoch.js';
|
|
@@ -212,6 +212,17 @@ export interface FontMeasureContext {
|
|
|
212
212
|
resolveNaturalLineMultiplier?: ResolveNaturalLineMultiplier;
|
|
213
213
|
fontSignature: string;
|
|
214
214
|
}
|
|
215
|
+
/** Font face inputs whose measured digit advances can affect layout reuse. */
|
|
216
|
+
export interface FontMeasureFace {
|
|
217
|
+
family: string;
|
|
218
|
+
sizePx: number;
|
|
219
|
+
weight: FaceKey['weight'];
|
|
220
|
+
style: FaceKey['style'];
|
|
221
|
+
}
|
|
222
|
+
/** Immutable, invocation-scoped facts established by the active measurement surface. */
|
|
223
|
+
export interface FontMeasureCapabilities {
|
|
224
|
+
hasTabularDigits(face: FontMeasureFace): boolean;
|
|
225
|
+
}
|
|
215
226
|
/**
|
|
216
227
|
* The global-resolver / empty-signature context. The behavior-preserving default for outer entry
|
|
217
228
|
* points and non-document callers (tests, the global measure path). Frozen so a stray
|
package/dist/superdoc.cjs
CHANGED
|
@@ -316,7 +316,7 @@ var shuffleArray = (array) => {
|
|
|
316
316
|
var DEFAULT_ENDPOINT = "https://ingest.superdoc.dev/v1/collect";
|
|
317
317
|
function getSuperdocVersion() {
|
|
318
318
|
try {
|
|
319
|
-
return "2.12.0-next.
|
|
319
|
+
return "2.12.0-next.9";
|
|
320
320
|
} catch {
|
|
321
321
|
return "unknown";
|
|
322
322
|
}
|
|
@@ -45214,7 +45214,7 @@ var SuperDoc = class extends require_eventemitter3.import_eventemitter3.default
|
|
|
45214
45214
|
this.config.colors = shuffleArray(this.config.colors);
|
|
45215
45215
|
this.userColorMap = /* @__PURE__ */ new Map();
|
|
45216
45216
|
this.colorIndex = 0;
|
|
45217
|
-
this.version = "2.12.0-next.
|
|
45217
|
+
this.version = "2.12.0-next.9";
|
|
45218
45218
|
this.#log("🦋 [superdoc] Using SuperDoc version:", this.version);
|
|
45219
45219
|
this.superdocId = config.superdocId || require_uuid.v4();
|
|
45220
45220
|
this.colors = this.config.colors ?? [];
|
package/dist/superdoc.es.js
CHANGED
|
@@ -315,7 +315,7 @@ var shuffleArray = (array) => {
|
|
|
315
315
|
var DEFAULT_ENDPOINT = "https://ingest.superdoc.dev/v1/collect";
|
|
316
316
|
function getSuperdocVersion() {
|
|
317
317
|
try {
|
|
318
|
-
return "2.12.0-next.
|
|
318
|
+
return "2.12.0-next.9";
|
|
319
319
|
} catch {
|
|
320
320
|
return "unknown";
|
|
321
321
|
}
|
|
@@ -45145,7 +45145,7 @@ var SuperDoc = class extends import_eventemitter3.default {
|
|
|
45145
45145
|
this.config.colors = shuffleArray(this.config.colors);
|
|
45146
45146
|
this.userColorMap = /* @__PURE__ */ new Map();
|
|
45147
45147
|
this.colorIndex = 0;
|
|
45148
|
-
this.version = "2.12.0-next.
|
|
45148
|
+
this.version = "2.12.0-next.9";
|
|
45149
45149
|
this.#log("🦋 [superdoc] Using SuperDoc version:", this.version);
|
|
45150
45150
|
this.superdocId = config.superdocId || v4();
|
|
45151
45151
|
this.colors = this.config.colors ?? [];
|