@cueloop/client 0.1.0-alpha.76 → 0.1.0-alpha.78

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.
Files changed (82) hide show
  1. package/package.json +5 -5
  2. package/src/App.autoclose.test.tsx +3 -3
  3. package/src/App.diff.test.tsx +14 -2
  4. package/src/App.export.test.tsx +1 -2
  5. package/src/App.identity.test.tsx +78 -0
  6. package/src/App.plan-review.test.tsx +16 -0
  7. package/src/App.share-choice.test.tsx +105 -0
  8. package/src/App.submit-confirm.test.tsx +34 -5
  9. package/src/App.test.tsx +2 -2
  10. package/src/App.toast.test.tsx +3 -1
  11. package/src/App.tsx +180 -5
  12. package/src/App.walk.test.tsx +2 -2
  13. package/src/__snapshots__/view-plan.regression.test.ts.snap +1 -1
  14. package/src/ansi-screen.test.ts +28 -0
  15. package/src/ansi-screen.ts +72 -0
  16. package/src/app-screens.tsx +20 -3
  17. package/src/app-view-model.ts +4 -0
  18. package/src/components/AnnotatableFileView.tsx +10 -2
  19. package/src/components/AnnotationCards.tsx +40 -6
  20. package/src/components/AnsiScreen.stories.tsx +12 -0
  21. package/src/components/AnsiScreen.tsx +28 -0
  22. package/src/components/CompletionOverlay.stories.tsx +15 -1
  23. package/src/components/CompletionOverlay.tsx +22 -5
  24. package/src/components/ConfirmCard.stories.tsx +2 -0
  25. package/src/components/ConfirmCard.tsx +45 -18
  26. package/src/components/ConfirmDialog.tsx +11 -12
  27. package/src/components/DiffContentView.tsx +9 -5
  28. package/src/components/FileContentsView.tsx +1 -1
  29. package/src/components/GridTabContent.tsx +2 -0
  30. package/src/components/ManageAccessDialog.stories.tsx +36 -0
  31. package/src/components/ManageAccessDialog.test.tsx +94 -0
  32. package/src/components/ManageAccessDialog.tsx +122 -0
  33. package/src/components/PromptDialog.test.tsx +2 -2
  34. package/src/components/PromptDialog.tsx +9 -10
  35. package/src/components/ShareChoiceDialog.stories.tsx +34 -0
  36. package/src/components/ShareChoiceDialog.test.tsx +103 -0
  37. package/src/components/ShareChoiceDialog.tsx +80 -0
  38. package/src/components/SlashComposer.stories.tsx +37 -0
  39. package/src/components/SlashComposer.tsx +87 -0
  40. package/src/components/ThreadTree.tsx +11 -6
  41. package/src/components/ThreadView.selection.test.tsx +88 -1
  42. package/src/components/ThreadView.slash.test.tsx +0 -1
  43. package/src/components/ThreadView.tsx +71 -8
  44. package/src/components/Toast.tsx +0 -5
  45. package/src/components/WalkWizard.stories.tsx +2 -2
  46. package/src/components/WalkWizard.tsx +10 -12
  47. package/src/components/__snapshots__/stories.test.tsx.snap +277 -61
  48. package/src/components/primitives/Card.tsx +3 -0
  49. package/src/components/primitives/DialogActions.stories.tsx +20 -0
  50. package/src/components/primitives/DialogActions.tsx +39 -0
  51. package/src/components/session-tree.ts +7 -6
  52. package/src/components/stories-app.tsx +13 -4
  53. package/src/components/stories.test.tsx +8 -1
  54. package/src/components/story-tree.test.ts +32 -24
  55. package/src/components/story.ts +32 -15
  56. package/src/config-identity.test.ts +78 -0
  57. package/src/config.ts +44 -1
  58. package/src/diff-intraline.test.ts +75 -2
  59. package/src/diff-intraline.ts +95 -26
  60. package/src/github-identity.test.ts +58 -0
  61. package/src/github-identity.ts +41 -0
  62. package/src/intent-dispatch.test.ts +17 -2
  63. package/src/intent-dispatch.ts +7 -1
  64. package/src/keymap.test.ts +2 -2
  65. package/src/keymap.ts +1 -1
  66. package/src/pasted-image.test.ts +67 -0
  67. package/src/pasted-image.ts +60 -0
  68. package/src/run.ts +31 -19
  69. package/src/serve.ts +1 -1
  70. package/src/share.ts +11 -3
  71. package/src/slash-palette.test.ts +17 -0
  72. package/src/slash-palette.ts +11 -0
  73. package/src/thread-controller.curate.test.ts +1 -0
  74. package/src/thread-controller.derivation.test.ts +62 -0
  75. package/src/thread-controller.live-diff.test.ts +1 -0
  76. package/src/thread-controller.optimistic.test.ts +69 -0
  77. package/src/thread-controller.share.test.ts +36 -2
  78. package/src/thread-controller.switch-cache.test.ts +146 -0
  79. package/src/thread-controller.tree.test.ts +1 -0
  80. package/src/thread-controller.ts +171 -24
  81. package/src/use-annotation-surface.tsx +53 -29
  82. package/src/use-settings-dialog.tsx +24 -0
