Tldraw/packages/tldraw
Steve Ruiz 2e4989255c
export `UiEventsProvider` (#1774)
This PR exports the `UiEventsProvider` component (and renames
`useEvents` to `useUiEvents`). It also changes the `useUiEvents` hook to
work outside of the context. When used outside of the context, the hook
will no longer throw an error—though it will also have no effect.

### Change Type

- [x] `minor`

### Release Notes

- [@tldraw/tldraw] export ui events, so that UI hooks can work without
context
2023-07-28 09:24:58 +00:00
..
scripts tldraw zero - package shuffle (#1710) 2023-07-17 21:22:34 +00:00
src export `UiEventsProvider` (#1774) 2023-07-28 09:24:58 +00:00
CHANGELOG.md Update CHANGELOG.md [skip ci] 2023-06-28 11:53:57 +01:00
LICENSE
README.md
api-extractor.json
api-report.md export `UiEventsProvider` (#1774) 2023-07-28 09:24:58 +00:00
package.json tldraw zero - package shuffle (#1710) 2023-07-17 21:22:34 +00:00
setupTests.js tldraw zero - package shuffle (#1710) 2023-07-17 21:22:34 +00:00
tsconfig.json tldraw zero - package shuffle (#1710) 2023-07-17 21:22:34 +00:00

README.md

Signia

@tldraw/tldraw

This is the alpha version of tldraw. It is very much a work in progress.

Installation

Install the @tldraw/tldraw package using @alpha for the latest alpha release.

yarn add @tldraw/tldraw@alpha
# or
npm install @tldraw/tldraw@alpha
# or
pnpm i @tldraw/tldraw@alpha

Then start the local development server.

yarn dev
# or
npm run dev
# or
pnpm dev

Usage

An extremely minimal usage (without our UI) might look like this:

import { Tldraw } from '@tldraw/tldraw'
import '@tldraw/tldraw/styles-editor.css'
import '@tldraw/tldraw/styles-ui.css'

export default function () {
	return <Tldraw />
}

See the examples repo for more examples.

License

The source code in this repository (as well as our 2.0+ distributions and releases) are currently licensed under Apache-2.0. These licenses are subject to change in our upcoming 2.0 release. If you are planning to use tldraw in a commercial product, please reach out at hello@tldraw.com.