Commit graph

195 commits

Author SHA1 Message Date
Mime Čuvalo
69a1c17b46
sdk: wires up tldraw to have licensing mechanisms (#4021)
For non-commercial usage of tldraw, this adds a watermark in the corner,
both for branding purposes and as an incentive for our enterprise
customers to purchase a license.

For commercial usage of tldraw, you add a license to the `<Tldraw
licenseKey={YOUR_LICENSE_KEY} />` component so that the watermark
doesn't show.

The license is a signed key that has various bits of information in it,
such as:
- license type
- hosts that the license is valid for
- whether it's an internal-only license
- expiry date

We check the license on load and show a watermark (or throw an error if
internal-only) if the license is not valid in a production environment.

This is a @MitjaBezensek, @Taha-Hassan-Git, @mimecuvalo joint
production! 🤜 🤛

### Change Type

<!--  Please select a 'Scope' label ️ -->

- [x] `sdk` — Changes the tldraw SDK
- [ ] `dotcom` — Changes the tldraw.com web app
- [ ] `docs` — Changes to the documentation, examples, or templates.
- [ ] `vs code` — Changes to the vscode plugin
- [ ] `internal` — Does not affect user-facing stuff

<!--  Please select a 'Type' label ️ -->

- [ ] `bugfix` — Bug fix
- [x] `feature` — New feature
- [ ] `improvement` — Improving existing features
- [ ] `chore` — Updating dependencies, other boring stuff
- [ ] `galaxy brain` — Architectural changes
- [ ] `tests` — Changes to any test code
- [ ] `tools` — Changes to infrastructure, CI, internal scripts,
debugging tools, etc.
- [ ] `dunno` — I don't know


### Test Plan

1. We will be dogfooding on staging.tldraw.com and tldraw.com itself
before releasing this.

### Release Notes

- SDK: wires up tldraw to have licensing mechanisms.

---------

Co-authored-by: Mitja Bezenšek <mitja.bezensek@gmail.com>
Co-authored-by: Taha <98838967+Taha-Hassan-Git@users.noreply.github.com>
Co-authored-by: Steve Ruiz <steveruizok@gmail.com>
2024-07-11 11:49:18 +00:00
huppy-bot[bot]
0b919ca46d Update CHANGELOG.md [skip ci] 2024-06-25 13:27:57 +00:00
alex
6cb797a074
Better generated docs for react components (#3930)
Before:
![Screenshot 2024-06-12 at 12 57
26](https://github.com/tldraw/tldraw/assets/1489520/2a9f6098-ef2a-4f52-88f5-d6e4311c067d)

After:
![Screenshot 2024-06-12 at 12 59
16](https://github.com/tldraw/tldraw/assets/1489520/51733c2a-a2b4-4084-a89a-85bce5b47672)

React components in docs now list their props, and appear under a new
"Component" section instead of randomly under either `Function` or
`Variable`. In order to have our docs generate this, a few criteria need
to be met:
1. They need to be tagged with the `@react` tsdoc tag
2. Their props need to be a simple type alias, typically to an
interface.

Both of these rules are enforced with a new lint rule - any component
tagged as `@public` will have these rules enforced.

### Change Type

- [x] `docs` — Changes to the documentation, examples, or templates.
- [x] `improvement` — Improving existing features
2024-06-13 13:09:27 +00:00
huppy-bot[bot]
176c17cbb7 Update CHANGELOG.md [skip ci] 2024-06-11 12:53:15 +00:00
alex
c9b7d328fe
Don't check api.json files into git (#3565)
These were needed when the docs lived in a different repo, but they
don't any more so we can get rid of them.

### Change Type
- [x] `internal` — Does not affect user-facing stuff
- [x] `chore` — Updating dependencies, other boring stuff
2024-04-24 15:58:26 +00:00
huppy-bot[bot]
e8b6749417 Update CHANGELOG.md [skip ci] 2024-04-23 11:47:53 +00:00
Steve Ruiz
4cc823e22e
Show a broken image for files without assets (#2990)
This PR shows a broken state for images or video shapes without assets.
It deletes assets when pasted content fails to generate a new asset for
the shape. It includes some mild refactoring to the image shape.
Previously, shapes that had no corresponding assets would be
transparent. This PR preserves the transparent state for shapes with
assets but without source data (ie loading assets).

After:
<img width="1062" alt="image"
src="https://github.com/tldraw/tldraw/assets/23072548/81ad6953-a45f-4cc2-9f39-559009621a82">
<img width="1158" alt="image"
src="https://github.com/tldraw/tldraw/assets/23072548/40d15158-d201-458f-b555-6f3d8708a283">

Before:
<img width="1178" alt="image"
src="https://github.com/tldraw/tldraw/assets/23072548/2bed5b3c-cf1f-48be-9c68-d15fdccb9c99">


### Change Type

- [x] `patch` — Bug fix

### Test Plan

1. Create an image / video
2. Delete its asset

### Release Notes

- Better handling of broken images / videos.
2024-03-01 18:16:27 +00:00
huppy-bot[bot]
ba6cba64c6 Update CHANGELOG.md [skip ci] 2024-02-29 18:28:45 +00:00
huppy-bot[bot]
ed1a031a69 Update CHANGELOG.md [skip ci] 2024-02-29 18:12:00 +00:00
huppy-bot[bot]
752c30ac62 Update CHANGELOG.md [skip ci] 2024-02-29 17:59:47 +00:00
huppy-bot[bot]
76949b62bd Update CHANGELOG.md [skip ci] 2024-02-29 17:45:47 +00:00
huppy-bot[bot]
a429a44e69 Update CHANGELOG.md [skip ci] 2024-02-29 16:41:45 +00:00
Lu Wilson
8bc108462a
Improve dialog appearance on small components (#2884)
This PR fixes and improves the appearance on dialogs on small tldraw
components, eg: Inline components.

Fixes TLD-2232


![image](https://github.com/tldraw/tldraw/assets/15892272/0fae3be9-4a52-45f3-a107-529e101aa4bd)


![image](https://github.com/tldraw/tldraw/assets/15892272/eb0ad67f-b390-4738-885a-65c968d7c989)

![image](https://github.com/tldraw/tldraw/assets/15892272/24946c06-4762-4e51-8113-797be2203f79)


![image](https://github.com/tldraw/tldraw/assets/15892272/0d646044-c8a5-4b05-9530-5f3758767d0d)

Marking as minor instead of patch because it adds a new prop to
`TldrawUiKbd`.

### Change Type

- [ ] `patch` — Bug fix
- [x] `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]
- [ ] `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. Open the "Inset editor" example.
2. Open the keyboard shortcuts dialog.
3. Shrink the window down.
4. Make sure the dialog remains visible at all window sizes.

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

### Release Notes

- Dev: Made default dialogs work better when used in small components.
2024-02-22 12:42:01 +00:00
huppy-bot[bot]
82527884ad Update CHANGELOG.md [skip ci] 2024-02-21 15:28:00 +00:00
Taha
7e673b5e37
E2e tests for the toolbar (#2709)
This PR adds some e2e tests for the toolbar.

Fixtures have been set up for the toolbar and style panel, and are
fairly barebones at the moment. Eventually each menu should have a
fixture associated with it, and all tests will use the class defined in
the fixtures file.

### Change Type

- [x] `tests` — Changes to any test code only[^2]

### Release Notes

- Add e2e tests for the toolbar
2024-02-16 14:15:00 +00:00
huppy-bot[bot]
c4ffa05b12 Update CHANGELOG.md [skip ci] 2024-02-13 14:27:20 +00:00
Steve Ruiz
a716ac36f6
[dx] Add docs to lazy caching. (#2672)
Previously, our docs site would always get rebuilt. Now it'll be
slightly smarter with lazy.

### Change Type

- [x] `internal` — Any other changes that don't affect the published
package[^2]
2024-01-28 14:19:19 +00:00
huppy-bot[bot]
35e74fdb12 Update CHANGELOG.md [skip ci] 2024-01-10 12:03:59 +00:00
huppy-bot[bot]
b95089c5ea Update CHANGELOG.md [skip ci] 2023-12-20 15:27:34 +00:00
Steve Ruiz
70a2eeb576
bump to beta (#2364)
This PR bumps versions to beta-0

### Change Type

- [x] `major` — Breaking change
2023-12-20 15:14:17 +00:00
Mitja Bezenšek
4e50c9c162
Start scrolling if we are dragging close to the window edges. (#2299)
Start scrolling when we get close to the edges of the window. This works
for brush selecting, translating, and resizing.


https://github.com/tldraw/tldraw/assets/2523721/4a5effc8-5445-411b-b317-36097233d36c


### Change Type

- [ ] `patch` — Bug fix
- [x] `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]
- [ ] `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. Select a shape.
2. Move it towards the edge of the window. The camera position should
change.
3. Also try resizing, brush selecting.

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

### Release Notes

- Adds the logic to change the camera position when you get close to the
edges of the window. This allows you to drag, resize, brush select past
the edges of the current viewport.

---------

Co-authored-by: Steve Ruiz <steveruizok@gmail.com>
2023-12-15 23:37:03 +00:00
huppy-bot[bot]
64dce02ba3 Update CHANGELOG.md [skip ci] 2023-12-12 14:50:43 +00:00
David Sheldrick
34cfb85169
no impure getters pt 11 (#2236)
follow up to #2189 

adds runtime warnings for deprecated fields. cleans up remaining fields
and usages. Adds a lint rule to prevent access to deprecated fields.
Adds a lint rule to prevent using getters.

### Change Type

- [x] `patch` — Bug fix
2023-11-16 15:34:56 +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
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
Lu Wilson
30b0a4d736
(2/2) Add content to Tools docs page. (#1721)
This PR adds some tools docs. There's more to come (eventually), but
this is what's finished so far.

This PR relies on this brivate one landing first:
https://github.com/tldraw/brivate/pull/2223

### Change Type

- [x] `documentation` — Changes to the documentation only[^2]

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

### Release Notes

- Tools docs.
2023-07-10 08:43:58 +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
78f93be1d7 Update lerna.json 2023-06-28 10:48:51 +01:00
Steve Ruiz
bb3d8e0de8 Update lerna.json 2023-06-28 10:45:29 +01:00
Steve Ruiz
887a5f9841 Update lerna.json 2023-06-28 10:40:52 +01:00
Steve Ruiz
23f4aca90d Update lerna.json 2023-06-26 16:55:58 +01:00
alex
29ed921c67 transfer-out: transfer out 2023-04-25 12:01:25 +01:00
with-heart
4fb4e3cded
chore: remove unused lerna.json (#865) 2022-07-29 15:19:33 +01:00
Steve Ruiz
da4d566bd8 v1.6.1 2022-02-03 11:19:12 +00:00
Steve Ruiz
4cee3203e6 v1.6.0 2022-01-31 15:06:01 +00:00
Steve Ruiz
7c82fbbb65 v1.5.2 2022-01-14 20:59:37 +00:00
Steve Ruiz
cb1f4e242e v1.5.1 2022-01-14 20:46:02 +00:00
Steve Ruiz
15784517e8 v1.5.0 2022-01-10 21:11:25 +00:00
Steve Ruiz
cc8aa89ed5 v1.4.3 2022-01-07 09:01:48 +00:00
Steve Ruiz
4b1137849a v1.4.2 2022-01-07 08:45:09 +00:00
Steve Ruiz
bc37947d5e Update lerna.json 2021-12-29 16:38:56 +00:00
Steve Ruiz
32a5511b3d v1.4.1 2021-12-28 11:50:33 +00:00
Steve Ruiz
f57d6bda94 v1.4.0 2021-12-27 20:29:12 +00:00
Steve Ruiz
dfe2e44c17 v1.3.0 2021-12-25 18:41:47 +00:00
Steve Ruiz
2f84abcc1e v1.2.10 2021-12-22 14:33:56 +00:00