MCPcopy Create free account

hub / github.com/liveblocks/liveblocks / functions

Functions8,448 in github.com/liveblocks/liveblocks

↓ 1,886 callersMethodget
()
packages/liveblocks-core/src/lib/signals.ts:131
↓ 1,161 callersMethodmap
* Creates an array populated with the results of calling a provided function on every element. * @param callback Function that is called for every
packages/liveblocks-core/src/crdts/LiveList.ts:1348
↓ 885 callersMethodjson
()
packages/liveblocks-core/src/lib/IncrementalJsonParser.ts:61
↓ 589 callersMethodpush
(value: T | readonly T[])
packages/liveblocks-core/src/lib/Deque.ts:46
↓ 534 callersMethodset
(newValue: T | ((oldValue: T) => T))
packages/liveblocks-core/src/lib/signals.ts:255
↓ 510 callersMethodpop
()
packages/liveblocks-core/src/lib/Deque.ts:58
↓ 427 callersFunctionwaitForJson
( oneOrMorePages: Page | Page[], selector: IDSelector, expectedValue: Json | undefined, options?: { ti
e2e/next-sandbox/test/utils.ts:162
↓ 340 callersFunctioncx
(...args: ClassValue[])
examples/nextjs-ai-dashboard-reports/src/lib/utils.ts:6
↓ 334 callersFunctionnanoid
(t = 21)
packages/liveblocks-core/src/lib/nanoid.ts:3
↓ 322 callersMethodfilter
* Creates an array with all elements that pass the test implemented by the provided function. * @param predicate Function to test each element of t
packages/liveblocks-core/src/crdts/LiveList.ts:1264
↓ 299 callersMethoddelete
(key: string)
packages/liveblocks-server/src/MetadataDB.ts:29
↓ 251 callersMethodsubscribe
(callback: Callback<void>)
packages/liveblocks-core/src/lib/signals.ts:132
↓ 249 callersMethodupdate
* Adds or updates multiple properties at once with an object. * @param patch The object used to overrides properties
packages/liveblocks-core/src/crdts/LiveObject.ts:701
↓ 241 callersMethodfrom
(res: Response)
packages/liveblocks-node/src/client.ts:3713
↓ 239 callersMethodfrom
( // prettier-ignore ...args: [ ...signals: { [K in keyof Ts]: ISignal<Ts[K]> }, transform
packages/liveblocks-core/src/lib/signals.ts:305
↓ 209 callersMethodfind
* Returns the first element that satisfies the provided testing function. * @param predicate Function to execute on each value. * @returns The v
packages/liveblocks-core/src/crdts/LiveList.ts:1278
↓ 205 callersMethodincludes
* Whether the given value is present, by identity. O(log n) plus the length * of any run of items that share its sort key (normally 1). Bisects on
packages/liveblocks-core/src/lib/SortedList.ts:218
↓ 201 callersFunctioncreateContextsForTest
( { userId, ...options }: Omit<ClientOptions, "authEndpoint" | "publicApiKey"> & { userId?: st
packages/liveblocks-react/src/__tests__/_utils.tsx:69
↓ 189 callersMethodkeys
* Returns a new Iterator object that contains the keys for each element.
packages/liveblocks-core/src/crdts/LiveMap.ts:398
↓ 188 callersMethodtoJSON
Returns a plain object snapshot with `nodes` and `edges` arrays.
packages/liveblocks-react-flow/src/node.ts:50
↓ 183 callersFunctionexpectStorage
(data: ToJson<S>)
packages/liveblocks-core/src/__tests__/_devserver.ts:203
↓ 179 callersMethodlog
()
tools/liveblocks-cli/test/plugins/_generateFullTestSuite.ts:985
↓ 175 callersMethoderror
(socket: MockWebSocket, event: IWebSocketEvent)
packages/liveblocks-core/src/__tests__/_MockWebSocketServer.ts:110
↓ 172 callersFunctionassert
(immRoot1: ToJson<S>, immRoot2: ToJson<S> = immRoot1)
packages/liveblocks-core/e2e/utils.ts:375
↓ 171 callersMethodsend
(data: string)
packages/liveblocks-core/src/types/IWebSocket.ts:32
↓ 170 callersMethodapplyOps
* Applies a batch of Ops.
packages/liveblocks-server/src/Storage.ts:158
↓ 170 callersFunctiondummyThreadData
({ roomId, ...overrides }: AtLeast<ThreadDataWithDeleteInfo, "roomId">)
packages/liveblocks-react/src/__tests__/_dummies.ts:18
↓ 161 callersMethodaddEventListener
(type: "close", listener: (this: IWebSocketInstance, ev: IWebSocketCloseEvent) => unknown)
packages/liveblocks-core/src/types/IWebSocket.ts:23
↓ 161 callersFunctionrunTest
( optionsOrTestFn: RunTestOptions | TestFn<TDriver>, maybeTestFn?: TestFn<TDriver> )
tools/liveblocks-cli/test/plugins/_generateFullTestSuite.ts:1037
↓ 161 callersFunctionrunTest
( optionsOrTestFn: RunTestOptions | TestFn<TDriver>, maybeTestFn?: TestFn<TDriver> )
packages/liveblocks-server/test/plugins/_generateFullTestSuite.ts:1032
↓ 159 callersMethodadd
* Adds a new item to the sorted list, such that it remains sorted. * Returns the index where the item was inserted.
packages/liveblocks-core/src/lib/SortedList.ts:79
↓ 157 callersFunctionquote
(value: string | undefined)
packages/liveblocks-server/src/lib/text.ts:29
↓ 153 callersMethodset
(key: K, value: V)
packages/liveblocks-server/src/lib/UniqueMap.ts:60
↓ 145 callersMethodremoveEventListener
(type: "close", listener: (this: IWebSocketInstance, ev: IWebSocketCloseEvent) => unknown)
packages/liveblocks-core/src/types/IWebSocket.ts:27
↓ 143 callersMethodclose
()
packages/liveblocks-core/src/types/IWebSocket.ts:31
↓ 139 callersMethodforEach
* Executes a provided function once per each key/value pair in the Map object, in insertion order. * @param callback Function to execute for each e
packages/liveblocks-core/src/crdts/LiveMap.ts:435
↓ 137 callersFunctionurl
( strings: TemplateStringsArray, ...values: string[] )
packages/liveblocks-core/src/lib/url.ts:70
↓ 136 callersFunctionassert
(content: string, assertions: (root: HTMLElement) => void)
packages/liveblocks-react-ui/src/primitives/__tests__/Markdown.test.tsx:73
↓ 135 callersFunctionfetch
(req, server)
tools/liveblocks-cli/src/dev-server/index.ts:239
↓ 134 callersMethodset
* Adds or updates an element with a specified key and a value. * @param key The key of the element to add. Should be a string. * @param value Th
packages/liveblocks-core/src/crdts/LiveMap.ts:255
↓ 132 callersFunctionNOT_IMPLEMENTED
( message = "This endpoint isn't implemented in the Liveblocks dev server." )
tools/liveblocks-cli/src/dev-server/responses.ts:48
↓ 131 callersFunctionuseThreads
( options: UseThreadsOptions<TM> = {} )
packages/liveblocks-react/src/room.tsx:1816
↓ 128 callersFunctioncn
(...inputs: ClassValue[])
examples/nextjs-ai-elements-realtime/lib/utils.ts:4
↓ 128 callersMethodrun
(m: Model, r: Real)
packages/liveblocks-core/e2e/list-property.test.ts:148
↓ 124 callersMethodset_child
* Insert a child node with the given id. * * If allowOverwrite=false (default): throw if a node with this id exists. * If allowOverwrite=true
packages/liveblocks-server/src/interfaces/IStorageDriver.ts:200
↓ 123 callersMethodhas
* Returns a boolean indicating whether an element with the specified key exists or not. * @param key The key of the element to test for presence.
packages/liveblocks-core/src/crdts/LiveMap.ts:305
↓ 118 callersMethodentries
* Returns a new Iterator object that contains the [key, value] pairs for each element.
packages/liveblocks-core/src/crdts/LiveMap.ts:358
↓ 117 callersFunctioncn
(...inputs: ClassValue[])
examples/nextjs-ai-spreadsheet/lib/utils.ts:4
↓ 113 callersMethodallow
(roomIdOrPattern: string, newPerms: readonly Permission[])
packages/liveblocks-node/src/Session.ts:117
↓ 112 callersMethodgetOrCreate
* Gets the value at the given key, or creates it. * * Difference from normal Map: if the key does not exist, it will be created * on the fly
packages/liveblocks-core/src/lib/DefaultMap.ts:38
↓ 112 callersMethodpost
* Makes a POST request, and return the JSON response. * Will throw if the reponse is a non-2xx.
packages/liveblocks-core/src/api-client.ts:2280
↓ 110 callersMethodget
(key: string)
packages/liveblocks-server/src/MetadataDB.ts:25
↓ 110 callersFunctionuseMutation
(callback: F, deps: readonly unknown[])
packages/liveblocks-react/src/room.tsx:1487
↓ 107 callersFunctiondummySubscriptionData
( overrides: Partial<SubscriptionData> )
packages/liveblocks-react/src/__tests__/_dummies.ts:133
↓ 98 callersMethodtoString
()
packages/liveblocks-node/src/client.ts:3705
↓ 98 callersFunctionwaitUntilEqualOnAllPages
( pages: [Page, Page], selector: IDSelector, options?: { maxTries?: number; interval?: number;
e2e/next-sandbox/test/utils.ts:307
↓ 95 callersFunctionasPos
* Checks that a str is a valid Pos, and converts it to the nearest valid one * if not.
packages/liveblocks-core/src/lib/position.ts:414
↓ 94 callersFunctionparse
(input: string)
packages/liveblocks-core/src/lib/__tests__/IncrementalJsonParser.test.ts:7
↓ 92 callersMethodappend
(delta: string)
packages/liveblocks-core/src/lib/IncrementalJsonParser.ts:73
↓ 92 callersMethodfrom_response
(cls, response: httpx.Response)
packages/liveblocks-python/liveblocks/errors.py:22
↓ 90 callersMethodDANGEROUSLY_reset_nodes
* Delete all CRDT nodes and replace them with the given document. * Does NOT affect metadata, actor IDs, or Yjs updates. * Invalidates the drive
packages/liveblocks-server/src/interfaces/IStorageDriver.ts:261
↓ 90 callersFunctioncn
(...args: (string | number | boolean | undefined | null)[])
packages/liveblocks-react-ui/src/utils/cn.ts:4
↓ 90 callersFunctionuseSelf
( maybeSelector?: (me: User<P, U>) => T, isEqual?: (prev: T | null, curr: T | null) => boolean )
packages/liveblocks-react/src/room.tsx:1105
↓ 88 callersMethodpush
* Adds one element to the end of the LiveList. * @param element The element to add to the end of the LiveList.
packages/liveblocks-core/src/crdts/LiveList.ts:988
↓ 86 callersMethodaddState
* Define an explicit finite state in the state machine.
packages/liveblocks-core/src/lib/fsm.ts:379
↓ 86 callersMethodfindMany
* Returns all threads matching a given roomId and query. If roomId is not * specified, it will return all threads matching the query, across all
packages/liveblocks-react/src/ThreadDB.ts:186
↓ 86 callersMethodget_node
* Return the node with the given id, or undefined if no such node exists. * Must always return a valid root node for id="root", even if empty.
packages/liveblocks-server/src/interfaces/IStorageDriver.ts:132
↓ 86 callersFunctionuseClient
()
packages/liveblocks-react/src/contexts.ts:32
↓ 85 callersMethodfrom_dict
(cls, src_dict: Mapping[str, Any])
packages/liveblocks-python/liveblocks/models/room.py:94
↓ 81 callersFunctionnn
( value: T, errmsg: string = "Expected value to be non-nullable" )
packages/liveblocks-core/src/lib/assert.ts:56
↓ 80 callersMethodprepareSession
* Prepares a new session to authorize a user to access Liveblocks. * * IMPORTANT: * Always make sure that you trust the user making the reque
packages/liveblocks-node/src/client.ts:931
↓ 79 callersMethodsome
* Tests whether at least one element in the LiveList passes the test implemented by the provided function. * @param predicate Function to test for
packages/liveblocks-core/src/crdts/LiveList.ts:1359
↓ 78 callersMethodremove
(pk: PK)
packages/liveblocks-core/src/lib/TreePool.ts:260
↓ 78 callersFunctionshallow
(a: unknown, b: unknown)
packages/liveblocks-core/src/lib/shallow.ts:45
↓ 76 callersMethodconnect
* Call this method to try to connect to a WebSocket. This only has an effect * if the machine is idle at the moment, otherwise this is a no-op.
packages/liveblocks-core/src/connection.ts:1054
↓ 76 callersFunctioncreateDummyAdapter
(options?: { botUserId?: string; resolveUsers?: AdapterConfig["resolveUsers"]; resolveGroupsInfo?: Adapt
packages/liveblocks-chat-sdk-adapter/src/__tests__/index.test.ts:73
↓ 75 callersFunctionlist
( id: string, parentId: string, parentKey: string )
packages/liveblocks-server/test/storage/utils.ts:38
↓ 75 callersMethodvalues
* Returns a new Iterator object that contains the values for each element.
packages/liveblocks-core/src/crdts/LiveMap.ts:405
↓ 73 callersFunctionassert
( condition: boolean, message: string, ...args: unknown[] )
tools/liveblocks-cli/test/plugins/_generateFullTestSuite.ts:166
↓ 73 callersFunctionassert
( condition: boolean, message: string, ...args: unknown[] )
packages/liveblocks-server/test/plugins/_generateFullTestSuite.ts:161
↓ 73 callersMethodget_child_at
* Return the id of the child node at (parentId, parentKey), or undefined if * none. Only checks child nodes registered via set_child, NOT static da
packages/liveblocks-server/src/interfaces/IStorageDriver.ts:171
↓ 70 callersMethodresolve
* Resolve all the IDs in the batch. * It can only be called once.
packages/liveblocks-emails/src/lib/batch-resolvers.ts:79
↓ 69 callersMethodauthorize
* Call this to authorize the session to access Liveblocks. Note that this * will return a Liveblocks "access token". Anyone that obtains such acces
packages/liveblocks-node/src/Session.ts:168
↓ 68 callersFunctionmakePosition
* Given two positions, returns the position value that lies in the middle. * When given only a high bound, computes the canonical position "before" i
packages/liveblocks-core/src/lib/position.ts:92
↓ 67 callersFunctioncreateClient
( options: ClientOptions<U> )
packages/liveblocks-core/src/client.ts:634
↓ 66 callersMethodlog
(level: LogLevel, context: JsonObject, arg: string | Error)
packages/liveblocks-server/src/lib/Logger.ts:127
↓ 66 callersFunctionmockGetThreads
( resolver: HttpResponseResolver< { roomId: string }, never, { data: ThreadData[]; i
packages/liveblocks-react/src/__tests__/_restMocks.ts:19
↓ 65 callersMethodaddTransitions
* Define all allowed outgoing transitions for a state. * * The targets for each event can be defined as a function which returns the * next s
packages/liveblocks-core/src/lib/fsm.ts:525
↓ 65 callersFunctioncreateTestableRoom
* Sets up a Room instance that, when you call `.connect()` on it, will * successfully connect to the WebSocket server `wss`, which you can * control
packages/liveblocks-core/src/__tests__/room.mockserver.test.ts:124
↓ 65 callersFunctiondummyThreadInboxNotificationData
({ roomId, ...overrides }: AtLeast< InboxNotificationThreadData, "roomId" >)
packages/liveblocks-react/src/__tests__/_dummies.ts:111
↓ 65 callersFunctionwaitUntilStatus
( room: OpaqueRoom, targetStatus: Status, timeout = 1000 )
packages/liveblocks-core/src/__tests__/_waitUtils.ts:10
↓ 64 callersFunctionexpectJson
( page: Page, selector: IDSelector, expectedValue: Json | undefined )
e2e/next-sandbox/test/utils.ts:211
↓ 63 callersMethodgetRoom
* Returns a room with the given id. * @param roomId The id of the room to return. * @returns The room with the given id. * @param options.sig
packages/liveblocks-node/src/client.ts:1266
↓ 63 callersMethodstart
()
examples/nextjs-ai-elements-realtime/components/ai-elements/prompt-input.tsx:1061
↓ 61 callersFunctionrootObj
(data: JsonObject = {})
tools/liveblocks-cli/test/plugins/_generateFullTestSuite.ts:385
↓ 61 callersFunctionrootObj
(data: JsonObject = {})
packages/liveblocks-server/test/plugins/_generateFullTestSuite.ts:380
↓ 61 callersFunctionuseInboxNotifications
* Returns the inbox notifications for the current user. * * @example * const { inboxNotifications, error, isLoading } = useInboxNotifications();
packages/liveblocks-react/src/liveblocks.tsx:1967
↓ 60 callersFunctioninfer
(x: T)
packages/liveblocks-core/test-d/InferFromSchema.test-d.ts:14
↓ 60 callersFunctionserverMessage
( message: ServerMsg<JsonObject, BaseUserMeta, Json> )
packages/liveblocks-core/src/__tests__/_MockWebSocketServer.setup.ts:624
↓ 60 callersFunctionwaitUntilFlushed
()
e2e/next-sandbox/test/utils.ts:204
next →1–100 of 8,448, ranked by callers