@1agh/maude 0.52.1 → 0.53.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.
@@ -50,6 +50,7 @@
50
50
  import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
51
51
 
52
52
  import { resolveByDomPath } from './dom-selection.ts';
53
+ import { isReadOnlyCanvas } from './read-only-mode.ts';
53
54
  import { useCollab } from './use-collab.tsx';
54
55
  import { useSelectionSetOptional } from './use-selection-set.tsx';
55
56
 
@@ -1182,58 +1183,65 @@ function CommentThread({
1182
1183
  </div>
1183
1184
  ))}
1184
1185
 
1185
- <div className="cm-thread__reply-form">
1186
- <MentionAwareTextarea
1187
- textareaRef={replyRef}
1188
- className="cm-thread__reply-textarea"
1189
- value={reply}
1190
- placeholder="Reply… ⌘↵ to send · @name to tag"
1191
- onChange={setReply}
1192
- onKeyDown={onReplyKeyDown}
1193
- rows={2}
1194
- ariaLabel="Reply"
1195
- disabled={sending}
1196
- />
1197
- <div className="cm-thread__reply-actions">
1198
- <button
1199
- type="button"
1200
- className="cm-btn cm-btn--primary"
1201
- disabled={!reply.trim() || sending}
1202
- onClick={() => void trySendReply()}
1203
- >
1204
- Send
1205
- </button>
1206
- </div>
1207
- </div>
1186
+ {/* Cloud Phase 25 C2 — a read-only session VIEWS threads; reply /
1187
+ resolve / delete are absent until C3 puts comments on the cell's
1188
+ read-only allowlist (the cell refuses them today). */}
1189
+ {!isReadOnlyCanvas() && (
1190
+ <>
1191
+ <div className="cm-thread__reply-form">
1192
+ <MentionAwareTextarea
1193
+ textareaRef={replyRef}
1194
+ className="cm-thread__reply-textarea"
1195
+ value={reply}
1196
+ placeholder="Reply… ⌘↵ to send · @name to tag"
1197
+ onChange={setReply}
1198
+ onKeyDown={onReplyKeyDown}
1199
+ rows={2}
1200
+ ariaLabel="Reply"
1201
+ disabled={sending}
1202
+ />
1203
+ <div className="cm-thread__reply-actions">
1204
+ <button
1205
+ type="button"
1206
+ className="cm-btn cm-btn--primary"
1207
+ disabled={!reply.trim() || sending}
1208
+ onClick={() => void trySendReply()}
1209
+ >
1210
+ Send
1211
+ </button>
1212
+ </div>
1213
+ </div>
1208
1214
 
1209
- <div className="cm-thread__actions">
1210
- {comment.status === 'resolved' ? (
1211
- <button type="button" className="cm-btn" onClick={() => onPatch({ status: 'open' })}>
1212
- ↺ Reopen
1213
- </button>
1214
- ) : (
1215
- <button
1216
- type="button"
1217
- className="cm-btn cm-btn--primary"
1218
- onClick={() => {
1219
- onPatch({ status: 'resolved' });
1220
- onClose();
1221
- }}
1222
- >
1223
- ✓ Resolve
1224
- </button>
1225
- )}
1226
- <button
1227
- type="button"
1228
- className="cm-btn cm-btn--danger"
1229
- onClick={() => {
1230
- onDelete();
1231
- onClose();
1232
- }}
1233
- >
1234
- Delete
1235
- </button>
1236
- </div>
1215
+ <div className="cm-thread__actions">
1216
+ {comment.status === 'resolved' ? (
1217
+ <button type="button" className="cm-btn" onClick={() => onPatch({ status: 'open' })}>
1218
+ ↺ Reopen
1219
+ </button>
1220
+ ) : (
1221
+ <button
1222
+ type="button"
1223
+ className="cm-btn cm-btn--primary"
1224
+ onClick={() => {
1225
+ onPatch({ status: 'resolved' });
1226
+ onClose();
1227
+ }}
1228
+ >
1229
+ ✓ Resolve
1230
+ </button>
1231
+ )}
1232
+ <button
1233
+ type="button"
1234
+ className="cm-btn cm-btn--danger"
1235
+ onClick={() => {
1236
+ onDelete();
1237
+ onClose();
1238
+ }}
1239
+ >
1240
+ Delete
1241
+ </button>
1242
+ </div>
1243
+ </>
1244
+ )}
1237
1245
  </div>
1238
1246
  );
1239
1247
  }