Bump prettier from 2.0.3 to 2.0.4 (#1412)
* Bump prettier from 2.0.3 to 2.0.4 Bumps [prettier](https://github.com/prettier/prettier) from 2.0.3 to 2.0.4. - [Release notes](https://github.com/prettier/prettier/releases) - [Changelog](https://github.com/prettier/prettier/blob/master/CHANGELOG.md) - [Commits](https://github.com/prettier/prettier/compare/2.0.3...2.0.4) Signed-off-by: dependabot-preview[bot] <support@dependabot.com> * format Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com> Co-authored-by: Panayiotis Lipiridis <lipiridis@gmail.com>
This commit is contained in:
parent
e77e2255bd
commit
7df16c1b1d
6
package-lock.json
generated
6
package-lock.json
generated
@ -15548,9 +15548,9 @@
|
|||||||
"integrity": "sha1-1PRWKwzjaW5BrFLQ4ALlemNdxtw="
|
"integrity": "sha1-1PRWKwzjaW5BrFLQ4ALlemNdxtw="
|
||||||
},
|
},
|
||||||
"prettier": {
|
"prettier": {
|
||||||
"version": "2.0.3",
|
"version": "2.0.4",
|
||||||
"resolved": "https://registry.npmjs.org/prettier/-/prettier-2.0.3.tgz",
|
"resolved": "https://registry.npmjs.org/prettier/-/prettier-2.0.4.tgz",
|
||||||
"integrity": "sha512-5qpBDBHO9fpE0zruKiTZm8Gxmz7kknO+WlQR/ivV+RMwgDw/WjOgmxLDn66MPrxq/WZPx/EgEZzh87xJO5E6Fw==",
|
"integrity": "sha512-SVJIQ51spzFDvh4fIbCLvciiDMCrRhlN3mbZvv/+ycjvmF5E73bKdGfU8QDLNmjYJf+lsGnDBC4UUnvTe5OO0w==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"prettier-linter-helpers": {
|
"prettier-linter-helpers": {
|
||||||
|
@ -48,7 +48,7 @@
|
|||||||
"lint-staged": "10.1.3",
|
"lint-staged": "10.1.3",
|
||||||
"node-sass": "4.13.1",
|
"node-sass": "4.13.1",
|
||||||
"pepjs": "0.5.2",
|
"pepjs": "0.5.2",
|
||||||
"prettier": "2.0.3",
|
"prettier": "2.0.4",
|
||||||
"rewire": "5.0.0",
|
"rewire": "5.0.0",
|
||||||
"typescript": "3.8.3"
|
"typescript": "3.8.3"
|
||||||
},
|
},
|
||||||
|
@ -134,11 +134,9 @@ import {
|
|||||||
function withBatchedUpdates<
|
function withBatchedUpdates<
|
||||||
TFunction extends ((event: any) => void) | (() => void)
|
TFunction extends ((event: any) => void) | (() => void)
|
||||||
>(func: Parameters<TFunction>["length"] extends 0 | 1 ? TFunction : never) {
|
>(func: Parameters<TFunction>["length"] extends 0 | 1 ? TFunction : never) {
|
||||||
return (
|
return ((event) => {
|
||||||
((event) => {
|
|
||||||
unstable_batchedUpdates(func as TFunction, event);
|
unstable_batchedUpdates(func as TFunction, event);
|
||||||
}) as TFunction
|
}) as TFunction;
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const { history } = createHistory();
|
const { history } = createHistory();
|
||||||
|
@ -193,48 +193,38 @@ export function handlerRectangles(
|
|||||||
const [, p1] = element.points;
|
const [, p1] = element.points;
|
||||||
|
|
||||||
if (p1[0] === 0 || p1[1] === 0) {
|
if (p1[0] === 0 || p1[1] === 0) {
|
||||||
return (
|
return {
|
||||||
{
|
|
||||||
nw: handlers.nw,
|
nw: handlers.nw,
|
||||||
se: handlers.se,
|
se: handlers.se,
|
||||||
} as typeof handlers
|
} as typeof handlers;
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (p1[0] > 0 && p1[1] < 0) {
|
if (p1[0] > 0 && p1[1] < 0) {
|
||||||
return (
|
return {
|
||||||
{
|
|
||||||
ne: handlers.ne,
|
ne: handlers.ne,
|
||||||
sw: handlers.sw,
|
sw: handlers.sw,
|
||||||
} as typeof handlers
|
} as typeof handlers;
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (p1[0] > 0 && p1[1] > 0) {
|
if (p1[0] > 0 && p1[1] > 0) {
|
||||||
return (
|
return {
|
||||||
{
|
|
||||||
nw: handlers.nw,
|
nw: handlers.nw,
|
||||||
se: handlers.se,
|
se: handlers.se,
|
||||||
} as typeof handlers
|
} as typeof handlers;
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (p1[0] < 0 && p1[1] > 0) {
|
if (p1[0] < 0 && p1[1] > 0) {
|
||||||
return (
|
return {
|
||||||
{
|
|
||||||
ne: handlers.ne,
|
ne: handlers.ne,
|
||||||
sw: handlers.sw,
|
sw: handlers.sw,
|
||||||
} as typeof handlers
|
} as typeof handlers;
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (p1[0] < 0 && p1[1] < 0) {
|
if (p1[0] < 0 && p1[1] < 0) {
|
||||||
return (
|
return {
|
||||||
{
|
|
||||||
nw: handlers.nw,
|
nw: handlers.nw,
|
||||||
se: handlers.se,
|
se: handlers.se,
|
||||||
} as typeof handlers
|
} as typeof handlers;
|
||||||
);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -67,10 +67,9 @@ export function getDrawingVersion(elements: readonly ExcalidrawElement[]) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export function getNonDeletedElements(elements: readonly ExcalidrawElement[]) {
|
export function getNonDeletedElements(elements: readonly ExcalidrawElement[]) {
|
||||||
return (
|
return elements.filter(
|
||||||
elements.filter((element) => !element.isDeleted) as
|
(element) => !element.isDeleted,
|
||||||
readonly NonDeletedExcalidrawElement[]
|
) as readonly NonDeletedExcalidrawElement[];
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export function isNonDeletedElement<T extends ExcalidrawElement>(
|
export function isNonDeletedElement<T extends ExcalidrawElement>(
|
||||||
|
@ -13,9 +13,7 @@ export function IsMobileProvider({ children }: { children: React.ReactNode }) {
|
|||||||
matches: false,
|
matches: false,
|
||||||
addListener: () => {},
|
addListener: () => {},
|
||||||
removeListener: () => {},
|
removeListener: () => {},
|
||||||
} as
|
} as any) as MediaQueryList);
|
||||||
any) as
|
|
||||||
MediaQueryList);
|
|
||||||
}
|
}
|
||||||
const [isMobile, setMobile] = useState(query.current.matches);
|
const [isMobile, setMobile] = useState(query.current.matches);
|
||||||
|
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
export const isDarwin = /Mac|iPod|iPhone|iPad/.test(window.navigator.platform);
|
export const isDarwin = /Mac|iPod|iPhone|iPad/.test(window.navigator.platform);
|
||||||
|
|
||||||
export const KEYS =
|
export const KEYS = {
|
||||||
{
|
|
||||||
ARROW_LEFT: "ArrowLeft",
|
ARROW_LEFT: "ArrowLeft",
|
||||||
ARROW_RIGHT: "ArrowRight",
|
ARROW_RIGHT: "ArrowRight",
|
||||||
ARROW_DOWN: "ArrowDown",
|
ARROW_DOWN: "ArrowDown",
|
||||||
|
@ -2,8 +2,7 @@ import React from "react";
|
|||||||
import oc from "open-color";
|
import oc from "open-color";
|
||||||
|
|
||||||
// We inline font-awesome icons in order to save on js size rather than including the font awesome react library
|
// We inline font-awesome icons in order to save on js size rather than including the font awesome react library
|
||||||
export const SHAPES =
|
export const SHAPES = [
|
||||||
[
|
|
||||||
{
|
{
|
||||||
icon: (
|
icon: (
|
||||||
// fa-mouse-pointer
|
// fa-mouse-pointer
|
||||||
|
@ -164,9 +164,11 @@ function getSelectedElement(): ExcalidrawElement {
|
|||||||
|
|
||||||
type HandlerRectanglesRet = keyof ReturnType<typeof handlerRectangles>;
|
type HandlerRectanglesRet = keyof ReturnType<typeof handlerRectangles>;
|
||||||
function getResizeHandles() {
|
function getResizeHandles() {
|
||||||
const rects =
|
const rects = handlerRectangles(
|
||||||
handlerRectangles(getSelectedElement(), h.state.zoom, pointerType) as
|
getSelectedElement(),
|
||||||
{
|
h.state.zoom,
|
||||||
|
pointerType,
|
||||||
|
) as {
|
||||||
[T in HandlerRectanglesRet]: [number, number, number, number];
|
[T in HandlerRectanglesRet]: [number, number, number, number];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user