oasis-editor 0.0.63 → 0.0.65
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/{OasisEditorApp-BG3tA5Y-.js → OasisEditorApp-Bp4TNPC7.js} +1 -1
- package/dist/{index-BNRIgieX.js → index-DhCqxHGZ.js} +709 -668
- package/dist/layoutProjection/paginationTrack.d.ts +47 -0
- package/dist/layoutProjection/paragraphBlockPagination.d.ts +9 -0
- package/dist/layoutProjection/tableBlockPagination.d.ts +9 -0
- package/dist/oasis-editor.js +1 -1
- package/dist/oasis-editor.umd.cjs +4 -4
- package/package.json +1 -1
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { EditorLayoutBlock, EditorLayoutPage, EditorLayoutParagraph, EditorNamedStyle, EditorPageSettings } from '../core/model.js';
|
|
2
|
+
import { ITextMeasurer } from '../core/engine.js';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Resolved per-run inputs shared by the paragraph and table block handlers.
|
|
6
|
+
* Extracted from projectColumnTrackLayout so each handler takes a small bag
|
|
7
|
+
* instead of the full {@link ProjectBlocksLayoutContext} (S2).
|
|
8
|
+
*/
|
|
9
|
+
export interface TrackLayoutParams {
|
|
10
|
+
pageSettings: EditorPageSettings;
|
|
11
|
+
contentWidth: number;
|
|
12
|
+
measurer: ITextMeasurer;
|
|
13
|
+
styles?: Record<string, EditorNamedStyle>;
|
|
14
|
+
totalPages?: number;
|
|
15
|
+
defaultTabStop?: number;
|
|
16
|
+
measuredHeights?: Record<string, number>;
|
|
17
|
+
measuredParagraphLayouts?: Record<string, EditorLayoutParagraph>;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Mutable cursor for laying blocks into a vertical sequence of "tracks" (one
|
|
21
|
+
* physical page in single-column mode, one column in multi-column mode). Owns
|
|
22
|
+
* the accumulating page list, the current track's blocks/height, and the
|
|
23
|
+
* page-index / max-height / flush bookkeeping the block handlers share.
|
|
24
|
+
*
|
|
25
|
+
* Extracted from blocksPagination.ts so the paragraph and table pagination
|
|
26
|
+
* loops mutate a single explicit object rather than a web of closures (S2).
|
|
27
|
+
*/
|
|
28
|
+
export declare class PaginationTrack {
|
|
29
|
+
private readonly pageOffset;
|
|
30
|
+
private readonly maxPageHeight;
|
|
31
|
+
private readonly reservedHeightByPageIndex;
|
|
32
|
+
private readonly pageSettings;
|
|
33
|
+
readonly pages: EditorLayoutPage[];
|
|
34
|
+
blocks: EditorLayoutBlock[];
|
|
35
|
+
height: number;
|
|
36
|
+
constructor(pageOffset: number, maxPageHeight: number, reservedHeightByPageIndex: Map<number, number> | undefined, pageSettings: EditorPageSettings, existingPages: EditorLayoutPage[]);
|
|
37
|
+
/** Index of the track currently being filled. */
|
|
38
|
+
get pageIndex(): number;
|
|
39
|
+
/** Usable height of a given page, net of any reserved (e.g. footnote) space. */
|
|
40
|
+
maxHeightForPage(pageIndex: number): number;
|
|
41
|
+
/** Usable height of the track currently being filled. */
|
|
42
|
+
get currentMaxHeight(): number;
|
|
43
|
+
/** Seals the current track into a page and starts a fresh, empty track. */
|
|
44
|
+
flush(): void;
|
|
45
|
+
/** Flushes the trailing track and guarantees at least one page exists. */
|
|
46
|
+
finalize(): EditorLayoutPage[];
|
|
47
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { EditorBlockNode, EditorParagraphNode } from '../core/model.js';
|
|
2
|
+
import { PaginationTrack, TrackLayoutParams } from './paginationTrack.js';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Lays a single paragraph block into the track, splitting it across page
|
|
6
|
+
* breaks as needed (keep-lines-together, keep-with-next, widow/orphan control
|
|
7
|
+
* and contextual-spacing collapse). Extracted from projectColumnTrackLayout.
|
|
8
|
+
*/
|
|
9
|
+
export declare function paginateParagraphBlock(track: PaginationTrack, params: TrackLayoutParams, sourceBlock: EditorParagraphNode, nextBlock: EditorBlockNode | undefined, index: number): void;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { EditorTableNode } from '../core/model.js';
|
|
2
|
+
import { PaginationTrack, TrackLayoutParams } from './paginationTrack.js';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Lays a single table block into the track, splitting it across page breaks by
|
|
6
|
+
* row groups and, where a row is splittable, by cell-block positions within a
|
|
7
|
+
* row (with repeated header rows). Extracted from projectColumnTrackLayout.
|
|
8
|
+
*/
|
|
9
|
+
export declare function paginateTableBlock(track: PaginationTrack, params: TrackLayoutParams, sourceBlock: EditorTableNode, index: number): void;
|
package/dist/oasis-editor.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { b2, bV, bW, bX, bY, bZ, bk, b_, b3, a_, b$, c0, c1, b1, c2, aY, c3, c4, c5, c6, c7, bQ, c8, c9, ca, cb, cc, cd, ce, cf, cg, ch, ci, bp, cj, bP, ck, bX as bX2, c0 as c02, c2 as c22, cb as cb2, cd as cd2, ci as ci2, cl, b0, aX, cm, cn, co, aZ, cp, cq, a$ } from "./index-
|
|
1
|
+
import { b2, bV, bW, bX, bY, bZ, bk, b_, b3, a_, b$, c0, c1, b1, c2, aY, c3, c4, c5, c6, c7, bQ, c8, c9, ca, cb, cc, cd, ce, cf, cg, ch, ci, bp, cj, bP, ck, bX as bX2, c0 as c02, c2 as c22, cb as cb2, cd as cd2, ci as ci2, cl, b0, aX, cm, cn, co, aZ, cp, cq, a$ } from "./index-DhCqxHGZ.js";
|
|
2
2
|
export {
|
|
3
3
|
b2 as BalloonShell,
|
|
4
4
|
bV as Button,
|