@crewlethq/ui 0.111.0 → 0.112.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.
Files changed (156) hide show
  1. package/dist/AgentHandoffPanel/index.js +4 -3
  2. package/dist/AppShell/index.js +2 -2
  3. package/dist/ArrangeList/index.js +4 -3
  4. package/dist/ArtifactBar/index.js +4 -4
  5. package/dist/ArtifactCard/index.js +5 -4
  6. package/dist/Avatar/AvatarStack.d.ts +9 -3
  7. package/dist/Avatar/index.js +1 -1
  8. package/dist/AvatarPicker/index.js +6 -6
  9. package/dist/{AvatarStack-EQZZJZ3V.css → AvatarStack-GNEJHEU6.css} +20 -0
  10. package/dist/ChatDay/ChatDay.d.ts +3 -1
  11. package/dist/ChatDay/index.js +2 -2
  12. package/dist/ChatDivider/ChatDivider.d.ts +8 -1
  13. package/dist/ChatDivider/index.js +1 -1
  14. package/dist/{ChatDivider-7SPCQXUQ.css → ChatDivider-BRODST2E.css} +23 -0
  15. package/dist/ChatMessage/ChatMessage.d.ts +10 -3
  16. package/dist/ChatMessage/index.js +2 -2
  17. package/dist/{ChatMessage-5AMJCGZY.css → ChatMessage-SZGZT7O2.css} +15 -0
  18. package/dist/ChatThread/index.js +2 -2
  19. package/dist/CheckGrid/index.js +4 -3
  20. package/dist/Checkbox/index.js +3 -2
  21. package/dist/ColorField/index.js +3 -2
  22. package/dist/Combobox/index.js +3 -2
  23. package/dist/CommandPalette/index.js +3 -2
  24. package/dist/CommentThread/index.js +5 -4
  25. package/dist/Composer/index.js +3 -2
  26. package/dist/ConfirmField/index.js +3 -2
  27. package/dist/ContrastHelp/index.js +2 -2
  28. package/dist/DataGrid/index.js +4 -3
  29. package/dist/DataTable/index.js +5 -4
  30. package/dist/DataView/index.js +8 -7
  31. package/dist/DateTimePicker/index.js +2 -2
  32. package/dist/DocTabsEditor/index.js +4 -3
  33. package/dist/{Editor-VAEC6MIJ.js → Editor-YITN2DWX.js} +4 -3
  34. package/dist/EmojiPicker/EmojiPicker.d.ts +23 -5
  35. package/dist/EmojiPicker/index.d.ts +1 -1
  36. package/dist/EmojiPicker/index.js +5 -3
  37. package/dist/EmojiPicker-V6XM56GJ.css +180 -0
  38. package/dist/EntityChip/index.js +1 -1
  39. package/dist/HuePicker/index.js +4 -4
  40. package/dist/ImageUpload/index.js +1 -1
  41. package/dist/Input/index.js +2 -1
  42. package/dist/KeyValueRows/index.js +3 -2
  43. package/dist/Layer/index.d.ts +1 -1
  44. package/dist/Layer/place.d.ts +6 -0
  45. package/dist/ListInput/index.js +3 -2
  46. package/dist/MarkdownEditor/index.js +4 -4
  47. package/dist/MemberPicker/index.js +4 -3
  48. package/dist/MentionMenu/MentionMenu.d.ts +18 -2
  49. package/dist/MentionMenu/index.d.ts +4 -1
  50. package/dist/MentionMenu/index.js +2 -1
  51. package/dist/{MentionMenu-77P7C4F7.css → MentionMenu-AWZSOTNU.css} +45 -1
  52. package/dist/Menu/Menu.d.ts +4 -1
  53. package/dist/Menu/index.js +1 -1
  54. package/dist/{Menu-UY2O4OCZ.css → Menu-PXOAJ4DP.css} +5 -0
  55. package/dist/MergeConflicts/index.js +4 -4
  56. package/dist/MessageActions/index.js +5 -4
  57. package/dist/OrgLabel/index.js +1 -1
  58. package/dist/OrgNode/index.js +1 -1
  59. package/dist/OrgTable/index.js +7 -6
  60. package/dist/PeopleRail/index.js +1 -1
  61. package/dist/Popover/Popover.d.ts +4 -2
  62. package/dist/Popover/index.js +1 -1
  63. package/dist/{Popover-QCINR7WG.css → Popover-EKG6OBZL.css} +5 -0
  64. package/dist/PresenceStack/index.js +1 -1
  65. package/dist/Principal/index.js +1 -1
  66. package/dist/PrincipalPicker/index.js +5 -4
  67. package/dist/ProposalCard/index.js +4 -3
  68. package/dist/ReactionBar/ReactionBar.d.ts +4 -2
  69. package/dist/ReactionBar/index.js +6 -4
  70. package/dist/RecordChip/index.js +2 -2
  71. package/dist/RichEditor/index.js +1 -1
  72. package/dist/SegmentedControl/index.js +3 -3
  73. package/dist/ShareDialog/index.js +1 -1
  74. package/dist/SheetColumnEditor/index.js +8 -7
  75. package/dist/SheetGrid/index.js +4 -4
  76. package/dist/SlideFilmstrip/index.js +2 -2
  77. package/dist/Switcher/index.js +4 -3
  78. package/dist/TableCells/index.js +1 -1
  79. package/dist/Tabs/index.js +2 -2
  80. package/dist/ThemeSwitcher/index.js +4 -4
  81. package/dist/ThreadSummary/ThreadSummary.d.ts +2 -0
  82. package/dist/ThreadSummary/index.d.ts +1 -1
  83. package/dist/ThreadSummary/index.js +2 -2
  84. package/dist/{ThreadSummary-CFAHYY57.css → ThreadSummary-2AFEU6NH.css} +2 -1
  85. package/dist/TimeRangePicker/index.js +6 -5
  86. package/dist/TimeWindowPicker/index.js +4 -3
  87. package/dist/TreeGrid/index.js +5 -4
  88. package/dist/ValueField/index.js +4 -3
  89. package/dist/VersionCompare/index.js +4 -4
  90. package/dist/VersionTimeline/index.js +1 -1
  91. package/dist/{chunk-QEGOVWYP.js → chunk-3UFIYOVD.js} +1 -1
  92. package/dist/{chunk-NQKHOLC7.js → chunk-45VQPH27.js} +1 -1
  93. package/dist/chunk-47V3ASMW.js +74 -0
  94. package/dist/{chunk-ADIJ6TLF.js → chunk-5FOJLJYN.js} +1 -1
  95. package/dist/{chunk-A2BL2EF6.js → chunk-5G3KASPV.js} +1 -1
  96. package/dist/{chunk-FXRXV6QH.js → chunk-5SBMYPWG.js} +1 -1
  97. package/dist/{chunk-WUCRLA25.js → chunk-5SMYKL3D.js} +9 -3
  98. package/dist/{chunk-LTNWLZLG.js → chunk-76LJUPDA.js} +2 -2
  99. package/dist/{chunk-ECTHM76P.js → chunk-7TLM7E5N.js} +2 -2
  100. package/dist/{chunk-S4AQ7HAA.js → chunk-AQMB6ONN.js} +2 -2
  101. package/dist/{chunk-5272PYQD.js → chunk-BBE656JU.js} +1 -1
  102. package/dist/{chunk-BM76TWJ7.js → chunk-CHB7T3PT.js} +4 -4
  103. package/dist/{chunk-XKU733RV.js → chunk-CJRWESDZ.js} +1 -1
  104. package/dist/{chunk-WIMKLLMH.js → chunk-CTIJTW4R.js} +1 -1
  105. package/dist/{chunk-MV56SO2V.js → chunk-D7NXK77P.js} +1 -1
  106. package/dist/{chunk-XR6IZOLT.js → chunk-DRI6OXWY.js} +1 -1
  107. package/dist/{chunk-E7NTBXXE.js → chunk-DTEDUAEW.js} +1 -1
  108. package/dist/{chunk-RG6X2EQP.js → chunk-DTZ72KVX.js} +2 -2
  109. package/dist/{chunk-GMBXRSC5.js → chunk-ECGYBWRI.js} +2 -2
  110. package/dist/{chunk-2DXZ2ZJR.js → chunk-ENYB3HIA.js} +2 -2
  111. package/dist/{chunk-TWNOYES7.js → chunk-GFOPTRRY.js} +1 -1
  112. package/dist/{chunk-PH5APLMB.js → chunk-GMQ54OQF.js} +1 -1
  113. package/dist/{chunk-TZNNLLXI.js → chunk-HHRYIXBM.js} +1 -1
  114. package/dist/{chunk-ETFBEHMH.js → chunk-J4OL6KHY.js} +1 -1
  115. package/dist/{chunk-VYUEAMA4.js → chunk-KDRJZWE3.js} +3 -1
  116. package/dist/{chunk-IW7EEYBS.js → chunk-KG3PHAUX.js} +2 -2
  117. package/dist/{chunk-GYLXJ6VC.js → chunk-KVNVLBCB.js} +1 -1
  118. package/dist/{chunk-EBIYEUE3.js → chunk-KYWIUH5R.js} +5 -5
  119. package/dist/{chunk-TDE6MUAQ.js → chunk-LGJJIPYZ.js} +1 -1
  120. package/dist/{chunk-XL6DTL36.js → chunk-M7EALYXZ.js} +1 -1
  121. package/dist/{chunk-L544S4UU.js → chunk-NOP55WRY.js} +107 -44
  122. package/dist/{chunk-WMLXOW7D.js → chunk-P366K4RX.js} +3 -2
  123. package/dist/{chunk-3ZIGF6LK.js → chunk-PBDMJHXV.js} +1 -1
  124. package/dist/chunk-PJV5HVZY.js +67 -0
  125. package/dist/{chunk-57SISFHX.js → chunk-PWB2LWBE.js} +1 -1
  126. package/dist/chunk-Q5LDZPFF.js +2 -0
  127. package/dist/{chunk-JLL7KQV5.js → chunk-QCJ3UBCZ.js} +1 -1
  128. package/dist/{chunk-YBPBSLGY.js → chunk-QHUKJN33.js} +3 -1
  129. package/dist/{chunk-3DUNIA3E.js → chunk-QLGZBN6A.js} +4 -4
  130. package/dist/{chunk-7ZIKXGIJ.js → chunk-QMEKGAEA.js} +2 -2
  131. package/dist/{chunk-TTQOKYTO.js → chunk-QVNEQSOL.js} +1 -1
  132. package/dist/{chunk-OTGWNFBE.js → chunk-RHD46WIZ.js} +1 -1
  133. package/dist/{chunk-4A75O7NL.js → chunk-RTDFRFTF.js} +8 -3
  134. package/dist/{chunk-6ZC2LPCM.js → chunk-SDYLFZKZ.js} +2 -2
  135. package/dist/{chunk-OIFITGYL.js → chunk-SJNJBXUA.js} +2 -2
  136. package/dist/{chunk-CJNSPA5F.js → chunk-STJPIP3R.js} +1 -1
  137. package/dist/{chunk-HKCOGDXN.js → chunk-TE3OMB3Z.js} +2 -28
  138. package/dist/{chunk-2SHRZ42G.js → chunk-TP7PRSGX.js} +1 -1
  139. package/dist/{chunk-YECS3C4D.js → chunk-V6BEBGO3.js} +2 -2
  140. package/dist/{chunk-LKBJE5J7.js → chunk-VZ42TS3C.js} +1 -1
  141. package/dist/{chunk-PZ4RVNSC.js → chunk-WEZU4DX2.js} +1 -1
  142. package/dist/{chunk-HKJTZG75.js → chunk-Y36N7TB7.js} +1 -1
  143. package/dist/{chunk-SRID7K37.js → chunk-Y3FLNQEE.js} +1 -1
  144. package/dist/{chunk-BHR72Z7M.js → chunk-YD5UCBFV.js} +1 -1
  145. package/dist/{chunk-MWKJEZBY.js → chunk-YE76GTQU.js} +2 -2
  146. package/dist/{chunk-SQSFVBDF.js → chunk-ZGJCVXFU.js} +1 -1
  147. package/dist/{chunk-PGMKJ4OD.js → chunk-ZJVGVTC3.js} +19 -5
  148. package/dist/{chunk-EXYO45GN.js → chunk-ZUFV7753.js} +5 -4
  149. package/dist/generated/index.js +70 -69
  150. package/dist/index.js +70 -69
  151. package/dist/styles.css +209 -21
  152. package/dist/utils/fieldMirror.d.ts +22 -0
  153. package/package.json +3 -3
  154. package/dist/EmojiPicker-W722WJ5M.css +0 -105
  155. package/dist/chunk-3KLVK655.js +0 -2
  156. package/dist/chunk-VZ7DNXCW.js +0 -58
