Bump prettier from 2.0.2 to 2.0.3 (#1263)
* Bump prettier from 2.0.2 to 2.0.3 Bumps [prettier](https://github.com/prettier/prettier) from 2.0.2 to 2.0.3. - [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.2...2.0.3) 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
4003fa24b2
commit
18f0b76231
6
package-lock.json
generated
6
package-lock.json
generated
@ -12338,9 +12338,9 @@
|
|||||||
"integrity": "sha1-1PRWKwzjaW5BrFLQ4ALlemNdxtw="
|
"integrity": "sha1-1PRWKwzjaW5BrFLQ4ALlemNdxtw="
|
||||||
},
|
},
|
||||||
"prettier": {
|
"prettier": {
|
||||||
"version": "2.0.2",
|
"version": "2.0.3",
|
||||||
"resolved": "https://registry.npmjs.org/prettier/-/prettier-2.0.2.tgz",
|
"resolved": "https://registry.npmjs.org/prettier/-/prettier-2.0.3.tgz",
|
||||||
"integrity": "sha512-5xJQIPT8BraI7ZnaDwSbu5zLrB6vvi8hVV58yHQ+QK64qrY40dULy0HSRlQ2/2IdzeBpjhDkqdcFBnFeDEMVdg==",
|
"integrity": "sha512-5qpBDBHO9fpE0zruKiTZm8Gxmz7kknO+WlQR/ivV+RMwgDw/WjOgmxLDn66MPrxq/WZPx/EgEZzh87xJO5E6Fw==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"prettier-linter-helpers": {
|
"prettier-linter-helpers": {
|
||||||
|
@ -46,7 +46,7 @@
|
|||||||
"lint-staged": "10.0.10",
|
"lint-staged": "10.0.10",
|
||||||
"node-sass": "4.13.1",
|
"node-sass": "4.13.1",
|
||||||
"pepjs": "0.5.2",
|
"pepjs": "0.5.2",
|
||||||
"prettier": "2.0.2",
|
"prettier": "2.0.3",
|
||||||
"rewire": "5.0.0",
|
"rewire": "5.0.0",
|
||||||
"typescript": "3.8.3"
|
"typescript": "3.8.3"
|
||||||
},
|
},
|
||||||
|
@ -120,9 +120,11 @@ import { actionFinalize } from "../actions";
|
|||||||
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 ((event) => {
|
return (
|
||||||
|
((event) => {
|
||||||
unstable_batchedUpdates(func as TFunction, event);
|
unstable_batchedUpdates(func as TFunction, event);
|
||||||
}) as TFunction;
|
}) as TFunction
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
const { history } = createHistory();
|
const { history } = createHistory();
|
||||||
|
@ -52,7 +52,8 @@ export function handlerRectangles(
|
|||||||
|
|
||||||
const centeringOffset = (size - 8) / (2 * zoom);
|
const centeringOffset = (size - 8) / (2 * zoom);
|
||||||
|
|
||||||
const handlers = {
|
const handlers =
|
||||||
|
{
|
||||||
nw: generateHandler(
|
nw: generateHandler(
|
||||||
elementX1 - dashedLineMargin - handlerMarginX + centeringOffset,
|
elementX1 - dashedLineMargin - handlerMarginX + centeringOffset,
|
||||||
elementY1 - dashedLineMargin - handlerMarginY + centeringOffset,
|
elementY1 - dashedLineMargin - handlerMarginY + centeringOffset,
|
||||||
@ -153,38 +154,48 @@ 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
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -13,7 +13,9 @@ export function IsMobileProvider({ children }: { children: React.ReactNode }) {
|
|||||||
matches: false,
|
matches: false,
|
||||||
addListener: () => {},
|
addListener: () => {},
|
||||||
removeListener: () => {},
|
removeListener: () => {},
|
||||||
} as any) as MediaQueryList);
|
} as
|
||||||
|
any) as
|
||||||
|
MediaQueryList);
|
||||||
}
|
}
|
||||||
const [isMobile, setMobile] = useState(query.current.matches);
|
const [isMobile, setMobile] = useState(query.current.matches);
|
||||||
|
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
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",
|
||||||
|
@ -1,7 +1,8 @@
|
|||||||
import React from "react";
|
import React from "react";
|
||||||
|
|
||||||
// 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
|
||||||
@ -51,7 +52,14 @@ export const SHAPES = [
|
|||||||
icon: (
|
icon: (
|
||||||
// custom
|
// custom
|
||||||
<svg viewBox="0 0 6 6">
|
<svg viewBox="0 0 6 6">
|
||||||
<line x1="0" y1="3" x2="6" y2="3" stroke="#000" strokeLinecap="round" />
|
<line
|
||||||
|
x1="0"
|
||||||
|
y1="3"
|
||||||
|
x2="6"
|
||||||
|
y2="3"
|
||||||
|
stroke="#000"
|
||||||
|
strokeLinecap="round"
|
||||||
|
/>
|
||||||
</svg>
|
</svg>
|
||||||
),
|
),
|
||||||
value: "line",
|
value: "line",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user