@liveblocks/react-ui 2.15.1 → 2.15.2

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.
@@ -3,8 +3,9 @@
3
3
 
4
4
  var jsxRuntime = require('react/jsx-runtime');
5
5
  var core = require('@liveblocks/core');
6
+ var _private = require('@liveblocks/react/_private');
6
7
  var react = require('react');
7
- var flushSync = require('./flush-sync.js');
8
+ var reactDom = require('react-dom');
8
9
 
9
10
 
10
11
  const PERSIST_NAME = "Persist";
@@ -21,7 +22,7 @@ function useAnimationPersist(ref) {
21
22
  const [isPresent, unmount] = usePersist();
22
23
  const previousAnimationName = react.useRef(null);
23
24
  const unmountAnimationName = react.useRef(null);
24
- react.useLayoutEffect(() => {
25
+ _private.useLayoutEffect(() => {
25
26
  const element = ref.current;
26
27
  if (!element) {
27
28
  return;
@@ -39,7 +40,7 @@ function useAnimationPersist(ref) {
39
40
  element.removeEventListener("animationend", handleAnimationEnd);
40
41
  };
41
42
  }, [ref, unmount]);
42
- react.useLayoutEffect(() => {
43
+ _private.useLayoutEffect(() => {
43
44
  const element = ref.current;
44
45
  let animationFrameId;
45
46
  if (!element) {
@@ -64,9 +65,9 @@ function Persist({ children }) {
64
65
  const lastPresentChild = react.useRef(null);
65
66
  const child = getChild(children);
66
67
  const unmount = react.useCallback(() => {
67
- flushSync.flushSync(() => setPersisting(false));
68
+ reactDom.flushSync(() => setPersisting(false));
68
69
  }, []);
69
- react.useLayoutEffect(() => {
70
+ _private.useLayoutEffect(() => {
70
71
  if (child) {
71
72
  setPersisting(true);
72
73
  lastPresentChild.current = child;
@@ -1 +1 @@
1
- {"version":3,"file":"Persist.js","sources":["../../src/utils/Persist.tsx"],"sourcesContent":["\"use client\";\n\nimport { nn } from \"@liveblocks/core\";\nimport type { ReactNode, RefObject } from \"react\";\nimport {\n Children,\n createContext,\n isValidElement,\n useCallback,\n useContext,\n useLayoutEffect,\n useRef,\n useState,\n} from \"react\";\n\nimport { flushSync } from \"./flush-sync\";\n\n// Persist is an overly simplified version of Framer Motion's AnimatePresence,\n// mostly mimicking its usePresence API: https://github.com/framer/motion/blob/main/packages/framer-motion/src/components/AnimatePresence/use-presence.ts\n\nconst PERSIST_NAME = \"Persist\";\n\ninterface PersistProps {\n children: Exclude<ReactNode, Iterable<ReactNode>>;\n}\n\ntype PersistContext = [boolean, () => void];\n\nconst PersistContext = createContext<PersistContext | null>(null);\n\nexport function usePersist() {\n const persistContext = useContext(PersistContext);\n\n return nn(persistContext, \"Persist is missing from the React tree.\");\n}\n\nfunction getChild(children: ReactNode) {\n const child: ReactNode = Array.isArray(children)\n ? Children.only(children)\n : children;\n\n return isValidElement(child) ? child : undefined;\n}\n\nexport function useAnimationPersist(ref: RefObject<HTMLElement>) {\n const [isPresent, unmount] = usePersist();\n const previousAnimationName = useRef<string | null>(null);\n const unmountAnimationName = useRef<string | null>(null);\n\n useLayoutEffect(() => {\n const element = ref.current;\n\n if (!element) {\n return;\n }\n\n /**\n * Stop persisting at the end of the last animation.\n *\n * We keep track of all ending animations because animations stay\n * on getComputedStyle(element).animationName even if they're over,\n * so we need to keep track of previous animations to truly know if\n * an animation should be waited on.\n */\n const handleAnimationEnd = (event: AnimationEvent) => {\n if (event.animationName === unmountAnimationName.current) {\n unmount();\n }\n\n previousAnimationName.current = event.animationName;\n };\n\n element.addEventListener(\"animationcancel\", handleAnimationEnd);\n element.addEventListener(\"animationend\", handleAnimationEnd);\n\n return () => {\n element.removeEventListener(\"animationcancel\", handleAnimationEnd);\n element.removeEventListener(\"animationend\", handleAnimationEnd);\n };\n }, [ref, unmount]);\n\n useLayoutEffect(() => {\n const element = ref.current;\n let animationFrameId: number;\n\n if (!element) {\n return;\n }\n\n if (!isPresent) {\n // If the element should be unmounting, wait for a repaint and check\n // if it is visible and has an animation. If not, unmount immediately.\n animationFrameId = requestAnimationFrame(() => {\n const styles = getComputedStyle(element);\n unmountAnimationName.current = styles.animationName;\n\n if (\n styles.animationName === \"none\" ||\n styles.animationName === previousAnimationName.current ||\n styles.display === \"none\"\n ) {\n unmount();\n }\n });\n }\n\n return () => {\n cancelAnimationFrame(animationFrameId);\n };\n }, [isPresent, ref, unmount]);\n}\n\n/**\n * Persist a component until it decides to unmount by\n * itself (instead of orchestrating the unmount from the parent).\n */\nexport function Persist({ children }: PersistProps) {\n const [isPersisting, setPersisting] = useState(true);\n const lastPresentChild = useRef<ReactNode>(null);\n const child = getChild(children);\n\n const unmount = useCallback(() => {\n flushSync(() => setPersisting(false));\n }, []);\n\n useLayoutEffect(() => {\n if (child) {\n setPersisting(true);\n lastPresentChild.current = child;\n }\n }, [child]);\n\n return (\n <PersistContext.Provider value={[Boolean(child), unmount]}>\n {child ?? (isPersisting ? lastPresentChild.current : null)}\n </PersistContext.Provider>\n );\n}\n\nif (process.env.NODE_ENV !== \"production\") {\n Persist.displayName = PERSIST_NAME;\n}\n"],"names":[],"mappings":";;;;;;;;AAAA;AAoBA;AAQA;AAEO;AACL;AAEA;AACF;AAEA;AACE;AAIA;AACF;AAEO;AACL;AACA;AACA;AAEA;AACE;AAEA;AACE;AAAA;AAWF;AACE;AACE;AAAQ;AAGV;AAAsC;AAGxC;AACA;AAEA;AACE;AACA;AAA8D;AAChE;AAGF;AACE;AACA;AAEA;AACE;AAAA;AAGF;AAGE;AACE;AACA;AAEA;AAKE;AAAQ;AACV;AACD;AAGH;AACE;AAAqC;AACvC;AAEJ;AAMgB;AACd;AACA;AACA;AAEA;AACE;AAAoC;AAGtC;AACE;AACE;AACA;AAA2B;AAC7B;AAGF;AACG;AAAuD;AACD;AAG3D;AAEA;AACE;AACF;;;;"}
1
+ {"version":3,"file":"Persist.js","sources":["../../src/utils/Persist.tsx"],"sourcesContent":["\"use client\";\n\nimport { nn } from \"@liveblocks/core\";\nimport { useLayoutEffect } from \"@liveblocks/react/_private\";\nimport type { ReactNode, RefObject } from \"react\";\nimport {\n Children,\n createContext,\n isValidElement,\n useCallback,\n useContext,\n useRef,\n useState,\n} from \"react\";\nimport { flushSync } from \"react-dom\";\n\n// Persist is an overly simplified version of Framer Motion's AnimatePresence,\n// mostly mimicking its usePresence API: https://github.com/framer/motion/blob/main/packages/framer-motion/src/components/AnimatePresence/use-presence.ts\n\nconst PERSIST_NAME = \"Persist\";\n\ninterface PersistProps {\n children: Exclude<ReactNode, Iterable<ReactNode>>;\n}\n\ntype PersistContext = [boolean, () => void];\n\nconst PersistContext = createContext<PersistContext | null>(null);\n\nexport function usePersist() {\n const persistContext = useContext(PersistContext);\n\n return nn(persistContext, \"Persist is missing from the React tree.\");\n}\n\nfunction getChild(children: ReactNode) {\n const child: ReactNode = Array.isArray(children)\n ? Children.only(children)\n : children;\n\n return isValidElement(child) ? child : undefined;\n}\n\nexport function useAnimationPersist(ref: RefObject<HTMLElement>) {\n const [isPresent, unmount] = usePersist();\n const previousAnimationName = useRef<string | null>(null);\n const unmountAnimationName = useRef<string | null>(null);\n\n useLayoutEffect(() => {\n const element = ref.current;\n\n if (!element) {\n return;\n }\n\n /**\n * Stop persisting at the end of the last animation.\n *\n * We keep track of all ending animations because animations stay\n * on getComputedStyle(element).animationName even if they're over,\n * so we need to keep track of previous animations to truly know if\n * an animation should be waited on.\n */\n const handleAnimationEnd = (event: AnimationEvent) => {\n if (event.animationName === unmountAnimationName.current) {\n unmount();\n }\n\n previousAnimationName.current = event.animationName;\n };\n\n element.addEventListener(\"animationcancel\", handleAnimationEnd);\n element.addEventListener(\"animationend\", handleAnimationEnd);\n\n return () => {\n element.removeEventListener(\"animationcancel\", handleAnimationEnd);\n element.removeEventListener(\"animationend\", handleAnimationEnd);\n };\n }, [ref, unmount]);\n\n useLayoutEffect(() => {\n const element = ref.current;\n let animationFrameId: number;\n\n if (!element) {\n return;\n }\n\n if (!isPresent) {\n // If the element should be unmounting, wait for a repaint and check\n // if it is visible and has an animation. If not, unmount immediately.\n animationFrameId = requestAnimationFrame(() => {\n const styles = getComputedStyle(element);\n unmountAnimationName.current = styles.animationName;\n\n if (\n styles.animationName === \"none\" ||\n styles.animationName === previousAnimationName.current ||\n styles.display === \"none\"\n ) {\n unmount();\n }\n });\n }\n\n return () => {\n cancelAnimationFrame(animationFrameId);\n };\n }, [isPresent, ref, unmount]);\n}\n\n/**\n * Persist a component until it decides to unmount by\n * itself (instead of orchestrating the unmount from the parent).\n */\nexport function Persist({ children }: PersistProps) {\n const [isPersisting, setPersisting] = useState(true);\n const lastPresentChild = useRef<ReactNode>(null);\n const child = getChild(children);\n\n const unmount = useCallback(() => {\n flushSync(() => setPersisting(false));\n }, []);\n\n useLayoutEffect(() => {\n if (child) {\n setPersisting(true);\n lastPresentChild.current = child;\n }\n }, [child]);\n\n return (\n <PersistContext.Provider value={[Boolean(child), unmount]}>\n {child ?? (isPersisting ? lastPresentChild.current : null)}\n </PersistContext.Provider>\n );\n}\n\nif (process.env.NODE_ENV !== \"production\") {\n Persist.displayName = PERSIST_NAME;\n}\n"],"names":[],"mappings":";;;;;;;;;AAAA;AAmBA;AAQA;AAEO;AACL;AAEA;AACF;AAEA;AACE;AAIA;AACF;AAEO;AACL;AACA;AACA;AAEA;AACE;AAEA;AACE;AAAA;AAWF;AACE;AACE;AAAQ;AAGV;AAAsC;AAGxC;AACA;AAEA;AACE;AACA;AAA8D;AAChE;AAGF;AACE;AACA;AAEA;AACE;AAAA;AAGF;AAGE;AACE;AACA;AAEA;AAKE;AAAQ;AACV;AACD;AAGH;AACE;AAAqC;AACvC;AAEJ;AAMgB;AACd;AACA;AACA;AAEA;AACE;AAAoC;AAGtC;AACE;AACE;AACA;AAA2B;AAC7B;AAGF;AACG;AAAuD;AACD;AAG3D;AAEA;AACE;AACF;;;;"}
@@ -1,8 +1,9 @@
1
1
  "use client";
2
2
  import { jsx } from 'react/jsx-runtime';
3
3
  import { nn } from '@liveblocks/core';
4
- import { createContext, useContext, Children, isValidElement, useRef, useLayoutEffect, useState, useCallback } from 'react';
5
- import { flushSync } from './flush-sync.mjs';
4
+ import { useLayoutEffect } from '@liveblocks/react/_private';
5
+ import { createContext, useContext, Children, isValidElement, useRef, useState, useCallback } from 'react';
6
+ import { flushSync } from 'react-dom';
6
7
 
7
8
 
8
9
  const PERSIST_NAME = "Persist";
@@ -1 +1 @@
1
- {"version":3,"file":"Persist.mjs","sources":["../../src/utils/Persist.tsx"],"sourcesContent":["\"use client\";\n\nimport { nn } from \"@liveblocks/core\";\nimport type { ReactNode, RefObject } from \"react\";\nimport {\n Children,\n createContext,\n isValidElement,\n useCallback,\n useContext,\n useLayoutEffect,\n useRef,\n useState,\n} from \"react\";\n\nimport { flushSync } from \"./flush-sync\";\n\n// Persist is an overly simplified version of Framer Motion's AnimatePresence,\n// mostly mimicking its usePresence API: https://github.com/framer/motion/blob/main/packages/framer-motion/src/components/AnimatePresence/use-presence.ts\n\nconst PERSIST_NAME = \"Persist\";\n\ninterface PersistProps {\n children: Exclude<ReactNode, Iterable<ReactNode>>;\n}\n\ntype PersistContext = [boolean, () => void];\n\nconst PersistContext = createContext<PersistContext | null>(null);\n\nexport function usePersist() {\n const persistContext = useContext(PersistContext);\n\n return nn(persistContext, \"Persist is missing from the React tree.\");\n}\n\nfunction getChild(children: ReactNode) {\n const child: ReactNode = Array.isArray(children)\n ? Children.only(children)\n : children;\n\n return isValidElement(child) ? child : undefined;\n}\n\nexport function useAnimationPersist(ref: RefObject<HTMLElement>) {\n const [isPresent, unmount] = usePersist();\n const previousAnimationName = useRef<string | null>(null);\n const unmountAnimationName = useRef<string | null>(null);\n\n useLayoutEffect(() => {\n const element = ref.current;\n\n if (!element) {\n return;\n }\n\n /**\n * Stop persisting at the end of the last animation.\n *\n * We keep track of all ending animations because animations stay\n * on getComputedStyle(element).animationName even if they're over,\n * so we need to keep track of previous animations to truly know if\n * an animation should be waited on.\n */\n const handleAnimationEnd = (event: AnimationEvent) => {\n if (event.animationName === unmountAnimationName.current) {\n unmount();\n }\n\n previousAnimationName.current = event.animationName;\n };\n\n element.addEventListener(\"animationcancel\", handleAnimationEnd);\n element.addEventListener(\"animationend\", handleAnimationEnd);\n\n return () => {\n element.removeEventListener(\"animationcancel\", handleAnimationEnd);\n element.removeEventListener(\"animationend\", handleAnimationEnd);\n };\n }, [ref, unmount]);\n\n useLayoutEffect(() => {\n const element = ref.current;\n let animationFrameId: number;\n\n if (!element) {\n return;\n }\n\n if (!isPresent) {\n // If the element should be unmounting, wait for a repaint and check\n // if it is visible and has an animation. If not, unmount immediately.\n animationFrameId = requestAnimationFrame(() => {\n const styles = getComputedStyle(element);\n unmountAnimationName.current = styles.animationName;\n\n if (\n styles.animationName === \"none\" ||\n styles.animationName === previousAnimationName.current ||\n styles.display === \"none\"\n ) {\n unmount();\n }\n });\n }\n\n return () => {\n cancelAnimationFrame(animationFrameId);\n };\n }, [isPresent, ref, unmount]);\n}\n\n/**\n * Persist a component until it decides to unmount by\n * itself (instead of orchestrating the unmount from the parent).\n */\nexport function Persist({ children }: PersistProps) {\n const [isPersisting, setPersisting] = useState(true);\n const lastPresentChild = useRef<ReactNode>(null);\n const child = getChild(children);\n\n const unmount = useCallback(() => {\n flushSync(() => setPersisting(false));\n }, []);\n\n useLayoutEffect(() => {\n if (child) {\n setPersisting(true);\n lastPresentChild.current = child;\n }\n }, [child]);\n\n return (\n <PersistContext.Provider value={[Boolean(child), unmount]}>\n {child ?? (isPersisting ? lastPresentChild.current : null)}\n </PersistContext.Provider>\n );\n}\n\nif (process.env.NODE_ENV !== \"production\") {\n Persist.displayName = PERSIST_NAME;\n}\n"],"names":[],"mappings":";;;;;;AAAA;AAoBA;AAQA;AAEO;AACL;AAEA;AACF;AAEA;AACE;AAIA;AACF;AAEO;AACL;AACA;AACA;AAEA;AACE;AAEA;AACE;AAAA;AAWF;AACE;AACE;AAAQ;AAGV;AAAsC;AAGxC;AACA;AAEA;AACE;AACA;AAA8D;AAChE;AAGF;AACE;AACA;AAEA;AACE;AAAA;AAGF;AAGE;AACE;AACA;AAEA;AAKE;AAAQ;AACV;AACD;AAGH;AACE;AAAqC;AACvC;AAEJ;AAMgB;AACd;AACA;AACA;AAEA;AACE;AAAoC;AAGtC;AACE;AACE;AACA;AAA2B;AAC7B;AAGF;AACG;AAAuD;AACD;AAG3D;AAEA;AACE;AACF;;"}
1
+ {"version":3,"file":"Persist.mjs","sources":["../../src/utils/Persist.tsx"],"sourcesContent":["\"use client\";\n\nimport { nn } from \"@liveblocks/core\";\nimport { useLayoutEffect } from \"@liveblocks/react/_private\";\nimport type { ReactNode, RefObject } from \"react\";\nimport {\n Children,\n createContext,\n isValidElement,\n useCallback,\n useContext,\n useRef,\n useState,\n} from \"react\";\nimport { flushSync } from \"react-dom\";\n\n// Persist is an overly simplified version of Framer Motion's AnimatePresence,\n// mostly mimicking its usePresence API: https://github.com/framer/motion/blob/main/packages/framer-motion/src/components/AnimatePresence/use-presence.ts\n\nconst PERSIST_NAME = \"Persist\";\n\ninterface PersistProps {\n children: Exclude<ReactNode, Iterable<ReactNode>>;\n}\n\ntype PersistContext = [boolean, () => void];\n\nconst PersistContext = createContext<PersistContext | null>(null);\n\nexport function usePersist() {\n const persistContext = useContext(PersistContext);\n\n return nn(persistContext, \"Persist is missing from the React tree.\");\n}\n\nfunction getChild(children: ReactNode) {\n const child: ReactNode = Array.isArray(children)\n ? Children.only(children)\n : children;\n\n return isValidElement(child) ? child : undefined;\n}\n\nexport function useAnimationPersist(ref: RefObject<HTMLElement>) {\n const [isPresent, unmount] = usePersist();\n const previousAnimationName = useRef<string | null>(null);\n const unmountAnimationName = useRef<string | null>(null);\n\n useLayoutEffect(() => {\n const element = ref.current;\n\n if (!element) {\n return;\n }\n\n /**\n * Stop persisting at the end of the last animation.\n *\n * We keep track of all ending animations because animations stay\n * on getComputedStyle(element).animationName even if they're over,\n * so we need to keep track of previous animations to truly know if\n * an animation should be waited on.\n */\n const handleAnimationEnd = (event: AnimationEvent) => {\n if (event.animationName === unmountAnimationName.current) {\n unmount();\n }\n\n previousAnimationName.current = event.animationName;\n };\n\n element.addEventListener(\"animationcancel\", handleAnimationEnd);\n element.addEventListener(\"animationend\", handleAnimationEnd);\n\n return () => {\n element.removeEventListener(\"animationcancel\", handleAnimationEnd);\n element.removeEventListener(\"animationend\", handleAnimationEnd);\n };\n }, [ref, unmount]);\n\n useLayoutEffect(() => {\n const element = ref.current;\n let animationFrameId: number;\n\n if (!element) {\n return;\n }\n\n if (!isPresent) {\n // If the element should be unmounting, wait for a repaint and check\n // if it is visible and has an animation. If not, unmount immediately.\n animationFrameId = requestAnimationFrame(() => {\n const styles = getComputedStyle(element);\n unmountAnimationName.current = styles.animationName;\n\n if (\n styles.animationName === \"none\" ||\n styles.animationName === previousAnimationName.current ||\n styles.display === \"none\"\n ) {\n unmount();\n }\n });\n }\n\n return () => {\n cancelAnimationFrame(animationFrameId);\n };\n }, [isPresent, ref, unmount]);\n}\n\n/**\n * Persist a component until it decides to unmount by\n * itself (instead of orchestrating the unmount from the parent).\n */\nexport function Persist({ children }: PersistProps) {\n const [isPersisting, setPersisting] = useState(true);\n const lastPresentChild = useRef<ReactNode>(null);\n const child = getChild(children);\n\n const unmount = useCallback(() => {\n flushSync(() => setPersisting(false));\n }, []);\n\n useLayoutEffect(() => {\n if (child) {\n setPersisting(true);\n lastPresentChild.current = child;\n }\n }, [child]);\n\n return (\n <PersistContext.Provider value={[Boolean(child), unmount]}>\n {child ?? (isPersisting ? lastPresentChild.current : null)}\n </PersistContext.Provider>\n );\n}\n\nif (process.env.NODE_ENV !== \"production\") {\n Persist.displayName = PERSIST_NAME;\n}\n"],"names":[],"mappings":";;;;;;;AAAA;AAmBA;AAQA;AAEO;AACL;AAEA;AACF;AAEA;AACE;AAIA;AACF;AAEO;AACL;AACA;AACA;AAEA;AACE;AAEA;AACE;AAAA;AAWF;AACE;AACE;AAAQ;AAGV;AAAsC;AAGxC;AACA;AAEA;AACE;AACA;AAA8D;AAChE;AAGF;AACE;AACA;AAEA;AACE;AAAA;AAGF;AAGE;AACE;AACA;AAEA;AAKE;AAAQ;AACV;AACD;AAGH;AACE;AAAqC;AACvC;AAEJ;AAMgB;AACd;AACA;AACA;AAEA;AACE;AAAoC;AAGtC;AACE;AACE;AACA;AAA2B;AAC7B;AAGF;AACG;AAAuD;AACD;AAG3D;AAEA;AACE;AACF;;"}
@@ -4,14 +4,14 @@
4
4
  var jsxRuntime = require('react/jsx-runtime');
5
5
  var reactSlot = require('@radix-ui/react-slot');
6
6
  var react = require('react');
7
- var ReactDOM = require('react-dom');
7
+ var reactDom = require('react-dom');
8
8
 
9
9
 
10
10
  const PORTAL_NAME = "Portal";
11
11
  const Portal = react.forwardRef(
12
12
  ({ container = document?.body, asChild, ...props }, forwardedRef) => {
13
13
  const Component = asChild ? reactSlot.Slot : "div";
14
- return container ? ReactDOM.createPortal(
14
+ return container ? reactDom.createPortal(
15
15
  /* @__PURE__ */ jsxRuntime.jsx(Component, {
16
16
  "data-liveblocks-portal": "",
17
17
  ...props,
package/dist/version.js CHANGED
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  const PKG_NAME = "@liveblocks/react-ui";
4
- const PKG_VERSION = typeof "2.15.1" === "string" && "2.15.1";
4
+ const PKG_VERSION = typeof "2.15.2" === "string" && "2.15.2";
5
5
  const PKG_FORMAT = typeof "cjs" === "string" && "cjs";
6
6
 
7
7
  exports.PKG_FORMAT = PKG_FORMAT;
package/dist/version.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  const PKG_NAME = "@liveblocks/react-ui";
2
- const PKG_VERSION = typeof "2.15.1" === "string" && "2.15.1";
2
+ const PKG_VERSION = typeof "2.15.2" === "string" && "2.15.2";
3
3
  const PKG_FORMAT = typeof "esm" === "string" && "esm";
4
4
 
5
5
  export { PKG_FORMAT, PKG_NAME, PKG_VERSION };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@liveblocks/react-ui",
3
- "version": "2.15.1",
3
+ "version": "2.15.2",
4
4
  "description": "A set of React pre-built components for the Liveblocks products. Liveblocks is the all-in-one toolkit to build collaborative products like Figma, Notion, and more.",
5
5
  "license": "Apache-2.0",
6
6
  "type": "commonjs",
@@ -75,9 +75,9 @@
75
75
  },
76
76
  "dependencies": {
77
77
  "@floating-ui/react-dom": "^2.1.2",
78
- "@liveblocks/client": "2.15.1",
79
- "@liveblocks/core": "2.15.1",
80
- "@liveblocks/react": "2.15.1",
78
+ "@liveblocks/client": "2.15.2",
79
+ "@liveblocks/core": "2.15.2",
80
+ "@liveblocks/react": "2.15.2",
81
81
  "@radix-ui/react-dropdown-menu": "^2.1.2",
82
82
  "@radix-ui/react-popover": "^1.1.2",
83
83
  "@radix-ui/react-slot": "^1.1.0",
@@ -1,12 +0,0 @@
1
- 'use strict';
2
-
3
- var ReactDOM = require('react-dom');
4
-
5
- const useReactFlushSync = ReactDOM["flushSync".toString()];
6
- function flushSyncFallback(fn) {
7
- return fn();
8
- }
9
- const flushSync = useReactFlushSync ?? flushSyncFallback;
10
-
11
- exports.flushSync = flushSync;
12
- //# sourceMappingURL=flush-sync.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"flush-sync.js","sources":["../../src/utils/flush-sync.ts"],"sourcesContent":["import ReactDOM from \"react-dom\";\n\n// Prevent bundlers from importing `flushSync` directly\n// See https://github.com/radix-ui/primitives/pull/1028\n// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment\nconst useReactFlushSync: typeof ReactDOM.flushSync = (ReactDOM as any)[\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n \"flushSync\".toString()\n];\n\nfunction flushSyncFallback<R>(fn: () => R) {\n return fn();\n}\n\n// React's `flushSync` is only available in React >=17.\nexport const flushSync: typeof ReactDOM.flushSync =\n useReactFlushSync ?? flushSyncFallback;\n"],"names":[],"mappings":";;;;AAKA,MAAM,iBAAA,GAAgD,QAEpD,CAAA,WAAA,CAAY,QAAS,EAAA,CAAA,CAAA;AAGvB,SAAS,kBAAqB,EAAa,EAAA;AACzC,EAAA,OAAO,EAAG,EAAA,CAAA;AACZ,CAAA;AAGO,MAAM,YACX,iBAAqB,IAAA;;;;"}
@@ -1,10 +0,0 @@
1
- import ReactDOM from 'react-dom';
2
-
3
- const useReactFlushSync = ReactDOM["flushSync".toString()];
4
- function flushSyncFallback(fn) {
5
- return fn();
6
- }
7
- const flushSync = useReactFlushSync ?? flushSyncFallback;
8
-
9
- export { flushSync };
10
- //# sourceMappingURL=flush-sync.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"flush-sync.mjs","sources":["../../src/utils/flush-sync.ts"],"sourcesContent":["import ReactDOM from \"react-dom\";\n\n// Prevent bundlers from importing `flushSync` directly\n// See https://github.com/radix-ui/primitives/pull/1028\n// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment\nconst useReactFlushSync: typeof ReactDOM.flushSync = (ReactDOM as any)[\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n \"flushSync\".toString()\n];\n\nfunction flushSyncFallback<R>(fn: () => R) {\n return fn();\n}\n\n// React's `flushSync` is only available in React >=17.\nexport const flushSync: typeof ReactDOM.flushSync =\n useReactFlushSync ?? flushSyncFallback;\n"],"names":[],"mappings":";;AAKA,MAAM,iBAAA,GAAgD,QAEpD,CAAA,WAAA,CAAY,QAAS,EAAA,CAAA,CAAA;AAGvB,SAAS,kBAAqB,EAAa,EAAA;AACzC,EAAA,OAAO,EAAG,EAAA,CAAA;AACZ,CAAA;AAGO,MAAM,YACX,iBAAqB,IAAA;;;;"}