/*! * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the Microsoft Live Share SDK License. */ import { CanvasReferencePoint, IBrush, InkingTool, IPoint } from "@microsoft/live-share-canvas"; import React from "react"; import { IUseLiveCanvasResults } from "../types"; /** * React hook for using a Live Share Canvas `LiveCanvas` and `InkingManager`. * * @remarks * Use this hook to set up an `LiveCanvas` object, which is used for collaborative inking. It takes several input parameters, including a unique key, * a reference to a canvas element, and various settings for the inking tool, brush, and canvas offset and scale. * This hook can only be used in a child component of `` or ``. * * @param uniqueKey the unique key for the `LiveCanvas`. If one does not yet exist, a new one. * @param canvasElementRef the HTML div element ref or document ID that `InkingManager` will use for canvas-based collaboration. * @param active Optional. Stateful boolean that will activate/de-activate `InkingManager` accordingly. * @param tool Optional. Stateful enum for what tool to use in the `InkingManager`. * @param lineBrush Optional. Stateful lineBrush object for the selected lineBrush options to use in `InkingManager`. * @param offset Optional. Stateful offset point to use in the `InkingManager`. Gets the viewport offset. Defaults to 0,0. * @param scale Optional. Stateful scale number to use in the `InkingManager`. Defaults to 1 and must be greater than 0. * @param referencePoint Optional. Stateful reference point enum to use in the `InkingManger`. Defaults to "center". * @param isCursorShared Optional. Stateful boolean flag for whether cursor should be shared in `LiveCanvas`. Defaults to false. * @param localUserPictureUrl Optional. url string for the local user to display alongside their cursor. Defaults to undefined. * @returns IUseLiveCanvasResults object that contains the `liveCanvas` data object and `inkingManager`. */ export declare function useLiveCanvas(uniqueKey: string, canvasElementRef: React.RefObject | string, active?: boolean, tool?: InkingTool, lineBrush?: IBrush, offset?: IPoint, scale?: number, referencePoint?: CanvasReferencePoint, isCursorShared?: boolean, localUserPictureUrl?: string): IUseLiveCanvasResults; //# sourceMappingURL=useLiveCanvas.d.ts.map