@myoc/excalidraw 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.
- package/CHANGELOG.md +53 -0
- package/dist/dev/{chunk-FQHULQ5P.js → chunk-MN6E45MP.js} +3 -3
- package/dist/dev/{chunk-SJJUXTTF.js → chunk-P7I4FGOG.js} +2 -2
- package/dist/dev/data/{image-X3JCQEUX.js → image-ZYGVHYLC.js} +3 -3
- package/dist/dev/index.js +145 -63
- 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-YJSNILE6.js → chunk-BNYGVLQX.js} +2 -2
- package/dist/prod/{chunk-3QXZ5NQO.js → chunk-ZYOK2JIN.js} +1 -1
- package/dist/prod/data/image-OFIWDJ6Z.js +1 -0
- package/dist/prod/index.js +17 -17
- package/dist/prod/subset-shared.chunk.js +1 -1
- package/dist/prod/subset-worker.chunk.js +1 -1
- package/dist/types/excalidraw/clipboard.d.ts +34 -0
- package/dist/types/excalidraw/index.d.ts +2 -0
- package/dist/types/excalidraw/types.d.ts +2 -0
- package/package.json +4 -4
- package/dist/prod/data/image-OBEPGJLJ.js +0 -1
- /package/dist/dev/{chunk-FQHULQ5P.js.map → chunk-MN6E45MP.js.map} +0 -0
- /package/dist/dev/{chunk-SJJUXTTF.js.map → chunk-P7I4FGOG.js.map} +0 -0
- /package/dist/dev/data/{image-X3JCQEUX.js.map → image-ZYGVHYLC.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-ZYOK2JIN.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-ZYOK2JIN.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};
|
|
@@ -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>;
|
|
@@ -27,6 +27,7 @@ export { reconcileElements } from "./data/reconcile";
|
|
|
27
27
|
export { exportToCanvas, exportToBlob, exportToSvg, exportToClipboard, } from "@excalidraw/utils/export";
|
|
28
28
|
export { serializeAsJSON } from "./data/json";
|
|
29
29
|
export { loadFromBlob } from "./data/blob";
|
|
30
|
+
export { captureDragEventData, parseDataTransferEvent, parseDragImageMetadata, } from "./clipboard";
|
|
30
31
|
export { isLinearElement } from "@excalidraw/element";
|
|
31
32
|
export { FONT_FAMILY, THEME, MIME_TYPES, ROUNDNESS, DEFAULT_LASER_COLOR, UserIdleState, normalizeLink, sceneCoordsToViewportCoords, viewportCoordsToSceneCoords, getFormFactor, throttleRAF, } from "@excalidraw/common";
|
|
32
33
|
export { mutateElement, newElementWith, bumpVersion, } from "@excalidraw/element";
|
|
@@ -50,6 +51,7 @@ export { isElementLink } from "@excalidraw/element";
|
|
|
50
51
|
export { Fonts } from "./fonts/Fonts";
|
|
51
52
|
export { setCustomTextMetricsProvider } from "@excalidraw/element";
|
|
52
53
|
export type { ArrangePreferences, CompressImageFile, CompressImageFileOpts, EditorPreferences, ImageContextMenuItem, NormalisePreferences, SmartZoomPreferences, } from "./types";
|
|
54
|
+
export type { DragImageMetadata, ParsedDataTranferList, ParsedDataTransferFile, DragDataSnapshot, RawDragData, } from "./clipboard";
|
|
53
55
|
export { renderSpreadsheet, tryParseSpreadsheet, isSpreadsheetValidForChartType, } from "./charts";
|
|
54
56
|
/**
|
|
55
57
|
* hook that subscribes to specific appState prop(s)
|
|
@@ -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/excalidraw",
|
|
3
|
-
"version": "0.19.
|
|
3
|
+
"version": "0.19.521",
|
|
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.521",
|
|
112
|
+
"@excalidraw/math": "npm:@myoc/math@0.19.521",
|
|
113
|
+
"@excalidraw/element": "npm:@myoc/element@0.19.521"
|
|
114
114
|
},
|
|
115
115
|
"devDependencies": {
|
|
116
116
|
"@size-limit/preset-big-lib": "9.0.0",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{Q as a,R as b,S as c}from"../chunk-YJSNILE6.js";import"../chunk-3QXZ5NQO.js";import"../chunk-SRAX5OIU.js";export{c as decodePngMetadata,b as encodePngMetadata,a as getTEXtChunk};
|
|
File without changes
|
|
File without changes
|
|
File without changes
|