Wykres commitów

103 Commity (e0e13734683e303b539c3206e0b214ce3762357a)

Autor SHA1 Wiadomość Data
Gwenaël Gallon e0e1373468
Chore: clean up sort imports with prettier (#870)
* Update prettier to latest

* Add format command

* Create .prettierignore

* Add prettier plugin sort imports

* Update prettier config

* Update prettier config

* Update .prettierignore

* Fix @babel/parser conflict

https://github.com/trivago/prettier-plugin-sort-imports/issues/156

* Revert "Update .prettierignore"

This reverts commit 282e5b8383.

* Revert change for apps/www/pages/v/[id].tsx

* Sort imports

Moves the third party imports to the top, "~" imports in middle, and "./" at last

* Sorting of the specifiers

in an import declarations

* [www] use path vs  "../"

* [core] use path "~" vs "../"

* [tldraw] use path "~" vs "../.../"

* [tldraw] use path "~" vs "../"

* [tldraw] Cleanup

* Update prettier config

* Last use path "~" vs "../.../"

* [www] Fix order of the third party imports

* Clean prettier config
2022-08-02 14:56:12 +01:00
Gwenaël Gallon ecb4bfcc3b
Fix: no-unused-vars and remove eslint-disable in files (#862)
* Fix eslint no-unused-vars

* Remove eslint-disable in files
2022-07-30 08:28:48 +01:00
Steve Ruiz f0f545806a
[improvement] Quality and UI cleanup (#846)
* remove sponsors, ui cleanup

* fix radius

* improve panel

* remove cursor spline animations

* migrate options

* Switch hrs to divider

* fix text color on menu dark mode

* Remove option for clone handles

* fix wheel

* remove unused translations
2022-07-23 15:05:48 +01:00
Steve Ruiz 88fbdacaea
1.19.0 (#789)
* Edit Farsi translations (#788)

* Add a Ukrainian translation (#786)

* Add a Ukrainian translation

* Clarify some strings in the Ukrainian translation

* feat: change dock position (#774)

* feat: change dock position

* fix grid row and column

* add top position

* fix responsive for the top position

* change content side

* fix overflowing menu

* [improvement] theme on body (#790)

* Update Tldraw.tsx

* Add theme on body, adjust dark page options dialog

* fix test

* Preparing for global integration (#775)

* Update translations.ts

* Create en.json

* Make main translation default

* Remove unused locale property of translation

Co-authored-by: Steve Ruiz <steveruizok@gmail.com>

* Fix language menu

* Update ar.json (#793)

* feature/add Hebrew translations (#792)

* hebrew translations

* pr fixes

Co-authored-by: Steve Ruiz <steveruizok@gmail.com>

* fix toolspanel item position (#791)

* fix toolspanel item position

* add translation

Co-authored-by: Steve Ruiz <steveruizok@gmail.com>

* Add remote caching

* Adds link to translation guide (#794)

Co-authored-by: Baahar Ebrahimi <108254874+Baahaarmast@users.noreply.github.com>
Co-authored-by: walking-octopus <46994949+walking-octopus@users.noreply.github.com>
Co-authored-by: Judicael <46365844+judicaelandria@users.noreply.github.com>
Co-authored-by: Ali Alhaidary <75235623+ali-alhaidary@users.noreply.github.com>
Co-authored-by: gadi246 <gadi246@gmail.com>
2022-07-07 11:59:47 +01:00
Steve Ruiz 93e774691d Add locked indicator 2022-06-26 08:11:00 +01:00
Vincent Driessen 0acfd563fe
Upgrade Liveblocks to 0.17 (#738)
* Upgrade Liveblocks packages to 0.17

* Convert app to recommended Liveblocks 0.17 setup

* Convert multiplayer example to recommended Liveblocks 0.17 setup

* Convert multiplayer-with-images example to recommended Liveblocks 0.17 setup

* Fix React rendering issue for multiplayer app

This bug could manifest after _navigating_ internally to the Multiplayer
example app. Liveblocks Storage would seem to remain empty, but Presence
would still seem to work. In other words, you'd see cursors flying, but
no document contents.

This did not happen when doing a full page load.

This bug only occurs in React strict mode.

* update onPatch and onCommand

* "Add event callbacks for `onSessionStart` and `onSessionEnd`"

* Adds edit state

* Pass callbacks to app

* Remove console logs

* interpolate cursor only when not in session

* Update multiplayer icon

* Fix a few things

Co-authored-by: Steve Ruiz <steveruizok@gmail.com>
2022-06-25 15:38:43 +01:00
Steve Ruiz c959006144
Make eraser line scale to zoom (#710) 2022-06-02 17:14:27 +01:00
Steve Ruiz c126be5c50
[feature] add erase line (#708)
* Add erase line

* Fix erasing small dots

* bump perfect-freehand
2022-06-01 15:21:36 +01:00
Steve Ruiz 74b047549b
[fix] zoom on safari (#692)
* Fix pinch zooming on safari

* Reduce speed of zoom
2022-05-18 13:50:06 +01:00
Steve Ruiz e2a6badaef
[improvement] Adds error boundary (#690)
* Add error boundary

* Update useStyle.tsx

* Update ErrorFallback.tsx
2022-05-18 12:45:04 +01:00
Steve Ruiz c3050db968
[fix] copy and paste (again) (#685)
* fix copy

* remove console logs

* update types
2022-05-14 14:15:55 +01:00
Steve Ruiz e0aa7c0032
[fix] Fix text clipboard issues (#682)
* add encode URI component

* prevent copying while editing text

* Add copy listeners to canvas instead

* remove trailing whitespace on paste
2022-05-14 10:47:08 +01:00
Steve Ruiz 4b2b14eb26 release 1.12.0 2022-05-11 14:34:07 +01: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 4a4aac02b6.

* 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 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 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 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
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
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 5e6a4939d1 Removes faulty error boundary from core, removes faulty ID provider from tldraw 2021-12-12 21:44:44 +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 2d93f84a87.

* 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
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 62803443ef
fix stuck pointer during text editing / palm hits (#316) 2021-11-20 00:05:48 +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 599e6032a9 Removes core (off to its own repo) 2021-10-27 18:52:02 +01:00
Steve Ruiz c04e4134d2 Fix rendering bug, tweak API 2021-10-27 17:16:07 +01:00
Steve Ruiz 2e6c33342d
[refactor] ShapeUtils (#206)
* Starts refactor

* tests passing, got it

* Fix next
2021-10-27 16:15:01 +01:00
Steve Ruiz 0f2887a039 updates package 2021-10-22 20:14:02 +01:00
Steve Ruiz 3ba4d435bc
[fix] Hides handles that are too close to a previous handle (#193)
* Hides handles that are too close to a previous handle

* Hide handles if only one handle is visible
2021-10-22 12:28:11 +01:00
Steve Ruiz 8fd9cf8389
[feature] UX preferences (#172)
* Improves snapping util, styles corner buttons, adds preferences

* Update bounds.test.tsx

* Update preferences.tsx

* Update preferences.tsx

* Change copy
2021-10-19 14:29:55 +01:00
Steve Ruiz a7e8fafb96
Adds up and downstream links (#171) 2021-10-19 12:19:56 +01:00
Steve Ruiz 235a57d302 Adds indicator for text, linked translate 2021-10-18 16:59:12 +01:00
Steve Ruiz 0cfc68b004
[feature] snapping (#168)
* defer cloning

* basic snapping

* Improves algorithm for snap points, rendering

* Improves snapping, snaplines

* Enables a clone to snap to its parent

* Adds overlay

* Fix overlay, zoom scaling for distance and speed
2021-10-18 14:30:42 +01:00
Steve Ruiz abcdcd8dae
improves multiplayer presence (#160) 2021-10-16 21:24:31 +01:00
Steve Ruiz 32b2ae88ee
[feature] grid cloning (#152)
* Adds more clone buttons

* Adds grid session, fix bug on text, adds keyboard handlers for sessions

* Adds copy paint, point argument to duplicate

* Adds tests for duplicate at point

* Adds status for shape cloning

* Adds 32px padding when clone brushing
2021-10-15 17:14:36 +01:00
Steve Ruiz 1ec0434a3c
[improvement] improve performance (#151)
* Remove context menu

* Update stitches elements

* Update yarn.lock

* Fix bug on bounds bg

* Adds timer for will-change

* remove zindex

* jesus christ, just an extra div

* Remove will change timer
2021-10-15 13:49:48 +01:00
Steve Ruiz 46c9ac508d
[feature] Side cloning (#149)
* Adds side clone behavior

* Adds tab to clone, fixes wheel

* Fix bug in draw shape

* Passing tests
2021-10-14 16:37:52 +01:00
Steve Ruiz d95a2e83a0 Fix handles when drawing 2021-10-14 14:14:47 +01:00
Steve Ruiz 1c65c51b60 Fix zoom and paste for embedded shapes 2021-10-14 13:51:21 +01:00
Steve Ruiz f8cb7f03b6 Adds space panning, tweak css for performance 2021-10-14 13:33:39 +01:00
Steve Ruiz e1c307fd71
[feature] sticky notes (#148)
* Refactor toolbar

* Adds containerRef prop

* Fix arrows for groups

* Adds auto focus

* Notes on blurring

* Upgrades to match main

* Loose ends around sticky notes

* Fixes user select

* Passing tests

* Update sticky.tsx
2021-10-13 17:03:33 +01:00
Steve Ruiz 1408ac2cbe
Refactor tools (#147)
* Refactor Tools

* Update text.tsx

* Passing tests

* Error fixes

* Fix re-selecting tool

* Fix arrow
2021-10-13 14:55:31 +01:00
Steve Ruiz bd6197ea16 Fix types 2021-10-12 23:02:44 +01:00
Steve Ruiz 93827e45dd Adds indicators for selected shapes from other users 2021-10-12 15:59:04 +01:00
Steve Ruiz d6b38ed79e
[feature] Live cursors MVP (#137)
* Adds very basic live cursors

* Adds ability to hide pages / menu
2021-10-09 14:57:44 +01:00
Steve Ruiz a144360adf
fixes cursors, bounding box when hidden (#133) 2021-10-07 16:06:11 +01:00
Steve Ruiz 798bae28ca Set zoom scale bounds based on camera zoom 2021-10-06 13:03:45 +01:00