@nous-excalidraw/excalidraw 0.18.9-beta.2 → 0.18.9-beta.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/dev/{chunk-DSYRTCAK.js → chunk-6AJUDCEG.js} +16 -7
- package/dist/dev/chunk-6AJUDCEG.js.map +7 -0
- package/dist/dev/{chunk-4JOINNOK.js → chunk-IXBA2ET3.js} +3 -1
- package/dist/dev/chunk-IXBA2ET3.js.map +7 -0
- package/dist/dev/{chunk-CYLA22NC.js → chunk-SBW56HVX.js} +2 -2
- package/dist/dev/components/TTDDialog/{CodeMirrorEditor-T4CL43BJ.js → CodeMirrorEditor-E2N5U3OQ.js} +2 -2
- package/dist/dev/data/{image-OB55CB4R.js → image-C4LYNJTA.js} +3 -3
- package/dist/dev/index.js +398 -126
- package/dist/dev/index.js.map +3 -3
- package/dist/dev/locales/{en-WD25OMHJ.js → en-FKZ7NP7W.js} +2 -2
- package/dist/dev/locales/{zh-CN-SZ37453H.js → zh-CN-MQID2QWX.js} +3 -1
- package/dist/dev/locales/zh-CN-MQID2QWX.js.map +7 -0
- package/dist/dev/subset-shared.chunk.js +1 -1
- package/dist/dev/subset-worker.chunk.js +1 -1
- package/dist/prod/chunk-2HFGAYFY.js +4 -0
- package/dist/prod/{chunk-LOOWOR4L.js → chunk-KGPK36EJ.js} +1 -1
- package/dist/prod/{chunk-CR4SD7AI.js → chunk-UXOPI7VA.js} +1 -1
- package/dist/prod/components/TTDDialog/{CodeMirrorEditor-KIQDCIKP.js → CodeMirrorEditor-N4IWTTMV.js} +1 -1
- package/dist/prod/data/image-76ZITQZH.js +1 -0
- package/dist/prod/index.js +34 -29
- package/dist/prod/locales/{en-CMP6EMR6.js → en-QIAUJ35X.js} +1 -1
- package/dist/prod/locales/{zh-CN-MVX3E32U.js → zh-CN-3F3C6RA5.js} +1 -1
- package/dist/prod/subset-shared.chunk.js +1 -1
- package/dist/prod/subset-worker.chunk.js +1 -1
- package/dist/types/common/src/constants.d.ts +1 -0
- package/dist/types/common/src/fontSize.d.ts +22 -0
- package/dist/types/common/src/index.d.ts +2 -0
- package/dist/types/common/src/strokeWidth.d.ts +14 -0
- package/dist/types/element/src/Scene.d.ts +1 -1
- package/dist/types/element/src/bounds.d.ts +5 -0
- package/dist/types/element/src/comparisons.d.ts +5 -5
- package/dist/types/element/src/frame.d.ts +2 -5
- package/dist/types/element/src/resizeElements.d.ts +1 -2
- package/dist/types/element/src/selection.d.ts +1 -1
- package/dist/types/element/src/typeChecks.d.ts +1 -1
- package/dist/types/element/src/types.d.ts +8 -5
- package/dist/types/element/src/utils.d.ts +3 -1
- package/dist/types/excalidraw/actions/actionCanvas.d.ts +11 -11
- package/dist/types/excalidraw/actions/actionDeleteSelected.d.ts +1 -1
- package/dist/types/excalidraw/actions/actionDeselect.d.ts +1 -1
- package/dist/types/excalidraw/actions/actionExport.d.ts +5 -5
- package/dist/types/excalidraw/actions/actionFrame.d.ts +34 -0
- package/dist/types/excalidraw/actions/actionGroup.d.ts +2 -2
- package/dist/types/excalidraw/actions/actionLinearEditor.d.ts +34 -0
- package/dist/types/excalidraw/actions/actionSelectAll.d.ts +1 -1
- package/dist/types/excalidraw/appState.d.ts +5 -5
- package/dist/types/excalidraw/components/icons.d.ts +1 -0
- package/dist/types/excalidraw/components/shapes.d.ts +22 -1
- package/dist/types/excalidraw/data/blob.d.ts +10 -10
- package/dist/types/excalidraw/data/json.d.ts +5 -5
- package/dist/types/excalidraw/scene/types.d.ts +1 -0
- package/dist/types/excalidraw/scene/zoom.d.ts +2 -0
- package/dist/types/excalidraw/snapping.d.ts +1 -1
- package/dist/types/excalidraw/types.d.ts +1 -1
- package/dist/types/utils/src/shape.d.ts +2 -2
- package/package.json +4 -4
- package/dist/dev/chunk-4JOINNOK.js.map +0 -7
- package/dist/dev/chunk-DSYRTCAK.js.map +0 -7
- package/dist/dev/locales/zh-CN-SZ37453H.js.map +0 -7
- package/dist/prod/chunk-HFHOWOFT.js +0 -4
- package/dist/prod/data/image-5LSIY7YB.js +0 -1
- /package/dist/dev/{chunk-CYLA22NC.js.map → chunk-SBW56HVX.js.map} +0 -0
- /package/dist/dev/components/TTDDialog/{CodeMirrorEditor-T4CL43BJ.js.map → CodeMirrorEditor-E2N5U3OQ.js.map} +0 -0
- /package/dist/dev/data/{image-OB55CB4R.js.map → image-C4LYNJTA.js.map} +0 -0
- /package/dist/dev/locales/{en-WD25OMHJ.js.map → en-FKZ7NP7W.js.map} +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
define_import_meta_env_default
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-SBW56HVX.js";
|
|
4
4
|
import {
|
|
5
5
|
__publicField
|
|
6
6
|
} from "./chunk-XDFCUUT6.js";
|
|
@@ -26,14 +26,17 @@ import {
|
|
|
26
26
|
ARROW_TYPE,
|
|
27
27
|
DEFAULT_ELEMENT_PROPS,
|
|
28
28
|
DEFAULT_FONT_FAMILY,
|
|
29
|
-
DEFAULT_FONT_SIZE,
|
|
30
29
|
DEFAULT_TEXT_ALIGN,
|
|
31
30
|
DEFAULT_GRID_SIZE,
|
|
32
31
|
EXPORT_SCALES,
|
|
33
32
|
STATS_PANELS,
|
|
34
33
|
THEME,
|
|
35
34
|
DEFAULT_GRID_STEP,
|
|
36
|
-
isTestEnv
|
|
35
|
+
isTestEnv,
|
|
36
|
+
FONT_SIZE_SCREEN,
|
|
37
|
+
getSceneFontSizeForZoom,
|
|
38
|
+
STROKE_WIDTH_SCREEN,
|
|
39
|
+
getSceneStrokeWidthForZoom
|
|
37
40
|
} from "@nous-excalidraw/common";
|
|
38
41
|
var defaultExportScale = EXPORT_SCALES.includes(devicePixelRatio) ? devicePixelRatio : 1;
|
|
39
42
|
var getDefaultAppState = () => {
|
|
@@ -45,7 +48,7 @@ var getDefaultAppState = () => {
|
|
|
45
48
|
currentItemEndArrowhead: "arrow",
|
|
46
49
|
currentItemFillStyle: DEFAULT_ELEMENT_PROPS.fillStyle,
|
|
47
50
|
currentItemFontFamily: DEFAULT_FONT_FAMILY,
|
|
48
|
-
currentItemFontSize:
|
|
51
|
+
currentItemFontSize: getSceneFontSizeForZoom(FONT_SIZE_SCREEN.md, 1),
|
|
49
52
|
currentItemOpacity: DEFAULT_ELEMENT_PROPS.opacity,
|
|
50
53
|
currentItemRoughness: DEFAULT_ELEMENT_PROPS.roughness,
|
|
51
54
|
currentItemStartArrowhead: null,
|
|
@@ -53,7 +56,10 @@ var getDefaultAppState = () => {
|
|
|
53
56
|
currentItemRoundness: isTestEnv() ? "sharp" : "round",
|
|
54
57
|
currentItemArrowType: ARROW_TYPE.round,
|
|
55
58
|
currentItemStrokeStyle: DEFAULT_ELEMENT_PROPS.strokeStyle,
|
|
56
|
-
currentItemStrokeWidth:
|
|
59
|
+
currentItemStrokeWidth: getSceneStrokeWidthForZoom(
|
|
60
|
+
STROKE_WIDTH_SCREEN.thin,
|
|
61
|
+
1
|
|
62
|
+
),
|
|
57
63
|
currentItemTextAlign: DEFAULT_TEXT_ALIGN,
|
|
58
64
|
currentHoveredFontFamily: null,
|
|
59
65
|
cursorButton: "up",
|
|
@@ -3636,6 +3642,7 @@ var renderElementToSvg = (element, elementsMap, rsvg, svgRoot, files, offsetX, o
|
|
|
3636
3642
|
}
|
|
3637
3643
|
case "rectangle":
|
|
3638
3644
|
case "diamond":
|
|
3645
|
+
case "triangle":
|
|
3639
3646
|
case "ellipse": {
|
|
3640
3647
|
const shape = ShapeCache2.generateElementShape(element, renderConfig);
|
|
3641
3648
|
const node = roughSVGDrawWithPrecision(
|
|
@@ -4522,6 +4529,7 @@ var AllowedExcalidrawActiveTools = {
|
|
|
4522
4529
|
text: true,
|
|
4523
4530
|
rectangle: true,
|
|
4524
4531
|
diamond: true,
|
|
4532
|
+
triangle: true,
|
|
4525
4533
|
ellipse: true,
|
|
4526
4534
|
line: true,
|
|
4527
4535
|
image: true,
|
|
@@ -4795,6 +4803,7 @@ var restoreElement = (element, targetElementsMap, existingElementsMap, opts) =>
|
|
|
4795
4803
|
case "ellipse":
|
|
4796
4804
|
case "rectangle":
|
|
4797
4805
|
case "diamond":
|
|
4806
|
+
case "triangle":
|
|
4798
4807
|
case "iframe":
|
|
4799
4808
|
case "embeddable":
|
|
4800
4809
|
return restoreElementWithProperties(element, {});
|
|
@@ -5092,7 +5101,7 @@ var parseFileContents = async (blob) => {
|
|
|
5092
5101
|
let contents;
|
|
5093
5102
|
if (blob.type === MIME_TYPES6.png) {
|
|
5094
5103
|
try {
|
|
5095
|
-
return await (await import("./data/image-
|
|
5104
|
+
return await (await import("./data/image-C4LYNJTA.js")).decodePngMetadata(blob);
|
|
5096
5105
|
} catch (error) {
|
|
5097
5106
|
if (error.message === "INVALID") {
|
|
5098
5107
|
throw new ImageSceneDataError(
|
|
@@ -5526,4 +5535,4 @@ export {
|
|
|
5526
5535
|
createFile,
|
|
5527
5536
|
normalizeFile
|
|
5528
5537
|
};
|
|
5529
|
-
//# sourceMappingURL=chunk-
|
|
5538
|
+
//# sourceMappingURL=chunk-6AJUDCEG.js.map
|