From af93cedc0883155759372a43887101889105305a Mon Sep 17 00:00:00 2001 From: Achille Lacoin Date: Wed, 27 Apr 2022 10:49:02 +0200 Subject: [PATCH] EXCALIDRAW_EXPORT_SOURCE_PATH -> EXCALIDRAW_EXPORT_SOURCE (#5102) --- src/constants.ts | 2 +- src/global.d.ts | 2 +- src/packages/excalidraw/CHANGELOG.md | 2 +- src/packages/excalidraw/README_NEXT.md | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/constants.ts b/src/constants.ts index 83c70cb6..47bbc8ae 100644 --- a/src/constants.ts +++ b/src/constants.ts @@ -109,7 +109,7 @@ export const EXPORT_DATA_TYPES = { } as const; export const EXPORT_SOURCE = - window.EXCALIDRAW_EXPORT_SOURCE_PATH || window.location.origin; + window.EXCALIDRAW_EXPORT_SOURCE || window.location.origin; // time in milliseconds export const IMAGE_RENDER_TIMEOUT = 500; diff --git a/src/global.d.ts b/src/global.d.ts index a5cc0de5..dbaf3922 100644 --- a/src/global.d.ts +++ b/src/global.d.ts @@ -13,7 +13,7 @@ interface Window { ClipboardItem: any; __EXCALIDRAW_SHA__: string | undefined; EXCALIDRAW_ASSET_PATH: string | undefined; - EXCALIDRAW_EXPORT_SOURCE_PATH: string; + EXCALIDRAW_EXPORT_SOURCE: string; gtag: Function; } diff --git a/src/packages/excalidraw/CHANGELOG.md b/src/packages/excalidraw/CHANGELOG.md index 02bdebcc..b4ed48cb 100644 --- a/src/packages/excalidraw/CHANGELOG.md +++ b/src/packages/excalidraw/CHANGELOG.md @@ -17,7 +17,7 @@ Please add the latest change on the top under the correct section. #### Features -- Expose `window.EXCALIDRAW_EXPORT_SOURCE_PATH` which you can use to overwrite the `source` field in exported data [#5095](https://github.com/excalidraw/excalidraw/pull/5095). +- Expose `window.EXCALIDRAW_EXPORT_SOURCE` which you can use to overwrite the `source` field in exported data [#5095](https://github.com/excalidraw/excalidraw/pull/5095). - The `exportToBlob` utility now supports the `exportEmbedScene` option when generating a png image [#5047](https://github.com/excalidraw/excalidraw/pull/5047). - Exported [`restoreLibraryItems`](https://github.com/excalidraw/excalidraw/blob/master/src/packages/excalidraw/README.md#restoreLibraryItems) API [#4995](https://github.com/excalidraw/excalidraw/pull/4995). diff --git a/src/packages/excalidraw/README_NEXT.md b/src/packages/excalidraw/README_NEXT.md index d67c8f9e..f3da869c 100644 --- a/src/packages/excalidraw/README_NEXT.md +++ b/src/packages/excalidraw/README_NEXT.md @@ -924,7 +924,7 @@ serializeAsJSON({ Takes the scene elements and state and returns a JSON string. Deleted `elements`as well as most properties from `AppState` are removed from the resulting JSON. (see [`serializeAsJSON()`](https://github.com/excalidraw/excalidraw/blob/master/src/data/json.ts#L16) source for details). -If you want to overwrite the source field in the JSON string, you can set `window.EXCALIDRAW_EXPORT_SOURCE_PATH` to the desired value. +If you want to overwrite the source field in the JSON string, you can set `window.EXCALIDRAW_EXPORT_SOURCE` to the desired value. #### `serializeLibraryAsJSON` @@ -937,7 +937,7 @@ serializeLibraryAsJSON({ Takes the library items and returns a JSON string. -If you want to overwrite the source field in the JSON string, you can set `window.EXCALIDRAW_EXPORT_SOURCE_PATH` to the desired value. +If you want to overwrite the source field in the JSON string, you can set `window.EXCALIDRAW_EXPORT_SOURCE` to the desired value. #### `getSceneVersion`