Wykres commitów

363 Commity (9c3424a5fc6f8fb247f53c927b030938677109ea)

Autor SHA1 Wiadomość Data
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
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 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
Siddhartha Varma 76d0751e2f
fix: enable spellcheck prop in textarea (#391) 2021-11-27 09:48:13 +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 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 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
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 adb680f8cf
[fix] brush selection on groups (#335)
* select groups rather than grouped shapes

* Adds test
2021-11-21 12:40:17 +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
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 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 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 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 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 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 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 e215b3a25e Update TLDrawState.ts 2021-11-12 22:26:45 +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 fa38c0ef0d
[improvement] examples (#264)
* Example project, fix bugs in readonly mode

* Adds ui options
2021-11-11 11:37:57 +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 2fe646c2c7
Fix sticky and text (#234) 2021-11-10 12:07:01 +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 6951fb370c
fix events on top panel (#226) 2021-11-07 14:42:27 +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 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 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
Steve Ruiz 0508857535 Update TrashIcon.tsx 2021-11-05 23:58:12 +00:00
Steve Ruiz ec3dae085c
[improvement] repo, scripts (#220)
* Fix menu, cleanup package.json

* update changelog
2021-11-05 20:31:20 +00:00
Steve Ruiz fb77323ef2
[feature] filesystem + readonly (#218)
* Fix escape key for menu

* Adds filesystem support, readonly mode

* Move file system events to external hook

* Adds onSignIn callback, prevent event by default
2021-11-05 14:13:14 +00:00
Steve Ruiz 61ac6427fb Migrations done! 2021-11-05 07:08:25 +00:00
Steve Ruiz 39f56d564a More debugging 2021-11-05 07:03:44 +00:00
Steve Ruiz e3775c4c12 force migrate 2021-11-05 06:57:41 +00:00
Steve Ruiz 25cd388ff3 fixes migration bug? 2021-11-05 06:52:28 +00:00
Steve Ruiz fe2e3c81fe
[improvement] Migrations (#217)
* Add better migrations

* Improves migrations

* rename dev to example

* renames migrate

* Removes workers from git

* Remove rogue dependency

* Fix dropdown navigation by keyboard
2021-11-04 15:48:39 +00:00
Steve Ruiz 0e477676c7 Update dependencies, mark external 2021-11-04 13:00:51 +00:00
Steve Ruiz 161d69939f
[fix] Safari icons (#216)
* Fix icons on Safari, improve padding for UI

* fix types

* Update SizeMenu.tsx

* bumps size of primary buttons

* Minor UI tweaks
2021-11-04 12:26:41 +00:00
Steve Ruiz 72b6fafcc1 Fix ActionButton bug 2021-11-03 16:51:29 +00:00
Steve Ruiz e2369003c6
[improvement] UI (#215)
* move folders out of packages

* Remove custom yarn stuff, remove duplicate readme

* Remove stitches config

* Add README script.

* bump deps

* Fix script

* Update package.json

* rehauls UI

* further rehauls UI

* UI polish

* Update ToolButton.tsx

* Update ToolButton.tsx

* Bump license

* move tldraw to root

* Remove SW
2021-11-03 16:46:33 +00:00
Steve Ruiz 0d564c1501 Remove libraries 2021-11-01 15:26:44 +00:00
Steve Ruiz 12e425ddc4
[fix] rotate center (#213)
* fixes rotate center after translating / transforming

* Adds test, fixes issue on undo/redo

* Update tsconfig.base.json
2021-10-30 10:04:33 +01:00
Steve Ruiz 10d0a5f5a1 Adds migration for documents 2021-10-28 22:49:00 +01:00
Steve Ruiz 8249d6d66c update changelog 2021-10-28 22:33:55 +01:00
Steve Ruiz e3ec44c011 Fix bounds issue 2021-10-28 22:31:29 +01:00
Steve Ruiz 419302e673
Update to core (again) (#211)
* Updates to new core.

* Fix arrow bug
2021-10-28 18:10:36 +01:00
Steve Ruiz 5479d67877
Updates to new core. (#210) 2021-10-28 17:50:58 +01:00
Steve Ruiz 599e6032a9 Removes core (off to its own repo) 2021-10-27 18:52:02 +01:00
Steve Ruiz 02a6488f46 Fix types for real 2021-10-27 17:21:49 +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 8d6fe119a5 minor utils tweaks 2021-10-25 09:38:11 +01:00
Steve Ruiz fa4cc755e3
[fix] modifiers on arrow shape (#200)
* Update arrow.session.ts

* Update arrow.session.spec.ts
2021-10-22 15:06:12 +01:00
Steve Ruiz f2960033b0
Fix shape create undos (#199) 2021-10-22 14:49:29 +01:00
Steve Ruiz 9aa9a88838 Fixes shortcuts in menu 2021-10-22 14:29:22 +01:00
Steve Ruiz 32425fb74a
Fix group pasting (#198) 2021-10-22 14:28:12 +01:00
Steve Ruiz 757feb009b
[fix] group behavior (#197)
* Fixes nudging on groups

* Fix alignment of grouped shapes

* fix distribute of grouped shapes

* Fixes stretching groups

* Fix rotate command

* Improve idsToMutate code

* remove boundsRotation
2021-10-22 14:09:39 +01:00
Steve Ruiz dd4f39ae74
Fix bug on group cloning (#196) 2021-10-22 13:23:36 +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