oasis-editor 0.0.78 → 0.0.80
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-C3VK8dmM.js → OasisEditorApp-DmrINFOV.js} +177 -166
- package/dist/app/services/tablePropertiesService.d.ts +15 -0
- package/dist/{index-CqVqLWyO.js → index-E2fsy7yp.js} +1 -1
- package/dist/oasis-editor.js +1 -1
- package/dist/oasis-editor.umd.cjs +3 -3
- package/dist/ui/app/buildEditorViewProps.d.ts +32 -7
- package/dist/ui/app/useTablePropertiesDialogBridge.d.ts +5 -0
- package/package.json +1 -1
|
@@ -9,19 +9,17 @@ import { createEditorTextInput } from '../../app/controllers/useEditorTextInput.
|
|
|
9
9
|
import { createEditorRevisionController } from '../../app/controllers/useEditorRevision.js';
|
|
10
10
|
|
|
11
11
|
type ImportProgress = NonNullable<ReturnType<NonNullable<OasisEditorEditorOverlayProps["importProgress"]>>>;
|
|
12
|
-
/**
|
|
13
|
-
|
|
14
|
-
* built controllers, accessors and handlers owned by the composition root; this
|
|
15
|
-
* module performs only the (logic-free) shaping into the prop objects consumed
|
|
16
|
-
* by `OasisEditorEditor` and the composed shells.
|
|
17
|
-
*/
|
|
18
|
-
export interface EditorViewPropsContext {
|
|
12
|
+
/** Page sizing / zoom inputs that shape the layout prop bundle. */
|
|
13
|
+
export interface EditorViewLayoutInput {
|
|
19
14
|
viewportHeight: number | string | undefined;
|
|
20
15
|
className: string | undefined;
|
|
21
16
|
style: JSX.CSSProperties | undefined;
|
|
22
17
|
zoomPercent: Accessor<number>;
|
|
23
18
|
setZoomPercent: (value: number) => void;
|
|
24
19
|
zoomFactor: Accessor<number>;
|
|
20
|
+
}
|
|
21
|
+
/** Overlay accessors (selection, caret, boxes, progress) for the overlay bundle. */
|
|
22
|
+
export interface EditorViewOverlayInput {
|
|
25
23
|
selectionBoxes: Accessor<SelectionBox[]>;
|
|
26
24
|
commentHighlights: Accessor<CommentHighlightBox[]>;
|
|
27
25
|
selectedImageBox: Accessor<SelectedImageBox | null>;
|
|
@@ -33,9 +31,18 @@ export interface EditorViewPropsContext {
|
|
|
33
31
|
focused: Accessor<boolean>;
|
|
34
32
|
showCaret: Accessor<boolean>;
|
|
35
33
|
importProgress: Accessor<ImportProgress | null>;
|
|
34
|
+
}
|
|
35
|
+
/** Owner of the editor element refs. */
|
|
36
|
+
export interface EditorViewRefsInput {
|
|
36
37
|
focusController: ReturnType<typeof createEditorFocusController>;
|
|
38
|
+
}
|
|
39
|
+
/** File-input change handlers (import / insert image). */
|
|
40
|
+
export interface EditorViewFileInput {
|
|
37
41
|
handleImportFile: (file: File | null) => void;
|
|
38
42
|
handleInsertImage: (file: File | null) => void;
|
|
43
|
+
}
|
|
44
|
+
/** Pointer/gesture collaborators and handlers for the surface bundle. */
|
|
45
|
+
export interface EditorViewSurfaceInput {
|
|
39
46
|
surfaceEvents: ReturnType<typeof createEditorSurfaceEvents>;
|
|
40
47
|
tableResize: ReturnType<typeof createEditorTableResize>;
|
|
41
48
|
tableDrag: ReturnType<typeof createEditorTableDrag>;
|
|
@@ -48,6 +55,9 @@ export interface EditorViewPropsContext {
|
|
|
48
55
|
handleImageRotateHandleMouseDown: OasisEditorEditorSurfaceHandlers["onImageRotateHandleMouseDown"];
|
|
49
56
|
handleTextBoxRotateHandleMouseDown: OasisEditorEditorSurfaceHandlers["onTextBoxRotateHandleMouseDown"];
|
|
50
57
|
handleEditorContextMenu: (event: MouseEvent) => void;
|
|
58
|
+
}
|
|
59
|
+
/** Text-input / clipboard / keyboard handlers for the input bundle. */
|
|
60
|
+
export interface EditorViewInputInput {
|
|
51
61
|
textInput: ReturnType<typeof createEditorTextInput>;
|
|
52
62
|
setFocused: (value: boolean) => void;
|
|
53
63
|
handleCopy: OasisEditorEditorInputHandlers["onCopy"];
|
|
@@ -55,6 +65,21 @@ export interface EditorViewPropsContext {
|
|
|
55
65
|
handlePaste: OasisEditorEditorInputHandlers["onPaste"];
|
|
56
66
|
handleKeyDown: OasisEditorEditorInputHandlers["onKeyDown"];
|
|
57
67
|
}
|
|
68
|
+
/**
|
|
69
|
+
* Inputs needed to assemble the editor's view-prop bundles, grouped by the
|
|
70
|
+
* capability they feed. These are already built controllers, accessors and
|
|
71
|
+
* handlers owned by the composition root; this module performs only the
|
|
72
|
+
* (logic-free) shaping into the prop objects consumed by `OasisEditorEditor`
|
|
73
|
+
* and the composed shells (I1).
|
|
74
|
+
*/
|
|
75
|
+
export interface EditorViewPropsContext {
|
|
76
|
+
layout: EditorViewLayoutInput;
|
|
77
|
+
overlays: EditorViewOverlayInput;
|
|
78
|
+
refs: EditorViewRefsInput;
|
|
79
|
+
surface: EditorViewSurfaceInput;
|
|
80
|
+
input: EditorViewInputInput;
|
|
81
|
+
files: EditorViewFileInput;
|
|
82
|
+
}
|
|
58
83
|
export interface EditorViewProps {
|
|
59
84
|
layout: OasisEditorEditorLayoutProps;
|
|
60
85
|
overlays: OasisEditorEditorOverlayProps;
|
|
@@ -22,6 +22,11 @@ export interface TablePropertiesDialogBridgeDeps {
|
|
|
22
22
|
}) => void;
|
|
23
23
|
focusInput: () => void;
|
|
24
24
|
}
|
|
25
|
+
/**
|
|
26
|
+
* UI bridge for the table properties dialog: opens/closes it and returns focus.
|
|
27
|
+
* All model knowledge (active-table resolution, value mapping, mutation) lives
|
|
28
|
+
* in `@/app/services/tablePropertiesService` (F1).
|
|
29
|
+
*/
|
|
25
30
|
export declare function createTablePropertiesDialogBridge(deps: TablePropertiesDialogBridgeDeps): {
|
|
26
31
|
isInsideTable: () => boolean;
|
|
27
32
|
openTablePropertiesDialog: (activeTab?: TablePropertiesDialogInitialValues["activeTab"]) => void;
|