@myoc/element 0.19.520 → 0.19.521
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.
|
@@ -88,9 +88,43 @@ export type ParsedDataTranferList = ParsedDataTransferItem[] & {
|
|
|
88
88
|
getData: typeof getDataTransferItemData;
|
|
89
89
|
getFiles: typeof getDataTransferFiles;
|
|
90
90
|
};
|
|
91
|
+
export type DragDataSnapshot = {
|
|
92
|
+
items: {
|
|
93
|
+
kind: string;
|
|
94
|
+
type: string;
|
|
95
|
+
}[];
|
|
96
|
+
files: {
|
|
97
|
+
name: string;
|
|
98
|
+
type: string;
|
|
99
|
+
size: number;
|
|
100
|
+
lastModified?: number;
|
|
101
|
+
}[];
|
|
102
|
+
types: string[];
|
|
103
|
+
data: Record<string, string>;
|
|
104
|
+
};
|
|
105
|
+
export type RawDragData = DragDataSnapshot & {
|
|
106
|
+
parsedItems: {
|
|
107
|
+
kind: string;
|
|
108
|
+
type: string;
|
|
109
|
+
value?: string;
|
|
110
|
+
file?: {
|
|
111
|
+
name: string;
|
|
112
|
+
type: string;
|
|
113
|
+
size: number;
|
|
114
|
+
lastModified?: number;
|
|
115
|
+
};
|
|
116
|
+
}[];
|
|
117
|
+
};
|
|
118
|
+
export type DragImageMetadata = Record<string, unknown> & {
|
|
119
|
+
src?: string;
|
|
120
|
+
alt?: string;
|
|
121
|
+
rawDragData?: RawDragData;
|
|
122
|
+
};
|
|
91
123
|
declare const findDataTransferItemType: <T extends ValueOf<typeof STRING_MIME_TYPES>>(this: ParsedDataTranferList, type: T) => ParsedDataTransferItemType<T> | null;
|
|
92
124
|
declare const getDataTransferItemData: <T extends ValueOf<typeof STRING_MIME_TYPES>>(this: ParsedDataTranferList, type: T) => ParsedDataTransferItemType<ValueOf<typeof STRING_MIME_TYPES>>["value"] | null;
|
|
93
125
|
declare const getDataTransferFiles: (this: ParsedDataTranferList) => ParsedDataTransferFile[];
|
|
126
|
+
export declare const captureDragEventData: (event: ClipboardEvent | DragEvent | React.DragEvent<HTMLDivElement>) => DragDataSnapshot;
|
|
127
|
+
export declare const parseDragImageMetadata: (dataTransferList: ParsedDataTranferList, imageCount: number, dragDataSnapshot?: DragDataSnapshot) => DragImageMetadata[];
|
|
94
128
|
/** @returns list of MIME types, synchronously */
|
|
95
129
|
export declare const parseDataTransferEventMimeTypes: (event: ClipboardEvent | DragEvent | React.DragEvent<HTMLDivElement>) => Set<string>;
|
|
96
130
|
export declare const parseDataTransferEvent: (event: ClipboardEvent | DragEvent | React.DragEvent<HTMLDivElement>) => Promise<ParsedDataTranferList>;
|
|
@@ -543,6 +543,8 @@ export interface ExcalidrawProps {
|
|
|
543
543
|
nativeEvent: MouseEvent | React.PointerEvent<HTMLCanvasElement>;
|
|
544
544
|
}>) => void;
|
|
545
545
|
imageContextMenuItems?: (imageIds: readonly ExcalidrawElement["id"][]) => readonly ImageContextMenuItem[];
|
|
546
|
+
/** @internal Myoc app-only diagnostics for mobile drag/drop payloads. */
|
|
547
|
+
showDropEventDebugAlert?: boolean;
|
|
546
548
|
onPointerDown?: (activeTool: AppState["activeTool"], pointerDownState: PointerDownState) => void;
|
|
547
549
|
onPointerUp?: (activeTool: AppState["activeTool"], pointerDownState: PointerDownState) => void;
|
|
548
550
|
onScrollChange?: (scrollX: number, scrollY: number, zoom: Zoom) => void;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@myoc/element",
|
|
3
|
-
"version": "0.19.
|
|
3
|
+
"version": "0.19.521",
|
|
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.
|
|
68
|
-
"@excalidraw/fractional-indexing": "npm:@myoc/fractional-indexing@0.19.
|
|
69
|
-
"@excalidraw/math": "npm:@myoc/math@0.19.
|
|
67
|
+
"@excalidraw/common": "npm:@myoc/common@0.19.521",
|
|
68
|
+
"@excalidraw/fractional-indexing": "npm:@myoc/fractional-indexing@0.19.521",
|
|
69
|
+
"@excalidraw/math": "npm:@myoc/math@0.19.521",
|
|
70
70
|
"thumbhash": "0.1.1"
|
|
71
71
|
}
|
|
72
72
|
}
|