2024-07-15 16:08:42 +00:00
|
|
|
## 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';
|
2024-07-16 11:24:01 +00:00
|
|
|
import { TLStoreSchemaOptions } from 'tldraw';
|
2024-07-15 16:08:42 +00:00
|
|
|
import { TLStoreWithStatus } from 'tldraw';
|
|
|
|
import { TLUserPreferences } from 'tldraw';
|
|
|
|
|
|
|
|
// @public (undocumented)
|
|
|
|
export type RemoteTLStoreWithStatus = Exclude<TLStoreWithStatus, {
|
|
|
|
status: 'not-synced';
|
|
|
|
} | {
|
|
|
|
status: 'synced-local';
|
|
|
|
}>;
|
|
|
|
|
|
|
|
// @public (undocumented)
|
2024-07-16 11:24:01 +00:00
|
|
|
export function useMultiplayerDemo(options: UseMultiplayerDemoOptions & TLStoreSchemaOptions): RemoteTLStoreWithStatus;
|
2024-07-15 16:08:42 +00:00
|
|
|
|
|
|
|
// @public (undocumented)
|
|
|
|
export interface UseMultiplayerDemoOptions {
|
|
|
|
// @internal (undocumented)
|
|
|
|
host?: string;
|
|
|
|
// (undocumented)
|
|
|
|
roomId: string;
|
|
|
|
// (undocumented)
|
|
|
|
userPreferences?: Signal<TLUserPreferences>;
|
|
|
|
}
|
|
|
|
|
|
|
|
// @public (undocumented)
|
2024-07-16 11:24:01 +00:00
|
|
|
export function useMultiplayerSync(opts: UseMultiplayerSyncOptions & TLStoreSchemaOptions): RemoteTLStoreWithStatus;
|
2024-07-15 16:08:42 +00:00
|
|
|
|
|
|
|
// @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)
|
|
|
|
|
|
|
|
```
|