@myoc/element 0.19.540 → 0.19.542

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.
@@ -1,16 +1,78 @@
1
- export declare const actionSmartZoom: {
2
- name: "smartZoom";
3
- label: string;
4
- trackEvent: {
5
- category: "toolbar";
1
+ import type { ExcalidrawElement, NonDeletedExcalidrawElement, NonDeletedSceneElementsMap } from "@excalidraw/element/types";
2
+ type SmartZoomTarget = readonly ExcalidrawElement[];
3
+ export declare const getNextSmartZoomImage: (elements: readonly NonDeletedExcalidrawElement[], elementsMap: NonDeletedSceneElementsMap, currentImageId: ExcalidrawElement["id"] | null, direction: "previous" | "next") => (Readonly<{
4
+ id: string;
5
+ x: number;
6
+ y: number;
7
+ strokeColor: string;
8
+ backgroundColor: string;
9
+ fillStyle: import("@excalidraw/element/types").FillStyle;
10
+ strokeWidth: number;
11
+ strokeStyle: import("@excalidraw/element/types").StrokeStyle;
12
+ roundness: null | {
13
+ type: import("@excalidraw/element/types").RoundnessType;
14
+ value?: number;
6
15
  };
7
- icon: import("react/jsx-runtime").JSX.Element;
8
- viewMode: true;
9
- perform: (elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[], appState: Readonly<import("../types").AppState>, _: unknown, app: import("../types").AppClassProperties) => {
10
- captureUpdate: "NEVER";
16
+ roughness: number;
17
+ opacity: number;
18
+ width: number;
19
+ height: number;
20
+ angle: import("@excalidraw/math").Radians;
21
+ seed: number;
22
+ version: number;
23
+ versionNonce: number;
24
+ index: import("@excalidraw/element/types").FractionalIndex | null;
25
+ isDeleted: boolean;
26
+ groupIds: readonly import("@excalidraw/element/types").GroupId[];
27
+ frameId: string | null;
28
+ boundElements: readonly import("@excalidraw/element/types").BoundElement[] | null;
29
+ updated: number;
30
+ link: string | null;
31
+ locked: boolean;
32
+ customData?: Record<string, any>;
33
+ }> & Readonly<{
34
+ type: "image";
35
+ fileId: import("@excalidraw/element/types").FileId | null;
36
+ fileName: string | null;
37
+ thumbHash: string | null;
38
+ status: "pending" | "saved" | "error";
39
+ scale: [number, number];
40
+ crop: import("@excalidraw/element/types").ImageCrop | null;
41
+ gifPlayback: import("@excalidraw/element/types").ExcalidrawGifPlayback | null;
42
+ }> & {
43
+ isDeleted: false;
44
+ } & Readonly<{
45
+ id: string;
46
+ x: number;
47
+ y: number;
48
+ strokeColor: string;
49
+ backgroundColor: string;
50
+ fillStyle: import("@excalidraw/element/types").FillStyle;
51
+ strokeWidth: number;
52
+ strokeStyle: import("@excalidraw/element/types").StrokeStyle;
53
+ roundness: null | {
54
+ type: import("@excalidraw/element/types").RoundnessType;
55
+ value?: number;
11
56
  };
12
- keyTest: (event: import("react").KeyboardEvent<Element> | KeyboardEvent) => boolean;
13
- PanelComponent: ({ data, updateData }: import("./types").PanelComponentProps) => import("react/jsx-runtime").JSX.Element;
14
- } & {
15
- keyTest?: ((event: import("react").KeyboardEvent<Element> | KeyboardEvent) => boolean) | undefined;
57
+ roughness: number;
58
+ opacity: number;
59
+ width: number;
60
+ height: number;
61
+ angle: import("@excalidraw/math").Radians;
62
+ seed: number;
63
+ version: number;
64
+ versionNonce: number;
65
+ index: import("@excalidraw/element/types").FractionalIndex | null;
66
+ isDeleted: boolean;
67
+ groupIds: readonly import("@excalidraw/element/types").GroupId[];
68
+ frameId: string | null;
69
+ boundElements: readonly import("@excalidraw/element/types").BoundElement[] | null;
70
+ updated: number;
71
+ link: string | null;
72
+ locked: boolean;
73
+ customData?: Record<string, any>;
74
+ }>) | null;
75
+ export declare const actionSmartZoom: import("./types").Action<SmartZoomTarget | null> & {
76
+ keyTest?: ((event: React.KeyboardEvent | KeyboardEvent, appState: import("../types").AppState, elements: readonly ExcalidrawElement[], app: import("../types").AppClassProperties) => boolean) | undefined;
16
77
  };
78
+ export {};
@@ -145,6 +145,7 @@ declare class App extends React.Component<AppProps, AppState> {
145
145
  y: number;
146
146
  } | null;
147
147
  private lastCompletedCanvasClicks;
148
+ private lastKeyboardSmartZoomImageId;
148
149
  /** previous frame pointer coords */
149
150
  previousPointerMoveCoords: {
150
151
  x: number;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@myoc/element",
3
- "version": "0.19.540",
3
+ "version": "0.19.542",
4
4
  "type": "module",
5
5
  "types": "./dist/types/element/src/index.d.ts",
6
6
  "main": "./dist/prod/index.js",
@@ -64,9 +64,9 @@
64
64
  "build:esm": "rimraf dist && node ../../scripts/buildBase.js && yarn gen:types"
65
65
  },
66
66
  "dependencies": {
67
- "@excalidraw/common": "npm:@myoc/common@0.19.540",
68
- "@excalidraw/fractional-indexing": "npm:@myoc/fractional-indexing@0.19.540",
69
- "@excalidraw/math": "npm:@myoc/math@0.19.540",
67
+ "@excalidraw/common": "npm:@myoc/common@0.19.542",
68
+ "@excalidraw/fractional-indexing": "npm:@myoc/fractional-indexing@0.19.542",
69
+ "@excalidraw/math": "npm:@myoc/math@0.19.542",
70
70
  "modern-gif": "2.1.0",
71
71
  "thumbhash": "0.1.1"
72
72
  }