package/dist/styles.css CHANGED
@@ -5881,7 +5881,7 @@ button.crewlet-avatar-picker:hover .crewlet-avatar-picker__pip {
5881
5881
  }
5882
5882
 
5883
5883
 
5884
- /* AvatarStack-EQZZJZ3V.css */
5884
+ /* AvatarStack-GNEJHEU6.css */
5885
5885
  /*
5886
5886
  * Several badges as one mark (AvatarStack.tsx).
5887
5887
  *
@@ -5964,6 +5964,26 @@ button.crewlet-avatar-picker:hover .crewlet-avatar-picker__pip {
5964
5964
  margin-inline-start: -2px;
5965
5965
  }
5966
5966
 
5967
+ /* SPREAD: side by side, a step apart, for a line that shows who took part
5968
+ rather than a mark of how many. With nothing overlapping, no cut-out. */
5969
+ .crewlet-avatar-stack.crewlet-avatar-stack--spread {
5970
+ gap: var(--spacing-1);
5971
+ }
5972
+
5973
+ .crewlet-avatar-stack.crewlet-avatar-stack--spread > .crewlet-avatar-stack__member {
5974
+ box-shadow: none;
5975
+ }
5976
+
5977
+ /* Standing apart, each face keeps its own hairline, as a lone face does. */
5978
+ .crewlet-avatar-stack.crewlet-avatar-stack--spread > .crewlet-avatar-stack__member.crewlet-avatar,
5979
+ .crewlet-avatar-stack.crewlet-avatar-stack--spread > .crewlet-avatar-stack__member > .crewlet-avatar {
5980
+ border-color: var(--color-edge-hairline);
5981
+ }
5982
+
5983
+ .crewlet-avatar-stack.crewlet-avatar-stack--spread > .crewlet-avatar-stack__member + .crewlet-avatar-stack__member {
5984
+ margin-inline-start: 0;
5985
+ }
5986
+
5967
5987
  /*
5968
5988
  * THE COUNT OF THE REST. A PILL, where every face is a rounded square: it is
5969
5989
  * a number rather than somebody, and drawn in a face's outline it would read
@@ -10935,7 +10955,7 @@ button.crewlet-histogram__bar[data-empty]:focus-visible > .crewlet-histogram__fi
10935
10955
  }
10936
10956
 
10937
10957
 
10938
- /* ChatDivider-7SPCQXUQ.css */
10958
+ /* ChatDivider-BRODST2E.css */
10939
10959
  /*
10940
10960
  * ChatDivider: a line between the rows of a conversation, set on the
10941
10961
  * conversation's own scale (ChatScale.css).
@@ -11025,6 +11045,29 @@ button.crewlet-histogram__bar[data-empty]:focus-visible > .crewlet-histogram__fi
11025
11045
  line-height: var(--font-line-height-normal);
11026
11046
  }
11027
11047
 
11048
+ /*
11049
+ * A PULSE AS IT APPEARS (`pulse`): the line glows in its own hue, in for a
11050
+ * step, held, and out for a step, once. Still under reduced motion.
11051
+ */
11052
+ .crewlet-chat-divider--unread.is-pulsing::before {
11053
+ animation: crewlet-chat-divider-pulse calc(var(--motion-duration-base) * 5) var(--motion-easing-default);
11054
+ }
11055
+
11056
+ @keyframes crewlet-chat-divider-pulse {
11057
+ 20%,
11058
+ 80% {
11059
+ box-shadow:
11060
+ 0 0 0 1px var(--color-feedback-danger),
11061
+ 0 0 var(--spacing-2) var(--spacing-1) var(--color-feedback-danger-soft);
11062
+ }
11063
+ }
11064
+
11065
+ @media (prefers-reduced-motion: reduce) {
11066
+ .crewlet-chat-divider--unread.is-pulsing::before {
11067
+ animation: none;
11068
+ }
11069
+ }
11070
+
11028
11071
  /*
11029
11072
  * FORCED COLORS drops the line's background, which is the whole line. A
11030
11073
  * border is the one edge the mode keeps, painted in its own text colour.
@@ -11039,7 +11082,7 @@ button.crewlet-histogram__bar[data-empty]:focus-visible > .crewlet-histogram__fi
11039
11082
  }
11040
11083
 
11041
11084
 
11042
- /* ChatMessage-5AMJCGZY.css */
11085
+ /* ChatMessage-SZGZT7O2.css */
11043
11086
  /*
11044
11087
  * One message in a transcript: a face in a gutter, the head line, the words
11045
11088
  * and a footer stack. Every size reads the conversation scale
@@ -11235,6 +11278,21 @@ button.crewlet-histogram__bar[data-empty]:focus-visible > .crewlet-histogram__fi
11235
11278
  line-height: 1;
11236
11279
  }
11237
11280
 
11281
+ /* Either time is underlined under the pointer and keyboard focus, where its
11282
+ full date and time shows as a hint. */
11283
+ .crewlet-chat-message__time:is(:hover, :focus-visible),
11284
+ .crewlet-chat-message__gutter-time:is(:hover, :focus-visible) {
11285
+ text-decoration: underline;
11286
+ text-underline-offset: 2px;
11287
+ }
11288
+
11289
+ .crewlet-chat-message__time:focus-visible,
11290
+ .crewlet-chat-message__gutter-time:focus-visible {
11291
+ border-radius: var(--radius-xs);
11292
+ outline: 2px solid var(--color-focus);
11293
+ outline-offset: 2px;
11294
+ }
11295
+
11238
11296
  .crewlet-chat-message__body {
11239
11297
  min-width: 0;
11240
11298
  color: var(--color-text-primary);
@@ -21421,25 +21479,94 @@ svg.crewlet-datetime__chevron {
21421
21479
  }
21422
21480
 
21423
21481
 
21424
- /* EmojiPicker-W722WJ5M.css */
21482
+ /* EmojiPicker-V6XM56GJ.css */
21425
21483
  /*
21426
- * A searchable grid of emoji in a popover: the field, then each group under
21427
- * its quiet heading, eight to a row, in a scroller of its own, and a preview
21428
- * line under the grid that is always there, so the panel never changes size.
21484
+ * A searchable grid of emoji in a popover: a row of category tabs, the
21485
+ * field, then each group under its quiet heading, nine to a row, in a
21486
+ * scroller of a fixed height, and a preview line under the grid. The panel is
21487
+ * one size whatever it shows, so nothing moves under the pointer.
21429
21488
  */
21430
21489
 
21431
21490
  .crewlet-emoji-picker__body {
21491
+ /* A cell is 36 wide and 32 tall on a 33px pitch, and the field 36 tall. */
21492
+ --crewlet-emoji-picker-cell: 36px;
21493
+ --crewlet-emoji-picker-cell-height: 32px;
21494
+ --crewlet-emoji-picker-pitch: 1px;
21495
+ --crewlet-emoji-picker-grid: 300px;
21496
+ --crewlet-emoji-picker-field: var(--size-row-md);
21432
21497
  display: flex;
21433
21498
  flex-direction: column;
21434
- gap: var(--spacing-2);
21435
- width: 296px;
21499
+ width: calc(
21500
+ var(--crewlet-emoji-picker-columns) * var(--crewlet-emoji-picker-cell) +
21501
+ (var(--crewlet-emoji-picker-columns) - 1) * var(--crewlet-emoji-picker-pitch) + 2 * var(--spacing-3)
21502
+ );
21436
21503
  max-width: 100%;
21437
21504
  box-sizing: border-box;
21438
- padding: var(--spacing-2);
21505
+ }
21506
+
21507
+ /* The panel holds the picker at its own size, past a popover's default cap,
21508
+ inside the viewport: only a viewport smaller than the picker scrolls it.
21509
+ Two classes, so it holds in any bundle order. */
21510
+ .crewlet-popover.crewlet-emoji-picker {
21511
+ max-width: calc(100vw - var(--spacing-4) * 2);
21512
+ max-height: calc(100dvh - var(--spacing-4) * 2);
21513
+ }
21514
+
21515
+ /* THE TABS: one per group, icon only, on a hairline; the group at the grid's
21516
+ top is underlined in the accent, and the underline moves in the fast step. */
21517
+ .crewlet-toolbar.crewlet-emoji-picker__tabs {
21518
+ flex-wrap: nowrap;
21519
+ gap: 0;
21520
+ height: calc(var(--size-control-md) + var(--spacing-2));
21521
+ box-sizing: border-box;
21522
+ padding: 0 var(--spacing-2);
21523
+ box-shadow: inset 0 -1px 0 var(--color-edge-hairline);
21524
+ }
21525
+
21526
+ .crewlet-emoji-picker__tab {
21527
+ display: inline-flex;
21528
+ align-items: center;
21529
+ justify-content: center;
21530
+ align-self: stretch;
21531
+ width: var(--crewlet-emoji-picker-cell);
21532
+ padding: 0;
21533
+ border: 0;
21534
+ border-radius: var(--radius-sm) var(--radius-sm) 0 0;
21535
+ background: transparent;
21536
+ color: var(--color-text-tertiary);
21537
+ cursor: pointer;
21538
+ transition: box-shadow var(--motion-duration-fast) var(--motion-easing-out);
21539
+ }
21540
+
21541
+ .crewlet-emoji-picker__tab:hover,
21542
+ .crewlet-emoji-picker__tab.is-current {
21543
+ color: var(--color-text-primary);
21544
+ }
21545
+
21546
+ .crewlet-emoji-picker__tab.is-current {
21547
+ box-shadow: inset 0 -2px 0 var(--color-brand-accent);
21548
+ }
21549
+
21550
+ .crewlet-emoji-picker__tab:focus-visible {
21551
+ outline: 2px solid var(--color-focus);
21552
+ outline-offset: var(--size-focus-ring-inset-offset);
21553
+ }
21554
+
21555
+ /* The field, 36 tall with the chat step's words, on a band of its own. */
21556
+ .crewlet-emoji-picker__body > .crewlet-input {
21557
+ width: auto;
21558
+ min-height: var(--crewlet-emoji-picker-field);
21559
+ margin: var(--spacing-3) var(--spacing-3) var(--spacing-2);
21560
+ }
21561
+
21562
+ .crewlet-emoji-picker__body > .crewlet-input .crewlet-input__control {
21563
+ font-size: var(--font-size-sm);
21439
21564
  }
21440
21565
 
21441
21566
  .crewlet-emoji-picker__scroll {
21442
- max-height: 240px;
21567
+ position: relative;
21568
+ height: var(--crewlet-emoji-picker-grid);
21569
+ padding: 0 var(--spacing-3);
21443
21570
  overflow-y: auto;
21444
21571
  overscroll-behavior: contain;
21445
21572
  }
@@ -21457,16 +21584,16 @@ svg.crewlet-datetime__chevron {
21457
21584
  .crewlet-emoji-picker__grid {
21458
21585
  display: grid;
21459
21586
  grid-template-columns: repeat(var(--crewlet-emoji-picker-columns), minmax(0, 1fr));
21460
- gap: 2px;
21587
+ gap: var(--crewlet-emoji-picker-pitch);
21461
21588
  }
21462
21589
 
21463
21590
  .crewlet-emoji-picker__cell {
21464
- aspect-ratio: 1;
21591
+ height: var(--crewlet-emoji-picker-cell-height);
21465
21592
  padding: 0;
21466
21593
  border: 0;
21467
21594
  border-radius: var(--radius-sm);
21468
21595
  background: transparent;
21469
- font-size: var(--font-size-lg);
21596
+ font-size: var(--font-size-xl);
21470
21597
  line-height: 1;
21471
21598
  cursor: pointer;
21472
21599
  }
@@ -21492,7 +21619,7 @@ svg.crewlet-datetime__chevron {
21492
21619
  align-items: center;
21493
21620
  gap: var(--spacing-2);
21494
21621
  min-height: var(--size-control-md);
21495
- padding: var(--spacing-2) var(--spacing-1) 0;
21622
+ padding: var(--spacing-2) var(--spacing-3);
21496
21623
  border-top: 1px solid var(--color-edge-hairline);
21497
21624
  }
21498
21625
 
@@ -21528,6 +21655,12 @@ svg.crewlet-datetime__chevron {
21528
21655
  font-size: var(--font-size-sm);
21529
21656
  }
21530
21657
 
21658
+ @media (prefers-reduced-motion: reduce) {
21659
+ .crewlet-emoji-picker__tab {
21660
+ transition: none;
21661
+ }
21662
+ }
21663
+
21531
21664
 
21532
21665
  /* EmptyState-7L4UAQBX.css */
21533
21666
  /*
@@ -27842,7 +27975,7 @@ button.crewlet-mention-chip:focus-visible {
27842
27975
  }
27843
27976
 
27844
27977
 
27845
- /* MentionMenu-77P7C4F7.css */
27978
+ /* MentionMenu-AWZSOTNU.css */
27846
27979
  /*
27847
27980
  * MentionMenu: the suggestions a composer opens on "@" or "#".
27848
27981
  *
@@ -27855,12 +27988,16 @@ button.crewlet-mention-chip:focus-visible {
27855
27988
  * it, so it never covers what is being typed.
27856
27989
  */
27857
27990
  .crewlet-mention-menu {
27991
+ /* The widest the card is drawn, and its face column, which an anchor centres under the trigger. */
27992
+ --crewlet-mention-menu-cap: var(--crewlet-mention-menu-width, 560px);
27993
+ --crewlet-mention-menu-face: var(--size-control-sm);
27994
+
27858
27995
  position: absolute;
27859
27996
  bottom: calc(100% + var(--spacing-1));
27860
27997
  left: 0;
27861
27998
  z-index: var(--z-index-dropdown);
27862
27999
  box-sizing: border-box;
27863
- width: min(100%, var(--crewlet-mention-menu-width, 560px));
28000
+ width: min(100%, var(--crewlet-mention-menu-cap));
27864
28001
  overflow: hidden;
27865
28002
  border: 1px solid var(--color-border-default);
27866
28003
  border-radius: var(--radius-lg);
@@ -27916,8 +28053,48 @@ button.crewlet-mention-chip:focus-visible {
27916
28053
  }
27917
28054
  }
27918
28055
 
28056
+ /*
28057
+ * ANCHORED UNDER THE TRIGGER (`anchor`): the card moves along until its face
28058
+ * column's middle stands under the trigger character (the list's inset, the
28059
+ * row's, and half the column), and no further than the box's right edge.
28060
+ */
28061
+ .crewlet-mention-menu--anchored {
28062
+ left: clamp(
28063
+ 0px,
28064
+ calc(var(--crewlet-mention-menu-anchor) - var(--spacing-1) - var(--spacing-2) - var(--crewlet-mention-menu-face) / 2),
28065
+ calc(100% - min(100%, var(--crewlet-mention-menu-cap)))
28066
+ );
28067
+ }
28068
+
28069
+ /*
28070
+ * A CONVERSATION'S LIST (`appearance="chat"`): a compact card with the small
28071
+ * corner and no heading, its rows 32px tall at the transcript's words, the
28072
+ * face column fitted to an extra small face (20px).
28073
+ */
28074
+ .crewlet-mention-menu--chat {
28075
+ --crewlet-mention-menu-cap: var(--crewlet-mention-menu-width, 480px);
28076
+ --crewlet-mention-menu-face: 20px;
28077
+
28078
+ border-radius: var(--radius-sm);
28079
+ }
28080
+
28081
+ .crewlet-mention-menu--chat .crewlet-mention-menu__list {
28082
+ padding-block-start: var(--spacing-1);
28083
+ }
28084
+
28085
+ .crewlet-mention-menu--chat .crewlet-mention-menu__list > .crewlet-person-row {
28086
+ --crewlet-person-row-radius: calc(var(--radius-sm) - var(--spacing-1));
27919
28087
 
27920
- /* Menu-UY2O4OCZ.css */
28088
+ min-height: 32px;
28089
+ font-size: var(--crewlet-chat-text);
28090
+ }
28091
+
28092
+ .crewlet-mention-menu--chat .crewlet-person-row__face {
28093
+ min-width: var(--crewlet-mention-menu-face);
28094
+ }
28095
+
28096
+
28097
+ /* Menu-PXOAJ4DP.css */
27921
28098
  /*
27922
28099
  * The menu button's panel.
27923
28100
  *
@@ -27981,6 +28158,11 @@ button.crewlet-mention-chip:focus-visible {
27981
28158
  position: absolute;
27982
28159
  }
27983
28160
 
28161
+ /* `entrance="instant"`: drawn the frame it is placed, with no rise or fade. */
28162
+ .crewlet-menu--instant {
28163
+ animation: none;
28164
+ }
28165
+
27984
28166
  /* Up from under its trigger, which is where it is about to be. */
27985
28167
  @keyframes crewlet-menu-in {
27986
28168
  from {
@@ -31726,7 +31908,7 @@ button.crewlet-mention-chip:focus-visible {
31726
31908
  }
31727
31909
 
31728
31910
 
31729
- /* Popover-QCINR7WG.css */
31911
+ /* Popover-EKG6OBZL.css */
31730
31912
  /*
31731
31913
  * The anchored panel.
31732
31914
  *
@@ -31910,6 +32092,11 @@ button.crewlet-mention-chip:focus-visible {
31910
32092
  * The rows carry no transition, and that is the rule rather than an omission:
31911
32093
  * the arrows move the highlight, and a fade lags a held arrow key.
31912
32094
  */
32095
+ /* `entrance="instant"`: drawn the frame it is placed, with no rise or fade. */
32096
+ .crewlet-popover--instant {
32097
+ animation: none;
32098
+ }
32099
+
31913
32100
  @media (prefers-reduced-motion: reduce) {
31914
32101
  .crewlet-popover {
31915
32102
  animation: none;
@@ -45610,7 +45797,7 @@ b.crewlet-switcher__match {
45610
45797
  }
45611
45798
 
45612
45799
 
45613
- /* ThreadSummary-CFAHYY57.css */
45800
+ /* ThreadSummary-2AFEU6NH.css */
45614
45801
  /*
45615
45802
  * The line under a message that has replies, and the working line under it.
45616
45803
  */
@@ -45640,7 +45827,8 @@ b.crewlet-switcher__match {
45640
45827
  align-items: center;
45641
45828
  gap: var(--spacing-2);
45642
45829
  width: min(100%, 37.5rem);
45643
- height: var(--size-control-md);
45830
+ /* The 24px faces with 5px of air above and below. */
45831
+ height: calc(var(--size-control-md) + var(--spacing-1));
45644
45832
  box-sizing: border-box;
45645
45833
  margin-inline-start: calc((var(--crewlet-thread-summary-inset) + 1px) * -1);
45646
45834
  padding: 0 var(--crewlet-thread-summary-inset);
@@ -0,0 +1,22 @@
1
+ /**
2
+ * A hidden mirror of a text field: the styles that decide where its text
3
+ * wraps, and the caret's place measured on such a mirror. Shared by the
4
+ * Textarea's auto-resize and the mention list's caret anchor.
5
+ */
6
+ /** The text styles a mirror copies so it wraps exactly as the field does. */
7
+ export declare const MIRRORED_TEXT_STYLES: readonly ["boxSizing", "width", "paddingTop", "paddingRight", "paddingBottom", "paddingLeft", "borderTopWidth", "borderRightWidth", "borderBottomWidth", "borderLeftWidth", "borderStyle", "direction", "fontFamily", "fontSize", "fontStretch", "fontStyle", "fontVariant", "fontWeight", "letterSpacing", "lineHeight", "tabSize", "textIndent", "textTransform", "whiteSpace", "wordBreak", "wordSpacing", "overflowWrap"];
8
+ /** Copies a field's wrapping styles onto its mirror. */
9
+ export declare function copyTextStyles(from: CSSStyleDeclaration, to: HTMLElement): void;
10
+ /** Where a character of a text field starts: px from a box's left and top edges, and the line's height. */
11
+ export interface CaretPoint {
12
+ left: number;
13
+ top: number;
14
+ height: number;
15
+ }
16
+ /**
17
+ * Where character `index` of a text field starts, measured on a hidden mirror
18
+ * of the field that wraps its text the same way, less the field's scroll. In
19
+ * px from the field's border box, or from `relativeTo`'s when given (the box a
20
+ * `MentionMenu` is placed in, for its `anchor`).
21
+ */
22
+ export declare function caretPoint(field: HTMLTextAreaElement | HTMLInputElement, index: number, relativeTo?: Element): CaretPoint;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@crewlethq/ui",
3
- "version": "0.111.0",
3
+ "version": "0.112.0",
4
4
  "description": "Crewlet shared React components built on @crewlethq/tokens and @crewlethq/icons.",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -42,8 +42,8 @@
42
42
  "clean": "rm -rf dist src/generated"
43
43
  },
44
44
  "dependencies": {
45
- "@crewlethq/icons": "0.111.0",
46
- "@crewlethq/tokens": "0.111.0",
45
+ "@crewlethq/icons": "0.112.0",
46
+ "@crewlethq/tokens": "0.112.0",
47
47
  "prosemirror-commands": "1.7.2",
48
48
  "prosemirror-gapcursor": "1.4.1",
49
49
  "prosemirror-history": "1.5.1",
@@ -1,105 +0,0 @@
1
- /*
2
- * A searchable grid of emoji in a popover: the field, then each group under
3
- * its quiet heading, eight to a row, in a scroller of its own, and a preview
4
- * line under the grid that is always there, so the panel never changes size.
5
- */
6
-
7
- .crewlet-emoji-picker__body {
8
- display: flex;
9
- flex-direction: column;
10
- gap: var(--spacing-2);
11
- width: 296px;
12
- max-width: 100%;
13
- box-sizing: border-box;
14
- padding: var(--spacing-2);
15
- }
16
-
17
- .crewlet-emoji-picker__scroll {
18
- max-height: 240px;
19
- overflow-y: auto;
20
- overscroll-behavior: contain;
21
- }
22
-
23
- /* A group's heading, in the meta register at the regular weight. */
24
- .crewlet-emoji-picker__group {
25
- padding: var(--spacing-2) var(--spacing-1) var(--spacing-1);
26
- color: var(--color-text-tertiary);
27
- font-size: var(--font-size-2xs);
28
- font-weight: var(--font-weight-regular);
29
- letter-spacing: var(--font-letter-spacing-wide);
30
- text-transform: uppercase;
31
- }
32
-
33
- .crewlet-emoji-picker__grid {
34
- display: grid;
35
- grid-template-columns: repeat(var(--crewlet-emoji-picker-columns), minmax(0, 1fr));
36
- gap: 2px;
37
- }
38
-
39
- .crewlet-emoji-picker__cell {
40
- aspect-ratio: 1;
41
- padding: 0;
42
- border: 0;
43
- border-radius: var(--radius-sm);
44
- background: transparent;
45
- font-size: var(--font-size-lg);
46
- line-height: 1;
47
- cursor: pointer;
48
- }
49
-
50
- .crewlet-emoji-picker__cell:hover {
51
- background: var(--color-surface-hover);
52
- }
53
-
54
- /* The match Enter picks while searching: the accent's soft fill, which the
55
- pointer's step does not take away. */
56
- .crewlet-emoji-picker__cell.is-chosen {
57
- background: var(--color-brand-accent-soft);
58
- }
59
-
60
- .crewlet-emoji-picker__cell:focus-visible {
61
- background: var(--color-surface-hover);
62
- outline: 2px solid var(--color-focus);
63
- outline-offset: var(--size-focus-ring-inset-offset);
64
- }
65
-
66
- .crewlet-emoji-picker__preview {
67
- display: flex;
68
- align-items: center;
69
- gap: var(--spacing-2);
70
- min-height: var(--size-control-md);
71
- padding: var(--spacing-2) var(--spacing-1) 0;
72
- border-top: 1px solid var(--color-edge-hairline);
73
- }
74
-
75
- .crewlet-emoji-picker__preview-emoji {
76
- font-size: var(--font-size-xl);
77
- line-height: 1;
78
- }
79
-
80
- .crewlet-emoji-picker__preview-words {
81
- display: flex;
82
- flex-direction: column;
83
- min-width: 0;
84
- }
85
-
86
- .crewlet-emoji-picker__preview-name {
87
- overflow: hidden;
88
- color: var(--color-text-primary);
89
- font-size: var(--font-size-sm);
90
- font-weight: var(--font-weight-semibold);
91
- text-overflow: ellipsis;
92
- white-space: nowrap;
93
- }
94
-
95
- .crewlet-emoji-picker__preview-code,
96
- .crewlet-emoji-picker__preview-idle {
97
- color: var(--color-text-tertiary);
98
- font-size: var(--font-size-xs);
99
- }
100
-
101
- .crewlet-emoji-picker__none {
102
- margin: var(--spacing-3) var(--spacing-1);
103
- color: var(--color-text-tertiary);
104
- font-size: var(--font-size-sm);
105
- }
@@ -1,2 +0,0 @@
1
- import './ChatScale-6NM4TP7R.css';
2
- import './ChatMessage-5AMJCGZY.css';
@@ -1,58 +0,0 @@
1
- import { PersonRow } from './chunk-XROJ6XQ3.js';
2
- import { cx } from './chunk-ODEQTPFM.js';
3
- import './PersonRow-3HOWUD6H.css';
4
- import './MentionMenu-77P7C4F7.css';
5
- import { jsx, jsxs } from 'react/jsx-runtime';
6
-
7
- var MENTION_MENU_LABELS = {
8
- hints: ["\u2191\u2193 to move", "Enter or Tab to choose", "Esc to close"]
9
- };
10
- function MentionMenu({
11
- id,
12
- label,
13
- options,
14
- active,
15
- onPick,
16
- onHover,
17
- listRef,
18
- keyed = true,
19
- footer,
20
- labels: overrides,
21
- className
22
- }) {
23
- const labels = overrides ? { ...MENTION_MENU_LABELS, ...overrides } : MENTION_MENU_LABELS;
24
- const foot = footer === void 0 ? /* @__PURE__ */ jsx("div", { className: "crewlet-mention-menu__footer", children: labels.hints.map((hint) => /* @__PURE__ */ jsx("span", { children: hint }, hint)) }) : footer === null ? null : /* @__PURE__ */ jsx("div", { className: "crewlet-mention-menu__footer", children: footer });
25
- return /* @__PURE__ */ jsxs("div", { className: cx("crewlet-mention-menu", !keyed && "crewlet-mention-menu--resting", className), children: [
26
- /* @__PURE__ */ jsx("div", { className: "crewlet-mention-menu__label", "aria-hidden": "true", children: label }),
27
- /* @__PURE__ */ jsx("ul", { ref: listRef, id, role: "listbox", "aria-label": label, className: "crewlet-mention-menu__list", children: options.map((option, index) => /* @__PURE__ */ jsx(
28
- PersonRow,
29
- {
30
- as: "option",
31
- id: `${id}-${index}`,
32
- density: "compact",
33
- avatar: option.mark,
34
- name: option.label,
35
- detail: option.detail,
36
- meta: option.note,
37
- selected: index === active,
38
- highlighted: index === active,
39
- onMouseDown: (event) => {
40
- event.preventDefault();
41
- onPick(option, index);
42
- },
43
- onMouseEnter: () => onHover(index)
44
- },
45
- option.id
46
- )) }),
47
- foot
48
- ] });
49
- }
50
- function mentionQuery(text, caret) {
51
- const before = text.slice(0, Math.max(0, Math.min(caret, text.length)));
52
- const match = /(^|\s)([@#])([\p{L}\p{N}_-]*)$/u.exec(before);
53
- if (!match) return null;
54
- const query = match[3] ?? "";
55
- return { trigger: match[2], query, start: before.length - query.length - 1 };
56
- }
57
-
58
- export { MENTION_MENU_LABELS, MentionMenu, mentionQuery };