* fix: Bind keyboard events to excalidraw container
* fix cases around blurring
* fix modal rendering so keyboard shortcuts work on modal as well
* Revert "fix modal rendering so keyboard shortcuts work on modal as well"
This reverts commit 2c8ec6be8eff7d308591467fe2c33cfbca16138f.
* Attach keyboard event in react way so we need not handle portals separately (modals)
* dnt propagate esc event when modal shown
* focus the container when help dialog closed with shift+?
* focus the help icon when help dialog on close triggered
* move focusNearestTabbableParent to util
* rename util to focusNearestParent and remove outline from excal and modal
* Add prop bindKeyGlobally to decide if keyboard events should be binded to document and allow it in excal app, revert tests
* fix
* focus container after installing library, reset library and closing error dialog
* fix tests and create util to focus container
* Add excalidraw-container class to focus on the container
* pass focus container to library to focus current instance of excal
* update docs
* remove util as it wont be used anywhere
* fix propagation not being stopped for React keyboard handling
* tweak reamde
Co-authored-by: David Luzar <luzar.david@gmail.com>
* tweak changelog
* rename prop to handleKeyboardGlobally
Co-authored-by: dwelle <luzar.david@gmail.com>
* feat: Support hiding save, save as, clear & export
* Remove canvasActions from state & minor changes
* Rename prop to UIOptions & pass default value
* Make requested changes
* better type checking so that optional check not needed at every point
* remove optional checks
* Add few tests
* Add describe block for canvasActions & use snapshot tests
* Add support for hiding canvas background picker
* Take snapshot of canvasActions instead of the whole app
* Add support for hiding dark mode toggle
* Update README.md
* Rename table heading
* Update changelog
* Make requested changes
* Update test name
* tweaks
Co-authored-by: Aakansha Doshi <aakansha1216@gmail.com>
* Remove width/height from the ".excalidraw" container so it will sized automatically.
* updated all ref calculation to ".excalidraw" instead of parent since now ".excalidraw" will get resized
* Remove props width/height as its not needed anymore.
* Resize handler is also not needed anymore.
* Position absolute canvas due to #3379 (comment)
* move css to style and remove one extra rerendering
* factor out mock logic for test
* set height, width so as to avoid unnecessary updates of regression snap
* better mock
* better type checking and omit width,height from getDefaultAppState and also restore
* revert
* default to window dimensions in constructor
* update docs
* update
* update
* tweaks
* feat: Add renderCustomStats prop to render extra stats & move storage and version to renderCustomStats
* expose Api to update toast message so single instance of toast is used
* rename to setToastMessage
* update docs
* feat: set window.name in excalidraw app so library installation always opens on same tab & also support target for excalidraw libraries
* update changelog and readme
* Update public/index.html
Co-authored-by: David Luzar <luzar.david@gmail.com>
* use level 4 heading
* Update src/packages/excalidraw/README.md
Co-authored-by: David Luzar <luzar.david@gmail.com>
Co-authored-by: David Luzar <luzar.david@gmail.com>
* feat: Add label for name field and use input when editable in export dialog
* fix
* review fix
* dnt allow to edit file name when view mode
* Update src/components/ProjectName.tsx
Co-authored-by: David Luzar <luzar.david@gmail.com>
Co-authored-by: David Luzar <luzar.david@gmail.com>
* Allow updating name on updateScene
* Revert "Allow updating name on updateScene"
This reverts commit 4e07a608d38a585e0f3c04e26b9f5e0e404824b1.
* Make requested changes
* Make requested changes
* Remove customName from state
* Remove redundant if statement
* Add tests, update changelog and minor fixes
* remove eempty lines
* minor fixes
* no border and on hover no background change
* Give preference to name prop when initialData.appState.name is present and update specs
* minor fix
* Fix name input style in dark mode
Co-authored-by: Aakansha Doshi <aakansha1216@gmail.com>
* feat: Expose the API to calculate offsets and remove offsetTop and offsetLeft props
* update
* fix tests
* fix
* update readme and changelog
* fix
* better
* support appearance when updating scene data
* works!
* whoops, missed a prop
* hide appearance button when prop is not set
* cleanup
* fix export + rename prop to theme
* rename to showThemeBtn, hide via react instead of css
* adapt to new state name
* add tests and css selector to target the dark mode toggle
* updated changelog and readme
* fix markdown rendering in readme
* pr feedback
* Use the web share target API
* Make requested changes
* Remove line
* Add application/json back
* Add application/vnd.excalidraw+json
* Add 'POST' check back
* Make requested changes
* Update src/appState.ts
Co-authored-by: Thomas Steiner <tomac@google.com>
* Update test
* Override initializeScene
* Use Excalidraw MIME type
* Minor fixes
* More MIME type tweaks
* More permissive file open
* Be overpermissive in file open
Co-authored-by: Thomas Steiner <tomac@google.com>
Co-authored-by: tomayac <steiner.thomas@gmail.com>