Commit Graph

153 Commits (5a0771ad9c68f5011784b46c96f8360da1599d42)

Author SHA1 Message Date
Ryan Di 88812e0386
feat: resize elements from the sides (#7855)
Co-authored-by: dwelle <5153846+dwelle@users.noreply.github.com>
9 months ago
Marcel Mraz 6e5aeb112d
feat: record freedraw tool selection to history (#7949) 9 months ago
Marcel Mraz 4d83d1c91e
fix: use Reflect API instead of Object.hasOwn (#7958) 9 months ago
Márk Tolmács a04676d423
fix: CTRL/CMD & arrow point drag unbinds both sides (#6459) (#7877) 9 months ago
Milos Vetesnik c851aaaf7b
fix: z-index for laser pointer to be able to draw on embeds and such (#7918) 9 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) 10 months ago
David Luzar da2e507298
fix: allow same origin for all necessary domains (#7889) 10 months ago
David Luzar f59b4f6af4
fix: always make sure we render bound text above containers (#7880) 10 months ago
David Luzar afcde542f9
fix: parse embeddable srcdoc urls strictly (#7884) 10 months ago
Ryan Di 4689a6b300
fix: hit test for closed sharp curves (#7881) 10 months ago
David Luzar 0ae9b383d6
fix: Gist embed allowing unsafe html (#7883) 10 months ago
David Luzar f597bd3e01
fix: command palette tweaks and fixes (#7876) 10 months ago
Ryan Di 4987cc53d0
fix: include borders when testing insides of a shape (#7865) 10 months ago
Rinku Chaudhari d917db438e
fix: external link not opening (#7859) 10 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
10 months ago
Arnost Pleskot cd50aa719f
feat: add system mode to the theme selector (#7853)
Co-authored-by: dwelle <5153846+dwelle@users.noreply.github.com>
10 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>
10 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>
10 months ago
David Luzar 3e334a67ed
feat: show firefox-compatible command palette shortcut alias (#7825) 10 months ago
David Luzar 1d71f84515
fix: stop using lookbehind for backwards compat (#7824) 10 months ago
Ryan Di 550a388b2b
feat: command palette (#7804)
Co-authored-by: dwelle <5153846+dwelle@users.noreply.github.com>
10 months ago
David Luzar 65bc500598
fix: `excalidrawAPI.toggleSidebar` not switching between tabs correctly (#7821) 10 months ago
Aakansha Doshi 7949aa1f1c
feat: upgrade mermaid-to-excalidraw to 0.3.0 (#7819) 10 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 11 months ago
dwelle 6a385d6663 feat: change LibraryPersistenceAdapter `load()` `source` -> `priority`
to clarify the semantics
11 months ago
David Luzar 2382fad4f6
feat: store library to IndexedDB & support storage adapters (#7655) 11 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
11 months ago
David Luzar 68b1fdb20e
fix: add missing font metrics for Assistant (#7752) 11 months ago
David Luzar a38e82f999
feat: close dropdown on escape (#7750) 11 months ago
David Luzar a07f6e9e3a
feat: show ai badge for discovery (#7749) 11 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
11 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>
11 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
11 months 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
11 months ago
Aakansha Doshi f639d44a95
fix: remove dependency of t in blob.ts (#7717)
* remove dependency of t in blob.ts

* fix
11 months 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
12 months 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>
12 months 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
12 months 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
12 months 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>
12 months 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
12 months 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>
12 months ago
Aakansha Doshi 48c3465b19
docs: release patch v0.17.3 (#7673)
* docs: release patch v0.17.3

* update cl
12 months ago
David Luzar adc4c9f484
fix: prevent panning to trigger history on macos chrome (#7671) 12 months 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
12 months 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
Aakansha Doshi 1c39bd5781
fix: don't bundle react and jotai when importing from scene (#7640)
* don't bundle react and jotai when importing from scene

* fix
1 year ago
Aakansha Doshi 90ad885446
feat: support onPointerUp prop (#7638)
* feat: support onPointerUp prop

* update changelog

* Update packages/excalidraw/CHANGELOG.md

Co-authored-by: David Luzar <5153846+dwelle@users.noreply.github.com>

---------

Co-authored-by: David Luzar <5153846+dwelle@users.noreply.github.com>
1 year ago
Aakansha Doshi 1741c234a6
fix: decouple container cache logic to containerCache. (#7637) 1 year ago
Aakansha Doshi 63b50b3586
fix: don't bundle react-dom when importing from transformHandles (#7634)
* fix: don't bundle react when importing from transfromHandles

* rename to DEFAULT_TRANSFORM_HANDLE_SPACING
1 year ago
Aakansha Doshi e0fefa8025
fix: don't bundle react-dom when importing from element (#7635) 1 year ago
Aashir Israr 2409c091ff
feat: support roundness for images (#7558)
Co-authored-by: dwelle <5153846+dwelle@users.noreply.github.com>
1 year ago
Andran1k 626fe252ab
fix: frame name field (#7457)
Co-authored-by: dwelle <5153846+dwelle@users.noreply.github.com>
1 year ago
Aakansha Doshi 10bd08ef19
fix: make getBoundTextElement and related helpers pure (#7601)
* fix: make getBoundTextElement pure

* updating args

* fix

* pass boundTextElement to getBoundTextMaxWidth

* fix labelled arrows

* lint

* pass elementsMap to removeElementsFromFrame

* pass elementsMap to getMaximumGroups, alignElements and distributeElements

* lint

* pass allElementsMap to renderElement

* lint

* feat: make more typesafe

* fix: remove unnecessary assertion

* fix: remove unused params

---------

Co-authored-by: dwelle <5153846+dwelle@users.noreply.github.com>
1 year ago
Aakansha Doshi 4f0a2a9593
docs: add next js with app router example (#7552)
* move the existing example to with-script-in-browser

* Add example with next js app router

* disable ssr for excalidraw client comp

* typo

* update output dir

* don't include nextjs example in tsconfig

* remove meta.json

* lint

* remove example.ts

* port

* move the examples outside packages and use the deps as workspaces in examples

* update gitignore

* fix example

* update path of build dir

* fix

* fix scripts

* try local path

* fix

* update commands

* fix

* fix

* fix script

* skip ts

* disable ts

* add vercel.json

* install

* update tsconfig

* fix lint

* remove console.log

* lets see if this works

* revert

* remove ts nocheck

* add types and some utils in nextjs example

* fix types

* updatw example and remove nextjs dynamic syntax so we don't import excal twice

* move both examples to workspaces and create generic example to be used by browser and next js both

* copy the static assets to nextjs

* fix ts config

* render custom menu items

* fix custom footer

* fix types in browser example

* use regular imports for importing excal and import it using dynamic next js in app router instead

* Add example for pages router

* fix css discrepancies

* fix css

* configure output dir

* fix

* fix css

* rename to with-nextjs

* move components to examples/excalidraw/components
1 year ago
David Luzar 89bd6181f2
fix: revert `mapElementIds` flag removal (#7594) 1 year ago
David Luzar 0415c616b1
refactor: decoupling global Scene state part-1 (#7577) 1 year ago
David Luzar 740a165452
fix: filter out elements not overlapping frame on paste (#7591) 1 year ago
Ryan Di 4997624a3a
fix: frame name editing inconvenience (#7437) 1 year ago
Barnabás Molnár b66daae1f3
fix: Truncate collaborator name in dropdown. (#7576) 1 year ago
David Luzar 1e7df58b5b
feat: add pasted elements to frame under cursor (#7590) 1 year ago
David Luzar 46da032626
fix: exporting frame-overlapping elements belonging to other frames (#7584) 1 year ago
みけCAT 3b0593baa7
fix: Prevent the library label from being collapsed (#7579) 1 year ago
Aakansha Doshi a4e5e46dd1
fix: move default to last so its compatible with nextjs (#7561) 1 year ago
David Luzar 0fa5f5de4c
fix: translating frames containing grouped text containers (#7557) 1 year ago
David Luzar 5245276409
feat: erase groups atomically (#7545) 1 year ago
David Luzar 0c24a7042f
feat: remove `ExcalidrawEmbeddableElement.validated` flag (#7539) 1 year ago
Are 86cfeb714c
feat: add eraser tool trail (#7511)
Co-authored-by: dwelle <5153846+dwelle@users.noreply.github.com>
1 year ago
David Luzar 872973f145
fix: do not modify elements while erasing (#7531) 1 year ago
Aakansha Doshi 3ecf72a507
docs: add changelog for ESM build (#7542)
* docs: add changelog for ESM build

* move to breaking change
1 year ago
Aakansha Doshi 65047cc2cb
fix: decouple react and react-dom imports from utils and make it treeshakeable (#7527)
fix: decouple react and react-dom imports from utils and make it tree-shakeable
1 year ago
David Luzar 8b993d409e
feat: render embeds lazily (#7519) 1 year ago
David Luzar 1cb350b2aa
feat: update X brand logo & tweak labels (#7518) 1 year ago
David Luzar 43ccc875fb
feat: support multi-embed pasting & x.com domain (#7516) 1 year ago
Aakansha Doshi 49f15c736b
chore: remove unused files (#7509)
chore remove unused files
1 year ago
Aakansha Doshi a8064ba3ee
build: Welcome ESM and Bye Bye UMD (#7441)
* build: Welcome ESM and Bye Bye UMD

* remove package

* create unbundled esm build

* update script for example

* fix typo

* dummy commit

* update autorelease script to build esm

* revert dummy commit

* move react, react-dom and testing library to dev dependencies

* remove entry.js, publicPath and yarn install:deps script

* fix

* upgrade esbuild to fix glob import error for locales

* remove webpack chunk names as thats not needed anymore

* marking the code sideeffects free

* make the library tree-shakeable and move fonts to fonts directory

* allow side effects for css, scss files

* remove tree-shaking

* comment code for tree shaking

* move to vite for example

* bye bye webpack

* ignore ts

* separate build and output dir

* use esbuild for creating bundle for example

* update output dir

* lint

* create browser dev build with source maps and prod with minification

* add dev and prod builds for bundler

* lint

* update script

* remove await

* load prod build

* create minified build in dist

* prod and dev builds using export field

* remove import.meta

* dummy

* define import.meta prod and dev

* fix

* export types

* add types field

* typo

* lint

* Update scripts/buildPackage.js

* move types inside export

* newline
1 year ago
David Luzar e6c3c06c2e
feat: support pen erasing (#7496) 1 year ago
David Luzar d19b51d4f8
fix: drawing-tablet stylus touch events being prevented (#7494) 1 year ago
David Luzar c72e853c85
refactor: editor events sub/unsub refactor (#7483) 1 year ago
zsviczian 5f40a4cad4
fix: missing cross-env from build:umd in package.json (#7460) 1 year ago
David Luzar d91c98b82e
fix: incorrect types in `ActionNavigate` (#7462) 1 year ago
David Luzar 57ea4e61d1
fix: mixing clientId & socketId in UserList (#7461) 1 year ago
David Luzar 0808532b49
fix: follow mode collaborator status indicator (#7459) 1 year ago
Lynda Lin 2a0fe2584e
fix: empty snapLines arrays would cause re-render (#7454)
Co-authored-by: Lynda Lin <lynda.lin@optoma.com>
Co-authored-by: dwelle <5153846+dwelle@users.noreply.github.com>
1 year ago
Adithyan 7bd6496854
refactor: Fix Typo (#7445) 1 year ago
David Luzar 6dfa89e846
fix: emitted visible scene bounds not accounting for offsets (#7450) 1 year ago
David Luzar 20e3acf7a6
feat: bump `socket.io-client` & collab tweaks (#7444) 1 year ago
David Luzar 2c0929e537
fix: follow-mode tweaks (#7443) 1 year ago
Barnabás Molnár aad8ab0123
feat: follow mode (#6848)
Co-authored-by: dwelle <5153846+dwelle@users.noreply.github.com>
1 year ago