@liveblocks/react-ui 2.16.0-toolbars1 → 2.16.0-toolbars2

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.
@@ -122,6 +122,14 @@ declare function WarningIcon(props: ComponentProps<"svg">): react_jsx_runtime.JS
122
122
 
123
123
  declare function capitalize(string: string): string;
124
124
 
125
+ /**
126
+ * "Freezes" a given value, so that it will return the same value/instance on
127
+ * each subsequent render. This can be used to freeze "initial" values for
128
+ * custom hooks, much like how `useState(initialState)` or
129
+ * `useRef(initialValue)` works.
130
+ */
131
+ declare function useInitial<T>(value: T | (() => T)): T;
132
+
125
133
  declare function useRefs<T>(...refs: Ref<T>[]): RefCallback<T>;
126
134
 
127
- export { ArrowDownIcon, ArrowUpIcon, AttachmentIcon, BoldIcon, Button, CheckIcon, ChevronDownIcon, ChevronLeftIcon, ChevronRightIcon, ChevronUpIcon, CodeIcon, CommentIcon, CrossIcon, DeleteIcon, EditIcon, EllipsisIcon, EmojiAddIcon, EmojiIcon, ItalicIcon, LengthenIcon, List, MentionIcon, QuestionMarkIcon, RedoIcon, ResolveIcon, ResolvedIcon, RestoreIcon, SearchIcon, SendIcon, ShortcutTooltip, ShortenIcon, SparklesIcon, SpinnerIcon, StrikethroughIcon, Tooltip, TranslateIcon, UnderlineIcon, UndoIcon, User, WarningIcon, capitalize, useRefs };
135
+ export { ArrowDownIcon, ArrowUpIcon, AttachmentIcon, BoldIcon, Button, CheckIcon, ChevronDownIcon, ChevronLeftIcon, ChevronRightIcon, ChevronUpIcon, CodeIcon, CommentIcon, CrossIcon, DeleteIcon, EditIcon, EllipsisIcon, EmojiAddIcon, EmojiIcon, ItalicIcon, LengthenIcon, List, MentionIcon, QuestionMarkIcon, RedoIcon, ResolveIcon, ResolvedIcon, RestoreIcon, SearchIcon, SendIcon, ShortcutTooltip, ShortenIcon, SparklesIcon, SpinnerIcon, StrikethroughIcon, Tooltip, TranslateIcon, UnderlineIcon, UndoIcon, User, WarningIcon, capitalize, useInitial, useRefs };
@@ -122,6 +122,14 @@ declare function WarningIcon(props: ComponentProps<"svg">): react_jsx_runtime.JS
122
122
 
123
123
  declare function capitalize(string: string): string;
124
124
 
125
+ /**
126
+ * "Freezes" a given value, so that it will return the same value/instance on
127
+ * each subsequent render. This can be used to freeze "initial" values for
128
+ * custom hooks, much like how `useState(initialState)` or
129
+ * `useRef(initialValue)` works.
130
+ */
131
+ declare function useInitial<T>(value: T | (() => T)): T;
132
+
125
133
  declare function useRefs<T>(...refs: Ref<T>[]): RefCallback<T>;
126
134
 
127
- export { ArrowDownIcon, ArrowUpIcon, AttachmentIcon, BoldIcon, Button, CheckIcon, ChevronDownIcon, ChevronLeftIcon, ChevronRightIcon, ChevronUpIcon, CodeIcon, CommentIcon, CrossIcon, DeleteIcon, EditIcon, EllipsisIcon, EmojiAddIcon, EmojiIcon, ItalicIcon, LengthenIcon, List, MentionIcon, QuestionMarkIcon, RedoIcon, ResolveIcon, ResolvedIcon, RestoreIcon, SearchIcon, SendIcon, ShortcutTooltip, ShortenIcon, SparklesIcon, SpinnerIcon, StrikethroughIcon, Tooltip, TranslateIcon, UnderlineIcon, UndoIcon, User, WarningIcon, capitalize, useRefs };
135
+ export { ArrowDownIcon, ArrowUpIcon, AttachmentIcon, BoldIcon, Button, CheckIcon, ChevronDownIcon, ChevronLeftIcon, ChevronRightIcon, ChevronUpIcon, CodeIcon, CommentIcon, CrossIcon, DeleteIcon, EditIcon, EllipsisIcon, EmojiAddIcon, EmojiIcon, ItalicIcon, LengthenIcon, List, MentionIcon, QuestionMarkIcon, RedoIcon, ResolveIcon, ResolvedIcon, RestoreIcon, SearchIcon, SendIcon, ShortcutTooltip, ShortenIcon, SparklesIcon, SpinnerIcon, StrikethroughIcon, Tooltip, TranslateIcon, UnderlineIcon, UndoIcon, User, WarningIcon, capitalize, useInitial, useRefs };
@@ -6,6 +6,7 @@ var Tooltip = require('../components/internal/Tooltip.js');
6
6
  var User = require('../components/internal/User.js');
7
7
  require('../icons/index.js');
8
8
  var capitalize = require('../utils/capitalize.js');
9
+ var useInitial = require('../utils/use-initial.js');
9
10
  var useRefs = require('../utils/use-refs.js');
10
11
  var TooltipPrimitive = require('@radix-ui/react-tooltip');
11
12
  var ArrowDown = require('../icons/ArrowDown.js');
@@ -52,6 +53,7 @@ exports.ShortcutTooltip = Tooltip.ShortcutTooltip;
52
53
  exports.Tooltip = Tooltip.Tooltip;
53
54
  exports.User = User.User;
54
55
  exports.capitalize = capitalize.capitalize;
56
+ exports.useInitial = useInitial.useInitial;
55
57
  exports.useRefs = useRefs.useRefs;
56
58
  Object.defineProperty(exports, 'TooltipProvider', {
57
59
  enumerable: true,
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -4,6 +4,7 @@ export { ShortcutTooltip, Tooltip } from '../components/internal/Tooltip.mjs';
4
4
  export { User } from '../components/internal/User.mjs';
5
5
  import '../icons/index.mjs';
6
6
  export { capitalize } from '../utils/capitalize.mjs';
7
+ export { useInitial } from '../utils/use-initial.mjs';
7
8
  export { useRefs } from '../utils/use-refs.mjs';
8
9
  export { TooltipProvider } from '@radix-ui/react-tooltip';
9
10
  export { ArrowDownIcon } from '../icons/ArrowDown.mjs';
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"index.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
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.16.0-toolbars1" === "string" && "2.16.0-toolbars1";
4
+ const PKG_VERSION = typeof "2.16.0-toolbars2" === "string" && "2.16.0-toolbars2";
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.16.0-toolbars1" === "string" && "2.16.0-toolbars1";
2
+ const PKG_VERSION = typeof "2.16.0-toolbars2" === "string" && "2.16.0-toolbars2";
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.16.0-toolbars1",
3
+ "version": "2.16.0-toolbars2",
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.16.0-toolbars1",
79
- "@liveblocks/core": "2.16.0-toolbars1",
80
- "@liveblocks/react": "2.16.0-toolbars1",
78
+ "@liveblocks/client": "2.16.0-toolbars2",
79
+ "@liveblocks/core": "2.16.0-toolbars2",
80
+ "@liveblocks/react": "2.16.0-toolbars2",
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",