Commit graph

3108 commits

Author SHA1 Message Date
Aakansha Doshi
023313e92f
fix: show error message when measureText API breaks in brave (#6336)
* fix: show error message when measureText API breaks in brave

* Add docs

* Add assets

* tweak message

* fix

* tweak message

* add translations

* lint

* fix

* fix

* lint

* lint

* lint please work now

* tweak doc

* fix

* split error component to new file

* add specs

* tweaks

Co-authored-by: David Luzar <luzar.david@gmail.com>

* wrap in div with a width of 30rem

* fix spec

* fix

* Fix typo

---------

Co-authored-by: David Luzar <luzar.david@gmail.com>
Co-authored-by: Daniel J. Geiger <1852529+DanielJGeiger@users.noreply.github.com>
2023-03-13 19:46:09 +05:30
David Luzar
1eee488dab
feat: add thai lang support (#6314) 2023-03-11 22:15:52 +01:00
Aakansha Doshi
dd4c333925
fix: add an offset of 0.5px for text editor in containers (#6328)
* fix: add an offset of 0.5px for text editor in containers

* fix specs and lint
2023-03-09 13:07:36 +05:30
David Luzar
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 Luzar
cef6094d4c
fix: more jotai scopes missing (#6313) 2023-03-03 16:19:02 +01:00
dependabot[bot]
3322f0fa6f
build(deps): bump @sideway/formula from 3.0.0 to 3.0.1 in /dev-docs (#6309)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-03-03 14:45:29 +01:00
Omar Brikaa
34a7d48b95
fix: provide HelpButton title prop (#6209)
Co-authored-by: dwelle <luzar.david@gmail.com>
2023-03-03 12:50:18 +00:00
Aakansha Doshi
5c0b15ce2b
fix: respect text align when wrapping in a container (#6310)
* fix: respect text align when wrapping in a container

* fix
2023-03-03 18:07:26 +05:30
Aakansha Doshi
9f9666110e
chore: Add debug flag to enable text container bounding box (#6296)
* debug: Add debug flag to enable text container bounding box

* newline

* fix
2023-03-03 18:01:55 +05:30
dependabot[bot]
05ffce62ef
build(deps): bump dns-packet from 5.3.1 to 5.4.0 in /src/packages/excalidraw (#6305)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-03-03 13:20:53 +01:00
Aakansha Doshi
0f06fa3851
feat: create bound container from text (#6301)
* feat: create container from text

* fix lint and spec

* fix

* round off dims

* ceil

* review fixes

* fix

* Add specs

* fix

* fix z-index and type

* consider group

* consider linear bindings

* lint
2023-03-03 17:40:42 +05:30
Aakansha Doshi
1ce933d2f5
fix: compute bounding box correctly for text element when multiple element resizing (#6307) 2023-03-03 17:34:11 +05:30
David Luzar
15655acb5a
fix: use jotai scope for editor-specific atoms (#6308) 2023-03-03 11:58:36 +00:00
dependabot[bot]
d5b264c2d2
build(deps): bump http-cache-semantics from 4.1.0 to 4.1.1 in /dev-docs (#6192)
Bumps [http-cache-semantics](https://github.com/kornelski/http-cache-semantics) from 4.1.0 to 4.1.1.
- [Release notes](https://github.com/kornelski/http-cache-semantics/releases)
- [Commits](https://github.com/kornelski/http-cache-semantics/compare/v4.1.0...v4.1.1)

---
updated-dependencies:
- dependency-name: http-cache-semantics
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-03-01 14:51:36 +05:30
Aakansha Doshi
bd4424bbe3
fix: consider arrow for bound text element (#6297)
* fix: consider arrow for bound text element

* add spec
2023-02-28 19:53:30 +05:30
Alex Kim
0ba1a1a00b
revert: linear elements unstable bounds
This reverts commit 22ae9b02c4.
2023-02-27 14:51:49 +03:00
Alex Kim
22ae9b02c4
fix: linear elements unstable bounds 2023-02-27 14:42:36 +03:00
Aakansha Doshi
38fc51b4e3
fix: text never goes beyond max width for unbound text elements (#6288) 2023-02-27 16:54:29 +05:30
David Luzar
e1dc748aef
fix: svg text baseline (#6285
* fix: svg text baseline

* fix for multiline
2023-02-26 12:51:44 +01:00
Alex Kim
5931bf01b2
revert: fix linear elements drifting away after multiple flips
This reverts commit bffc33dd3f.
2023-02-24 20:03:04 +03:00
Aakansha Doshi
0e95e2b386
fix: compute container height from bound text correctly (#6273)
* fix: compute container height from bound text correctly

* fix specs

* Add tests
2023-02-23 17:39:02 +05:30
Aakansha Doshi
9659254fd6
feat: improve text measurements in bound containers (#6187)
* feat: move to canvas measureText

* calcualte height with better heuristic

* improve heuristic more

* remove vertical offset as its not needed

* lint

* calculate width of individual char and ceil to calculate width and remove adjustment factor

* push the word if equal to max width

* update height when text overflows for vertical alignment top/bottom

* remove the hack of updating height when line mismatch as its not needed

* remove scroll height and calculate the height instead

* remove unused code

* fix

* remove

* use math.ceil for whole width instead of individual chars

* fix tests

* fix

* fix

* redraw text bounding box instead when font loaded to fix alignment as well

* fix

* fix

* fix

* Add a 0.05px extra only for firefox

* Add spec

* stop taking ceil and increase firefox editor width by 0.05px

* Ad 0.05px in safari too

* lint

* lint

* remove baseline from measureFontSizeFromWH

* don't redraw on font load

* lint

* refactor name and signature
2023-02-23 16:33:10 +05:30
Tengku Farhan
39b96cb011
fix: fit mobile toolbar and make scrollable (#6270)
Co-authored-by: dwelle <luzar.david@gmail.com>
2023-02-23 11:24:04 +01:00
David Luzar
04a8c22f39
fix: rerender i18n in host components on lang change (#6224) 2023-02-22 14:01:23 +00:00
Excalidraw Bot
e4506be3e8
chore: Update translations from Crowdin (#6191) 2023-02-22 11:23:10 +00:00
Hikaru Yoshino
1e816e87bf
fix: indenting via tab clashing with IME compositor (#6258) 2023-02-22 12:10:29 +01:00
Aakansha Doshi
5368ddef74
fix: improve text wrapping inside rhombus and more fixes (#6265)
* fix: improve text wrapping inside rhombus

* Add comments

* specs

* fix: shift resize and multiple element regression for ellipse and rhombus

* use container width for scaling font size

* fix

* fix multiple resize

* lint

* redraw on submit

* redraw only newly pasted elements

* no padding when center

* fix tests

* fix

* dont add padding in rhombus when aligning

* refactor

* fix

* move getMaxContainerHeight and getMaxContainerWidth to textElement.ts

* Add specs
2023-02-22 16:28:12 +05:30
Aakansha Doshi
88ff32e9b3
fix: improve text wrapping in ellipse and alignment (#6172)
* fix: improve text wrapping in ellipse

* compute height when font properties updated

* fix alignment

* fix alignment when resizing

* fix

* ad padding

* always compute height when redrawing bounding box and refactor

* lint

* fix specs

* fix

* redraw text bounding box when pasted or refreshed

* fix

* Add specs

* fix

* restore on font load

* add comments
2023-02-21 12:36:43 +05:30
Jan Klass
0fcbddda8e
docs: Fix outdated link in README.md (#6263) 2023-02-20 09:44:25 +00:00
Alex Kim
bffc33dd3f
fix: linear elements drifting away after multiple flips 2023-02-17 16:01:45 +03:00
Alex Kim
42002279e0
fix: bound text scaling when resizing 2023-02-16 21:03:46 +03:00
Alex Kim
61d86b88eb
fix: remove angle flip 2023-02-16 20:23:42 +03:00
Alex Kim
9e1131cf42
fix: a few corner cases for flipping 2023-02-16 18:33:23 +03:00
Alex Kim
69e30b372b
fix: add special cases for flipping text & images 2023-02-16 18:33:23 +03:00
Alex Kim
0949e060b5
revert: image elements not flipping its content
This reverts commit cb989a6c66e62a02a8c04ce41f12507806c8d0a0.
2023-02-16 18:33:22 +03:00
Alex Kim
c7667cc7d7
feat: add flipping multiple elements with a command 2023-02-16 18:33:22 +03:00
Alex Kim
b9a185d098
fix: angles not flipping vertically when resizing 2023-02-16 18:33:22 +03:00
Alex Kim
aa289a63fb
test: fix accidental resizing in grouping test 2023-02-16 18:33:22 +03:00
Alex Kim
d1be72ffc2
fix: image elements not flipping its content 2023-02-16 18:33:22 +03:00
Alex Kim
a941173be4
feat: add flipping when resizing multiple elements 2023-02-16 18:33:22 +03:00
Aakansha Doshi
b9ba407f96
feat: Bind text to container if double clicked on filled shape or stroke (#6250)
* feat: bind text to container when clicked on filled shape or element stroke

* Bind if double clicked on stroke as well

* remove

* specs

* remove

* shuffle

* fix

* back to normal
2023-02-16 20:46:51 +05:30
Aakansha Doshi
5acb99777a
docs: fix typo (#6252) 2023-02-16 19:45:41 +05:30
David Luzar
b107c9af2a
docs: fix next.js example (#6241) 2023-02-15 15:14:15 +01:00
Milos Vetesnik
c587b85b4e
docs: new readme (#6240)
Co-authored-by: David Luzar <luzar.david@gmail.com>
2023-02-15 14:45:06 +01:00
Luka Hietala
9686141113
docs: Fixed broken codesandbox link in the dev-docs (#6229)
fixed broken link
2023-02-15 05:31:07 +00:00
Aakansha Doshi
0d7ee891e0
feat: Make repair and refreshDimensions configurable in restoreElements (#6238)
* fix: don't repair during reconcilation

* Add opts to restoreElement and enable refreshDimensions and repair via config

* remove

* update changelog

* fix tests

* rename to repairBindings
2023-02-15 10:41:11 +05:30
Aakansha Doshi
71fb60394a
docs: enable Algolia for search (#6230) 2023-02-13 17:39:11 +05:30
Aakansha Doshi
c9d18ecab6
fix: don't allow blank space in collab name (#6211)
* don't allow blank space in collab name

* add spec

* prevent blank
2023-02-09 15:51:49 +05:30
DanielJGeiger
8c1168ef33
refactor: Make the example React app reusable without duplication (#6188) 2023-02-07 12:41:20 +05:30
Dejavu Moe
c3c45a8c37
fix: docker build architecture:linux/amd64 error occur on linux/arm64 instance (#6197)
fix docker build
when in linux/arm64 use docker buildx plugin to build linux/amd64 image, a build error will occur causing the build to break
2023-02-07 11:44:31 +05:30