Merge remote-tracking branch 'origin/release' into danieljgeiger-mathjax

This commit is contained in:
Daniel J. Geiger 2023-06-15 14:36:09 -05:00
commit 795176b256
221 changed files with 15664 additions and 8165 deletions

View file

@ -30,6 +30,7 @@ import { NonDeletedExcalidrawElement } from "../../../element/types";
import { ImportedLibraryData } from "../../../data/types";
import CustomFooter from "./CustomFooter";
import MobileFooter from "./MobileFooter";
import { KEYS } from "../../../keys";
declare global {
interface Window {
@ -55,9 +56,9 @@ type PointerDownState = {
y: number;
};
};
// This is so that we use the bundled excalidraw.development.js file instead
// of the actual source code
const {
exportToCanvas,
exportToSvg,
@ -204,6 +205,7 @@ export default function App({ appTitle, useCustom, customArgs }: AppProps) {
height: 141.9765625,
seed: 1968410350,
groupIds: [],
frameId: null,
boundElements: null,
locked: false,
link: null,
@ -484,7 +486,7 @@ export default function App({ appTitle, useCustom, customArgs }: AppProps) {
}}
onBlur={saveComment}
onKeyDown={(event) => {
if (!event.shiftKey && event.key === "Enter") {
if (!event.shiftKey && event.key === KEYS.ENTER) {
event.preventDefault();
saveComment();
}
@ -521,9 +523,11 @@ export default function App({ appTitle, useCustom, customArgs }: AppProps) {
</MainMenu>
);
};
return (
<div className="App" ref={appRef}>
<h1>{appTitle}</h1>
{/* TODO fix type */}
<ExampleSidebar>
<div className="button-wrapper">
<button onClick={loadSceneOrLibrary}>Load Scene or Library</button>

View file

@ -20,6 +20,7 @@ export default {
height: 141.9765625,
seed: 1968410350,
groupIds: [],
frameId: null,
},
{
id: "-xMIs_0jIFqvpx-R9UnaG",
@ -37,6 +38,7 @@ export default {
roughness: 1,
opacity: 100,
groupIds: [],
frameId: null,
seed: 957947807,
version: 47,
versionNonce: 1128618623,
@ -58,6 +60,7 @@ export default {
roughness: 1,
opacity: 100,
groupIds: [],
frameId: null,
strokeSharpness: "round",
seed: 707269846,
version: 143,
@ -94,6 +97,7 @@ export default {
height: 103.65107323746608,
seed: 1445523839,
groupIds: [],
frameId: null,
strokeSharpness: "sharp",
boundElementIds: [],
startBinding: null,
@ -133,6 +137,7 @@ export default {
height: 113.8575037534261,
seed: 1513238033,
groupIds: ["N2YAi9nU-wlRb0rDaDZoe"],
frameId: null,
strokeSharpness: "round",
boundElementIds: [],
startBinding: null,
@ -182,6 +187,7 @@ export default {
height: 9.797916664247975,
seed: 683951089,
groupIds: ["N2YAi9nU-wlRb0rDaDZoe"],
frameId: null,
strokeSharpness: "round",
boundElementIds: [],
startBinding: null,
@ -220,6 +226,7 @@ export default {
height: 9.797916664247975,
seed: 1817746897,
groupIds: ["N2YAi9nU-wlRb0rDaDZoe"],
frameId: null,
strokeSharpness: "round",
boundElementIds: [],
startBinding: null,
@ -258,6 +265,7 @@ export default {
height: 17.72670397681366,
seed: 1409727409,
groupIds: ["N2YAi9nU-wlRb0rDaDZoe"],
frameId: null,
strokeSharpness: "sharp",
boundElementIds: ["bxuMGTzXLn7H-uBCptINx"],
},
@ -281,6 +289,7 @@ export default {
height: 13.941904362416096,
seed: 1073094033,
groupIds: ["N2YAi9nU-wlRb0rDaDZoe"],
frameId: null,
strokeSharpness: "sharp",
boundElementIds: [],
},
@ -304,6 +313,7 @@ export default {
height: 13.941904362416096,
seed: 526271345,
groupIds: ["N2YAi9nU-wlRb0rDaDZoe"],
frameId: null,
strokeSharpness: "sharp",
boundElementIds: [],
},
@ -327,6 +337,7 @@ export default {
height: 13.941904362416096,
seed: 243707217,
groupIds: ["N2YAi9nU-wlRb0rDaDZoe"],
frameId: null,
strokeSharpness: "sharp",
boundElementIds: [],
},
@ -352,6 +363,7 @@ export default {
height: 36.77344700318558,
seed: 511870335,
groupIds: ["M6ByXuSmtHCr3RtPPKJQh"],
frameId: null,
strokeSharpness: "sharp",
boundElementIds: [],
},
@ -375,6 +387,7 @@ export default {
height: 36.77344700318558,
seed: 1283079231,
groupIds: ["M6ByXuSmtHCr3RtPPKJQh"],
frameId: null,
strokeSharpness: "sharp",
boundElementIds: [],
},
@ -398,6 +411,7 @@ export default {
height: 36.77344700318558,
seed: 996251633,
groupIds: ["M6ByXuSmtHCr3RtPPKJQh"],
frameId: null,
strokeSharpness: "sharp",
boundElementIds: [],
},
@ -421,6 +435,7 @@ export default {
height: 36.77344700318558,
seed: 1764842481,
groupIds: ["M6ByXuSmtHCr3RtPPKJQh"],
frameId: null,
strokeSharpness: "sharp",
boundElementIds: [],
},
@ -446,6 +461,7 @@ export default {
height: 154.56722543646003,
seed: 1424381745,
groupIds: ["HSrtfEf-CssQTf160Fb6R"],
frameId: null,
strokeSharpness: "round",
boundElementIds: [],
startBinding: null,
@ -495,6 +511,7 @@ export default {
height: 12.698053371678215,
seed: 726657713,
groupIds: ["HSrtfEf-CssQTf160Fb6R"],
frameId: null,
strokeSharpness: "round",
boundElementIds: [],
startBinding: null,
@ -533,6 +550,7 @@ export default {
height: 10.178760037658167,
seed: 1977326481,
groupIds: ["HSrtfEf-CssQTf160Fb6R"],
frameId: null,
strokeSharpness: "round",
boundElementIds: [],
startBinding: null,
@ -571,6 +589,7 @@ export default {
height: 22.797152568995934,
seed: 1774660383,
groupIds: ["HSrtfEf-CssQTf160Fb6R"],
frameId: null,
strokeSharpness: "sharp",
boundElementIds: ["bxuMGTzXLn7H-uBCptINx"],
},
@ -596,6 +615,7 @@ export default {
height: 107.25081879410921,
seed: 371096063,
groupIds: ["9ppmKFUbA4iKjt8FaDFox"],
frameId: null,
strokeSharpness: "sharp",
boundElementIds: [
"CFu0B4Mw_1wC1Hbgx8Fs0",
@ -623,6 +643,7 @@ export default {
height: 107.25081879410921,
seed: 685932433,
groupIds: ["0RJwA-yKP5dqk5oMiSeot", "9ppmKFUbA4iKjt8FaDFox"],
frameId: null,
strokeSharpness: "sharp",
boundElementIds: [
"CFu0B4Mw_1wC1Hbgx8Fs0",
@ -650,6 +671,7 @@ export default {
height: 107.25081879410921,
seed: 58634943,
groupIds: ["9ppmKFUbA4iKjt8FaDFox"],
frameId: null,
strokeSharpness: "sharp",
boundElementIds: [
"CFu0B4Mw_1wC1Hbgx8Fs0",
@ -677,6 +699,7 @@ export default {
height: 3.249953844290203,
seed: 1673003743,
groupIds: ["9ppmKFUbA4iKjt8FaDFox"],
frameId: null,
strokeSharpness: "round",
boundElementIds: [],
points: [
@ -708,6 +731,7 @@ export default {
height: 2.8032978840147194,
seed: 1821527807,
groupIds: ["9ppmKFUbA4iKjt8FaDFox"],
frameId: null,
strokeSharpness: "round",
boundElementIds: [],
points: [
@ -739,6 +763,7 @@ export default {
height: 4.280657518731036,
seed: 1485707039,
groupIds: ["9ppmKFUbA4iKjt8FaDFox"],
frameId: null,
strokeSharpness: "round",
boundElementIds: [],
points: [
@ -771,6 +796,7 @@ export default {
height: 2.9096445412231735,
seed: 1042012991,
groupIds: ["9ppmKFUbA4iKjt8FaDFox"],
frameId: null,
strokeSharpness: "round",
boundElementIds: [],
points: [
@ -804,6 +830,7 @@ export default {
height: 2.4757501798128,
seed: 295443295,
groupIds: ["9ppmKFUbA4iKjt8FaDFox"],
frameId: null,
strokeSharpness: "round",
boundElementIds: [],
points: [
@ -835,6 +862,7 @@ export default {
height: 2.4757501798128,
seed: 1734301567,
groupIds: ["9ppmKFUbA4iKjt8FaDFox"],
frameId: null,
strokeSharpness: "round",
boundElementIds: [],
points: [
@ -869,6 +897,7 @@ export default {
height: 76.53703389977764,
seed: 106569279,
groupIds: ["TC0RSM64Cxmu17MlE12-o"],
frameId: null,
strokeSharpness: "sharp",
boundElementIds: [],
},
@ -892,6 +921,7 @@ export default {
height: 0,
seed: 73916127,
groupIds: ["TC0RSM64Cxmu17MlE12-o"],
frameId: null,
strokeSharpness: "round",
boundElementIds: [],
startBinding: null,
@ -924,6 +954,7 @@ export default {
height: 5.001953125,
seed: 387857791,
groupIds: ["TC0RSM64Cxmu17MlE12-o"],
frameId: null,
strokeSharpness: "sharp",
boundElementIds: [],
},
@ -947,6 +978,7 @@ export default {
height: 5.001953125,
seed: 1486370207,
groupIds: ["TC0RSM64Cxmu17MlE12-o"],
frameId: null,
strokeSharpness: "sharp",
boundElementIds: [],
},
@ -970,6 +1002,7 @@ export default {
height: 5.001953125,
seed: 610150847,
groupIds: ["TC0RSM64Cxmu17MlE12-o"],
frameId: null,
strokeSharpness: "sharp",
boundElementIds: [],
},
@ -993,6 +1026,7 @@ export default {
height: 42.72020253937572,
seed: 144280593,
groupIds: ["TC0RSM64Cxmu17MlE12-o"],
frameId: null,
strokeSharpness: "sharp",
boundElementIds: [],
},
@ -1016,6 +1050,7 @@ export default {
height: 24.44112284281997,
seed: 29167967,
groupIds: ["TC0RSM64Cxmu17MlE12-o"],
frameId: null,
strokeSharpness: "round",
boundElementIds: [],
startBinding: null,
@ -1068,6 +1103,7 @@ export default {
height: 0,
seed: 1443027377,
groupIds: ["TC0RSM64Cxmu17MlE12-o"],
frameId: null,
strokeSharpness: "round",
boundElementIds: [],
startBinding: null,
@ -1100,6 +1136,7 @@ export default {
height: 5.711199931375845,
seed: 244310513,
groupIds: ["TC0RSM64Cxmu17MlE12-o"],
frameId: null,
strokeSharpness: "round",
boundElementIds: [],
startBinding: null,
@ -1138,6 +1175,7 @@ export default {
height: 44.82230388130942,
seed: 683572113,
groupIds: ["TC0RSM64Cxmu17MlE12-o"],
frameId: null,
strokeSharpness: "sharp",
boundElementIds: [],
},
@ -1161,6 +1199,7 @@ export default {
height: 5.896061363392446,
seed: 318798801,
groupIds: ["TC0RSM64Cxmu17MlE12-o"],
frameId: null,
strokeSharpness: "round",
boundElementIds: [],
startBinding: null,
@ -1200,6 +1239,7 @@ export default {
height: 108.30428902193904,
seed: 1914896753,
groupIds: ["GMZ-NW9lG7c1AtfBInZ0n"],
frameId: null,
strokeSharpness: "sharp",
boundElementIds: [],
},
@ -1223,6 +1263,7 @@ export default {
height: 82.83278895375764,
seed: 1306468145,
groupIds: ["GMZ-NW9lG7c1AtfBInZ0n"],
frameId: null,
strokeSharpness: "sharp",
boundElementIds: [],
},
@ -1246,6 +1287,7 @@ export default {
height: 11.427824006438863,
seed: 93422161,
groupIds: ["GMZ-NW9lG7c1AtfBInZ0n"],
frameId: null,
strokeSharpness: "sharp",
boundElementIds: [],
},
@ -1269,6 +1311,7 @@ export default {
height: 19.889460471185775,
seed: 11646495,
groupIds: ["GMZ-NW9lG7c1AtfBInZ0n"],
frameId: null,
strokeSharpness: "sharp",
boundElementIds: [],
},
@ -1292,6 +1335,7 @@ export default {
height: 19.889460471185775,
seed: 291717649,
groupIds: ["GMZ-NW9lG7c1AtfBInZ0n"],
frameId: null,
strokeSharpness: "sharp",
boundElementIds: [],
},

View file

@ -63,7 +63,7 @@
"sass-loader": "13.0.2",
"terser-webpack-plugin": "5.3.3",
"ts-loader": "9.3.1",
"typescript": "4.7.4",
"typescript": "4.9.4",
"webpack": "5.76.0",
"webpack-bundle-analyzer": "4.5.0",
"webpack-cli": "4.10.0",

View file

@ -44,7 +44,8 @@ module.exports = {
},
{
test: /\.(ts|tsx|js|jsx|mjs)$/,
exclude: /node_modules\/(?!browser-fs-access)/,
exclude:
/node_modules\/(?!(browser-fs-access|canvas-roundrect-polyfill))/,
use: [
{
loader: "ts-loader",

View file

@ -46,7 +46,9 @@ module.exports = {
},
{
test: /\.(ts|tsx|js|jsx|mjs)$/,
exclude: /node_modules\/(?!browser-fs-access)/,
exclude:
/node_modules\/(?!(browser-fs-access|canvas-roundrect-polyfill))/,
use: [
{
loader: "ts-loader",

View file

@ -3678,10 +3678,10 @@ type-is@~1.6.18:
media-typer "0.3.0"
mime-types "~2.1.24"
typescript@4.7.4:
version "4.7.4"
resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.7.4.tgz#1a88596d1cf47d59507a1bcdfb5b9dfe4d488235"
integrity sha512-C0WQT0gezHuw6AdY1M2jxUO83Rjf0HP7Sk1DtXj6j1EwkQNZrHAg2XPWlq62oqEhYvONq5pkC2Y9oPljWToLmQ==
typescript@4.9.4:
version "4.9.4"
resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.9.4.tgz#a2a3d2756c079abda241d75f149df9d561091e78"
integrity sha512-Uz+dTXYzxXXbsFpM86Wh3dKCxrQqUcVMxwU54orwlJjOpO3ao8L7j5lH+dWfTwgCwIuM9GQ2kvVotzYJMXTBZg==
unicode-canonical-property-names-ecmascript@^2.0.0:
version "2.0.0"

View file

@ -1479,12 +1479,17 @@ const createMathActions = () => {
name: "changeMathOnly",
perform: (elements, appState, mathOnly: boolean | null) => {
if (mathOnly === null) {
mathOnly = getFormValue(elements, appState, (element) => {
const el = hasBoundTextElement(element)
? getBoundTextElement(element)
: element;
return isMathElement(el) && el.customData?.mathOnly;
});
mathOnly = getFormValue(
elements,
appState,
(element) => {
const el = hasBoundTextElement(element)
? getBoundTextElement(element)
: element;
return isMathElement(el) && el.customData?.mathOnly;
},
null,
);
if (mathOnly === null) {
mathOnly = getMathProps.getMathOnly(appState);
}