@cord-sdk/react
Advanced tools
Comparing version 1.1.0 to 1.2.0
@@ -152,3 +152,3 @@ import * as React from 'react'; | ||
navigate, | ||
react_package_version: "1.1.0", | ||
react_package_version: "1.2.0", | ||
thread_options: threadOptions | ||
@@ -1128,3 +1128,8 @@ ? { | ||
return (React.createElement("div", { className: thread, "data-cord-thread-id": threadId }, | ||
React.createElement(Message, { messageId: (_b = threadSummary.firstMessage) === null || _b === void 0 ? void 0 : _b.id, threadId: threadId, markAsSeen: false, onClick: () => { | ||
React.createElement(Message, { messageId: (_b = threadSummary.firstMessage) === null || _b === void 0 ? void 0 : _b.id, threadId: threadId, | ||
// Marking a single message as seen is not available just yet. When | ||
// we have a thread with no replies, we shouldn't be stuck in unread | ||
// state. If the message has replies, we can wait for the user to open | ||
// the replies to mark it as seen. | ||
markAsSeen: threadSummary.total === 1, onClick: () => { | ||
var _a, _b; | ||
@@ -1171,3 +1176,3 @@ return onMessageClick === null || onMessageClick === void 0 ? void 0 : onMessageClick({ | ||
}), onClick: () => setShowingReplies(true), type: "button" }, | ||
React.createElement(Facepile, { users: threadSummary.participants.map((p) => { var _a; return (_a = p.userID) !== null && _a !== void 0 ? _a : ''; }), enableTooltip: false }), | ||
React.createElement(Facepile, { users: threadSummary.repliers, enableTooltip: false }), | ||
hasUnread | ||
@@ -1208,3 +1213,3 @@ ? pluralize(unreadNumber, 'new reply', 'new replies') | ||
userId && React.createElement(Avatar, { userId: userId }), | ||
React.createElement(Composer, { threadId: threadId, showCloseButton: true, onClose: () => setShowingReplyComposer(false), size: 'small' }))); | ||
React.createElement(Composer, { threadId: threadId, showCloseButton: true, onClose: () => setShowingReplyComposer(false), size: 'small', autofocus: true }))); | ||
} | ||
@@ -1211,0 +1216,0 @@ function ReplyButton({ onClick }) { |
{ | ||
"name": "@cord-sdk/react", | ||
"description": "React components for Cord", | ||
"version": "1.1.0", | ||
"version": "1.2.0", | ||
"homepage": "https://docs.cord.com/", | ||
@@ -22,4 +22,4 @@ "license": "MIT", | ||
"dependencies": { | ||
"@cord-sdk/components": "1.1.0", | ||
"@cord-sdk/types": "1.1.0", | ||
"@cord-sdk/components": "1.2.0", | ||
"@cord-sdk/types": "1.2.0", | ||
"classnames": "^2.3.1" | ||
@@ -31,3 +31,3 @@ }, | ||
"devDependencies": { | ||
"@cord-sdk/jsx": "1.1.0", | ||
"@cord-sdk/jsx": "1.2.0", | ||
"@types/react": "^17.0.43", | ||
@@ -34,0 +34,0 @@ "@vanilla-extract/css": "^1.10.0", |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
212260
71
4401
1
+ Added@cord-sdk/components@1.2.0(transitive)
+ Added@cord-sdk/types@1.2.0(transitive)
- Removed@cord-sdk/components@1.1.0(transitive)
- Removed@cord-sdk/types@1.1.0(transitive)
Updated@cord-sdk/components@1.2.0
Updated@cord-sdk/types@1.2.0