Commit graph

684 commits

Author SHA1 Message Date
Steve Ruiz
b243600a3a Update changelog 2021-12-22 14:11:29 +00:00
Thomas Mathisen
4cf283e84f
Bugfix on useShapeEvents wrong key name (#459)
* onPointShape called instead of onPointerDown

* Update useShapeEvents.tsx

* Bugfix on useShapeEvents wrong key name

Co-authored-by: Steve Ruiz <steveruizok@gmail.com>
2021-12-22 12:56:49 +00:00
Steve Ruiz
9b7414509f v1.2.9 2021-12-22 00:46:58 +00:00
Steve Ruiz
64da0ba691 Update changelogs 2021-12-22 00:46:17 +00:00
Steve Ruiz
e8befe2290 fix leaky ref 2021-12-22 00:40:37 +00:00
Steve Ruiz
4da632d5d8
[improvement] Multiplayer cursors (#458)
* bump versions, improve cursors

* Spline cursors

* Update useCursorAnimation.ts

* Update useCursorAnimation.ts

* Add improved cursors

* Update MultiplayerEditor.tsx

* Update [id].tsx
2021-12-22 00:34:44 +00:00
Steve Ruiz
7c2777966f
[improvement] Multiplayer + cursors (#457)
* bump versions, improve cursors

* Spline cursors
2021-12-22 00:14:38 +00:00
Steve Ruiz
3b220f0afe v1.2.8 2021-12-20 15:20:04 +00:00
Jim Fisher
e55d4779f6
Bugfix: "Copy as SVG" should respect childIndex (#455)
* Bugfix: respect childIndex in Copy as SVG

* Try adding test - but why is the test output an empty svg
2021-12-18 20:49:30 +00:00
Steve Ruiz
58b8968f12
[fix] intersection bug (#452)
* Update TLShapeUtil.tsx

* Add tests

* Update tsconfig.json
2021-12-17 16:29:08 +00:00
Thomas Mathisen
34492f2f01
Bugfix: onPointerDown not called (#451)
* onPointShape called instead of onPointerDown

* Update useShapeEvents.tsx

Co-authored-by: Steve Ruiz <steveruizok@gmail.com>
2021-12-17 16:02:13 +00:00
Jim Fisher
2bc927f68e
Bugfix: 'Copy as SVG' shapes have black fill by default (#449)
* Bugfix: 'Copy as SVG' shapes have black fill by default

* Remove binding hit areas from copied SVG

Co-authored-by: Steve Ruiz <steveruizok@gmail.com>
2021-12-17 15:23:03 +00:00
Milo Hill
1271070798
Fix changing a setting preventing page content from being replaced (#447)
* Fix setting settings preventing UI from updating

* Add tests for replacePageContent
2021-12-15 21:14:40 +00:00
Steve Ruiz
ec203332de Update TldrawApp.ts 2021-12-13 09:08:35 +00:00
Steve Ruiz
693c0c848f Update TldrawApp.ts 2021-12-13 09:07:25 +00:00
Steve Ruiz
580248a3af v1.2.7 2021-12-12 21:45:57 +00:00
Steve Ruiz
91da95de1c remove react-id dep 2021-12-12 21:45:21 +00:00
Steve Ruiz
5e6a4939d1 Removes faulty error boundary from core, removes faulty ID provider from tldraw 2021-12-12 21:44:44 +00:00
Steve Ruiz
ec7fbd2033 v1.2.6 2021-12-12 21:21:10 +00:00
Steve Ruiz
82dd2e2497 Update CHANGELOG.md 2021-12-12 21:15:32 +00:00
Steve Ruiz
5b8d4fe1fa no minify 2021-12-12 21:14:58 +00:00
Steve Ruiz
8d9629586c v1.2.5 2021-12-10 16:08:17 +00:00
Steve Ruiz
0c31c732e8 Update test 2021-12-10 16:07:33 +00:00
Steve Ruiz
45c0febdad fix selection for filled shapes 2021-12-09 22:55:52 +00:00
Steve Ruiz
eb234330dd Fix rotation binding for triangles 2021-12-09 22:38:23 +00:00
Elizabeth Louie
c5124b160e
add triangle tool (#433)
* add triangle tool

* fix keyboard shortcuts

* cleaned code

* Add binding, better indicator, bounds

* Fix tests

* Refactor getBindingPoint, binding distances, add comments to getBindingPoint

* Update TextUtil.spec.tsx.snap

* fix intersection math

* fix ellipse indicator

* Update EllipseUtil.tsx

* Update BrushSession.spec.ts

* Add draw style to triangle

* improve strokes

Co-authored-by: Steve Ruiz <steveruizok@gmail.com>
2021-12-09 22:29:09 +00:00
Steve Ruiz
86c651764c
Filled shapes may be selected from the center (#440) 2021-12-08 14:20:22 +00:00
Steve Ruiz
52ae47371d
[improvement] Select unfilled shapes by clicking on their stroke (#438)
* removes touch events from middle of shapes

* Improve ellipse

* selectable stroke when not selected, fill when selected

* Update BrushSession.spec.ts

* Fix test
2021-12-07 20:48:56 +00:00
megnakokkalera
c67c0871ff
Fix/undo on menu open (#436)
* fix for undo button on menu open

* Change toggle to set, add option for keyboard events

* Update .gitignore

* Update .gitignore

* Remove isStyleOpen

* Remove isStyleOpen

Co-authored-by: Steve Ruiz <steveruizok@gmail.com>
2021-12-06 18:23:53 +00:00
Steve Ruiz
8038e64a86 v1.2.4 2021-12-04 14:56:24 +00:00
Steve Ruiz
487d6ed4ee Update CHANGELOG.md 2021-12-04 14:53:37 +00:00
Steve Ruiz
0039dd2e66
Restore onPersist (#435) 2021-12-04 14:51:40 +00:00
Siddhartha Varma
5fe09733af
fix: update ungroup shortcut (#434) 2021-12-04 10:42:45 +00:00
Steve Ruiz
fae66549c7 v1.2.3 2021-12-02 13:06:43 +00:00
Braden
522baf5b61
[fix] account for "draft" shapes when preserving selection state during replacePageContent (#427)
* account for "virtual" shapes when preserving appState

* rewrite merge logic

* More work on multiplayer

* Update TldrawApp.ts

* Improve logic around when to replace page content

Co-authored-by: Steve Ruiz <steveruizok@gmail.com>
2021-12-02 12:49:07 +00:00
Steve Ruiz
33acf03004
[fix] multiplayer (sorta) (#426)
* Fix multiplayer

* Update TldrawApp.ts

* Update TldrawApp.ts

* Update TldrawApp.ts
2021-12-01 22:31:19 +00:00
Steve Ruiz
0334ac0f30
Fix alt zoom (#424) 2021-12-01 14:25:56 +00:00
Steve Ruiz
e0100949a5
Update EraseSession.ts (#423) 2021-12-01 14:08:27 +00:00
Yao Wang
ed8e3f252d
fix the wrong spelling (#419) 2021-12-01 13:48:51 +00:00
Braden
17c34b2d7d
Fix iteration over deleted bindings during page change (#421) 2021-12-01 13:48:37 +00:00
Yao Wang
2c28012839
fix(paste): do not warn in production (#409)
- when paste the content from clipboard, if the content is not JSON, the `JSON.parse` parse error will be thrown. The info should not be in production build.

Closes #400
2021-11-28 22:00:01 +00:00
Eivind Ingebrigtsen
ac648da2c5
⌨️ Changing keyboard shortcuts for pen and oval (#407) 2021-11-28 14:54:51 +00:00
Francois Laberge
a1dd79ce35
Fix Text Editing Issues in VS Code Extension (#399)
* Temp change so I can create a PR

* Have select all,copy/paste/cut, and  undo/redo working for text/sticky shapes in VS Code extension

* cleanup

* removed some semi colons

* Ran prettier

* More cleanup

* Adds stopPropagation for native context menu

Co-authored-by: Steve Ruiz <steveruizok@gmail.com>
2021-11-28 14:53:35 +00:00
Steve Ruiz
5c0e4fad11 Upadte changelogs 2021-11-28 10:30:16 +00:00
Steve Ruiz
03cfea6404 v1.2.2 2021-11-28 10:25:17 +00:00
Steve Ruiz
2ad6b45ccc v1.2.1 2021-11-28 10:24:42 +00:00
Steve Ruiz
3ab5db27b9 v1.2.1 2021-11-28 10:19:29 +00:00
Steve Ruiz
893e3dee41 v1.2.0 2021-11-28 10:18:55 +00:00
Steve Ruiz
7bf5f5fd8a v1.2.0 2021-11-28 10:16:30 +00:00
Steve Ruiz
0fe3d80fa4 v1.1.11 2021-11-28 10:10:09 +00:00
Steve Ruiz
36796bfc3d Update CHANGELOG.md 2021-11-28 10:09:21 +00:00
Steve Ruiz
1c0f711a53 Update changelogs 2021-11-28 10:08:59 +00:00
Noah Shipley
98cc0d4cac
Feature/mobx - adds mobx support to @tldraw/core (#383)
* Initial commit with mobx

* Convert more to mobx

* Make useCameraCss reactive (autorun)

* Move more items to mobx

* Fix more invalid components and layout hooks that needed to be reactive

* Add autorun to css layout effect

* Remove centric specific yarn.lock changes

* mild cleanup

* update from main

* add tests, example

* cleanup

* minor tweak to advanced example

* Update app.tsx

* Optimizations around events not being memoized

* Support className property on SVGContainer

* Add data-type to shape container to aid with external styling

* Fix classnames

* Fixes bug on text shapes / shapes with refs

* v1.1.9-beta.1

* v1.1.9-beta.2

* Drop mobx as a dependency for core

* v1.1.9-beta.3

* rename

* Revert "Drop mobx as a dependency for core"

This reverts commit 2d93f84a87f0c709e55fb2766519bfde03f8e854.

* remove unused code from utils, move curve to separate package

* v1.1.9-beta.4

* Add pretty-quick

* Update package.json

* Renamings

Co-authored-by: Noah Shipley <nshipley@centricsoftware.com>
Co-authored-by: Steve Ruiz <steveruizok@gmail.com>
2021-11-28 10:05:40 +00:00
Siddhartha Varma
8c06a2866f
Disable some menu buttons when no item selected (#393)
* feat(menu): disable buttons when items not selected

* cut and copy options not shown when item isn't selected
* added cut option on ContextMenu

* Show buttons but disabled

Co-authored-by: Steve Ruiz <steveruizok@gmail.com>
2021-11-27 16:26:15 +00:00
Steve Ruiz
73cb5b3ec1 v1.1.8 2021-11-27 11:14:16 +00:00
Steve Ruiz
8b126370df Update CHANGELOG.md 2021-11-27 11:13:05 +00:00
Steve Ruiz
46e6b3269f Add tests for short arrows 2021-11-27 11:12:08 +00:00
Steve Ruiz
e042ac3061 fix arrows 2021-11-27 11:01:28 +00:00
Steve Ruiz
a3475a74df v1.1.7 2021-11-27 09:51:59 +00:00
Steve Ruiz
7bc6c8b72f Update CHANGELOG.md 2021-11-27 09:50:38 +00:00
Siddhartha Varma
76d0751e2f
fix: enable spellcheck prop in textarea (#391) 2021-11-27 09:48:13 +00:00
Steve Ruiz
4fc17f1398 v1.1.6 2021-11-26 22:05:04 +00:00
Steve Ruiz
0171877b3c update changelogs 2021-11-26 22:04:19 +00:00
Steve Ruiz
a8f2522d20 v1.1.5 2021-11-26 17:15:54 +00:00
Proful Sadangi
7563575ef5
[Bug] Added visibility of clone tool (#381)
* [bug] Added display of clone buttons

* Reverted changes from sticky notes

* feat show those style options when the text tool is selected

* Add clone handles to sticky

Co-authored-by: Steve Ruiz <steveruizok@gmail.com>
2021-11-26 17:12:27 +00:00
Christian Petersen
e2814943e9
[feature] Add grids (#344)
* [feature] grids

* Shows relative grids at different zoom levels

* Update colors

* Restores vec and intersect to monorepo, changes vec.round to vec.toFixed, adds vec.snap

* Snapping in translate and transforms, fix shortcut

* fix bugs in build

* use grid size for nudge too

* update scripts

* Update grid.tsx

* Update grid.tsx

* Fixed!

* Update grid.tsx

* Fix package imports

* Update Editor.tsx

* Improve tsconfigs, imports

* Fix tiny arrow bugs, snap starting points to grid

* Update tsconfig.base.json

* Update shape-styles.ts

* Fix example tsconfig

* Fix translate type error

* Fix types, paths

Co-authored-by: Steve Ruiz <steveruizok@gmail.com>
2021-11-26 15:14:10 +00:00
Steve Ruiz
3de6ef334a
Period key works as pointer down / up (#377) 2021-11-24 18:07:31 +00:00
Steve Ruiz
59e351c779 Fix line color 2021-11-24 18:03:05 +00:00
Proful Sadangi
1f7f779506
feature middle mouse wheel pan (#364) 2021-11-24 10:01:17 +00:00
Steve Ruiz
101a0cd7a8
fix pasted lines (#362) 2021-11-24 09:09:20 +00:00
Steve Ruiz
55b27b9e1f Fix icons on ios 2021-11-23 16:34:52 +00:00
Steve Ruiz
8328a7a9f7 add large breakpoint for undo/redo 2021-11-23 15:29:11 +00:00
Steve Ruiz
4b946edeac v1.1.4 2021-11-23 15:13:39 +00:00
Steve Ruiz
010a2c75be Update CHANGELOG.md 2021-11-23 15:13:02 +00:00
Steve Ruiz
d0206f485e
Improve style menu (#361)
* Change undo / redo icons, add undo/redo buttons, add Styles label

* Update TopPanel.tsx

* Fix breakpoints
2021-11-23 15:06:16 +00:00
Steve Ruiz
b1d46c29f6 Fix copy svg / json when page is empty. 2021-11-22 16:53:24 +00:00
Steve Ruiz
839b389f41 Update SelectTool.ts 2021-11-22 16:27:19 +00:00
Steve Ruiz
b4d3d929ab v1.1.3 2021-11-22 16:20:06 +00:00
Steve Ruiz
f464f3f494 Update CHANGELOG.md 2021-11-22 16:18:20 +00:00
Steve Ruiz
a2fff9dca7
[improvement] Add basic support for copying text (#354)
* Add getSvgElement

* Update TextUtil.tsx

* Add sticky svg

* Fix bounds bug, improve text export

* Include fonts
2021-11-22 16:15:51 +00:00
Yao Wang
f8dc5b3248
[docs] fix type (tldraw/core) (#353)
- `Indicator` -> `Component`

Closes #352
2021-11-22 15:21:19 +00:00
Steve Ruiz
5e6a6c9967
[improvement] refactor multiplayer (#336)
* Move rko into library, improve multiplayer example

* Add presence layer

* extract to a hook

* Migrate old documents to new structures

* Update repo-map.tldr

* More improvements

* Fix bug on deleted shapes

* Update MultiplayerEditor.tsx
2021-11-22 14:00:24 +00:00
Steve Ruiz
cdfad49184
Update useKeyboardShortcuts.tsx (#351) 2021-11-22 13:59:59 +00:00
Proful Sadangi
dad6daf758
[feature] Added LineTool functionality (#343)
* Added LineTool functionality

* Fix Typo error

* Create LineIcon

* Update useKeyboardShortcuts.tsx

Co-authored-by: Steve Ruiz <steveruizok@gmail.com>
2021-11-22 12:28:56 +00:00
Steve Ruiz
588a023e0e v1.1.2 2021-11-21 12:42:32 +00:00
Steve Ruiz
adb680f8cf
[fix] brush selection on groups (#335)
* select groups rather than grouped shapes

* Adds test
2021-11-21 12:40:17 +00:00
Yao Wang
ec6d824b88
docs(contribute doc): move the guides folder to root folder (#329)
- make sure the contribute doc can refer to the guides
2021-11-21 12:09:52 +00:00
Proful Sadangi
a1f4149efe
Fixed bug related to locked tools & select tool (#331) 2021-11-21 11:53:13 +00:00
Steve Ruiz
bbbb9bcabb
Fix kbd spacing (#325) 2021-11-20 15:46:05 +00:00
Steve Ruiz
9dc58e721e v1.1.1 2021-11-20 15:22:33 +00:00
Steve Ruiz
d30fec3436 Update CHANGELOG.md 2021-11-20 15:21:43 +00:00
Proful Sadangi
a53aeb9e0d
[feature] Shift drag arrow functionality (#319)
* Shift drag arrow functionality

* fix

* Remove shift effect in onHandleChange

Co-authored-by: Steve Ruiz <steveruizok@gmail.com>
2021-11-20 15:18:06 +00:00
Babu Annamalai
dcc3cd49b5
fix typo in action button tooltips (#324)
Co-authored-by: mysticmind <babu.annamalai@gmail.comm>
2021-11-20 15:10:34 +00:00
Steve Ruiz
119b1e3d0f v1.1.0 2021-11-20 13:31:20 +00:00
Steve Ruiz
836b6f53d0 Update CHANGELOG.md 2021-11-20 13:31:00 +00:00
Steve Ruiz
7faa716784 v1.0.5 2021-11-20 13:28:07 +00:00
Steve Ruiz
212cef1fb4 Update CHANGELOG.md 2021-11-20 13:27:45 +00:00
Steve Ruiz
fe831c325d
[fix] zoom shortcuts (#323)
* Adds overrides for zoom in / out / reset commands

* Add reset command, numpad keys

* Remove unused shortcuts

* Update package.json
2021-11-20 13:25:41 +00:00
Steve Ruiz
8531971896
Update ActionButton.tsx (#320) 2021-11-20 10:48:18 +00:00
Steve Ruiz
0685ca3871
[feature] fonts (#308)
* adds fonts

* Add alignment options

* Update useKeyboardShortcuts.tsx

* Improve style panel

* Alignment for sticky notes

* swap fonts
2021-11-20 09:37:42 +00:00