tldraw/packages/sync/api-report.md
alex 43811d54ba
bemo custom shape example (#4174)
Adds a custom shape bemo example. Instead of having to create a schema
ahead of time, here i've added bindingUtils/shapeUtils props to our sync
hooks to match the ones we have in the `<Tldraw />` component. Not 100%
about this though, I could easily be convinced to go with just the
schema prop.

### Change type

- [x] `other`
2024-07-16 11:24:01 +00:00

60 lines
1.6 KiB
Markdown

## API Report File for "@tldraw/sync"
> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
```ts
import { Editor } from 'tldraw';
import { Signal } from 'tldraw';
import { TLAssetStore } from 'tldraw';
import { TLStoreSchemaOptions } from 'tldraw';
import { TLStoreWithStatus } from 'tldraw';
import { TLUserPreferences } from 'tldraw';
// @public (undocumented)
export type RemoteTLStoreWithStatus = Exclude<TLStoreWithStatus, {
status: 'not-synced';
} | {
status: 'synced-local';
}>;
// @public (undocumented)
export function useMultiplayerDemo(options: UseMultiplayerDemoOptions & TLStoreSchemaOptions): RemoteTLStoreWithStatus;
// @public (undocumented)
export interface UseMultiplayerDemoOptions {
// @internal (undocumented)
host?: string;
// (undocumented)
roomId: string;
// (undocumented)
userPreferences?: Signal<TLUserPreferences>;
}
// @public (undocumented)
export function useMultiplayerSync(opts: UseMultiplayerSyncOptions & TLStoreSchemaOptions): RemoteTLStoreWithStatus;
// @public (undocumented)
export interface UseMultiplayerSyncOptions {
// (undocumented)
assets?: Partial<TLAssetStore>;
// (undocumented)
onEditorMount?: (editor: Editor) => void;
// (undocumented)
roomId?: string;
// (undocumented)
trackAnalyticsEvent?(name: string, data: {
[key: string]: any;
}): void;
// (undocumented)
uri: string;
// (undocumented)
userPreferences?: Signal<TLUserPreferences>;
}
export * from "@tldraw/sync-core";
// (No @packageDocumentation comment for this package)
```