@liveblocks/react 2.24.1 → 2.25.0-aiprivatebeta1
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/dist/_private.cjs +5 -5
- package/dist/_private.d.cts +1 -1
- package/dist/_private.d.ts +1 -1
- package/dist/_private.js +1 -1
- package/dist/{chunk-N6OQQVYV.js → chunk-E6PCFJWE.js} +169 -10
- package/dist/chunk-E6PCFJWE.js.map +1 -0
- package/dist/{chunk-RPHUEUUE.js → chunk-EDEUY3EM.js} +2 -2
- package/dist/{chunk-2C72TPGI.cjs → chunk-GSA4MPRG.cjs} +2 -2
- package/dist/chunk-GSA4MPRG.cjs.map +1 -0
- package/dist/{chunk-32HQP5F6.cjs → chunk-ZGVKI7OM.cjs} +163 -4
- package/dist/chunk-ZGVKI7OM.cjs.map +1 -0
- package/dist/index.cjs +12 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +10 -2
- package/dist/index.js.map +1 -1
- package/dist/{room-CqT08uWZ.d.cts → room-DmsjrDvP.d.cts} +86 -2
- package/dist/{room-CqT08uWZ.d.ts → room-DmsjrDvP.d.ts} +86 -2
- package/dist/suspense.cjs +12 -4
- package/dist/suspense.cjs.map +1 -1
- package/dist/suspense.d.cts +1 -1
- package/dist/suspense.d.ts +1 -1
- package/dist/suspense.js +10 -2
- package/dist/suspense.js.map +1 -1
- package/package.json +3 -3
- package/dist/chunk-2C72TPGI.cjs.map +0 -1
- package/dist/chunk-32HQP5F6.cjs.map +0 -1
- package/dist/chunk-N6OQQVYV.js.map +0 -1
- /package/dist/{chunk-RPHUEUUE.js.map → chunk-EDEUY3EM.js.map} +0 -0
package/dist/suspense.js
CHANGED
|
@@ -3,13 +3,15 @@ import {
|
|
|
3
3
|
PKG_FORMAT,
|
|
4
4
|
PKG_NAME,
|
|
5
5
|
PKG_VERSION
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-EDEUY3EM.js";
|
|
7
7
|
import {
|
|
8
8
|
ClientContext,
|
|
9
9
|
LiveblocksProvider,
|
|
10
10
|
RoomContext,
|
|
11
11
|
_RoomProvider,
|
|
12
12
|
_useAddReaction,
|
|
13
|
+
_useAiChatMessagesSuspense,
|
|
14
|
+
_useAiChatsSuspense,
|
|
13
15
|
_useBroadcastEvent,
|
|
14
16
|
_useCreateThread,
|
|
15
17
|
_useDeleteThread,
|
|
@@ -39,7 +41,9 @@ import {
|
|
|
39
41
|
useCanRedo,
|
|
40
42
|
useCanUndo,
|
|
41
43
|
useClient,
|
|
44
|
+
useCreateAiChat,
|
|
42
45
|
useCreateComment,
|
|
46
|
+
useDeleteAiChat,
|
|
43
47
|
useDeleteAllInboxNotifications,
|
|
44
48
|
useDeleteComment,
|
|
45
49
|
useDeleteInboxNotification,
|
|
@@ -69,7 +73,7 @@ import {
|
|
|
69
73
|
useUpdateNotificationSettings,
|
|
70
74
|
useUpdateRoomNotificationSettings,
|
|
71
75
|
useUpdateRoomSubscriptionSettings
|
|
72
|
-
} from "./chunk-
|
|
76
|
+
} from "./chunk-E6PCFJWE.js";
|
|
73
77
|
|
|
74
78
|
// src/suspense.ts
|
|
75
79
|
import { detectDupes } from "@liveblocks/core";
|
|
@@ -84,14 +88,18 @@ export {
|
|
|
84
88
|
isNotificationChannelEnabled,
|
|
85
89
|
shallow,
|
|
86
90
|
_useAddReaction as useAddReaction,
|
|
91
|
+
_useAiChatMessagesSuspense as useAiChatMessages,
|
|
92
|
+
_useAiChatsSuspense as useAiChats,
|
|
87
93
|
useAttachmentUrlSuspense as useAttachmentUrl,
|
|
88
94
|
useBatch,
|
|
89
95
|
_useBroadcastEvent as useBroadcastEvent,
|
|
90
96
|
useCanRedo,
|
|
91
97
|
useCanUndo,
|
|
92
98
|
useClient,
|
|
99
|
+
useCreateAiChat,
|
|
93
100
|
useCreateComment,
|
|
94
101
|
_useCreateThread as useCreateThread,
|
|
102
|
+
useDeleteAiChat,
|
|
95
103
|
useDeleteAllInboxNotifications,
|
|
96
104
|
useDeleteComment,
|
|
97
105
|
useDeleteInboxNotification,
|
package/dist/suspense.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/suspense.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 {\n ClientContext,\n LiveblocksProvider,\n useClient,\n useInboxNotificationThread,\n useMarkAllInboxNotificationsAsRead,\n useMarkInboxNotificationAsRead,\n useDeleteAllInboxNotifications,\n useDeleteInboxNotification,\n useUpdateNotificationSettings,\n useSyncStatus,\n useErrorListener,\n} from \"./liveblocks\";\nexport {\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} from \"./room\";\n\n// Export the Suspense versions of our hooks\n// (This part differs from src/index.ts)\nexport {\n useOtherSuspense as useOther,\n useOthersSuspense as useOthers,\n useOthersConnectionIdsSuspense as useOthersConnectionIds,\n useOthersMappedSuspense as useOthersMapped,\n useSelfSuspense as useSelf,\n useStorageSuspense as useStorage,\n useStorageStatusSuspense as useStorageStatus,\n useThreadsSuspense as useThreads,\n useAttachmentUrlSuspense as useAttachmentUrl,\n useHistoryVersionsSuspense as useHistoryVersions,\n useRoomNotificationSettingsSuspense as useRoomNotificationSettings,\n useRoomSubscriptionSettingsSuspense as useRoomSubscriptionSettings,\n} from \"./room\";\nexport {\n useInboxNotificationsSuspense as useInboxNotifications,\n useNotificationSettingsSuspense as useNotificationSettings,\n useRoomInfoSuspense as useRoomInfo,\n useUnreadInboxNotificationsCountSuspense as useUnreadInboxNotificationsCount,\n useUserSuspense as useUser,\n useUserThreadsSuspense_experimental as useUserThreads_experimental,\n} from \"./liveblocks\";\n"],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../src/suspense.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 {\n ClientContext,\n LiveblocksProvider,\n useClient,\n useInboxNotificationThread,\n useMarkAllInboxNotificationsAsRead,\n useMarkInboxNotificationAsRead,\n useDeleteAllInboxNotifications,\n useDeleteInboxNotification,\n useUpdateNotificationSettings,\n useCreateAiChat,\n useDeleteAiChat,\n useSyncStatus,\n useErrorListener,\n} from \"./liveblocks\";\nexport {\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} from \"./room\";\n\n// Export the Suspense versions of our hooks\n// (This part differs from src/index.ts)\nexport {\n useOtherSuspense as useOther,\n useOthersSuspense as useOthers,\n useOthersConnectionIdsSuspense as useOthersConnectionIds,\n useOthersMappedSuspense as useOthersMapped,\n useSelfSuspense as useSelf,\n useStorageSuspense as useStorage,\n useStorageStatusSuspense as useStorageStatus,\n useThreadsSuspense as useThreads,\n useAttachmentUrlSuspense as useAttachmentUrl,\n useHistoryVersionsSuspense as useHistoryVersions,\n useRoomNotificationSettingsSuspense as useRoomNotificationSettings,\n useRoomSubscriptionSettingsSuspense as useRoomSubscriptionSettings,\n} from \"./room\";\nexport {\n useInboxNotificationsSuspense as useInboxNotifications,\n useNotificationSettingsSuspense as useNotificationSettings,\n useRoomInfoSuspense as useRoomInfo,\n useUnreadInboxNotificationsCountSuspense as useUnreadInboxNotificationsCount,\n useUserSuspense as useUser,\n useUserThreadsSuspense_experimental as useUserThreads_experimental,\n useAiChatsSuspense as useAiChats,\n useAiChatMessagesSuspense as useAiChatMessages,\n} from \"./liveblocks\";\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,SAAS,mBAAmB;AAc5B,SAAS,SAAS,oCAAoC;AAXtD,YAAY,UAAU,aAAa,UAAU;","names":[]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@liveblocks/react",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.25.0-aiprivatebeta1",
|
|
4
4
|
"description": "A set of React hooks and providers to use Liveblocks declaratively. 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": "module",
|
|
@@ -61,8 +61,8 @@
|
|
|
61
61
|
"showdeps": "depcruise src --include-only '^src' --exclude='__tests__' --output-type dot | dot -T svg > /tmp/dependency-graph.svg && open /tmp/dependency-graph.svg"
|
|
62
62
|
},
|
|
63
63
|
"dependencies": {
|
|
64
|
-
"@liveblocks/client": "2.
|
|
65
|
-
"@liveblocks/core": "2.
|
|
64
|
+
"@liveblocks/client": "2.25.0-aiprivatebeta1",
|
|
65
|
+
"@liveblocks/core": "2.25.0-aiprivatebeta1"
|
|
66
66
|
},
|
|
67
67
|
"peerDependencies": {
|
|
68
68
|
"react": "^18 || ^19 || ^19.0.0-rc"
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["/home/runner/work/liveblocks/liveblocks/packages/liveblocks-react/dist/chunk-2C72TPGI.cjs","../src/version.ts","../src/ClientSideSuspense.tsx"],"names":[],"mappings":"AAAA;ACGO,IAAM,SAAA,EAAW,mBAAA;AACjB,IAAM,YAAA,EAAiD,QAAA;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-2C72TPGI.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"]}
|