@liveblocks/react 2.25.0-aiprivatebeta9 → 3.0.0

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.
@@ -0,0 +1,23 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});// src/version.ts
2
+ var PKG_NAME = "@liveblocks/react";
3
+ var PKG_VERSION = "3.0.0";
4
+ var PKG_FORMAT = "cjs";
5
+
6
+ // src/ClientSideSuspense.tsx
7
+ var _react = require('react');
8
+ var _jsxruntime = require('react/jsx-runtime');
9
+ function ClientSideSuspense(props) {
10
+ const [mounted, setMounted] = _react.useState.call(void 0, false);
11
+ _react.useEffect.call(void 0, () => {
12
+ setMounted(true);
13
+ }, []);
14
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _react.Suspense, { fallback: props.fallback, children: mounted ? typeof props.children === "function" ? props.children() : props.children : props.fallback });
15
+ }
16
+
17
+
18
+
19
+
20
+
21
+
22
+ exports.PKG_NAME = PKG_NAME; exports.PKG_VERSION = PKG_VERSION; exports.PKG_FORMAT = PKG_FORMAT; exports.ClientSideSuspense = ClientSideSuspense;
23
+ //# sourceMappingURL=chunk-WMTIZOZ3.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["/home/runner/work/liveblocks/liveblocks/packages/liveblocks-react/dist/chunk-WMTIZOZ3.cjs","../src/version.ts","../src/ClientSideSuspense.tsx"],"names":[],"mappings":"AAAA;ACGO,IAAM,SAAA,EAAW,mBAAA;AACjB,IAAM,YAAA,EAAiD,OAAA;AACvD,IAAM,WAAA,EAAgD,KAAA;ADD7D;AACA;AEJA,8BAA8C;AAkC1C,+CAAA;AAVG,SAAS,kBAAA,CAAmB,KAAA,EAAc;AAC/C,EAAA,MAAM,CAAC,OAAA,EAAS,UAAU,EAAA,EAAI,6BAAA,KAAc,CAAA;AAE5C,EAAA,8BAAA,CAAU,EAAA,GAAM;AAGd,IAAA,UAAA,CAAW,IAAI,CAAA;AAAA,EACjB,CAAA,EAAG,CAAC,CAAC,CAAA;AAEL,EAAA,uBACE,6BAAA,eAAC,EAAA,EAAS,QAAA,EAAU,KAAA,CAAM,QAAA,EACvB,QAAA,EAAA,QAAA,EACG,OAAO,KAAA,CAAM,SAAA,IAAa,WAAA,EACxB,KAAA,CAAM,QAAA,CAAS,EAAA,EACf,KAAA,CAAM,SAAA,EACR,KAAA,CAAM,SAAA,CACZ,CAAA;AAEJ;AF5BA;AACA;AACE;AACA;AACA;AACA;AACF,iJAAC","file":"/home/runner/work/liveblocks/liveblocks/packages/liveblocks-react/dist/chunk-WMTIZOZ3.cjs","sourcesContent":[null,"declare const __VERSION__: string;\ndeclare const TSUP_FORMAT: string;\n\nexport const PKG_NAME = \"@liveblocks/react\";\nexport const PKG_VERSION = typeof __VERSION__ === \"string\" && __VERSION__;\nexport const PKG_FORMAT = typeof TSUP_FORMAT === \"string\" && TSUP_FORMAT;\n","import type { ReactNode } from \"react\";\nimport { Suspense, useEffect, useState } from \"react\";\n\ntype Props = {\n fallback: ReactNode;\n children: (() => ReactNode | undefined) | ReactNode | undefined;\n};\n\n/**\n * Almost like a normal <Suspense> component, except that for server-side\n * renders, the fallback will be used.\n *\n * The child props will have to be provided in a function, i.e. change:\n *\n * <Suspense fallback={<Loading />}>\n * <MyRealComponent a={1} />\n * </Suspense>\n *\n * To:\n *\n * <ClientSideSuspense fallback={<Loading />}>\n * <MyRealComponent a={1} />\n * </ClientSideSuspense>\n *\n */\nexport function ClientSideSuspense(props: Props) {\n const [mounted, setMounted] = useState(false);\n\n useEffect(() => {\n // Effects are never executed on the server side. The point of this is to\n // delay the flipping of this boolean until after hydration has happened.\n setMounted(true);\n }, []);\n\n return (\n <Suspense fallback={props.fallback}>\n {mounted\n ? typeof props.children === \"function\"\n ? props.children()\n : props.children\n : props.fallback}\n </Suspense>\n );\n}\n"]}
@@ -0,0 +1,23 @@
1
+ // src/version.ts
2
+ var PKG_NAME = "@liveblocks/react";
3
+ var PKG_VERSION = "3.0.0";
4
+ var PKG_FORMAT = "esm";
5
+
6
+ // src/ClientSideSuspense.tsx
7
+ import { Suspense, useEffect, useState } from "react";
8
+ import { jsx } from "react/jsx-runtime";
9
+ function ClientSideSuspense(props) {
10
+ const [mounted, setMounted] = useState(false);
11
+ useEffect(() => {
12
+ setMounted(true);
13
+ }, []);
14
+ return /* @__PURE__ */ jsx(Suspense, { fallback: props.fallback, children: mounted ? typeof props.children === "function" ? props.children() : props.children : props.fallback });
15
+ }
16
+
17
+ export {
18
+ PKG_NAME,
19
+ PKG_VERSION,
20
+ PKG_FORMAT,
21
+ ClientSideSuspense
22
+ };
23
+ //# sourceMappingURL=chunk-XVEMIR32.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/version.ts","../src/ClientSideSuspense.tsx"],"sourcesContent":["declare const __VERSION__: string;\ndeclare const TSUP_FORMAT: string;\n\nexport const PKG_NAME = \"@liveblocks/react\";\nexport const PKG_VERSION = typeof __VERSION__ === \"string\" && __VERSION__;\nexport const PKG_FORMAT = typeof TSUP_FORMAT === \"string\" && TSUP_FORMAT;\n","import type { ReactNode } from \"react\";\nimport { Suspense, useEffect, useState } from \"react\";\n\ntype Props = {\n fallback: ReactNode;\n children: (() => ReactNode | undefined) | ReactNode | undefined;\n};\n\n/**\n * Almost like a normal <Suspense> component, except that for server-side\n * renders, the fallback will be used.\n *\n * The child props will have to be provided in a function, i.e. change:\n *\n * <Suspense fallback={<Loading />}>\n * <MyRealComponent a={1} />\n * </Suspense>\n *\n * To:\n *\n * <ClientSideSuspense fallback={<Loading />}>\n * <MyRealComponent a={1} />\n * </ClientSideSuspense>\n *\n */\nexport function ClientSideSuspense(props: Props) {\n const [mounted, setMounted] = useState(false);\n\n useEffect(() => {\n // Effects are never executed on the server side. The point of this is to\n // delay the flipping of this boolean until after hydration has happened.\n setMounted(true);\n }, []);\n\n return (\n <Suspense fallback={props.fallback}>\n {mounted\n ? typeof props.children === \"function\"\n ? props.children()\n : props.children\n : props.fallback}\n </Suspense>\n );\n}\n"],"mappings":";AAGO,IAAM,WAAW;AACjB,IAAM,cAAiD;AACvD,IAAM,aAAgD;;;ACJ7D,SAAS,UAAU,WAAW,gBAAgB;AAkC1C;AAVG,SAAS,mBAAmB,OAAc;AAC/C,QAAM,CAAC,SAAS,UAAU,IAAI,SAAS,KAAK;AAE5C,YAAU,MAAM;AAGd,eAAW,IAAI;AAAA,EACjB,GAAG,CAAC,CAAC;AAEL,SACE,oBAAC,YAAS,UAAU,MAAM,UACvB,oBACG,OAAO,MAAM,aAAa,aACxB,MAAM,SAAS,IACf,MAAM,WACR,MAAM,UACZ;AAEJ;","names":[]}
package/dist/index.cjs CHANGED
@@ -3,8 +3,8 @@
3
3
 
