Commit graph

783 commits

Author SHA1 Message Date
Steve Ruiz
15e3e9805f
[fix] Refresh bounding boxes when fonts load (#612)
* remove font face fallbacks

* When fonts load, force the document to recalculate bounding boxes.
2022-03-09 12:39:41 +00:00
Steve Ruiz
8ba4d70615 Update package.json 2022-03-09 11:25:08 +00:00
Steve Ruiz
1544ce3e20
[fix] brush appearance when using CAD mode (#609)
* Update Tldraw.tsx

* Uses color rather than dash for brush in CAD mode

* improves colors for dark mode

* Update Tldraw.tsx
2022-03-09 11:02:46 +00:00
Enrico
2781aa4e0d
added CAD like behavior like described in issue #555 (#589)
* added cade like behaviour like described in issue #555

* added color change when selecting depending on behavior

* added option to turn on/off cad like selection

* Revert "added color change when selecting depending on behavior"

This reverts commit 4a4aac02b68bf1bfbc86f9b9f05e23b3e6e0ae9d.

* Remove colors, add perfect dash props, rename setting, move prop to appState

* Reorder menu

Co-authored-by: Steve Ruiz <steveruizok@gmail.com>
2022-03-09 10:19:58 +00:00
Steve Ruiz
9d984b8b7a Update TldrawApp.ts 2022-03-03 07:09:19 +00:00
Fabian Mu
32203637f2
Extract SVGs size from viewBox attibute (#590) 2022-03-02 14:59:54 +00:00
Yao Wang
e43219ded8
fix(import): make sure every shape is in page (#599)
* fix(import): make sure every shape is in page

- only to add the shape is in page shapes
-https://gist.github.com/cangoektas/4a84e2d48f6e2551b8b3a632ae1b4f71

Closes #554

* Update useShapeTree.tsx

* Update useShapeTree.tsx

* Update turbo.json

Co-authored-by: Steve Ruiz <steveruizok@gmail.com>
2022-03-02 14:21:14 +00:00
Steve Ruiz
9f40b1321d 1.6.2 2022-02-25 12:19:11 +00:00
Steve Ruiz
95ac56db76 Update getTextSize.ts 2022-02-24 21:41:08 +00:00
Steve Ruiz
ae49e85380 Fix text issue 2022-02-24 21:26:44 +00:00
Steve Ruiz
835091d494 Fix zoom 2022-02-15 14:15:03 +00:00
Steve Ruiz
4445c13b3f Create serious-emus-talk.md 2022-02-15 12:41:35 +00:00
Steve Ruiz
3a08473d85
[improvement] zoom (#577)
* improve zoom events, skip pinch on desktop

* Update useZoomEvents.ts
2022-02-15 12:21:31 +00:00
Steve Ruiz
ee71a37b40
Add option to hide multiplayer menu (#576)
* add multiplayer menu, view to menu

* update icon

* Add option to hide showMultiplayerMenu
2022-02-13 16:06:39 +00:00
Steve Ruiz
8ab16f1362
[improvement] Add multiplayer menu, view to menu (#575)
* add multiplayer menu, view to menu

* update icon
2022-02-13 14:59:33 +00:00
Steve Ruiz
7df566ad0f
[fix] export groups (#574)
* update export logic to include grouped ids

* Update TLDR.ts

* Update package.json

* Update yarn.lock

* remove remote caching

* Update yarn.lock
2022-02-13 13:13:23 +00:00
Eswar Prasad Clinton. A
5721885161
add copy svg keyboard shortcut (#573) 2022-02-13 12:37:01 +00:00
Steve Ruiz
e8dd64baf7
[fix] Multiplayer bugs on text (#571)
* Update StickyUtil.tsx

* Fix sticky text in multiplayer?

* fix text and text label

* Update TextUtil.tsx

* Update TextUtil.tsx

* Fix missing empty content button

* Create tidy-ducks-visit.md

* forcing bump

* Update TextUtil.tsx

* fix resizing

* try again

* don't merge editing ids

* fixed!

* Update utils.ts

* downgrade puppeteer

* change deps

* restore deps

* explicit version

* keep at it

* deps
2022-02-11 21:35:24 +00:00
Steve Ruiz
9619e3be0b
Add changeset (#567)
* add lask for packages

* Add turbo

* remove custom scripts

* update turbo scripts

* Improve scripts, update changelogs

* update action to use turbo

* Update .gitignore

* Update main.yml

* Update main.yml

* Update main.yml

* Add docs

* add clean

* Add changesets

* Add changeset
2022-02-08 11:45:11 +00:00
Steve Ruiz
e1fb9a8250
[improvement] Improve monorepo (lask + turbo) (#566)
* add lask for packages

* Add turbo

* remove custom scripts

* update turbo scripts

* Improve scripts, update changelogs

* update action to use turbo

* Update .gitignore

* Update main.yml

* Update main.yml

* Update main.yml

* Add docs

* add clean
2022-02-08 11:05:56 +00:00
Steve Ruiz
da4d566bd8 v1.6.1 2022-02-03 11:19:12 +00:00
Steve Ruiz
7d32f00d14 Update CHANGELOG.md 2022-02-03 11:17:40 +00:00
Steve Ruiz
89c1c4a4f4 add node env to packages in build script 2022-02-03 11:14:26 +00:00
Steve Ruiz
014bfbc841 bump dependencies 2022-02-03 10:57:03 +00:00
Steve Ruiz
bb077762c5
[fix] Arrow bindings + labels (#558)
* Fix label colors for arrow / triangle shapes in dark mode

* Fix bouncy arrow label, add tests, remove redundant call to updateBindings, remove redundant call to updateArrowBinding
2022-02-03 10:09:06 +00:00
David
db7e785ca2
Fixed redo shortcut misconfiguration (#551) 2022-02-02 22:03:49 +00:00
Steve Ruiz
4cee3203e6 v1.6.0 2022-01-31 15:06:01 +00:00
Steve Ruiz
61830f03ec Update CHANGELOG.md 2022-01-31 15:04:19 +00:00
Steve Ruiz
53cd70d0cf
Fix bug where handles are identical (#548) 2022-01-31 14:58:38 +00:00
Steve Ruiz
16076dcdac
fix missing pressure (#546) 2022-01-31 12:25:51 +00:00
Steve Ruiz
4c9c757cb5
Update TldrawApp.ts (#544) 2022-01-31 09:32:14 +00:00
Steve Ruiz
79f7d1db87 fix missing intersections in arrows 2022-01-30 21:18:24 +00:00
Steve Ruiz
03ff422680
[improvement] arrows binding logic (#542)
* Improve arrows binding logic

* Update ArrowSession.ts

* more arrow improvements

* major arrow cleanup / refactor

* point toward anchor rather than center
2022-01-30 21:13:57 +00:00
Jason Laster
0ff6f0628f
Add sourcemap-loader to build step (#535)
* Add sourcemap-loader to build step

* .
2022-01-25 09:57:24 +00:00
Faraz Shaikh
dd1fb73876
Add IDs to UI components (#511)
* Add IDs to Menu and its sub-menus

* Commit uncommitted

* Added ID on Styles and Zoom menu

* Added ID on Tools menu

* Added ID on Context menu
2022-01-21 11:44:18 +00:00
Steve Ruiz
16e8fe1426
[fix] export from other pages, export sizes (#525)
* support larger files, reparent shapes correctly

* serialize GIFs
2022-01-19 12:33:57 +00:00
Steve Ruiz
30d1d7721c
Fix exports in prod (#521)
* Fix exports in prod

* downgrade libs to fit under next.js serverless function size limit
2022-01-18 10:00:58 +00:00
Steve Ruiz
8977d296a9 move puppeteer to www 2022-01-18 09:18:22 +00:00
Martin Valchev
89606b97d2
Fix missing text shape props in onShapeChange (#516) 2022-01-18 09:10:02 +00:00
Faraz Shaikh
89797787e8
Fix: Only assets that are actually deleted call onAssetDelete (#510) 2022-01-16 10:00:46 +00:00
Steve Ruiz
7c82fbbb65 v1.5.2 2022-01-14 20:59:37 +00:00
Steve Ruiz
29e8f25659 Update CHANGELOG.md 2022-01-14 20:58:44 +00:00
Steve Ruiz
8cba193bfd Fix viewport on initial load 2022-01-14 20:57:54 +00:00
Steve Ruiz
cb1f4e242e v1.5.1 2022-01-14 20:46:02 +00:00
Steve Ruiz
fab3246bca cleanup 2022-01-14 20:45:07 +00:00
Steve Ruiz
08a930f59c
[fix] fix text shapes bugs (#509)
* cleanup

* Fix text size, and slash

* Remove console.log
2022-01-14 20:35:11 +00:00
Milo Hill
bff8b3cc07
Remove onLoad functions (#504) 2022-01-14 19:17:28 +00:00
Faraz Shaikh
c4764f300d
Call onAssetDelete when asset is deleted (#505) 2022-01-14 19:13:56 +00:00
Steve Ruiz
76fd8fcc30 fix dialog 2022-01-12 15:57:16 +00:00
Herb Caudill
372cc690c7
Scroll wheel fixes & enhancements (#501)
* scroll wheel fixes & enhancements

1. correct zoom direction (was reversed)
2. support ctrl+scroll for zoom (in addition to alt+scroll)
3. support shift+scroll for horizontal pan

* Allow two-axis panning

Co-authored-by: Steve Ruiz <steveruizok@gmail.com>
2022-01-12 14:33:55 +00:00
Faraz Shaikh
36a6026cb3
Fix error on file save/save-as (#496)
* fix dynamic import

* Remove console log

* Fix other imports too
2022-01-12 13:37:07 +00:00
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