@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.
- package/_private/package.json +2 -2
- package/dist/_private.cjs +19 -10
- package/dist/_private.cjs.map +1 -1
- package/dist/_private.d.cts +6 -3
- package/dist/_private.d.ts +6 -3
- package/dist/_private.js +15 -6
- package/dist/_private.js.map +1 -1
- package/dist/{chunk-TMKZ6U2Y.js → chunk-CS6KYNXH.js} +235 -274
- package/dist/chunk-CS6KYNXH.js.map +1 -0
- package/dist/{chunk-RB4LUCGL.cjs → chunk-UR7FENGR.cjs} +135 -174
- package/dist/chunk-UR7FENGR.cjs.map +1 -0
- package/dist/chunk-WMTIZOZ3.cjs +23 -0
- package/dist/chunk-WMTIZOZ3.cjs.map +1 -0
- package/dist/chunk-XVEMIR32.js +23 -0
- package/dist/chunk-XVEMIR32.js.map +1 -0
- package/dist/index.cjs +4 -6
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +32 -19
- package/dist/index.d.ts +32 -19
- package/dist/index.js +10 -12
- package/dist/index.js.map +1 -1
- package/dist/{room-BSt58hY4.d.cts → room-Du6_Cy1X.d.cts} +143 -124
- package/dist/{room-BSt58hY4.d.ts → room-Du6_Cy1X.d.ts} +143 -124
- package/dist/suspense.cjs +4 -8
- package/dist/suspense.cjs.map +1 -1
- package/dist/suspense.d.cts +2 -2
- package/dist/suspense.d.ts +2 -2
- package/dist/suspense.js +8 -12
- package/dist/suspense.js.map +1 -1
- package/package.json +13 -3
- package/suspense/package.json +2 -2
- package/dist/chunk-M6D2NTTI.cjs +0 -60
- package/dist/chunk-M6D2NTTI.cjs.map +0 -1
- package/dist/chunk-RB4LUCGL.cjs.map +0 -1
- package/dist/chunk-TMKZ6U2Y.js.map +0 -1
- package/dist/chunk-Z2N4O6IQ.js +0 -60
- package/dist/chunk-Z2N4O6IQ.js.map +0 -1
|
@@ -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,
|
|
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 =
|
|
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
|
package/dist/index.cjs.map
CHANGED
|
@@ -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;
|
|
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
|
-
|
|
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
|
|
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<
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
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,
|
|
79
|
+
export { ClientSideSuspense, RegisterAiKnowledge, RegisterAiKnowledgeProps, RegisterAiTool, RegisterAiToolProps };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,17 +1,10 @@
|
|
|
1
|
-
|
|
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
|
|
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<
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
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,
|
|
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
|
-
|
|
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-
|
|
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
|
|
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":[]}
|