@1agh/maude 0.52.2 → 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.
- package/apps/studio/canvas-build.ts +91 -0
- package/apps/studio/canvas-lib.tsx +12 -1
- package/apps/studio/canvas-shell.tsx +60 -11
- package/apps/studio/client/app.jsx +183 -98
- package/apps/studio/client/canvas-url.js +6 -0
- package/apps/studio/client/styles/3-shell-maude.css +7 -0
- package/apps/studio/comments-overlay.tsx +59 -51
- package/apps/studio/dist/client.bundle.js +1266 -1266
- package/apps/studio/dist/comment-mount.js +2 -2
- package/apps/studio/dist/styles.css +1 -1
- package/apps/studio/http.ts +93 -2
- package/apps/studio/read-only-mode.ts +36 -0
- package/apps/studio/test/canvas-url.test.ts +13 -0
- package/apps/studio/test/read-only-gate.test.ts +130 -0
- package/apps/studio/test/use-tool-mode.test.tsx +23 -0
- package/apps/studio/tool-palette.tsx +65 -51
- package/apps/studio/use-keyboard-discipline.tsx +6 -0
- package/apps/studio/use-tool-mode.tsx +37 -7
- package/apps/studio/whats-new.json +28 -1
- package/cli/bin/maude.mjs +0 -1
- package/package.json +8 -8
- package/cli/commands/share.mjs +0 -188
- package/cli/lib/share-plan.mjs +0 -100
- package/cli/lib/share-plan.test.mjs +0 -66
|
@@ -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
|
-
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
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
|
-
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
|
|
1236
|
-
|
|
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
|
}
|