@rtif-sdk/web 1.1.0 → 1.4.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/block-drag-handler.js +4 -1
- package/dist/block-drag-handler.js.map +1 -1
- package/dist/content-handler-html.d.ts +28 -0
- package/dist/content-handler-html.d.ts.map +1 -0
- package/dist/content-handler-html.js +49 -0
- package/dist/content-handler-html.js.map +1 -0
- package/dist/content-handlers.d.ts +20 -19
- package/dist/content-handlers.d.ts.map +1 -1
- package/dist/content-handlers.js +4 -43
- package/dist/content-handlers.js.map +1 -1
- package/dist/editor.d.ts.map +1 -1
- package/dist/editor.js +119 -5
- package/dist/editor.js.map +1 -1
- package/dist/index.d.ts +12 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +15 -3
- package/dist/index.js.map +1 -1
- package/dist/preset-basic.d.ts +20 -0
- package/dist/preset-basic.d.ts.map +1 -0
- package/dist/preset-basic.js +28 -0
- package/dist/preset-basic.js.map +1 -0
- package/dist/preset-full.d.ts +22 -0
- package/dist/preset-full.d.ts.map +1 -0
- package/dist/preset-full.js +66 -0
- package/dist/preset-full.js.map +1 -0
- package/dist/preset-plaintext.d.ts +20 -0
- package/dist/preset-plaintext.d.ts.map +1 -0
- package/dist/preset-plaintext.js +19 -0
- package/dist/preset-plaintext.js.map +1 -0
- package/dist/preset-standard.d.ts +22 -0
- package/dist/preset-standard.d.ts.map +1 -0
- package/dist/preset-standard.js +47 -0
- package/dist/preset-standard.js.map +1 -0
- package/dist/presets.d.ts +7 -88
- package/dist/presets.d.ts.map +1 -1
- package/dist/presets.js +7 -152
- package/dist/presets.js.map +1 -1
- package/dist/renderer.d.ts +29 -0
- package/dist/renderer.d.ts.map +1 -1
- package/dist/renderer.js +107 -77
- package/dist/renderer.js.map +1 -1
- package/dist/spatial-index.d.ts +203 -0
- package/dist/spatial-index.d.ts.map +1 -0
- package/dist/spatial-index.js +211 -0
- package/dist/spatial-index.js.map +1 -0
- package/dist/types.d.ts +82 -0
- package/dist/types.d.ts.map +1 -1
- package/dist/virtual-viewport.d.ts +241 -0
- package/dist/virtual-viewport.d.ts.map +1 -0
- package/dist/virtual-viewport.js +584 -0
- package/dist/virtual-viewport.js.map +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,203 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Spatial index for viewport virtualization.
|
|
3
|
+
*
|
|
4
|
+
* A prefix-sum array of block pixel heights, mirroring
|
|
5
|
+
* {@link ResolveIndex} from `@rtif-sdk/core` but for layout instead of
|
|
6
|
+
* character offsets. Provides O(1) `blockTop` / `totalHeight` and
|
|
7
|
+
* O(log n) `computeVisibleRange` for efficiently determining which
|
|
8
|
+
* blocks are visible within a scrollable viewport.
|
|
9
|
+
*
|
|
10
|
+
* @packageDocumentation
|
|
11
|
+
*/
|
|
12
|
+
import type { Document } from '@rtif-sdk/core';
|
|
13
|
+
/**
|
|
14
|
+
* Default estimated pixel heights per block type.
|
|
15
|
+
*
|
|
16
|
+
* Used when no measured height is available for a block.
|
|
17
|
+
* Override via {@link SpatialIndexConfig.blockTypeHeights}.
|
|
18
|
+
*
|
|
19
|
+
* @example
|
|
20
|
+
* ```ts
|
|
21
|
+
* // Use defaults with a custom "callout" override
|
|
22
|
+
* createSpatialIndex(doc, {
|
|
23
|
+
* blockTypeHeights: { ...DEFAULT_BLOCK_TYPE_HEIGHTS, callout: 64 },
|
|
24
|
+
* });
|
|
25
|
+
* ```
|
|
26
|
+
*/
|
|
27
|
+
export declare const DEFAULT_BLOCK_TYPE_HEIGHTS: Record<string, number>;
|
|
28
|
+
/**
|
|
29
|
+
* Configuration for creating a {@link SpatialIndex}.
|
|
30
|
+
*
|
|
31
|
+
* @example
|
|
32
|
+
* ```ts
|
|
33
|
+
* const config: SpatialIndexConfig = {
|
|
34
|
+
* estimatedBlockHeight: 32,
|
|
35
|
+
* blockTypeHeights: { heading: 48, image: 250 },
|
|
36
|
+
* };
|
|
37
|
+
* ```
|
|
38
|
+
*/
|
|
39
|
+
export interface SpatialIndexConfig {
|
|
40
|
+
/**
|
|
41
|
+
* Default estimated pixel height for block types not listed in
|
|
42
|
+
* {@link blockTypeHeights} or {@link DEFAULT_BLOCK_TYPE_HEIGHTS}.
|
|
43
|
+
*
|
|
44
|
+
* Default: `24`.
|
|
45
|
+
*/
|
|
46
|
+
readonly estimatedBlockHeight?: number;
|
|
47
|
+
/**
|
|
48
|
+
* Estimated pixel heights per block type string.
|
|
49
|
+
*
|
|
50
|
+
* Merged on top of {@link DEFAULT_BLOCK_TYPE_HEIGHTS} so you only
|
|
51
|
+
* need to specify overrides. Pass an empty object to use only the
|
|
52
|
+
* built-in defaults.
|
|
53
|
+
*
|
|
54
|
+
* @example
|
|
55
|
+
* ```ts
|
|
56
|
+
* { heading: 48, 'list-item': 28 }
|
|
57
|
+
* ```
|
|
58
|
+
*/
|
|
59
|
+
readonly blockTypeHeights?: Record<string, number>;
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* A prefix-sum spatial index for O(1) block-top queries and O(log n)
|
|
63
|
+
* visible-range computation.
|
|
64
|
+
*
|
|
65
|
+
* Create with {@link createSpatialIndex}. The index is mutable --
|
|
66
|
+
* call {@link setBlockHeight} or {@link setBlockHeights} as measured
|
|
67
|
+
* heights become available, and {@link rebuild} when the document
|
|
68
|
+
* structure changes (blocks added/removed/reordered).
|
|
69
|
+
*
|
|
70
|
+
* @example
|
|
71
|
+
* ```ts
|
|
72
|
+
* const spatial = createSpatialIndex(doc);
|
|
73
|
+
* const range = spatial.computeVisibleRange(scrollTop, viewportHeight, 2);
|
|
74
|
+
* for (let i = range.start; i < range.end; i++) {
|
|
75
|
+
* renderBlock(doc.blocks[i]);
|
|
76
|
+
* }
|
|
77
|
+
* ```
|
|
78
|
+
*/
|
|
79
|
+
export interface SpatialIndex {
|
|
80
|
+
/**
|
|
81
|
+
* Total height of all blocks in pixels.
|
|
82
|
+
*
|
|
83
|
+
* @returns Sum of all block heights (O(1))
|
|
84
|
+
*/
|
|
85
|
+
totalHeight(): number;
|
|
86
|
+
/**
|
|
87
|
+
* Number of blocks in the index.
|
|
88
|
+
*
|
|
89
|
+
* @returns Block count (O(1))
|
|
90
|
+
*/
|
|
91
|
+
blockCount(): number;
|
|
92
|
+
/**
|
|
93
|
+
* Pixel height of the block at the given index.
|
|
94
|
+
*
|
|
95
|
+
* @param index - 0-based block index
|
|
96
|
+
* @returns The block's height in pixels
|
|
97
|
+
* @throws {RangeError} If index is out of bounds
|
|
98
|
+
*/
|
|
99
|
+
blockHeight(index: number): number;
|
|
100
|
+
/**
|
|
101
|
+
* The y-coordinate (top edge) of the block at the given index,
|
|
102
|
+
* measured from the top of the document.
|
|
103
|
+
*
|
|
104
|
+
* @param index - 0-based block index
|
|
105
|
+
* @returns Pixel offset from document top (O(1))
|
|
106
|
+
* @throws {RangeError} If index is out of bounds
|
|
107
|
+
*/
|
|
108
|
+
blockTop(index: number): number;
|
|
109
|
+
/**
|
|
110
|
+
* Compute the range of block indices visible within a scrollable
|
|
111
|
+
* viewport, plus a configurable buffer of extra blocks on each side.
|
|
112
|
+
*
|
|
113
|
+
* Uses binary search on the prefix-sum array for O(log n) performance.
|
|
114
|
+
*
|
|
115
|
+
* @param scrollTop - The viewport's scroll offset from the top of the
|
|
116
|
+
* document in pixels. Clamped to `[0, totalHeight]`.
|
|
117
|
+
* @param viewportHeight - The viewport height in pixels. Must be >= 0.
|
|
118
|
+
* @param buffer - Number of extra blocks to include before and after
|
|
119
|
+
* the visible range (for smooth scrolling). Clamped to valid range.
|
|
120
|
+
* @returns An object with `start` (inclusive) and `end` (exclusive)
|
|
121
|
+
* block indices. When there are no blocks, returns `{ start: 0, end: 0 }`.
|
|
122
|
+
*
|
|
123
|
+
* @example
|
|
124
|
+
* ```ts
|
|
125
|
+
* const { start, end } = spatial.computeVisibleRange(200, 600, 3);
|
|
126
|
+
* // Render blocks [start, end)
|
|
127
|
+
* ```
|
|
128
|
+
*/
|
|
129
|
+
computeVisibleRange(scrollTop: number, viewportHeight: number, buffer: number): {
|
|
130
|
+
readonly start: number;
|
|
131
|
+
readonly end: number;
|
|
132
|
+
};
|
|
133
|
+
/**
|
|
134
|
+
* Update the measured pixel height of a single block and rebuild
|
|
135
|
+
* prefix sums from that index onward.
|
|
136
|
+
*
|
|
137
|
+
* @param index - 0-based block index
|
|
138
|
+
* @param height - New measured height in pixels
|
|
139
|
+
* @throws {RangeError} If index is out of bounds
|
|
140
|
+
*/
|
|
141
|
+
setBlockHeight(index: number, height: number): void;
|
|
142
|
+
/**
|
|
143
|
+
* Batch-update measured pixel heights for multiple blocks and rebuild
|
|
144
|
+
* prefix sums once.
|
|
145
|
+
*
|
|
146
|
+
* More efficient than calling {@link setBlockHeight} in a loop because
|
|
147
|
+
* prefix sums are only rebuilt once, starting from the lowest changed index.
|
|
148
|
+
*
|
|
149
|
+
* @param updates - Array of `{ index, height }` pairs
|
|
150
|
+
* @throws {RangeError} If any index is out of bounds
|
|
151
|
+
*/
|
|
152
|
+
setBlockHeights(updates: ReadonlyArray<{
|
|
153
|
+
readonly index: number;
|
|
154
|
+
readonly height: number;
|
|
155
|
+
}>): void;
|
|
156
|
+
/**
|
|
157
|
+
* Rebuild the index from a (potentially new) document.
|
|
158
|
+
*
|
|
159
|
+
* Creates a fresh prefix-sum array sized to the document's block count.
|
|
160
|
+
* If `preserveHeights` is provided (keyed by block ID), those measured
|
|
161
|
+
* heights are used; otherwise the estimate for the block's type is used.
|
|
162
|
+
*
|
|
163
|
+
* @param doc - The RTIF document to index
|
|
164
|
+
* @param preserveHeights - Optional map of block ID to measured pixel
|
|
165
|
+
* height. Blocks whose IDs appear in this map use the measured value
|
|
166
|
+
* instead of the type-based estimate.
|
|
167
|
+
*/
|
|
168
|
+
rebuild(doc: Document, preserveHeights?: Map<string, number>): void;
|
|
169
|
+
}
|
|
170
|
+
/**
|
|
171
|
+
* Create a spatial index for viewport virtualization.
|
|
172
|
+
*
|
|
173
|
+
* Builds a prefix-sum array of estimated block heights in O(n). Subsequent
|
|
174
|
+
* `blockTop()` calls are O(1) and `computeVisibleRange()` calls are O(log n).
|
|
175
|
+
*
|
|
176
|
+
* As blocks are rendered and measured, call {@link SpatialIndex.setBlockHeight}
|
|
177
|
+
* or {@link SpatialIndex.setBlockHeights} to replace estimates with actual
|
|
178
|
+
* measured values. When the document structure changes (blocks added, removed,
|
|
179
|
+
* or reordered), call {@link SpatialIndex.rebuild}.
|
|
180
|
+
*
|
|
181
|
+
* @param doc - The RTIF document to index
|
|
182
|
+
* @param config - Optional configuration for height estimates
|
|
183
|
+
* @returns A new {@link SpatialIndex} instance
|
|
184
|
+
*
|
|
185
|
+
* @example
|
|
186
|
+
* ```ts
|
|
187
|
+
* import { createSpatialIndex } from '@rtif-sdk/web';
|
|
188
|
+
*
|
|
189
|
+
* const spatial = createSpatialIndex(doc);
|
|
190
|
+
* console.log(spatial.totalHeight()); // e.g. 2400
|
|
191
|
+
* console.log(spatial.blockTop(5)); // e.g. 120
|
|
192
|
+
*
|
|
193
|
+
* const { start, end } = spatial.computeVisibleRange(100, 600, 2);
|
|
194
|
+
* for (let i = start; i < end; i++) {
|
|
195
|
+
* renderBlock(doc.blocks[i]);
|
|
196
|
+
* }
|
|
197
|
+
*
|
|
198
|
+
* // After measuring a block's actual height:
|
|
199
|
+
* spatial.setBlockHeight(5, 36);
|
|
200
|
+
* ```
|
|
201
|
+
*/
|
|
202
|
+
export declare function createSpatialIndex(doc: Document, config?: SpatialIndexConfig): SpatialIndex;
|
|
203
|
+
//# sourceMappingURL=spatial-index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"spatial-index.d.ts","sourceRoot":"","sources":["../src/spatial-index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAM/C;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,0BAA0B,EAAE,MAAM,CAAC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;;;;;;;GA+BG;AACH,wBAAgB,kBAAkB,CAChC,GAAG,EAAE,QAAQ,EACb,MAAM,CAAC,EAAE,kBAAkB,GAC1B,YAAY,CAgJd"}
|
|
@@ -0,0 +1,211 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Spatial index for viewport virtualization.
|
|
3
|
+
*
|
|
4
|
+
* A prefix-sum array of block pixel heights, mirroring
|
|
5
|
+
* {@link ResolveIndex} from `@rtif-sdk/core` but for layout instead of
|
|
6
|
+
* character offsets. Provides O(1) `blockTop` / `totalHeight` and
|
|
7
|
+
* O(log n) `computeVisibleRange` for efficiently determining which
|
|
8
|
+
* blocks are visible within a scrollable viewport.
|
|
9
|
+
*
|
|
10
|
+
* @packageDocumentation
|
|
11
|
+
*/
|
|
12
|
+
// ---------------------------------------------------------------------------
|
|
13
|
+
// Constants
|
|
14
|
+
// ---------------------------------------------------------------------------
|
|
15
|
+
/**
|
|
16
|
+
* Default estimated pixel heights per block type.
|
|
17
|
+
*
|
|
18
|
+
* Used when no measured height is available for a block.
|
|
19
|
+
* Override via {@link SpatialIndexConfig.blockTypeHeights}.
|
|
20
|
+
*
|
|
21
|
+
* @example
|
|
22
|
+
* ```ts
|
|
23
|
+
* // Use defaults with a custom "callout" override
|
|
24
|
+
* createSpatialIndex(doc, {
|
|
25
|
+
* blockTypeHeights: { ...DEFAULT_BLOCK_TYPE_HEIGHTS, callout: 64 },
|
|
26
|
+
* });
|
|
27
|
+
* ```
|
|
28
|
+
*/
|
|
29
|
+
export const DEFAULT_BLOCK_TYPE_HEIGHTS = {
|
|
30
|
+
text: 24,
|
|
31
|
+
heading: 40,
|
|
32
|
+
code_block: 48,
|
|
33
|
+
blockquote: 32,
|
|
34
|
+
hr: 16,
|
|
35
|
+
image: 200,
|
|
36
|
+
embed: 300,
|
|
37
|
+
};
|
|
38
|
+
// ---------------------------------------------------------------------------
|
|
39
|
+
// Helpers
|
|
40
|
+
// ---------------------------------------------------------------------------
|
|
41
|
+
/**
|
|
42
|
+
* Estimate the pixel height of a block based on its type.
|
|
43
|
+
*/
|
|
44
|
+
function estimateHeight(blockType, mergedHeights, fallback) {
|
|
45
|
+
const h = mergedHeights[blockType];
|
|
46
|
+
return h !== undefined ? h : fallback;
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* Rebuild prefix sums starting from `fromIndex`. Mutates `prefixSums` in place.
|
|
50
|
+
*/
|
|
51
|
+
function rebuildPrefixSums(heights, prefixSums, fromIndex) {
|
|
52
|
+
const n = heights.length;
|
|
53
|
+
for (let i = fromIndex; i < n; i++) {
|
|
54
|
+
prefixSums[i] = i === 0 ? 0 : prefixSums[i - 1] + heights[i - 1];
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* Validate that `index` is in `[0, count)`.
|
|
59
|
+
*/
|
|
60
|
+
function assertValidIndex(index, count) {
|
|
61
|
+
if (index < 0 || index >= count) {
|
|
62
|
+
throw new RangeError(`Block index ${index} out of range [0, ${count})`);
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
// ---------------------------------------------------------------------------
|
|
66
|
+
// Factory
|
|
67
|
+
// ---------------------------------------------------------------------------
|
|
68
|
+
/**
|
|
69
|
+
* Create a spatial index for viewport virtualization.
|
|
70
|
+
*
|
|
71
|
+
* Builds a prefix-sum array of estimated block heights in O(n). Subsequent
|
|
72
|
+
* `blockTop()` calls are O(1) and `computeVisibleRange()` calls are O(log n).
|
|
73
|
+
*
|
|
74
|
+
* As blocks are rendered and measured, call {@link SpatialIndex.setBlockHeight}
|
|
75
|
+
* or {@link SpatialIndex.setBlockHeights} to replace estimates with actual
|
|
76
|
+
* measured values. When the document structure changes (blocks added, removed,
|
|
77
|
+
* or reordered), call {@link SpatialIndex.rebuild}.
|
|
78
|
+
*
|
|
79
|
+
* @param doc - The RTIF document to index
|
|
80
|
+
* @param config - Optional configuration for height estimates
|
|
81
|
+
* @returns A new {@link SpatialIndex} instance
|
|
82
|
+
*
|
|
83
|
+
* @example
|
|
84
|
+
* ```ts
|
|
85
|
+
* import { createSpatialIndex } from '@rtif-sdk/web';
|
|
86
|
+
*
|
|
87
|
+
* const spatial = createSpatialIndex(doc);
|
|
88
|
+
* console.log(spatial.totalHeight()); // e.g. 2400
|
|
89
|
+
* console.log(spatial.blockTop(5)); // e.g. 120
|
|
90
|
+
*
|
|
91
|
+
* const { start, end } = spatial.computeVisibleRange(100, 600, 2);
|
|
92
|
+
* for (let i = start; i < end; i++) {
|
|
93
|
+
* renderBlock(doc.blocks[i]);
|
|
94
|
+
* }
|
|
95
|
+
*
|
|
96
|
+
* // After measuring a block's actual height:
|
|
97
|
+
* spatial.setBlockHeight(5, 36);
|
|
98
|
+
* ```
|
|
99
|
+
*/
|
|
100
|
+
export function createSpatialIndex(doc, config) {
|
|
101
|
+
const fallbackHeight = config?.estimatedBlockHeight ?? 24;
|
|
102
|
+
const mergedHeights = {
|
|
103
|
+
...DEFAULT_BLOCK_TYPE_HEIGHTS,
|
|
104
|
+
...config?.blockTypeHeights,
|
|
105
|
+
};
|
|
106
|
+
// Mutable arrays — rebuilt on structural changes, updated on height changes
|
|
107
|
+
let heights = [];
|
|
108
|
+
let prefixSums = [];
|
|
109
|
+
let count = 0;
|
|
110
|
+
/**
|
|
111
|
+
* Build the arrays from a document, optionally preserving measured heights.
|
|
112
|
+
*/
|
|
113
|
+
function buildFromDoc(d, preserveHeights) {
|
|
114
|
+
const n = d.blocks.length;
|
|
115
|
+
heights = new Array(n);
|
|
116
|
+
prefixSums = new Array(n);
|
|
117
|
+
count = n;
|
|
118
|
+
for (let i = 0; i < n; i++) {
|
|
119
|
+
const block = d.blocks[i];
|
|
120
|
+
const preserved = preserveHeights?.get(block.id);
|
|
121
|
+
heights[i] =
|
|
122
|
+
preserved !== undefined
|
|
123
|
+
? preserved
|
|
124
|
+
: estimateHeight(block.type, mergedHeights, fallbackHeight);
|
|
125
|
+
}
|
|
126
|
+
rebuildPrefixSums(heights, prefixSums, 0);
|
|
127
|
+
}
|
|
128
|
+
// Initial build
|
|
129
|
+
buildFromDoc(doc);
|
|
130
|
+
const index = {
|
|
131
|
+
totalHeight() {
|
|
132
|
+
if (count === 0)
|
|
133
|
+
return 0;
|
|
134
|
+
return prefixSums[count - 1] + heights[count - 1];
|
|
135
|
+
},
|
|
136
|
+
blockCount() {
|
|
137
|
+
return count;
|
|
138
|
+
},
|
|
139
|
+
blockHeight(blockIndex) {
|
|
140
|
+
assertValidIndex(blockIndex, count);
|
|
141
|
+
return heights[blockIndex];
|
|
142
|
+
},
|
|
143
|
+
blockTop(blockIndex) {
|
|
144
|
+
assertValidIndex(blockIndex, count);
|
|
145
|
+
return prefixSums[blockIndex];
|
|
146
|
+
},
|
|
147
|
+
computeVisibleRange(scrollTop, viewportHeight, buffer) {
|
|
148
|
+
if (count === 0) {
|
|
149
|
+
return { start: 0, end: 0 };
|
|
150
|
+
}
|
|
151
|
+
// Clamp scrollTop to valid range
|
|
152
|
+
const total = index.totalHeight();
|
|
153
|
+
const clampedScrollTop = Math.max(0, Math.min(scrollTop, total));
|
|
154
|
+
const clampedViewportHeight = Math.max(0, viewportHeight);
|
|
155
|
+
const clampedBuffer = Math.max(0, Math.floor(buffer));
|
|
156
|
+
// Binary search for first block whose bottom edge > clampedScrollTop.
|
|
157
|
+
// A block's bottom edge = prefixSums[i] + heights[i].
|
|
158
|
+
// We want the smallest i such that prefixSums[i] + heights[i] > clampedScrollTop.
|
|
159
|
+
let lo = 0;
|
|
160
|
+
let hi = count - 1;
|
|
161
|
+
while (lo < hi) {
|
|
162
|
+
const mid = (lo + hi) >>> 1;
|
|
163
|
+
const bottomEdge = prefixSums[mid] + heights[mid];
|
|
164
|
+
if (bottomEdge <= clampedScrollTop) {
|
|
165
|
+
lo = mid + 1;
|
|
166
|
+
}
|
|
167
|
+
else {
|
|
168
|
+
hi = mid;
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
const firstVisible = lo;
|
|
172
|
+
// Linear scan forward to find last block within viewport.
|
|
173
|
+
// A block is visible if its top edge < clampedScrollTop + clampedViewportHeight.
|
|
174
|
+
const viewportBottom = clampedScrollTop + clampedViewportHeight;
|
|
175
|
+
let lastVisible = firstVisible;
|
|
176
|
+
for (let i = firstVisible; i < count; i++) {
|
|
177
|
+
if (prefixSums[i] >= viewportBottom) {
|
|
178
|
+
break;
|
|
179
|
+
}
|
|
180
|
+
lastVisible = i;
|
|
181
|
+
}
|
|
182
|
+
// Apply buffer, clamped to valid range
|
|
183
|
+
const start = Math.max(0, firstVisible - clampedBuffer);
|
|
184
|
+
const end = Math.min(count, lastVisible + 1 + clampedBuffer);
|
|
185
|
+
return { start, end };
|
|
186
|
+
},
|
|
187
|
+
setBlockHeight(blockIndex, height) {
|
|
188
|
+
assertValidIndex(blockIndex, count);
|
|
189
|
+
heights[blockIndex] = height;
|
|
190
|
+
rebuildPrefixSums(heights, prefixSums, blockIndex);
|
|
191
|
+
},
|
|
192
|
+
setBlockHeights(updates) {
|
|
193
|
+
if (updates.length === 0)
|
|
194
|
+
return;
|
|
195
|
+
let minIndex = count;
|
|
196
|
+
for (const { index: idx, height } of updates) {
|
|
197
|
+
assertValidIndex(idx, count);
|
|
198
|
+
heights[idx] = height;
|
|
199
|
+
if (idx < minIndex) {
|
|
200
|
+
minIndex = idx;
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
rebuildPrefixSums(heights, prefixSums, minIndex);
|
|
204
|
+
},
|
|
205
|
+
rebuild(d, preserveHeights) {
|
|
206
|
+
buildFromDoc(d, preserveHeights);
|
|
207
|
+
},
|
|
208
|
+
};
|
|
209
|
+
return index;
|
|
210
|
+
}
|
|
211
|
+
//# sourceMappingURL=spatial-index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"spatial-index.js","sourceRoot":"","sources":["../src/spatial-index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAIH,8EAA8E;AAC9E,YAAY;AACZ,8EAA8E;AAE9E;;;;;;;;;;;;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IAAI,OAAO,EAAE,CAAC;gBAC7C,gBAAgB,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC;gBAC7B,OAAO,CAAC,GAAG,CAAC,GAAG,MAAM,CAAC;gBACtB,IAAI,GAAG,GAAG,QAAQ,EAAE,CAAC;oBACnB,QAAQ,GAAG,GAAG,CAAC;gBACjB,CAAC;YACH,CAAC;YAED,iBAAiB,CAAC,OAAO,EAAE,UAAU,EAAE,QAAQ,CAAC,CAAC;QACnD,CAAC;QAED,OAAO,CAAC,CAAW,EAAE,eAAqC;YACxD,YAAY,CAAC,CAAC,EAAE,eAAe,CAAC,CAAC;QACnC,CAAC;KACF,CAAC;IAEF,OAAO,KAAK,CAAC;AACf,CAAC"}
|
package/dist/types.d.ts
CHANGED
|
@@ -49,6 +49,19 @@ export interface WebEditorConfig {
|
|
|
49
49
|
* Default: `true`.
|
|
50
50
|
*/
|
|
51
51
|
readonly linkPopover?: boolean;
|
|
52
|
+
/**
|
|
53
|
+
* Register the built-in HTML paste handler (`@rtif-sdk/format-html`).
|
|
54
|
+
*
|
|
55
|
+
* When `true` (default), pasted HTML is deserialized into RTIF blocks
|
|
56
|
+
* preserving formatting. The handler is loaded lazily via dynamic
|
|
57
|
+
* `import()` so the `format-html` module is only bundled when used.
|
|
58
|
+
*
|
|
59
|
+
* Set to `false` to omit HTML paste support entirely (saves ~4.8 KB
|
|
60
|
+
* minified / ~1.5 KB gzipped).
|
|
61
|
+
*
|
|
62
|
+
* Default: `true`.
|
|
63
|
+
*/
|
|
64
|
+
readonly htmlPaste?: boolean;
|
|
52
65
|
/**
|
|
53
66
|
* Custom web plugins to install.
|
|
54
67
|
*
|
|
@@ -82,6 +95,70 @@ export interface WebEditorConfig {
|
|
|
82
95
|
* Default: `false` (no instrumentation overhead).
|
|
83
96
|
*/
|
|
84
97
|
readonly perf?: boolean | import('./perf.js').PerfObserver;
|
|
98
|
+
/**
|
|
99
|
+
* Enable block-level viewport virtualization for large documents.
|
|
100
|
+
*
|
|
101
|
+
* When enabled, only blocks visible in the viewport (plus a configurable
|
|
102
|
+
* buffer) are rendered to the DOM. Spacer elements maintain correct scroll
|
|
103
|
+
* height. Activates automatically when the document exceeds the
|
|
104
|
+
* `threshold` block count.
|
|
105
|
+
*
|
|
106
|
+
* - `true` or omitted — activate with default settings (threshold 100)
|
|
107
|
+
* - `false` — disable (render all blocks always)
|
|
108
|
+
* - `VirtualizationConfig` object — activate with custom settings
|
|
109
|
+
*
|
|
110
|
+
* Default: `true` (active when document exceeds threshold).
|
|
111
|
+
*
|
|
112
|
+
* @example
|
|
113
|
+
* ```ts
|
|
114
|
+
* createWebEditor({
|
|
115
|
+
* ...,
|
|
116
|
+
* virtualize: { threshold: 50, bufferSize: 20 },
|
|
117
|
+
* });
|
|
118
|
+
* ```
|
|
119
|
+
*/
|
|
120
|
+
readonly virtualize?: boolean | VirtualizationConfig;
|
|
121
|
+
}
|
|
122
|
+
/**
|
|
123
|
+
* Configuration for block-level viewport virtualization.
|
|
124
|
+
*
|
|
125
|
+
* @example
|
|
126
|
+
* ```ts
|
|
127
|
+
* const config: VirtualizationConfig = {
|
|
128
|
+
* threshold: 100,
|
|
129
|
+
* bufferSize: 15,
|
|
130
|
+
* estimatedBlockHeight: 28,
|
|
131
|
+
* };
|
|
132
|
+
* ```
|
|
133
|
+
*/
|
|
134
|
+
export interface VirtualizationConfig {
|
|
135
|
+
/**
|
|
136
|
+
* Minimum block count to activate virtualization.
|
|
137
|
+
* Documents with fewer blocks render all blocks to the DOM.
|
|
138
|
+
* Default: `100`.
|
|
139
|
+
*/
|
|
140
|
+
readonly threshold?: number;
|
|
141
|
+
/**
|
|
142
|
+
* Number of extra blocks to render above and below the visible range.
|
|
143
|
+
* Higher values reduce flashing at the cost of more DOM nodes.
|
|
144
|
+
* Default: `10`.
|
|
145
|
+
*/
|
|
146
|
+
readonly bufferSize?: number;
|
|
147
|
+
/**
|
|
148
|
+
* Default estimated pixel height for unknown block types.
|
|
149
|
+
* Default: `24`.
|
|
150
|
+
*/
|
|
151
|
+
readonly estimatedBlockHeight?: number;
|
|
152
|
+
/**
|
|
153
|
+
* Estimated pixel heights per block type.
|
|
154
|
+
* Block types not listed here use `estimatedBlockHeight`.
|
|
155
|
+
*/
|
|
156
|
+
readonly blockTypeHeights?: Readonly<Record<string, number>>;
|
|
157
|
+
/**
|
|
158
|
+
* The scrollable ancestor element, or `window`.
|
|
159
|
+
* When omitted, the nearest scrollable ancestor is auto-detected.
|
|
160
|
+
*/
|
|
161
|
+
readonly scrollContainer?: HTMLElement | Window;
|
|
85
162
|
}
|
|
86
163
|
/**
|
|
87
164
|
* The web editor instance returned by `createWebEditor`.
|
|
@@ -116,6 +193,11 @@ export interface WebEditor {
|
|
|
116
193
|
readonly linkPopover: import('./link-popover.js').LinkPopoverHandle | null;
|
|
117
194
|
/** Performance instrumentation handle, or null if perf is not enabled. */
|
|
118
195
|
readonly perf: import('./perf.js').PerfInstrumentation | null;
|
|
196
|
+
/**
|
|
197
|
+
* Virtual viewport handle, or null if virtualization is not active.
|
|
198
|
+
* Only present when the document exceeds the virtualization threshold.
|
|
199
|
+
*/
|
|
200
|
+
readonly viewport: import('./virtual-viewport.js').VirtualViewport | null;
|
|
119
201
|
/**
|
|
120
202
|
* Focus the editor's contenteditable element.
|
|
121
203
|
* If the editor was destroyed, this is a no-op.
|
package/dist/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAEtD;;;;;;;;;;;;GAYG;AACH,MAAM,WAAW,eAAe;IAC9B,gEAAgE;IAChE,QAAQ,CAAC,IAAI,EAAE,WAAW,CAAC;IAE3B;;;OAGG;IACH,QAAQ,CAAC,MAAM,EAAE,aAAa,CAAC;IAE/B,6DAA6D;IAC7D,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC;IAE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