@crewlethq/ui 0.17.1 → 0.19.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 (226) hide show
  1. package/README.md +55 -3
  2. package/dist/AccessDeniedCard/AccessDeniedCard.d.ts +39 -0
  3. package/dist/AccessDeniedCard/index.d.ts +3 -0
  4. package/dist/AccessDeniedCard/index.js +8 -0
  5. package/dist/AccessDeniedCard-WXM5DBDZ.css +8 -0
  6. package/dist/AppShell/index.js +2 -2
  7. package/dist/ArrangeBoard/ArrangeBoard.d.ts +32 -0
  8. package/dist/ArrangeBoard/index.d.ts +3 -0
  9. package/dist/ArrangeBoard/index.js +2 -0
  10. package/dist/ArrangeBoard-MQE35P6Z.css +80 -0
  11. package/dist/ArrangeFrame/ArrangeFrame.d.ts +82 -0
  12. package/dist/ArrangeFrame/index.d.ts +5 -0
  13. package/dist/ArrangeFrame/index.js +5 -0
  14. package/dist/ArrangeFrame/useGridResize.d.ts +66 -0
  15. package/dist/ArrangeFrame-3PLZAG22.css +329 -0
  16. package/dist/ArrangeGroup/ArrangeGroup.d.ts +42 -0
  17. package/dist/ArrangeGroup/index.d.ts +3 -0
  18. package/dist/ArrangeGroup/index.js +4 -0
  19. package/dist/ArrangeGroup-SHFHA7BE.css +170 -0
  20. package/dist/ArrangeList/ArrangeList.d.ts +64 -0
  21. package/dist/ArrangeList/index.d.ts +3 -0
  22. package/dist/ArrangeList/index.js +10 -0
  23. package/dist/ArrangeList-NNRTDFI5.css +94 -0
  24. package/dist/ArtifactCard/ArtifactCard.d.ts +61 -0
  25. package/dist/ArtifactCard/index.d.ts +3 -0
  26. package/dist/ArtifactCard/index.js +12 -0
  27. package/dist/ArtifactCard-EXVAEBV6.css +109 -0
  28. package/dist/AuthLayout/index.js +2 -2
  29. package/dist/AvatarPicker/index.js +5 -5
  30. package/dist/Canvas/index.js +2 -2
  31. package/dist/Card/index.js +1 -1
  32. package/dist/ChangeMark/ChangeMark.d.ts +26 -0
  33. package/dist/ChangeMark/index.d.ts +3 -0
  34. package/dist/ChangeMark/index.js +8 -0
  35. package/dist/ChangeMark-3VMTW7MT.css +22 -0
  36. package/dist/Checkbox/index.js +3 -3
  37. package/dist/Combobox/index.js +3 -3
  38. package/dist/CommandPalette/index.js +5 -5
  39. package/dist/Composer/index.js +3 -3
  40. package/dist/ConfirmField/index.js +3 -3
  41. package/dist/CursorFlag/CursorFlag.d.ts +34 -0
  42. package/dist/CursorFlag/index.d.ts +3 -0
  43. package/dist/CursorFlag/index.js +3 -0
  44. package/dist/CursorFlag-AJQJBUGY.css +61 -0
  45. package/dist/DataTable/index.js +7 -7
  46. package/dist/DataView/index.js +13 -13
  47. package/dist/DateTimePicker/index.js +2 -2
  48. package/dist/Divider/Divider.d.ts +15 -0
  49. package/dist/Divider/index.d.ts +3 -0
  50. package/dist/Divider/index.js +2 -0
  51. package/dist/Divider-3Z77ZAJH.css +37 -0
  52. package/dist/FollowBanner/FollowBanner.d.ts +35 -0
  53. package/dist/FollowBanner/index.d.ts +2 -0
  54. package/dist/FollowBanner/index.js +7 -0
  55. package/dist/FrameProtocol/index.d.ts +2 -0
  56. package/dist/FrameProtocol/index.js +2 -0
  57. package/dist/FrameProtocol/protocol.d.ts +164 -0
  58. package/dist/HuePicker/HuePicker.d.ts +16 -4
  59. package/dist/HuePicker/index.js +3 -3
  60. package/dist/{HuePicker-5QIUR6L7.css → HuePicker-PAIGH6LR.css} +6 -0
  61. package/dist/IconTile/IconTile.d.ts +23 -0
  62. package/dist/IconTile/index.d.ts +3 -0
  63. package/dist/IconTile/index.js +2 -0
  64. package/dist/IconTile-4GNWTLAW.css +30 -0
  65. package/dist/Input/index.js +2 -2
  66. package/dist/LinkInterstitial/LinkInterstitial.d.ts +41 -0
  67. package/dist/LinkInterstitial/index.d.ts +3 -0
  68. package/dist/LinkInterstitial/index.js +11 -0
  69. package/dist/LinkInterstitial-ET4MSVSV.css +34 -0
  70. package/dist/ListInput/index.js +4 -4
  71. package/dist/LiveCursor/LiveCursor.d.ts +34 -0
  72. package/dist/LiveCursor/index.d.ts +3 -0
  73. package/dist/LiveCursor/index.js +4 -0
  74. package/dist/LiveCursor-DZHGIYWE.css +47 -0
  75. package/dist/MarkdownEditor/index.js +3 -3
  76. package/dist/Menu/index.js +2 -2
  77. package/dist/Modal/Modal.d.ts +20 -0
  78. package/dist/Modal/index.js +2 -2
  79. package/dist/{Modal-RQAYGG4L.css → Modal-XOSV6FAH.css} +14 -0
  80. package/dist/Note/Note.d.ts +23 -0
  81. package/dist/Note/index.d.ts +3 -0
  82. package/dist/Note/index.js +2 -0
  83. package/dist/Note-RT4L6VUT.css +58 -0
  84. package/dist/OrgTable/index.js +5 -5
  85. package/dist/PinTile/PinTile.d.ts +37 -0
  86. package/dist/PinTile/index.d.ts +3 -0
  87. package/dist/PinTile/index.js +4 -0
  88. package/dist/PinTile-IIA25MNZ.css +141 -0
  89. package/dist/PresenceModel/index.d.ts +2 -0
  90. package/dist/PresenceModel/index.js +3 -0
  91. package/dist/PresenceModel/presence.d.ts +80 -0
  92. package/dist/PresenceRing/PresenceRing.d.ts +31 -0
  93. package/dist/PresenceRing/index.d.ts +3 -0
  94. package/dist/PresenceRing/index.js +2 -0
  95. package/dist/PresenceRing-M4C22Q6U.css +68 -0
  96. package/dist/PresenceStack/PresenceStack.d.ts +36 -0
  97. package/dist/PresenceStack/index.d.ts +3 -0
  98. package/dist/PresenceStack/index.js +9 -0
  99. package/dist/PresenceStack-QSXQJND5.css +59 -0
  100. package/dist/PricingCard/index.js +2 -2
  101. package/dist/Principal/Principal.d.ts +35 -0
  102. package/dist/Principal/index.d.ts +2 -0
  103. package/dist/Principal/index.js +4 -0
  104. package/dist/PrincipalPicker/PrincipalPicker.d.ts +45 -0
  105. package/dist/PrincipalPicker/index.d.ts +3 -0
  106. package/dist/PrincipalPicker/index.js +12 -0
  107. package/dist/PrincipalPicker-7NNZTGUP.css +41 -0
  108. package/dist/Reorder/index.d.ts +2 -0
  109. package/dist/Reorder/index.js +4 -0
  110. package/dist/Reorder/useReorder.d.ts +138 -0
  111. package/dist/SandboxedFrame/SandboxedFrame.d.ts +142 -0
  112. package/dist/SandboxedFrame/index.d.ts +3 -0
  113. package/dist/SandboxedFrame/index.js +8 -0
  114. package/dist/SandboxedFrame-L6HBQZCD.css +50 -0
  115. package/dist/ShareDialog/ShareDialog.d.ts +101 -0
  116. package/dist/ShareDialog/index.d.ts +5 -0
  117. package/dist/ShareDialog/index.js +19 -0
  118. package/dist/ShareDialog/roles.d.ts +10 -0
  119. package/dist/ShareDialog-YZ4F37MW.css +146 -0
  120. package/dist/SheetGrid/SheetGrid.d.ts +78 -0
  121. package/dist/SheetGrid/cells.d.ts +117 -0
  122. package/dist/SheetGrid/index.d.ts +5 -0
  123. package/dist/SheetGrid/index.js +18 -0
  124. package/dist/SheetGrid-4HOXDVIB.css +595 -0
  125. package/dist/SheetModel/clipboard.d.ts +37 -0
  126. package/dist/SheetModel/edits.d.ts +68 -0
  127. package/dist/SheetModel/index.d.ts +14 -0
  128. package/dist/SheetModel/index.js +3 -0
  129. package/dist/SheetModel/labels.d.ts +71 -0
  130. package/dist/SheetModel/navigation.d.ts +79 -0
  131. package/dist/SheetModel/options.d.ts +28 -0
  132. package/dist/SheetModel/types.d.ts +126 -0
  133. package/dist/SheetModel/values.d.ts +76 -0
  134. package/dist/SheetModel/view.d.ts +32 -0
  135. package/dist/StatGroup/StatGroup.d.ts +7 -1
  136. package/dist/StatGroup/index.js +1 -1
  137. package/dist/{StatGroup-HVG6O62W.css → StatGroup-PADTJCUQ.css} +7 -0
  138. package/dist/Switcher/index.js +8 -8
  139. package/dist/Tag/Tag.d.ts +13 -0
  140. package/dist/Tag/index.js +1 -1
  141. package/dist/{Tag-4BRQS6GN.css → Tag-SRGTK5KI.css} +42 -0
  142. package/dist/TagsInput/index.js +4 -4
  143. package/dist/ThemeSwitcher/apply.d.ts +43 -0
  144. package/dist/ThemeSwitcher/index.d.ts +4 -2
  145. package/dist/ThemeSwitcher/index.js +3 -2
  146. package/dist/ThemeSwitcher/preferences.d.ts +2 -19
  147. package/dist/ThemeToggle/index.js +3 -2
  148. package/dist/TimeWindowPicker/index.js +4 -4
  149. package/dist/Timeline/Timeline.d.ts +7 -2
  150. package/dist/Timeline/index.js +1 -1
  151. package/dist/TreeCanvas/index.js +3 -3
  152. package/dist/TreeGrid/index.js +2 -2
  153. package/dist/VersionTimeline/VersionTimeline.d.ts +76 -0
  154. package/dist/VersionTimeline/index.d.ts +3 -0
  155. package/dist/VersionTimeline/index.js +10 -0
  156. package/dist/VersionTimeline-EBJ6MIPJ.css +108 -0
  157. package/dist/{chunk-SBRE7IML.js → chunk-2ONWEDQT.js} +1 -1
  158. package/dist/chunk-35XVR5JQ.js +81 -0
  159. package/dist/chunk-3BYIWOTV.js +29 -0
  160. package/dist/chunk-4KP4RC3O.js +25 -0
  161. package/dist/chunk-5XACKNYR.js +53 -0
  162. package/dist/chunk-63WJLRB2.js +24 -0
  163. package/dist/{chunk-L4ZLXYPO.js → chunk-6A7P6II6.js} +1 -1
  164. package/dist/chunk-6KWNXIDE.js +18 -0
  165. package/dist/chunk-6MIXD6IW.js +49 -0
  166. package/dist/{chunk-FA2V2VT6.js → chunk-7FQEUNHX.js} +4 -4
  167. package/dist/{chunk-DEEVA6TV.js → chunk-7IJARUIF.js} +17 -4
  168. package/dist/{chunk-JCO3SIST.js → chunk-7ZNKEPLN.js} +2 -2
  169. package/dist/chunk-AIVZVKYZ.js +126 -0
  170. package/dist/{chunk-FSKTOIYC.js → chunk-AJESMWJS.js} +5 -5
  171. package/dist/{chunk-O67VF5MS.js → chunk-AUQPBL4O.js} +2 -2
  172. package/dist/chunk-CENOOTAV.js +1 -0
  173. package/dist/chunk-DEJHAOC5.js +279 -0
  174. package/dist/{chunk-UCYIRDND.js → chunk-DQSXWQMJ.js} +1 -1
  175. package/dist/{chunk-JF7X673Z.js → chunk-EIGEIT4O.js} +2 -2
  176. package/dist/chunk-F6V2PTN6.js +142 -0
  177. package/dist/chunk-FFMCMSJB.js +1 -0
  178. package/dist/chunk-FW7HN6AP.js +40 -0
  179. package/dist/chunk-G3EEUNZQ.js +46 -0
  180. package/dist/{chunk-LOECRMHA.js → chunk-GFV4LJHH.js} +4 -3
  181. package/dist/chunk-HTCJSUIZ.js +216 -0
  182. package/dist/{chunk-75CLJNDQ.js → chunk-I6NZKJGK.js} +1 -1
  183. package/dist/chunk-I6POAB4V.js +20 -0
  184. package/dist/chunk-IXJHTFXG.js +17 -0
  185. package/dist/chunk-JEDWC3GI.js +98 -0
  186. package/dist/{chunk-QVAFL2LE.js → chunk-JXRI5YD2.js} +3 -3
  187. package/dist/{chunk-ZFH7H7GS.js → chunk-LOLELDBW.js} +1 -1
  188. package/dist/{chunk-6TSZCBID.js → chunk-NP2C4Y4E.js} +1 -1
  189. package/dist/{chunk-6NN2F7GM.js → chunk-OIMAK5AE.js} +6 -6
  190. package/dist/chunk-PPAQFGS2.js +12 -0
  191. package/dist/chunk-PUQY4WXR.js +1235 -0
  192. package/dist/chunk-QO7QEQKV.js +24 -0
  193. package/dist/chunk-RT323I4I.js +49 -0
  194. package/dist/chunk-S35G6PNC.js +80 -0
  195. package/dist/{chunk-HENOTGUV.js → chunk-T7ICFXEC.js} +2 -2
  196. package/dist/{chunk-2OLCUNG7.js → chunk-TBIZSQHB.js} +1 -1
  197. package/dist/chunk-TODND5AD.js +99 -0
  198. package/dist/{chunk-PQ63NLFC.js → chunk-UXELEORU.js} +3 -3
  199. package/dist/{chunk-6NIMZ5XC.js → chunk-VJLYGPPE.js} +1 -1
  200. package/dist/chunk-VYDFB6PJ.js +243 -0
  201. package/dist/{chunk-7QFAORCY.js → chunk-WHZFDS62.js} +1 -1
  202. package/dist/chunk-WXAULPBH.js +135 -0
  203. package/dist/chunk-XJ2QEBMM.js +277 -0
  204. package/dist/{chunk-NXDEPUVG.js → chunk-XU4ZUGLE.js} +20 -5
  205. package/dist/chunk-YM3GJHGW.js +69 -0
  206. package/dist/{chunk-T3ZWBZ65.js → chunk-YSJYWQSP.js} +2 -2
  207. package/dist/{chunk-CXBAIVYZ.js → chunk-YSY6UJ4F.js} +1 -1
  208. package/dist/chunk-YYZRLLLY.js +822 -0
  209. package/dist/{chunk-EG6NYWVK.js → chunk-YZCJ63JF.js} +1 -1
  210. package/dist/{chunk-K3OWD7BJ.js → chunk-Z24ZUSTX.js} +4 -19
  211. package/dist/chunk-ZXXDZJQN.js +36 -0
  212. package/dist/generated/index.d.ts +27 -0
  213. package/dist/generated/index.js +98 -69
  214. package/dist/index.js +98 -69
  215. package/dist/styles.css +13625 -11206
  216. package/dist/utils/index.js +1 -1
  217. package/package.json +3 -3
  218. package/dist/chunk-EXHQ2QVW.js +0 -1
  219. package/dist/{chunk-CRVETI5L.js → chunk-4Z7PW3L6.js} +0 -0
  220. package/dist/{chunk-OYOQU7O5.js → chunk-EDGCPVVD.js} +1 -1
  221. package/dist/{chunk-NS7BVLL3.js → chunk-JULMZNGT.js} +1 -1
  222. package/dist/{chunk-2UU5IGZI.js → chunk-L4H7SSWF.js} +1 -1
  223. package/dist/{chunk-4GB57WIT.js → chunk-Q55TXPA3.js} +1 -1
  224. package/dist/{chunk-77IEHFY4.js → chunk-QQGWES46.js} +1 -1
  225. package/dist/{chunk-B2Z2CDM5.js → chunk-T5TFZ2JB.js} +1 -1
  226. package/dist/{chunk-AMH67MLM.js → chunk-TXAFKH2A.js} +1 -1