4
4
 
5
5
 
6
+ var _chunkWMTIZOZ3cjs = require('./chunk-WMTIZOZ3.cjs');
6
7
 
7
- var _chunkM6D2NTTIcjs = require('./chunk-M6D2NTTI.cjs');
8
8
 
9
9
 
10
10
 
@@ -76,14 +76,12 @@ var _chunkM6D2NTTIcjs = require('./chunk-M6D2NTTI.cjs');
76
76
 
77
77
 
78
78
 
79
-
80
- var _chunkRB4LUCGLcjs = require('./chunk-RB4LUCGL.cjs');
79
+ var _chunkUR7FENGRcjs = require('./chunk-UR7FENGR.cjs');
81
80
 
82
81
  // src/index.ts
83
82
  var _core = require('@liveblocks/core');
84
83
  var _client = require('@liveblocks/client');
85
- _core.detectDupes.call(void 0, _chunkM6D2NTTIcjs.PKG_NAME, _chunkM6D2NTTIcjs.PKG_VERSION, _chunkM6D2NTTIcjs.PKG_FORMAT);
86
-
84
+ _core.detectDupes.call(void 0, _chunkWMTIZOZ3cjs.PKG_NAME, _chunkWMTIZOZ3cjs.PKG_VERSION, _chunkWMTIZOZ3cjs.PKG_FORMAT);
87
85
 
88
86
 
89
87
 
