oasis-editor 0.0.111 → 0.0.113
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-MEaOb4ut.js → OasisEditorApp-BKPrQtm5.js} +429 -750
- package/dist/app/controllers/tableOpsMutationCommands.d.ts +8 -1
- package/dist/assets/{importDocxWorker-DyYGjoXG.js → importDocxWorker-Bz2kZOBO.js} +1 -1
- package/dist/core/docxTableMaps.d.ts +11 -0
- package/dist/core/editorState.d.ts +5 -14
- package/dist/{index-mocSBySQ.js → index-DSDwe-yy.js} +526 -475
- package/dist/layoutProjection/paginationSegmentEngine.d.ts +40 -0
- package/dist/oasis-editor.js +51 -51
- package/dist/oasis-editor.umd.cjs +4 -4
- package/dist/ui/canvas/canvasFontResolution.d.ts +19 -0
- package/dist/ui/canvas/canvasParagraphPainter.d.ts +1 -1
- package/dist/ui/components/Dialogs/DialogFooter.d.ts +12 -0
- package/dist/ui/components/Dialogs/TextInputDialog.d.ts +16 -0
- package/package.json +1 -1
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { EditorLayoutBlock } from '../core/model.js';
|
|
2
|
+
import { PaginationTrack } from './paginationTrack.js';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Strategy interface for the generic "fit → push → flush" pagination engine.
|
|
6
|
+
* Callers implement the domain-specific measurement and split decisions; the
|
|
7
|
+
* engine owns the outer loop, segmentId generation, and track mutation.
|
|
8
|
+
*/
|
|
9
|
+
export interface PaginationSegmenter {
|
|
10
|
+
/** True while there is more content left to place. */
|
|
11
|
+
hasMore(): boolean;
|
|
12
|
+
/**
|
|
13
|
+
* Try to fit as much content as possible into `remaining` px on the current
|
|
14
|
+
* page. Must advance the internal cursor on success so that `hasMore()`
|
|
15
|
+
* reflects the new position. Returns `null` when nothing fits at all.
|
|
16
|
+
*/
|
|
17
|
+
fit(segmentId: string, remaining: number): EditorLayoutBlock | null;
|
|
18
|
+
/**
|
|
19
|
+
* Force at least one content unit onto the current page regardless of height.
|
|
20
|
+
* Called only when `fit` returned `null` and `track.blocks` is empty (i.e.
|
|
21
|
+
* there is no prior content to push to a previous page first). Must advance
|
|
22
|
+
* the internal cursor.
|
|
23
|
+
*/
|
|
24
|
+
force?(segmentId: string): EditorLayoutBlock;
|
|
25
|
+
/** Called just before `track.flush()` so the segmenter can undo side-effects. */
|
|
26
|
+
onBeforeFlush?(): void;
|
|
27
|
+
/**
|
|
28
|
+
* Called just after the block has been pushed to `track.blocks` and
|
|
29
|
+
* `track.height` has been updated.
|
|
30
|
+
*/
|
|
31
|
+
onAfterPush?(block: EditorLayoutBlock, segmentIndex: number): void;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Generic "fit segment → push layout block → advance cursor → flush" loop
|
|
35
|
+
* shared by paragraph and table pagination. Both callers supply the
|
|
36
|
+
* domain-specific fitting and split logic via {@link PaginationSegmenter}.
|
|
37
|
+
*
|
|
38
|
+
* Generates `${sourceId}:segment:N` as the `blockId` for each segment.
|
|
39
|
+
*/
|
|
40
|
+
export declare function paginateSegments(track: PaginationTrack, sourceId: string, segmenter: PaginationSegmenter): void;
|
package/dist/oasis-editor.js
CHANGED
|
@@ -1,57 +1,57 @@
|
|
|
1
|
-
import { a4,
|
|
1
|
+
import { a4, ct, cu, cv, cw, cx, ao, cy, a5, cc, cz, cA, cB, a3, cC, ca, cD, cE, cF, cG, cH, co, cI, cJ, cK, cL, cM, cN, cO, cP, cQ, cR, cS, cT, as, cU, cn, cV, cv as cv2, cA as cA2, cC as cC2, cL as cL2, cN as cN2, cS as cS2, cW, ce, c9, cX, cY, cZ, cb, c_, c$, cd } from "./index-DSDwe-yy.js";
|
|
2
2
|
export {
|
|
3
3
|
a4 as BalloonShell,
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
4
|
+
ct as Button,
|
|
5
|
+
cu as Checkbox,
|
|
6
|
+
cv as ColorPicker,
|
|
7
|
+
cw as CommandRegistry,
|
|
8
|
+
cx as DEFAULT_PALETTE,
|
|
9
|
+
ao as Dialog,
|
|
10
|
+
cy as DialogFooter,
|
|
11
11
|
a5 as DocumentShell,
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
12
|
+
cc as Editor,
|
|
13
|
+
cz as FloatingActionButton,
|
|
14
|
+
cA as GridPicker,
|
|
15
|
+
cB as IconButton,
|
|
16
16
|
a3 as InlineShell,
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
17
|
+
cC as Menu,
|
|
18
|
+
ca as MenuRegistry,
|
|
19
|
+
cD as OASIS_BUILTIN_COMMANDS,
|
|
20
|
+
cE as OASIS_MENU_ITEMS,
|
|
21
|
+
cF as OASIS_TOOLBAR_ITEMS,
|
|
22
|
+
cG as OasisEditorAppLazy,
|
|
23
|
+
cH as OasisEditorContainer,
|
|
24
|
+
co as OasisEditorLoading,
|
|
25
|
+
cI as PluginCollection,
|
|
26
|
+
cJ as Popover,
|
|
27
|
+
cK as RIBBON_TABS,
|
|
28
|
+
cL as Select,
|
|
29
|
+
cM as SelectField,
|
|
30
|
+
cN as Separator,
|
|
31
|
+
cO as SidePanel,
|
|
32
|
+
cP as SidePanelBody,
|
|
33
|
+
cQ as SidePanelFooter,
|
|
34
|
+
cR as SidePanelHeader,
|
|
35
|
+
cS as SplitButton,
|
|
36
|
+
cT as StyleGallery,
|
|
37
37
|
as as Tabs,
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
38
|
+
cU as TextField,
|
|
39
|
+
cn as Toolbar,
|
|
40
|
+
cV as ToolbarButton,
|
|
41
|
+
cv2 as ToolbarColorPicker,
|
|
42
|
+
cA2 as ToolbarGridPicker,
|
|
43
|
+
cC2 as ToolbarMenu,
|
|
44
|
+
cL2 as ToolbarSelect,
|
|
45
|
+
cN2 as ToolbarSeparator,
|
|
46
|
+
cS2 as ToolbarSplitButton,
|
|
47
|
+
cW as buildRibbonTabDefinitions,
|
|
48
|
+
ce as commandRefName,
|
|
49
|
+
c9 as createDefaultToolbarPreset,
|
|
50
|
+
cX as createEditorCommandBus,
|
|
51
|
+
cY as createOasisEditor,
|
|
52
|
+
cZ as createOasisEditorContainer,
|
|
53
|
+
cb as createToolbarRegistry,
|
|
54
|
+
c_ as mount,
|
|
55
|
+
c$ as registerToolbarRenderer,
|
|
56
|
+
cd as resolveCommandRef
|
|
57
57
|
};
|