oasis-editor 0.0.106 → 0.0.107
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-CwVZxG1m.js → OasisEditorApp-BFNqDc07.js} +685 -55
- package/dist/app/controllers/tableResize/tableResizeGeometry.d.ts +3 -2
- package/dist/app/controllers/tableResize/tableResizeHitTest.d.ts +3 -2
- package/dist/app/controllers/useEditorLayout.d.ts +2 -0
- package/dist/app/controllers/useEditorNavigation.d.ts +4 -1
- package/dist/app/controllers/useEditorTableResize.d.ts +5 -1
- package/dist/{index-DdcPkCmB.js → index-4uLtMJwI.js} +13706 -14175
- package/dist/layoutProjection/index.d.ts +1 -0
- package/dist/layoutProjection/layoutMetricsEpoch.d.ts +2 -0
- package/dist/oasis-editor.js +55 -55
- package/dist/oasis-editor.umd.cjs +4 -4
- package/dist/ui/OasisEditorEditor.d.ts +3 -2
- package/dist/ui/app/EditorDragLayers.d.ts +5 -1
- package/dist/ui/app/EditorWorkspace.d.ts +2 -1
- package/dist/ui/app/buildEditorViewProps.d.ts +2 -0
- package/dist/ui/app/createEditorDocumentRuntime.d.ts +2 -0
- package/dist/ui/app/createEditorInteractionRuntime.d.ts +2 -0
- package/dist/ui/app/useCanvasSurfaceHitResolver.d.ts +4 -3
- package/dist/ui/app/useEditorInteractionWiring.d.ts +2 -0
- package/dist/ui/canvas/canvasLayoutSnapshotProvider.d.ts +14 -0
- package/dist/ui/canvas/canvasSnapshotTypes.d.ts +2 -3
- package/dist/ui/canvas/canvasTextMeasurer.d.ts +3 -0
- package/dist/ui/components/DropCaret.d.ts +5 -1
- package/dist/ui/components/Outline/OutlinePanel.d.ts +5 -1
- package/dist/ui/editorUiTypes.d.ts +2 -1
- package/dist/ui/shells/DocumentShell.d.ts +3 -2
- package/package.json +1 -1
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { EditorState, EditorTableNode } from '../../../core/model.js';
|
|
1
|
+
import { EditorLayoutDocument, EditorState, EditorTableNode } from '../../../core/model.js';
|
|
2
|
+
import { CanvasLayoutSnapshotProvider } from '../../../ui/canvas/canvasLayoutSnapshotProvider.js';
|
|
2
3
|
import { TableGeometry } from './tableResizeTypes.js';
|
|
3
4
|
|
|
4
5
|
export declare function getTableById(state: EditorState, tableId: string): EditorTableNode | null;
|
|
5
|
-
export declare function buildTableGeometries(surface: HTMLElement, state: EditorState): TableGeometry[];
|
|
6
|
+
export declare function buildTableGeometries(surface: HTMLElement, state: EditorState, documentLayout: EditorLayoutDocument, canvasSnapshotProvider: CanvasLayoutSnapshotProvider, zoomFactor?: number): TableGeometry[];
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { EditorState } from '../../../core/model.js';
|
|
1
|
+
import { EditorLayoutDocument, EditorState } from '../../../core/model.js';
|
|
2
|
+
import { CanvasLayoutSnapshotProvider } from '../../../ui/canvas/canvasLayoutSnapshotProvider.js';
|
|
2
3
|
import { ResizeHoverInfo } from './tableResizeTypes.js';
|
|
3
4
|
|
|
4
|
-
export declare function findTableResizeHoverInfo(event: MouseEvent, surface: HTMLElement, state: EditorState): ResizeHoverInfo | null;
|
|
5
|
+
export declare function findTableResizeHoverInfo(event: MouseEvent, surface: HTMLElement, state: EditorState, documentLayout: EditorLayoutDocument, canvasSnapshotProvider: CanvasLayoutSnapshotProvider, zoomFactor?: number): ResizeHoverInfo | null;
|
|
@@ -19,6 +19,8 @@ export interface LayoutInvalidation {
|
|
|
19
19
|
export declare function useEditorLayout(props: UseEditorLayoutProps): {
|
|
20
20
|
measuredBlockHeights: import('solid-js').Accessor<Record<string, number>>;
|
|
21
21
|
measuredParagraphLayouts: import('solid-js').Accessor<Record<string, EditorLayoutParagraph>>;
|
|
22
|
+
documentLayout: import('solid-js').Accessor<import('../../core/model.js').EditorLayoutDocument>;
|
|
23
|
+
canvasSnapshotProvider: import('../../ui/canvas/canvasLayoutSnapshotProvider.js').CanvasLayoutSnapshotProvider;
|
|
22
24
|
inputBox: import('solid-js').Accessor<InputBox>;
|
|
23
25
|
selectionBoxes: import('solid-js').Accessor<SelectionBox[]>;
|
|
24
26
|
commentHighlights: import('solid-js').Accessor<CommentHighlightBox[]>;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { EditorState } from '../../core/model.js';
|
|
1
|
+
import { EditorLayoutDocument, EditorState } from '../../core/model.js';
|
|
2
2
|
import { CaretBox } from '../../ui/editorUiTypes.js';
|
|
3
|
+
import { CanvasLayoutSnapshotProvider } from '../../ui/canvas/canvasLayoutSnapshotProvider.js';
|
|
3
4
|
|
|
4
5
|
export interface UseEditorNavigationProps {
|
|
5
6
|
state: () => EditorState;
|
|
@@ -12,6 +13,8 @@ export interface UseEditorNavigationProps {
|
|
|
12
13
|
clearPreferredColumn: () => void;
|
|
13
14
|
resetTransactionGrouping: () => void;
|
|
14
15
|
focusInput: () => void;
|
|
16
|
+
documentLayout: () => EditorLayoutDocument;
|
|
17
|
+
canvasSnapshotProvider: CanvasLayoutSnapshotProvider;
|
|
15
18
|
/**
|
|
16
19
|
* Current visual zoom factor. `desiredX` and the snapshot slots both live in
|
|
17
20
|
* "screen-anchored local" space, so the comparison stays correct once the
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Accessor } from 'solid-js';
|
|
2
|
+
import { EditorLayoutDocument, EditorState } from '../../core/model.js';
|
|
3
|
+
import { CanvasLayoutSnapshotProvider } from '../../ui/canvas/canvasLayoutSnapshotProvider.js';
|
|
2
4
|
import { TableResizeOps } from './tableResize/tableResizeTypes.js';
|
|
3
5
|
|
|
4
6
|
export { type TableResizeOps } from './tableResize/tableResizeTypes.js';
|
|
@@ -7,6 +9,8 @@ export declare function createEditorTableResize(deps: {
|
|
|
7
9
|
applyTransactionalState: (producer: (current: EditorState) => EditorState) => void;
|
|
8
10
|
surfaceRef: () => HTMLElement | undefined;
|
|
9
11
|
viewportRef: () => HTMLElement | undefined;
|
|
12
|
+
documentLayout: Accessor<EditorLayoutDocument>;
|
|
13
|
+
canvasSnapshotProvider: CanvasLayoutSnapshotProvider;
|
|
10
14
|
/** Visual zoom factor `z`; resize pointer deltas are divided by it. */
|
|
11
15
|
zoomFactor?: () => number;
|
|
12
16
|
}): TableResizeOps;
|