Commit Graph

296 Commits (c8f4a4cb41ea743b58765444ee064aaebca5d8c3)

Author SHA1 Message Date
Márk Tolmács f4dd23fc31
chore: Unify math types, utils and functions (#8389)
Co-authored-by: dwelle <5153846+dwelle@users.noreply.github.com>
6 months ago
David Luzar 60e75406e0
refactor: remove unused env variable (#8457) 6 months ago
zsviczian b396e07b90
fix: PropertiesPopover maxWidth changing fixed units to relative units (#8456) 6 months ago
zsviczian 2d1d84a47b
fix: View mode wheel zooming does not work (#8452)
* Update App.tsx

* fix: prevent zooming browser over DOM

---------

Co-authored-by: dwelle <5153846+dwelle@users.noreply.github.com>
6 months ago
Marcel Mraz ee30225062
feat: subset font glyphs for SVG export (#8384)
Co-authored-by: dwelle <5153846+dwelle@users.noreply.github.com>
6 months ago
David Luzar 16cae4fc07
feat: reset copyStatus on export dialog settings change (#8443) 6 months ago
David Luzar 576bc0dbe5
feat: tweak copy button success animation (#8441) 6 months ago
David Luzar 00af35c692
feat: enable panning/zoom while in wysiwyg (#8437) 6 months ago
Márk Tolmács ea7c702cfc
feat: Visual debugger (#8344)
Add visual debugger to the Excalidraw app (only).
6 months ago
spc-28 26d2296578
fix: fixed copy to clipboard button (#8426)
Co-authored-by: dwelle <5153846+dwelle@users.noreply.github.com>
6 months ago
zsviczian afb68a6467
feat: improve elbow arrow keyboard move (#8392) 6 months ago
zsviczian b459e5cfd2
fix: context menu does not work after after dragging on StatsDragInput (#8386)
Co-authored-by: dwelle <5153846+dwelle@users.noreply.github.com>
6 months ago
David Luzar 5facc0d6da
fix: perf regression in `getCommonBounds` (#8429) 6 months ago
Ryan Di 5e1ff7cafe
perf: improve new element drawing (#8340)
Co-authored-by: dwelle <5153846+dwelle@users.noreply.github.com>
6 months ago
David Luzar b5d7f5b4ba
feat: rewrite d2c to not require token (#8269) 6 months ago
David Luzar fb4bb29aa5
fix: object snapping not working (#8381) 6 months ago
David Luzar 3cfcc7b489
feat: split `gridSize` from enabled state & support custom `gridStep` (#8364) 6 months ago
David Luzar 4320a3cf41
feat: improve zoom-to-content when creating flowchart (#8368) 6 months ago
Márk Tolmács 8420e1aa13
fix: Reimplement rectangle intersection (#8367) 6 months ago
Márk Tolmács 5daf1a1b4e
fix: Round coordinates and sizes for rectangle intersection (#8366)
Round coordinates and sizes for rectangle intersection
6 months ago
David Luzar 97981804d7
feat: Stats popup style tweaks (#8361) 7 months ago
Clarence Chan f7b3befd0a
fix: text content with tab characters act different in view/edit (#8336)
Co-authored-by: dwelle <5153846+dwelle@users.noreply.github.com>
7 months ago
DDDDD12138 7b2bee9746
chore: remove unused parameter (#8355) 7 months ago
David Luzar 88014ace4a
fix: drawing from 0-dimension canvas (#8356) 7 months ago
David Luzar 87a9430809
fix: disable flowchart keybindings inside inputs (#8353) 7 months ago
Márk Tolmács 99b91c46f7
fix: Yet more patching of intersect code (#8352)
* Yet more patching of intersect code
7 months ago
David Luzar 1ea5b26f25
fix: missing `act()` in flowchart tests (#8354) 7 months ago
Clarence Chan d5f4ee7b3f
fix: z-index change by one causes app to freeze (#8314) 7 months ago
Márk Tolmács 261304c1a4
fix: Patch over intersection calculation issue (#8350)
* Patch over intersection calculation issue
7 months ago
Márk Tolmács 84398a7e5c
fix: Point duplication in LEE on ALT+click (#8347) 7 months ago
Ryan Di 54491d13d4
feat: create flowcharts from a generic element using elbow arrows (#8329)
Co-authored-by: Mark Tolmacs <mark@lazycat.hu>
Co-authored-by: dwelle <5153846+dwelle@users.noreply.github.com>
7 months ago
Márk Tolmács dd1370381d
chore: Refactor and remove scene from elbow arrow generation (#8342)
* Refactor and remove scene from elbow arrow generation
7 months ago
Márk Tolmács 72d6ee48fc
fix: Do not allow resizing unbound elbow arrows either (#8333)
* Fix resizing of unbound elbow arrows
7 months ago
David Luzar 232242d2e9
test: skip test.yml in PRs (#8330) 7 months ago
David Luzar f19ce30dfe
chore: bump `@testing-library/react` `12.1.5` -> `16.0.0` (#8322) 7 months ago
Ryan Di 3cf14c73a3
refactor: rename `draggingElement` -> `newElement` (#8294)
* add newElement to appState

* freedraw should not be an editing element

* do not set editing element for freedraw and generic

* remove ununsed `appState.draggingElement`

* remove setting dragged for new linear element

* decouple selection element from new element

* fix hint for text bindables

* update snapshot

* fixes

* fix frame regressions

* add comments to types

* document `editingElement`

---------

Co-authored-by: dwelle <5153846+dwelle@users.noreply.github.com>
7 months ago
zsviczian c67815f7b0
fix: Duplicating arrow without bound elements throws error (#8316)
Co-authored-by: David Luzar <5153846+dwelle@users.noreply.github.com>
7 months ago
Márk Tolmács c641860cb1
fix: CVE-2023-45133 (#7988)
* Upgrade @babel/* versions to 7.24 to ensure non-vulnerable Babel versions
* Pinning React version to 18.2.0 exactly, avoiding test-utils type version clashes
* Fix warning message on yarn start
* Moving react to peer dependencies
* Moving app dependencies from workspace into app
* Bump vitest to 1.6.0 to fix history.test.tsx breaking

---------

Signed-off-by: Mark Tolmacs <mark@lazycat.hu>
7 months ago
Marcel Mraz 84d89b9a8a
fix: throttle fractional indices validation (#8306) 7 months ago
David Luzar e63dd025c9
fix: allow binding elbow arrows to frame children (#8309) 7 months ago
Márk Tolmács 15e019706d
feat: Orthogonal (elbow) arrows for diagramming (#8299)
Co-authored-by: dwelle <5153846+dwelle@users.noreply.github.com>
7 months ago
Marcel Mraz 80ea7ca23f
fix: skip registering font faces for local fonts (#8303) 7 months ago
David Luzar e844580b14
feat: remove automatic frame naming (#8302) 7 months ago
Marcel Mraz 5a0771ad9c
fix: load fonts for `exportToCanvas` (#8298) 7 months ago
Marcel Mraz adcdbe2907
fix: re-add Cascadia Code with ligatures (#8291) 7 months ago
Marcel Mraz 230d0edc44
feat: multiple fonts fallbacks (#8286) 7 months ago
Marcel Mraz d0a380758e
feat: ability to debug the state of fractional indices (#8235) 7 months ago
Ryan Di 7b36de0476
fix: linear elements not selected on pointer up from hitting its bound text (#8285)
Co-authored-by: dwelle <5153846+dwelle@users.noreply.github.com>
7 months ago
David Luzar 2427e622b0
feat: improve mermaid detection on paste (#8287) 7 months ago
Marcel Mraz 62228e0bbb
feat: introduce font picker (#8012)
Co-authored-by: dwelle <5153846+dwelle@users.noreply.github.com>
7 months ago
DDDDD12138 4c5408263c
chore: Correct Typos in Code Comments (#8268)
chore: correct typos

Co-authored-by: wuzhiqing <wuzhiqing@linklogis.com>
7 months ago
Aakansha Doshi bd7b778f41
perf: cache the temp canvas created for labeled arrows (#8267)
* perf: cache the temp canvas created for labeled arrows

* use allEleemntsMap so bound text element can be retrieved when editing

* remove logs

* fix rotation

* pass isRotating

* feat: cache `element.angle` instead of relying on `appState.isRotating`

---------

Co-authored-by: dwelle <5153846+dwelle@users.noreply.github.com>
7 months ago
David Luzar 43b2476dfe
fix: revert default element canvas padding change (#8266) 7 months ago
BlueGreenMagick df8875a497
fix: freedraw jittering (#8238) 7 months ago
Aakansha Doshi d25a7d365b
feat: upgrade mermaid-to-excalidraw to v1.1.0 (#8226)
* feat: upgrade mermaid-to-excalidraw to v1.1.0

* fixes

* upgrade and remove config as its redundant

* lint

* upgrade to v1.1.0
8 months ago
David Luzar e52c2cd0b6
fix: log allowed events (#8224) 8 months ago
David Luzar 96eeec5119
feat: bump max file size (#8220) 8 months ago
zsviczian 2e1f08c796
fix: memory leak - scene.destroy() and window.launchQueue (#8198) 8 months ago
David Luzar 1d5b41dabb
fix: stop updating text versions on init (#8191) 8 months ago
Márk Tolmács 66a2f24296
fix: Add binding update to manual stat changes (#8183)
Manual stats changes now respect previous element bindings.
8 months ago
Márk Tolmács 04668d8263
fix: Binding after duplicating is now applied for both the old and duplicate shapes (#8185)
Using ALT/OPT + drag to clone does not transfer the bindings (or leaves the duplicates in place of the old one , which are also not bound).

Signed-off-by: Mark Tolmacs <mark@lazycat.hu>
8 months ago
David Luzar abbeed3d5f
feat: support Stats bound text `fontSize` editing (#8187) 8 months ago
Márk Tolmács ba8c09d529
fix: Incorrect point offsetting in LinearElementEditor.movePoints() (#8145)
The LinearElementEditor.movePoints() function incorrectly calculates the offset for local linear element points when multiple targetPoints are provided, one of those target points is index === 0 AND the other points are moved in the negative direction, and ending up with negative local coordinates.

Signed-off-by: Mark Tolmacs <mark@lazycat.hu>
8 months ago
David Luzar 744b3e5d09
fix: stats state leaking & race conds (#8177) 8 months ago
Esteban Romo 6ba9bd60e8
feat: allow props.initialData to be a function (#8135) 8 months ago
zsviczian a1ffa064df
fix: only bind arrow (#8152)
Co-authored-by: dwelle <5153846+dwelle@users.noreply.github.com>
8 months ago
David Luzar 4dc4590f24
fix: repair invalid binding on restore & fix type check (#8133) 8 months ago
Ryan Di d2f67e619f
feat: editable element stats (#6382)
Co-authored-by: dwelle <5153846+dwelle@users.noreply.github.com>
9 months ago
David Luzar 22b39277f5
feat: paste as mermaid if applicable (#8116) 9 months ago
David Luzar 08b13f971d
fix: wysiwyg blur-submit on mobile (#8075) 9 months ago
David Luzar 69f4cc70cb
feat: stop autoselecting text on text edit on mobile (#8076) 9 months ago
Ryan Di 860308eb27
feat: create new text with width (#8038)
Co-authored-by: dwelle <5153846+dwelle@users.noreply.github.com>
9 months ago
David Luzar 4eb9463f26
fix: restore linear dimensions from points (#8062) 9 months ago
Marcel Mraz 661d6a4a75
fix: flaky snapshot tests with floating point precision issues (#8049) 9 months ago
David Luzar defd34923a
docs: fix `updateScene` `storeAction` default tsdoc & document types (#8048) 9 months ago
Ryan Di c540bd68aa
feat: wrap long text when pasting (#8026)
Co-authored-by: dwelle <5153846+dwelle@users.noreply.github.com>
9 months ago
Marcel Mraz eddbe55f50
fix: always re-generate index of defined moved elements (#8040) 9 months ago
Aakansha Doshi 2f9526da24
feat: upgrade to mermaid-to-excalidraw v1 🚀 (#8022)
* feat: upgrade to mermaid-to-excalidraw v1 🚀

* upgrade to v1
9 months ago
David Luzar 1b6e3fe05b
feat: rerender canvas on focus (#8035) 9 months ago
VatsalSoni_13 afe52c89a7
fix: undo/redo when exiting view mode (#8024)
Co-authored-by: dwelle <5153846+dwelle@users.noreply.github.com>
9 months ago
zsviczian be4e127f6c
fix: Two finger panning is slow (#7849)
Co-authored-by: dwelle <5153846+dwelle@users.noreply.github.com>
9 months ago
Karthik Nishanth ff0b4394b1
feat: add missing `type="button"` (#8030) 9 months ago
Hey 7d8b7fc14d
fix: compatible safari layers button svg (#8020)
Co-authored-by: ysen <ysen.ge@hairobotics.com>
Co-authored-by: dwelle <5153846+dwelle@users.noreply.github.com>
9 months ago
Ryan Di 971b4d4ae6
feat: text wrapping (#7999)
* resize single elements from the side

* fix lint

* do not resize texts from the sides (for we want to wrap/unwrap)

* omit side handles for frames too

* upgrade types

* enable resizing from the sides for multiple elements as well

* fix lint

* maintain aspect ratio when elements are not of the same angle

* lint

* always resize proportionally for multiple elements

* increase side resizing padding

* code cleanup

* adaptive handles

* do not resize for linear elements with only two points

* prioritize point dragging over edge resizing

* lint

* allow free resizing for multiple elements at degree 0

* always resize from the sides

* reduce hit threshold

* make small multiple elements movable

* lint

* show side handles on touch screen and mobile devices

* differentiate touchscreens

* keep proportional with text in multi-element resizing

* update snapshot

* update multi elements resizing logic

* lint

* reduce side resizing padding

* bound texts do not scale in normal cases

* lint

* test sides for texts

* wrap text

* do not update text size when changing its alignment

* keep text wrapped/unwrapped when editing

* change wrapped size to auto size from context menu

* fix test

* lint

* increase min width for wrapped texts

* wrap wrapped text in container

* unwrap when binding text to container

* rename `wrapped` to `autoResize`

* fix lint

* revert: use `center` align when wrapping text in container

* update snaps

* fix lint

* simplify logic on autoResize

* lint and test

* snapshots

* remove unnecessary code

* snapshots

* fix: defaults not set correctly

* tests for wrapping texts when resized

* tests for text wrapping when edited

* fix autoResize refactor

* include autoResize flag check

* refactor

* feat: rename action label & change contextmenu position

* fix: update version on `autoResize` action

* fix infinite loop when editing text in a container

* simplify

* always maintain `width` if `!autoResize`

* maintain `x` if `!autoResize`

* maintain `y` pos after fontSize change if `!autoResize`

* refactor

* when editing, do not wrap text in textWysiwyg

* simplify text editor

* make test more readable

* comment

* rename action to match file name

* revert function signature change

* only update  in app

---------

Co-authored-by: dwelle <5153846+dwelle@users.noreply.github.com>
9 months ago
Guillaume Grossetie 79257a1923
fix: correctly resolve the package version (#8016)
The property name is `VITE_PKG_VERSION` (not `PKG_VERSION`)

Resolves #7984
9 months ago
Marcel Mraz dc66261c19
fix: re-introduce wysiwyg width offset (#8014) 10 months ago
David Luzar 273ba803d9
fix: font not rendered correctly on init (#8002) 10 months ago
David Luzar 301e83805d
feat: add install-PWA to command palette (#7935) 10 months ago
David Luzar ed5ce8d3de
fix: command palette filter (#7981) 10 months ago
Aakansha Doshi 1ed53b153c
build: enable consistent type imports eslint rule (#7992)
* build: enable consistent type imports eslint rule

* change to warn

* fix the warning in example and excalidraw-app

* fix packages

* enable type annotations and throw error for the rule
10 months ago
Aakansha Doshi c1926f33bb
fix: remove unused param from drawImagePlaceholder (#7991) 10 months ago
David Luzar d1f37cc64f
feat: tweak a few icons & add line editor button to side panel (#7990) 10 months ago
Márk Tolmács d9bbf1eda6
feat: Allow binding only via linear element ends (#7946)
Arrows now only bind to new shapes if their start or end point is dragged close to them. Arrows previously bound to shapes remain bound on move and drag if at the end of the drag/move the points remain in the original shapes' binding area.

---------

Signed-off-by: Mark Tolmacs <mark@lazycat.hu>
Co-authored-by: dwelle <5153846+dwelle@users.noreply.github.com>
Co-authored-by: Sammy Lee <sammy.joe.lee@gmail.com>
10 months ago
Ryan Di 88812e0386
feat: resize elements from the sides (#7855)
Co-authored-by: dwelle <5153846+dwelle@users.noreply.github.com>
10 months ago
Marcel Mraz 6e5aeb112d
feat: record freedraw tool selection to history (#7949) 10 months ago
Marcel Mraz 4d83d1c91e
fix: use Reflect API instead of Object.hasOwn (#7958) 10 months ago
Márk Tolmács a04676d423
fix: CTRL/CMD & arrow point drag unbinds both sides (#6459) (#7877) 10 months ago
Milos Vetesnik c851aaaf7b
fix: z-index for laser pointer to be able to draw on embeds and such (#7918) 10 months ago
Marcel Mraz 1bd2b1fe55
feat: export reconciliation (#7917) 10 months ago
Marcel Mraz 015b46ab23
feat: expose `StoreAction` in relation to multiplayer history (#7898)
Improved Store API and improved handling of actions to eliminate potential concurrency issues
10 months ago
Marcel Mraz 530617be90
feat: multiplayer undo / redo (#7348) 10 months ago
David Luzar 5211b003b8
fix: double text rendering on edit (#7904) 10 months ago
Ryan Di bbcca06b94
fix: collision regressions from vector geometry rewrite (#7902) 10 months ago
David Luzar 890ed9f31f
feat: add "toggle grid" to command palette (#7887) 11 months ago
David Luzar da2e507298
fix: allow same origin for all necessary domains (#7889) 11 months ago
David Luzar f59b4f6af4
fix: always make sure we render bound text above containers (#7880) 11 months ago
David Luzar afcde542f9
fix: parse embeddable srcdoc urls strictly (#7884) 11 months ago
Ryan Di 4689a6b300
fix: hit test for closed sharp curves (#7881) 11 months ago
David Luzar 0ae9b383d6
fix: Gist embed allowing unsafe html (#7883) 11 months ago
David Luzar f597bd3e01
fix: command palette tweaks and fixes (#7876) 11 months ago
Ryan Di 4987cc53d0
fix: include borders when testing insides of a shape (#7865) 11 months ago
Rinku Chaudhari d917db438e
fix: external link not opening (#7859) 11 months ago
Aakansha Doshi a33a400f01
fix: add safe check for arrow points length in tranformToExcalidrawElements (#7863)
* fix: add safe check for arrow points length in tranformToExcalidrawElements

* add spec

* throw error only for dev mode

* fix lint
11 months ago
Arnost Pleskot cd50aa719f
feat: add system mode to the theme selector (#7853)
Co-authored-by: dwelle <5153846+dwelle@users.noreply.github.com>
11 months ago
Ryan Di 32df5502ae
feat: fractional indexing (#7359)
* Introducing fractional indices as part of `element.index`

* Ensuring invalid fractional indices are always synchronized with the array order

* Simplifying reconciliation based on the fractional indices

* Moving reconciliation inside the `@excalidraw/excalidraw` package

---------

Co-authored-by: Marcel Mraz <marcel@excalidraw.com>
Co-authored-by: dwelle <5153846+dwelle@users.noreply.github.com>
11 months ago
Ryan Di bbdcd30a73
refactor: update collision from ga to vector geometry (#7636)
* new collision api

* isPointOnShape

* removed redundant code

* new collision methods in app

* curve shape takes starting point

* clean up geometry

* curve rotation

* freedraw

* inside curve

* improve ellipse inside check

* ellipse distance func

* curve inside

* include frame name bounds

* replace previous private methods for getting elements at x,y

* arrow bound text hit detection

* keep iframes on top

* remove dependence on old collision methods from app

* remove old collision functions

* move some hit functions outside of app

* code refactor

* type

* text collision from inside

* fix context menu test

* highest z-index collision

* fix 1px away binding test

* strictly less

* remove unused imports

* lint

* 'ignore' resize flipping test

* more lint fix

* skip 'flips while resizing' test

* more test

* fix merge errors

* fix selection in resize test

* added a bit more comment

---------

Co-authored-by: dwelle <5153846+dwelle@users.noreply.github.com>
11 months ago
David Luzar 3e334a67ed
feat: show firefox-compatible command palette shortcut alias (#7825) 11 months ago
David Luzar 1d71f84515
fix: stop using lookbehind for backwards compat (#7824) 11 months ago
Ryan Di 550a388b2b
feat: command palette (#7804)
Co-authored-by: dwelle <5153846+dwelle@users.noreply.github.com>
11 months ago
David Luzar 65bc500598
fix: `excalidrawAPI.toggleSidebar` not switching between tabs correctly (#7821) 11 months ago
Aakansha Doshi 7949aa1f1c
feat: upgrade mermaid-to-excalidraw to 0.3.0 (#7819) 11 months ago
David Luzar 15bfa626b4
feat: support to not render remote cursor & username (#7130) 11 months ago
David Luzar 068895db0e
feat: expose more collaborator status icons (#7777) 11 months ago
dwelle b7babe554b feat: load old library if migration fails 12 months ago
dwelle 6a385d6663 feat: change LibraryPersistenceAdapter `load()` `source` -> `priority`
to clarify the semantics
12 months ago
David Luzar 2382fad4f6
feat: store library to IndexedDB & support storage adapters (#7655) 12 months ago
Marcel Mraz 480572f893
fix: correcting Assistant metrics (#7758)
* Changed Assistant metrics to the corrrect ones from OS/2 table

* Adding more information about font metrics

* Adding branded types to avoid future mistakes
12 months ago
David Luzar 68b1fdb20e
fix: add missing font metrics for Assistant (#7752) 12 months ago
David Luzar a38e82f999
feat: close dropdown on escape (#7750) 12 months ago
David Luzar a07f6e9e3a
feat: show ai badge for discovery (#7749) 12 months ago
Marcel Mraz 7e471b55eb
feat: text measurements based on font metrics (#7693)
* Introduced vertical offset based on harcoded font metrics 

* Unified usage of alphabetic baseline for both canvas & svg export

* Removed baseline property

* Removed font-size rounding on Safari

* Removed artificial width offset
12 months ago
Ryan Di 160440b860
feat: improve collab error notification (#7741)
* identify cause

* toast after dialog for error messages in collab

* remove comment

* shake tooltip instead for repeating collab errors

* clear collab error

* empty commit

* simplify & fix reset race condition

---------

Co-authored-by: dwelle <5153846+dwelle@users.noreply.github.com>
12 months ago
Aakansha Doshi af1a3d5b76
fix: export utils from excalidraw package in excalidraw library (#7731)
* fix: export utils from excalidraw package in excalidraw library

* don't export utils utilities

* fix import path

* fix export

* don't export export utilites

* fix export paths

* reexport utils from excalidraw package

* add exports from withinBounds

* fix path
1 year ago
Aakansha Doshi b09b5cb5f4
fix: split renderScene so that locales aren't imported unnecessarily (#7718)
* fix: split renderScene so that locales aren't imported unnecessarily

* lint

* split export code

* rename renderScene to helpers.ts

* add helpers

* fix typo

* fixes

* move renderElementToSvg to export

* lint

* rename export to staticSvgScene

* fix
1 year ago
Aakansha Doshi f639d44a95
fix: remove dependency of t in blob.ts (#7717)
* remove dependency of t in blob.ts

* fix
1 year ago
Aakansha Doshi f5ab3e4e12
fix: remove dependency of t from clipboard and image (#7712)
* fix: remove dependency of t from clipboard and image

* pass errorMessage to copyTextToSystemClipboard where needed

* wrap copyTextToSystemClipboard and rethrow translated error in caller

* review fix

* typo
1 year ago
Aakansha Doshi 361a9449bb
fix: remove scene hack from export.ts & remove pass elementsMap to getContainingFrame (#7713)
* fix: remove scene hack from export.ts as its not needed anymore

* remove

* pass elementsMap to getContainingFrame

* remove unused `mapElementIds` param

---------

Co-authored-by: dwelle <5153846+dwelle@users.noreply.github.com>
1 year ago
Aakansha Doshi 2e719ff671
fix: decouple pure functions from hyperlink to prevent mermaid bundling (#7710)
* move hyperlink code into its folder

* move pure js functions to hyperlink/helpers and move actionLink to actions

* fix tests

* fix
1 year ago
Aakansha Doshi 79d9dc2f8f
fix: make bounds independent of scene (#7679)
* fix: make bounds independent of scene

* pass only elements to getCommonBounds

* lint

* pass elementsMap to getVisibleAndNonSelectedElements
1 year ago
Aakansha Doshi 9013c84524
fix: make LinearElementEditor independent of scene (#7670)
* fix: make LinearElementEditor independent of scene

* more fixes

* pass elements and elementsMap to maybeBindBindableElement,getHoveredElementForBinding,bindingBorderTest,getElligibleElementsForBindableElementAndWhere,isLinearElementEligibleForNewBindingByBindable

* replace `ElementsMap` with `NonDeletedSceneElementsMap` & remove unused params

* fix lint

---------

Co-authored-by: dwelle <5153846+dwelle@users.noreply.github.com>
1 year ago
Aakansha Doshi 47f87f4ecb
fix: remove scene from getElementAbsoluteCoords and dependent functions and use elementsMap (#7663)
* fix: remove scene from getElementAbsoluteCoords and dependent functions and use elementsMap

* lint

* fix

* use non deleted elements where possible

* use non deleted elements map in actions

* pass elementsMap instead of array to elementOverlapsWithFrame

* lint

* fix

* pass elementsMap to getElementsCorners

* pass elementsMap to getEligibleElementsForBinding

* pass elementsMap in bindOrUnbindSelectedElements and unbindLinearElements

* pass elementsMap in elementsAreInFrameBounds,elementOverlapsWithFrame,isCursorInFrame,getElementsInResizingFrame

* pass elementsMap in getElementsWithinSelection, getElementsCompletelyInFrame, isElementContainingFrame, getElementsInNewFrame

* pass elementsMap to getElementWithTransformHandleType

* pass elementsMap to getVisibleGaps, getMaximumGroups,getReferenceSnapPoints,snapDraggedElements

* lint

* pass elementsMap to bindTextToShapeAfterDuplication,bindLinearElementToElement,getTextBindableContainerAtPosition

* revert changes for bindTextToShapeAfterDuplication
1 year ago
Aakansha Doshi 73bf50e8a8
fix: remove t from getDefaultAppState and allow name to be nullable (#7666)
* fix: remove t and allow name to be nullable

* pass name as required prop

* remove Unnamed

* pass name to excalidrawPlus as well for better type safe

* render once we have excalidrawAPI to avoid defaulting

* rename `getAppName` -> `getName` (temporary)

* stop preventing editing filenames when `props.name` supplied

* keep `name` as optional param for export functions

* keep `appState.name` on `props.name` state separate

* fix lint

* assertive first

* fix lint

* Add TODO

---------

Co-authored-by: dwelle <5153846+dwelle@users.noreply.github.com>
1 year ago
Aakansha Doshi 48c3465b19
docs: release patch v0.17.3 (#7673)
* docs: release patch v0.17.3

* update cl
1 year ago
David Luzar adc4c9f484
fix: prevent panning to trigger history on macos chrome (#7671) 1 year ago
YuBin, Hsu def1df2c68
fix: keep customData when converting to ExcalidrawElement (#7656)
* feat: keep customData when converting to ExcalidrawElement (#7654)

* docs: add changelog for keeping customData when converting to ExcalidrawElement
1 year ago
David Luzar 0513b647ec
feat: change collab trigger & add share dialog (#7647) 1 year ago
David Luzar a289c42830
feat: add loading state to FilledButton (#7650) 1 year ago
David Luzar d67eaa8710
fix: file save timing out with big file sizes (#7649) 1 year ago
Aakansha Doshi 0c3dffb082
fix: make getEmbedLink independent of t function (#7643)
* fix: make getEmbedLink independent of t function

* rename warning to error and make it type safe
1 year ago
Milos Vetesnik 0e0f34edd8
fix: follow mode border for hosts apps (#7642) 1 year ago