@@ -85,6 +85,18 @@ export interface ModalProps extends FrameAttributes {
85
85
  * one glance keeps its actions in the foot, where the eye ends up.
86
86
  */
87
87
  headerActions?: ReactNode;
88
+ /**
89
+ * A step back, drawn first in the head, before the title.
90
+ *
91
+ * For a surface reached FROM another one that stays the reader's place: a
92
+ * widget's options opened from a library of widgets, a record opened from a
93
+ * list in the same sheet. The way back belongs where the reader looks to
94
+ * learn where they are, beside the title, and not in a foot they have to
95
+ * scroll to. Closing is still the close control; this only goes back.
96
+ */
97
+ onBack?: (() => void) | undefined;
98
+ /** The back control's name, saying where it goes: "Back to widgets". */
99
+ backLabel?: string | undefined;
88
100
  children?: ReactNode;
89
101
  size?: ModalSize | undefined;
90
102
  variant?: ModalVariant | undefined;
@@ -99,6 +111,14 @@ export interface ModalProps extends FrameAttributes {
99
111
  dismissable?: boolean | undefined;
100
112
  /** A veil-only switch: the surface still closes on Escape and on its close control. */
101
113
  closeOnBackdrop?: boolean | undefined;
114
+ /**
115
+ * What the page behind looks like. `veil` dims and softens it, which is what
116
+ * a surface asking for the reader's whole attention wants. `clear` leaves it
117
+ * as it is, for a sheet whose changes ARE the page behind it (a page's
118
+ * customize sheet): a preview under a veil is a preview nobody can read. The
119
+ * surface is still modal; only the paint changes.
120
+ */
121
+ backdrop?: 'veil' | 'clear' | undefined;
102
122
  showCloseButton?: boolean | undefined;
103
123
  /** Stacks the body's children in a column with a gap, which most forms want. */
104
124
  stackBody?: boolean | undefined;
@@ -1,8 +1,8 @@
1
- export { ConfirmModal, Modal } from '../chunk-DEEVA6TV.js';
1
+ export { ConfirmModal, Modal } from '../chunk-7IJARUIF.js';
2
2
  import '../chunk-OG6CL3EB.js';
3
- import '../chunk-4FQT6ZAY.js';
4
3
  import '../chunk-PQADV6P6.js';
5
4
  import '../chunk-HMPFGIWM.js';
6
5
  import '../chunk-R25RGPUB.js';
6
+ import '../chunk-4FQT6ZAY.js';
7
7
  import '../chunk-BZFWDIV6.js';
8
8
  import '../chunk-ODEQTPFM.js';
@@ -57,6 +57,12 @@
57
57
  }
58
58
 
59
59
  /* Inside a LayerHost the overlay covers the host, not the window. */
60
+ /* The page behind stays as it is: see `backdrop` in Modal.tsx. */
61
+ .crewlet-modal-overlay--clear {
62
+ background: transparent;
63
+ backdrop-filter: none;
64
+ }
65
+
60
66
  .crewlet-modal-overlay--in-host {
61
67
  position: absolute;
62
68
  }
@@ -376,6 +382,14 @@
376
382
  margin: calc(var(--spacing-1) * -1);
377
383
  }