@@ -159,5 +157,5 @@ _core.detectDupes.call(void 0, _chunkM6D2NTTIcjs.PKG_NAME, _chunkM6D2NTTIcjs.PKG
159
157
 
160
158
 
161
159
 
162
- exports.ClientContext = _chunkRB4LUCGLcjs.ClientContext; exports.ClientSideSuspense = _chunkM6D2NTTIcjs.ClientSideSuspense; exports.LiveblocksProvider = _chunkRB4LUCGLcjs.LiveblocksProvider; exports.RegisterAiKnowledge = _chunkM6D2NTTIcjs.RegisterAiKnowledge; exports.RoomContext = _chunkRB4LUCGLcjs.RoomContext; exports.RoomProvider = _chunkRB4LUCGLcjs._RoomProvider; exports.createLiveblocksContext = _chunkRB4LUCGLcjs.createLiveblocksContext; exports.createRoomContext = _chunkRB4LUCGLcjs.createRoomContext; exports.isNotificationChannelEnabled = _client.isNotificationChannelEnabled; exports.shallow = _client.shallow; exports.useAddReaction = _chunkRB4LUCGLcjs._useAddReaction; exports.useAiChatMessages = _chunkRB4LUCGLcjs._useAiChatMessages; exports.useAiChats = _chunkRB4LUCGLcjs._useAiChats; exports.useAttachmentUrl = _chunkRB4LUCGLcjs.useAttachmentUrl; exports.useBatch = _chunkRB4LUCGLcjs.useBatch; exports.useBroadcastEvent = _chunkRB4LUCGLcjs._useBroadcastEvent; exports.useCanRedo = _chunkRB4LUCGLcjs.useCanRedo; exports.useCanUndo = _chunkRB4LUCGLcjs.useCanUndo; exports.useClient = _chunkRB4LUCGLcjs.useClient; exports.useCreateAiChat = _chunkRB4LUCGLcjs.useCreateAiChat; exports.useCreateComment = _chunkRB4LUCGLcjs.useCreateComment; exports.useCreateThread = _chunkRB4LUCGLcjs._useCreateThread; exports.useDeleteAiChat = _chunkRB4LUCGLcjs.useDeleteAiChat; exports.useDeleteAllInboxNotifications = _chunkRB4LUCGLcjs.useDeleteAllInboxNotifications; exports.useDeleteComment = _chunkRB4LUCGLcjs.useDeleteComment; exports.useDeleteInboxNotification = _chunkRB4LUCGLcjs.useDeleteInboxNotification; exports.useDeleteThread = _chunkRB4LUCGLcjs._useDeleteThread; exports.useEditComment = _chunkRB4LUCGLcjs.useEditComment; exports.useEditThreadMetadata = _chunkRB4LUCGLcjs._useEditThreadMetadata; exports.useErrorListener = _chunkRB4LUCGLcjs.useErrorListener; exports.useEventListener = _chunkRB4LUCGLcjs._useEventListener; exports.useHistory = _chunkRB4LUCGLcjs.useHistory; exports.useHistoryVersionData = _chunkRB4LUCGLcjs.useHistoryVersionData; exports.useHistoryVersions = _chunkRB4LUCGLcjs._useHistoryVersions; exports.useInboxNotificationThread = _chunkRB4LUCGLcjs._useInboxNotificationThread; exports.useInboxNotifications = _chunkRB4LUCGLcjs.useInboxNotifications; exports.useIsInsideRoom = _chunkRB4LUCGLcjs._useIsInsideRoom; exports.useLostConnectionListener = _chunkRB4LUCGLcjs.useLostConnectionListener; exports.useMarkAllInboxNotificationsAsRead = _chunkRB4LUCGLcjs.useMarkAllInboxNotificationsAsRead; exports.useMarkInboxNotificationAsRead = _chunkRB4LUCGLcjs.useMarkInboxNotificationAsRead; exports.useMarkThreadAsRead = _chunkRB4LUCGLcjs.useMarkThreadAsRead; exports.useMarkThreadAsResolved = _chunkRB4LUCGLcjs.useMarkThreadAsResolved; exports.useMarkThreadAsUnresolved = _chunkRB4LUCGLcjs.useMarkThreadAsUnresolved; exports.useMutation = _chunkRB4LUCGLcjs._useMutation; exports.useMyPresence = _chunkRB4LUCGLcjs._useMyPresence; exports.useNotificationSettings = _chunkRB4LUCGLcjs.useNotificationSettings; exports.useOther = _chunkRB4LUCGLcjs._useOther; exports.useOthers = _chunkRB4LUCGLcjs._useOthers; exports.useOthersConnectionIds = _chunkRB4LUCGLcjs.useOthersConnectionIds; exports.useOthersListener = _chunkRB4LUCGLcjs._useOthersListener; exports.useOthersMapped = _chunkRB4LUCGLcjs._useOthersMapped; exports.useRedo = _chunkRB4LUCGLcjs.useRedo; exports.useRemoveReaction = _chunkRB4LUCGLcjs.useRemoveReaction; exports.useRoom = _chunkRB4LUCGLcjs._useRoom; exports.useRoomInfo = _chunkRB4LUCGLcjs.useRoomInfo; exports.useRoomNotificationSettings = _chunkRB4LUCGLcjs._useRoomNotificationSettings; exports.useRoomSubscriptionSettings = _chunkRB4LUCGLcjs._useRoomSubscriptionSettings; exports.useSelf = _chunkRB4LUCGLcjs._useSelf; exports.useStatus = _chunkRB4LUCGLcjs.useStatus; exports.useStorage = _chunkRB4LUCGLcjs._useStorage; exports.useStorageRoot = _chunkRB4LUCGLcjs._useStorageRoot; exports.useStorageStatus = _chunkRB4LUCGLcjs.useStorageStatus; exports.useSubscribeToThread = _chunkRB4LUCGLcjs.useSubscribeToThread; exports.useSyncStatus = _chunkRB4LUCGLcjs.useSyncStatus; exports.useThreadSubscription = _chunkRB4LUCGLcjs.useThreadSubscription; exports.useThreads = _chunkRB4LUCGLcjs._useThreads; exports.useUndo = _chunkRB4LUCGLcjs.useUndo; exports.useUnreadInboxNotificationsCount = _chunkRB4LUCGLcjs.useUnreadInboxNotificationsCount; exports.useUnsubscribeFromThread = _chunkRB4LUCGLcjs.useUnsubscribeFromThread; exports.useUpdateMyPresence = _chunkRB4LUCGLcjs._useUpdateMyPresence; exports.useUpdateNotificationSettings = _chunkRB4LUCGLcjs.useUpdateNotificationSettings; exports.useUpdateRoomNotificationSettings = _chunkRB4LUCGLcjs.useUpdateRoomNotificationSettings; exports.useUpdateRoomSubscriptionSettings = _chunkRB4LUCGLcjs.useUpdateRoomSubscriptionSettings; exports.useUser = _chunkRB4LUCGLcjs._useUser; exports.useUserThreads_experimental = _chunkRB4LUCGLcjs._useUserThreads_experimental;
160
+ exports.ClientContext = _chunkUR7FENGRcjs.ClientContext; exports.ClientSideSuspense = _chunkWMTIZOZ3cjs.ClientSideSuspense; exports.LiveblocksProvider = _chunkUR7FENGRcjs.LiveblocksProvider; exports.RegisterAiKnowledge = _chunkUR7FENGRcjs.RegisterAiKnowledge; exports.RegisterAiTool = _chunkUR7FENGRcjs.RegisterAiTool; exports.RoomContext = _chunkUR7FENGRcjs.RoomContext; exports.RoomProvider = _chunkUR7FENGRcjs._RoomProvider; exports.createLiveblocksContext = _chunkUR7FENGRcjs.createLiveblocksContext; exports.createRoomContext = _chunkUR7FENGRcjs.createRoomContext; exports.isNotificationChannelEnabled = _client.isNotificationChannelEnabled; exports.shallow = _client.shallow; exports.useAddReaction = _chunkUR7FENGRcjs._useAddReaction; exports.useAiChat = _chunkUR7FENGRcjs._useAiChat; exports.useAiChatMessages = _chunkUR7FENGRcjs._useAiChatMessages; exports.useAiChats = _chunkUR7FENGRcjs._useAiChats; exports.useAttachmentUrl = _chunkUR7FENGRcjs.useAttachmentUrl; exports.useBroadcastEvent = _chunkUR7FENGRcjs._useBroadcastEvent; exports.useCanRedo = _chunkUR7FENGRcjs.useCanRedo; exports.useCanUndo = _chunkUR7FENGRcjs.useCanUndo; exports.useClient = _chunkUR7FENGRcjs.useClient; exports.useCreateAiChat = _chunkUR7FENGRcjs.useCreateAiChat; exports.useCreateComment = _chunkUR7FENGRcjs.useCreateComment; exports.useCreateThread = _chunkUR7FENGRcjs._useCreateThread; exports.useDeleteAiChat = _chunkUR7FENGRcjs.useDeleteAiChat; exports.useDeleteAllInboxNotifications = _chunkUR7FENGRcjs.useDeleteAllInboxNotifications; exports.useDeleteComment = _chunkUR7FENGRcjs.useDeleteComment; exports.useDeleteInboxNotification = _chunkUR7FENGRcjs.useDeleteInboxNotification; exports.useDeleteThread = _chunkUR7FENGRcjs._useDeleteThread; exports.useEditComment = _chunkUR7FENGRcjs.useEditComment; exports.useEditThreadMetadata = _chunkUR7FENGRcjs._useEditThreadMetadata; exports.useErrorListener = _chunkUR7FENGRcjs.useErrorListener; exports.useEventListener = _chunkUR7FENGRcjs._useEventListener; exports.useHistory = _chunkUR7FENGRcjs.useHistory; exports.useHistoryVersionData = _chunkUR7FENGRcjs.useHistoryVersionData; exports.useHistoryVersions = _chunkUR7FENGRcjs._useHistoryVersions; exports.useInboxNotificationThread = _chunkUR7FENGRcjs._useInboxNotificationThread; exports.useInboxNotifications = _chunkUR7FENGRcjs.useInboxNotifications; exports.useIsInsideRoom = _chunkUR7FENGRcjs._useIsInsideRoom; exports.useLostConnectionListener = _chunkUR7FENGRcjs.useLostConnectionListener; exports.useMarkAllInboxNotificationsAsRead = _chunkUR7FENGRcjs.useMarkAllInboxNotificationsAsRead; exports.useMarkInboxNotificationAsRead = _chunkUR7FENGRcjs.useMarkInboxNotificationAsRead; exports.useMarkThreadAsRead = _chunkUR7FENGRcjs.useMarkThreadAsRead; exports.useMarkThreadAsResolved = _chunkUR7FENGRcjs.useMarkThreadAsResolved; exports.useMarkThreadAsUnresolved = _chunkUR7FENGRcjs.useMarkThreadAsUnresolved; exports.useMutation = _chunkUR7FENGRcjs._useMutation; exports.useMyPresence = _chunkUR7FENGRcjs._useMyPresence; exports.useNotificationSettings = _chunkUR7FENGRcjs.useNotificationSettings; exports.useOther = _chunkUR7FENGRcjs._useOther; exports.useOthers = _chunkUR7FENGRcjs._useOthers; exports.useOthersConnectionIds = _chunkUR7FENGRcjs.useOthersConnectionIds; exports.useOthersListener = _chunkUR7FENGRcjs._useOthersListener; exports.useOthersMapped = _chunkUR7FENGRcjs._useOthersMapped; exports.useRedo = _chunkUR7FENGRcjs.useRedo; exports.useRemoveReaction = _chunkUR7FENGRcjs.useRemoveReaction; exports.useRoom = _chunkUR7FENGRcjs._useRoom; exports.useRoomInfo = _chunkUR7FENGRcjs.useRoomInfo; exports.useRoomSubscriptionSettings = _chunkUR7FENGRcjs._useRoomSubscriptionSettings; exports.useSelf = _chunkUR7FENGRcjs._useSelf; exports.useSendAiMessage = _chunkUR7FENGRcjs.useSendAiMessage; exports.useStatus = _chunkUR7FENGRcjs.useStatus; exports.useStorage = _chunkUR7FENGRcjs._useStorage; exports.useStorageRoot = _chunkUR7FENGRcjs._useStorageRoot; exports.useSubscribeToThread = _chunkUR7FENGRcjs.useSubscribeToThread; exports.useSyncStatus = _chunkUR7FENGRcjs.useSyncStatus; exports.useThreadSubscription = _chunkUR7FENGRcjs.useThreadSubscription; exports.useThreads = _chunkUR7FENGRcjs._useThreads; exports.useUndo = _chunkUR7FENGRcjs.useUndo; exports.useUnreadInboxNotificationsCount = _chunkUR7FENGRcjs.useUnreadInboxNotificationsCount; exports.useUnsubscribeFromThread = _chunkUR7FENGRcjs.useUnsubscribeFromThread; exports.useUpdateMyPresence = _chunkUR7FENGRcjs._useUpdateMyPresence; exports.useUpdateNotificationSettings = _chunkUR7FENGRcjs.useUpdateNotificationSettings; exports.useUpdateRoomSubscriptionSettings = _chunkUR7FENGRcjs.useUpdateRoomSubscriptionSettings; exports.useUser = _chunkUR7FENGRcjs._useUser; exports.useUserThreads_experimental = _chunkUR7FENGRcjs._useUserThreads_experimental;
163
161
  //# sourceMappingURL=index.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["/home/runner/work/liveblocks/liveblocks/packages/liveblocks-react/dist/index.cjs","../src/index.ts"],"names":[],"mappings":"AAAA;AACE;AACA;AACA;AACA;AACA;AACF,wDAA6B;AAC7B;AACE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACF,wDAA6B;AAC7B;AACA;AChFA,wCAA4B;AAc5B,4CAAsD;AAXtD,+BAAA,0BAAY,EAAU,6BAAA,EAAa,4BAAU,CAAA;ADiF7C;AACE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACF,40JAAC","file":"/home/runner/work/liveblocks/liveblocks/packages/liveblocks-react/dist/index.cjs","sourcesContent":[null,"/* eslint-disable simple-import-sort/exports */\nimport { detectDupes } from \"@liveblocks/core\";\n\nimport { PKG_FORMAT, PKG_NAME, PKG_VERSION } from \"./version\";\ndetectDupes(PKG_NAME, PKG_VERSION, PKG_FORMAT);\n\nexport { ClientSideSuspense } from \"./ClientSideSuspense\";\nexport type {\n MutationContext,\n UseStorageStatusOptions,\n UseThreadsOptions,\n} from \"./types\";\n\n// Re-exports from @liveblocks/client, for convenience\nexport type { Json, JsonObject } from \"@liveblocks/client\";\nexport { shallow, isNotificationChannelEnabled } from \"@liveblocks/client\";\n\n// Export all the top-level hooks\nexport { RegisterAiKnowledge } from \"./ai\";\nexport {\n ClientContext,\n createLiveblocksContext,\n LiveblocksProvider,\n useClient,\n useDeleteAllInboxNotifications,\n useDeleteInboxNotification,\n useErrorListener,\n useInboxNotificationThread,\n useMarkAllInboxNotificationsAsRead,\n useMarkInboxNotificationAsRead,\n useSyncStatus,\n} from \"./liveblocks\";\nexport {\n createRoomContext,\n RoomContext,\n RoomProvider,\n useAddReaction,\n useBatch,\n useBroadcastEvent,\n useCanRedo,\n useCanUndo,\n useCreateComment,\n useCreateThread,\n useDeleteComment,\n useDeleteThread,\n useEditComment,\n useEditThreadMetadata,\n useMarkThreadAsResolved,\n useMarkThreadAsUnresolved,\n useSubscribeToThread,\n useUnsubscribeFromThread,\n useEventListener,\n useHistory,\n useIsInsideRoom,\n useLostConnectionListener,\n useMarkThreadAsRead,\n useMutation,\n useMyPresence,\n useOthersListener,\n useRedo,\n useRemoveReaction,\n useRoom,\n useStatus,\n useStorageRoot,\n useThreadSubscription,\n useUndo,\n useUpdateMyPresence,\n useUpdateRoomNotificationSettings,\n useUpdateRoomSubscriptionSettings,\n useHistoryVersionData,\n} from \"./room\";\n\n// Export the classic (non-Suspense) versions of our hooks\n// (This part differs from src/suspense.ts)\nexport {\n useOther,\n useOthers,\n useOthersConnectionIds,\n useOthersMapped,\n useSelf,\n useStorage,\n useStorageStatus,\n useThreads,\n useAttachmentUrl,\n useHistoryVersions,\n useRoomNotificationSettings,\n useRoomSubscriptionSettings,\n} from \"./room\";\nexport {\n useInboxNotifications,\n useNotificationSettings,\n useUpdateNotificationSettings,\n useCreateAiChat,\n useDeleteAiChat,\n useUserThreads_experimental as useUserThreads_experimental,\n useRoomInfo,\n useUnreadInboxNotificationsCount,\n useUser,\n useAiChats,\n useAiChatMessages,\n} from \"./liveblocks\";\n"]}
1
+ {"version":3,"sources":["/home/runner/work/liveblocks/liveblocks/packages/liveblocks-react/dist/index.cjs","../src/index.ts"],"names":[],"mappings":"AAAA;AACE;AACA;AACA;AACA;AACF,wDAA6B;AAC7B;AACE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACF,wDAA6B;AAC7B;AACA;AC/EA,wCAA4B;AAc5B,4CAAsD;AAXtD,+BAAA,0BAAY,EAAU,6BAAA,EAAa,4BAAU,CAAA;ADgF7C;AACE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACF,mtJAAC","file":"/home/runner/work/liveblocks/liveblocks/packages/liveblocks-react/dist/index.cjs","sourcesContent":[null,"/* eslint-disable simple-import-sort/exports */\nimport { detectDupes } from \"@liveblocks/core\";\n\nimport { PKG_FORMAT, PKG_NAME, PKG_VERSION } from \"./version\";\ndetectDupes(PKG_NAME, PKG_VERSION, PKG_FORMAT);\n\nexport { ClientSideSuspense } from \"./ClientSideSuspense\";\nexport type {\n MutationContext,\n UseSendAiMessageOptions,\n UseThreadsOptions,\n} from \"./types\";\n\n// Re-exports from @liveblocks/client, for convenience\nexport type { Json, JsonObject } from \"@liveblocks/client\";\nexport { shallow, isNotificationChannelEnabled } from \"@liveblocks/client\";\n\n// Export all the top-level hooks\nexport { RegisterAiKnowledge, RegisterAiTool } from \"./ai\";\nexport type { RegisterAiKnowledgeProps, RegisterAiToolProps } from \"./types/ai\";\nexport { ClientContext, RoomContext, useClient } from \"./contexts\";\nexport {\n createLiveblocksContext,\n LiveblocksProvider,\n useDeleteAllInboxNotifications,\n useDeleteInboxNotification,\n useErrorListener,\n useInboxNotificationThread,\n useMarkAllInboxNotificationsAsRead,\n useMarkInboxNotificationAsRead,\n useSyncStatus,\n} from \"./liveblocks\";\nexport {\n createRoomContext,\n RoomProvider,\n useAddReaction,\n useBroadcastEvent,\n useCanRedo,\n useCanUndo,\n useCreateComment,\n useCreateThread,\n useDeleteComment,\n useDeleteThread,\n useEditComment,\n useEditThreadMetadata,\n useMarkThreadAsResolved,\n useMarkThreadAsUnresolved,\n useSubscribeToThread,\n useUnsubscribeFromThread,\n useEventListener,\n useHistory,\n useIsInsideRoom,\n useLostConnectionListener,\n useMarkThreadAsRead,\n useMutation,\n useMyPresence,\n useOthersListener,\n useRedo,\n useRemoveReaction,\n useRoom,\n useStatus,\n useStorageRoot,\n useThreadSubscription,\n useUndo,\n useUpdateMyPresence,\n useUpdateRoomSubscriptionSettings,\n useHistoryVersionData,\n} from \"./room\";\n\n// Export the classic (non-Suspense) versions of our hooks\n// (This part differs from src/suspense.ts)\nexport {\n useOther,\n useOthers,\n useOthersConnectionIds,\n useOthersMapped,\n useSelf,\n useStorage,\n useThreads,\n useAttachmentUrl,\n useHistoryVersions,\n useRoomSubscriptionSettings,\n} from \"./room\";\nexport {\n useInboxNotifications,\n useNotificationSettings,\n useUpdateNotificationSettings,\n useCreateAiChat,\n useDeleteAiChat,\n useSendAiMessage,\n useUserThreads_experimental as useUserThreads_experimental,\n useRoomInfo,\n useUnreadInboxNotificationsCount,\n useUser,\n useAiChat,\n useAiChats,\n useAiChatMessages,\n} from \"./liveblocks\";\n"]}
package/dist/index.d.cts CHANGED
@@ -1,17 +1,10 @@
1
- export { C as ClientContext, L as LiveblocksProvider, M as MutationContext, H as RoomProvider, U as UseStorageStatusOptions, w as UseThreadsOptions, x as createLiveblocksContext, G as createRoomContext, I as useAddReaction, aE as useAiChatMessages, aD as useAiChats, aq as useAttachmentUrl, J as useBatch, K as useBroadcastEvent, N as useCanRedo, O as useCanUndo, y as useClient, ax as useCreateAiChat, P as useCreateComment, Q as useCreateThread, ay as useDeleteAiChat, z as useDeleteAllInboxNotifications, R as useDeleteComment, A as useDeleteInboxNotification, S as useDeleteThread, T as useEditComment, V as useEditThreadMetadata, B as useErrorListener, $ as useEventListener, a0 as useHistory, ah as useHistoryVersionData, ar as useHistoryVersions, _ as useInboxNotificationThread, au as useInboxNotifications, a1 as useIsInsideRoom, a2 as useLostConnectionListener, D as useMarkAllInboxNotificationsAsRead, E as useMarkInboxNotificationAsRead, a3 as useMarkThreadAsRead, W as useMarkThreadAsResolved, X as useMarkThreadAsUnresolved, a4 as useMutation, a5 as useMyPresence, av as useNotificationSettings, ai as useOther, aj as useOthers, ak as useOthersConnectionIds, a6 as useOthersListener, al as useOthersMapped, a7 as useRedo, a8 as useRemoveReaction, a9 as useRoom, aA as useRoomInfo, as as useRoomNotificationSettings, at as useRoomSubscriptionSettings, am as useSelf, aa as useStatus, an as useStorage, ab as useStorageRoot, ao as useStorageStatus, Y as useSubscribeToThread, F as useSyncStatus, ac as useThreadSubscription, ap as useThreads, ad as useUndo, aB as useUnreadInboxNotificationsCount, Z as useUnsubscribeFromThread, ae as useUpdateMyPresence, aw as useUpdateNotificationSettings, af as useUpdateRoomNotificationSettings, ag as useUpdateRoomSubscriptionSettings, aC as useUser, az as useUserThreads_experimental } from './room-BSt58hY4.cjs';
1
+ import { R as RegisterAiKnowledgeProps, w as RegisterAiToolProps } from './room-Du6_Cy1X.cjs';
2
+ export { C as ClientContext, L as LiveblocksProvider, M as MutationContext, y as RoomContext, J as RoomProvider, U as UseSendAiMessageOptions, x as UseThreadsOptions, A as createLiveblocksContext, I as createRoomContext, K as useAddReaction, aD as useAiChat, aF as useAiChatMessages, aE as useAiChats, aq as useAttachmentUrl, N as useBroadcastEvent, O as useCanRedo, P as useCanUndo, z as useClient, aw as useCreateAiChat, Q as useCreateComment, S as useCreateThread, ax as useDeleteAiChat, B as useDeleteAllInboxNotifications, T as useDeleteComment, D as useDeleteInboxNotification, V as useDeleteThread, W as useEditComment, X as useEditThreadMetadata, E as useErrorListener, a1 as useEventListener, a2 as useHistory, ai as useHistoryVersionData, ar as useHistoryVersions, _ as useInboxNotificationThread, at as useInboxNotifications, a3 as useIsInsideRoom, a4 as useLostConnectionListener, F as useMarkAllInboxNotificationsAsRead, G as useMarkInboxNotificationAsRead, a5 as useMarkThreadAsRead, Y as useMarkThreadAsResolved, Z as useMarkThreadAsUnresolved, a6 as useMutation, a7 as useMyPresence, au as useNotificationSettings, aj as useOther, ak as useOthers, al as useOthersConnectionIds, a8 as useOthersListener, am as useOthersMapped, a9 as useRedo, aa as useRemoveReaction, ab as useRoom, aA as useRoomInfo, as as useRoomSubscriptionSettings, an as useSelf, ay as useSendAiMessage, ac as useStatus, ao as useStorage, ad as useStorageRoot, $ as useSubscribeToThread, H as useSyncStatus, ae as useThreadSubscription, ap as useThreads, af as useUndo, aB as useUnreadInboxNotificationsCount, a0 as useUnsubscribeFromThread, ag as useUpdateMyPresence, av as useUpdateNotificationSettings, ah as useUpdateRoomSubscriptionSettings, aC as useUser, az as useUserThreads_experimental } from './room-Du6_Cy1X.cjs';
2
3
  export { Json, JsonObject, isNotificationChannelEnabled, shallow } from '@liveblocks/client';
3
4
  import * as react_jsx_runtime from 'react/jsx-runtime';
4
5
  import * as react from 'react';
5
6
  import { ReactNode } from 'react';
6
- import { OpaqueRoom, AiKnowledgeSource } from '@liveblocks/core';
7
-
8
- /**
9
- * Raw access to the React context where the RoomProvider stores the current
10
- * room. Exposed for advanced use cases only.
11
- *
12
- * @private This is a private/advanced API. Do not rely on it.
13
- */
14
- declare const RoomContext: react.Context<OpaqueRoom | null>;
7
+ import '@liveblocks/core';
15
8
 
16
9
  type Props = {
17
10
  fallback: ReactNode;
@@ -54,13 +47,33 @@ declare function ClientSideSuspense(props: Props): react_jsx_runtime.JSX.Element
54
47
  * By unmounting this component, the AI will no longer have access to it.
55
48
  * It can choose to use or ignore this knowledge in its responses.
56
49
  */
57
- declare const RegisterAiKnowledge: react.NamedExoticComponent<AiKnowledgeSource & {
58
- /**
59
- * An optional unique key for this knowledge source. If multiple components
60
- * register knowledge under the same key, the last one to mount takes
61
- * precedence.
62
- */
63
- id?: string;
64
- }>;
50
+ declare const RegisterAiKnowledge: react.NamedExoticComponent<RegisterAiKnowledgeProps>;
51
+ /**
52
+ * Make a tool available to your AI chat or a one-off request.
53
+ * A tool is a piece of functionality that the AI can call to perform an action
54
+ * or look up information on the user's behalf.
55
+ *
56
+ * Also, tools are used to render custom UIs for tool invocations, which are
57
+ * embedded inside the AI chat.
58
+ *
59
+ * For example:
60
+ *
61
+ * <RegisterAiTool
62
+ * name="list-todos"
63
+ * tool={defineAiTool()({ ... })}
64
+ * />
65
+ *
66
+ * Or scoped to a specific chat:
67
+ *
68
+ * <RegisterAiTool
69
+ * name="list-todos"
70
+ * tool={defineAiTool()({ ... })}
71
+ * chatId="chat-1234"
72
+ * />
73
+ *
74
+ * By mounting this component, the tool is made available.
75
+ * By unmounting this component, the tool will no longer be available.
76
+ */
77
+ declare const RegisterAiTool: react.NamedExoticComponent<RegisterAiToolProps>;
65
78
 
66
- export { ClientSideSuspense, RegisterAiKnowledge, RoomContext };
79
+ export { ClientSideSuspense, RegisterAiKnowledge, RegisterAiKnowledgeProps, RegisterAiTool, RegisterAiToolProps };
package/dist/index.d.ts CHANGED
@@ -1,17 +1,10 @@
1
- export { C as ClientContext, L as LiveblocksProvider, M as MutationContext, H as RoomProvider, U as UseStorageStatusOptions, w as UseThreadsOptions, x as createLiveblocksContext, G as createRoomContext, I as useAddReaction, aE as useAiChatMessages, aD as useAiChats, aq as useAttachmentUrl, J as useBatch, K as useBroadcastEvent, N as useCanRedo, O as useCanUndo, y as useClient, ax as useCreateAiChat, P as useCreateComment, Q as useCreateThread, ay as useDeleteAiChat, z as useDeleteAllInboxNotifications, R as useDeleteComment, A as useDeleteInboxNotification, S as useDeleteThread, T as useEditComment, V as useEditThreadMetadata, B as useErrorListener, $ as useEventListener, a0 as useHistory, ah as useHistoryVersionData, ar as useHistoryVersions, _ as useInboxNotificationThread, au as useInboxNotifications, a1 as useIsInsideRoom, a2 as useLostConnectionListener, D as useMarkAllInboxNotificationsAsRead, E as useMarkInboxNotificationAsRead, a3 as useMarkThreadAsRead, W as useMarkThreadAsResolved, X as useMarkThreadAsUnresolved, a4 as useMutation, a5 as useMyPresence, av as useNotificationSettings, ai as useOther, aj as useOthers, ak as useOthersConnectionIds, a6 as useOthersListener, al as useOthersMapped, a7 as useRedo, a8 as useRemoveReaction, a9 as useRoom, aA as useRoomInfo, as as useRoomNotificationSettings, at as useRoomSubscriptionSettings, am as useSelf, aa as useStatus, an as useStorage, ab as useStorageRoot, ao as useStorageStatus, Y as useSubscribeToThread, F as useSyncStatus, ac as useThreadSubscription, ap as useThreads, ad as useUndo, aB as useUnreadInboxNotificationsCount, Z as useUnsubscribeFromThread, ae as useUpdateMyPresence, aw as useUpdateNotificationSettings, af as useUpdateRoomNotificationSettings, ag as useUpdateRoomSubscriptionSettings, aC as useUser, az as useUserThreads_experimental } from './room-BSt58hY4.js';
1
+ import { R as RegisterAiKnowledgeProps, w as RegisterAiToolProps } from './room-Du6_Cy1X.js';
2
+ export { C as ClientContext, L as LiveblocksProvider, M as MutationContext, y as RoomContext, J as RoomProvider, U as UseSendAiMessageOptions, x as UseThreadsOptions, A as createLiveblocksContext, I as createRoomContext, K as useAddReaction, aD as useAiChat, aF as useAiChatMessages, aE as useAiChats, aq as useAttachmentUrl, N as useBroadcastEvent, O as useCanRedo, P as useCanUndo, z as useClient, aw as useCreateAiChat, Q as useCreateComment, S as useCreateThread, ax as useDeleteAiChat, B as useDeleteAllInboxNotifications, T as useDeleteComment, D as useDeleteInboxNotification, V as useDeleteThread, W as useEditComment, X as useEditThreadMetadata, E as useErrorListener, a1 as useEventListener, a2 as useHistory, ai as useHistoryVersionData, ar as useHistoryVersions, _ as useInboxNotificationThread, at as useInboxNotifications, a3 as useIsInsideRoom, a4 as useLostConnectionListener, F as useMarkAllInboxNotificationsAsRead, G as useMarkInboxNotificationAsRead, a5 as useMarkThreadAsRead, Y as useMarkThreadAsResolved, Z as useMarkThreadAsUnresolved, a6 as useMutation, a7 as useMyPresence, au as useNotificationSettings, aj as useOther, ak as useOthers, al as useOthersConnectionIds, a8 as useOthersListener, am as useOthersMapped, a9 as useRedo, aa as useRemoveReaction, ab as useRoom, aA as useRoomInfo, as as useRoomSubscriptionSettings, an as useSelf, ay as useSendAiMessage, ac as useStatus, ao as useStorage, ad as useStorageRoot, $ as useSubscribeToThread, H as useSyncStatus, ae as useThreadSubscription, ap as useThreads, af as useUndo, aB as useUnreadInboxNotificationsCount, a0 as useUnsubscribeFromThread, ag as useUpdateMyPresence, av as useUpdateNotificationSettings, ah as useUpdateRoomSubscriptionSettings, aC as useUser, az as useUserThreads_experimental } from './room-Du6_Cy1X.js';
2
3
  export { Json, JsonObject, isNotificationChannelEnabled, shallow } from '@liveblocks/client';
3
4
  import * as react_jsx_runtime from 'react/jsx-runtime';
4
5
  import * as react from 'react';
5
6
  import { ReactNode } from 'react';
6
- import { OpaqueRoom, AiKnowledgeSource } from '@liveblocks/core';
7
-
8
- /**
9
- * Raw access to the React context where the RoomProvider stores the current
10
- * room. Exposed for advanced use cases only.
11
- *
12
- * @private This is a private/advanced API. Do not rely on it.
13
- */
14
- declare const RoomContext: react.Context<OpaqueRoom | null>;
7
+ import '@liveblocks/core';
15
8
 
16
9
  type Props = {
17
10
  fallback: ReactNode;
@@ -54,13 +47,33 @@ declare function ClientSideSuspense(props: Props): react_jsx_runtime.JSX.Element
54
47
  * By unmounting this component, the AI will no longer have access to it.
55
48
  * It can choose to use or ignore this knowledge in its responses.
56
49
  */
57
- declare const RegisterAiKnowledge: react.NamedExoticComponent<AiKnowledgeSource & {
58
- /**
59
- * An optional unique key for this knowledge source. If multiple components
60
- * register knowledge under the same key, the last one to mount takes
61
- * precedence.
62
- */
63
- id?: string;
64
- }>;
50
+ declare const RegisterAiKnowledge: react.NamedExoticComponent<RegisterAiKnowledgeProps>;
51
+ /**
52
+ * Make a tool available to your AI chat or a one-off request.
53
+ * A tool is a piece of functionality that the AI can call to perform an action
54
+ * or look up information on the user's behalf.
55
+ *
56
+ * Also, tools are used to render custom UIs for tool invocations, which are
57
+ * embedded inside the AI chat.
58
+ *
59
+ * For example:
60
+ *
61
+ * <RegisterAiTool
62
+ * name="list-todos"
63
+ * tool={defineAiTool()({ ... })}
64
+ * />
65
+ *
66
+ * Or scoped to a specific chat:
67
+ *
68
+ * <RegisterAiTool
69
+ * name="list-todos"
70
+ * tool={defineAiTool()({ ... })}
71
+ * chatId="chat-1234"
72
+ * />
73
+ *
74
+ * By mounting this component, the tool is made available.
75
+ * By unmounting this component, the tool will no longer be available.
76
+ */
77
+ declare const RegisterAiTool: react.NamedExoticComponent<RegisterAiToolProps>;
65
78
 
66
- export { ClientSideSuspense, RegisterAiKnowledge, RoomContext };
79
+ export { ClientSideSuspense, RegisterAiKnowledge, RegisterAiKnowledgeProps, RegisterAiTool, RegisterAiToolProps };
package/dist/index.js CHANGED
@@ -2,15 +2,17 @@ import {
2
2
  ClientSideSuspense,
3
3
  PKG_FORMAT,
4
4
  PKG_NAME,
5
- PKG_VERSION,
6
- RegisterAiKnowledge
7
- } from "./chunk-Z2N4O6IQ.js";
5
+ PKG_VERSION
6
+ } from "./chunk-XVEMIR32.js";
8
7
  import {
9
8
  ClientContext,
10
9
  LiveblocksProvider,
10
+ RegisterAiKnowledge,
11
+ RegisterAiTool,
11
12
  RoomContext,
12
13
  _RoomProvider,
13
14
  _useAddReaction,
15
+ _useAiChat,
14
16
  _useAiChatMessages,
15
17
  _useAiChats,
16
18
  _useBroadcastEvent,
@@ -28,7 +30,6 @@ import {
28
30
  _useOthersListener,
29
31
  _useOthersMapped,
30
32
  _useRoom,
31
- _useRoomNotificationSettings,
32
33
  _useRoomSubscriptionSettings,
33
34
  _useSelf,
34
35
  _useStorage,
@@ -40,7 +41,6 @@ import {
40
41
  createLiveblocksContext,
41
42
  createRoomContext,
42
43
  useAttachmentUrl,
43
- useBatch,
44
44
  useCanRedo,
45
45
  useCanUndo,
46
46
  useClient,
@@ -66,8 +66,8 @@ import {
66
66
  useRedo,
67
67
  useRemoveReaction,
68
68
  useRoomInfo,
69
+ useSendAiMessage,
69
70
  useStatus,
70
- useStorageStatus,
71
71
  useSubscribeToThread,
72
72
  useSyncStatus,
73
73
  useThreadSubscription,
@@ -75,9 +75,8 @@ import {
75
75
  useUnreadInboxNotificationsCount,
76
76
  useUnsubscribeFromThread,
77
77
  useUpdateNotificationSettings,
78
- useUpdateRoomNotificationSettings,
79
78
  useUpdateRoomSubscriptionSettings
80
- } from "./chunk-TMKZ6U2Y.js";
79
+ } from "./chunk-CS6KYNXH.js";
81
80
 
82
81
  // src/index.ts
83
82
  import { detectDupes } from "@liveblocks/core";
@@ -88,6 +87,7 @@ export {
88
87
  ClientSideSuspense,
89
88
  LiveblocksProvider,
90
89
  RegisterAiKnowledge,
90
+ RegisterAiTool,
91
91
  RoomContext,
92
92
  _RoomProvider as RoomProvider,
93
93
  createLiveblocksContext,
@@ -95,10 +95,10 @@ export {
95
95
  isNotificationChannelEnabled,
96
96
  shallow,
97
97
  _useAddReaction as useAddReaction,
98
+ _useAiChat as useAiChat,
98
99
  _useAiChatMessages as useAiChatMessages,
99
100
  _useAiChats as useAiChats,
100
101
  useAttachmentUrl,
101
- useBatch,
102
102
  _useBroadcastEvent as useBroadcastEvent,
103
103
  useCanRedo,
104
104
  useCanUndo,
@@ -139,13 +139,12 @@ export {
139
139
  useRemoveReaction,
140
140
  _useRoom as useRoom,
141
141
  useRoomInfo,
142
- _useRoomNotificationSettings as useRoomNotificationSettings,
143
142
  _useRoomSubscriptionSettings as useRoomSubscriptionSettings,
144
143
  _useSelf as useSelf,
144
+ useSendAiMessage,
145
145
  useStatus,
146
146
  _useStorage as useStorage,
147
147
  _useStorageRoot as useStorageRoot,
148
- useStorageStatus,
149
148
  useSubscribeToThread,
150
149
  useSyncStatus,
151
150
  useThreadSubscription,
@@ -155,7 +154,6 @@ export {
155
154
  useUnsubscribeFromThread,
156
155
  _useUpdateMyPresence as useUpdateMyPresence,
157
156
  useUpdateNotificationSettings,
158
- useUpdateRoomNotificationSettings,
159
157
  useUpdateRoomSubscriptionSettings,
160
158
  _useUser as useUser,
161
159
  _useUserThreads_experimental as useUserThreads_experimental
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/index.ts"],"sourcesContent":["/* eslint-disable simple-import-sort/exports */\nimport { detectDupes } from \"@liveblocks/core\";\n\nimport { PKG_FORMAT, PKG_NAME, PKG_VERSION } from \"./version\";\ndetectDupes(PKG_NAME, PKG_VERSION, PKG_FORMAT);\n\nexport { ClientSideSuspense } from \"./ClientSideSuspense\";\nexport type {\n MutationContext,\n UseStorageStatusOptions,\n UseThreadsOptions,\n} from \"./types\";\n\n// Re-exports from @liveblocks/client, for convenience\nexport type { Json, JsonObject } from \"@liveblocks/client\";\nexport { shallow, isNotificationChannelEnabled } from \"@liveblocks/client\";\n\n// Export all the top-level hooks\nexport { RegisterAiKnowledge } from \"./ai\";\nexport {\n ClientContext,\n createLiveblocksContext,\n LiveblocksProvider,\n useClient,\n useDeleteAllInboxNotifications,\n useDeleteInboxNotification,\n useErrorListener,\n useInboxNotificationThread,\n useMarkAllInboxNotificationsAsRead,\n useMarkInboxNotificationAsRead,\n useSyncStatus,\n} from \"./liveblocks\";\nexport {\n createRoomContext,\n RoomContext,\n RoomProvider,\n useAddReaction,\n useBatch,\n useBroadcastEvent,\n useCanRedo,\n useCanUndo,\n useCreateComment,\n useCreateThread,\n useDeleteComment,\n useDeleteThread,\n useEditComment,\n useEditThreadMetadata,\n useMarkThreadAsResolved,\n useMarkThreadAsUnresolved,\n useSubscribeToThread,\n useUnsubscribeFromThread,\n useEventListener,\n useHistory,\n useIsInsideRoom,\n useLostConnectionListener,\n useMarkThreadAsRead,\n useMutation,\n useMyPresence,\n useOthersListener,\n useRedo,\n useRemoveReaction,\n useRoom,\n useStatus,\n useStorageRoot,\n useThreadSubscription,\n useUndo,\n useUpdateMyPresence,\n useUpdateRoomNotificationSettings,\n useUpdateRoomSubscriptionSettings,\n useHistoryVersionData,\n} from \"./room\";\n\n// Export the classic (non-Suspense) versions of our hooks\n// (This part differs from src/suspense.ts)\nexport {\n useOther,\n useOthers,\n useOthersConnectionIds,\n useOthersMapped,\n useSelf,\n useStorage,\n useStorageStatus,\n useThreads,\n useAttachmentUrl,\n useHistoryVersions,\n useRoomNotificationSettings,\n useRoomSubscriptionSettings,\n} from \"./room\";\nexport {\n useInboxNotifications,\n useNotificationSettings,\n useUpdateNotificationSettings,\n useCreateAiChat,\n useDeleteAiChat,\n useUserThreads_experimental as useUserThreads_experimental,\n useRoomInfo,\n useUnreadInboxNotificationsCount,\n useUser,\n useAiChats,\n useAiChatMessages,\n} from \"./liveblocks\";\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,SAAS,mBAAmB;AAc5B,SAAS,SAAS,oCAAoC;AAXtD,YAAY,UAAU,aAAa,UAAU;","names":[]}
1
+ {"version":3,"sources":["../src/index.ts"],"sourcesContent":["/* eslint-disable simple-import-sort/exports */\nimport { detectDupes } from \"@liveblocks/core\";\n\nimport { PKG_FORMAT, PKG_NAME, PKG_VERSION } from \"./version\";\ndetectDupes(PKG_NAME, PKG_VERSION, PKG_FORMAT);\n\nexport { ClientSideSuspense } from \"./ClientSideSuspense\";\nexport type {\n MutationContext,\n UseSendAiMessageOptions,\n UseThreadsOptions,\n} from \"./types\";\n\n// Re-exports from @liveblocks/client, for convenience\nexport type { Json, JsonObject } from \"@liveblocks/client\";\nexport { shallow, isNotificationChannelEnabled } from \"@liveblocks/client\";\n\n// Export all the top-level hooks\nexport { RegisterAiKnowledge, RegisterAiTool } from \"./ai\";\nexport type { RegisterAiKnowledgeProps, RegisterAiToolProps } from \"./types/ai\";\nexport { ClientContext, RoomContext, useClient } from \"./contexts\";\nexport {\n createLiveblocksContext,\n LiveblocksProvider,\n useDeleteAllInboxNotifications,\n useDeleteInboxNotification,\n useErrorListener,\n useInboxNotificationThread,\n useMarkAllInboxNotificationsAsRead,\n useMarkInboxNotificationAsRead,\n useSyncStatus,\n} from \"./liveblocks\";\nexport {\n createRoomContext,\n RoomProvider,\n useAddReaction,\n useBroadcastEvent,\n useCanRedo,\n useCanUndo,\n useCreateComment,\n useCreateThread,\n useDeleteComment,\n useDeleteThread,\n useEditComment,\n useEditThreadMetadata,\n useMarkThreadAsResolved,\n useMarkThreadAsUnresolved,\n useSubscribeToThread,\n useUnsubscribeFromThread,\n useEventListener,\n useHistory,\n useIsInsideRoom,\n useLostConnectionListener,\n useMarkThreadAsRead,\n useMutation,\n useMyPresence,\n useOthersListener,\n useRedo,\n useRemoveReaction,\n useRoom,\n useStatus,\n useStorageRoot,\n useThreadSubscription,\n useUndo,\n useUpdateMyPresence,\n useUpdateRoomSubscriptionSettings,\n useHistoryVersionData,\n} from \"./room\";\n\n// Export the classic (non-Suspense) versions of our hooks\n// (This part differs from src/suspense.ts)\nexport {\n useOther,\n useOthers,\n useOthersConnectionIds,\n useOthersMapped,\n useSelf,\n useStorage,\n useThreads,\n useAttachmentUrl,\n useHistoryVersions,\n useRoomSubscriptionSettings,\n} from \"./room\";\nexport {\n useInboxNotifications,\n useNotificationSettings,\n useUpdateNotificationSettings,\n useCreateAiChat,\n useDeleteAiChat,\n useSendAiMessage,\n useUserThreads_experimental as useUserThreads_experimental,\n useRoomInfo,\n useUnreadInboxNotificationsCount,\n useUser,\n useAiChat,\n useAiChats,\n useAiChatMessages,\n} from \"./liveblocks\";\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,SAAS,mBAAmB;AAc5B,SAAS,SAAS,oCAAoC;AAXtD,YAAY,UAAU,aAAa,UAAU;","names":[]}