@excalidraw/common 0.18.0-2b0e4c9 → 0.18.0-39103bd
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/index.js +45 -73
- package/dist/dev/index.js.map +3 -3
- package/dist/prod/index.js +3 -3
- package/dist/types/common/src/colors.d.ts +1 -1
- package/dist/types/common/src/constants.d.ts +11 -7
- package/dist/types/common/src/points.d.ts +1 -1
- package/dist/types/common/src/utils.d.ts +1 -43
- package/dist/types/element/src/Scene.d.ts +6 -4
- package/dist/types/element/src/align.d.ts +2 -2
- package/dist/types/element/src/arrowEndpointText.d.ts +49 -0
- package/dist/types/element/src/arrows/focus.d.ts +5 -2
- package/dist/types/element/src/binding.d.ts +17 -8
- package/dist/types/element/src/bounds.d.ts +22 -7
- package/dist/types/element/src/collision.d.ts +1 -1
- package/dist/types/element/src/comparisons.d.ts +5 -4
- package/dist/types/element/src/convertToShape.d.ts +23 -0
- package/dist/types/element/src/distribute.d.ts +2 -2
- package/dist/types/element/src/dragElements.d.ts +27 -0
- package/dist/types/element/src/duplicate.d.ts +4 -3
- package/dist/types/element/src/embeddable.d.ts +2 -2
- package/dist/types/element/src/flowchart.d.ts +7 -7
- package/dist/types/element/src/fractionalIndex.d.ts +2 -2
- package/dist/types/element/src/frame.d.ts +9 -8
- package/dist/types/element/src/groups.d.ts +9 -9
- package/dist/types/element/src/index.d.ts +3 -1
- package/dist/types/element/src/linearElementEditor.d.ts +17 -10
- package/dist/types/element/src/newElement.d.ts +14 -0
- package/dist/types/element/src/renderElement.d.ts +0 -3
- package/dist/types/element/src/resizeElements.d.ts +2 -2
- package/dist/types/element/src/selection.d.ts +11 -7
- package/dist/types/element/src/shape.d.ts +1 -1
- package/dist/types/element/src/textElement.d.ts +13 -10
- package/dist/types/element/src/textWrapping.d.ts +26 -0
- package/dist/types/element/src/transform.d.ts +2 -2
- package/dist/types/element/src/typeChecks.d.ts +26 -25
- package/dist/types/element/src/types.d.ts +8 -1
- package/dist/types/element/src/utils.d.ts +1 -1
- package/dist/types/element/src/zindex.d.ts +2 -2
- package/dist/types/excalidraw/actions/actionAddToLibrary.d.ts +33 -15
- package/dist/types/excalidraw/actions/actionAlign.d.ts +6 -6
- package/dist/types/excalidraw/actions/actionBoundText.d.ts +23 -11
- package/dist/types/excalidraw/actions/actionCanvas.d.ts +139 -933
- package/dist/types/excalidraw/actions/actionClipboard.d.ts +22 -10
- package/dist/types/excalidraw/actions/actionCropEditor.d.ts +11 -5
- package/dist/types/excalidraw/actions/actionDeleteSelected.d.ts +35 -16
- package/dist/types/excalidraw/actions/{actionEmbeddable.d.ts → actionDeselect.d.ts} +25 -34
- package/dist/types/excalidraw/actions/actionDistribute.d.ts +2 -3
- package/dist/types/excalidraw/actions/actionElementLink.d.ts +11 -5
- package/dist/types/excalidraw/actions/actionElementLock.d.ts +23 -11
- package/dist/types/excalidraw/actions/actionExport.d.ts +27 -15
- package/dist/types/excalidraw/actions/actionFrame.d.ts +45 -199
- package/dist/types/excalidraw/actions/actionGroup.d.ts +38 -26
- package/dist/types/excalidraw/actions/actionLinearEditor.d.ts +15 -7
- package/dist/types/excalidraw/actions/actionLink.d.ts +12 -6
- package/dist/types/excalidraw/actions/actionMenu.d.ts +11 -5
- package/dist/types/excalidraw/actions/actionProperties.d.ts +49 -28
- package/dist/types/excalidraw/actions/actionSelectAll.d.ts +16 -10
- package/dist/types/excalidraw/actions/actionStyles.d.ts +12 -5
- package/dist/types/excalidraw/actions/actionTextAutoResize.d.ts +3 -3
- package/dist/types/excalidraw/actions/actionToggleArrowBinding.d.ts +12 -6
- package/dist/types/excalidraw/actions/actionToggleGridMode.d.ts +15 -10
- package/dist/types/excalidraw/actions/actionToggleMidpointSnapping.d.ts +12 -6
- package/dist/types/excalidraw/actions/actionToggleObjectsSnapMode.d.ts +12 -6
- package/dist/types/excalidraw/actions/actionToggleSearchMenu.d.ts +15 -10
- package/dist/types/excalidraw/actions/actionToggleShapeSwitch.d.ts +1 -1
- package/dist/types/excalidraw/actions/actionToggleStats.d.ts +12 -6
- package/dist/types/excalidraw/actions/actionToggleViewMode.d.ts +13 -7
- package/dist/types/excalidraw/actions/actionToggleZenMode.d.ts +12 -6
- package/dist/types/excalidraw/actions/index.d.ts +2 -2
- package/dist/types/excalidraw/actions/manager.d.ts +1 -0
- package/dist/types/excalidraw/actions/shortcuts.d.ts +1 -1
- package/dist/types/excalidraw/actions/types.d.ts +8 -4
- package/dist/types/excalidraw/{animated-trail.d.ts → animatedTrail.d.ts} +4 -3
- package/dist/types/excalidraw/appState.d.ts +8 -6
- package/dist/types/excalidraw/components/Actions.d.ts +17 -12
- package/dist/types/excalidraw/components/ActiveConfirmDialog.d.ts +1 -1
- package/dist/types/excalidraw/components/App.arrowText.d.ts +72 -0
- package/dist/types/excalidraw/components/App.cursor.d.ts +31 -0
- package/dist/types/excalidraw/components/App.d.ts +358 -64
- package/dist/types/excalidraw/components/App.drawshape.d.ts +55 -0
- package/dist/types/excalidraw/components/App.flowchart.d.ts +21 -0
- package/dist/types/excalidraw/components/App.viewport.d.ts +73 -0
- package/dist/types/excalidraw/components/ColorPicker/ColorPicker.d.ts +2 -2
- package/dist/types/excalidraw/components/ColorPicker/colorPickerUtils.d.ts +1 -1
- package/dist/types/excalidraw/components/CommandPalette/defaultCommandPaletteItems.d.ts +1 -2
- package/dist/types/excalidraw/components/ConvertElementTypePopup.d.ts +2 -2
- package/dist/types/excalidraw/components/CursorHint.d.ts +46 -0
- package/dist/types/excalidraw/components/EyeDropper.d.ts +1 -1
- package/dist/types/excalidraw/components/{ToolButton.d.ts → IconButton.d.ts} +16 -19
- package/dist/types/excalidraw/components/Island.d.ts +7 -0
- package/dist/types/excalidraw/components/LaserPointerButton.d.ts +2 -4
- package/dist/types/excalidraw/components/LayerUI.d.ts +4 -2
- package/dist/types/excalidraw/components/LibraryMenu.d.ts +1 -1
- package/dist/types/excalidraw/components/LockButton.d.ts +3 -4
- package/dist/types/excalidraw/components/MagicButton.d.ts +0 -2
- package/dist/types/excalidraw/components/MobileMenu.d.ts +4 -4
- package/dist/types/excalidraw/components/MobileToolbar.d.ts +9 -0
- package/dist/types/excalidraw/components/OverwriteConfirm/OverwriteConfirmState.d.ts +1 -1
- package/dist/types/excalidraw/components/PenModeButton.d.ts +2 -5
- package/dist/types/excalidraw/components/Popover.d.ts +1 -3
- package/dist/types/excalidraw/components/{ButtonIcon.d.ts → RadioButton.d.ts} +2 -5
- package/dist/types/excalidraw/components/Range.d.ts +10 -4
- package/dist/types/excalidraw/components/SVGLayer.d.ts +1 -1
- package/dist/types/excalidraw/components/SearchMenu.d.ts +1 -1
- package/dist/types/excalidraw/components/Sidebar/Sidebar.d.ts +1 -1
- package/dist/types/excalidraw/components/Stats/Angle.d.ts +2 -2
- package/dist/types/excalidraw/components/Stats/Dimension.d.ts +2 -2
- package/dist/types/excalidraw/components/Stats/DragInput.d.ts +2 -2
- package/dist/types/excalidraw/components/Stats/MultiAngle.d.ts +2 -2
- package/dist/types/excalidraw/components/Stats/MultiDimension.d.ts +2 -2
- package/dist/types/excalidraw/components/Stats/MultiPosition.d.ts +2 -2
- package/dist/types/excalidraw/components/Stats/Position.d.ts +3 -3
- package/dist/types/excalidraw/components/Stats/utils.d.ts +1 -1
- package/dist/types/excalidraw/components/TTDDialog/TTDContext.d.ts +4 -4
- package/dist/types/excalidraw/components/TTDDialog/useTTDChatStorage.d.ts +3 -3
- package/dist/types/excalidraw/components/ToolPopover.d.ts +3 -6
- package/dist/types/excalidraw/components/Toolbar.d.ts +11 -0
- package/dist/types/excalidraw/components/Tools.d.ts +145 -0
- package/dist/types/excalidraw/components/canvases/InteractiveCanvas.d.ts +4 -1
- package/dist/types/excalidraw/components/canvases/NewElementCanvas.d.ts +1 -0
- package/dist/types/excalidraw/components/canvases/StaticCanvas.d.ts +1 -1
- package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuItemContentRadio.d.ts +2 -1
- package/dist/types/excalidraw/components/footer/Footer.d.ts +3 -1
- package/dist/types/excalidraw/components/hyperlink/helpers.d.ts +2 -2
- package/dist/types/excalidraw/components/icons.d.ts +3 -1
- package/dist/types/excalidraw/components/main-menu/DefaultItems.d.ts +8 -4
- package/dist/types/excalidraw/components/positionElementBesideCursor.d.ts +26 -0
- package/dist/types/excalidraw/components/shapeActionPredicates.d.ts +39 -0
- package/dist/types/excalidraw/data/blob.d.ts +32 -20
- package/dist/types/excalidraw/data/index.d.ts +4 -4
- package/dist/types/excalidraw/data/json.d.ts +22 -16
- package/dist/types/excalidraw/data/library.d.ts +1 -1
- package/dist/types/excalidraw/drawShapeTrail.d.ts +16 -0
- package/dist/types/excalidraw/eraser/index.d.ts +2 -3
- package/dist/types/excalidraw/hooks/useAppStateValue.d.ts +29 -0
- package/dist/types/excalidraw/hooks/useLibraryItemSvg.d.ts +1 -1
- package/dist/types/excalidraw/{laser-trails.d.ts → laserTrails.d.ts} +5 -7
- package/dist/types/excalidraw/lasso/index.d.ts +2 -3
- package/dist/types/excalidraw/renderer/animation.d.ts +5 -1
- package/dist/types/excalidraw/renderer/interactiveScene.d.ts +1 -3
- package/dist/types/excalidraw/scene/Renderer.d.ts +426 -19
- package/dist/types/excalidraw/scene/export.d.ts +3 -3
- package/dist/types/excalidraw/scene/index.d.ts +2 -2
- package/dist/types/excalidraw/scene/types.d.ts +4 -3
- package/dist/types/excalidraw/snapping.d.ts +7 -7
- package/dist/types/excalidraw/textAutoResizeHandle.d.ts +15 -0
- package/dist/types/excalidraw/types.d.ts +369 -20
- package/dist/types/excalidraw/viewport.d.ts +272 -0
- package/dist/types/excalidraw/wysiwyg/textWysiwyg.d.ts +6 -3
- package/dist/types/fractional-indexing/src/index.d.ts +29 -0
- package/dist/types/laser-pointer/src/index.d.ts +2 -0
- package/dist/types/laser-pointer/src/math.d.ts +16 -0
- package/dist/types/laser-pointer/src/simplify.d.ts +2 -0
- package/dist/types/laser-pointer/src/state.d.ts +36 -0
- package/dist/types/math/src/constants.d.ts +0 -1
- package/dist/types/math/src/curve.d.ts +4 -1
- package/dist/types/math/src/index.d.ts +1 -0
- package/dist/types/math/src/pca.d.ts +79 -0
- package/dist/types/math/src/point.d.ts +2 -1
- package/dist/types/math/src/polygon.d.ts +25 -1
- package/dist/types/utils/src/export.d.ts +3 -3
- package/dist/types/utils/src/index.d.ts +1 -2
- package/package.json +1 -1
- package/dist/types/excalidraw/animation-frame-handler.d.ts +0 -16
- package/dist/types/excalidraw/components/HandButton.d.ts +0 -10
- package/dist/types/excalidraw/components/MobileToolBar.d.ts +0 -10
- package/dist/types/excalidraw/components/shapes.d.ts +0 -263
- package/dist/types/excalidraw/cursor.d.ts +0 -5
- package/dist/types/excalidraw/scene/scroll.d.ts +0 -18
- package/dist/types/excalidraw/scene/zoom.d.ts +0 -12
- package/dist/types/utils/src/bbox.d.ts +0 -9
- package/dist/types/utils/src/withinBounds.d.ts +0 -19
package/dist/dev/index.js
CHANGED
|
@@ -1394,7 +1394,10 @@ var cssInvert = (r, g, b, percent) => {
|
|
|
1394
1394
|
const invertedB = invertComponent(b);
|
|
1395
1395
|
return { r: invertedR, g: invertedG, b: invertedB };
|
|
1396
1396
|
};
|
|
1397
|
-
var applyDarkModeFilter = (color) => {
|
|
1397
|
+
var applyDarkModeFilter = (color, enable = true) => {
|
|
1398
|
+
if (!enable) {
|
|
1399
|
+
return color;
|
|
1400
|
+
}
|
|
1398
1401
|
const cached = DARK_MODE_COLORS_CACHE?.get(color);
|
|
1399
1402
|
if (cached) {
|
|
1400
1403
|
return cached;
|
|
@@ -1836,8 +1839,10 @@ var DEFAULT_UI_OPTIONS = {
|
|
|
1836
1839
|
var MAX_DECIMALS_FOR_SVG_EXPORT = 2;
|
|
1837
1840
|
var EXPORT_SCALES = [1, 2, 3];
|
|
1838
1841
|
var DEFAULT_EXPORT_PADDING = 10;
|
|
1839
|
-
var
|
|
1840
|
-
|
|
1842
|
+
var DEFAULT_IMAGE_OPTIONS = {
|
|
1843
|
+
maxWidthOrHeight: 1440,
|
|
1844
|
+
maxFileSizeBytes: 4 * 1024 * 1024
|
|
1845
|
+
};
|
|
1841
1846
|
var SVG_NS = "http://www.w3.org/2000/svg";
|
|
1842
1847
|
var SVG_DOCUMENT_PREAMBLE = `<?xml version="1.0" standalone="no"?>
|
|
1843
1848
|
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
|
@@ -1861,6 +1866,7 @@ var TEXT_ALIGN = {
|
|
|
1861
1866
|
RIGHT: "right"
|
|
1862
1867
|
};
|
|
1863
1868
|
var ELEMENT_READY_TO_ERASE_OPACITY = 20;
|
|
1869
|
+
var ELEMENT_PENDING_DRAW_SHAPE_OPACITY = 70;
|
|
1864
1870
|
var DEFAULT_PROPORTIONAL_RADIUS = 0.25;
|
|
1865
1871
|
var DEFAULT_ADAPTIVE_RADIUS = 32;
|
|
1866
1872
|
var ROUNDNESS = {
|
|
@@ -1884,16 +1890,34 @@ var ROUGHNESS = {
|
|
|
1884
1890
|
artist: 1,
|
|
1885
1891
|
cartoonist: 2
|
|
1886
1892
|
};
|
|
1893
|
+
var STROKE_WIDTH_KEYS = [
|
|
1894
|
+
"thin",
|
|
1895
|
+
"medium",
|
|
1896
|
+
"bold"
|
|
1897
|
+
];
|
|
1887
1898
|
var STROKE_WIDTH = {
|
|
1888
1899
|
thin: 1,
|
|
1900
|
+
medium: 2,
|
|
1901
|
+
bold: 4,
|
|
1902
|
+
extraBold: 8
|
|
1903
|
+
// unused (may be introduced in the future)
|
|
1904
|
+
};
|
|
1905
|
+
var FREEDRAW_STROKE_WIDTH = {
|
|
1906
|
+
thin: 0.5,
|
|
1907
|
+
medium: 1,
|
|
1889
1908
|
bold: 2,
|
|
1890
1909
|
extraBold: 4
|
|
1910
|
+
// legacy (may be used again in the future)
|
|
1911
|
+
};
|
|
1912
|
+
var getStrokeWidthByKey = (elementType, strokeWidthKey) => {
|
|
1913
|
+
return elementType === "freedraw" ? FREEDRAW_STROKE_WIDTH[strokeWidthKey] : STROKE_WIDTH[strokeWidthKey];
|
|
1891
1914
|
};
|
|
1915
|
+
var DEFAULT_ELEMENT_STROKE_WIDTH_KEY = "medium";
|
|
1892
1916
|
var DEFAULT_ELEMENT_PROPS = {
|
|
1893
1917
|
strokeColor: COLOR_PALETTE.black,
|
|
1894
1918
|
backgroundColor: COLOR_PALETTE.transparent,
|
|
1895
1919
|
fillStyle: "solid",
|
|
1896
|
-
strokeWidth:
|
|
1920
|
+
strokeWidth: STROKE_WIDTH[DEFAULT_ELEMENT_STROKE_WIDTH_KEY],
|
|
1897
1921
|
strokeStyle: "solid",
|
|
1898
1922
|
roughness: ROUGHNESS.artist,
|
|
1899
1923
|
opacity: 100,
|
|
@@ -1926,7 +1950,8 @@ var TOOL_TYPE = {
|
|
|
1926
1950
|
frame: "frame",
|
|
1927
1951
|
magicframe: "magicframe",
|
|
1928
1952
|
embeddable: "embeddable",
|
|
1929
|
-
laser: "laser"
|
|
1953
|
+
laser: "laser",
|
|
1954
|
+
autoshape: "autoshape"
|
|
1930
1955
|
};
|
|
1931
1956
|
var EDITOR_LS_KEYS = {
|
|
1932
1957
|
OAI_API_KEY: "excalidraw-oai-api-key",
|
|
@@ -1957,6 +1982,8 @@ var BIND_MODE_TIMEOUT = 700;
|
|
|
1957
1982
|
var MOBILE_ACTION_BUTTON_BG = {
|
|
1958
1983
|
background: "var(--mobile-action-button-bg)"
|
|
1959
1984
|
};
|
|
1985
|
+
var DEFAULT_STROKE_STREAMLINE = 0.5;
|
|
1986
|
+
var DEFAULT_STROKE_STREAMLINE_PRECISE = 0.2;
|
|
1960
1987
|
|
|
1961
1988
|
// src/font-metadata.ts
|
|
1962
1989
|
init_define_import_meta_env();
|
|
@@ -2337,6 +2364,7 @@ var shouldRotateWithDiscreteAngle = (event) => event.shiftKey;
|
|
|
2337
2364
|
// src/points.ts
|
|
2338
2365
|
init_define_import_meta_env();
|
|
2339
2366
|
import {
|
|
2367
|
+
pointFrom,
|
|
2340
2368
|
pointFromPair
|
|
2341
2369
|
} from "@excalidraw/math";
|
|
2342
2370
|
var getSizeFromPoints = (points) => {
|
|
@@ -2381,12 +2409,12 @@ var rescalePoints = (dimension, newSize, points, normalize) => {
|
|
|
2381
2409
|
};
|
|
2382
2410
|
var getGridPoint = (x, y, gridSize) => {
|
|
2383
2411
|
if (gridSize) {
|
|
2384
|
-
return
|
|
2412
|
+
return pointFrom(
|
|
2385
2413
|
Math.round(x / gridSize) * gridSize,
|
|
2386
2414
|
Math.round(y / gridSize) * gridSize
|
|
2387
|
-
|
|
2415
|
+
);
|
|
2388
2416
|
}
|
|
2389
|
-
return
|
|
2417
|
+
return pointFrom(x, y);
|
|
2390
2418
|
};
|
|
2391
2419
|
|
|
2392
2420
|
// src/promise-pool.ts
|
|
@@ -2570,67 +2598,6 @@ var throttleRAF = (fn) => {
|
|
|
2570
2598
|
var easeOut = (k) => {
|
|
2571
2599
|
return 1 - Math.pow(1 - k, 4);
|
|
2572
2600
|
};
|
|
2573
|
-
var easeOutInterpolate = (from, to, progress) => {
|
|
2574
|
-
return (to - from) * easeOut(progress) + from;
|
|
2575
|
-
};
|
|
2576
|
-
var easeToValuesRAF = ({
|
|
2577
|
-
fromValues,
|
|
2578
|
-
toValues,
|
|
2579
|
-
onStep,
|
|
2580
|
-
duration = 250,
|
|
2581
|
-
interpolateValue,
|
|
2582
|
-
onStart,
|
|
2583
|
-
onEnd,
|
|
2584
|
-
onCancel
|
|
2585
|
-
}) => {
|
|
2586
|
-
let canceled = false;
|
|
2587
|
-
let frameId = 0;
|
|
2588
|
-
let startTime;
|
|
2589
|
-
function step(timestamp) {
|
|
2590
|
-
if (canceled) {
|
|
2591
|
-
return;
|
|
2592
|
-
}
|
|
2593
|
-
if (startTime === void 0) {
|
|
2594
|
-
startTime = timestamp;
|
|
2595
|
-
onStart?.();
|
|
2596
|
-
}
|
|
2597
|
-
const elapsed = Math.min(timestamp - startTime, duration);
|
|
2598
|
-
const factor = easeOut(elapsed / duration);
|
|
2599
|
-
const newValues = {};
|
|
2600
|
-
Object.keys(fromValues).forEach((key) => {
|
|
2601
|
-
const _key = key;
|
|
2602
|
-
const result = (toValues[_key] - fromValues[_key]) * factor + fromValues[_key];
|
|
2603
|
-
newValues[_key] = result;
|
|
2604
|
-
});
|
|
2605
|
-
onStep(newValues);
|
|
2606
|
-
if (elapsed < duration) {
|
|
2607
|
-
const progress = elapsed / duration;
|
|
2608
|
-
const newValues2 = {};
|
|
2609
|
-
Object.keys(fromValues).forEach((key) => {
|
|
2610
|
-
const _key = key;
|
|
2611
|
-
const startValue = fromValues[_key];
|
|
2612
|
-
const endValue = toValues[_key];
|
|
2613
|
-
let result;
|
|
2614
|
-
result = interpolateValue ? interpolateValue(startValue, endValue, progress, _key) : easeOutInterpolate(startValue, endValue, progress);
|
|
2615
|
-
if (result == null) {
|
|
2616
|
-
result = easeOutInterpolate(startValue, endValue, progress);
|
|
2617
|
-
}
|
|
2618
|
-
newValues2[_key] = result;
|
|
2619
|
-
});
|
|
2620
|
-
onStep(newValues2);
|
|
2621
|
-
frameId = window.requestAnimationFrame(step);
|
|
2622
|
-
} else {
|
|
2623
|
-
onStep(toValues);
|
|
2624
|
-
onEnd?.();
|
|
2625
|
-
}
|
|
2626
|
-
}
|
|
2627
|
-
frameId = window.requestAnimationFrame(step);
|
|
2628
|
-
return () => {
|
|
2629
|
-
onCancel?.();
|
|
2630
|
-
canceled = true;
|
|
2631
|
-
window.cancelAnimationFrame(frameId);
|
|
2632
|
-
};
|
|
2633
|
-
};
|
|
2634
2601
|
var chunk = (array, size) => {
|
|
2635
2602
|
if (!array.length || size < 1) {
|
|
2636
2603
|
return [];
|
|
@@ -2673,7 +2640,7 @@ var updateActiveTool = (appState, data) => {
|
|
|
2673
2640
|
}
|
|
2674
2641
|
return {
|
|
2675
2642
|
...appState.activeTool,
|
|
2676
|
-
lastActiveTool: data.
|
|
2643
|
+
lastActiveTool: data.lastActiveTool === void 0 ? appState.activeTool.lastActiveTool : data.lastActiveTool,
|
|
2677
2644
|
type: data.type,
|
|
2678
2645
|
customType: null,
|
|
2679
2646
|
locked: data.locked ?? appState.activeTool.locked,
|
|
@@ -3553,17 +3520,20 @@ export {
|
|
|
3553
3520
|
DEFAULT_ELEMENT_STROKE_COLOR_INDEX,
|
|
3554
3521
|
DEFAULT_ELEMENT_STROKE_COLOR_PALETTE,
|
|
3555
3522
|
DEFAULT_ELEMENT_STROKE_PICKS,
|
|
3523
|
+
DEFAULT_ELEMENT_STROKE_WIDTH_KEY,
|
|
3556
3524
|
DEFAULT_EXPORT_PADDING,
|
|
3557
3525
|
DEFAULT_FILENAME,
|
|
3558
3526
|
DEFAULT_FONT_FAMILY,
|
|
3559
3527
|
DEFAULT_FONT_SIZE,
|
|
3560
3528
|
DEFAULT_GRID_SIZE,
|
|
3561
3529
|
DEFAULT_GRID_STEP,
|
|
3530
|
+
DEFAULT_IMAGE_OPTIONS,
|
|
3562
3531
|
DEFAULT_LASER_COLOR,
|
|
3563
|
-
DEFAULT_MAX_IMAGE_WIDTH_OR_HEIGHT,
|
|
3564
3532
|
DEFAULT_PROPORTIONAL_RADIUS,
|
|
3565
3533
|
DEFAULT_REDUCED_GLOBAL_ALPHA,
|
|
3566
3534
|
DEFAULT_SIDEBAR,
|
|
3535
|
+
DEFAULT_STROKE_STREAMLINE,
|
|
3536
|
+
DEFAULT_STROKE_STREAMLINE_PRECISE,
|
|
3567
3537
|
DEFAULT_TEXT_ALIGN,
|
|
3568
3538
|
DEFAULT_TRANSFORM_HANDLE_SPACING,
|
|
3569
3539
|
DEFAULT_UI_OPTIONS,
|
|
@@ -3574,6 +3544,7 @@ export {
|
|
|
3574
3544
|
Debug,
|
|
3575
3545
|
EDITOR_LS_KEYS,
|
|
3576
3546
|
ELEMENT_LINK_KEY,
|
|
3547
|
+
ELEMENT_PENDING_DRAW_SHAPE_OPACITY,
|
|
3577
3548
|
ELEMENT_READY_TO_ERASE_OPACITY,
|
|
3578
3549
|
ELEMENT_SHIFT_TRANSLATE_AMOUNT,
|
|
3579
3550
|
ELEMENT_TRANSLATE_AMOUNT,
|
|
@@ -3591,6 +3562,7 @@ export {
|
|
|
3591
3562
|
FONT_METADATA,
|
|
3592
3563
|
FONT_SIZES,
|
|
3593
3564
|
FRAME_STYLE,
|
|
3565
|
+
FREEDRAW_STROKE_WIDTH,
|
|
3594
3566
|
GOOGLE_FONTS_RANGES,
|
|
3595
3567
|
HYPERLINK_TOOLTIP_DELAY,
|
|
3596
3568
|
IDLE_THRESHOLD,
|
|
@@ -3603,7 +3575,6 @@ export {
|
|
|
3603
3575
|
LINE_CONFIRM_THRESHOLD,
|
|
3604
3576
|
LINE_POLYGON_POINT_MERGE_DISTANCE,
|
|
3605
3577
|
LOCAL_FONT_PROTOCOL,
|
|
3606
|
-
MAX_ALLOWED_FILE_BYTES,
|
|
3607
3578
|
MAX_CUSTOM_COLORS_USED_IN_CANVAS,
|
|
3608
3579
|
MAX_DECIMALS_FOR_SVG_EXPORT,
|
|
3609
3580
|
MAX_ZOOM,
|
|
@@ -3635,6 +3606,7 @@ export {
|
|
|
3635
3606
|
STATS_PANELS,
|
|
3636
3607
|
STRING_MIME_TYPES,
|
|
3637
3608
|
STROKE_WIDTH,
|
|
3609
|
+
STROKE_WIDTH_KEYS,
|
|
3638
3610
|
SVG_DOCUMENT_PREAMBLE,
|
|
3639
3611
|
SVG_NS,
|
|
3640
3612
|
TAP_TWICE_TIMEOUT,
|
|
@@ -3675,7 +3647,6 @@ export {
|
|
|
3675
3647
|
deriveStylesPanelMode,
|
|
3676
3648
|
distance,
|
|
3677
3649
|
easeOut,
|
|
3678
|
-
easeToValuesRAF,
|
|
3679
3650
|
escapeDoubleQuotes,
|
|
3680
3651
|
exitFullScreen,
|
|
3681
3652
|
findIndex,
|
|
@@ -3696,6 +3667,7 @@ export {
|
|
|
3696
3667
|
getLineHeight,
|
|
3697
3668
|
getNearestScrollableContainer,
|
|
3698
3669
|
getSizeFromPoints,
|
|
3670
|
+
getStrokeWidthByKey,
|
|
3699
3671
|
getSvgPathFromStroke,
|
|
3700
3672
|
getUpdatedTimestamp,
|
|
3701
3673
|
getVersion,
|