@lexical/react
Version:
This package provides Lexical components and hooks for React applications.
10 lines (8 loc) • 965 B
JavaScript
/**
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
*/
;var r=require("react");const o=[["Cat","rgb(125, 50, 0)"],["Dog","rgb(100, 0, 0)"],["Rabbit","rgb(150, 0, 0)"],["Frog","rgb(200, 0, 0)"],["Fox","rgb(200, 75, 0)"],["Hedgehog","rgb(0, 75, 0)"],["Pigeon","rgb(0, 125, 0)"],["Squirrel","rgb(75, 100, 0)"],["Bear","rgb(125, 100, 0)"],["Tiger","rgb(0, 0, 150)"],["Leopard","rgb(0, 0, 200)"],["Zebra","rgb(0, 0, 250)"],["Wolf","rgb(0, 100, 150)"],["Owl","rgb(0, 100, 100)"],["Gull","rgb(100, 0, 100)"],["Squid","rgb(150, 0, 150)"]],e=o[Math.floor(Math.random()*o.length)],t=r.createContext({clientID:0,color:e[1],isCollabActive:!1,name:e[0],yjsDocMap:new Map});exports.CollaborationContext=t,exports.useCollaborationContext=function(o,e){const g=r.useContext(t);return null!=o&&(g.name=o),null!=e&&(g.color=e),g};