oasis-editor 0.0.122 → 0.0.123
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/ui/app/useEditorUiOptions.d.ts +10 -7
- package/dist/ui/app/useFontDialogBridge.d.ts +5 -4
- package/dist/ui/app/useParagraphDialogBridge.d.ts +6 -5
- package/dist/ui/app/useTablePropertiesDialogBridge.d.ts +6 -5
- package/dist/ui/canvas/CanvasTableLayout.d.ts +2 -10
- package/dist/ui/canvas/canvasPageRenderer.d.ts +8 -7
- package/package.json +1 -1
|
@@ -1,15 +1,13 @@
|
|
|
1
|
+
import { DocumentShell } from '../shells/DocumentShell.js';
|
|
1
2
|
import { InlineShell } from '../shells/InlineShell.js';
|
|
3
|
+
import { BalloonShell } from '../shells/BalloonShell.js';
|
|
2
4
|
import { OasisEditorAppDocumentProps, OasisEditorAppUiProps, OasisEditorLoadingOptions, ToolbarViewMode, ToolbarLayoutMode } from '../OasisEditorAppProps.js';
|
|
3
5
|
|
|
4
6
|
export interface EditorUiOptionsContext {
|
|
5
7
|
ui: () => OasisEditorAppUiProps;
|
|
6
8
|
documentOptions: () => OasisEditorAppDocumentProps;
|
|
7
9
|
}
|
|
8
|
-
|
|
9
|
-
* Resolves the editor's UI/document option accessors, applying defaults in one
|
|
10
|
-
* place so the composition root doesn't carry a dozen `?? default` getters.
|
|
11
|
-
*/
|
|
12
|
-
export declare function createEditorUiOptions(ctx: EditorUiOptionsContext): {
|
|
10
|
+
export interface EditorUiOptions {
|
|
13
11
|
showChrome: () => boolean;
|
|
14
12
|
showTitleBar: () => boolean;
|
|
15
13
|
showMenubar: () => boolean;
|
|
@@ -21,5 +19,10 @@ export declare function createEditorUiOptions(ctx: EditorUiOptionsContext): {
|
|
|
21
19
|
useComposedShell: () => boolean;
|
|
22
20
|
loadingOptions: () => OasisEditorLoadingOptions | undefined;
|
|
23
21
|
loadingLabel: () => string;
|
|
24
|
-
shellComponent: () => typeof InlineShell;
|
|
25
|
-
}
|
|
22
|
+
shellComponent: () => typeof DocumentShell | typeof InlineShell | typeof BalloonShell;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Resolves the editor's UI/document option accessors, applying defaults in one
|
|
26
|
+
* place so the composition root doesn't carry a dozen `?? default` getters.
|
|
27
|
+
*/
|
|
28
|
+
export declare function createEditorUiOptions(ctx: EditorUiOptionsContext): EditorUiOptions;
|
|
@@ -7,6 +7,10 @@ interface FontDialogState {
|
|
|
7
7
|
isOpen: boolean;
|
|
8
8
|
initial: FontDialogInitialValues;
|
|
9
9
|
}
|
|
10
|
+
export interface FontDialogBridge {
|
|
11
|
+
openFontDialog: () => void;
|
|
12
|
+
applyFontDialogValues: (values: FontDialogApplyValues, original: FontDialogInitialValues) => void;
|
|
13
|
+
}
|
|
10
14
|
export interface FontDialogBridgeDeps {
|
|
11
15
|
toolbarStyleState: () => ToolbarStyleState;
|
|
12
16
|
selection: () => EditorSelection;
|
|
@@ -25,8 +29,5 @@ export interface FontDialogBridgeDeps {
|
|
|
25
29
|
}) => void;
|
|
26
30
|
focusInput: () => void;
|
|
27
31
|
}
|
|
28
|
-
export declare function createFontDialogBridge(deps: FontDialogBridgeDeps):
|
|
29
|
-
openFontDialog: () => void;
|
|
30
|
-
applyFontDialogValues: (values: FontDialogApplyValues, original: FontDialogInitialValues) => void;
|
|
31
|
-
};
|
|
32
|
+
export declare function createFontDialogBridge(deps: FontDialogBridgeDeps): FontDialogBridge;
|
|
32
33
|
export {};
|
|
@@ -7,6 +7,11 @@ interface ParagraphDialogState {
|
|
|
7
7
|
isOpen: boolean;
|
|
8
8
|
initial: ParagraphDialogInitialValues;
|
|
9
9
|
}
|
|
10
|
+
export interface ParagraphDialogBridge {
|
|
11
|
+
openParagraphDialog: () => void;
|
|
12
|
+
applyParagraphDialogValues: (values: ParagraphDialogApplyValues, original: ParagraphDialogInitialValues) => void;
|
|
13
|
+
setParagraphDialogDefault: (values: ParagraphDialogApplyValues) => void;
|
|
14
|
+
}
|
|
10
15
|
export interface ParagraphDialogBridgeDeps {
|
|
11
16
|
toolbarStyleState: () => ToolbarStyleState;
|
|
12
17
|
isReadOnly: () => boolean;
|
|
@@ -23,9 +28,5 @@ export interface ParagraphDialogBridgeDeps {
|
|
|
23
28
|
}) => void;
|
|
24
29
|
focusInput: () => void;
|
|
25
30
|
}
|
|
26
|
-
export declare function createParagraphDialogBridge(deps: ParagraphDialogBridgeDeps):
|
|
27
|
-
openParagraphDialog: () => void;
|
|
28
|
-
applyParagraphDialogValues: (values: ParagraphDialogApplyValues, original: ParagraphDialogInitialValues) => void;
|
|
29
|
-
setParagraphDialogDefault: (values: ParagraphDialogApplyValues) => void;
|
|
30
|
-
};
|
|
31
|
+
export declare function createParagraphDialogBridge(deps: ParagraphDialogBridgeDeps): ParagraphDialogBridge;
|
|
31
32
|
export {};
|
|
@@ -11,6 +11,11 @@ interface ContextMenuState {
|
|
|
11
11
|
x: number;
|
|
12
12
|
y: number;
|
|
13
13
|
}
|
|
14
|
+
export interface TablePropertiesDialogBridge {
|
|
15
|
+
isInsideTable: () => boolean;
|
|
16
|
+
openTablePropertiesDialog: (activeTab?: TablePropertiesDialogInitialValues["activeTab"]) => void;
|
|
17
|
+
applyTablePropertiesDialogValues: (values: TablePropertiesDialogApplyValues) => void;
|
|
18
|
+
}
|
|
14
19
|
export interface TablePropertiesDialogBridgeDeps {
|
|
15
20
|
state: () => EditorState;
|
|
16
21
|
isReadOnly: () => boolean;
|
|
@@ -28,9 +33,5 @@ export interface TablePropertiesDialogBridgeDeps {
|
|
|
28
33
|
* All model knowledge (active-table resolution, value mapping, mutation) lives
|
|
29
34
|
* in `@/app/services/tablePropertiesService` (F1).
|
|
30
35
|
*/
|
|
31
|
-
export declare function createTablePropertiesDialogBridge(deps: TablePropertiesDialogBridgeDeps):
|
|
32
|
-
isInsideTable: () => boolean;
|
|
33
|
-
openTablePropertiesDialog: (activeTab?: TablePropertiesDialogInitialValues["activeTab"]) => void;
|
|
34
|
-
applyTablePropertiesDialogValues: (values: TablePropertiesDialogApplyValues) => void;
|
|
35
|
-
};
|
|
36
|
+
export declare function createTablePropertiesDialogBridge(deps: TablePropertiesDialogBridgeDeps): TablePropertiesDialogBridge;
|
|
36
37
|
export {};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { EditorState, EditorTableNode } from '../../core/model.js';
|
|
2
|
+
import { CanvasTableLayoutResult } from './table/types.js';
|
|
2
3
|
|
|
3
4
|
export type { CanvasUnsupportedReason, CanvasTableBorderSpec, CanvasTableParagraphLayoutEntry, CanvasTableCellLayoutEntry, CanvasTableLayoutResult, } from './table/types.js';
|
|
4
5
|
export { resolveCanvasTableWidth } from './table/tableCellGeometry.js';
|
|
@@ -10,13 +11,4 @@ export declare function buildCanvasTableLayout(options: {
|
|
|
10
11
|
originY: number;
|
|
11
12
|
contentWidth: number;
|
|
12
13
|
estimatedHeight: number;
|
|
13
|
-
}):
|
|
14
|
-
tableId: string;
|
|
15
|
-
left: number;
|
|
16
|
-
top: number;
|
|
17
|
-
width: number;
|
|
18
|
-
height: number;
|
|
19
|
-
rowHeights: number[];
|
|
20
|
-
cells: import('./CanvasTableLayout.js').CanvasTableCellLayoutEntry[];
|
|
21
|
-
unsupported: import('./CanvasTableLayout.js').CanvasUnsupportedReason[];
|
|
22
|
-
};
|
|
14
|
+
}): CanvasTableLayoutResult;
|
|
@@ -4,15 +4,16 @@ export declare function resolveCanvasFooterZoneTop(page: Pick<EditorLayoutPage,
|
|
|
4
4
|
type CanvasGetter = () => HTMLCanvasElement | undefined;
|
|
5
5
|
type PageGetter = () => EditorLayoutPage;
|
|
6
6
|
type StateGetter = () => EditorState;
|
|
7
|
-
export
|
|
8
|
-
getCanvas: CanvasGetter;
|
|
9
|
-
getPage: PageGetter;
|
|
10
|
-
getState: StateGetter;
|
|
11
|
-
}): {
|
|
7
|
+
export interface CanvasPageRenderer {
|
|
12
8
|
schedulePaint: () => void;
|
|
13
9
|
invalidatePage: () => void;
|
|
14
10
|
invalidateDecorations: () => void;
|
|
15
11
|
invalidateActiveZone: () => void;
|
|
16
|
-
dispose()
|
|
17
|
-
}
|
|
12
|
+
dispose: () => void;
|
|
13
|
+
}
|
|
14
|
+
export declare function createCanvasPageRenderer(options: {
|
|
15
|
+
getCanvas: CanvasGetter;
|
|
16
|
+
getPage: PageGetter;
|
|
17
|
+
getState: StateGetter;
|
|
18
|
+
}): CanvasPageRenderer;
|
|
18
19
|
export {};
|