378
384
 
385
+ /* The step back leads the head, its glyph on the title's inline start, as
386
+ the close control's sits on the head's end. */
387
+ .crewlet-modal__back {
388
+ flex-shrink: 0;
389
+ margin-inline-start: calc(var(--spacing-2) * -1);
390
+ margin-block: calc(var(--spacing-1) * -1);
391
+ }
392
+
379
393
  .crewlet-modal__body {
380
394
  flex: 1 1 auto;
381
395
  min-height: 0;
@@ -0,0 +1,23 @@
1
+ import { type HTMLAttributes, type ReactNode } from 'react';
2
+ import type { SurfaceTone } from '../ArrangeGroup/index.js';
3
+ export interface NoteProps extends HTMLAttributes<HTMLDivElement> {
4
+ /** The paper it is written on: one of the six hues, or the page's own. */
5
+ tone?: SurfaceTone | undefined;
6
+ align?: 'start' | 'center' | undefined;
7
+ /** `lg` for a line meant to be read across the room: a goal, a rule. */
8
+ size?: 'md' | 'lg' | undefined;
9
+ children: ReactNode;
10
+ }
11
+ /**
12
+ * Words a reader leaves on their own page: a team's goal this week, how to
13
+ * read the cards below it, a link to the runbook. A dashboard's note.
14
+ *
15
+ * THE TONE IS THE PAPER, and the ink keeps its contrast on every one: each
16
+ * hue's fill with that hue's ink, which the palette gate measures as a pair.
17
+ * A note is never coloured to mean a state; the hues here are the reader's
18
+ * labels, the same six a group's band takes.
19
+ *
20
+ * IT SCROLLS rather than clipping when the reader makes it shorter than its
21
+ * words.
22
+ */
23
+ export declare const Note: import("react").ForwardRefExoticComponent<NoteProps & import("react").RefAttributes<HTMLDivElement>>;
@@ -0,0 +1,3 @@
1
+ import './Note.css';
2
+ export { Note } from './Note.js';
3
+ export type { NoteProps } from './Note.js';
@@ -0,0 +1,2 @@
1
+ export { Note } from '../chunk-63WJLRB2.js';
2
+ import '../chunk-ODEQTPFM.js';
@@ -0,0 +1,58 @@
1
+ /*
2
+ * Note: words on a coloured paper. Each hue pairs its fill with its own ink.
3
+ */
4
+
5
+ .crewlet-note {
6
+ --crewlet-note-paper: var(--color-surface-subtle);
7
+ --crewlet-note-edge: var(--color-border-default);
8
+ --crewlet-note-ink: var(--color-text-primary);
9
+
10
+ box-sizing: border-box;
11
+ min-width: 0;
12
+ min-height: 0;
13
+ padding: var(--spacing-4);
14
+ overflow: auto;
15
+ border: 1px solid var(--crewlet-note-edge);
16
+ border-radius: var(--radius-lg);
17
+ background: var(--crewlet-note-paper);
18
+ color: var(--crewlet-note-ink);
19
+ font-size: var(--font-size-sm);
20
+ line-height: var(--font-line-height-normal);
21
+ overflow-wrap: anywhere;
22
+ }
23
+
24
+ .crewlet-note--purple { --crewlet-note-paper: var(--color-node-purple-fill); --crewlet-note-edge: var(--color-node-purple-line); --crewlet-note-ink: var(--color-node-purple-ink); }
25
+ .crewlet-note--cyan { --crewlet-note-paper: var(--color-node-cyan-fill); --crewlet-note-edge: var(--color-node-cyan-line); --crewlet-note-ink: var(--color-node-cyan-ink); }
26
+ .crewlet-note--green { --crewlet-note-paper: var(--color-node-green-fill); --crewlet-note-edge: var(--color-node-green-line); --crewlet-note-ink: var(--color-node-green-ink); }
27
+ .crewlet-note--amber { --crewlet-note-paper: var(--color-node-amber-fill); --crewlet-note-edge: var(--color-node-amber-line); --crewlet-note-ink: var(--color-node-amber-ink); }
28
+ .crewlet-note--rose { --crewlet-note-paper: var(--color-node-rose-fill); --crewlet-note-edge: var(--color-node-rose-line); --crewlet-note-ink: var(--color-node-rose-ink); }
29
+ .crewlet-note--blue { --crewlet-note-paper: var(--color-node-blue-fill); --crewlet-note-edge: var(--color-node-blue-line); --crewlet-note-ink: var(--color-node-blue-ink); }
30
+
31
+ .crewlet-note--center {
32
+ display: flex;
33
+ flex-direction: column;
34
+ justify-content: center;
35
+ text-align: center;
36
+ }
37
+
38
+ .crewlet-note--lg {
39
+ font-size: var(--font-size-lg);
40
+ font-weight: var(--font-weight-medium);
41
+ letter-spacing: var(--font-letter-spacing-tight);
42
+ }
43
+
44
+ /* Prose inside takes the note's ink, links included. */
45
+ .crewlet-note :is(p, li, h2, h3, h4, strong, em) {
46
+ color: inherit;
47
+ }
48
+ .crewlet-note a {
49
+ color: inherit;
50
+ text-decoration: underline;
51
+ text-underline-offset: 2px;
52
+ }
53
+ .crewlet-note > :first-child {
54
+ margin-top: 0;
55
+ }
56
+ .crewlet-note > :last-child {
57
+ margin-bottom: 0;
58
+ }
@@ -1,13 +1,13 @@
1
- export { OrgTable, OrgTableActions, OrgTableAdd, OrgTableName } from '../chunk-L4ZLXYPO.js';
2
- import '../chunk-B2Z2CDM5.js';
1
+ export { OrgTable, OrgTableActions, OrgTableAdd, OrgTableName } from '../chunk-6A7P6II6.js';
2
+ import '../chunk-T5TFZ2JB.js';
3
3
  import '../chunk-MY374UUD.js';
4
4
  import '../chunk-AKEZ3G5V.js';
5
5
  import '../chunk-VYOKRN2I.js';
6
- import '../chunk-TROLVEZY.js';
7
- import '../chunk-4FQT6ZAY.js';
8
6
  import '../chunk-UAN5NE7M.js';
7
+ import '../chunk-5OM447RW.js';
8
+ import '../chunk-TROLVEZY.js';
9
9
  import '../chunk-HMPFGIWM.js';
10
10
  import '../chunk-R25RGPUB.js';
11
+ import '../chunk-4FQT6ZAY.js';
11
12
  import '../chunk-BZFWDIV6.js';
12
- import '../chunk-5OM447RW.js';
13
13
  import '../chunk-ODEQTPFM.js';
@@ -0,0 +1,37 @@
1
+ import { type HTMLAttributes, type ReactNode } from 'react';
2
+ import type { ReorderHandleProps } from '../Reorder/index.js';
3
+ export interface PinTileProps extends Omit<HTMLAttributes<HTMLDivElement>, 'title'> {
4
+ /** What was pinned, and the link's name. */
5
+ title: string;
6
+ /** Where it opens. */
7
+ href: string;
8
+ /** What kind of thing it is, before the facts: "Agent", "Project". */
9
+ kind?: string | undefined;
10
+ /** One line of what is true of it now: "Working on FAIR-1". */
11
+ meta?: ReactNode;
12
+ /** An avatar or glyph before the title. */
13
+ leading?: ReactNode;
14
+ /** A state mark (a dot, a tag) beside the title. */
15
+ status?: ReactNode;
16
+ /** One figure at the end: "14%", "3 open". */
17
+ figure?: ReactNode;
18
+ /** Unpin it; left out, the tile cannot be unpinned from here. */
19
+ onUnpin?: (() => void) | undefined;
20
+ /** The handle's props from `useReorder`; left out, the tile does not move. */
21
+ handle?: ReorderHandleProps | undefined;
22
+ }
23
+ /**
24
+ * Something a reader pinned, kept where they land: an agent, a project, a
25
+ * board, a page. A link with the one or two facts that make opening it
26
+ * unnecessary on most mornings.
27
+ *
28
+ * THE WHOLE TILE IS THE LINK'S TARGET, and the link is the title only. The
29
+ * tile's area is one stretched pseudo-element over the title's anchor, so a
30
+ * press anywhere opens it, a screen reader hears one link named by the title,
31
+ * and the unpin button and the handle are siblings of the anchor rather than
32
+ * buttons nested inside a link, which no browser can make operable.
33
+ *
34
+ * UNPIN IS ALWAYS THERE, quiet until the tile is hovered or focused. A
35
+ * control that appears only on hover is one a touch screen never shows.
36
+ */
37
+ export declare const PinTile: import("react").ForwardRefExoticComponent<PinTileProps & import("react").RefAttributes<HTMLDivElement>>;
@@ -0,0 +1,3 @@
1
+ import './PinTile.css';
2
+ export { PinTile } from './PinTile.js';
3
+ export type { PinTileProps } from './PinTile.js';
@@ -0,0 +1,4 @@
1
+ export { PinTile } from '../chunk-6MIXD6IW.js';
2
+ import '../chunk-4FQT6ZAY.js';
3
+ import '../chunk-BZFWDIV6.js';
4
+ import '../chunk-ODEQTPFM.js';
@@ -0,0 +1,141 @@
1
+ /*
2
+ * PinTile: one pinned thing, a link with its facts.
3
+ *
4
+ * A raised row rather than a card with a header: a shelf holds six of them,
5
+ * and six headed cards are six sections where the reader wanted six links.
6
+ */
7
+
8
+ .crewlet-pin-tile {
9
+ position: relative;
10
+ display: flex;
11
+ align-items: center;
12
+ gap: var(--spacing-3);
13
+ min-width: 0;
14
+ min-height: 56px;
15
+ padding: var(--spacing-2) var(--spacing-2) var(--spacing-2) var(--spacing-3);
16
+ border: 1px solid var(--color-border-default);
17
+ border-radius: var(--radius-lg);
18
+ background: var(--color-surface-elevated);
19
+ transition: border-color var(--motion-duration-fast) var(--motion-easing-default),
20
+ background-color var(--motion-duration-fast) var(--motion-easing-default);
21
+ }
22
+ .crewlet-pin-tile:hover {
23
+ border-color: var(--color-border-hover);
24
+ background: var(--color-surface-hover);
25
+ }
26
+ .crewlet-pin-tile:has(.crewlet-pin-tile__handle) {
27
+ padding-inline-start: var(--spacing-1);
28
+ }
29
+
30
+ .crewlet-pin-tile[data-reorder='dragging'] {
31
+ border-style: dashed;
32
+ border-color: var(--color-brand-accent);
33
+ background: var(--color-brand-accent-soft);
34
+ }
35
+ .crewlet-pin-tile[data-reorder='dragging'] > * {
36
+ opacity: 0.35;
37
+ }
38
+
39
+ .crewlet-pin-tile__handle {
40
+ position: relative;
41
+ z-index: var(--z-index-raised);
42
+ flex-shrink: 0;
43
+ cursor: grab;
44
+ color: var(--color-text-tertiary);
45
+ }
46
+
47
+ .crewlet-pin-tile__leading {
48
+ display: inline-flex;
49
+ flex-shrink: 0;
50
+ color: var(--color-text-secondary);
51
+ }
52
+
53
+ .crewlet-pin-tile__body {
54
+ display: flex;
55
+ flex: 1 1 auto;
56
+ flex-direction: column;
57
+ gap: 2px;
58
+ min-width: 0;
59
+ }
60
+
61
+ .crewlet-pin-tile__head {
62
+ display: flex;
63
+ align-items: center;
64
+ gap: var(--spacing-2);
65
+ min-width: 0;
66
+ }
67
+
68
+ .crewlet-pin-tile__link {
69
+ overflow: hidden;
70
+ font-size: var(--font-size-sm);
71
+ font-weight: var(--font-weight-medium);
72
+ color: var(--color-text-primary);
73
+ text-decoration: none;
74
+ text-overflow: ellipsis;
75
+ white-space: nowrap;
76
+ }
77
+ /* The tile's whole area, as the link's. */
78
+ .crewlet-pin-tile__link::after {
79
+ content: '';
80
+ position: absolute;
81
+ inset: 0;
82
+ border-radius: inherit;
83
+ }
84
+ .crewlet-pin-tile__link:focus-visible {
85
+ outline: 2px solid transparent;
86
+ }
87
+ /* The tile's ring, over its own edge, for the link that is its target. */
88
+ .crewlet-pin-tile:has(.crewlet-pin-tile__link:focus-visible) {
89
+ outline: 2px solid var(--color-focus);
90
+ outline-offset: -1px;
91
+ }
92
+
93
+ .crewlet-pin-tile__status {
94
+ display: inline-flex;
95
+ flex-shrink: 0;
96
+ }
97
+
98
+ .crewlet-pin-tile__meta {
99
+ overflow: hidden;
100
+ font-size: var(--font-size-xs);
101
+ color: var(--color-text-secondary);
102
+ text-overflow: ellipsis;
103
+ white-space: nowrap;
104
+ }
105
+ .crewlet-pin-tile__kind {
106
+ color: var(--color-text-tertiary);
107
+ }
108
+
109
+ .crewlet-pin-tile__figure {
110
+ flex-shrink: 0;
111
+ font-size: var(--font-size-sm);
112
+ font-weight: var(--font-weight-semibold);
113
+ font-variant-numeric: tabular-nums;
114
+ color: var(--color-text-primary);
115
+ }
116
+
117
+ /* Above the stretched link, so it takes its own press. */
118
+ .crewlet-pin-tile__unpin {
119
+ position: relative;
120
+ z-index: var(--z-index-raised);
121
+ flex-shrink: 0;
122
+ color: var(--color-brand-accent-ink);
123
+ opacity: 0.55;
124
+ transition: opacity var(--motion-duration-fast) var(--motion-easing-default);
125
+ }
126
+ .crewlet-pin-tile:hover .crewlet-pin-tile__unpin,
127
+ .crewlet-pin-tile:focus-within .crewlet-pin-tile__unpin {
128
+ opacity: 1;
129
+ }
130
+ @media (hover: none) {
131
+ .crewlet-pin-tile__unpin {
132
+ opacity: 1;
133
+ }
134
+ }
135
+
136
+ @media (prefers-reduced-motion: reduce) {
137
+ .crewlet-pin-tile,
138
+ .crewlet-pin-tile__unpin {
139
+ transition: none;
140
+ }
141
+ }
@@ -0,0 +1,2 @@
1
+ export { PRESENCE_ACTIVITIES, PRESENCE_LABELS, assignPresenceHues, collapseSessions, joinNames, presenceLabels, presenceOrder, } from './presence.js';
2
+ export type { PresenceActivity, PresenceKind, PresenceLabels, PresenceMember } from './presence.js';
@@ -0,0 +1,3 @@
1
+ import '../chunk-CENOOTAV.js';
2
+ export { PRESENCE_ACTIVITIES, PRESENCE_LABELS, assignPresenceHues, collapseSessions, joinNames, presenceLabels, presenceOrder } from '../chunk-S35G6PNC.js';
3
+ import '../chunk-AYKXMIOR.js';
@@ -0,0 +1,80 @@
1
+ /**
2
+ * Who is present in an artifact, as plain data: the order a roster is drawn
3
+ * in, the hue each collaborator's marks are drawn in, and the words a reader
4
+ * hears for both.
5
+ *
6
+ * FRAMEWORK FREE. Nothing here imports React or touches the document, because
7
+ * two renderers draw presence from it: the React components in this package,
8
+ * which the dashboard draws, and the artifact kit's custom elements, which an
9
+ * artifact page draws. A rule written once here cannot come to differ between
10
+ * the two.
11
+ *
12
+ * THE PRESENCE COLOUR IS THE NARROW EXCEPTION to colour carrying state. A
13
+ * collaborator's hue ties their cursor, their selection ring, their cell
14
+ * outline and their name flag to their name, and nothing else is drawn in it.
15
+ * An agent wears the hue an operator chose for it. A person is given one of
16
+ * the six node hues for the session, in join order, skipping the hues already
17
+ * in use in the room: never a hash of a name, and never stored on the person.
18
+ */
19
+ import { type NodeHue } from '../utils/nodeHue.js';
20
+ /** What a collaborator is doing: the engine's `artifacts.PresenceActivity`. */
21
+ export type PresenceActivity = 'editing' | 'viewing' | 'idle';
22
+ export declare const PRESENCE_ACTIVITIES: readonly ["editing", "viewing", "idle"];
23
+ /** A person, or an agent seat whose turn has the artifact open. */
24
+ export type PresenceKind = 'human' | 'agent';
25
+ /** One collaborator present in an artifact. */
26
+ export interface PresenceMember {
27
+ /** What tells two entries apart: a session, or a seat once tabs are collapsed. */
28
+ id: string;
29
+ /** The seat handle or principal the entry belongs to, so two tabs of one person collapse to one. */
30
+ seat?: string | undefined;
31
+ /** The display name, resolved by the host: the engine sends the seat handle only. */
32
+ name: string;
33
+ kind: PresenceKind;
34
+ activity: PresenceActivity;
35
+ /** The hue the collaborator's marks are drawn in. `assignPresenceHues` gives a person one. */
36
+ hue?: NodeHue | undefined;
37
+ /** An agent's Crewlet character, as `Avatar` draws it. */
38
+ character?: string | undefined;
39
+ /** A person's photo, as `Avatar` draws it. */
40
+ src?: string | undefined;
41
+ /** Where they are, in words: "Editing row Acme Corp", "Reading version 12 for ENG-412". */
42
+ location?: string | undefined;
43
+ }
44
+ export declare function presenceOrder<M extends Pick<PresenceMember, 'kind' | 'activity'>>(members: readonly M[]): M[];
45
+ /**
46
+ * One entry per seat: two tabs of one person are one collaborator, and the
47
+ * most active tab speaks for them. Entries with no seat are kept as they are.
48
+ * The first tab's position in the list is kept, so collapsing never reorders.
49
+ */
50
+ export declare function collapseSessions<M extends Pick<PresenceMember, 'id' | 'seat' | 'activity'>>(members: readonly M[]): M[];
51
+ /**
52
+ * The hue each member's marks are drawn in.
53
+ *
54
+ * An agent with a chosen hue keeps it. Every other member keeps the hue it was
55
+ * given before (`held`, the previous answer) while it stays present, and a
56
+ * newcomer, in the order given, takes the first of the six hues nobody present
57
+ * wears; past six, the hue the fewest members wear, so hues repeat as evenly
58
+ * as they can and the name on the flag tells the two apart.
59
+ */
60
+ export declare function assignPresenceHues(members: readonly Pick<PresenceMember, 'id' | 'kind' | 'hue'>[], held?: ReadonlyMap<string, NodeHue>): Map<string, NodeHue>;
61
+ /** Every string presence says, overridable wherever it is drawn. */
62
+ export interface PresenceLabels {
63
+ /** The activity word: "Editing", "Viewing", "Reading" for an agent viewing, "Idle". */
64
+ activity: (activity: PresenceActivity, kind: PresenceKind) => string;
65
+ /** The roster's accessible name. `others` counts everyone but the reader. */
66
+ here: (others: number, withSelf: boolean) => string;
67
+ /** One member, read out: "Maya Ortiz, editing row Acme Corp". */
68
+ member: (member: Pick<PresenceMember, 'name' | 'kind' | 'activity' | 'location'>) => string;
69
+ /** The members counted in the overflow chip: "3 more". */
70
+ more: (count: number) => string;
71
+ /** The flag on a cell somebody is editing: "Maya is editing". */
72
+ editing: (names: string) => string;
73
+ /** The words a focused cell gains when others are on it: "Jane Founder is also here." */
74
+ alsoHere: (names: readonly string[]) => string;
75
+ }
76
+ /** "Maya", "Maya and Jane", "Maya, Jane and 2 others". */
77
+ export declare function joinNames(names: readonly string[], shown?: number): string;
78
+ export declare const PRESENCE_LABELS: PresenceLabels;
79
+ /** Labels with a caller's overrides applied, the one way every component merges them. */
80
+ export declare function presenceLabels(overrides?: Partial<PresenceLabels>): PresenceLabels;
@@ -0,0 +1,31 @@
1
+ import type { HTMLAttributes, ReactNode } from 'react';
2
+ import type { NodeHue } from '../utils/nodeHue.js';
3
+ /** A collaborator's hue, or `neutral` for a host that draws every collaborator alike. */
4
+ export type PresenceHue = NodeHue | 'neutral';
5
+ /** Active is a solid ring; idle is dashed, for a collaborator who has stepped away. */
6
+ export type PresenceRingState = 'active' | 'idle';
7
+ /**
8
+ * The class that sets `--crewlet-presence-hue` on an element, for a component
9
+ * that draws a presence mark of its own (a flag, a cursor, a badge's ring).
10
+ * One table of hues for every presence mark, so a hue cannot be spelt two ways.
11
+ */
12
+ export declare function presenceHueClass(hue: PresenceHue): string;
13
+ export interface PresenceRingProps extends Omit<HTMLAttributes<HTMLSpanElement>, 'children'> {
14
+ hue: PresenceHue;
15
+ state?: PresenceRingState | undefined;
16
+ /** How far inside the element's edge the ring is drawn, in px. 1 by default, inside a hairline. */
17
+ inset?: number | undefined;
18
+ children?: ReactNode;
19
+ }
20
+ /**
21
+ * A collaborator's outline round whatever they are on: a cell, a card, an
22
+ * element of a page.
23
+ *
24
+ * INSET, so it never doubles the element's own border: the element keeps its
25
+ * one edge and the ring is drawn inside it. DECORATIVE: it is a pseudo element
26
+ * nothing reads, because the same fact is said in words where presence is
27
+ * listed and in the focused element's description ("Jane Founder is also
28
+ * here"). The hue is the presence colour exception (D22), so it is only ever
29
+ * drawn beside the collaborator's name.
30
+ */
31
+ export declare function PresenceRing({ hue, state, inset, className, style, children, ...rest }: PresenceRingProps): import("react").JSX.Element;
@@ -0,0 +1,3 @@
1
+ import './PresenceRing.css';
2
+ export { PresenceRing, presenceHueClass } from './PresenceRing.js';
3
+ export type { PresenceHue, PresenceRingProps, PresenceRingState } from './PresenceRing.js';
@@ -0,0 +1,2 @@
1
+ export { PresenceRing, presenceHueClass } from '../chunk-I6POAB4V.js';
2
+ import '../chunk-ODEQTPFM.js';
@@ -0,0 +1,68 @@
1
+ /*
2
+ * The presence hues and the ring drawn in them (PresenceRing.tsx).
3
+ *
4
+ * ONE TABLE OF HUES for every presence mark: a ring, a flag, a cursor and a
5
+ * badge's ring each read `--crewlet-presence-hue` from the class
6
+ * `presenceHueClass` writes, so the six node hues are spelt once. The hue is
7
+ * the presence colour exception: it ties a mark to a name and is spent on
8
+ * nothing else.
9
+ */
10
+
11
+ .crewlet-presence-hue--purple {
12
+ --crewlet-presence-hue: var(--color-node-purple);
13
+ }
14
+
15
+ .crewlet-presence-hue--cyan {
16
+ --crewlet-presence-hue: var(--color-node-cyan);
17
+ }
18
+
19
+ .crewlet-presence-hue--green {
20
+ --crewlet-presence-hue: var(--color-node-green);
21
+ }
22
+
23
+ .crewlet-presence-hue--amber {
24
+ --crewlet-presence-hue: var(--color-node-amber);
25
+ }
26
+
27
+ .crewlet-presence-hue--rose {
28
+ --crewlet-presence-hue: var(--color-node-rose);
29
+ }
30
+
31
+ .crewlet-presence-hue--blue {
32
+ --crewlet-presence-hue: var(--color-node-blue);
33
+ }
34
+
35
+ .crewlet-presence-hue--neutral {
36
+ --crewlet-presence-hue: var(--color-border-strong);
37
+ }
38
+
39
+ /*
40
+ * THE RING IS INSET and drawn on a pseudo element, so it never moves the
41
+ * content, never doubles the element's own border and is never read. 2px,
42
+ * the weight a selection ring is drawn at.
43
+ */
44
+ .crewlet-presence-ring {
45
+ --crewlet-presence-ring-inset: 1px;
46
+ position: relative;
47
+ display: inline-block;
48
+ }
49
+
50
+ .crewlet-presence-ring::after {
51
+ position: absolute;
52
+ inset: var(--crewlet-presence-ring-inset);
53
+ z-index: var(--z-index-presence);
54
+ border: 2px solid var(--crewlet-presence-hue);
55
+ border-radius: inherit;
56
+ content: '';
57
+ pointer-events: none;
58
+ }
59
+
60
+ .crewlet-presence-ring--idle::after {
61
+ border-style: dashed;
62
+ }
63
+
64
+ @media (forced-colors: active) {
65
+ .crewlet-presence-ring::after {
66
+ border-color: Highlight;
67
+ }
68
+ }
@@ -0,0 +1,36 @@
1
+ import { type AvatarSizeStep } from '../Avatar/index.js';
2
+ import { type PresenceLabels, type PresenceMember } from '../PresenceModel/index.js';
3
+ export interface PresenceStackProps {
4
+ /** Everybody present but the reader, in the order they joined. The stack orders them by activity. */
5
+ members: readonly PresenceMember[];
6
+ /** Whether the reader is present too, which is what the accessible name counts from: "You and 3 others are here". */
7
+ self?: boolean | undefined;
8
+ /** How many badges are drawn before the rest are counted in a chip. Four by default. */
9
+ max?: number | undefined;
10
+ size?: AvatarSizeStep | undefined;
11
+ /**
12
+ * Makes each badge a button: a host opens its own menu from it ("Follow
13
+ * Maya", "Open turn"). Without it the stack is one image with one name.
14
+ */
15
+ onSelect?: ((member: PresenceMember) => void) | undefined;
16
+ /** The stack's accessible name, where the derived one is not what it means where it stands. */
17
+ label?: string | undefined;
18
+ labels?: Partial<PresenceLabels> | undefined;
19
+ className?: string | undefined;
20
+ }
21
+ /**
22
+ * Who is here, at a glance: the badges of everybody present in an artifact,
23
+ * people editing first, then agents editing, people viewing, agents reading,
24
+ * and anybody idle last.
25
+ *
26
+ * A PRESENT BADGE WEARS A RING IN THE COLLABORATOR'S HUE, the same hue their
27
+ * cursor and cell outline are drawn in, which is how a reader matches a ring
28
+ * on a cell to a face in the stack. It is the presence colour exception (D22):
29
+ * the badge carries the name, and the ring is never the only carrier. An idle
30
+ * collaborator's badge loses its ring and fades, and says "Idle" in words.
31
+ *
32
+ * Built on the avatar stack's own geometry (the overlap, the cut-out ring in
33
+ * the ground's colour, the counted chip), so a presence stack and a stack of
34
+ * watchers beside it are one mark.
35
+ */
36
+ export declare function PresenceStack({ members, self, max, size, onSelect, label, labels, className }: PresenceStackProps): import("react").JSX.Element | null;
@@ -0,0 +1,3 @@
1
+ import './PresenceStack.css';
2
+ export { PresenceStack } from './PresenceStack.js';
3
+ export type { PresenceStackProps } from './PresenceStack.js';
@@ -0,0 +1,9 @@
1
+ export { PresenceStack } from '../chunk-YM3GJHGW.js';
2
+ import '../chunk-CENOOTAV.js';
3
+ import '../chunk-I6POAB4V.js';
4
+ import '../chunk-S35G6PNC.js';
5
+ import '../chunk-UAN5NE7M.js';
6
+ import '../chunk-AYKXMIOR.js';
7
+ import '../chunk-5OM447RW.js';
8
+ import '../chunk-BZFWDIV6.js';
9
+ import '../chunk-ODEQTPFM.js';