* 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
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>
* 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>
* 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>
* Changed Assistant metrics to the corrrect ones from OS/2 table
* Adding more information about font metrics
* Adding branded types to avoid future mistakes
* 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
* 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>
* 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>
* 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
* 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>
* 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
* 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