@liveblocks/react 2.10.0 → 2.10.1-react19rc

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (33) hide show
  1. package/dist/_private.d.mts +1 -1
  2. package/dist/_private.d.ts +1 -1
  3. package/dist/_private.js +4 -6
  4. package/dist/_private.js.map +1 -1
  5. package/dist/_private.mjs +1 -3
  6. package/dist/_private.mjs.map +1 -1
  7. package/dist/{chunk-WJLAYICR.js → chunk-3MM4G6XB.js} +729 -694
  8. package/dist/chunk-3MM4G6XB.js.map +1 -0
  9. package/dist/{chunk-PJN3AKDH.js → chunk-6Z2BEGKA.js} +2 -2
  10. package/dist/{chunk-LMENFXCS.mjs → chunk-A7GJNN4L.mjs} +723 -688
  11. package/dist/chunk-A7GJNN4L.mjs.map +1 -0
  12. package/dist/{chunk-PXKGBTHT.mjs → chunk-ZGTP66ZG.mjs} +2 -2
  13. package/dist/index.d.mts +2 -2
  14. package/dist/index.d.ts +2 -2
  15. package/dist/index.js +4 -4
  16. package/dist/index.js.map +1 -1
  17. package/dist/index.mjs +4 -4
  18. package/dist/index.mjs.map +1 -1
  19. package/dist/{liveblocks-X3qYz1Vg.d.mts → liveblocks-SAVcXwMX.d.mts} +105 -60
  20. package/dist/{liveblocks-X3qYz1Vg.d.ts → liveblocks-SAVcXwMX.d.ts} +105 -60
  21. package/dist/{suspense-pF_E-0CC.d.mts → suspense-W7Cp9ygn.d.ts} +18 -13
  22. package/dist/{suspense-qQ0vzMgn.d.ts → suspense-vGJE9Mgq.d.mts} +18 -13
  23. package/dist/suspense.d.mts +2 -2
  24. package/dist/suspense.d.ts +2 -2
  25. package/dist/suspense.js +4 -4
  26. package/dist/suspense.js.map +1 -1
  27. package/dist/suspense.mjs +4 -4
  28. package/dist/suspense.mjs.map +1 -1
  29. package/package.json +4 -4
  30. package/dist/chunk-LMENFXCS.mjs.map +0 -1
  31. package/dist/chunk-WJLAYICR.js.map +0 -1
  32. /package/dist/{chunk-PJN3AKDH.js.map → chunk-6Z2BEGKA.js.map} +0 -0
  33. /package/dist/{chunk-PXKGBTHT.mjs.map → chunk-ZGTP66ZG.mjs.map} +0 -0
@@ -1,4 +1,4 @@
1
- export { C as CreateThreadError, g as getUmbrellaStoreForClient, s as selectThreads } from './liveblocks-X3qYz1Vg.mjs';
1
+ export { C as CreateThreadError, g as getUmbrellaStoreForClient } from './liveblocks-SAVcXwMX.mjs';
2
2
  import '@liveblocks/client';
3
3
  import '@liveblocks/core';
4
4
  import 'react';
@@ -1,4 +1,4 @@
1
- export { C as CreateThreadError, g as getUmbrellaStoreForClient, s as selectThreads } from './liveblocks-X3qYz1Vg.js';
1
+ export { C as CreateThreadError, g as getUmbrellaStoreForClient } from './liveblocks-SAVcXwMX.js';
2
2
  import '@liveblocks/client';
3
3
  import '@liveblocks/core';
4
4
  import 'react';
package/dist/_private.js CHANGED
@@ -3,16 +3,15 @@
3
3
 
4
4
 
5
5
 
6
-
7
- var _chunkWJLAYICRjs = require('./chunk-WJLAYICR.js');
6
+ var _chunk3MM4G6XBjs = require('./chunk-3MM4G6XB.js');
8
7
 
9
8
  // src/use-mention-suggestions.ts
10
9
  var _core = require('@liveblocks/core');
11
10
  var _react = require('react'); var _react2 = _interopRequireDefault(_react);
12
11
  var MENTION_SUGGESTIONS_DEBOUNCE = 500;
