@liveblocks/react-ui
Advanced tools
Comparing version 2.8.0-beta1 to 2.8.0-beta2
@@ -21,2 +21,3 @@ 'use client'; | ||
const MAX_DISPLAYED_MEDIA_SIZE = 60 * 1024 * 1024; | ||
const fileExtensionRegex = /^(.+?)(\.[^.]+)?$/; | ||
@@ -117,3 +118,3 @@ function splitFileName(name) { | ||
const isUploaded = attachment.type === "attachment" || attachment.status === "uploaded"; | ||
if (isUploaded && isInsideRoom) { | ||
if (isUploaded && isInsideRoom && attachment.size <= MAX_DISPLAYED_MEDIA_SIZE) { | ||
if (attachment.mimeType.startsWith("image/")) { | ||
@@ -300,3 +301,3 @@ return /* @__PURE__ */ React.createElement(AttachmentImagePreview, { | ||
for (const attachment of attachments) { | ||
if (attachment.mimeType.startsWith("image/") || attachment.mimeType.startsWith("video/")) { | ||
if ((attachment.mimeType.startsWith("image/") || attachment.mimeType.startsWith("video/")) && attachment.size <= MAX_DISPLAYED_MEDIA_SIZE) { | ||
mediaAttachments.push(attachment); | ||
@@ -303,0 +304,0 @@ } else { |
@@ -642,4 +642,4 @@ 'use client'; | ||
); | ||
const MAX_ATTACHMENTS = 5; | ||
const MAX_ATTACHMENT_SIZE = 20 * 1024 * 1024; | ||
const MAX_ATTACHMENTS = 10; | ||
const MAX_ATTACHMENT_SIZE = 1024 * 1024 * 1024; | ||
const ComposerForm = React.forwardRef( | ||
@@ -901,2 +901,3 @@ ({ | ||
return /* @__PURE__ */ React.createElement(Component, { | ||
type: "button", | ||
...props, | ||
@@ -903,0 +904,0 @@ onClick: handleClick, |
@@ -233,3 +233,3 @@ 'use strict'; | ||
status: "error", | ||
error | ||
error: error instanceof core.CommentsApiError && error.status === 413 ? new AttachmentTooLargeError("File is too large.") : error | ||
}); | ||
@@ -236,0 +236,0 @@ notifySubscribers(); |
@@ -14,3 +14,3 @@ 'use strict'; | ||
if (!files.length) { | ||
files = Array.from(dataTransfer.files); | ||
files = Array.from(dataTransfer.files).filter((file) => file.type !== ""); | ||
} | ||
@@ -17,0 +17,0 @@ return files; |
'use strict'; | ||
const PKG_NAME = "@liveblocks/react-ui"; | ||
const PKG_VERSION = "2.8.0-beta1"; | ||
const PKG_VERSION = "2.8.0-beta2"; | ||
const PKG_FORMAT = "cjs"; | ||
@@ -6,0 +6,0 @@ |
{ | ||
"name": "@liveblocks/react-ui", | ||
"version": "2.8.0-beta1", | ||
"version": "2.8.0-beta2", | ||
"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.", | ||
@@ -78,5 +78,5 @@ "license": "Apache-2.0", | ||
"@floating-ui/react-dom": "^2.1.1", | ||
"@liveblocks/client": "2.8.0-beta1", | ||
"@liveblocks/core": "2.8.0-beta1", | ||
"@liveblocks/react": "2.8.0-beta1", | ||
"@liveblocks/client": "2.8.0-beta2", | ||
"@liveblocks/core": "2.8.0-beta2", | ||
"@liveblocks/react": "2.8.0-beta2", | ||
"@radix-ui/react-dropdown-menu": "^2.0.6", | ||
@@ -83,0 +83,0 @@ "@radix-ui/react-popover": "^1.0.7", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
1601598
17183
+ Added@liveblocks/client@2.8.0-beta2(transitive)
+ Added@liveblocks/core@2.8.0-beta2(transitive)
+ Added@liveblocks/react@2.8.0-beta2(transitive)
- Removed@liveblocks/client@2.8.0-beta1(transitive)
- Removed@liveblocks/core@2.8.0-beta1(transitive)
- Removed@liveblocks/react@2.8.0-beta1(transitive)
Updated@liveblocks/core@2.8.0-beta2