Commit graph

732 commits

Author SHA1 Message Date
Steve Ruiz
15784517e8 v1.5.0 2022-01-10 21:11:25 +00:00
Steve Ruiz
6a282ca9c2 Bump dependencies, fix bug on mobile, preserve settings. 2022-01-10 21:09:26 +00:00
Faraz Shaikh
6103febaaf
Added exporting of shapes and pages as images (#468)
* Added exporting of shapeses

* added video serialization

* Fix viewport sizes, add chrome-aws-lambda for puppeteer

* Update menu styling

* extract to callback

* Update Loading.tsx

* force update menu

* fix missing fonts

* Added SVG and JSON export

* Fix json exports

* Merge branch 'main' into pr/468, update menus

* Update TldrawApp.ts

Co-authored-by: Steve Ruiz <steveruizok@gmail.com>
2022-01-10 16:36:28 +00:00
Milo Hill
e62755ef10
Add support for persisting images/video in multiplayer (#475)
* Kee track of changed assets

* Add support for multiplayer image assets

* fix tests

* Add images

* Improve asset deletion

* Remove assets from document

* Test with v small image only

* Add test for deleteShapes

* Cleanup document assets

* Add multiplayer assets to www

* remove default storage root, which was preventing migration

* Update onAssetDelete flow, rename some files

* bump upload size to 5mb

* Fix freeze bug where image fails to load

* fix logic for removing assets

* Update useMultiplayerState.ts

Co-authored-by: Steve Ruiz <steveruizok@gmail.com>
2022-01-10 15:13:52 +00:00
Steve Ruiz
f2481642f9 Fix context menu bug on mobile 2022-01-08 20:08:17 +00:00
Steve Ruiz
cc8aa89ed5 v1.4.3 2022-01-07 09:01:48 +00:00
Steve Ruiz
9c3424a5fc Update documentation
bump versions

update readmes, licenses
2022-01-07 09:01:08 +00:00
Steve Ruiz
4b1137849a v1.4.2 2022-01-07 08:45:09 +00:00
Steve Ruiz
bc65e3cc97 Update CHANGELOG.md 2022-01-07 08:42:11 +00:00
Steve Ruiz
97c2b8c4c6
Fix erasing bug (#490)
* Update EraseSession.ts

* Update EraseSession.ts
2022-01-06 20:22:49 +00:00
Steve Ruiz
a793fadf74 Update ArrowSession.ts 2022-01-06 14:04:17 +00:00
Steve Ruiz
9255e7a4a5 Update useShapeEvents.tsx 2022-01-06 14:01:25 +00:00
Steve Ruiz
b1697b2ca7 Fix context menu, fix blur issue 2022-01-06 14:00:23 +00:00
Steve Ruiz
31a1a8b5ae Fix bug with missing draw shape after undo 2022-01-06 13:36:40 +00:00
Steve Ruiz
deadc70030 fix pointer error 2022-01-06 13:23:45 +00:00
Steve Ruiz
32d96aef94 Merge branch 'main' of https://github.com/tldraw/tldraw 2022-01-06 10:47:36 +00:00
Steve Ruiz
5c33fbd89c bug fixes 2022-01-06 10:45:11 +00:00
Steve Ruiz
24ece6b38a
Update groupShapes.ts (#488) 2022-01-06 07:35:32 +00:00
Steve Ruiz
225f312bd0 Add sponsor 2022-01-06 07:06:05 +00:00
Jesco Wüster
0271ccccf8
Enable panning for all tools (#484)
* Enable panning for DrawTool

* move camera panning logic to TlDrawApp

* fix: disable shape button on keyboard pan

* ensure middle wheel panning returns to idle globally

* prevent flicker during mouseup while spacePanning

* Use boolean flags for force panning

* add middle mouse button

* Fix logic

* Fix toolbar re-selecting

Co-authored-by: Steve Ruiz <steveruizok@gmail.com>
2022-01-05 14:47:07 +00:00
Steve Ruiz
d00d443492
Add shift+click to draw straight lines between points (#478)
* Add shift+click to draw straight lines between points

* Add points to previous shape

* undo/redo fixes

* Fix bug with non-draw shapes

* Update drawHelpers.ts
2022-01-03 09:49:34 +00:00
Steve Ruiz
97ba1505ab
Fix editing bug (#480) 2022-01-03 09:39:27 +00:00
Tony Li
e7a2f5d6d4
added NaN check on pinch event (#476) 2021-12-31 09:42:56 +00:00
Soufiane Ghzal
23ad10d856
Fixed bunch of broken links (#471)
* fixed local links to documentation in README.md

* fixed links to core package
2021-12-29 06:39:08 +00:00
Steve Ruiz
59e5a446c9
Copies over browser-fs-access src :( (#470) 2021-12-28 14:29:55 +00:00
Steve Ruiz
32a5511b3d v1.4.1 2021-12-28 11:50:33 +00:00
Steve Ruiz
f45824a4a0 Update CHANGELOG.md 2021-12-28 11:32:36 +00:00
Steve Ruiz
e9217e0bec Update core readme with more info on assets 2021-12-28 11:28:27 +00:00
Steve Ruiz
d0fd712e5e
[improvement] labels (#467)
* Improve appearance of arrow shape labels, set label text color to match stroke

* fix svg copy fonts for text, labels

* Reduce opacity effect of scaled arrow label, update font in export, adds command+enter to finish text
2021-12-28 11:23:17 +00:00
Steve Ruiz
f57d6bda94 v1.4.0 2021-12-27 20:29:12 +00:00
Steve Ruiz
5a4918ca6b Update CHANGELOG.md 2021-12-27 20:27:14 +00:00
Steve Ruiz
9ff7447208 Update CHANGELOG.md 2021-12-27 20:23:37 +00:00
Steve Ruiz
d7a697647b
[feature] Labels for shapes (#462)
* Adds generic text label

* Clean up text label / text util

* labels for ellipse and triangles

* Add arrow label

* Update filesystem.ts

* Double click bend to edit label, fix mask location

* refactor arrowutil

* fix arrow bindings

* Rename text to label, add labelPoint

* Fix arrow binding, styles on text labels, double click bounds edge to edit label

* Update ArrowSession.ts

* Update StyleMenu.tsx

* set version
2021-12-27 19:21:30 +00:00
Steve Ruiz
e48f0c1794 Update migrate.ts 2021-12-27 18:51:20 +00:00
Steve Ruiz
7c02a6d514 Merge branch 'main' of https://github.com/tldraw/tldraw 2021-12-27 18:50:33 +00:00
Steve Ruiz
d355be10d6 Improve appearance of ellipses/videos, fix bug 2021-12-27 18:49:54 +00:00
Steve Ruiz
d60bb5c6ee
Fix bug where reloading could clear the state (#465)
* Fix bug where reloading could clear the state

* fix test

* Fix image and video positions
2021-12-27 18:44:47 +00:00
Steve Ruiz
d5cd7ed480 bump use-gesture, memoize gesture callbacks 2021-12-27 12:50:18 +00:00
Steve Ruiz
297486bb34 Remove performance modes (for now) 2021-12-27 12:38:30 +00:00
Steve Ruiz
d1fb7d1115 Merge branch 'main' of https://github.com/tldraw/tldraw 2021-12-27 12:32:17 +00:00
Steve Ruiz
e3865e1b1f update changelogs 2021-12-27 12:32:07 +00:00
Steve Ruiz
4aa8547a8e
[improvement] performance modes (#463)
* add performance modes to core, sessions

* Update filesystem.ts

* rename TLPerformance to TLPerformanceMode, fix bugs
2021-12-27 12:30:35 +00:00
Steve Ruiz
fd2befa305 rename refs 2021-12-25 19:39:20 +00:00
Steve Ruiz
dfe2e44c17 v1.3.0 2021-12-25 18:41:47 +00:00
Steve Ruiz
0ed7e55c4c Make core asset types more generic, update docs. 2021-12-25 18:39:50 +00:00
Steve Ruiz
bd09342596 Update changelogs 2021-12-25 18:28:37 +00:00
Faraz Shaikh
1c65c031b2
Add Image and Video shapes (#460)
* Added image and video shapes

* Fixed bugs; Added optional onImageUpload callback

* Added id field to onImageUpload

* Added onImageDelete callback for cleanup

* Added firebase storage to multiplayer for media

* Added firebase storage to multiplayer for media

* Silence unnecessary TS errors

* Fixed bugs; Added tests

* Added tests

* Disable images for multiplayer example

* switch to assets in document, rather than on shapes, fix resize, fix sizes

* bump version, add migration for assets table

* Rename onImageUpload

* Add isPlaying state to video (not complete)

* Revert "Add isPlaying state to video (not complete)"

This reverts commit 3dc2ba703f4194eb7c47524d384dc8392daa18be.

* Adds controls when editing video, sync current time when cloning

* Remove unused tools

* avoid duplication in assets

* Remove unused image styles from style menu

* Fix placement of clone buttons

* Fix flag to hide image assets in multiplayer

* move getSizeFromDataUrl to filesystem

* Update VideoUtil.tsx

* Re-center video after it loads

* Add copy and paste support for assets

* Fix bug in state manager, remove unused assets on load, fix indicators

* Add multiplayer with images example

* Update MultiplayerEditor.tsx

* Add images to copy SVG

* tighten up some code around svg export

* Update TldrawApp.spec.ts

* Update useBoundsHandleEvents.tsx

* Reset image size by double clicking bounds

* fix reset size

Co-authored-by: Steve Ruiz <steveruizok@gmail.com>
2021-12-25 17:06:33 +00:00
Steve Ruiz
2f84abcc1e v1.2.10 2021-12-22 14:33:56 +00:00
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