* 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>
* fix: Position text editor absolute and fix the offsets so it doesn't remain fixed when container is scrolled
* update changelog
* Update src/packages/excalidraw/CHANGELOG.md
* fix: wrap excalidraw in position relative so that host need not add it explicitly to fix positioning when non zero offsets
* patch version
* Hide scrollbars on excalidraw container
* remove overflow hidden from index.html since its handled in excalidraw container
* review fix
* update changelog
* fix: Reduce the scroll debounce timeout to 100ms so offsets get updated faster when the container scrolled
fixes https://github.com/excalidraw/excalidraw/issues/3175
* update changelog
* update offsets only when if it changes
* up
* Update src/components/App.tsx
Co-authored-by: David Luzar <luzar.david@gmail.com>
* feat: Add support for scrollToCenter in initialData so host can control whether to scroll to center on mount
* fix
* update changelog and readme
* fix
* Scroll to center only for collab and shareable links in excalidraw app
* fix test
* update readme
* Update src/packages/excalidraw/README.md