From efb6d0825b3ac0b8a9427b61c2bac195829ffd68 Mon Sep 17 00:00:00 2001 From: Aakansha Doshi Date: Sat, 20 Mar 2021 21:57:58 +0530 Subject: [PATCH 01/16] feat: Add label for name field and use input when editable in export dialog (#3286) * feat: Add label for name field and use input when editable in export dialog * fix * review fix * dnt allow to edit file name when view mode * Update src/components/ProjectName.tsx Co-authored-by: David Luzar Co-authored-by: David Luzar --- src/actions/actionExport.tsx | 4 +- src/components/App.tsx | 3 +- src/components/ExportDialog.scss | 7 +++ src/components/ProjectName.tsx | 69 ++++++++++++---------------- src/locales/en.json | 2 +- src/tests/excalidrawPackage.test.tsx | 9 ++-- 6 files changed, 46 insertions(+), 48 deletions(-) diff --git a/src/actions/actionExport.tsx b/src/actions/actionExport.tsx index d49faf8c6..e08d1dfff 100644 --- a/src/actions/actionExport.tsx +++ b/src/actions/actionExport.tsx @@ -23,7 +23,9 @@ export const actionChangeProjectName = register({ label={t("labels.fileTitle")} value={appState.name || "Unnamed"} onChange={(name: string) => updateData(name)} - isNameEditable={typeof appProps.name === "undefined"} + isNameEditable={ + typeof appProps.name === "undefined" && !appState.viewModeEnabled + } /> ), }); diff --git a/src/components/App.tsx b/src/components/App.tsx index f7c09c2f6..46acaf635 100644 --- a/src/components/App.tsx +++ b/src/components/App.tsx @@ -525,8 +525,7 @@ class App extends React.Component { let zenModeEnabled = actionResult?.appState?.zenModeEnabled || false; let gridSize = actionResult?.appState?.gridSize || null; let theme = actionResult?.appState?.theme || "light"; - let name = actionResult?.appState?.name || this.state.name; - + let name = actionResult?.appState?.name ?? this.state.name; if (typeof this.props.viewModeEnabled !== "undefined") { viewModeEnabled = this.props.viewModeEnabled; } diff --git a/src/components/ExportDialog.scss b/src/components/ExportDialog.scss index 7621c8b52..b02aa530a 100644 --- a/src/components/ExportDialog.scss +++ b/src/components/ExportDialog.scss @@ -31,12 +31,16 @@ .ExportDialog__name { grid-column: project-name; margin: auto; + display: flex; + align-items: center; .TextInput { height: calc(1rem - 3px); width: 200px; overflow: hidden; text-align: center; + margin-left: 8px; + text-overflow: ellipsis; &--readonly { background: none; @@ -44,6 +48,9 @@ &:hover { background: none; } + width: auto; + max-width: 200px; + padding-left: 2px; } } } diff --git a/src/components/ProjectName.tsx b/src/components/ProjectName.tsx index d474e7a30..a7d723ef3 100644 --- a/src/components/ProjectName.tsx +++ b/src/components/ProjectName.tsx @@ -1,7 +1,6 @@ import "./TextInput.scss"; import React, { Component } from "react"; -import { selectNode, removeSelection } from "../utils"; type Props = { value: string; @@ -10,17 +9,18 @@ type Props = { isNameEditable: boolean; }; -export class ProjectName extends Component { - private handleFocus = (event: React.FocusEvent) => { - selectNode(event.currentTarget); +type State = { + fileName: string; +}; +export class ProjectName extends Component { + state = { + fileName: this.props.value, }; - - private handleBlur = (event: React.FocusEvent) => { - const value = event.currentTarget.innerText.trim(); + private handleBlur = (event: any) => { + const value = event.target.value; if (value !== this.props.value) { this.props.onChange(value); } - removeSelection(); }; private handleKeyDown = (event: React.KeyboardEvent) => { @@ -32,39 +32,30 @@ export class ProjectName extends Component { event.currentTarget.blur(); } }; - private makeEditable = (editable: HTMLSpanElement | null) => { - if (!editable) { - return; - } - try { - editable.contentEditable = "plaintext-only"; - } catch { - editable.contentEditable = "true"; - } - }; public render() { - return this.props.isNameEditable ? ( - - {this.props.value} - - ) : ( - - {this.props.value} - + return ( + <> + + {this.props.isNameEditable ? ( + + this.setState({ fileName: event.target.value }) + } + /> + ) : ( + + {this.props.value} + + )} + ); } } diff --git a/src/locales/en.json b/src/locales/en.json index d1bb94565..a82b3fb09 100644 --- a/src/locales/en.json +++ b/src/locales/en.json @@ -61,7 +61,7 @@ "architect": "Architect", "artist": "Artist", "cartoonist": "Cartoonist", - "fileTitle": "File title", + "fileTitle": "File name", "colorPicker": "Color picker", "canvasBackground": "Canvas background", "drawingCanvas": "Drawing canvas", diff --git a/src/tests/excalidrawPackage.test.tsx b/src/tests/excalidrawPackage.test.tsx index ac951f931..a64b73f39 100644 --- a/src/tests/excalidrawPackage.test.tsx +++ b/src/tests/excalidrawPackage.test.tsx @@ -111,11 +111,11 @@ describe("", () => { const { container } = await render(); fireEvent.click(queryByTestId(container, "export-button")!); - const textInput = document.querySelector( + const textInput: HTMLInputElement | null = document.querySelector( ".ExportDialog__name .TextInput", ); - expect(textInput?.textContent).toContain(`${t("labels.untitled")}`); - expect(textInput?.hasAttribute("data-type")).toBe(true); + expect(textInput?.value).toContain(`${t("labels.untitled")}`); + expect(textInput?.nodeName).toBe("INPUT"); }); it('should set the name and not allow editing when the name prop is present"', async () => { @@ -127,8 +127,7 @@ describe("", () => { ".ExportDialog__name .TextInput--readonly", ); expect(textInput?.textContent).toEqual(name); - - expect(textInput?.hasAttribute("data-type")).toBe(false); + expect(textInput?.nodeName).toBe("SPAN"); }); }); }); From 13d9374cdeea2e5f6904ecb8c974474661ecc522 Mon Sep 17 00:00:00 2001 From: Aakansha Doshi Date: Sat, 20 Mar 2021 21:58:37 +0530 Subject: [PATCH 02/16] fix: Don't show export and delete when library is empty (#3288) --- src/components/LayerUI.tsx | 59 ++++++++++++++++++++------------------ 1 file changed, 31 insertions(+), 28 deletions(-) diff --git a/src/components/LayerUI.tsx b/src/components/LayerUI.tsx index 3ceb8deb0..1e2878c0f 100644 --- a/src/components/LayerUI.tsx +++ b/src/components/LayerUI.tsx @@ -144,34 +144,37 @@ const LibraryMenuItems = ({ }); }} /> - { - saveLibraryAsJSON() - .catch(muteFSAbortError) - .catch((error) => { - setAppState({ errorMessage: error.message }); - }); - }} - /> - { - if (window.confirm(t("alerts.resetLibrary"))) { - Library.resetLibrary(); - setLibraryItems([]); - } - }} - /> - + {!!library.length && ( + <> + { + saveLibraryAsJSON() + .catch(muteFSAbortError) + .catch((error) => { + setAppState({ errorMessage: error.message }); + }); + }} + /> + { + if (window.confirm(t("alerts.resetLibrary"))) { + Library.resetLibrary(); + setLibraryItems([]); + } + }} + /> + + )} Date: Sat, 20 Mar 2021 20:20:47 +0100 Subject: [PATCH 03/16] feat: support pasting file contents & always prefer system clip (#3257) --- src/clipboard.ts | 29 ++++++++++++++--------------- src/constants.ts | 8 +++++++- src/data/blob.ts | 4 ++-- src/data/image.ts | 12 +++++++++--- src/data/json.ts | 10 +++++----- src/tests/appState.test.tsx | 3 ++- src/tests/history.test.tsx | 3 ++- 7 files changed, 41 insertions(+), 28 deletions(-) diff --git a/src/clipboard.ts b/src/clipboard.ts index 9807972bf..f1654b25f 100644 --- a/src/clipboard.ts +++ b/src/clipboard.ts @@ -7,12 +7,10 @@ import { AppState } from "./types"; import { SVG_EXPORT_TAG } from "./scene/export"; import { tryParseSpreadsheet, Spreadsheet, VALID_SPREADSHEET } from "./charts"; import { canvasToBlob } from "./data/blob"; - -const TYPE_ELEMENTS = "excalidraw/elements"; +import { EXPORT_DATA_TYPES } from "./constants"; type ElementsClipboard = { - type: typeof TYPE_ELEMENTS; - created: number; + type: typeof EXPORT_DATA_TYPES.excalidrawClipboard; elements: ExcalidrawElement[]; }; @@ -31,8 +29,16 @@ export const probablySupportsClipboardBlob = "ClipboardItem" in window && "toBlob" in HTMLCanvasElement.prototype; -const isElementsClipboard = (contents: any): contents is ElementsClipboard => { - if (contents?.type === TYPE_ELEMENTS) { +const clipboardContainsElements = ( + contents: any, +): contents is { elements: ExcalidrawElement[] } => { + if ( + [ + EXPORT_DATA_TYPES.excalidraw, + EXPORT_DATA_TYPES.excalidrawClipboard, + ].includes(contents?.type) && + Array.isArray(contents.elements) + ) { return true; } return false; @@ -43,8 +49,7 @@ export const copyToClipboard = async ( appState: AppState, ) => { const contents: ElementsClipboard = { - type: TYPE_ELEMENTS, - created: Date.now(), + type: EXPORT_DATA_TYPES.excalidrawClipboard, elements: getSelectedElements(elements, appState), }; const json = JSON.stringify(contents); @@ -131,15 +136,9 @@ export const parseClipboard = async ( try { const systemClipboardData = JSON.parse(systemClipboard); - // system clipboard elements are newer than in-app clipboard - if ( - isElementsClipboard(systemClipboardData) && - (!appClipboardData?.created || - appClipboardData.created < systemClipboardData.created) - ) { + if (clipboardContainsElements(systemClipboardData)) { return { elements: systemClipboardData.elements }; } - // in-app clipboard is newer than system clipboard return appClipboardData; } catch { // system clipboard doesn't contain excalidraw elements → return plaintext diff --git a/src/constants.ts b/src/constants.ts index aff57e309..5569d302a 100644 --- a/src/constants.ts +++ b/src/constants.ts @@ -84,9 +84,15 @@ export const MIME_TYPES = { excalidrawlib: "application/vnd.excalidrawlib+json", }; +export const EXPORT_DATA_TYPES = { + excalidraw: "excalidraw", + excalidrawClipboard: "excalidraw/clipboard", + excalidrawLibrary: "excalidrawlib", +} as const; + export const STORAGE_KEYS = { LOCAL_STORAGE_LIBRARY: "excalidraw-library", -}; +} as const; // time in milliseconds export const TAP_TWICE_TIMEOUT = 300; diff --git a/src/data/blob.ts b/src/data/blob.ts index 81e01dded..21bb9f208 100644 --- a/src/data/blob.ts +++ b/src/data/blob.ts @@ -1,5 +1,5 @@ import { cleanAppStateForExport } from "../appState"; -import { MIME_TYPES } from "../constants"; +import { EXPORT_DATA_TYPES, MIME_TYPES } from "../constants"; import { clearElementsForExport } from "../element"; import { CanvasError } from "../errors"; import { t } from "../i18n"; @@ -121,7 +121,7 @@ export const loadFromBlob = async ( export const loadLibraryFromBlob = async (blob: Blob) => { const contents = await parseFileContents(blob); const data: LibraryData = JSON.parse(contents); - if (data.type !== "excalidrawlib") { + if (data.type !== EXPORT_DATA_TYPES.excalidrawLibrary) { throw new Error(t("alerts.couldNotLoadInvalidFile")); } return data; diff --git a/src/data/image.ts b/src/data/image.ts index 08db76495..c46a4e2f9 100644 --- a/src/data/image.ts +++ b/src/data/image.ts @@ -2,7 +2,7 @@ import decodePng from "png-chunks-extract"; import tEXt from "png-chunk-text"; import encodePng from "png-chunks-encode"; import { stringToBase64, encode, decode, base64ToString } from "./encode"; -import { MIME_TYPES } from "../constants"; +import { EXPORT_DATA_TYPES, MIME_TYPES } from "../constants"; // ----------------------------------------------------------------------------- // PNG @@ -67,7 +67,10 @@ export const decodePngMetadata = async (blob: Blob) => { const encodedData = JSON.parse(metadata.text); if (!("encoded" in encodedData)) { // legacy, un-encoded scene JSON - if ("type" in encodedData && encodedData.type === "excalidraw") { + if ( + "type" in encodedData && + encodedData.type === EXPORT_DATA_TYPES.excalidraw + ) { return metadata.text; } throw new Error("FAILED"); @@ -115,7 +118,10 @@ export const decodeSvgMetadata = async ({ svg }: { svg: string }) => { const encodedData = JSON.parse(json); if (!("encoded" in encodedData)) { // legacy, un-encoded scene JSON - if ("type" in encodedData && encodedData.type === "excalidraw") { + if ( + "type" in encodedData && + encodedData.type === EXPORT_DATA_TYPES.excalidraw + ) { return json; } throw new Error("FAILED"); diff --git a/src/data/json.ts b/src/data/json.ts index 7f9a6de18..4ecaccb3d 100644 --- a/src/data/json.ts +++ b/src/data/json.ts @@ -1,6 +1,6 @@ import { fileOpen, fileSave } from "browser-fs-access"; import { cleanAppStateForExport } from "../appState"; -import { MIME_TYPES } from "../constants"; +import { EXPORT_DATA_TYPES, MIME_TYPES } from "../constants"; import { clearElementsForExport } from "../element"; import { ExcalidrawElement } from "../element/types"; import { AppState } from "../types"; @@ -14,7 +14,7 @@ export const serializeAsJSON = ( ): string => JSON.stringify( { - type: "excalidraw", + type: EXPORT_DATA_TYPES.excalidraw, version: 2, source: window.location.origin, elements: clearElementsForExport(elements), @@ -69,7 +69,7 @@ export const isValidExcalidrawData = (data?: { appState?: any; }): data is ImportedDataState => { return ( - data?.type === "excalidraw" && + data?.type === EXPORT_DATA_TYPES.excalidraw && (!data.elements || (Array.isArray(data.elements) && (!data.appState || typeof data.appState === "object"))) @@ -80,7 +80,7 @@ export const isValidLibrary = (json: any) => { return ( typeof json === "object" && json && - json.type === "excalidrawlib" && + json.type === EXPORT_DATA_TYPES.excalidrawLibrary && json.version === 1 ); }; @@ -89,7 +89,7 @@ export const saveLibraryAsJSON = async () => { const library = await Library.loadLibrary(); const serialized = JSON.stringify( { - type: "excalidrawlib", + type: EXPORT_DATA_TYPES.excalidrawLibrary, version: 1, library, }, diff --git a/src/tests/appState.test.tsx b/src/tests/appState.test.tsx index f14a8d36b..368e91407 100644 --- a/src/tests/appState.test.tsx +++ b/src/tests/appState.test.tsx @@ -3,6 +3,7 @@ import { render, waitFor } from "./test-utils"; import ExcalidrawApp from "../excalidraw-app"; import { API } from "./helpers/api"; import { getDefaultAppState } from "../appState"; +import { EXPORT_DATA_TYPES } from "../constants"; const { h } = window; @@ -29,7 +30,7 @@ describe("appState", () => { new Blob( [ JSON.stringify({ - type: "excalidraw", + type: EXPORT_DATA_TYPES.excalidraw, appState: { viewBackgroundColor: "#000", }, diff --git a/src/tests/history.test.tsx b/src/tests/history.test.tsx index 4da33439a..aeadaa946 100644 --- a/src/tests/history.test.tsx +++ b/src/tests/history.test.tsx @@ -6,6 +6,7 @@ import { API } from "./helpers/api"; import { getDefaultAppState } from "../appState"; import { waitFor } from "@testing-library/react"; import { createUndoAction, createRedoAction } from "../actions/actionHistory"; +import { EXPORT_DATA_TYPES } from "../constants"; const { h } = window; @@ -76,7 +77,7 @@ describe("history", () => { new Blob( [ JSON.stringify({ - type: "excalidraw", + type: EXPORT_DATA_TYPES.excalidraw, appState: { ...getDefaultAppState(), viewBackgroundColor: "#000", From 2c7c80bd7571924fbde21e6d644236c11decadec Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun, 21 Mar 2021 12:21:09 +0530 Subject: [PATCH 04/16] chore(deps-dev): bump webpack in /src/packages/excalidraw (#3295) Bumps [webpack](https://github.com/webpack/webpack) from 5.24.3 to 5.27.1. - [Release notes](https://github.com/webpack/webpack/releases) - [Commits](https://github.com/webpack/webpack/compare/v5.24.3...v5.27.1) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- src/packages/excalidraw/package.json | 2 +- src/packages/excalidraw/yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/packages/excalidraw/package.json b/src/packages/excalidraw/package.json index afb3f767b..56bf8e409 100644 --- a/src/packages/excalidraw/package.json +++ b/src/packages/excalidraw/package.json @@ -58,7 +58,7 @@ "sass-loader": "11.0.1", "terser-webpack-plugin": "5.1.1", "ts-loader": "8.0.18", - "webpack": "5.24.3", + "webpack": "5.27.1", "webpack-bundle-analyzer": "4.4.0", "webpack-cli": "4.5.0" }, diff --git a/src/packages/excalidraw/yarn.lock b/src/packages/excalidraw/yarn.lock index 2d492a60d..e84176d76 100644 --- a/src/packages/excalidraw/yarn.lock +++ b/src/packages/excalidraw/yarn.lock @@ -2663,10 +2663,10 @@ webpack-sources@^2.1.1: source-list-map "^2.0.1" source-map "^0.6.1" -webpack@5.24.3: - version "5.24.3" - resolved "https://registry.yarnpkg.com/webpack/-/webpack-5.24.3.tgz#6ec0f5059f8d7c7961075fa553cfce7b7928acb3" - integrity sha512-x7lrWZ7wlWAdyKdML6YPvfVZkhD1ICuIZGODE5SzKJjqI9A4SpqGTjGJTc6CwaHqn19gGaoOR3ONJ46nYsn9rw== +webpack@5.27.1: + version "5.27.1" + resolved "https://registry.yarnpkg.com/webpack/-/webpack-5.27.1.tgz#6808fb6e45e35290cdb8ae43c7a10884839a3079" + integrity sha512-rxIDsPZ3Apl3JcqiemiLmWH+hAq04YeOXqvCxNZOnTp8ZgM9NEPtbu4CaMfMEf9KShnx/Ym8uLGmM6P4XnwCoA== dependencies: "@types/eslint-scope" "^3.7.0" "@types/estree" "^0.0.46" From 0f249e3b266bf25a767d8078436969039b65f3bd Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun, 21 Mar 2021 12:29:44 +0530 Subject: [PATCH 05/16] chore(deps-dev): bump webpack in /src/packages/utils (#3294) Bumps [webpack](https://github.com/webpack/webpack) from 5.24.3 to 5.27.1. - [Release notes](https://github.com/webpack/webpack/releases) - [Commits](https://github.com/webpack/webpack/compare/v5.24.3...v5.27.1) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- src/packages/utils/package.json | 2 +- src/packages/utils/yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/packages/utils/package.json b/src/packages/utils/package.json index b19e21aad..b404358ad 100644 --- a/src/packages/utils/package.json +++ b/src/packages/utils/package.json @@ -48,7 +48,7 @@ "file-loader": "6.2.0", "sass-loader": "11.0.1", "ts-loader": "8.0.18", - "webpack": "5.24.3", + "webpack": "5.27.1", "webpack-bundle-analyzer": "4.4.0", "webpack-cli": "4.5.0" }, diff --git a/src/packages/utils/yarn.lock b/src/packages/utils/yarn.lock index 60b35e49a..b3f4cba95 100644 --- a/src/packages/utils/yarn.lock +++ b/src/packages/utils/yarn.lock @@ -2595,10 +2595,10 @@ webpack-sources@^2.1.1: source-list-map "^2.0.1" source-map "^0.6.1" -webpack@5.24.3: - version "5.24.3" - resolved "https://registry.yarnpkg.com/webpack/-/webpack-5.24.3.tgz#6ec0f5059f8d7c7961075fa553cfce7b7928acb3" - integrity sha512-x7lrWZ7wlWAdyKdML6YPvfVZkhD1ICuIZGODE5SzKJjqI9A4SpqGTjGJTc6CwaHqn19gGaoOR3ONJ46nYsn9rw== +webpack@5.27.1: + version "5.27.1" + resolved "https://registry.yarnpkg.com/webpack/-/webpack-5.27.1.tgz#6808fb6e45e35290cdb8ae43c7a10884839a3079" + integrity sha512-rxIDsPZ3Apl3JcqiemiLmWH+hAq04YeOXqvCxNZOnTp8ZgM9NEPtbu4CaMfMEf9KShnx/Ym8uLGmM6P4XnwCoA== dependencies: "@types/eslint-scope" "^3.7.0" "@types/estree" "^0.0.46" From eeea8406c95759cd9df90ac0e273aef83836ef59 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun, 21 Mar 2021 12:31:15 +0530 Subject: [PATCH 06/16] chore(deps-dev): bump css-loader in /src/packages/excalidraw (#3293) Bumps [css-loader](https://github.com/webpack-contrib/css-loader) from 5.1.2 to 5.1.3. - [Release notes](https://github.com/webpack-contrib/css-loader/releases) - [Changelog](https://github.com/webpack-contrib/css-loader/blob/master/CHANGELOG.md) - [Commits](https://github.com/webpack-contrib/css-loader/compare/v5.1.2...v5.1.3) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- src/packages/excalidraw/package.json | 2 +- src/packages/excalidraw/yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/packages/excalidraw/package.json b/src/packages/excalidraw/package.json index 56bf8e409..ae1b7c333 100644 --- a/src/packages/excalidraw/package.json +++ b/src/packages/excalidraw/package.json @@ -52,7 +52,7 @@ "babel-loader": "8.2.2", "babel-plugin-transform-class-properties": "6.24.1", "cross-env": "7.0.3", - "css-loader": "5.1.2", + "css-loader": "5.1.3", "file-loader": "6.2.0", "mini-css-extract-plugin": "1.3.9", "sass-loader": "11.0.1", diff --git a/src/packages/excalidraw/yarn.lock b/src/packages/excalidraw/yarn.lock index e84176d76..5cd67bff7 100644 --- a/src/packages/excalidraw/yarn.lock +++ b/src/packages/excalidraw/yarn.lock @@ -1497,10 +1497,10 @@ cross-spawn@^7.0.1, cross-spawn@^7.0.3: shebang-command "^2.0.0" which "^2.0.1" -css-loader@5.1.2: - version "5.1.2" - resolved "https://registry.yarnpkg.com/css-loader/-/css-loader-5.1.2.tgz#b93dba498ec948b543b49d4fab5017205d4f5c3e" - integrity sha512-T7vTXHSx0KrVEg/xjcl7G01RcVXpcw4OELwDPvkr7izQNny85A84dK3dqrczuEfBcu7Yg7mdTjJLSTibRUoRZg== +css-loader@5.1.3: + version "5.1.3" + resolved "https://registry.yarnpkg.com/css-loader/-/css-loader-5.1.3.tgz#87f6fc96816b20debe3cf682f85c7e56a963d0d1" + integrity sha512-CoPZvyh8sLiGARK3gqczpfdedbM74klGWurF2CsNZ2lhNaXdLIUks+3Mfax3WBeRuHoglU+m7KG/+7gY6G4aag== dependencies: camelcase "^6.2.0" cssesc "^3.0.0" From 981f327b48d5db6d2411da1af659ea4b619c3f13 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun, 21 Mar 2021 12:55:37 +0530 Subject: [PATCH 07/16] chore(deps-dev): bump css-loader in /src/packages/utils (#3292) Bumps [css-loader](https://github.com/webpack-contrib/css-loader) from 5.1.2 to 5.1.3. - [Release notes](https://github.com/webpack-contrib/css-loader/releases) - [Changelog](https://github.com/webpack-contrib/css-loader/blob/master/CHANGELOG.md) - [Commits](https://github.com/webpack-contrib/css-loader/compare/v5.1.2...v5.1.3) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- src/packages/utils/package.json | 2 +- src/packages/utils/yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/packages/utils/package.json b/src/packages/utils/package.json index b404358ad..583c758a2 100644 --- a/src/packages/utils/package.json +++ b/src/packages/utils/package.json @@ -44,7 +44,7 @@ "babel-loader": "8.2.2", "babel-plugin-transform-class-properties": "6.24.1", "cross-env": "7.0.3", - "css-loader": "5.1.2", + "css-loader": "5.1.3", "file-loader": "6.2.0", "sass-loader": "11.0.1", "ts-loader": "8.0.18", diff --git a/src/packages/utils/yarn.lock b/src/packages/utils/yarn.lock index b3f4cba95..fc6b29ad3 100644 --- a/src/packages/utils/yarn.lock +++ b/src/packages/utils/yarn.lock @@ -1446,10 +1446,10 @@ cross-spawn@^7.0.1, cross-spawn@^7.0.3: shebang-command "^2.0.0" which "^2.0.1" -css-loader@5.1.2: - version "5.1.2" - resolved "https://registry.yarnpkg.com/css-loader/-/css-loader-5.1.2.tgz#b93dba498ec948b543b49d4fab5017205d4f5c3e" - integrity sha512-T7vTXHSx0KrVEg/xjcl7G01RcVXpcw4OELwDPvkr7izQNny85A84dK3dqrczuEfBcu7Yg7mdTjJLSTibRUoRZg== +css-loader@5.1.3: + version "5.1.3" + resolved "https://registry.yarnpkg.com/css-loader/-/css-loader-5.1.3.tgz#87f6fc96816b20debe3cf682f85c7e56a963d0d1" + integrity sha512-CoPZvyh8sLiGARK3gqczpfdedbM74klGWurF2CsNZ2lhNaXdLIUks+3Mfax3WBeRuHoglU+m7KG/+7gY6G4aag== dependencies: camelcase "^6.2.0" cssesc "^3.0.0" From 7ee8de0a46fa41ac46240df46912e26f0027814c Mon Sep 17 00:00:00 2001 From: Aakansha Doshi Date: Sun, 21 Mar 2021 18:13:52 +0530 Subject: [PATCH 08/16] feat: set window.name in excalidraw app & also support target for excalidraw libraries (#3299) * feat: set window.name in excalidraw app so library installation always opens on same tab & also support target for excalidraw libraries * update changelog and readme * Update public/index.html Co-authored-by: David Luzar * use level 4 heading * Update src/packages/excalidraw/README.md Co-authored-by: David Luzar Co-authored-by: David Luzar --- public/index.html | 2 ++ src/components/LayerUI.tsx | 4 +++- src/packages/excalidraw/CHANGELOG.md | 1 + src/packages/excalidraw/README.md | 8 ++++---- 4 files changed, 10 insertions(+), 5 deletions(-) diff --git a/public/index.html b/public/index.html index c15ac97fa..08981bf8e 100644 --- a/public/index.html +++ b/public/index.html @@ -88,6 +88,8 @@ <% if (process.env.REACT_APP_GOOGLE_ANALYTICS_ID) { %>