Commit Graph
100 Commits
Author SHA1 Message Date
David LuzarandGitHub a065ec67a9 fix: eye dropper not accounting for offsets (#6640) 2023-06-02 17:35:25 +02:00
David LuzarandGitHub 079aa72475 feat: eye dropper (#6615) 2023-06-02 17:06:11 +02:00
David LuzarandGitHub 75bea48b54 fix: export dialog shortcut toggles console on firefox (#6620) 2023-05-24 22:52:21 +02:00
David LuzarandGitHub 13780f390a fix: add react v17 useTransition polyfill (#6618) 2023-05-24 15:24:54 +00:00
David LuzarandGitHub a8f0a14610 fix: withInternalFallback leaking state in multi-instance scenarios (#6602) 2023-05-19 15:47:01 +02:00
David LuzarandGitHub f6f9ed0396 refactor: simplify ImageExportDialog (#6578) 2023-05-13 22:58:35 +02:00
David LuzarandGitHub b1b325b9a7 feat: add "unlock all elements" to canvas contextMenu (#5894) 2023-05-13 22:52:03 +02:00
David LuzarandGitHub 5bf27a463c fix: language list containing duplicate en lang (#6583) 2023-05-13 22:50:14 +02:00
David LuzarandGitHub fff9d1522a feat: library sidebar design tweaks (#6582) 2023-05-13 13:18:14 +02:00
David LuzarandGitHub 560231d365 perf: use UIAppState where possible to reduce UI rerenders (#6560) 2023-05-08 10:14:02 +02:00
David LuzarandGitHub 026949204d fix: fix brave error i18n string and remove unused (#6561) 2023-05-06 10:36:42 +02:00
e9cae918a7 feat: sidebar tabs support (#6213)
* feat: Sidebar tabs support [wip]

* tab trigger styling tweaks

* add `:hover` & `:active` states

* replace `@dwelle/tunnel-rat` with `tunnel-rat`

* make stuff more explicit

- remove `Sidebar.Header` fallback (host apps need to render manually), and stop tunneling it (render in place)
- make `docked` state explicit
- stop tunneling `Sidebar.TabTriggers` (render in place)

* redesign sidebar / library as per latest spec

* support no label on `Sidebar.Trigger`

* add Sidebar `props.onStateChange`

* style fixes

* make `appState.isSidebarDocked` into a soft user preference

* px -> rem & refactor

* remove `props.renderSidebar`

* update tests

* remove

* refactor

* rename constants

* tab triggers styling fixes

* factor out library-related logic from generic sidebar trigger

* change `props.onClose` to `onToggle`

* rename `props.value` -> `props.tab`

* add displayNames

* allow HTMLAttributes on applicable compos

* fix example App

* more styling tweaks and fixes

* fix not setting `dockable`

* more style fixes

* fix and align sidebar header button styling

* make DefaultSidebar dockable on if host apps supplies `onDock`

* stop `Sidebar.Trigger` hiding label on mobile

this should be only the default sidebar trigger behavior, and for that we don't need to use `device` hook as we handle in CSS

* fix `dockable` prop of defaultSidebar

* remove extra `typescript` dep

* remove `defaultTab` prop

in favor of explicit `tab` value in `<Sidebar.Trigger/>` and `toggleSidebar()`, to reduce API surface area and solve inconsistency of `appState.openSidebar.tab` not reflecting actual UI value if `defaultTab` was supported (without additional syncing logic which feels like the wrong solution).

* remove `onToggle` in favor of `onStateChange`

reducing API surface area

* fix restore

* comment no longer applies

* reuse `Button` component in sidebar buttons

* fix tests

* split Sidebar sub-components into files

* remove `props.dockable` in favor of `props.onDock` only

* split tests

* fix sidebar showing dock button if no `props.docked` supplied & add more tests

* reorder and group sidebar tests

* clarify

* rename classes & dedupe css

* refactor tests

* update changelog

* update changelog

---------

Co-authored-by: barnabasmolnar <barnabas@excalidraw.com>
2023-05-04 17:33:31 +00:00
David LuzarandGitHub d35386755f feat: retain seed on shift-paste (#6509)
thanks for the review 👍
2023-04-24 10:26:21 +02:00
David LuzarandGitHub fee760d38c feat: allow avif, jfif, webp, bmp, ico image types (#6500
* feat: allow `avif`, `jfif`, `webp`, `bmp`, `ico` image types

* dedupe for SSOT

* more SSOT
2023-04-21 22:53:49 +02:00
David LuzarandGitHub eea30da05a fix: incorrect background fill button active state (#6491) 2023-04-19 16:23:24 +02:00
David LuzarandGitHub 4d0d844e39 feat: constrain export dialog preview size (#6475) 2023-04-18 15:27:51 +02:00
David LuzarandGitHub c3e8ddaf58 fix: improperly cache-busting on canvas scale instead of zoom (#6473) 2023-04-17 11:41:27 +02:00
David LuzarandGitHub f640ddc2aa fix: incorrectly duplicating items on paste/library insert (#6467
* fix: incorrectly duplicating items on paste/library insert

* fix: deduplicate element ids on restore

* tests
2023-04-16 17:22:16 +02:00
David LuzarandGitHub e9064a4a87 fix: library ids cross-contamination on multiple insert (#6466) 2023-04-16 17:09:51 +02:00
David LuzarandGitHub 034113772d fix: color picker keyboard handling not working (#6464) 2023-04-16 15:33:30 +02:00
David LuzarandGitHub e31230f78c refactor: inline SingleLibraryItem into PublishLibrary (#6462
refactor: inline `SingleLibraryItem` into `PublishLibrary` to reduce api surface area
2023-04-16 11:57:13 +02:00
David LuzarandGitHub 399c92d882 fix: utils leaking Scene state (#6461
* fix: utils leaking Scene state

* remove debug

* doc

* add tests for group duplicating

* tweaks
2023-04-16 11:56:25 +02:00
David LuzarandGitHub 372743f59f fix: autoredirect to plus in prod only (#6446) 2023-04-12 10:57:00 +02:00
David LuzarandGitHub e4d8ba226f feat: zigzag fill easter egg (#6439) 2023-04-10 15:38:50 +02:00
David LuzarandGitHub 9e52c30ce8 fix: use ideographic textBaseline to improve layout shift when editing text (#6384) 2023-03-22 18:33:37 +01:00
David LuzarandGitHub ac4c8b3ca7 fix: chrome crashing when embedding scene on chrome arm (#6383) 2023-03-21 18:48:49 +01:00
David LuzarandGitHub 20edddcd4e fix: ensure export preview is centered (#6337) 2023-03-14 13:03:55 +01:00
David LuzarandGitHub 1eee488dab feat: add thai lang support (#6314) 2023-03-11 22:15:52 +01:00
David LuzarandGitHub 8542c95a7a fix: move utility types out of .d.ts file to fix exported declaration files (#6315) 2023-03-04 19:21:57 +01:00
David LuzarandGitHub cef6094d4c fix: more jotai scopes missing (#6313) 2023-03-03 16:19:02 +01:00
David LuzarandGitHub 15655acb5a fix: use jotai scope for editor-specific atoms (#6308) 2023-03-03 11:58:36 +00:00
David LuzarandGitHub e1dc748aef fix: svg text baseline (#6285
* fix: svg text baseline

* fix for multiline
2023-02-26 12:51:44 +01:00
David LuzarandGitHub 04a8c22f39 fix: rerender i18n in host components on lang change (#6224) 2023-02-22 14:01:23 +00:00
David LuzarandGitHub b107c9af2a docs: fix next.js example (#6241) 2023-02-15 15:14:15 +01:00
4414069617 feat: disable canvas smoothing (antialiasing) for right-angled elements (#6186)Co-authored-by: Ignacio Cuadra <67276174+ignacio-cuadra@users.noreply.github.com>
* feat: disable canvas smoothing for text and other types

* disable smoothing for all right-angled elements

* Update src/renderer/renderElement.ts

Co-authored-by: Ignacio Cuadra <67276174+ignacio-cuadra@users.noreply.github.com>

* Update src/renderer/renderElement.ts

Co-authored-by: Ignacio Cuadra <67276174+ignacio-cuadra@users.noreply.github.com>

* fix lint

* always enable smoothing while zooming

---------

Co-authored-by: Ignacio Cuadra <67276174+ignacio-cuadra@users.noreply.github.com>
2023-02-03 17:07:14 +01:00
David LuzarandGitHub 7562d9b533 fix: make tunnels work in multi-instance scenarios (#6178)
* fix: make tunnels work in multi-instance scenarios

* factor tunnels out

* use tunnel-rat fork until upsteam updated
2023-02-01 10:46:17 +05:30
e6de1fe4a4 feat: rewrite public UI component rendering using tunnels (#6117)
* feat: rewrite public UI component rendering using tunnels

* factor out into components

* comments

* fix variable naming

* fix not hiding welcomeScreen

* factor out AppFooter and memoize components

* remove `UIOptions.welcomeScreen` and render only from host app

* factor out tunnels into own file

* update changelog. Keep `UIOptions.welcomeScreen` as deprecated

* update changelog

* lint

---------

Co-authored-by: Aakansha Doshi <aakansha1216@gmail.com>
2023-01-31 13:53:20 +01:00
David LuzarandGitHub 1db078a3dc feat: close MainMenu and Library dropdown on item select (#6152) 2023-01-23 16:54:35 +01:00
David LuzarandGitHub d4afd66268 feat: add hand/panning tool (#6141)
* feat: add hand/panning tool

* move hand tool right of tool lock separator

* tweak i18n

* rename `panning` -> `hand`

* toggle between last tool and hand on `H` shortcut

* hide properties sidebar when `hand` active

* revert to rendering HandButton manually due to mobile toolbar
2023-01-23 16:12:28 +01:00
David LuzarandGitHub 849e6a0c86 fix: button background and svg sizes (#6155)
* fix: button background color fallback

* fix svg width/height
2023-01-23 16:10:04 +01:00
David LuzarandGitHub d2b698093c feat: show copy-as-png export button on firefox and show steps how to enable it (#6125)
* feat: hide copy-as-png shortcut from help dialog if not supported

* fix: support firefox if clipboard.write supported

* show shrotcut in firefox and instead show error message how to enable the flag support

* widen to TypeError because minification

* show copy-as-png on firefox even if it will throw
2023-01-22 12:33:15 +01:00
David LuzarandGitHub d0b33d35db build: temporarily disable pre-commit (#6132) 2023-01-19 13:50:42 +01:00
David LuzarandGitHub 599a8f3c6f feat: support WelcomeScreen customization API (#6048) 2023-01-12 15:49:28 +01:00
David LuzarandGitHub 0982da38fe feat: render unknown supplied children to UI (#6096) 2023-01-12 15:20:16 +01:00
David LuzarandGitHub 618442299f fix: React.memo resolvers not accounting for all props (#6042) 2023-01-09 10:24:17 +01:00
David LuzarandGitHub 809d5ba17f fix: png-exporting does not preserve angles correctly for flipped images (#6085)
* fix: png-exporting does not preserve angles correctly for flipped images

* refactor related code

* simplify further and comment
2023-01-08 16:22:04 +01:00
David LuzarandGitHub 40d53d9231 fix: stale appState of MainMenu defaultItems rendered from Actions (#6074) 2023-01-06 14:32:55 +01:00
David LuzarandGitHub 08afb857c3 fix: show error message on collab save failure (#6063)
* fix: show error message on collab save failure

* comment
2023-01-02 23:53:51 +01:00
David LuzarandGitHub 9230c8f4d2 fix: remove ga from docker build (#6059)
* fix: remove ga from docker build

* lint

* fix debug
2023-01-02 21:21:57 +01:00
5fcf6a4845 fix: remove background from wysiwyg when editing arrow label (#6033)
Co-authored-by: Aakansha Doshi <aakansha1216@gmail.com>
2022-12-23 19:40:52 +01:00
David LuzarandGitHub 2595e0de82 fix: restoring deleted bindings (#6029)
* fix: restoring deleted bindings

* add tests

* add one more test

* merge restore tests files
2022-12-23 11:48:14 +01:00
David LuzarandGitHub 9086674b27 chore: bump typescript @ 4.9.4 (#6024) 2022-12-22 19:32:21 +01:00
David LuzarandGitHub 7e135c4e22 feat: move contextMenu into the component tree and control via appState (#6021) 2022-12-21 12:47:09 +01:00
David LuzarandGitHub 6ab3f0eb74 fix: showing grabbing cursor when holding spacebar (#6015) 2022-12-20 13:22:20 +01:00
David LuzarandGitHub 539505affd fix: resize sometimes throwing on missing null-checks (#6013) 2022-12-18 23:06:01 +01:00
David LuzarandGitHub 95d669390f fix: PWA not working after CRA@5 update (#6012)
* fix: PWA not working after CRA@5 update

* fix: fallback to default locale when fetch fails
2022-12-18 22:23:30 +01:00
David LuzarandGitHub 73a45e1988 fix: not properly restoring element stroke and bg colors (#6002) 2022-12-16 18:19:26 +01:00
David LuzarandGitHub 88c2812949 fix: Avatar outline on safari & center (#5997) 2022-12-16 18:18:34 +01:00
David LuzarandGitHub bdb14723b3 fix: chart pasting not working due to removing tab characters (#5987) 2022-12-16 18:18:27 +01:00
David LuzarandGitHub cc9e764585 feat: allow readonly actions to be used in viewMode (#5982) 2022-12-11 22:57:03 +01:00
David LuzarandGitHub fffd4957db fix: repair element bindings on restore (#5956)
* fix: repair element bindings on restore

* fix dropping non-text bound elements

* be more conservative
2022-12-06 00:23:47 +01:00
David LuzarandGitHub 8b33ca3a1a fix: bindings do not survive history serialization (#5942) 2022-12-02 10:36:18 +00:00
David LuzarandGitHub 1f117995d9 fix: fonts not rendered on init if loadingdone not fired (#5923)
* fix: fonts not rendered on init if `loadingdone` not fired

* remove unnecessary check
2022-11-23 21:15:32 +01:00
David LuzarandGitHub 52c96a6870 chore: bump create-react-app to 5.0.1 (from 4.0.3) (#5904) 2022-11-19 18:28:21 +01:00
David LuzarandGitHub 81fd2350a9 fix: stop replacing del word with Delete (#5897) 2022-11-19 18:28:08 +01:00
David LuzarandGitHub 8ed0fc2c87 fix: remove legacy React.render() from the editor (#5893) 2022-11-19 18:27:54 +01:00
David LuzarandGitHub bbe0c35f66 fix: stop font loadingdone loop when rendering element SVGs (#5883)
* fix: stop font `loadingdone` loop when rendering element SVGs

* update snaps

* stop updating scene elements array if no change was made

* always re-render if invalidating element shape
2022-11-15 21:02:57 +01:00
David LuzarandGitHub d273acb7e4 fix: refresh text dimensions only after font load done (#5878)
* fix: refresh text dimensions only after font load done

* fix snaps
2022-11-15 00:15:02 +01:00
David LuzarandGitHub bdc56090d7 feat: reintroduce x shortcut for freedraw (#5840) 2022-11-06 23:07:15 +01:00
David LuzarandGitHub 58accc9310 feat: tweak toolbar shortcuts & remove library shortcut (#5832) 2022-11-06 20:14:53 +01:00
David LuzarandGitHub b91158198e feat: clean unused images only after 24hrs (local-only) (#5839)
* feat: clean unused images only after 24hrs (local-only)

* fix test

* make optional for now
2022-11-06 19:41:14 +01:00
David LuzarandGitHub 938ce241ff feat: refetch errored/pending images on collab room init load (#5833) 2022-11-05 15:55:14 +01:00
David LuzarandGitHub 0228646507 fix: line editor points rendering below elements (#5781)
* fix: line editor points rendering below elements

* add test
2022-11-05 11:35:53 +01:00
8d5d68e589 feat: stop deleting whole line when no point select in line editor (#5676)
* feat: stop deleting whole line when no point select in line editor

* Comments typo

Co-authored-by: DanielJGeiger <1852529+DanielJGeiger@users.noreply.github.com>
2022-11-02 14:52:32 +01:00
David LuzarandGitHub 6c15d9948b fix: syncing 1-point lines to remote clients (#5677) 2022-11-02 14:39:12 +01:00
David LuzarandGitHub e8fba43cf6 fix: incorrectly selecting linear elements on creation while tool-locked (#5785) 2022-11-02 14:38:58 +01:00
David LuzarandGitHub 8c298336fc fix: hide canvas-modifying UI in view mode (#5815)
* fix: hide canvas-modifying UI in view mode

* add class for better targeting

* fix missing `key`

* fix: useOutsideClick not working in view mode
2022-11-01 22:25:12 +01:00
David LuzarandGitHub 7f91cdc0c9 fix: fix vertical/horizntal centering icons (#5812) 2022-11-01 18:39:31 +01:00
David LuzarandGitHub 4d26993c8f chore: fix yarn.lock file (#5803)
* chore: fix yarn.lock file

* ts fix
2022-10-31 13:44:08 +01:00
David LuzarandGitHub c8f6e3faa8 fix: restore text dimensions (#5432)
* fix: restore text dimensions

* fix tests

* update readme & changelog

* reduce API surface area by always refreshing dimensions for full `restore()`
2022-10-28 23:31:56 +02:00
David LuzarandGitHub 941b2d7042 feat: render library into Sidebar on mobile (#5774) 2022-10-18 10:29:14 +05:30
David LuzarandGitHub e9067de173 feat: refactor Sidebar into standalone reusable component (#5663)
🚀!
2022-10-17 12:25:24 +02:00
David LuzarandGitHub fdc462ec01 fix: wait for window focus until prompting for library install (#5751) 2022-10-10 16:08:13 +02:00
David LuzarandGitHub 9cccac1458 feat: further reduce darkmode init flash (#5701)
* feat: further reduce darkmode init flash

* fix lint

* tweak doc

* colocate code
2022-09-16 17:12:24 +02:00
David LuzarandGitHub 6a6b9c90a7 fix: revert webpack deduping to fix @next runtime (#5695)
Revert "chore: Dedupe webpack configs. (#5449)"

This reverts commit da4fa91ffc.
2022-09-13 21:19:57 +02:00
David LuzarandGitHub 59ec1c6cee fix: zen-mode exit button not working (#5682) 2022-09-09 13:53:38 +02:00
David LuzarandGitHub f9b7cfd8aa fix: reintroduce help dialog button (#5631) 2022-08-27 23:02:17 +02:00
David LuzarandGitHub 8f8dd1105f docs: changelog fixes (#5593) 2022-08-18 14:16:06 +02:00
b914ad41fc feat: support ExcalidrawElement.customData (#5592)
Co-authored-by: Aakansha Doshi <aakansha1216@gmail.com>
2022-08-18 17:32:46 +05:30
David LuzarandGitHub ad0c4c4c78 fix: points not being normalized on single-elem resize (#5581) 2022-08-16 21:51:43 +02:00
David LuzarandGitHub 2d800feeeb fix: shareable links being merged with current scene data (#5547) 2022-08-08 17:51:19 +02:00
David LuzarandGitHub 93cccd596a fix: Scene lookup failing when looking up by id (#5542) 2022-08-08 17:01:17 +02:00
45b592227d fix: remove rounding to fix jitter when shift-editing (#5543)
Co-authored-by: Ryan Di <ryan.weihao.di@gmail.com>
2022-08-05 20:22:46 +05:30
David LuzarandGitHub 4359e2935d fix: line deselected when shift-dragging point outside editor (#5540) 2022-08-05 00:01:56 +05:30
David LuzarandGitHub 501397cb61 fix: disable locking aspect ratio for box-selection (#5525) 2022-08-02 19:10:17 +05:30
David LuzarandGitHub e7d34677c6 fix: resolve paths in prebuild.js script (#5498) 2022-07-30 21:56:46 +02:00
David LuzarandGitHub ac66665b64 fix: incorrectly rendering freedraw elements (#5481) 2022-07-22 16:18:41 +02:00
David LuzarandGitHub a7937681e9 fix: account for safe area for floating buttons on mobile (#5420) 2022-07-19 15:44:14 +02:00
David LuzarandGitHub 792f238d16 refactor: improve typing & check (#5415) 2022-07-19 15:44:04 +02:00
David LuzarandGitHub 5bc40402a6 fix: disable render throttling by default & during resize (#5451) 2022-07-16 11:36:55 +02:00