@@ -1,4 +1,4 @@
1
- // Bun Snapshot v1, https://goo.gl/fbAQLP
1
+ // Bun Snapshot v1, https://bun.sh/docs/test/snapshots
2
2
 
3
3
  exports[`stories catalog Surfaces/AnnotatableFileView/Loaded renders, snapshots, and carries its colors: Surfaces/AnnotatableFileView/Loaded 1`] = `
4
4
  " ▎1 export function add(a: number, b: number): number {
@@ -17,12 +17,12 @@ exports[`stories catalog Surfaces/AnnotatableFileView/Loaded renders, snapshots,
17
17
  `;
18
18
 
19
19
  exports[`stories catalog Chrome/AnnotationCards/FocusedCard renders, snapshots, and carries its colors: Chrome/AnnotationCards/FocusedCard 1`] = `
20
- "
21
- ╻────────────────────────────────────────────────────────┐
20
+ " ╻────────────────────────────────────────────────────────┐
22
21
  ┃ ● Needs an eviction story. │
23
22
  ╹────────────────────────────────────────────────────────┘
24
23
 
25
24
 
25
+
26
26
  "
27
27
  `;
28
28
 
@@ -39,14 +39,26 @@ exports[`stories catalog Chrome/AnnotationCards/SlashPaletteOpen renders, snapsh
39
39
  `;
40
40
 
41
41
  exports[`stories catalog Chrome/AnnotationCards/TwoVoices renders, snapshots, and carries its colors: Chrome/AnnotationCards/TwoVoices 1`] = `
42
- "
43
- ╷────────────────────────────────────────────────────────┐
42
+ " ╷────────────────────────────────────────────────────────┐
44
43
  │ ● Which daemon? │
45
44
  │ ○ The one the CLI spawns. │
46
45
  ╵────────────────────────────────────────────────────────┘
47
46
 
48
47
 
49
48
 
49
+
50
+ "
51
+ `;
52
+
53
+ exports[`stories catalog Primitives/AnsiScreen/Positioned renders, snapshots, and carries its colors: Primitives/AnsiScreen/Positioned 1`] = `
54
+ "
55
+ Hello from
56
+
57
+ raw, positioned ANSI
58
+
59
+
60
+
61
+
50
62
  "
51
63
  `;
52
64
 
@@ -308,8 +320,8 @@ exports[`stories catalog Overlays/CompletionOverlay/ApprovedPrompt renders, snap
308
320
 
309
321
  The agent has your approval and is unblocked.
310
322
 
311
- close [return] · return to plan [esc] · always [a]
312
323
 
324
+ close back to plan always
313
325
 
314
326
 
315
327
 
