@orangecatai/adgen-canvas 0.0.23 → 0.0.24
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/dist/dev/{chunk-E6AX7UYW.js → chunk-3IT4IPF5.js} +23 -13
- package/dist/dev/chunk-3IT4IPF5.js.map +7 -0
- package/dist/dev/{chunk-4K5LIQQU.js → chunk-LIELFD5T.js} +2 -1
- package/dist/dev/chunk-LIELFD5T.js.map +7 -0
- package/dist/dev/{chunk-KNIBTSFD.js → chunk-T44CUBOH.js} +2 -2
- package/dist/dev/data/{image-WJAASDV4.js → image-CVNEYNEF.js} +3 -3
- package/dist/dev/index.css +824 -0
- package/dist/dev/index.css.map +3 -3
- package/dist/dev/index.js +3661 -1605
- package/dist/dev/index.js.map +4 -4
- package/dist/dev/locales/{en-IMRJ2ODG.js → en-VCZQBJ2N.js} +2 -2
- package/dist/dev/subset-shared.chunk.js +1 -1
- package/dist/dev/subset-worker.chunk.js +1 -1
- package/dist/prod/{chunk-TX6PVFUX.js → chunk-CLQPYXMS.js} +1 -1
- package/dist/prod/{chunk-GOHSI4TL.js → chunk-MFGXKFLH.js} +1 -1
- package/dist/prod/chunk-ZXE5XSJO.js +4 -0
- package/dist/prod/data/image-7TLJ6VAY.js +1 -0
- package/dist/prod/index.css +1 -1
- package/dist/prod/index.js +62 -62
- package/dist/prod/locales/{en-5WIO63S4.js → en-ZZURI326.js} +1 -1
- package/dist/prod/subset-shared.chunk.js +1 -1
- package/dist/prod/subset-worker.chunk.js +1 -1
- package/dist/types/common/src/constants.d.ts +4 -0
- package/dist/types/element/src/Scene.d.ts +1 -1
- package/dist/types/element/src/frame.d.ts +2 -2
- package/dist/types/element/src/newElement.d.ts +10 -1
- package/dist/types/element/src/typeChecks.d.ts +2 -1
- package/dist/types/element/src/types.d.ts +17 -2
- package/dist/types/excalidraw/actions/actionFrame.d.ts +41 -0
- package/dist/types/excalidraw/actions/actionLinearEditor.d.ts +41 -0
- package/dist/types/excalidraw/components/App.d.ts +10 -0
- package/dist/types/excalidraw/components/ImageGeneratorPanel.d.ts +14 -0
- package/dist/types/excalidraw/components/VideoElement.d.ts +9 -0
- package/dist/types/excalidraw/components/VideoGeneratorPanel.d.ts +149 -0
- package/dist/types/excalidraw/components/icons.d.ts +2 -0
- package/dist/types/excalidraw/components/main-menu/DefaultItems.d.ts +4 -0
- package/dist/types/excalidraw/data/blob.d.ts +4 -1
- package/dist/types/excalidraw/index.d.ts +4 -3
- package/dist/types/excalidraw/scene/types.d.ts +1 -0
- package/dist/types/excalidraw/types.d.ts +33 -0
- package/dist/types/excalidraw/utils/videoApi.d.ts +30 -0
- package/dist/types/utils/src/shape.d.ts +2 -2
- package/package.json +3 -3
- package/dist/dev/chunk-4K5LIQQU.js.map +0 -7
- package/dist/dev/chunk-E6AX7UYW.js.map +0 -7
- package/dist/prod/chunk-XIMYEPMA.js +0 -4
- package/dist/prod/data/image-QJTVNM22.js +0 -1
- /package/dist/dev/{chunk-KNIBTSFD.js.map → chunk-T44CUBOH.js.map} +0 -0
- /package/dist/dev/data/{image-WJAASDV4.js.map → image-CVNEYNEF.js.map} +0 -0
- /package/dist/dev/locales/{en-IMRJ2ODG.js.map → en-VCZQBJ2N.js.map} +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
define_import_meta_env_default
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-T44CUBOH.js";
|
|
4
4
|
import {
|
|
5
5
|
__publicField
|
|
6
6
|
} from "./chunk-XDFCUUT6.js";
|
|
@@ -15,6 +15,7 @@ import { EXPORT_DATA_TYPES as EXPORT_DATA_TYPES3, MIME_TYPES as MIME_TYPES7 } fr
|
|
|
15
15
|
import { nanoid } from "nanoid";
|
|
16
16
|
import {
|
|
17
17
|
IMAGE_MIME_TYPES,
|
|
18
|
+
VIDEO_MIME_TYPES,
|
|
18
19
|
MIME_TYPES as MIME_TYPES6,
|
|
19
20
|
bytesToHexString,
|
|
20
21
|
isPromiseLike
|
|
@@ -659,15 +660,6 @@ var saveAsJSON = async (elements, appState, files, name = appState.name || DEFAU
|
|
|
659
660
|
});
|
|
660
661
|
return { fileHandle };
|
|
661
662
|
};
|
|
662
|
-
var loadFromJSON = async (localAppState, localElements) => {
|
|
663
|
-
const file = await fileOpen({
|
|
664
|
-
description: "Excalidraw files"
|
|
665
|
-
// ToDo: Be over-permissive until https://bugs.webkit.org/show_bug.cgi?id=34442
|
|
666
|
-
// gets resolved. Else, iOS users cannot open `.excalidraw` files.
|
|
667
|
-
// extensions: ["json", "excalidraw", "png", "svg"],
|
|
668
|
-
});
|
|
669
|
-
return loadFromBlob(file, localAppState, localElements, file.handle);
|
|
670
|
-
};
|
|
671
663
|
var isValidExcalidrawData = (data) => {
|
|
672
664
|
return data?.type === EXPORT_DATA_TYPES.excalidraw && (!data.elements || Array.isArray(data.elements) && (!data.appState || typeof data.appState === "object"));
|
|
673
665
|
};
|
|
@@ -4782,6 +4774,16 @@ var restoreElement = (element, targetElementsMap, existingElementsMap, opts) =>
|
|
|
4782
4774
|
scale: element.scale || [1, 1],
|
|
4783
4775
|
crop: element.crop ?? null
|
|
4784
4776
|
});
|
|
4777
|
+
case "video":
|
|
4778
|
+
return restoreElementWithProperties(element, {
|
|
4779
|
+
videoUrl: element.videoUrl ?? null,
|
|
4780
|
+
status: element.status || "idle",
|
|
4781
|
+
mimeType: element.mimeType ?? null,
|
|
4782
|
+
thumbnailDataUrl: element.thumbnailDataUrl ?? null,
|
|
4783
|
+
duration: element.duration ?? 0,
|
|
4784
|
+
naturalWidth: element.naturalWidth ?? 0,
|
|
4785
|
+
naturalHeight: element.naturalHeight ?? 0
|
|
4786
|
+
});
|
|
4785
4787
|
case "line":
|
|
4786
4788
|
case "draw":
|
|
4787
4789
|
const { startArrowhead = null, endArrowhead = null } = element;
|
|
@@ -5150,7 +5152,7 @@ var parseFileContents = async (blob) => {
|
|
|
5150
5152
|
let contents;
|
|
5151
5153
|
if (blob.type === MIME_TYPES6.png) {
|
|
5152
5154
|
try {
|
|
5153
|
-
return await (await import("./data/image-
|
|
5155
|
+
return await (await import("./data/image-CVNEYNEF.js")).decodePngMetadata(blob);
|
|
5154
5156
|
} catch (error) {
|
|
5155
5157
|
if (error.message === "INVALID") {
|
|
5156
5158
|
throw new ImageSceneDataError(
|
|
@@ -5214,6 +5216,14 @@ var isSupportedImageFile = (blob) => {
|
|
|
5214
5216
|
const { type } = blob || {};
|
|
5215
5217
|
return isSupportedImageFileType(type);
|
|
5216
5218
|
};
|
|
5219
|
+
var isSupportedVideoFile = (blob) => {
|
|
5220
|
+
const { type } = blob || {};
|
|
5221
|
+
if (type && Object.values(VIDEO_MIME_TYPES).includes(type)) {
|
|
5222
|
+
return true;
|
|
5223
|
+
}
|
|
5224
|
+
const name = blob?.name?.toLowerCase() ?? "";
|
|
5225
|
+
return name.endsWith(".mp4") || name.endsWith(".mov");
|
|
5226
|
+
};
|
|
5217
5227
|
var loadSceneOrLibraryFromBlob = async (blob, localAppState, localElements, fileHandle) => {
|
|
5218
5228
|
const contents = await parseFileContents(blob);
|
|
5219
5229
|
let data;
|
|
@@ -5550,7 +5560,6 @@ export {
|
|
|
5550
5560
|
fileSave,
|
|
5551
5561
|
serializeAsJSON,
|
|
5552
5562
|
saveAsJSON,
|
|
5553
|
-
loadFromJSON,
|
|
5554
5563
|
serializeLibraryAsJSON,
|
|
5555
5564
|
saveLibraryAsJSON,
|
|
5556
5565
|
getLinkHandleFromCoords,
|
|
@@ -5577,6 +5586,7 @@ export {
|
|
|
5577
5586
|
isImageFileHandle,
|
|
5578
5587
|
isSupportedImageFileType,
|
|
5579
5588
|
isSupportedImageFile,
|
|
5589
|
+
isSupportedVideoFile,
|
|
5580
5590
|
loadSceneOrLibraryFromBlob,
|
|
5581
5591
|
loadFromBlob,
|
|
5582
5592
|
parseLibraryJSON,
|
|
@@ -5594,4 +5604,4 @@ export {
|
|
|
5594
5604
|
createFile,
|
|
5595
5605
|
normalizeFile
|
|
5596
5606
|
};
|
|
5597
|
-
//# sourceMappingURL=chunk-
|
|
5607
|
+
//# sourceMappingURL=chunk-3IT4IPF5.js.map
|