@refraction-ui/react 0.10.0 → 0.11.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.
@@ -61,9 +61,15 @@ interface ChatMessage {
61
61
  error?: string;
62
62
  /**
63
63
  * Root message id of the reply-thread this message belongs to. Absent on
64
- * root/main-timeline messages. Threads are one level deep.
64
+ * root/main-timeline messages. Threads are one level deep — a reply to any
65
+ * message in a thread groups under the same originating root.
65
66
  */
66
67
  parentId?: string;
68
+ /**
69
+ * The specific message this is "in reply to" (for the quote), which may be a
70
+ * mid-thread reply even though `parentId` is always the originating root.
71
+ */
72
+ replyToId?: string;
67
73
  /** Emoji reactions */
68
74
  reactions?: MessageReaction[];
69
75
  /** Attachments (images/gifs/files) */
@@ -124,6 +130,8 @@ interface ConversationState {
124
130
  messages: ChatMessage[];
125
131
  /** Root id of the thread shown in the side panel, or null when closed */
126
132
  openThreadRootId: string | null;
133
+ /** The specific message a reply in the open thread will target (default: the root) */
134
+ replyTarget: string | null;
127
135
  /** Current threading mode */
128
136
  threadingMode: ThreadingMode;
129
137
  /** Coarse store status */
@@ -192,8 +200,10 @@ interface ConversationAPI {
192
200
  retryLast(): Promise<void>;
193
201
  /** Abort the in-flight stream, keeping any partial reply */
194
202
  stop(): void;
195
- /** Open the side panel focused on a message's thread */
203
+ /** Open the side panel focused on a message's thread (reply target = root) */
196
204
  openThread(rootId: string): void;
205
+ /** Open the originating thread and target a specific message for the next reply */
206
+ replyTo(messageId: string): void;
197
207
  /** Close the thread side panel */
198
208
  closeThread(): void;
199
209
  /** Switch threading mode */
@@ -61,9 +61,15 @@ interface ChatMessage {
61
61
  error?: string;
62
62
  /**
63
63
  * Root message id of the reply-thread this message belongs to. Absent on
64
- * root/main-timeline messages. Threads are one level deep.
64
+ * root/main-timeline messages. Threads are one level deep — a reply to any
65
+ * message in a thread groups under the same originating root.
65
66
  */
66
67
  parentId?: string;
68
+ /**
69
+ * The specific message this is "in reply to" (for the quote), which may be a
70
+ * mid-thread reply even though `parentId` is always the originating root.
71
+ */
72
+ replyToId?: string;
67
73
  /** Emoji reactions */
68
74
  reactions?: MessageReaction[];
69
75
  /** Attachments (images/gifs/files) */
@@ -124,6 +130,8 @@ interface ConversationState {
124
130
  messages: ChatMessage[];
125
131
  /** Root id of the thread shown in the side panel, or null when closed */
126
132
  openThreadRootId: string | null;
133
+ /** The specific message a reply in the open thread will target (default: the root) */
134
+ replyTarget: string | null;
127
135
  /** Current threading mode */
128
136
  threadingMode: ThreadingMode;
129
137
  /** Coarse store status */
@@ -192,8 +200,10 @@ interface ConversationAPI {
192
200
  retryLast(): Promise<void>;
193
201
  /** Abort the in-flight stream, keeping any partial reply */
194
202
  stop(): void;
195
- /** Open the side panel focused on a message's thread */
203
+ /** Open the side panel focused on a message's thread (reply target = root) */
196
204
  openThread(rootId: string): void;
205
+ /** Open the originating thread and target a specific message for the next reply */
206
+ replyTo(messageId: string): void;
197
207
  /** Close the thread side panel */
198
208
  closeThread(): void;
199
209
  /** Switch threading mode */
@@ -18,6 +18,7 @@ interface UseConversationResult {
18
18
  retryLast: ConversationAPI['retryLast'];
19
19
  stop: ConversationAPI['stop'];
20
20
  openThread: ConversationAPI['openThread'];
21
+ replyTo: ConversationAPI['replyTo'];
21
22
  closeThread: ConversationAPI['closeThread'];
22
23
  setThreadingMode: ConversationAPI['setThreadingMode'];
23
24
  }
@@ -18,6 +18,7 @@ interface UseConversationResult {
18
18
  retryLast: ConversationAPI['retryLast'];
19
19
  stop: ConversationAPI['stop'];
20
20
  openThread: ConversationAPI['openThread'];
21
+ replyTo: ConversationAPI['replyTo'];
21
22
  closeThread: ConversationAPI['closeThread'];
22
23
  setThreadingMode: ConversationAPI['setThreadingMode'];
23
24
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@refraction-ui/react",
3
- "version": "0.10.0",
3
+ "version": "0.11.0",
4
4
  "description": "All Refraction UI React components in one package — headless, accessible, zero-dependency",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",