Wykres commitów

24 Commity (3cf4dae34d3e370b2821a95f84af1c903ad62804)

Autor SHA1 Wiadomość Data
Steve Ruiz 3cf4dae34d
Change licenses to tldraw (#2167)
This PR updates the licenses across tldraw to a bespoke tldraw license.

The idea here is leverage dual licensing for revenue from companies
using tldraw. The source code and its distributions are provided under a
non-commercial license (tldraw) while we offer to sell / give out an
alternative exclusive-use license for companies who wish to use the
product for commercial purposes.

- [x] Add new license
- [x] Change licenses in package.jsons
- [x] Update READMEs
- [x] Update docs (separate repo PR)
- [x] Have alternative license in hand (US)
- [ ] Have alternative license in hand (UK)
- [x] Have sales contract in hand (US)
- [ ] Have sales contract in hand (UK)

### Change Type

- [x] `major` — Breaking change
2023-12-19 10:41:01 +00:00
huppy-bot[bot] 64dce02ba3 Update CHANGELOG.md [skip ci] 2023-12-12 14:50:43 +00:00
Mitja Bezenšek 9e7d258b5f
Add prettier caching (#2212)
Adds `--cache` flag to prettier which significantly speeds up `yarn
format`:
https://prettier.io/docs/en/cli#--cache

One downside is that changing the plugins we use with prettier will not
cause the cache to invalidate. Stills seems worth it though.

> Plugins version and implementation are not used as cache keys. We
recommend that you delete the cache when updating plugins.

### Change Type

- [ ] `patch` — Bug fix
- [ ] `minor` — New feature
- [ ] `major` — Breaking change
- [ ] `dependencies` — Changes to package dependencies[^1]
- [ ] `documentation` — Changes to the documentation only[^2]
- [ ] `tests` — Changes to any test code only[^2]
- [x] `internal` — Any other changes that don't affect the published
package[^2]
- [ ] I don't know

[^1]: publishes a `patch` release, for devDependencies use `internal`
[^2]: will not publish a new version

### Test Plan

1. Run `yarn format`
2. Run `yarn format` again, this time it should be significantly faster.

### Release Notes

- Speed up formatting of files via `yarn format`.
2023-11-14 09:06:52 +00:00
huppy-bot[bot] 56ada41ae7 Update CHANGELOG.md [skip ci] 2023-11-10 10:49:37 +00:00
David Sheldrick 037246e267
Revert "bump prerelease from alpha to beta" (#2192)
Reverts tldraw/tldraw#2148
2023-11-10 10:41:31 +00:00
David Sheldrick b9d8246629
bump prerelease from alpha to beta (#2148)
This switches us from the 'alpha' to 'beta' prerelease tag. After we
make our first deploy folks will be able to install the latest version
by doing `npm install @tldraw/tldraw@beta`.

### Change Type

- [x] `internal` — Any other changes that don't affect the published
package[^2]


[^1]: publishes a `patch` release, for devDependencies use `internal`
[^2]: will not publish a new version
2023-11-06 11:57:12 +00:00
huppy-bot[bot] 9c3b3ddbe0 Update CHANGELOG.md [skip ci] 2023-10-17 14:39:34 +00:00
David Sheldrick c377c98902
bump nanoid (#2078)
Bumps nanoid to bring in line with brivate to make sure our nanoid mock
in our fuzz test works. Supersedes
https://github.com/tldraw/brivate/pull/3027#pullrequestreview-1676280991

### Change Type

- [ ] `patch` — Bug fix
- [ ] `minor` — New feature
- [ ] `major` — Breaking change
- [x] `dependencies` — Changes to package dependencies[^1]
- [ ] `documentation` — Changes to the documentation only[^2]
- [ ] `tests` — Changes to any test code only[^2]
- [ ] `internal` — Any other changes that don't affect the published
package[^2]
- [ ] I don't know

[^1]: publishes a `patch` release, for devDependencies use `internal`
[^2]: will not publish a new version
2023-10-16 08:44:12 +00:00
huppy-bot[bot] ed5df33244 Update CHANGELOG.md [skip ci] 2023-10-11 10:42:50 +00:00
huppy-bot[bot] d38587d215 Update CHANGELOG.md [skip ci] 2023-10-06 15:18:15 +00:00
Steve Ruiz b7d9c8684c
tldraw zero - package shuffle (#1710)
This PR moves code between our packages so that:
- @tldraw/editor is a “core” library with the engine and canvas but no
shapes, tools, or other things
- @tldraw/tldraw contains everything particular to the experience we’ve
built for tldraw

At first look, this might seem like a step away from customization and
configuration, however I believe it greatly increases the configuration
potential of the @tldraw/editor while also providing a more accurate
reflection of what configuration options actually exist for
@tldraw/tldraw.

## Library changes

@tldraw/editor re-exports its dependencies and @tldraw/tldraw re-exports
@tldraw/editor.

- users of @tldraw/editor WITHOUT @tldraw/tldraw should almost always
only import things from @tldraw/editor.
- users of @tldraw/tldraw should almost always only import things from
@tldraw/tldraw.

- @tldraw/polyfills is merged into @tldraw/editor
- @tldraw/indices is merged into @tldraw/editor
- @tldraw/primitives is merged mostly into @tldraw/editor, partially
into @tldraw/tldraw
- @tldraw/file-format is merged into @tldraw/tldraw
- @tldraw/ui is merged into @tldraw/tldraw

Many (many) utils and other code is moved from the editor to tldraw. For
example, embeds now are entirely an feature of @tldraw/tldraw. The only
big chunk of code left in core is related to arrow handling.

## API Changes

The editor can now be used without tldraw's assets. We load them in
@tldraw/tldraw instead, so feel free to use whatever fonts or images or
whatever that you like with the editor.

All tools and shapes (except for the `Group` shape) are moved to
@tldraw/tldraw. This includes the `select` tool.

You should use the editor with at least one tool, however, so you now
also need to send in an `initialState` prop to the Editor /
<TldrawEditor> component indicating which state the editor should begin
in.

The `components` prop now also accepts `SelectionForeground`.

The complex selection component that we use for tldraw is moved to
@tldraw/tldraw. The default component is quite basic but can easily be
replaced via the `components` prop. We pass down our tldraw-flavored
SelectionFg via `components`.

Likewise with the `Scribble` component: the `DefaultScribble` no longer
uses our freehand tech and is a simple path instead. We pass down the
tldraw-flavored scribble via `components`.

The `ExternalContentManager` (`Editor.externalContentManager`) is
removed and replaced with a mapping of types to handlers.

- Register new content handlers with
`Editor.registerExternalContentHandler`.
- Register new asset creation handlers (for files and URLs) with
`Editor.registerExternalAssetHandler`

### Change Type

- [x] `major` — Breaking change

### Test Plan

- [x] Unit Tests
- [x] End to end tests

### Release Notes

- [@tldraw/editor] lots, wip
- [@tldraw/ui] gone, merged to tldraw/tldraw
- [@tldraw/polyfills] gone, merged to tldraw/editor
- [@tldraw/primitives] gone, merged to tldraw/editor / tldraw/tldraw
- [@tldraw/indices] gone, merged to tldraw/editor
- [@tldraw/file-format] gone, merged to tldraw/tldraw

---------

Co-authored-by: alex <alex@dytry.ch>
2023-07-17 21:22:34 +00:00
huppy-bot[bot] 43442070c2 Update CHANGELOG.md [skip ci] 2023-07-04 14:21:37 +00:00
David Sheldrick a63b536782 Update CHANGELOG.md [skip ci] 2023-06-28 11:53:57 +01:00
Steve Ruiz 5cb08711c1
Incorporate signia as @tldraw/state (#1620)
It tried to get out but we're dragging it back in. 

This PR brings [signia](https://github.com/tldraw/signia) back into
tldraw as @tldraw/state.

### Change Type

- [x] major

---------

Co-authored-by: David Sheldrick <d.j.sheldrick@gmail.com>
2023-06-20 13:31:26 +00:00
David Sheldrick a4fff303bf update lazyrepo 2023-06-05 18:32:32 +01:00
Steve Ruiz c1b84bf246
Rename tlstore to store (#1507)
This PR renames the `@tldraw/tlstore` package to `@tldraw/store`, mainly
to avoid confusion between `TLStore`. Will be doing the same with other
packages.

### Change Type

- [x] `major` — Breaking Change

### Release Notes

- Replace @tldraw/tlstore with @tldraw/store
2023-06-03 08:59:04 +00:00
Steve Ruiz 7307282f1f
Rename tlvalidate to validate (#1508)
This PR renames the @tldraw/tlvalidate package to @tldraw/validate. 

### Change Type

- [x] `major` — Breaking Change

### Release Notes

- Rename tlvalidate to validate
2023-06-03 08:27:44 +00:00
Steve Ruiz 53be923921
[refactor] record migrations (#1430)
This PR removes comments from our record types, makes initial version
optional, and unifies the order of initial / current version.

- Initial versions are zero by default
- If no current version is provided to `defineMigrations`, migrations
should be undefined
- Fixes TypeScript quirks in versioning (e.g. only initial version)

This PR also:
- Makes migrations optional when empty
- Removes reference to empty migrations

### Change Type

- [x] `major` — Breaking Change

### Test Plan

- [x] Unit Tests
- [ ] Webdriver tests

### Release Notes

- [tlschema] Improve `defineMigrations`
- [editor] Simplify migration definitions
2023-05-22 21:46:24 +00:00
alex 0bd6410d9f
avoid lazy race conditions (#1364)
We had a few issues with lazy race conditions failing CI. This came from
scripts configured to invoke lazy again, rather than through expressing
dependencies between scripts.

This diff reconfigures lazy to articulate these sorts of things as
dependencies instead of through self-invocation. Instead of having lots
of separate `build-package`, `build-docs`, etc commands, we now just
have a build command with package overrides to express more specific
options

### Change Type
- [x] `internal` — Any other changes that don't affect the published
package (will not publish a new version)

### Release Notes
[internal only]
2023-05-12 15:41:40 +00:00
David Sheldrick 5061240912
[chore] Bump nanoid (#1349)
I need to mock nanoid for the ephemeral state fuzz tests, to create
repeatable test runs. In order to do that properly it needs to have a
consistent version among all our packages.

At the same time I'm removing some old unused params in AppOptions

### Change Type

<!-- 💡 Indicate the type of change your pull request is. -->
<!-- 🤷‍♀️ If you're not sure, don't select anything -->
<!-- ✂️ Feel free to delete unselected options -->

<!-- To select one, put an x in the box: [x] -->

- [ ] `patch` — Bug Fix
- [ ] `minor` — New Feature
- [x] `major` — Breaking Change

- [ ] `dependencies` — Dependency Update (publishes a `patch` release,
for devDependencies use `internal`)

- [ ] `documentation` — Changes to the documentation only (will not
publish a new version)
- [ ] `tests` — Changes to any testing-related code only (will not
publish a new version)
- [ ] `internal` — Any other changes that don't affect the published
package (will not publish a new version)


### Release Notes

- Remove unused userId and instanceId props from AppOptions
2023-05-11 11:55:00 +00:00
David Sheldrick 67f5c25c73
[chore] move schema construction to tlschema package (#1334)
Our private tlsync package currently depends on the editor package,
which balloons the size of the cloudflare worker. It also makes it so
that any change to any package triggers a worker refresh, which makes
working on multiplayer stuff kinda miserable.

This is the first PR to fix that problem.

The second PR will need to resolve TLSyncClient's dependency on the
debugFlags somehow. Easiest would be to just remove the offending flag,
but we might want cross-bublic debug flags at some point in the future
so I'll try to find a low-cost way to make that happen while making
`tlsync` not depend on `editor`.

cc @TodePond since you added the flag in question
(`tldrawResetConnectionEveryPing`)

### Release Note

- internal moving stuff around
2023-05-09 14:40:58 +00:00
David Sheldrick f5c5b05dc7
[chore] update lazyrepo (#1211) 2023-05-02 12:25:26 +00:00
David Sheldrick 4c65cb8db4
[lite] upgrade lazyrepo (#1198)
* upgrade lazyrepo

* update lockfile + lazy.config
2023-04-25 14:32:17 +01:00
alex 29ed921c67 transfer-out: transfer out 2023-04-25 12:01:25 +01:00