Commit graph

899 commits

Author SHA1 Message Date
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
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
/c²
a0891ca3ff
Change Github to GitHub (#315) 2021-11-20 08:21:17 +00:00
Steve Ruiz
62803443ef
fix stuck pointer during text editing / palm hits (#316) 2021-11-20 00:05:48 +00:00
dinaco
6e72b78e91
Add Discord link to Menu (#312)
* [feature] Add Discord link to Menu #309

* [feature] Add Discord link to Menu #309

* Moves icon to new component

Co-authored-by: Steve Ruiz <steveruizok@gmail.com>
2021-11-19 20:46:51 +00:00
Steve Ruiz
6214718c31
Update useKeyboardShortcuts.tsx (#313) 2021-11-19 20:26:16 +00:00
Steve Ruiz
af0764d3f9 v1.0.4 2021-11-19 15:02:04 +00:00
Steve Ruiz
e043b884ac Update CHANGELOG.md 2021-11-19 15:01:41 +00:00
Steve Ruiz
67a7935cfc
[fix] page options dialog (#302)
* fix rename pages

* Update sponsors.ts
2021-11-19 13:20:23 +00:00
Steve Ruiz
eb20f1c816
[fix] current style and selected style (#298)
* Fix selectedStyles from being new on each update

* Fix again

* Update TldrawApp.ts

* Fix log around current style and selected style

* Add stub test, move style menu into folder

* Cleanup repo

* cleanup context menu
2021-11-19 10:19:06 +00:00
Steve Ruiz
e0b607e512 Undo fixes 2021-11-18 19:54:20 +00:00
Steve Ruiz
e7f61eac34
Fix selectedStyles from being new on each update (#293) 2021-11-18 18:18:30 +00:00
Steve Ruiz
2f8d973b07 Fix error when starting a session while already in a session. 2021-11-18 16:38:49 +00:00
Steve Ruiz
2f1816404b
Fix bug in ellipse (#292) 2021-11-18 16:33:12 +00:00
Steve Ruiz
e542f1fde5
Update READMEs (#290)
* Update readmes

* tweak links

* Update README.md
2021-11-18 15:07:55 +00:00
Steve Ruiz
9158666a09 Update README.md 2021-11-18 14:06:05 +00:00
Steve Ruiz
6af6cfb617 update readmes 2021-11-18 14:05:44 +00:00
Steve Ruiz
e6a3e5c3ea
[big chore] restore core to monorepo (#287)
* move core into repo, apps into apps folder, update tests

* Update scripts for build:core

* improve scripts

* remove noise from www

* Update .gitignore

* Fix focus bug

* add ci test script

* Update main.yml
2021-11-18 13:09:18 +00:00
Steve Ruiz
878ca710b7 bumps rko 2021-11-18 12:13:38 +00:00
Steve Ruiz
2398ba80ec Update TldrawApp.ts 2021-11-18 11:39:20 +00:00
Steve Ruiz
c965c12532 Fix default behavior for copy svg / copy json 2021-11-18 11:39:00 +00:00
Steve Ruiz
3228ff6352 Add prompt to confirm new project 2021-11-18 11:23:19 +00:00
Steve Ruiz
d1b37b7997 Fix text breaks 2021-11-18 08:25:47 +00:00
Steve Ruiz
5590362b0a update scripts 2021-11-17 11:54:59 +00:00
Steve Ruiz
325008ff82 v1.0.3 2021-11-17 11:50:57 +00:00
Steve Ruiz
1fb5c633c5 fix issue with create-react-app 2021-11-17 11:50:30 +00:00
Steve Ruiz
409f3513a1 v1.0.2 2021-11-17 11:24:45 +00:00
Steve Ruiz
f9a4d81135 bump rko 2021-11-17 11:24:12 +00:00
Steve Ruiz
3cb4d1c679 v1.0.1 2021-11-17 11:09:32 +00:00
Steve Ruiz
d867e439e1 Update CHANGELOG.md 2021-11-17 11:09:12 +00:00
Steve Ruiz
2c1cba0a49 Improves action button / delete button appearance 2021-11-17 11:06:56 +00:00
Steve Ruiz
1ef5f85e59
[feature] resize from center (#279)
* adds alt key to transform from center

* adds tests
2021-11-17 11:05:33 +00:00
Steve Ruiz
c1e053fb11 Fix toggle prop 2021-11-16 21:21:02 +00:00
Steve Ruiz
280b831c51 reduce dimming on disabled buttons 2021-11-16 21:05:35 +00:00
Steve Ruiz
b1002b70e9 Round points when a draw shape is completed 2021-11-16 21:04:00 +00:00
Steve Ruiz
6d3251f195 Fix multiplayer room 2021-11-16 19:41:16 +00:00
Steve Ruiz
d0a673931f action button / delete button disabled when selection is empty 2021-11-16 17:05:17 +00:00
Steve Ruiz
b9fdb89995 v1.0.0 2021-11-16 16:03:54 +00:00
Steve Ruiz
0c5f8dda48
1.0.0 (#267)
* remove sponsorwall for main route

* Adds sponsorship link

* Remove all sponsorwall

* Fix sponsorship link appearance on dark mode

* Add heart icon

* Fix text bug

* Fix toolbar, hide resize handles on sticky

* Add eraser

* Update Kbd.tsx

* cleanup

* base zoom delta on event deltaMode

* Fix image in example

* Fix eraser icon

* eraser tool resets to previous tool

* Update EraseTool.spec.ts

* Improves support for locked shapes

* Update _document.tsx

* Update CHANGELOG.md

* Adds multiplayer menu, fix develop route in example

* Tighten up top panel padding

* Update top bar, bump packages

* refactor TLDrawState -> TLDrawApp, mutables, new tests

* Fix scaling bug, delete groups bug

* fix snapping

* add pressure to points

* Remove mutables, rename to tldraw (or Tldraw)

* Clean up types, add darkmode prop

* more renaming

* rename getShapeUtils to getShapeUtil

* Fix file names

* Fix last bugs related to renaming

* Update state to app in tests

* rename types to TD

* remove unused styles / rename styles

* slight update to panel

* Fix rogue radix perf issue

* Update ZoomMenu.tsx

* Consolidate style panel

* Fix text wrapping in text shape, improve action menu

* Fix props

* add indicators for tool lock

* fix calloits

* Add click to erase shapes

* Slightly improve loading screen

* Update PrimaryTools.tsx

* remove force consistent filenames from tsconfig

* Update useTldrawApp.tsx

* fix capitalization

* Update main.yml
2021-11-16 16:01:29 +00:00
Steve Ruiz
8fd8e534f4 Update CHANGELOG.md 2021-11-12 22:30:35 +00:00
Steve Ruiz
f0a766b653 v0.1.17 2021-11-12 22:30:04 +00:00
Steve Ruiz
738fa2f8d6 v0.1.16 2021-11-12 22:28:30 +00:00
Steve Ruiz
f0e89b591b v0.1.15 2021-11-12 22:27:38 +00:00
Steve Ruiz
e215b3a25e Update TLDrawState.ts 2021-11-12 22:26:45 +00:00
Steve Ruiz
569948a7d8 v0.1.14 2021-11-12 22:25:32 +00:00
Steve Ruiz
d13e25b5b0 Remove copy-files 2021-11-12 22:22:39 +00:00
Steve Ruiz
ec9a40b800
Update DrawSession.ts (#272) 2021-11-12 22:19:50 +00:00
Steve Ruiz
b3d0e7cceb
Adds double click to tool lock, replaces tool lock button with delete button (#266) 2021-11-11 13:03:13 +00:00
Steve Ruiz
e4076acc5f v0.1.13 2021-11-11 12:16:10 +00:00
Steve Ruiz
9c8d064aaa v0.1.12 2021-11-11 12:13:04 +00:00
Steve Ruiz
84a91ccc70 updates docs / readmes / adds contributor guide 2021-11-11 12:11:21 +00:00
Steve Ruiz
5be36d9bd8 changelog 2021-11-11 11:41:04 +00:00
Steve Ruiz
fa38c0ef0d
[improvement] examples (#264)
* Example project, fix bugs in readonly mode

* Adds ui options
2021-11-11 11:37:57 +00:00
Steve Ruiz
58fc99cc08 v0.1.12 2021-11-11 09:57:33 +00:00
Steve Ruiz
cf16cea87d Update CHANGELOG.md 2021-11-11 09:56:56 +00:00
Steve Ruiz
63137b04e9 bump 2021-11-11 09:56:21 +00:00
Proful Sadangi
4dd1aea572
Fix tooltip label & color contrast (#262)
* Fix tooltip label & color contrast

* adds fix for context menu

* Fix focus within

* Add inline docs

* Fix color for kbd

* Fix for submenu

* tighten up code

* Added onBlur mock function

Co-authored-by: Steve Ruiz <steveruizok@gmail.com>
2021-11-11 09:54:58 +00:00
Francois Laberge
a95b581e07
Prepare for Publishing VS Code Extension (#227)
* Changed Wardlt use back to Tldraw. Added some VS Code marketplace categories

* Missed removing one Wardlt mention

* Initial support for esbuild based vscode extension workflow.

* Hacky start of vs code extension build script

* Fixed categories of extension

* Added script for generating VS Code extension installer

* Temp fix for file format change affecting VS Code extension

* Temp fix for file format change issue

* Cleanup, prevent changes from saving pagestates

* Remove logic around saving pageState

* standardize capitalization

* v0.1.8

* Edit readme, scripts

* Update .eslintignore

* v0.1.9

* v0.1.10

* cleans up build scripts, adds publishing notes

* Added VS Code extension implementation references links. start:vscode now auto opens the extension folder in VS Code

* Removed step from VS Code README to manually open the extensions folder

* Removed file

* v0.1.11

* v0.1.12

* Fix empty file

* v0.1.13

* README cleanup

* v0.1.14

* Update TLDrawEditorProvider.ts

* v0.1.15

* Fix types for file extension (sort of) build script for extension

Co-authored-by: Steve Ruiz <steveruizok@gmail.com>
2021-11-10 15:35:51 +00:00
Steve Ruiz
c1288363cd v0.1.11 2021-11-10 12:11:49 +00:00
Steve Ruiz
699bf6a368 bumps 2021-11-10 12:11:24 +00:00
Steve Ruiz
725f3105d6 v0.1.10 2021-11-10 12:09:29 +00:00
Steve Ruiz
83c6a978ad v0.1.9 2021-11-10 12:09:02 +00:00
Steve Ruiz
14cadbe5b5 v0.1.8 2021-11-10 12:08:32 +00:00
Steve Ruiz
09a357ca9d Update CHANGELOG.md 2021-11-10 12:07:59 +00:00
Steve Ruiz
2fe646c2c7
Fix sticky and text (#234) 2021-11-10 12:07:01 +00:00
Steve Ruiz
8b3c963a08 v0.1.7 2021-11-09 14:38:09 +00:00
Steve Ruiz
1b05a15347 Update CHANGELOG.md 2021-11-09 14:37:52 +00:00
Steve Ruiz
6592608a09
[fix] Text on Safari (#232)
* Fix editing bug on safari text

* Fix text behavior when blurring

* Update SelectTool.ts
2021-11-09 14:26:41 +00:00
Steve Ruiz
0b5a516b57
[fix] missing file menu (#231)
* Fix missing file menu

* Update TLDraw.tsx
2021-11-09 10:55:01 +00:00
Steve Ruiz
be2c6d6d1f
[refactor] events (#230)
* bumps rko, adds events

* rename tlstate to state, fix env for multiplayer test

* Fix multiplayer

* rename data tldrawstate to tldrawsnapshot

* Update multiplayer-editor.tsx

* Fix shhhmp

* Update 2.tldr

* Add API to the README
2021-11-08 14:21:37 +00:00
Steve Ruiz
f037118928 Update ArrowUtil.tsx 2021-11-07 20:07:57 +00:00
Steve Ruiz
be1f6c3c3c Update CHANGELOG.md 2021-11-07 14:45:57 +00:00
Steve Ruiz
4f3fae41b5 v0.1.6 2021-11-07 14:45:42 +00:00
Steve Ruiz
b726796d88 v0.1.5 2021-11-07 14:44:20 +00:00
Steve Ruiz
c479987dd8 Update CHANGELOG.md 2021-11-07 14:43:57 +00:00
Steve Ruiz
5627c34763 Update CHANGELOG.md 2021-11-07 14:43:29 +00:00
Steve Ruiz
6951fb370c
fix events on top panel (#226) 2021-11-07 14:42:27 +00:00
Steve Ruiz
f30eb26003
Change listening port from 5000 to 5420 (#225) 2021-11-07 14:29:24 +00:00
Steve Ruiz
7c980ebb19
Electron App (#224)
* add electron wrapper

* add to workspaces

* fixes electron setup

* Fix package for dev

* build out electron app communication

* Update README.md
2021-11-07 13:45:48 +00:00
Francois Laberge
0b15992464
Create VS Code Extension (#4)
* Start of vscode extension. Current code is copy/paste from custom editor samples from Microsoft. We need to evaluate if using their text based customer editor or full on new custom editor is the way to go

* Not sure how I missed these files. Adding them

* Have a custom editor triggering off of .tldr files. Added gitignores for generated folder. Have iframed tldraw loading and security policies set to do so

* Can now load a .tldr file. No saving support yet. Load times are slow, mostly from editor loading up I think

* Have temporary solution for saving working now too.

* Missed af ile

* Backing up progress in syncing tldraw editor history changes

* Removed console

* ...

* ...

* Cleanup

* Have save working well now.

* Moved extension into 'integrations' folder

* Trying out WebviewPanelOptions.retainContextWhenHidden=true and it's looking promising

* Some cleanup

* Trying out new  @tldraw/editor module

* Have prototype loading using new embedded editor

* ...

* Shaved off 1 second from editor loadtime

* Got save working again. Had to manually fixuppreviously created .tldr files as the format changed a bit

* More tuning

* Starting work to get new tldraw/tldraw working.

* Added example tldr files to vscode package

* Removed old editor package

* Have onChange working with latest fix. Back to iframed for a few mom

* Fixed up .tldr files

* Have iframe free extension working, but requiring hand crafted building

* ...

* Better handling of empty .tldr files. Still an issue with freshly created files trying to save as .js or .json

* Thoroughly added comments for the extension code. Need to add diagrams though and now will document/comment/diagram the editor src code

* Added comments to all of the editor side of the VS Code Extension. Also cleaned up the code

* More cleanup of VS Code Extension code and have script automating generating the initial webview's html content from the cra editor static build

* Tweaks to watch logic

* Improved scripts for publishing to VS Code Marketplace

* Improved name

* Made the smiley angry

* Reverted

* Turned smiley mad

* Turned smiley mad

* Made smiley sad

* Have a lot of plumbing working for Github codespaces and github.dev support

* Imported new tldraw vs code extension code. Added instructions for workflows

* Quick fix

* Fix for corrupted arrows files

* Updated editor build step to new location

* Merge branch 'main' into vscode-extension-v1, add local file updating

* Update App.tsx

* Cleanup, bumped to 0.0.124 @tldraw/tdlraw and published a 0.10.0 version of hte extension

* Added Trello/Kanban style file

* Finished video

* brings up to date

* Fix scripts

* Update README.md

* Update .babelrc

Co-authored-by: Steve Ruiz <steveruizok@gmail.com>
2021-11-06 16:49:53 +00:00
Steve Ruiz
a70cb145be don't minify 2021-11-06 16:09:38 +00:00
Steve Ruiz
3c1de1f169 name memoized components 2021-11-06 11:19:15 +00:00
Steve Ruiz
e11f05028f
[mega-chore] renaming (#223)
* Rename shape utils

* renames files

* Add husky

* Delete .babelrc

* Update TLDR.ts

* renames commands

* Update package.json

* more pre-commit work
2021-11-06 11:16:30 +00:00
Steve Ruiz
b3ea398ba1 v0.1.4 2021-11-06 08:09:15 +00:00
Steve Ruiz
7f3f347d39 Update CHANGELOG.md 2021-11-06 08:08:59 +00:00
Steve Ruiz
492281ac18 Fix shortcut in menu 2021-11-06 08:07:43 +00:00
Proful Sadangi
bbb2bfbeb0
Fix for extra divider in the context menu (#222)
* Fix for extra divider in the context menu

* Moves divider to above group section, if present

Co-authored-by: Steve Ruiz <steveruizok@gmail.com>
2021-11-06 08:04:44 +00:00