oasis-editor 0.0.88 → 0.0.89
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-Bx4I4GCm.js → OasisEditorApp-cKm4OFIF.js} +1325 -171
- package/dist/assets/{importDocxWorker-BcELKms0.js → importDocxWorker-DVDyiqYf.js} +1 -1
- package/dist/core/commands/table/tableCommandUtils.d.ts +2 -1
- package/dist/core/commands/table/tableFloatingCommands.d.ts +5 -0
- package/dist/core/commands/table.d.ts +1 -0
- package/dist/core/model/index.d.ts +2 -2
- package/dist/core/model/types/layout.d.ts +4 -0
- package/dist/core/model/types/nodes.d.ts +23 -7
- package/dist/core/model/types/primitives.d.ts +17 -0
- package/dist/core/model/types/styles.d.ts +43 -6
- package/dist/core/model.d.ts +1 -0
- package/dist/core/tableStyleResolver.d.ts +20 -0
- package/dist/export/docx/tableXml.d.ts +1 -0
- package/dist/export/pdf/draw/drawFragment.d.ts +13 -1
- package/dist/export/pdf/draw/drawTextBoxShape.d.ts +1 -0
- package/dist/i18n/locales/en.d.ts +18 -0
- package/dist/i18n/locales/pt-BR.d.ts +18 -0
- package/dist/import/docx/tableProperties.d.ts +2 -1
- package/dist/import/docx/tables.d.ts +1 -1
- package/dist/{index-Ds5uOUe8.js → index-BICQTKCZ.js} +1401 -850
- package/dist/layoutProjection/floatingObjects.d.ts +15 -1
- package/dist/layoutProjection/paginationTrack.d.ts +2 -0
- package/dist/layoutProjection/paragraphPagination.d.ts +2 -2
- package/dist/oasis-editor.js +50 -50
- package/dist/oasis-editor.umd.cjs +4 -4
- package/dist/ui/canvas/CanvasLayoutSnapshot.d.ts +1 -1
- package/dist/ui/canvas/CanvasTableLayout.d.ts +7 -1
- package/dist/ui/canvas/canvasBorders.d.ts +2 -0
- package/dist/ui/canvas/canvasSnapshotTypes.d.ts +12 -0
- package/dist/ui/components/Dialogs/TablePropertiesDialog.d.ts +22 -1
- package/dist/ui/editorUiTypes.d.ts +1 -1
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { EditorImageFloatingLayout, EditorImageRunData, EditorLayoutFragment, EditorLayoutLine, EditorPageSettings, EditorTextBoxData } from '../core/model.js';
|
|
1
|
+
import { EditorImageFloatingLayout, EditorImageRunData, EditorLayoutFragment, EditorLayoutLine, EditorPageSettings, EditorTextBoxData, EditorTableFloatingLayout } from '../core/model.js';
|
|
2
2
|
|
|
3
3
|
export interface FloatingObjectRect {
|
|
4
4
|
x: number;
|
|
@@ -23,6 +23,20 @@ export interface FloatingObjectGeometry {
|
|
|
23
23
|
height: number;
|
|
24
24
|
floating: EditorImageFloatingLayout;
|
|
25
25
|
}
|
|
26
|
+
/** Resolves typed `w:tblpPr` positioning into the same page-space rectangle
|
|
27
|
+
* consumed by floating images and text boxes. Table values are stored in
|
|
28
|
+
* points; DrawingML values remain EMUs at their adapter boundary. */
|
|
29
|
+
export declare function resolveFloatingTableRect(options: {
|
|
30
|
+
floating: EditorTableFloatingLayout;
|
|
31
|
+
pageSettings: EditorPageSettings;
|
|
32
|
+
contentLeft: number;
|
|
33
|
+
contentTop: number;
|
|
34
|
+
contentWidth: number;
|
|
35
|
+
anchorTop: number;
|
|
36
|
+
width: number;
|
|
37
|
+
height: number;
|
|
38
|
+
pageIndex: number;
|
|
39
|
+
}): FloatingObjectRect;
|
|
26
40
|
export type ResolveTextBoxHeight = (textBox: EditorTextBoxData) => number;
|
|
27
41
|
export declare function getTextBoxFloatingGeometry(textBox: EditorTextBoxData, heightOverride?: number): FloatingObjectGeometry;
|
|
28
42
|
export declare function getImageFloatingGeometry(image: EditorImageRunData): FloatingObjectGeometry;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { EditorLayoutBlock, EditorLayoutPage, EditorLayoutParagraph, EditorNamedStyle, EditorPageSettings } from '../core/model.js';
|
|
2
2
|
import { ITextMeasurer } from '../core/engine.js';
|
|
3
|
+
import { FloatingExclusionRect } from './floatingObjects.js';
|
|
3
4
|
|
|
4
5
|
/**
|
|
5
6
|
* Resolved per-run inputs shared by the paragraph and table block handlers.
|
|
@@ -33,6 +34,7 @@ export declare class PaginationTrack {
|
|
|
33
34
|
readonly pages: EditorLayoutPage[];
|
|
34
35
|
blocks: EditorLayoutBlock[];
|
|
35
36
|
height: number;
|
|
37
|
+
floatingExclusions: FloatingExclusionRect[];
|
|
36
38
|
constructor(pageOffset: number, maxPageHeight: number, reservedHeightByPageIndex: Map<number, number> | undefined, pageSettings: EditorPageSettings, existingPages: EditorLayoutPage[]);
|
|
37
39
|
/** Index of the track currently being filled. */
|
|
38
40
|
get pageIndex(): number;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { EditorLayoutLine, EditorLayoutParagraph, EditorNamedStyle, EditorPageSettings, EditorParagraphNode, EditorParagraphStyle } from '../core/model.js';
|
|
2
2
|
import { CharRect } from '../ui/caretGeometry.js';
|
|
3
3
|
import { ITextMeasurer } from '../core/engine.js';
|
|
4
|
-
import { ResolveTextBoxHeight } from './floatingObjects.js';
|
|
4
|
+
import { FloatingExclusionRect, ResolveTextBoxHeight } from './floatingObjects.js';
|
|
5
5
|
|
|
6
6
|
export declare function shouldCollapseContextualSpacing(previous: EditorParagraphNode | undefined, next: EditorParagraphNode | undefined, styles: Record<string, EditorNamedStyle> | undefined): boolean;
|
|
7
7
|
export declare function clearProjectedParagraphLayoutCache(): void;
|
|
8
8
|
export declare function projectParagraphLayout(paragraph: EditorParagraphNode, pageIndex?: number, totalPages?: number, styles?: Record<string, EditorNamedStyle>, contentWidth?: number, measurer?: ITextMeasurer, defaultTabStop?: number): EditorLayoutParagraph;
|
|
9
|
-
export declare function projectParagraphLayoutWithExclusions(paragraph: EditorParagraphNode, pageSettings: EditorPageSettings | undefined, contentWidth: number | undefined, measurer?: ITextMeasurer, pageIndex?: number, totalPages?: number, styles?: Record<string, EditorNamedStyle>, defaultTabStop?: number, resolveTextBoxHeight?: ResolveTextBoxHeight): EditorLayoutParagraph;
|
|
9
|
+
export declare function projectParagraphLayoutWithExclusions(paragraph: EditorParagraphNode, pageSettings: EditorPageSettings | undefined, contentWidth: number | undefined, measurer?: ITextMeasurer, pageIndex?: number, totalPages?: number, styles?: Record<string, EditorNamedStyle>, defaultTabStop?: number, resolveTextBoxHeight?: ResolveTextBoxHeight, externalExclusions?: FloatingExclusionRect[]): EditorLayoutParagraph;
|
|
10
10
|
export declare function measureParagraphLayoutFromRects(paragraph: EditorParagraphNode, charRects: CharRect[], styles?: Record<string, EditorNamedStyle>): EditorLayoutParagraph;
|
|
11
11
|
export declare function applyMeasuredLineGeometry(projected: EditorLayoutParagraph, measured: EditorLayoutParagraph): EditorLayoutParagraph;
|
|
12
12
|
export declare function isMeasuredLayoutCurrent(projected: EditorLayoutParagraph, measured: EditorLayoutParagraph): boolean;
|
package/dist/oasis-editor.js
CHANGED
|
@@ -1,57 +1,57 @@
|
|
|
1
|
-
import { O,
|
|
1
|
+
import { O, c6, c7, c8, c9, ca, a8, cb, Q, bR, cc, cd, ce, N, cf, bP, cg, ch, ci, cj, ck, c1, cl, cm, cn, co, cp, cq, cr, cs, ct, cu, cv, cw, ad, cx, c0, cy, c8 as c82, cd as cd2, cf as cf2, co as co2, cq as cq2, cv as cv2, cz, bT, bO, cA, cB, cC, bQ, cD, cE, bS } from "./index-BICQTKCZ.js";
|
|
2
2
|
export {
|
|
3
3
|
O as BalloonShell,
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
4
|
+
c6 as Button,
|
|
5
|
+
c7 as Checkbox,
|
|
6
|
+
c8 as ColorPicker,
|
|
7
|
+
c9 as CommandRegistry,
|
|
8
|
+
ca as DEFAULT_PALETTE,
|
|
9
9
|
a8 as Dialog,
|
|
10
|
-
|
|
10
|
+
cb as DialogFooter,
|
|
11
11
|
Q as DocumentShell,
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
12
|
+
bR as Editor,
|
|
13
|
+
cc as FloatingActionButton,
|
|
14
|
+
cd as GridPicker,
|
|
15
|
+
ce as IconButton,
|
|
16
16
|
N as InlineShell,
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
17
|
+
cf as Menu,
|
|
18
|
+
bP as MenuRegistry,
|
|
19
|
+
cg as OASIS_BUILTIN_COMMANDS,
|
|
20
|
+
ch as OASIS_MENU_ITEMS,
|
|
21
|
+
ci as OASIS_TOOLBAR_ITEMS,
|
|
22
|
+
cj as OasisEditorAppLazy,
|
|
23
|
+
ck as OasisEditorContainer,
|
|
24
|
+
c1 as OasisEditorLoading,
|
|
25
|
+
cl as PluginCollection,
|
|
26
|
+
cm as Popover,
|
|
27
|
+
cn as RIBBON_TABS,
|
|
28
|
+
co as Select,
|
|
29
|
+
cp as SelectField,
|
|
30
|
+
cq as Separator,
|
|
31
|
+
cr as SidePanel,
|
|
32
|
+
cs as SidePanelBody,
|
|
33
|
+
ct as SidePanelFooter,
|
|
34
|
+
cu as SidePanelHeader,
|
|
35
|
+
cv as SplitButton,
|
|
36
|
+
cw as StyleGallery,
|
|
37
37
|
ad as Tabs,
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
38
|
+
cx as TextField,
|
|
39
|
+
c0 as Toolbar,
|
|
40
|
+
cy as ToolbarButton,
|
|
41
|
+
c82 as ToolbarColorPicker,
|
|
42
|
+
cd2 as ToolbarGridPicker,
|
|
43
|
+
cf2 as ToolbarMenu,
|
|
44
|
+
co2 as ToolbarSelect,
|
|
45
|
+
cq2 as ToolbarSeparator,
|
|
46
|
+
cv2 as ToolbarSplitButton,
|
|
47
|
+
cz as buildRibbonTabDefinitions,
|
|
48
|
+
bT as commandRefName,
|
|
49
|
+
bO as createDefaultToolbarPreset,
|
|
50
|
+
cA as createEditorCommandBus,
|
|
51
|
+
cB as createOasisEditor,
|
|
52
|
+
cC as createOasisEditorContainer,
|
|
53
|
+
bQ as createToolbarRegistry,
|
|
54
|
+
cD as mount,
|
|
55
|
+
cE as registerToolbarRenderer,
|
|
56
|
+
bS as resolveCommandRef
|
|
57
57
|
};
|