@myoc/excalidraw 0.19.512 → 0.19.514
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/CHANGELOG.md +53 -0
- package/dist/dev/{chunk-OBLRXIUK.js → chunk-BI6BDZVY.js} +3 -3
- package/dist/dev/{chunk-QHLG4OQL.js → chunk-FW62QUKV.js} +2 -2
- package/dist/dev/data/{image-R7FQP7SA.js → image-WGZL7YPK.js} +3 -3
- package/dist/dev/index.js +101 -17
- package/dist/dev/index.js.map +2 -2
- package/dist/dev/subset-shared.chunk.js +1 -1
- package/dist/dev/subset-worker.chunk.js +1 -1
- package/dist/prod/{chunk-5JM5RIGS.js → chunk-56AUOKVR.js} +2 -2
- package/dist/prod/{chunk-KVNPEVSY.js → chunk-NVT4BTJO.js} +1 -1
- package/dist/prod/data/image-ZQZIDAZL.js +1 -0
- package/dist/prod/index.js +16 -16
- package/dist/prod/subset-shared.chunk.js +1 -1
- package/dist/prod/subset-worker.chunk.js +1 -1
- package/dist/types/excalidraw/components/App.d.ts +1 -0
- package/dist/types/excalidraw/components/ContextMenu.d.ts +6 -1
- package/dist/types/excalidraw/index.d.ts +1 -1
- package/dist/types/excalidraw/types.d.ts +7 -2
- package/package.json +4 -4
- package/dist/prod/data/image-HP6HSTQ2.js +0 -1
- /package/dist/dev/{chunk-OBLRXIUK.js.map → chunk-BI6BDZVY.js.map} +0 -0
- /package/dist/dev/{chunk-QHLG4OQL.js.map → chunk-FW62QUKV.js.map} +0 -0
- /package/dist/dev/data/{image-R7FQP7SA.js.map → image-WGZL7YPK.js.map} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a,b,c,d}from"./chunk-Z5NKEFVG.js";import"./chunk-
|
|
1
|
+
import{a,b,c,d}from"./chunk-Z5NKEFVG.js";import"./chunk-NVT4BTJO.js";import"./chunk-SRAX5OIU.js";export{a as Commands,b as subsetToBase64,c as subsetToBinary,d as toBase64};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as r,c as t}from"./chunk-Z5NKEFVG.js";import"./chunk-
|
|
1
|
+
import{a as r,c as t}from"./chunk-Z5NKEFVG.js";import"./chunk-NVT4BTJO.js";import"./chunk-SRAX5OIU.js";var s=import.meta.url?new URL(import.meta.url):void 0;typeof window>"u"&&typeof self<"u"&&(self.onmessage=async e=>{switch(e.data.command){case r.Subset:let a=await t(e.data.arrayBuffer,e.data.codePoints);self.postMessage(a,{transfer:[a]});break}});export{s as WorkerUrl};
|
|
@@ -592,6 +592,7 @@ declare class App extends React.Component<AppProps, AppState> {
|
|
|
592
592
|
private maybeHandleCrop;
|
|
593
593
|
private maybeHandleResize;
|
|
594
594
|
private getContextMenuItems;
|
|
595
|
+
private getImageContextMenuItems;
|
|
595
596
|
private handleWheel;
|
|
596
597
|
private getTextWysiwygSnappedToCenterPosition;
|
|
597
598
|
private savePointer;
|
|
@@ -2,7 +2,12 @@ import React from "react";
|
|
|
2
2
|
import "./ContextMenu.scss";
|
|
3
3
|
import type { ActionManager } from "../actions/manager";
|
|
4
4
|
import type { Action } from "../actions/types";
|
|
5
|
-
export type
|
|
5
|
+
export type ContextMenuCustomItem = {
|
|
6
|
+
key: string;
|
|
7
|
+
label: string;
|
|
8
|
+
onSelect: () => void;
|
|
9
|
+
};
|
|
10
|
+
export type ContextMenuItem = typeof CONTEXT_MENU_SEPARATOR | Action | ContextMenuCustomItem;
|
|
6
11
|
export type ContextMenuItems = (ContextMenuItem | false | null | undefined)[];
|
|
7
12
|
type ContextMenuProps = {
|
|
8
13
|
actionManager: ActionManager;
|
|
@@ -48,7 +48,7 @@ export { getDataURL } from "./data/blob";
|
|
|
48
48
|
export { isElementLink } from "@excalidraw/element";
|
|
49
49
|
export { Fonts } from "./fonts/Fonts";
|
|
50
50
|
export { setCustomTextMetricsProvider } from "@excalidraw/element";
|
|
51
|
-
export type { ArrangePreferences, CompressImageFile, CompressImageFileOpts, EditorPreferences, NormalisePreferences, SmartZoomPreferences, } from "./types";
|
|
51
|
+
export type { ArrangePreferences, CompressImageFile, CompressImageFileOpts, EditorPreferences, ImageContextMenuItem, NormalisePreferences, SmartZoomPreferences, } from "./types";
|
|
52
52
|
export { renderSpreadsheet, tryParseSpreadsheet, isSpreadsheetValidForChartType, } from "./charts";
|
|
53
53
|
/**
|
|
54
54
|
* hook that subscribes to specific appState prop(s)
|
|
@@ -9,7 +9,7 @@ import type { Action } from "./actions/types";
|
|
|
9
9
|
import type { Spreadsheet } from "./charts";
|
|
10
10
|
import type { ClipboardData } from "./clipboard";
|
|
11
11
|
import type App from "./components/App";
|
|
12
|
-
import type { ContextMenuItems } from "./components/ContextMenu";
|
|
12
|
+
import type { ContextMenuCustomItem, ContextMenuItems } from "./components/ContextMenu";
|
|
13
13
|
import type { SnapLine } from "./snapping";
|
|
14
14
|
import type { ImportedDataState } from "./data/types";
|
|
15
15
|
import type { Language } from "./i18n";
|
|
@@ -83,6 +83,7 @@ export type BinaryFileData = {
|
|
|
83
83
|
};
|
|
84
84
|
export type BinaryFileMetadata = Omit<BinaryFileData, "dataURL">;
|
|
85
85
|
export type BinaryFiles = Record<ExcalidrawElement["id"], BinaryFileData>;
|
|
86
|
+
export type ImageContextMenuItem = ContextMenuCustomItem;
|
|
86
87
|
export type ToolType = "selection" | "lasso" | "rectangle" | "diamond" | "ellipse" | "arrow" | "line" | "freedraw" | "text" | "image" | "eraser" | "hand" | "frame" | "magicframe" | "embeddable" | "laser";
|
|
87
88
|
export type ElementOrToolType = ExcalidrawElementType | ToolType | "custom";
|
|
88
89
|
export type ActiveTool = {
|
|
@@ -534,6 +535,7 @@ export interface ExcalidrawProps {
|
|
|
534
535
|
onLinkOpen?: (element: NonDeletedExcalidrawElement, event: CustomEvent<{
|
|
535
536
|
nativeEvent: MouseEvent | React.PointerEvent<HTMLCanvasElement>;
|
|
536
537
|
}>) => void;
|
|
538
|
+
imageContextMenuItems?: (imageIds: readonly ExcalidrawElement["id"][]) => readonly ImageContextMenuItem[];
|
|
537
539
|
onPointerDown?: (activeTool: AppState["activeTool"], pointerDownState: PointerDownState) => void;
|
|
538
540
|
onPointerUp?: (activeTool: AppState["activeTool"], pointerDownState: PointerDownState) => void;
|
|
539
541
|
onScrollChange?: (scrollX: number, scrollY: number, zoom: Zoom) => void;
|
|
@@ -763,7 +765,10 @@ export interface ExcalidrawImperativeAPI {
|
|
|
763
765
|
refresh: InstanceType<typeof App>["refresh"];
|
|
764
766
|
setToast: InstanceType<typeof App>["setToast"];
|
|
765
767
|
addFiles: (data: BinaryFileData[]) => void;
|
|
766
|
-
addImageElementsToScene: (imageFiles:
|
|
768
|
+
addImageElementsToScene: (imageFiles: {
|
|
769
|
+
file: File;
|
|
770
|
+
customData: Record<string, any>;
|
|
771
|
+
}[], sceneX: number, sceneY: number) => Promise<void>;
|
|
767
772
|
id: string;
|
|
768
773
|
setActiveTool: InstanceType<typeof App>["setActiveTool"];
|
|
769
774
|
setCursor: InstanceType<typeof App>["setCursor"];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@myoc/excalidraw",
|
|
3
|
-
"version": "0.19.
|
|
3
|
+
"version": "0.19.514",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"types": "./dist/types/excalidraw/index.d.ts",
|
|
6
6
|
"main": "./dist/prod/index.js",
|
|
@@ -108,9 +108,9 @@
|
|
|
108
108
|
"roughjs": "4.6.4",
|
|
109
109
|
"sass": "1.51.0",
|
|
110
110
|
"tunnel-rat": "0.1.2",
|
|
111
|
-
"@excalidraw/common": "npm:@myoc/common@0.19.
|
|
112
|
-
"@excalidraw/math": "npm:@myoc/math@0.19.
|
|
113
|
-
"@excalidraw/element": "npm:@myoc/element@0.19.
|
|
111
|
+
"@excalidraw/common": "npm:@myoc/common@0.19.514",
|
|
112
|
+
"@excalidraw/math": "npm:@myoc/math@0.19.514",
|
|
113
|
+
"@excalidraw/element": "npm:@myoc/element@0.19.514"
|
|
114
114
|
},
|
|
115
115
|
"devDependencies": {
|
|
116
116
|
"@size-limit/preset-big-lib": "9.0.0",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{P as a,Q as b,R as c}from"../chunk-5JM5RIGS.js";import"../chunk-KVNPEVSY.js";import"../chunk-SRAX5OIU.js";export{c as decodePngMetadata,b as encodePngMetadata,a as getTEXtChunk};
|
|
File without changes
|
|
File without changes
|
|
File without changes
|