Export history hooks (#2926)

This PR restores `useCanUndo` and `useCanRedo` to exports from tldraw.

### 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
bump-docs-content
Steve Ruiz 2024-02-22 19:25:08 +00:00 zatwierdzone przez GitHub
rodzic a8999aa0a0
commit e3ed84f1ff
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: B5690EEEBB952194
3 zmienionych plików z 64 dodań i 0 usunięć

Wyświetl plik

@ -2067,6 +2067,12 @@ export function useAssetUrls(): TLUiAssetUrls;
// @public (undocumented)
export function useBreakpoint(): number;
// @public (undocumented)
export function useCanRedo(): boolean;
// @public (undocumented)
export function useCanUndo(): boolean;
// @public (undocumented)
export function useCopyAs(): (ids: TLShapeId[], format?: TLCopyType) => void;

Wyświetl plik

@ -22979,6 +22979,62 @@
"parameters": [],
"name": "useBreakpoint"
},
{
"kind": "Function",
"canonicalReference": "@tldraw/tldraw!useCanRedo:function(1)",
"docComment": "/**\n * @public\n */\n",
"excerptTokens": [
{
"kind": "Content",
"text": "export declare function useCanRedo(): "
},
{
"kind": "Content",
"text": "boolean"
},
{
"kind": "Content",
"text": ";"
}
],
"fileUrlPath": "packages/tldraw/src/lib/ui/hooks/menu-hooks.ts",
"returnTypeTokenRange": {
"startIndex": 1,
"endIndex": 2
},
"releaseTag": "Public",
"overloadIndex": 1,
"parameters": [],
"name": "useCanRedo"
},
{
"kind": "Function",
"canonicalReference": "@tldraw/tldraw!useCanUndo:function(1)",
"docComment": "/**\n * @public\n */\n",
"excerptTokens": [
{
"kind": "Content",
"text": "export declare function useCanUndo(): "
},
{
"kind": "Content",
"text": "boolean"
},
{
"kind": "Content",
"text": ";"
}
],
"fileUrlPath": "packages/tldraw/src/lib/ui/hooks/menu-hooks.ts",
"returnTypeTokenRange": {
"startIndex": 1,
"endIndex": 2
},
"releaseTag": "Public",
"overloadIndex": 1,
"parameters": [],
"name": "useCanUndo"
},
{
"kind": "Function",
"canonicalReference": "@tldraw/tldraw!useCopyAs:function(1)",

Wyświetl plik

@ -1,5 +1,7 @@
/// <reference types="react" />
export { useCanRedo, useCanUndo } from './lib/ui/hooks/menu-hooks'
// eslint-disable-next-line local/no-export-star
export * from '@tldraw/editor'
export { Tldraw, type TldrawProps } from './lib/Tldraw'