oasis-editor 0.0.121 → 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/{OasisEditorApp-XzK_1rLE.js → OasisEditorApp-Dwc5ee9G.js} +1993 -918
- package/dist/adapters/vue.d.ts +3 -3
- package/dist/app/controllers/EditorCommandsController.d.ts +3 -1
- package/dist/app/controllers/tableOpsCellSpanCommands.d.ts +2 -1
- package/dist/app/controllers/tableOpsGuards.d.ts +2 -1
- package/dist/app/controllers/tableOpsRowColumnCommands.d.ts +2 -1
- package/dist/app/controllers/tableOpsSelectionAwareCommands.d.ts +2 -1
- package/dist/app/controllers/tableOpsSelectionRanges.d.ts +2 -1
- package/dist/app/controllers/useEditorClipboard.d.ts +3 -1
- package/dist/app/controllers/useEditorDocumentIO.d.ts +2 -1
- package/dist/app/controllers/useEditorHistoryActions.d.ts +3 -1
- package/dist/app/controllers/useEditorImageOperations.d.ts +7 -7
- package/dist/app/controllers/useEditorKeyboard.d.ts +2 -1
- package/dist/app/controllers/useEditorLayout.d.ts +2 -1
- package/dist/app/controllers/useEditorNavigation.d.ts +3 -1
- package/dist/app/controllers/useEditorRevision.d.ts +3 -1
- package/dist/app/controllers/useEditorStyle.d.ts +2 -1
- package/dist/app/controllers/useEditorSurfaceEvents.d.ts +3 -1
- package/dist/app/controllers/useEditorTableDrag.d.ts +7 -0
- package/dist/app/controllers/useEditorTableOperations.d.ts +3 -1
- package/dist/app/controllers/useEditorTextBoxOperations.d.ts +3 -1
- package/dist/app/controllers/useEditorTextDrag.d.ts +3 -1
- package/dist/app/controllers/useEditorTextInput.d.ts +3 -1
- package/dist/assets/{importDocxWorker-nIS-zjkj.js → importDocxWorker-A73eR_fM.js} +1 -1
- package/dist/core/model/types/styles.d.ts +2 -0
- package/dist/core/textStyle/textStyleKeys.d.ts +1 -1
- package/dist/i18n/locales/en.d.ts +42 -0
- package/dist/i18n/locales/pt-BR.d.ts +42 -0
- package/dist/{index-DF_Uf74V.js → index-YMlNF1Ya.js} +757 -466
- package/dist/oasis-editor.css +1 -1
- package/dist/oasis-editor.js +71 -71
- package/dist/oasis-editor.umd.cjs +4 -4
- package/dist/ui/OasisEditorContainer.d.ts +2 -1
- package/dist/ui/app/EditorDialogsLayer.d.ts +1 -0
- package/dist/ui/app/createAppCommandsController.d.ts +2 -1
- package/dist/ui/app/createEditorChrome.d.ts +3 -1
- package/dist/ui/app/createEditorCommandRuntime.d.ts +2 -1
- package/dist/ui/app/createEditorDocumentRuntime.d.ts +2 -1
- package/dist/ui/app/createEditorInteractionRuntime.d.ts +3 -5
- package/dist/ui/app/useEditorAppState.d.ts +2 -1
- package/dist/ui/app/useEditorContextMenuClipboard.d.ts +2 -1
- package/dist/ui/app/useEditorDialogs.d.ts +18 -16
- package/dist/ui/app/useEditorFocus.d.ts +7 -4
- package/dist/ui/app/useEditorFontOptions.d.ts +3 -1
- package/dist/ui/app/useEditorTransactions.d.ts +3 -1
- 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 -4
- 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/dist/ui/components/CaretOverlay.d.ts +3 -1
- package/dist/ui/components/Dialogs/FontDialog.d.ts +2 -1
- package/dist/ui/components/Dialogs/ImageAltDialog.d.ts +3 -1
- package/dist/ui/components/Dialogs/ImageCaptionDialog.d.ts +3 -1
- package/dist/ui/components/Dialogs/LinkDialog.d.ts +3 -1
- package/dist/ui/components/Dialogs/ParagraphDialog.d.ts +23 -1
- package/dist/ui/components/Dialogs/TabStopsDialog.d.ts +10 -0
- package/dist/ui/components/Dialogs/TablePropertiesDialog.d.ts +2 -1
- package/dist/ui/components/Dialogs/font-dialog/AdvancedFontTab.d.ts +2 -1
- package/dist/ui/components/Dialogs/font-dialog/FontPreview.d.ts +3 -1
- package/dist/ui/components/Dialogs/table-properties/AltTextTabPanel.d.ts +2 -1
- package/dist/ui/components/Dialogs/table-properties/ColumnTabPanel.d.ts +2 -1
- package/dist/ui/components/Dialogs/table-properties/RowTabPanel.d.ts +2 -1
- package/dist/ui/components/PageBreak.d.ts +3 -1
- package/dist/ui/components/RevisionOverlay.d.ts +2 -1
- package/dist/ui/components/Toolbar/groups/MetricGroup.d.ts +2 -1
- package/dist/ui/shells/BalloonShell.d.ts +2 -1
- package/dist/ui/toolbarStyleState.d.ts +9 -2
- package/dist/vue.d.ts +3 -3
- package/package.json +1 -1
package/dist/adapters/vue.d.ts
CHANGED
|
@@ -4,17 +4,17 @@ import { OasisEditorAppProps, OasisEditorClient } from '../index.ts';
|
|
|
4
4
|
export declare const OasisEditor: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
5
5
|
config: {
|
|
6
6
|
type: () => OasisEditorAppProps;
|
|
7
|
-
default: () =>
|
|
7
|
+
default: () => Record<string, never>;
|
|
8
8
|
};
|
|
9
9
|
class: StringConstructor;
|
|
10
10
|
style: () => string | Record<string, unknown>;
|
|
11
11
|
onClient: () => (client: OasisEditorClient) => void;
|
|
12
12
|
}>, () => VNode<RendererNode, RendererElement, {
|
|
13
|
-
[key: string]:
|
|
13
|
+
[key: string]: unknown;
|
|
14
14
|
}>, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
15
15
|
config: {
|
|
16
16
|
type: () => OasisEditorAppProps;
|
|
17
|
-
default: () =>
|
|
17
|
+
default: () => Record<string, never>;
|
|
18
18
|
};
|
|
19
19
|
class: StringConstructor;
|
|
20
20
|
style: () => string | Record<string, unknown>;
|
|
@@ -15,7 +15,8 @@ export interface EditorCommandsControllerDeps extends EditorTransactionPort, Foc
|
|
|
15
15
|
openImageCaptionDialog: (initialCaption: string) => void;
|
|
16
16
|
imageCaptionLabel: () => string;
|
|
17
17
|
}
|
|
18
|
-
export declare function createEditorCommandsController(deps: EditorCommandsControllerDeps):
|
|
18
|
+
export declare function createEditorCommandsController(deps: EditorCommandsControllerDeps): ReturnType<typeof createEditorCommandsControllerImpl>;
|
|
19
|
+
declare function createEditorCommandsControllerImpl(deps: EditorCommandsControllerDeps): {
|
|
19
20
|
applyBooleanStyleCommand: (key: BooleanStyleKey) => void;
|
|
20
21
|
applyValueStyleCommand: <K extends "styleId" | "fontFamily" | "fontSize" | "color" | "highlight" | "shading" | "language" | "textEffect" | "link" | "underlineStyle">(key: K, value: EditorTextStyle[K] | null) => void;
|
|
21
22
|
applyChangeTextCaseCommand: (mode: TextCaseMode) => void;
|
|
@@ -49,3 +50,4 @@ export declare function createEditorCommandsController(deps: EditorCommandsContr
|
|
|
49
50
|
currentTarget: HTMLTextAreaElement;
|
|
50
51
|
}) => boolean;
|
|
51
52
|
};
|
|
53
|
+
export {};
|
|
@@ -10,7 +10,8 @@ interface TableCellSpanOperationsDeps {
|
|
|
10
10
|
canSplitSelectedTableCell: (current: EditorState) => boolean;
|
|
11
11
|
canSplitSelectedTableCellVertically: (current: EditorState) => boolean;
|
|
12
12
|
}
|
|
13
|
-
export declare function createTableCellSpanOperations(deps: TableCellSpanOperationsDeps):
|
|
13
|
+
export declare function createTableCellSpanOperations(deps: TableCellSpanOperationsDeps): ReturnType<typeof createTableCellSpanOperationsImpl>;
|
|
14
|
+
declare function createTableCellSpanOperationsImpl(deps: TableCellSpanOperationsDeps): {
|
|
14
15
|
mergeSelectedTableCells: (current: EditorState) => EditorState;
|
|
15
16
|
mergeSelectedTableRows: (current: EditorState) => EditorState;
|
|
16
17
|
mergeSelectedTable: (current: EditorState) => EditorState;
|
|
@@ -6,7 +6,8 @@ interface TableOpsGuardsDeps {
|
|
|
6
6
|
resolveHorizontalTableCellRange: (current: EditorState) => HorizontalTableCellRange | null;
|
|
7
7
|
resolveVerticalTableCellRange: (current: EditorState) => VerticalTableCellRange | null;
|
|
8
8
|
}
|
|
9
|
-
export declare function createTableOpsGuards(deps: TableOpsGuardsDeps):
|
|
9
|
+
export declare function createTableOpsGuards(deps: TableOpsGuardsDeps): ReturnType<typeof createTableOpsGuardsImpl>;
|
|
10
|
+
declare function createTableOpsGuardsImpl(deps: TableOpsGuardsDeps): {
|
|
10
11
|
canMergeSelectedTableCells: (current: EditorState) => boolean;
|
|
11
12
|
canSplitSelectedTableCell: (current: EditorState) => boolean;
|
|
12
13
|
canMergeSelectedTableRows: (current: EditorState) => boolean;
|
|
@@ -3,7 +3,8 @@ import { EditorBlockNode, EditorEditingZone, EditorState } from '../../core/mode
|
|
|
3
3
|
interface TableRowColumnOperationsDeps {
|
|
4
4
|
getTargetBlocks: (state: EditorState, zone: EditorEditingZone) => EditorBlockNode[];
|
|
5
5
|
}
|
|
6
|
-
export declare function createTableRowColumnOperations(deps: TableRowColumnOperationsDeps):
|
|
6
|
+
export declare function createTableRowColumnOperations(deps: TableRowColumnOperationsDeps): ReturnType<typeof createTableRowColumnOperationsImpl>;
|
|
7
|
+
declare function createTableRowColumnOperationsImpl(deps: TableRowColumnOperationsDeps): {
|
|
7
8
|
insertSelectedTableRow: (current: EditorState, direction: -1 | 1) => EditorState;
|
|
8
9
|
deleteSelectedTableRow: (current: EditorState) => EditorState;
|
|
9
10
|
insertSelectedTableColumn: (current: EditorState, direction: -1 | 1) => EditorState;
|
|
@@ -13,7 +13,8 @@ interface TableSelectionAwareCommandsDeps {
|
|
|
13
13
|
resolveSelectedTableCells: (current: EditorState) => SelectedTableCells | null;
|
|
14
14
|
logger?: EditorLogger;
|
|
15
15
|
}
|
|
16
|
-
export declare function createTableSelectionAwareCommands(deps: TableSelectionAwareCommandsDeps):
|
|
16
|
+
export declare function createTableSelectionAwareCommands(deps: TableSelectionAwareCommandsDeps): ReturnType<typeof createTableSelectionAwareCommandsImpl>;
|
|
17
|
+
declare function createTableSelectionAwareCommandsImpl(deps: TableSelectionAwareCommandsDeps): {
|
|
17
18
|
withExpandedTableCellSelection: (current: EditorState) => EditorState;
|
|
18
19
|
applySelectionAwareTextCommand: (command: (current: EditorState) => EditorState) => void;
|
|
19
20
|
applySelectionAwareParagraphCommand: (command: (current: EditorState) => EditorState) => void;
|
|
@@ -25,7 +25,8 @@ interface TableSelectionResolversDeps {
|
|
|
25
25
|
getTargetBlocks: (state: EditorState, zone: EditorEditingZone) => EditorBlockNode[];
|
|
26
26
|
logger?: EditorLogger;
|
|
27
27
|
}
|
|
28
|
-
export declare function createTableSelectionResolvers(deps: TableSelectionResolversDeps):
|
|
28
|
+
export declare function createTableSelectionResolvers(deps: TableSelectionResolversDeps): ReturnType<typeof createTableSelectionResolversImpl>;
|
|
29
|
+
declare function createTableSelectionResolversImpl(deps: TableSelectionResolversDeps): {
|
|
29
30
|
resolveTableCellRangeSelection: (current: EditorState) => EditorState["selection"] | null;
|
|
30
31
|
resolveSelectedTableCells: (current: EditorState) => SelectedTableCells | null;
|
|
31
32
|
resolveHorizontalTableCellRange: (current: EditorState) => HorizontalTableCellRange | null;
|
|
@@ -14,7 +14,8 @@ export interface EditorClipboardDeps {
|
|
|
14
14
|
insertImageFromFile: (file: File, position?: EditorPosition | null) => Promise<void>;
|
|
15
15
|
resolvePositionAtSurfacePoint: (clientX: number, clientY: number) => EditorPosition | null;
|
|
16
16
|
}
|
|
17
|
-
export declare function createEditorClipboardController(deps: EditorClipboardDeps):
|
|
17
|
+
export declare function createEditorClipboardController(deps: EditorClipboardDeps): ReturnType<typeof createEditorClipboardControllerImpl>;
|
|
18
|
+
declare function createEditorClipboardControllerImpl(deps: EditorClipboardDeps): {
|
|
18
19
|
handleCopy: (event: ClipboardEvent & {
|
|
19
20
|
currentTarget: HTMLTextAreaElement;
|
|
20
21
|
}) => void;
|
|
@@ -26,3 +27,4 @@ export declare function createEditorClipboardController(deps: EditorClipboardDep
|
|
|
26
27
|
}) => void;
|
|
27
28
|
handleDrop: (event: DragEvent) => void;
|
|
28
29
|
};
|
|
30
|
+
export {};
|
|
@@ -17,7 +17,8 @@ export interface UseEditorDocumentIOProps {
|
|
|
17
17
|
focusInput: () => void;
|
|
18
18
|
logger: EditorLogger;
|
|
19
19
|
}
|
|
20
|
-
export declare function createEditorDocumentIO(deps: UseEditorDocumentIOProps):
|
|
20
|
+
export declare function createEditorDocumentIO(deps: UseEditorDocumentIOProps): ReturnType<typeof createEditorDocumentIOImpl>;
|
|
21
|
+
declare function createEditorDocumentIOImpl(deps: UseEditorDocumentIOProps): {
|
|
21
22
|
importProgress: import('solid-js').Accessor<ImportProgressState | null>;
|
|
22
23
|
handleImportFile: (file: File | null) => Promise<void>;
|
|
23
24
|
handleExportDocx: () => Promise<void>;
|
|
@@ -16,9 +16,11 @@ export interface UseEditorHistoryActionsProps {
|
|
|
16
16
|
updateHistoryState: (updater: (current: EditorHistoryState) => EditorHistoryState) => void;
|
|
17
17
|
getHistoryState: () => EditorHistoryState;
|
|
18
18
|
}
|
|
19
|
-
export declare function createEditorHistoryActions(deps: UseEditorHistoryActionsProps):
|
|
19
|
+
export declare function createEditorHistoryActions(deps: UseEditorHistoryActionsProps): ReturnType<typeof createEditorHistoryActionsImpl>;
|
|
20
|
+
declare function createEditorHistoryActionsImpl(deps: UseEditorHistoryActionsProps): {
|
|
20
21
|
performUndo: () => void;
|
|
21
22
|
performRedo: () => void;
|
|
22
23
|
moveSelectedImageByParagraph: (direction: -1 | 1) => boolean;
|
|
23
24
|
applySelectionPreservingStructure: (nextSelection: EditorState["selection"]) => void;
|
|
24
25
|
};
|
|
26
|
+
export {};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { MergeKey } from '../../core/transactionMergeKeys.js';
|
|
2
|
-
import { EditorPosition, EditorState } from '../../core/model.js';
|
|
2
|
+
import { EditorPosition, EditorParagraphNode, EditorState } from '../../core/model.js';
|
|
3
|
+
import { RunOfKind } from '../../core/model/runKind.js';
|
|
3
4
|
import { ResizeHandleDirection } from '../../ui/resizeGeometry.js';
|
|
4
5
|
import { EditorLogger } from '../../utils/logger.js';
|
|
5
6
|
import { EditorHistoryState } from '../../ui/editorHistory.js';
|
|
@@ -35,7 +36,8 @@ export interface EditorImageOperationsDeps {
|
|
|
35
36
|
/** Visual zoom factor `z`; resize pointer deltas are divided by it. */
|
|
36
37
|
zoomFactor?: () => number;
|
|
37
38
|
}
|
|
38
|
-
export declare function createEditorImageOperations(deps: EditorImageOperationsDeps):
|
|
39
|
+
export declare function createEditorImageOperations(deps: EditorImageOperationsDeps): ReturnType<typeof createEditorImageOperationsImpl>;
|
|
40
|
+
declare function createEditorImageOperationsImpl(deps: EditorImageOperationsDeps): {
|
|
39
41
|
dragging: import('solid-js').Accessor<boolean>;
|
|
40
42
|
draggedImageInfo: import('solid-js').Accessor<ActiveImageDrag | null>;
|
|
41
43
|
mousePos: import('solid-js').Accessor<{
|
|
@@ -44,11 +46,8 @@ export declare function createEditorImageOperations(deps: EditorImageOperationsD
|
|
|
44
46
|
}>;
|
|
45
47
|
dropTargetPos: import('solid-js').Accessor<EditorPosition | null>;
|
|
46
48
|
getSelectedImageInfo: (current: EditorState) => {
|
|
47
|
-
paragraph:
|
|
48
|
-
run:
|
|
49
|
-
kind: "image";
|
|
50
|
-
image: import('../../core/model.js').EditorImageRunData;
|
|
51
|
-
};
|
|
49
|
+
paragraph: EditorParagraphNode;
|
|
50
|
+
run: RunOfKind<"image">;
|
|
52
51
|
startOffset: number;
|
|
53
52
|
width: number;
|
|
54
53
|
height: number;
|
|
@@ -68,3 +67,4 @@ export declare function createEditorImageOperations(deps: EditorImageOperationsD
|
|
|
68
67
|
currentTarget: HTMLElement;
|
|
69
68
|
}) => void;
|
|
70
69
|
};
|
|
70
|
+
export {};
|
|
@@ -2,7 +2,8 @@ import { EditorCommandRegistry } from './EditorCommandRegistry.js';
|
|
|
2
2
|
import { EditorKeyboardDeps } from './EditorKeyboardDeps.js';
|
|
3
3
|
|
|
4
4
|
export type { EditorKeyboardDeps } from './EditorKeyboardDeps.js';
|
|
5
|
-
export declare function createEditorKeyboardController(deps: EditorKeyboardDeps):
|
|
5
|
+
export declare function createEditorKeyboardController(deps: EditorKeyboardDeps): ReturnType<typeof createEditorKeyboardControllerImpl>;
|
|
6
|
+
declare function createEditorKeyboardControllerImpl(deps: EditorKeyboardDeps): {
|
|
6
7
|
handleKeyDown: (event: KeyboardEvent & {
|
|
7
8
|
currentTarget: HTMLTextAreaElement;
|
|
8
9
|
}) => void;
|
|
@@ -16,7 +16,8 @@ export interface LayoutInvalidation {
|
|
|
16
16
|
structureChanged?: boolean;
|
|
17
17
|
dirtyAll?: boolean;
|
|
18
18
|
}
|
|
19
|
-
export declare function useEditorLayout(props: UseEditorLayoutProps):
|
|
19
|
+
export declare function useEditorLayout(props: UseEditorLayoutProps): ReturnType<typeof useEditorLayoutImpl>;
|
|
20
|
+
declare function useEditorLayoutImpl(props: UseEditorLayoutProps): {
|
|
20
21
|
measuredBlockHeights: import('solid-js').Accessor<Record<string, number>>;
|
|
21
22
|
measuredParagraphLayouts: import('solid-js').Accessor<Record<string, EditorLayoutParagraph>>;
|
|
22
23
|
documentLayout: import('solid-js').Accessor<EditorLayoutDocument>;
|
|
@@ -22,10 +22,12 @@ export interface UseEditorNavigationProps {
|
|
|
22
22
|
*/
|
|
23
23
|
zoomFactor?: () => number;
|
|
24
24
|
}
|
|
25
|
-
export declare function createEditorNavigation(deps: UseEditorNavigationProps):
|
|
25
|
+
export declare function createEditorNavigation(deps: UseEditorNavigationProps): ReturnType<typeof createEditorNavigationImpl>;
|
|
26
|
+
declare function createEditorNavigationImpl(deps: UseEditorNavigationProps): {
|
|
26
27
|
moveSelectionToParagraphBoundary: (boundary: "start" | "end", extend: boolean) => boolean;
|
|
27
28
|
moveSelectionToDocumentBoundary: (boundary: "start" | "end", extend: boolean) => boolean;
|
|
28
29
|
moveSelectionByWord: (direction: "left" | "right", extend: boolean) => boolean;
|
|
29
30
|
moveVerticalByBlock: (direction: -1 | 1) => boolean;
|
|
30
31
|
moveVerticalSelection: (direction: -1 | 1, extend: boolean) => boolean;
|
|
31
32
|
};
|
|
33
|
+
export {};
|
|
@@ -7,8 +7,10 @@ export interface UseEditorRevisionProps {
|
|
|
7
7
|
/** Visual zoom factor `z`; screen-px offsets are divided by it for px-local. */
|
|
8
8
|
zoomFactor?: () => number;
|
|
9
9
|
}
|
|
10
|
-
export declare function createEditorRevisionController(deps: UseEditorRevisionProps):
|
|
10
|
+
export declare function createEditorRevisionController(deps: UseEditorRevisionProps): ReturnType<typeof createEditorRevisionControllerImpl>;
|
|
11
|
+
declare function createEditorRevisionControllerImpl(deps: UseEditorRevisionProps): {
|
|
11
12
|
hoveredRevision: import('solid-js').Accessor<RevisionBox | null>;
|
|
12
13
|
handleRevisionMouseEnter: (revisionId: string, event: MouseEvent) => void;
|
|
13
14
|
handleRevisionMouseLeave: () => void;
|
|
14
15
|
};
|
|
16
|
+
export {};
|
|
@@ -13,7 +13,8 @@ export interface UseEditorStyleProps {
|
|
|
13
13
|
info: (msg: string) => void;
|
|
14
14
|
};
|
|
15
15
|
}
|
|
16
|
-
export declare function createEditorStyleController(deps: UseEditorStyleProps):
|
|
16
|
+
export declare function createEditorStyleController(deps: UseEditorStyleProps): ReturnType<typeof createEditorStyleControllerImpl>;
|
|
17
|
+
declare function createEditorStyleControllerImpl(deps: UseEditorStyleProps): {
|
|
17
18
|
pendingCaretTextStyle: import('solid-js').Accessor<EditorTextStyle | undefined>;
|
|
18
19
|
clearPendingCaretTextStyle: () => void;
|
|
19
20
|
toolbarStyleState: () => ToolbarStyleState;
|
|
@@ -34,7 +34,8 @@ export interface UseEditorSurfaceEventsProps {
|
|
|
34
34
|
info: (msg: string, payload?: unknown) => void;
|
|
35
35
|
};
|
|
36
36
|
}
|
|
37
|
-
export declare function createEditorSurfaceEvents(deps: UseEditorSurfaceEventsProps):
|
|
37
|
+
export declare function createEditorSurfaceEvents(deps: UseEditorSurfaceEventsProps): ReturnType<typeof createEditorSurfaceEventsImpl>;
|
|
38
|
+
declare function createEditorSurfaceEventsImpl(deps: UseEditorSurfaceEventsProps): {
|
|
38
39
|
handleSurfaceMouseDown: (event: MouseEvent) => void;
|
|
39
40
|
handleSurfaceClick: (event: MouseEvent) => void;
|
|
40
41
|
handleSurfaceDblClick: (event: MouseEvent) => void;
|
|
@@ -43,3 +44,4 @@ export declare function createEditorSurfaceEvents(deps: UseEditorSurfaceEventsPr
|
|
|
43
44
|
}) => void;
|
|
44
45
|
stopDragging: () => void;
|
|
45
46
|
};
|
|
47
|
+
export {};
|
|
@@ -11,6 +11,12 @@ export declare function createEditorTableDrag(deps: {
|
|
|
11
11
|
applyTransactionalState: (producer: (current: EditorState) => EditorState) => void;
|
|
12
12
|
resolvePositionAtSurfacePoint: (clientX: number, clientY: number) => EditorPosition | null;
|
|
13
13
|
focusInput: () => void;
|
|
14
|
+
}): ReturnType<typeof createEditorTableDragImpl>;
|
|
15
|
+
declare function createEditorTableDragImpl(deps: {
|
|
16
|
+
state: () => EditorState;
|
|
17
|
+
applyTransactionalState: (producer: (current: EditorState) => EditorState) => void;
|
|
18
|
+
resolvePositionAtSurfacePoint: (clientX: number, clientY: number) => EditorPosition | null;
|
|
19
|
+
focusInput: () => void;
|
|
14
20
|
}): {
|
|
15
21
|
dragging: import('solid-js').Accessor<boolean>;
|
|
16
22
|
draggedTableInfo: import('solid-js').Accessor<{
|
|
@@ -27,3 +33,4 @@ export declare function createEditorTableDrag(deps: {
|
|
|
27
33
|
dropTargetPos: import('solid-js').Accessor<EditorPosition | null>;
|
|
28
34
|
handleMouseDown: (tableId: string, event: MouseEvent) => void;
|
|
29
35
|
};
|
|
36
|
+
export {};
|
|
@@ -10,7 +10,8 @@ export interface EditorTableOperationsDeps {
|
|
|
10
10
|
focusInput: () => void;
|
|
11
11
|
logger?: EditorLogger;
|
|
12
12
|
}
|
|
13
|
-
export declare function createEditorTableOperations(deps: EditorTableOperationsDeps):
|
|
13
|
+
export declare function createEditorTableOperations(deps: EditorTableOperationsDeps): ReturnType<typeof createEditorTableOperationsImpl>;
|
|
14
|
+
declare function createEditorTableOperationsImpl(deps: EditorTableOperationsDeps): {
|
|
14
15
|
resolveTableCellRangeSelection: (current: EditorState) => EditorState["selection"] | null;
|
|
15
16
|
resolveHorizontalTableCellRange: (current: EditorState) => import('./tableOpsSelectionRanges.js').HorizontalTableCellRange | null;
|
|
16
17
|
resolveVerticalTableCellRange: (current: EditorState) => import('./tableOpsSelectionRanges.js').VerticalTableCellRange | null;
|
|
@@ -44,3 +45,4 @@ export declare function createEditorTableOperations(deps: EditorTableOperationsD
|
|
|
44
45
|
applySelectionAwareParagraphCommand: (command: (current: EditorState) => EditorState) => void;
|
|
45
46
|
insertTableCommand: (rows: number, cols: number) => void;
|
|
46
47
|
};
|
|
48
|
+
export {};
|
|
@@ -14,7 +14,8 @@ export interface EditorTextBoxOperationsDeps {
|
|
|
14
14
|
/** Visual zoom factor `z`; resize pointer deltas are divided by it. */
|
|
15
15
|
zoomFactor?: () => number;
|
|
16
16
|
}
|
|
17
|
-
export declare function createEditorTextBoxOperations(deps: EditorTextBoxOperationsDeps):
|
|
17
|
+
export declare function createEditorTextBoxOperations(deps: EditorTextBoxOperationsDeps): ReturnType<typeof createEditorTextBoxOperationsImpl>;
|
|
18
|
+
declare function createEditorTextBoxOperationsImpl(deps: EditorTextBoxOperationsDeps): {
|
|
18
19
|
handleTextBoxResizeHandleMouseDown: (paragraphId: string, paragraphOffset: number, direction: ResizeHandleDirection, event: MouseEvent & {
|
|
19
20
|
currentTarget: HTMLElement;
|
|
20
21
|
}) => void;
|
|
@@ -24,3 +25,4 @@ export declare function createEditorTextBoxOperations(deps: EditorTextBoxOperati
|
|
|
24
25
|
stopTextBoxResize: () => void;
|
|
25
26
|
stopTextBoxRotate: () => void;
|
|
26
27
|
};
|
|
28
|
+
export {};
|
|
@@ -21,7 +21,8 @@ export interface EditorTextDragDeps {
|
|
|
21
21
|
warn?: (msg: string, payload?: unknown) => void;
|
|
22
22
|
};
|
|
23
23
|
}
|
|
24
|
-
export declare function createEditorTextDrag(deps: EditorTextDragDeps):
|
|
24
|
+
export declare function createEditorTextDrag(deps: EditorTextDragDeps): ReturnType<typeof createEditorTextDragImpl>;
|
|
25
|
+
declare function createEditorTextDragImpl(deps: EditorTextDragDeps): {
|
|
25
26
|
dragging: import('solid-js').Accessor<boolean>;
|
|
26
27
|
dropTargetPos: import('solid-js').Accessor<EditorPosition | null>;
|
|
27
28
|
copyMode: import('solid-js').Accessor<boolean>;
|
|
@@ -37,3 +38,4 @@ export declare function createEditorTextDrag(deps: EditorTextDragDeps): {
|
|
|
37
38
|
tryStartTextDrag: (event: MouseEvent, hit: SurfaceHit | null) => boolean;
|
|
38
39
|
stopDrag: () => void;
|
|
39
40
|
};
|
|
41
|
+
export {};
|
|
@@ -16,7 +16,8 @@ export interface UseEditorTextInputProps {
|
|
|
16
16
|
applyTableAwareParagraphEdit: (state: EditorState, edit: (temp: EditorState) => EditorState) => EditorState;
|
|
17
17
|
focusInput: () => void;
|
|
18
18
|
}
|
|
19
|
-
export declare function createEditorTextInput(deps: UseEditorTextInputProps):
|
|
19
|
+
export declare function createEditorTextInput(deps: UseEditorTextInputProps): ReturnType<typeof createEditorTextInputImpl>;
|
|
20
|
+
declare function createEditorTextInputImpl(deps: UseEditorTextInputProps): {
|
|
20
21
|
handleTextInput: (event: InputEvent & {
|
|
21
22
|
currentTarget: HTMLTextAreaElement;
|
|
22
23
|
}) => void;
|
|
@@ -26,3 +27,4 @@ export declare function createEditorTextInput(deps: UseEditorTextInputProps): {
|
|
|
26
27
|
}) => void;
|
|
27
28
|
composing: import('solid-js').Accessor<boolean>;
|
|
28
29
|
};
|
|
30
|
+
export {};
|