@myoc/math 0.19.523 → 0.19.524
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.
|
@@ -2,7 +2,7 @@ import React from "react";
|
|
|
2
2
|
import { AppEventBus, type EXPORT_IMAGE_TYPES, Emitter, type EditorInterface, type StylesPanelMode } from "@excalidraw/common";
|
|
3
3
|
import { LinearElementEditor, Scene, Store, type ElementUpdate, StoreDelta, type ApplyToOptions } from "@excalidraw/element";
|
|
4
4
|
import type { LocalPoint, Radians } from "@excalidraw/math";
|
|
5
|
-
import type { ExcalidrawElement, ExcalidrawTextElement, NonDeleted, FileId, NonDeletedExcalidrawElement, ExcalidrawTextContainer, ExcalidrawFrameLikeElement,
|
|
5
|
+
import type { ExcalidrawElement, ExcalidrawTextElement, NonDeleted, FileId, NonDeletedExcalidrawElement, ExcalidrawTextContainer, ExcalidrawFrameLikeElement, ExcalidrawEmbeddableElement, Ordered, SceneElementsMap } from "@excalidraw/element/types";
|
|
6
6
|
import type { Mutable } from "@excalidraw/common/utility-types";
|
|
7
7
|
import { ActionManager } from "../actions/manager";
|
|
8
8
|
import { History } from "../history";
|
|
@@ -124,6 +124,7 @@ declare class App extends React.Component<AppProps, AppState> {
|
|
|
124
124
|
bucketFill: AppBucketFill;
|
|
125
125
|
flowchart: AppFlowchart;
|
|
126
126
|
cursor: AppCursor;
|
|
127
|
+
private zDragZoom;
|
|
127
128
|
arrowText: AppArrowText;
|
|
128
129
|
viewport: AppViewport;
|
|
129
130
|
get lastViewportPosition(): {
|
|
@@ -815,6 +816,7 @@ declare class App extends React.Component<AppProps, AppState> {
|
|
|
815
816
|
private maybeUpdateFrameToHighlightOnPointerMove;
|
|
816
817
|
insertNewElements: (elements: readonly ExcalidrawElement[]) => void;
|
|
817
818
|
insertNewElement: (element: ExcalidrawElement) => void;
|
|
819
|
+
private updateZDragZoom;
|
|
818
820
|
private handleCanvasPointerMove;
|
|
819
821
|
private handleEraser;
|
|
820
822
|
private handleTouchMove;
|
|
@@ -852,7 +854,7 @@ declare class App extends React.Component<AppProps, AppState> {
|
|
|
852
854
|
sceneY: number;
|
|
853
855
|
width: number;
|
|
854
856
|
height: number;
|
|
855
|
-
}) => NonDeleted<ExcalidrawIframeElement>;
|
|
857
|
+
}) => NonDeleted<import("@excalidraw/element/types").ExcalidrawIframeElement>;
|
|
856
858
|
insertEmbeddableElement: ({ sceneX, sceneY, link, }: {
|
|
857
859
|
sceneX: number;
|
|
858
860
|
sceneY: number;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { MarkOptional } from "@excalidraw/common/utility-types";
|
|
2
|
+
import "../components/dropdownMenu/DropdownMenu.scss";
|
|
3
|
+
import type { SidebarProps, SidebarTriggerProps } from "./Sidebar/common";
|
|
4
|
+
export declare const DefaultSidebar: import("react").FC<Omit<MarkOptional<Omit<{
|
|
5
|
+
name: import("../types").SidebarName;
|
|
6
|
+
children: React.ReactNode;
|
|
7
|
+
onStateChange?: (state: import("../types").AppState["openSidebar"]) => void;
|
|
8
|
+
onDock?: (docked: boolean) => void;
|
|
9
|
+
docked?: boolean;
|
|
10
|
+
className?: string;
|
|
11
|
+
__fallback?: boolean;
|
|
12
|
+
}, "name">, "children">, "onDock"> & {
|
|
13
|
+
/** pass `false` to disable docking */
|
|
14
|
+
onDock?: SidebarProps["onDock"] | false;
|
|
15
|
+
} & {
|
|
16
|
+
__fallback?: boolean;
|
|
17
|
+
}> & {
|
|
18
|
+
Trigger: import("react").FC<Omit<SidebarTriggerProps, "name"> & import("react").HTMLAttributes<HTMLDivElement> & {
|
|
19
|
+
__fallback?: boolean;
|
|
20
|
+
}>;
|
|
21
|
+
TabTriggers: {
|
|
22
|
+
({ children }: {
|
|
23
|
+
children: React.ReactNode;
|
|
24
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
25
|
+
displayName: string;
|
|
26
|
+
};
|
|
27
|
+
};
|
|
@@ -57,6 +57,11 @@ export type SetViewportOptions = {
|
|
|
57
57
|
* combination. See {@link ViewportOffsets}.
|
|
58
58
|
*/
|
|
59
59
|
offsets?: ViewportOffsets;
|
|
60
|
+
/**
|
|
61
|
+
* Multiplier applied to fit zooms to leave extra breathing room around the
|
|
62
|
+
* target. Ignored for `fit: "none"`.
|
|
63
|
+
*/
|
|
64
|
+
viewportZoomFactor?: number;
|
|
60
65
|
};
|
|
61
66
|
type Viewport = Pick<AppState, "scrollX" | "scrollY" | "zoom">;
|
|
62
67
|
/**
|
|
@@ -73,7 +78,7 @@ export declare const constrainScrollState: (state: Pick<AppState, "scrollX" | "s
|
|
|
73
78
|
* cancelling the other.
|
|
74
79
|
*/
|
|
75
80
|
export declare const getViewportForZoomWithScrollConstraints: (opts: ZoomOptions, state: AppState) => Viewport;
|
|
76
|
-
export declare const zoomToFitBounds: ({ bounds, appState, canvasOffsets, fit, minZoom, maxZoom, steppedZoom, }: {
|
|
81
|
+
export declare const zoomToFitBounds: ({ bounds, appState, canvasOffsets, fit, minZoom, maxZoom, steppedZoom, viewportZoomFactor, }: {
|
|
77
82
|
bounds: SceneBounds;
|
|
78
83
|
canvasOffsets?: Offsets;
|
|
79
84
|
appState: Readonly<AppState>;
|
|
@@ -81,6 +86,7 @@ export declare const zoomToFitBounds: ({ bounds, appState, canvasOffsets, fit, m
|
|
|
81
86
|
minZoom?: number;
|
|
82
87
|
maxZoom?: number;
|
|
83
88
|
steppedZoom?: boolean;
|
|
89
|
+
viewportZoomFactor?: number;
|
|
84
90
|
}) => {
|
|
85
91
|
appState: {
|
|
86
92
|
scrollX: number;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@myoc/math",
|
|
3
|
-
"version": "0.19.
|
|
3
|
+
"version": "0.19.524",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"types": "./dist/types/math/src/index.d.ts",
|
|
6
6
|
"main": "./dist/prod/index.js",
|
|
@@ -62,6 +62,6 @@
|
|
|
62
62
|
"build:esm": "rimraf dist && node ../../scripts/buildBase.js && yarn gen:types"
|
|
63
63
|
},
|
|
64
64
|
"dependencies": {
|
|
65
|
-
"@excalidraw/common": "npm:@myoc/common@0.19.
|
|
65
|
+
"@excalidraw/common": "npm:@myoc/common@0.19.524"
|
|
66
66
|
}
|
|
67
67
|
}
|