13
12
  function useMentionSuggestions(search) {
14
- const client = _chunkWJLAYICRjs.useClient.call(void 0, );
15
- const room = _chunkWJLAYICRjs._useRoom.call(void 0, );
13
+ const client = _chunk3MM4G6XBjs.useClient.call(void 0, );
14
+ const room = _chunk3MM4G6XBjs._useRoom.call(void 0, );
16
15
  const [mentionSuggestions, setMentionSuggestions] = _react2.default.useState();
17
16
  const lastInvokedAt = _react2.default.useRef();
18
17
  _react2.default.useEffect(() => {
@@ -64,6 +63,5 @@ function useMentionSuggestions(search) {
64
63
 
65
64
 
66
65
 
67
-
68
- exports.CreateThreadError = _chunkWJLAYICRjs.CreateThreadError; exports.getUmbrellaStoreForClient = _chunkWJLAYICRjs.getUmbrellaStoreForClient; exports.selectThreads = _chunkWJLAYICRjs.selectThreads; exports.useMentionSuggestions = useMentionSuggestions;
66
+ exports.CreateThreadError = _chunk3MM4G6XBjs.CreateThreadError; exports.getUmbrellaStoreForClient = _chunk3MM4G6XBjs.getUmbrellaStoreForClient; exports.useMentionSuggestions = useMentionSuggestions;
69
67
  //# sourceMappingURL=_private.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/use-mention-suggestions.ts"],"names":["mentionSuggestions"],"mappings":";;;;;;;;;AAAA,SAAS,WAAW,iBAAiB;AACrC,OAAO,WAAW;AAKlB,IAAM,+BAA+B;AAQ9B,SAAS,sBAAsB,QAAiB;AACrD,QAAM,SAAS,UAAU;AAEzB,QAAM,OAAO,SAAQ;AACrB,QAAM,CAAC,oBAAoB,qBAAqB,IAC9C,MAAM,SAAmB;AAC3B,QAAM,gBAAgB,MAAM,OAAe;AAE3C,QAAM,UAAU,MAAM;AACpB,UAAM,0BAA0B,OAAO,SAAS,EAAE;AAClD,UAAM,4BACJ,OAAO,SAAS,EAAE;AAEpB,QAAI,WAAW,UAAa,CAAC,2BAA2B;AACtD;AAAA,IACF;AAEA,UAAM,gCAAgC,EAAE,MAAM,QAAQ,QAAQ,KAAK,GAAG;AACtE,UAAM,6BAA6B,UAAU,6BAA6B;AAC1E,QAAI;AACJ,QAAI,aAAa;AAEjB,UAAM,wBAAwB,YAAY;AACxC,UAAI;AACF,sBAAc,UAAU,YAAY,IAAI;AACxC,cAAMA,sBAAqB,MAAM;AAAA,UAC/B;AAAA,QACF;AAEA,YAAI,CAAC,YAAY;AACf,gCAAsBA,mBAAkB;AACxC,kCAAwB;AAAA,YACtB;AAAA,YACAA;AAAA,UACF;AAAA,QACF;AAAA,MACF,SAAS,OAAO;AACd,gBAAQ,MAAO,OAAiB,OAAO;AAAA,MACzC;AAAA,IACF;AAEA,QAAI,wBAAwB,IAAI,0BAA0B,GAAG;AAE3D;AAAA,QACE,wBAAwB,IAAI,0BAA0B;AAAA,MACxD;AAAA,IACF,WACE,CAAC,cAAc,WACf,KAAK,IAAI,YAAY,IAAI,IAAI,cAAc,OAAO,IAChD,8BACF;AAGA,WAAK,sBAAsB;AAAA,IAC7B,OAAO;AAEL,wBAAkB,OAAO,WAAW,MAAM;AACxC,aAAK,sBAAsB;AAAA,MAC7B,GAAG,4BAA4B;AAAA,IACjC;AAEA,WAAO,MAAM;AACX,mBAAa;AACb,aAAO,aAAa,eAAe;AAAA,IACrC;AAAA,EACF,GAAG,CAAC,QAAQ,KAAK,IAAI,MAAM,CAAC;AAE5B,SAAO;AACT","sourcesContent":["import { kInternal, stringify } from \"@liveblocks/core\";\nimport React from \"react\";\n\nimport { useClient } from \"./liveblocks\";\nimport { useRoom } from \"./room\";\n\nconst MENTION_SUGGESTIONS_DEBOUNCE = 500;\n\n/**\n * @private For internal use only. Do not rely on this hook.\n *\n * Simplistic debounced search, we don't need to worry too much about deduping\n * and race conditions as there can only be one search at a time.\n */\nexport function useMentionSuggestions(search?: string) {\n const client = useClient();\n\n const room = useRoom();\n const [mentionSuggestions, setMentionSuggestions] =\n React.useState<string[]>();\n const lastInvokedAt = React.useRef<number>();\n\n React.useEffect(() => {\n const mentionSuggestionsCache = client[kInternal].mentionSuggestionsCache;\n const resolveMentionSuggestions =\n client[kInternal].resolveMentionSuggestions;\n\n if (search === undefined || !resolveMentionSuggestions) {\n return;\n }\n\n const resolveMentionSuggestionsArgs = { text: search, roomId: room.id };\n const mentionSuggestionsCacheKey = stringify(resolveMentionSuggestionsArgs);\n let debounceTimeout: number | undefined;\n let isCanceled = false;\n\n const getMentionSuggestions = async () => {\n try {\n lastInvokedAt.current = performance.now();\n const mentionSuggestions = await resolveMentionSuggestions(\n resolveMentionSuggestionsArgs\n );\n\n if (!isCanceled) {\n setMentionSuggestions(mentionSuggestions);\n mentionSuggestionsCache.set(\n mentionSuggestionsCacheKey,\n mentionSuggestions\n );\n }\n } catch (error) {\n console.error((error as Error)?.message);\n }\n };\n\n if (mentionSuggestionsCache.has(mentionSuggestionsCacheKey)) {\n // If there are already cached mention suggestions, use them immediately.\n setMentionSuggestions(\n mentionSuggestionsCache.get(mentionSuggestionsCacheKey)\n );\n } else if (\n !lastInvokedAt.current ||\n Math.abs(performance.now() - lastInvokedAt.current) >\n MENTION_SUGGESTIONS_DEBOUNCE\n ) {\n // If on the debounce's leading edge (either because it's the first invokation or enough\n // time has passed since the last debounce), get mention suggestions immediately.\n void getMentionSuggestions();\n } else {\n // Otherwise, wait for the debounce delay.\n debounceTimeout = window.setTimeout(() => {\n void getMentionSuggestions();\n }, MENTION_SUGGESTIONS_DEBOUNCE);\n }\n\n return () => {\n isCanceled = true;\n window.clearTimeout(debounceTimeout);\n };\n }, [client, room.id, search]);\n\n return mentionSuggestions;\n}\n"]}
1
+ {"version":3,"sources":["../src/use-mention-suggestions.ts"],"names":["mentionSuggestions"],"mappings":";;;;;;;;AAAA,SAAS,WAAW,iBAAiB;AACrC,OAAO,WAAW;AAKlB,IAAM,+BAA+B;AAQ9B,SAAS,sBAAsB,QAAiB;AACrD,QAAM,SAAS,UAAU;AAEzB,QAAM,OAAO,SAAQ;AACrB,QAAM,CAAC,oBAAoB,qBAAqB,IAC9C,MAAM,SAAmB;AAC3B,QAAM,gBAAgB,MAAM,OAAe;AAE3C,QAAM,UAAU,MAAM;AACpB,UAAM,0BAA0B,OAAO,SAAS,EAAE;AAClD,UAAM,4BACJ,OAAO,SAAS,EAAE;AAEpB,QAAI,WAAW,UAAa,CAAC,2BAA2B;AACtD;AAAA,IACF;AAEA,UAAM,gCAAgC,EAAE,MAAM,QAAQ,QAAQ,KAAK,GAAG;AACtE,UAAM,6BAA6B,UAAU,6BAA6B;AAC1E,QAAI;AACJ,QAAI,aAAa;AAEjB,UAAM,wBAAwB,YAAY;AACxC,UAAI;AACF,sBAAc,UAAU,YAAY,IAAI;AACxC,cAAMA,sBAAqB,MAAM;AAAA,UAC/B;AAAA,QACF;AAEA,YAAI,CAAC,YAAY;AACf,gCAAsBA,mBAAkB;AACxC,kCAAwB;AAAA,YACtB;AAAA,YACAA;AAAA,UACF;AAAA,QACF;AAAA,MACF,SAAS,OAAO;AACd,gBAAQ,MAAO,OAAiB,OAAO;AAAA,MACzC;AAAA,IACF;AAEA,QAAI,wBAAwB,IAAI,0BAA0B,GAAG;AAE3D;AAAA,QACE,wBAAwB,IAAI,0BAA0B;AAAA,MACxD;AAAA,IACF,WACE,CAAC,cAAc,WACf,KAAK,IAAI,YAAY,IAAI,IAAI,cAAc,OAAO,IAChD,8BACF;AAGA,WAAK,sBAAsB;AAAA,IAC7B,OAAO;AAEL,wBAAkB,OAAO,WAAW,MAAM;AACxC,aAAK,sBAAsB;AAAA,MAC7B,GAAG,4BAA4B;AAAA,IACjC;AAEA,WAAO,MAAM;AACX,mBAAa;AACb,aAAO,aAAa,eAAe;AAAA,IACrC;AAAA,EACF,GAAG,CAAC,QAAQ,KAAK,IAAI,MAAM,CAAC;AAE5B,SAAO;AACT","sourcesContent":["import { kInternal, stringify } from \"@liveblocks/core\";\nimport React from \"react\";\n\nimport { useClient } from \"./liveblocks\";\nimport { useRoom } from \"./room\";\n\nconst MENTION_SUGGESTIONS_DEBOUNCE = 500;\n\n/**\n * @private For internal use only. Do not rely on this hook.\n *\n * Simplistic debounced search, we don't need to worry too much about deduping\n * and race conditions as there can only be one search at a time.\n */\nexport function useMentionSuggestions(search?: string) {\n const client = useClient();\n\n const room = useRoom();\n const [mentionSuggestions, setMentionSuggestions] =\n React.useState<string[]>();\n const lastInvokedAt = React.useRef<number>();\n\n React.useEffect(() => {\n const mentionSuggestionsCache = client[kInternal].mentionSuggestionsCache;\n const resolveMentionSuggestions =\n client[kInternal].resolveMentionSuggestions;\n\n if (search === undefined || !resolveMentionSuggestions) {\n return;\n }\n\n const resolveMentionSuggestionsArgs = { text: search, roomId: room.id };\n const mentionSuggestionsCacheKey = stringify(resolveMentionSuggestionsArgs);\n let debounceTimeout: number | undefined;\n let isCanceled = false;\n\n const getMentionSuggestions = async () => {\n try {\n lastInvokedAt.current = performance.now();\n const mentionSuggestions = await resolveMentionSuggestions(\n resolveMentionSuggestionsArgs\n );\n\n if (!isCanceled) {\n setMentionSuggestions(mentionSuggestions);\n mentionSuggestionsCache.set(\n mentionSuggestionsCacheKey,\n mentionSuggestions\n );\n }\n } catch (error) {\n console.error((error as Error)?.message);\n }\n };\n\n if (mentionSuggestionsCache.has(mentionSuggestionsCacheKey)) {\n // If there are already cached mention suggestions, use them immediately.\n setMentionSuggestions(\n mentionSuggestionsCache.get(mentionSuggestionsCacheKey)\n );\n } else if (\n !lastInvokedAt.current ||\n Math.abs(performance.now() - lastInvokedAt.current) >\n MENTION_SUGGESTIONS_DEBOUNCE\n ) {\n // If on the debounce's leading edge (either because it's the first invokation or enough\n // time has passed since the last debounce), get mention suggestions immediately.\n void getMentionSuggestions();\n } else {\n // Otherwise, wait for the debounce delay.\n debounceTimeout = window.setTimeout(() => {\n void getMentionSuggestions();\n }, MENTION_SUGGESTIONS_DEBOUNCE);\n }\n\n return () => {\n isCanceled = true;\n window.clearTimeout(debounceTimeout);\n };\n }, [client, room.id, search]);\n\n return mentionSuggestions;\n}\n"]}
package/dist/_private.mjs CHANGED
@@ -2,9 +2,8 @@ import {
2
2
  CreateThreadError,
3
3
  _useRoom,
4
4
  getUmbrellaStoreForClient,
5
- selectThreads,
6
5
  useClient
7
- } from "./chunk-LMENFXCS.mjs";
6
+ } from "./chunk-A7GJNN4L.mjs";
8
7
 
9
8
  // src/use-mention-suggestions.ts
10
9
  import { kInternal, stringify } from "@liveblocks/core";
@@ -63,7 +62,6 @@ function useMentionSuggestions(search) {
63
62
  export {
64
63
  CreateThreadError,
65
64
  getUmbrellaStoreForClient,
66
- selectThreads,
67
65
  useMentionSuggestions
68
66
  };
69
67
  //# sourceMappingURL=_private.mjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/use-mention-suggestions.ts"],"sourcesContent":["import { kInternal, stringify } from \"@liveblocks/core\";\nimport React from \"react\";\n\nimport { useClient } from \"./liveblocks\";\nimport { useRoom } from \"./room\";\n\nconst MENTION_SUGGESTIONS_DEBOUNCE = 500;\n\n/**\n * @private For internal use only. Do not rely on this hook.\n *\n * Simplistic debounced search, we don't need to worry too much about deduping\n * and race conditions as there can only be one search at a time.\n */\nexport function useMentionSuggestions(search?: string) {\n const client = useClient();\n\n const room = useRoom();\n const [mentionSuggestions, setMentionSuggestions] =\n React.useState<string[]>();\n const lastInvokedAt = React.useRef<number>();\n\n React.useEffect(() => {\n const mentionSuggestionsCache = client[kInternal].mentionSuggestionsCache;\n const resolveMentionSuggestions =\n client[kInternal].resolveMentionSuggestions;\n\n if (search === undefined || !resolveMentionSuggestions) {\n return;\n }\n\n const resolveMentionSuggestionsArgs = { text: search, roomId: room.id };\n const mentionSuggestionsCacheKey = stringify(resolveMentionSuggestionsArgs);\n let debounceTimeout: number | undefined;\n let isCanceled = false;\n\n const getMentionSuggestions = async () => {\n try {\n lastInvokedAt.current = performance.now();\n const mentionSuggestions = await resolveMentionSuggestions(\n resolveMentionSuggestionsArgs\n );\n\n if (!isCanceled) {\n setMentionSuggestions(mentionSuggestions);\n mentionSuggestionsCache.set(\n mentionSuggestionsCacheKey,\n mentionSuggestions\n );\n }\n } catch (error) {\n console.error((error as Error)?.message);\n }\n };\n\n if (mentionSuggestionsCache.has(mentionSuggestionsCacheKey)) {\n // If there are already cached mention suggestions, use them immediately.\n setMentionSuggestions(\n mentionSuggestionsCache.get(mentionSuggestionsCacheKey)\n );\n } else if (\n !lastInvokedAt.current ||\n Math.abs(performance.now() - lastInvokedAt.current) >\n MENTION_SUGGESTIONS_DEBOUNCE\n ) {\n // If on the debounce's leading edge (either because it's the first invokation or enough\n // time has passed since the last debounce), get mention suggestions immediately.\n void getMentionSuggestions();\n } else {\n // Otherwise, wait for the debounce delay.\n debounceTimeout = window.setTimeout(() => {\n void getMentionSuggestions();\n }, MENTION_SUGGESTIONS_DEBOUNCE);\n }\n\n return () => {\n isCanceled = true;\n window.clearTimeout(debounceTimeout);\n };\n }, [client, room.id, search]);\n\n return mentionSuggestions;\n}\n"],"mappings":";;;;;;;;;AAAA,SAAS,WAAW,iBAAiB;AACrC,OAAO,WAAW;AAKlB,IAAM,+BAA+B;AAQ9B,SAAS,sBAAsB,QAAiB;AACrD,QAAM,SAAS,UAAU;AAEzB,QAAM,OAAO,SAAQ;AACrB,QAAM,CAAC,oBAAoB,qBAAqB,IAC9C,MAAM,SAAmB;AAC3B,QAAM,gBAAgB,MAAM,OAAe;AAE3C,QAAM,UAAU,MAAM;AACpB,UAAM,0BAA0B,OAAO,SAAS,EAAE;AAClD,UAAM,4BACJ,OAAO,SAAS,EAAE;AAEpB,QAAI,WAAW,UAAa,CAAC,2BAA2B;AACtD;AAAA,IACF;AAEA,UAAM,gCAAgC,EAAE,MAAM,QAAQ,QAAQ,KAAK,GAAG;AACtE,UAAM,6BAA6B,UAAU,6BAA6B;AAC1E,QAAI;AACJ,QAAI,aAAa;AAEjB,UAAM,wBAAwB,YAAY;AACxC,UAAI;AACF,sBAAc,UAAU,YAAY,IAAI;AACxC,cAAMA,sBAAqB,MAAM;AAAA,UAC/B;AAAA,QACF;AAEA,YAAI,CAAC,YAAY;AACf,gCAAsBA,mBAAkB;AACxC,kCAAwB;AAAA,YACtB;AAAA,YACAA;AAAA,UACF;AAAA,QACF;AAAA,MACF,SAAS,OAAO;AACd,gBAAQ,MAAO,OAAiB,OAAO;AAAA,MACzC;AAAA,IACF;AAEA,QAAI,wBAAwB,IAAI,0BAA0B,GAAG;AAE3D;AAAA,QACE,wBAAwB,IAAI,0BAA0B;AAAA,MACxD;AAAA,IACF,WACE,CAAC,cAAc,WACf,KAAK,IAAI,YAAY,IAAI,IAAI,cAAc,OAAO,IAChD,8BACF;AAGA,WAAK,sBAAsB;AAAA,IAC7B,OAAO;AAEL,wBAAkB,OAAO,WAAW,MAAM;AACxC,aAAK,sBAAsB;AAAA,MAC7B,GAAG,4BAA4B;AAAA,IACjC;AAEA,WAAO,MAAM;AACX,mBAAa;AACb,aAAO,aAAa,eAAe;AAAA,IACrC;AAAA,EACF,GAAG,CAAC,QAAQ,KAAK,IAAI,MAAM,CAAC;AAE5B,SAAO;AACT;","names":["mentionSuggestions"]}
1
+ {"version":3,"sources":["../src/use-mention-suggestions.ts"],"sourcesContent":["import { kInternal, stringify } from \"@liveblocks/core\";\nimport React from \"react\";\n\nimport { useClient } from \"./liveblocks\";\nimport { useRoom } from \"./room\";\n\nconst MENTION_SUGGESTIONS_DEBOUNCE = 500;\n\n/**\n * @private For internal use only. Do not rely on this hook.\n *\n * Simplistic debounced search, we don't need to worry too much about deduping\n * and race conditions as there can only be one search at a time.\n */\nexport function useMentionSuggestions(search?: string) {\n const client = useClient();\n\n const room = useRoom();\n const [mentionSuggestions, setMentionSuggestions] =\n React.useState<string[]>();\n const lastInvokedAt = React.useRef<number>();\n\n React.useEffect(() => {\n const mentionSuggestionsCache = client[kInternal].mentionSuggestionsCache;\n const resolveMentionSuggestions =\n client[kInternal].resolveMentionSuggestions;\n\n if (search === undefined || !resolveMentionSuggestions) {\n return;\n }\n\n const resolveMentionSuggestionsArgs = { text: search, roomId: room.id };\n const mentionSuggestionsCacheKey = stringify(resolveMentionSuggestionsArgs);\n let debounceTimeout: number | undefined;\n let isCanceled = false;\n\n const getMentionSuggestions = async () => {\n try {\n lastInvokedAt.current = performance.now();\n const mentionSuggestions = await resolveMentionSuggestions(\n resolveMentionSuggestionsArgs\n );\n\n if (!isCanceled) {\n setMentionSuggestions(mentionSuggestions);\n mentionSuggestionsCache.set(\n mentionSuggestionsCacheKey,\n mentionSuggestions\n );\n }\n } catch (error) {\n console.error((error as Error)?.message);\n }\n };\n\n if (mentionSuggestionsCache.has(mentionSuggestionsCacheKey)) {\n // If there are already cached mention suggestions, use them immediately.\n setMentionSuggestions(\n mentionSuggestionsCache.get(mentionSuggestionsCacheKey)\n );\n } else if (\n !lastInvokedAt.current ||\n Math.abs(performance.now() - lastInvokedAt.current) >\n MENTION_SUGGESTIONS_DEBOUNCE\n ) {\n // If on the debounce's leading edge (either because it's the first invokation or enough\n // time has passed since the last debounce), get mention suggestions immediately.\n void getMentionSuggestions();\n } else {\n // Otherwise, wait for the debounce delay.\n debounceTimeout = window.setTimeout(() => {\n void getMentionSuggestions();\n }, MENTION_SUGGESTIONS_DEBOUNCE);\n }\n\n return () => {\n isCanceled = true;\n window.clearTimeout(debounceTimeout);\n };\n }, [client, room.id, search]);\n\n return mentionSuggestions;\n}\n"],"mappings":";;;;;;;;AAAA,SAAS,WAAW,iBAAiB;AACrC,OAAO,WAAW;AAKlB,IAAM,+BAA+B;AAQ9B,SAAS,sBAAsB,QAAiB;AACrD,QAAM,SAAS,UAAU;AAEzB,QAAM,OAAO,SAAQ;AACrB,QAAM,CAAC,oBAAoB,qBAAqB,IAC9C,MAAM,SAAmB;AAC3B,QAAM,gBAAgB,MAAM,OAAe;AAE3C,QAAM,UAAU,MAAM;AACpB,UAAM,0BAA0B,OAAO,SAAS,EAAE;AAClD,UAAM,4BACJ,OAAO,SAAS,EAAE;AAEpB,QAAI,WAAW,UAAa,CAAC,2BAA2B;AACtD;AAAA,IACF;AAEA,UAAM,gCAAgC,EAAE,MAAM,QAAQ,QAAQ,KAAK,GAAG;AACtE,UAAM,6BAA6B,UAAU,6BAA6B;AAC1E,QAAI;AACJ,QAAI,aAAa;AAEjB,UAAM,wBAAwB,YAAY;AACxC,UAAI;AACF,sBAAc,UAAU,YAAY,IAAI;AACxC,cAAMA,sBAAqB,MAAM;AAAA,UAC/B;AAAA,QACF;AAEA,YAAI,CAAC,YAAY;AACf,gCAAsBA,mBAAkB;AACxC,kCAAwB;AAAA,YACtB;AAAA,YACAA;AAAA,UACF;AAAA,QACF;AAAA,MACF,SAAS,OAAO;AACd,gBAAQ,MAAO,OAAiB,OAAO;AAAA,MACzC;AAAA,IACF;AAEA,QAAI,wBAAwB,IAAI,0BAA0B,GAAG;AAE3D;AAAA,QACE,wBAAwB,IAAI,0BAA0B;AAAA,MACxD;AAAA,IACF,WACE,CAAC,cAAc,WACf,KAAK,IAAI,YAAY,IAAI,IAAI,cAAc,OAAO,IAChD,8BACF;AAGA,WAAK,sBAAsB;AAAA,IAC7B,OAAO;AAEL,wBAAkB,OAAO,WAAW,MAAM;AACxC,aAAK,sBAAsB;AAAA,MAC7B,GAAG,4BAA4B;AAAA,IACjC;AAEA,WAAO,MAAM;AACX,mBAAa;AACb,aAAO,aAAa,eAAe;AAAA,IACrC;AAAA,EACF,GAAG,CAAC,QAAQ,KAAK,IAAI,MAAM,CAAC;AAE5B,SAAO;AACT;","names":["mentionSuggestions"]}