@@ -336,9 +348,9 @@ exports[`stories catalog Overlays/CompletionOverlay/FeedbackCounting renders, sn
336
348
  The agent has your feedback and is unblocked.
337
349
  returning to agent/worker-3 on close
338
350
  exported to vault/cueloop/plan.md
351
+ closing in 3s
339
352
 
340
- close [return] · closing in 3s · return to plan [esc] · always [a]
341
-
353
+ close back to plan always
342
354
 
343
355
 
344
356
 
@@ -351,13 +363,13 @@ exports[`stories catalog Overlays/CompletionOverlay/FeedbackCounting renders, sn
351
363
  `;
352
364
 
353
365
  exports[`stories catalog Cards/ConfirmCard/ApproveDefault renders, snapshots, and carries its colors: Cards/ConfirmCard/ApproveDefault 1`] = `
354
- "┌──────────────────────────────────────┐
355
- │ Comment [Approve] Changes │
356
- │ │
357
- │ summary for the agent (optional) │
358
- │ │
359
- │ send message Cancel │
360
- └──────────────────────────────────────┘
366
+ "┌────────────────────────────────┐
367
+ │ Comment [Approve] Changes │
368
+ │ │
369
+ │ summary for the agent ( │
370
+ │ │
371
+ │ send cancel │
372
+ └────────────────────────────────┘
361
373
 
362
374
 
363
375
 
@@ -369,13 +381,13 @@ exports[`stories catalog Cards/ConfirmCard/ApproveDefault renders, snapshots, an
369
381
  `;
370
382
 
371
383
  exports[`stories catalog Cards/ConfirmCard/RequestChanges renders, snapshots, and carries its colors: Cards/ConfirmCard/RequestChanges 1`] = `
372
- "┌──────────────────────────────────────┐
373
- │ Comment Approve [Changes] │
374
- │ │
375
- │ Tighten the steps. │
376
- │ │
377
- │ send message Cancel │
378
- └──────────────────────────────────────┘
384
+ "┌────────────────────────────────┐
385
+ │ Comment Approve [Changes] │
386
+ │ │
387
+ │ Tighten the steps. │
388
+ │ │
389
+ │ send cancel │
390
+ └────────────────────────────────┘
379
391
 
380
392
 
381
393
 
@@ -387,15 +399,15 @@ exports[`stories catalog Cards/ConfirmCard/RequestChanges renders, snapshots, an
387
399
  `;
388
400
 
389
401
  exports[`stories catalog Cards/ConfirmCard/WithViewedSummary renders, snapshots, and carries its colors: Cards/ConfirmCard/WithViewedSummary 1`] = `
390
- "┌──────────────────────────────────────┐
391
- │ 2/3 files viewed │
392
- │ │
393
- │ Comment [Approve] Changes │
394
- │ │
395
- │ summary for the agent (optional) │
396
- │ │
397
- │ send message Cancel │
398
- └──────────────────────────────────────┘
402
+ "┌────────────────────────────────┐
403
+ │ 2/3 files viewed │
404
+ │ │
405
+ │ Comment [Approve] Changes │
406
+ │ │
407
+ │ summary for the agent ( │
408
+ │ │
409
+ │ send cancel │
410
+ └────────────────────────────────┘
399
411
 
400
412
 
401
413
 
@@ -415,7 +427,7 @@ exports[`stories catalog Overlays/ConfirmDialog/DeletePlan renders, snapshots, a
415
427
  │ Delete "Auth rollout"? This removes the plan and │
416
428
  │ its review. │
417
429
  │ │
418
- │ Delete Cancel esc │
430
+ │ delete cancel │
419
431
  └────────────────────────────────────────────────────┘
420
432
 
421
433
 
@@ -432,9 +444,8 @@ exports[`stories catalog Surfaces/DiffContentView/AnnotatedLine renders, snapsho
432
444
  ▎1 1 export class Store {
433
445
  2 - private items = [];
434
446
  2 + private items = new Map();
435
-
436
- ╷─────────────────────────────────────────────────────────────────────────────────┐ ○
437
- │ ● Map needs an eviction story. │
447
+ ╷─────────────────────────────────────────────────────────────────────────────────┐
448
+ │ ● Map needs an eviction story. │ ○
438
449
  ╵─────────────────────────────────────────────────────────────────────────────────┘
439
450
  3 3 }
440
451
 
@@ -443,6 +454,7 @@ exports[`stories catalog Surfaces/DiffContentView/AnnotatedLine renders, snapsho
443
454
 
444
455
 
445
456
 
457
+
446
458
  "
447
459
  `;
448
460
 
@@ -513,10 +525,9 @@ exports[`stories catalog Surfaces/DiffContentView/SplitView renders, snapshots,
513
525
  @@ -1,4 +1,4 @@
514
526
  1 export class Store { │▎ 1 export class Store {
515
527
  2 - private items = []; │ 2 + private items = new Map();
516
- │
517
528
  │ ╷─────────────────────────────────────────────────────┐
518
- │ │ ● Map needs an eviction story. │ ○
519
- │ ╵─────────────────────────────────────────────────────┘
529
+ │ │ ● Map needs an eviction story. │
530
+ │ ╵─────────────────────────────────────────────────────┘ ○
520
531
  3 } │ 3 }
521
532
 
522
533
 
@@ -525,6 +536,7 @@ exports[`stories catalog Surfaces/DiffContentView/SplitView renders, snapshots,
525
536
 
526
537
 
527
538
 
539
+
528
540
  "
529
541
  `;
530
542
 
@@ -667,6 +679,50 @@ exports[`stories catalog Overlays/KeybindsDialog/Cheatsheet renders, snapshots,
667
679
 
668
680
 
669
681
 
682
+ "
683
+ `;
684
+
685
+ exports[`stories catalog Dialogs/ManageAccess/Empty renders, snapshots, and carries its colors: Dialogs/ManageAccess/Empty 1`] = `
686
+ "
687
+
688
+
689
+
690
+
691
+ ┌─ Manage access ────────────────────────────────────┐
692
+ │ Only these GitHub users can open the private link. │
693
+ │ │
694
+ │ no one yet - add a handle below │
695
+ │ │
696
+ │ │
697
+ │ @handle │
698
+ │ add create link close │
699
+ └────────────────────────────────────────────────────┘
700
+
701
+
702
+
703
+
704
+ "
705
+ `;
706
+
707
+ exports[`stories catalog Dialogs/ManageAccess/WithHandles renders, snapshots, and carries its colors: Dialogs/ManageAccess/WithHandles 1`] = `
708
+ "
709
+
710
+
711
+
712
+ ┌─ Manage access ────────────────────────────────────┐
713
+ │ Only these GitHub users can open the private link. │
714
+ │ │
715
+ │ @octocat remove │
716
+ │ @hubot remove │
717
+ │ │
718
+ │ │
719
+ │ │
720
+ │ @handle │
721
+ │ add create link close │
722
+ └────────────────────────────────────────────────────┘
723
+
724
+
725
+
670
726
  "
671
727
  `;
672
728
 
@@ -793,7 +849,7 @@ exports[`stories catalog Overlays/PromptDialog/NameYourself renders, snapshots,
793
849
  │ Your name (optional) - it attributes the notes │
794
850
  │ you leave: │
795
851
  │ your name │
796
- │ enter save esc cancel │
852
+ │ save cancel │
797
853
  └────────────────────────────────────────────────────┘
798
854
 
799
855
 
@@ -813,7 +869,7 @@ exports[`stories catalog Overlays/PromptDialog/RenameAuthor renders, snapshots,
813
869
  │ Display name for this collaborator: │
814
870
  │ Robin │
815
871
  │ │
816
- │ enter save esc cancel │
872
+ │ save cancel │
817
873
  └────────────────────────────────────────────────────┘
818
874
 
819
875
 
@@ -999,6 +1055,38 @@ exports[`stories catalog Chrome/SettingsRows/AllKinds renders, snapshots, and ca
999
1055
 
1000
1056
 
1001
1057
 
1058
+ "
1059
+ `;
1060
+
1061
+ exports[`stories catalog Dialogs/ShareChoice/PrivateSelected renders, snapshots, and carries its colors: Dialogs/ShareChoice/PrivateSelected 1`] = `
1062
+ "
1063
+
1064
+
1065
+ ┌─ Share ────────────────────────────────────┐
1066
+ │ public link │
1067
+ │ › private link │
1068
+ │ │
1069
+ │ │
1070
+ │ │
1071
+ └────────────────────────────────────────────┘
1072
+
1073
+
1074
+ "
1075
+ `;
1076
+
1077
+ exports[`stories catalog Dialogs/ShareChoice/PublicSelected renders, snapshots, and carries its colors: Dialogs/ShareChoice/PublicSelected 1`] = `
1078
+ "
1079
+
1080
+
1081
+ ┌─ Share ────────────────────────────────────┐
1082
+ │ › public link │
1083
+ │ private link │
1084
+ │ │
1085
+ │ │
1086
+ │ │
1087
+ └────────────────────────────────────────────┘
1088
+
1089
+
1002
1090
  "
1003
1091
  `;
1004
1092
 
@@ -1013,6 +1101,30 @@ exports[`stories catalog Layout/ShellHeader/ReviewSurface renders, snapshots, an
1013
1101
  "
1014
1102
    Read Cueloop Repository Changes    
1015
1103
 
1104
+ "
1105
+ `;
1106
+
1107
+ exports[`stories catalog Chrome/SlashComposer/Empty renders, snapshots, and carries its colors: Chrome/SlashComposer/Empty 1`] = `
1108
+ " ●
1109
+
1110
+
1111
+
1112
+
1113
+
1114
+
1115
+
1116
+ "
1117
+ `;
1118
+
1119
+ exports[`stories catalog Chrome/SlashComposer/WithDraft renders, snapshots, and carries its colors: Chrome/SlashComposer/WithDraft 1`] = `
1120
+ " ● looks good, ship it
1121
+
1122
+
1123
+
1124
+
1125
+
1126
+
1127
+
1016
1128
  "
1017
1129
  `;
1018
1130
 
@@ -1042,11 +1154,11 @@ exports[`stories catalog Surfaces/ThreadTree/Empty renders, snapshots, and carri
1042
1154
 
1043
1155
  exports[`stories catalog Surfaces/ThreadTree/TwoPending renders, snapshots, and carries its colors: Surfaces/ThreadTree/TwoPending 1`] = `
1044
1156
  " Projects
1045
- widget
1046
- Migration Plan
1157
+ widget
1158
+ Migration Plan
1047
1159
 
1048
1160
  Threads
1049
- working tree
1161
+ working tree
1050
1162
 
1051
1163
 
1052
1164
 
@@ -1063,7 +1175,6 @@ exports[`stories catalog Surfaces/ThreadView/InlineThreads renders, snapshots, a
1063
1175
  Context
1064
1176
 
1065
1177
  The daemon persists sessions to disk atomically.
1066
-
1067
1178
  ╷────────────────────────────────────────────────────────────────────────────────────────────┐
1068
1179
  │ ● Which daemon owns this? │
1069
1180
  ╵────────────────────────────────────────────────────────────────────────────────────────────┘
@@ -1071,12 +1182,11 @@ exports[`stories catalog Surfaces/ThreadView/InlineThreads renders, snapshots, a
1071
1182
  Steps
1072
1183
 
1073
1184
  · move the store
1074
-
1075
1185
  ╷────────────────────────────────────────────────────────────────────────────────────────────┐
1076
- │ ● move the store behind one interface │ ○
1077
- ╵────────────────────────────────────────────────────────────────────────────────────────────┘ ○
1078
- · add recovery
1079
-
1186
+ │ ● move the store behind one interface │
1187
+ ╵────────────────────────────────────────────────────────────────────────────────────────────┘
1188
+ · add recovery ○
1189
+ ○
1080
1190
  ts
1081
1191
  export function persist(session: Session): void {
1082
1192
  // one JSON document per session
@@ -1091,16 +1201,18 @@ exports[`stories catalog Surfaces/ThreadView/InlineThreads renders, snapshots, a
1091
1201
 
1092
1202
 
1093
1203
 
1204
+
1205
+
1094
1206
  "
1095
1207
  `;
1096
1208
 
1097
1209
  exports[`stories catalog Surfaces/ThreadsSidebar/Open renders, snapshots, and carries its colors: Surfaces/ThreadsSidebar/Open 1`] = `
1098
1210
  " Projects │
1099
- widget │
1100
- Migration Plan │
1211
+ widget │
1212
+ Migration Plan │
1101
1213
  │
1102
1214
  Threads │
1103
- working tree │
1215
+ working tree │
1104
1216
  │
1105
1217
  │
1106
1218
  │
@@ -1118,7 +1230,7 @@ exports[`stories catalog Overlays/Toast/ShareLink renders, snapshots, and carrie
1118
1230
  │ │
1119
1231
  │ ssh review-4f2a@cueloop.dev │
1120
1232
  │ │
1121
- │ [esc] │
1233
+ │ │
1122
1234
  └─────────────────────────────┘
1123
1235
 
1124
1236
 
@@ -1220,7 +1332,7 @@ exports[`stories catalog Overlays/WalkWizard/EndCard renders, snapshots, and car
1220
1332
  ┌─ walk complete ──────────────────────────────────────────────────────┐
1221
1333
  │ every file viewed (3/3) │
1222
1334
  │ │
1223
- │ Submit review [ back │
1335
+ │ submit back │
1224
1336
  └──────────────────────────────────────────────────────────────────────┘
1225
1337
 
1226
1338
 
@@ -1248,7 +1360,7 @@ exports[`stories catalog Overlays/WalkWizard/EndCardPartialPass renders, snapsho
1248
1360
  ┌─ walk complete ──────────────────────────────────────────────────────┐
1249
1361
  │ 1 of 3 files viewed │
1250
1362
  │ │
1251
- │ Submit review [ back │
1363
+ │ submit back │
1252
1364
  └──────────────────────────────────────────────────────────────────────┘
1253
1365
 
1254
1366
 
@@ -1367,6 +1479,15 @@ exports[`stories catalog Chrome/AgentLauncher/Launcher renders, snapshots, and c
1367
1479
 
1368
1480
 
1369
1481
 
1482
+ "
1483
+ `;
1484
+
1485
+ exports[`stories catalog Layout/MenuControl/OneOpenAtATime renders, snapshots, and carries its colors: Layout/MenuControl/OneOpenAtATime 1`] = `
1486
+ "
1487
+ alpha: open
1488
+ beta: closed
1489
+
1490
+
1370
1491
  "
1371
1492
  `;
1372
1493
 
@@ -1573,6 +1694,20 @@ exports[`stories catalog Primitives/Dialog/Open renders, snapshots, and carries
1573
1694
 
1574
1695
 
1575
1696
 
1697
+ "
1698
+ `;
1699
+
1700
+ exports[`stories catalog Primitives/DialogActions/DeleteCancel renders, snapshots, and carries its colors: Primitives/DialogActions/DeleteCancel 1`] = `
1701
+ " delete cancel
1702
+
1703
+
1704
+ "
1705
+ `;
1706
+
1707
+ exports[`stories catalog Primitives/DialogActions/SaveCancel renders, snapshots, and carries its colors: Primitives/DialogActions/SaveCancel 1`] = `
1708
+ " save cancel
1709
+
1710
+
1576
1711
  "
1577
1712
  `;
1578
1713
 
@@ -1888,11 +2023,92 @@ exports[`stories catalog Foundations/Theme/ProviderSwap renders, snapshots, and
1888
2023
  "
1889
2024
  `;
1890
2025
 
1891
- exports[`stories catalog Layout/MenuControl/OneOpenAtATime renders, snapshots, and carries its colors: Layout/MenuControl/OneOpenAtATime 1`] = `
1892
- "
1893
- alpha: open
1894
- beta: closed
1895
-
1896
-
2026
+ exports[`stories catalog Collaborator Join/ConnectScreen renders, snapshots, and carries its colors: Collaborator Join/ConnectScreen 1`] = `
2027
+ "
2028
+
2029
+
2030
+
2031
+
2032
+
2033
+ connect github
2034
+
2035
+ cueloop recognizes you when you return. No account permissions are
2036
+ requested, and the token is discarded after one identity lookup.
2037
+
2038
+ open this link: https://github.com/login/device
2039
+ enter this code: WXYZ-1234
2040
+
2041
+ u copy code
2042
+
2043
+ waiting for authorization...
2044
+
2045
+ esc back
2046
+
2047
+
2048
+
2049
+
2050
+
2051
+
2052
+
2053
+ "
2054
+ `;
2055
+
2056
+ exports[`stories catalog Collaborator Join/ConnectScreenLinkCopied renders, snapshots, and carries its colors: Collaborator Join/ConnectScreenLinkCopied 1`] = `
2057
+ "
2058
+
2059
+
2060
+
2061
+
2062
+
2063
+ connect github
2064
+
2065
+ cueloop recognizes you when you return. No account permissions are
2066
+ requested, and the token is discarded after one identity lookup.
2067
+
2068
+ open this link: https://github.com/login/device
2069
+ enter this code: WXYZ-1234
2070
+
2071
+ code copied - paste it on the page
2072
+
2073
+ waiting for authorization...
2074
+
2075
+ esc back
2076
+
2077
+
2078
+
2079
+
2080
+
2081
+
2082
+
2083
+ "
2084
+ `;
2085
+
2086
+ exports[`stories catalog Collaborator Join/JoinSplash renders, snapshots, and carries its colors: Collaborator Join/JoinSplash 1`] = `
2087
+ "
2088
+ ⠀⠀⠀⠀⠀⠀⠀⣀⣀⣀⣀⠀⣠⢤⣄⡸⢷⣲⢤⣀
2089
+ ⠀⠀⢀⡤⠖⠛⠉⠉⠀⠀⠈⠙⢎⢣⠀⠉⠙⠮⡙⢮⠑⢦⡀
2090
+ ⠀⢰⠋⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⡎⣇⠀⠀⠀⠘⣆⢣⠀⠙⢆
2091
+ ⠀⡇⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢹⢸⠀⠀⠀⠀⠘⡌⡇⠀⠈⢧
2092
+ ⠀⢧⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣸⢸⠀⠀⠀⠀⠀⣇⢳⠀⠀⠈⣇
2093
+ ⡷⣜⢦⡀⠀⠀⠀⠀⠀⠀⠀⠀⢠⢇⡏⠀⠀⠀⠀⠀⡕⢸⠀⠀⠀⢸
2094
+ ⢇⠈⠳⢭⣗⣶⠤⢤⣤⣤⠤⠴⣫⠞⠀⠀⠀⠀⠀⢀⡇⡎⠀⠀⠀⢸
2095
+ ⣈⢣⡀⠀⠀⠉⠉⠙⠛⠛⠋⠉⠁⠀⠀⠀⠀⠀⢀⠞⡼⠁⠀⠀⠀⢸
2096
+ ⢻⠓⢝⡢⣄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⡴⣫⠞⠀⠀⠀⠀⢀⡏
2097
+ ⠈⢧⠀⠙⠲⢽⣲⠤⣤⣀⣀⣀⣀⣀⣠⠴⣫⠞⠁⠀⠀⠀⠀⢀⡞
2098
+ ⠀⠀⠳⣄⠀⠀⠈⠉⠓⠒⠺⠿⠿⠖⠒⠋⠀⠀⠀⠀⠀⠀⣠⠎
2099
+ ⠀⠀⠀⠈⠳⣄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣠⠞⠁
2100
+ ⠀⠀⠀⠀⠀⠀⠙⠲⠤⣄⣀⣀⣀⣀⣀⣀⣤⠴⠒⠋
2101
+ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⠉⠉⠁
2102
+
2103
+ cueloop
2104
+
2105
+ enter join esc skip
2106
+
2107
+ Connect GitHub to sign your comments with your name.
2108
+ No repo or account access is requested; your name is read once.
2109
+
2110
+ privacy https://cueloop.dev/privacy support hello@cueloop.dev
2111
+
2112
+
1897
2113
  "
1898
2114
  `;
@@ -14,6 +14,7 @@ export interface CardProps {
14
14
  title?: string;
15
15
  /** Number of content rows inside the border; the box adds the two border rows. */
16
16
  contentRows: number;
17
+ width?: number;
17
18
  borderColor?: string;
18
19
  backgroundColor?: string;
19
20
  marginLeft?: number;
@@ -30,6 +31,7 @@ export function cardHeight(contentRows: number): number {
30
31
  export function Card({
31
32
  title,
32
33
  contentRows,
34
+ width,
33
35
  borderColor,
34
36
  backgroundColor,
35
37
  marginLeft,
@@ -43,6 +45,7 @@ export function Card({
43
45
  <box
44
46
  style={{
45
47
  height: cardHeight(contentRows),
48
+ width,
46
49
  marginLeft,
47
50
  marginRight,
48
51
  border: true,
@@ -0,0 +1,20 @@
1
+ import React from "react";
2
+ import { DARK } from "../../theme";
3
+ import type { Story, StoryMeta } from "../story";
4
+ import { DialogActions } from "./DialogActions";
5
+
6
+ export const meta: StoryMeta = { title: "Primitives/DialogActions" };
7
+
8
+ const noop = () => {};
9
+
10
+ export const SaveCancel: Story = {
11
+ render: () => <DialogActions confirmLabel="save" onConfirm={noop} onCancel={noop} />,
12
+ expectedColors: [DARK.accent],
13
+ size: { width: 40, height: 3 },
14
+ };
15
+
16
+ export const DeleteCancel: Story = {
17
+ render: () => <DialogActions confirmLabel="delete" onConfirm={noop} onCancel={noop} />,
18
+ expectedColors: [DARK.accent],
19
+ size: { width: 40, height: 3 },
20
+ };
@@ -0,0 +1,39 @@
1
+ /** The one action row every overlay uses: a solid confirm word-button and a plain cancel, lowercased. */
2
+
3
+ import React from "react";
4
+ import type { Theme } from "../../theme";
5
+ import { Toolbar } from "./Toolbar";
6
+ import { Button } from "./Button";
7
+
8
+ export interface DialogActionsProps {
9
+ confirmLabel: string;
10
+ onConfirm: () => void;
11
+ onCancel: () => void;
12
+ cancelLabel?: string;
13
+ confirmDisabled?: boolean;
14
+ theme?: Theme;
15
+ }
16
+
17
+ export function DialogActions({
18
+ confirmLabel,
19
+ onConfirm,
20
+ onCancel,
21
+ cancelLabel = "cancel",
22
+ confirmDisabled = false,
23
+ theme,
24
+ }: DialogActionsProps): React.ReactNode {
25
+ return (
26
+ <Toolbar>
27
+ <Button
28
+ variant="solid"
29
+ marginRight={2}
30
+ onPress={onConfirm}
31
+ isDisabled={confirmDisabled}
32
+ theme={theme}
33
+ >
34
+ {` ${confirmLabel} `}
35
+ </Button>
36
+ <Button onPress={onCancel} theme={theme}>{` ${cancelLabel} `}</Button>
37
+ </Toolbar>
38
+ );
39
+ }