Wykres commitów

55 Commity (e1fb9a8250d251387a6e57ff7a8e473034a4a9eb)

Autor SHA1 Wiadomość Data
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 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
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 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
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
Faraz Shaikh 89797787e8
Fix: Only assets that are actually deleted call `onAssetDelete` (#510) 2022-01-16 10:00:46 +00:00
Steve Ruiz 8cba193bfd Fix viewport on initial load 2022-01-14 20:57:54 +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 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 5c33fbd89c bug fixes 2022-01-06 10:45:11 +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 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 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 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 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 0ed7e55c4c Make core asset types more generic, update docs. 2021-12-25 18:39:50 +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 3dc2ba703f.

* 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
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
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
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
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 0039dd2e66
Restore onPersist (#435) 2021-12-04 14:51:40 +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
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
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
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 b1d46c29f6 Fix copy svg / json when page is empty. 2021-11-22 16:53:24 +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
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
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
Proful Sadangi a1f4149efe
Fixed bug related to locked tools & select tool (#331) 2021-11-21 11:53:13 +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
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