@crewlethq/ui 0.27.1 → 0.29.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 (114) hide show
  1. package/README.md +42 -2
  2. package/dist/AccessDeniedCard/index.js +3 -3
  3. package/dist/Accordion/index.js +3 -3
  4. package/dist/AppShell/index.js +3 -3
  5. package/dist/{AppShell-APHZKJYH.css → AppShell-GCM4TDVY.css} +4 -1
  6. package/dist/ArrangeGrid/ArrangeGrid.d.ts +22 -0
  7. package/dist/ArrangeGrid/index.d.ts +3 -0
  8. package/dist/ArrangeGrid/index.js +2 -0
  9. package/dist/ArrangeGrid-XM4ZFTED.css +17 -0
  10. package/dist/ArrangeGroup/index.js +1 -1
  11. package/dist/{ArrangeGroup-SHFHA7BE.css → ArrangeGroup-GY5YMP6E.css} +3 -4
  12. package/dist/ArtifactBar/ArtifactBar.d.ts +143 -0
  13. package/dist/ArtifactBar/index.d.ts +3 -0
  14. package/dist/ArtifactBar/index.js +25 -0
  15. package/dist/ArtifactBar-IBWB5POL.css +358 -0
  16. package/dist/ArtifactCard/index.js +3 -3
  17. package/dist/ArtifactCover/index.js +4 -4
  18. package/dist/ArtifactIcon/index.js +4 -4
  19. package/dist/ArtifactPanel/ArtifactPanel.d.ts +81 -0
  20. package/dist/ArtifactPanel/index.d.ts +3 -0
  21. package/dist/ArtifactPanel/index.js +5 -0
  22. package/dist/ArtifactPanel-YFXT5O77.css +132 -0
  23. package/dist/AuthLayout/index.js +3 -3
  24. package/dist/AvatarPicker/index.js +4 -4
  25. package/dist/Canvas/index.js +2 -2
  26. package/dist/CanvasBoard/index.js +4 -4
  27. package/dist/Card/index.js +2 -2
  28. package/dist/ChangeMark/index.js +1 -1
  29. package/dist/Charts/index.js +1 -1
  30. package/dist/{Charts-JYW4X5ZL.css → Charts-RY4JN5FC.css} +12 -0
  31. package/dist/CommandPalette/index.js +5 -5
  32. package/dist/CommentThread/index.js +4 -4
  33. package/dist/Composer/index.js +2 -2
  34. package/dist/DataTable/DataTable.d.ts +9 -0
  35. package/dist/DataTable/index.js +4 -4
  36. package/dist/DataView/index.js +10 -10
  37. package/dist/DatasetSource/index.js +1 -1
  38. package/dist/{DatasetSource-47LBDMPR.css → DatasetSource-XFPZBRXL.css} +12 -4
  39. package/dist/DateTimePicker/index.js +3 -3
  40. package/dist/Disclosure/index.js +3 -3
  41. package/dist/FollowBanner/index.js +2 -2
  42. package/dist/HuePicker/index.js +2 -2
  43. package/dist/LinkInterstitial/index.js +3 -3
  44. package/dist/ListInput/index.js +2 -2
  45. package/dist/MarkdownEditor/index.js +1 -1
  46. package/dist/Menu/index.js +2 -2
  47. package/dist/Modal/index.js +2 -2
  48. package/dist/Note/Note.d.ts +10 -0
  49. package/dist/Note/index.js +1 -1
  50. package/dist/{Note-RT4L6VUT.css → Note-ONSKKTOA.css} +10 -0
  51. package/dist/PeopleRail/PeopleRail.d.ts +8 -1
  52. package/dist/PeopleRail/index.js +2 -2
  53. package/dist/{PeopleRail-R64WVOSH.css → PeopleRail-SZGHZXVT.css} +8 -0
  54. package/dist/PresenceStack/index.js +1 -1
  55. package/dist/PresenterView/index.js +1 -1
  56. package/dist/ShareDialog/index.js +4 -4
  57. package/dist/SheetGrid/index.js +4 -4
  58. package/dist/SlideCompare/index.js +1 -1
  59. package/dist/Switcher/index.js +4 -4
  60. package/dist/ThemeSwitcher/index.js +1 -1
  61. package/dist/TimeWindowPicker/index.js +3 -3
  62. package/dist/TreeCanvas/index.js +3 -3
  63. package/dist/VersionCompare/index.js +2 -2
  64. package/dist/WidgetFrame/WidgetFrame.d.ts +14 -1
  65. package/dist/WidgetFrame/index.js +1 -1
  66. package/dist/WidgetFrame-LRZIL62O.css +206 -0
  67. package/dist/{chunk-V2Z24W2Z.js → chunk-4JUKWWUD.js} +1 -1
  68. package/dist/{chunk-MLT2HBPN.js → chunk-77DRMDXR.js} +7 -2
  69. package/dist/{chunk-BQYQWJPK.js → chunk-AAOH2P6Y.js} +8 -2
  70. package/dist/{chunk-35XVR5JQ.js → chunk-B4EBHPK3.js} +2 -2
  71. package/dist/chunk-CJKMURZO.js +31 -0
  72. package/dist/{chunk-INTEH4F3.js → chunk-CT4EZF62.js} +2 -2
  73. package/dist/{chunk-SVW3VG72.js → chunk-EBJREOKS.js} +5 -4
  74. package/dist/{chunk-BFQK7CYJ.js → chunk-EBNI36UQ.js} +2 -2
  75. package/dist/{chunk-M2VJGNCD.js → chunk-FKULOLKG.js} +2 -2
  76. package/dist/{chunk-6J35F334.js → chunk-GOSQXEZU.js} +1 -1
  77. package/dist/{chunk-5OY4LJFH.js → chunk-HVNTQ36V.js} +2 -2
  78. package/dist/chunk-I3BSQUKN.js +121 -0
  79. package/dist/{chunk-3D7PSL2L.js → chunk-JODJS7MR.js} +2 -2
  80. package/dist/{chunk-URUGEAFB.js → chunk-JQLTG4KH.js} +1 -1
  81. package/dist/{chunk-S4RCG44T.js → chunk-MICH6QSJ.js} +1 -1
  82. package/dist/chunk-QBA5B2Z5.js +17 -0
  83. package/dist/chunk-QMBP23BL.js +347 -0
  84. package/dist/{chunk-G2AVKPSL.js → chunk-RIAZM6L3.js} +1 -1
  85. package/dist/{chunk-OJRDEVHV.js → chunk-RODMM35O.js} +5 -5
  86. package/dist/{chunk-RSC7UJCR.js → chunk-S6VG5ZFZ.js} +1 -1
  87. package/dist/{chunk-PRNX5AFE.js → chunk-TGYDROIB.js} +1 -1
  88. package/dist/{chunk-G3EEUNZQ.js → chunk-UB7TJEKZ.js} +1 -1
  89. package/dist/chunk-UQHKFF2N.js +106 -0
  90. package/dist/{chunk-WHZFDS62.js → chunk-VDPJGP4Q.js} +1 -1
  91. package/dist/{chunk-GTLJXJ3U.js → chunk-VVRL27HM.js} +2 -2
  92. package/dist/{chunk-MQEEQVG6.js → chunk-XALUCIG5.js} +1 -1
  93. package/dist/{chunk-ZZDY4XL7.js → chunk-ZB5O3ELS.js} +12 -12
  94. package/dist/{chunk-L2OQRPXJ.js → chunk-ZR5VN5IV.js} +1 -1
  95. package/dist/generated/index.d.ts +3 -0
  96. package/dist/generated/index.js +91 -88
  97. package/dist/index.js +91 -88
  98. package/dist/styles.css +658 -23
  99. package/package.json +3 -3
  100. package/dist/WidgetFrame-4EFJOJMW.css +0 -127
  101. package/dist/chunk-63WJLRB2.js +0 -24
  102. package/dist/chunk-FVLCTCMV.js +0 -96
  103. package/dist/{chunk-UFKUWVMV.js → chunk-2HIOJ4YZ.js} +1 -1
  104. package/dist/{chunk-RIEDQSA4.js → chunk-7DZDSSJS.js} +1 -1
  105. package/dist/{chunk-YZCJ63JF.js → chunk-ACA27MZH.js} +1 -1
  106. package/dist/{chunk-ENJUPIND.js → chunk-FZVJDJFN.js} +1 -1
  107. package/dist/{chunk-F4DPAJCN.js → chunk-I3KKZ2O3.js} +1 -1
  108. package/dist/{chunk-SLRKS5PF.js → chunk-IFNQKWUO.js} +0 -0
  109. package/dist/{chunk-FW7HN6AP.js → chunk-LDJ3J4TQ.js} +1 -1
  110. package/dist/{chunk-SGIQCI6Y.js → chunk-LIXSV5YI.js} +1 -1
  111. package/dist/{chunk-KZOGQXSP.js → chunk-OJ45PPCV.js} +1 -1
  112. package/dist/{chunk-LREN6TUG.js → chunk-UZ6MA2V6.js} +2 -2
  113. package/dist/{chunk-WG5WUFBX.js → chunk-Y5NQ2LMS.js} +1 -1
  114. package/dist/{chunk-D5JZN3ML.js → chunk-Z6VW6CXX.js} +1 -1
package/README.md CHANGED
@@ -51,10 +51,10 @@ import { Button } from '@crewlethq/ui/Button'; // 8 KB of CSS, not 182 KB
51
51
  | Marks | `Count`, `StatusDot`, `EmptyValue`, `VisuallyHidden` |
52
52
  | Hooks and seams | `useModalLayer`, `usePopupLayer`, `LayerHost`, `useListbox`, `useOptionKeys`, `useHighlightRest` and `HIGHLIGHT_REST_MS`, `useClipboard`, `useDownload`, `downloadText`, `downloadBlob`, `safeFilename`, `toCsv`, `elementToPng` and `ElementToPngError`, `useOutcome`, `useAnnouncer`, `useNow`, `formatRelative`, `HeadingLevelProvider`, `cx`, the node hues (`NODE_HUES`, `NODE_HUE_NAMES`, `isNodeHue`) |
53
53
  | Layout | `Container`, `Section`, `Card`, `Tabs`, `Accordion`, `Disclosure`, `Outline` (with `useActiveHeading` and `scrollToHeading`), `TreeGrid` |
54
- | Arranging a page | `ArrangeBoard`, `ArrangeFrame` (with `useGridResize`), `ArrangeGroup`, `ArrangeList`, and the reorder hooks under them (`useReorder`, `useReorderLists`, `moveKey`) |
54
+ | Arranging a page | `ArrangeBoard`, `ArrangeGrid`, `ArrangeFrame` (with `useGridResize`), `ArrangeGroup`, `ArrangeList`, and the reorder hooks under them (`useReorder`, `useReorderLists`, `moveKey`) |
55
55
  | Application shell | `AppShell` with `AppShell.Rail`, `AppShell.Topbar`, `AppShell.AccountRow` and `useAppShell`, `AuthLayout`, `SidebarNav` and `NavItem`, `BrandLockup`, `SearchTrigger`, `PageHeader`, `Toolbar`, `Stack`, `Inline`, `Spacer`, `AutoGrid`, `ErrorBoundary`, `useShortcut`, `useFullscreen` |
56
56
  | Preferences | `ThemeToggle`, `ThemeSwitcher`, `DensitySwitcher`, `ThemeGallery`, `ThemeSwatch`, `useThemePreference`, `useDensityPreference`, `useSystemTheme`, `resolveTheme`, `applyStoredPreferences`, and the framework-free `applyTheme`, `applyPalette`, `applyDensity` with `THEME_PREFERENCES`, `DENSITY_PREFERENCES` and their guards |
57
- | Artifacts | `SandboxedFrame`, `LinkInterstitial` and `openExternal`, `VersionTimeline`, `ShareDialog` with the role ladder (`ARTIFACT_ROLES`, `SHAREABLE_ROLES`, `roleAtLeast`), `PrincipalPicker`, `Principal` and `PrincipalAvatar`, `ArtifactCard` and `ArtifactKindGlyph`, `CanvasBoard` (a design's artboards and notes on a `Canvas`, with the visibility budget `liveBoards`), `CanvasSchematic` (a design's cover, drawn from its boards' frames), `AccessDeniedCard`, `ArtifactIcon` (with `artifactIconGlyph` and `ARTIFACT_ICON_WORDS`), the native gallery covers (`DocCover`, `SheetCover`, `DashboardCover`), `MergeConflicts`, the dashboard pieces (`WidgetFrame`, `DatasetSource` and `DatasetSourceList`), and `FrameProtocol` (the wire between a host page and an embedded artifact, with no React in it) |
57
+ | Artifacts | `SandboxedFrame`, `LinkInterstitial` and `openExternal`, `VersionTimeline`, `ShareDialog` with the role ladder (`ARTIFACT_ROLES`, `SHAREABLE_ROLES`, `roleAtLeast`), `PrincipalPicker`, `Principal` and `PrincipalAvatar`, `ArtifactCard` and `ArtifactKindGlyph`, `ArtifactBar` and `ArtifactVersionChip` (an open artifact's one slim bar), `ArtifactPanel` and `ArtifactWorkspace` (the panels it opens beside or over the artifact), `CanvasBoard` (a design's artboards and notes on a `Canvas`, with the visibility budget `liveBoards`), `CanvasSchematic` (a design's cover, drawn from its boards' frames), `AccessDeniedCard`, `ArtifactIcon` (with `artifactIconGlyph` and `ARTIFACT_ICON_WORDS`), the native gallery covers (`DocCover`, `SheetCover`, `DashboardCover`), `MergeConflicts`, the dashboard pieces (`WidgetFrame`, `DatasetSource` and `DatasetSourceList`), and `FrameProtocol` (the wire between a host page and an embedded artifact, with no React in it) |
58
58
  | Sheets | `SheetGrid`, the cells on their own (`CheckboxCell`, `TextCell`, `LongTextCell`, `NumberCell`, `SelectCell`, `MultiSelectCell`, `PersonCell`, `StatusCell`, `DateCell`, `UrlCell`, `RatingCell`, and `SheetCell` for any type), `ChangeMark`, and `SheetModel` (every rule a sheet is drawn from, with no React in it: values, parsing, the keyboard model, TSV, the pending edits of D23) |
59
59
  | Presence | `PresenceStack`, `PresenceRing` and `presenceHueClass`, `CursorFlag`, `LiveCursor`, `FollowBanner`, `PeopleRail` (with `peopleRailKey`), and `PresenceModel` (the roster order, one entry per person, the session hues from `PRESENCE_HUES`, with no React in it) |
60
60
  | Presentations | `SlideStage` (a slide laid out at 1920 by 1080 and scaled to its box, with `SLIDE_WIDTH` and `SLIDE_HEIGHT`), `useSlideKeys` (the keys a show and a clicker send), `SlideFilmstrip`, `SlideGrid`, `SlideCompare` (with `SLIDE_COMPARE_LABELS`), `PresenterView` (with `formatStopwatch`) |
@@ -204,6 +204,46 @@ places:
204
204
  - A surface that pans or zooms dispatches `LAYER_REPOSITION_EVENT` on its host
205
205
  when the content beneath it moves, and every panel anchored inside follows.
206
206
 
207
+ ## Changes in 0.29.0
208
+
209
+ 0.29.0 adds the chrome an open artifact sits in: one slim bar over the artifact, and one panel at its side, so a host can give the artifact the screen and open everything else on demand.
210
+
211
+ **`ArtifactBar`** is the bar, the height of a large row. At its start, the way back (`back`, a link), the kind's glyph (the artifact's own `icon` word where it has one), the title as the heading (renamed in place where `onRename` is given: Enter takes it, Escape puts it back without reaching anything under the field, leaving the field takes it, and a sentence `onRename` answers keeps the field open and says it), and the `version` slot. In its middle, the kind's views (`modes`, one segmented choice, centred while both sides have room). At its end, `presence`, the kind's tools (`kindTools`), every artifact's tools (`tools`) and More (`menu`). A tool is data, not an element (a label, a glyph, its `keys`, `pressed`, a `badge`, `disabledReason`), because the bar draws each one twice: as an icon button with its name and keys in a tooltip and as `aria-keyshortcuts`, and as a row of More. It folds by its own width, a container query: under 860px the presence stack goes (a tool's `badge` comes back in its place), under 720px a `labelled` tool keeps only its glyph, and under 640px the views and every unlabelled tool fold into More as rows with their keys, and the kind's glyph gives the title its room. Both arrangements are drawn and the stylesheet shows one. `renaming` and `onRenamingChange` start a rename from elsewhere (a Rename row); `pending` stands a placeholder in for a title still being read; `as="div"` sits it inside a host's own banner.
212
+
213
+ **`ArtifactVersionChip`** is the version on show as a quiet chip beside the title that opens a menu of versions (`items`, so the host decides which and what else the menu offers). An older version than `latest` reads `v2 of 3` in the accent, so history never passes for the present.
214
+
215
+ **`ArtifactPanel`** is a panel at the artifact's side: a complementary region named by its heading, a head with its title, optional `actions`, an expand toggle where `onExpandedChange` is given, and Close, then a body that scrolls under the head. Opening moves focus to the heading unless `focusOnOpen` is false (a panel a link opened); closing with focus inside hands focus back to whatever held it before; Escape from anywhere inside closes it, unless something inside answered the press first. Its body starts headings at level 3, so a `Section` inside it nests under the panel's title. Sizes `sm`, `md` and `lg` rest at 20, 25 and 36rem.
216
+
217
+ **`ArtifactWorkspace`** lays the artifact's body and its one panel side by side: the panel is a column where the workspace holds two useful columns (960px), slides over the body's end edge under that, and is the whole screen under 640px. `expanded` gives the panel the whole workspace, with the body kept mounted behind it. The body scrolls itself; `bodyRef`, `bodyClassName` and `bodyLabel` are for the host's own listeners, styles and region name.
218
+
219
+ **`PeopleRail` takes `variant="plain"`**: its list alone, with no border, heading or close, for a host that already frames and names it, such as an `ArtifactPanel`.
220
+
221
+ **`AppShell` reserves no scrollbar gutter on a `fill` screen.** Its main never scrolls there, so the reserved gutter was a dead strip down the screen's end edge, which an artifact drawn edge to edge showed as a band beside it.
222
+
223
+ What to change:
224
+
225
+ - Nothing for an existing host. A `fill` screen's content column is the gutter's width wider than before.
226
+
227
+ ## Changes in 0.28.0
228
+
229
+ **`ArrangeGrid`** is the page grid a board's blocks stand on: equal columns (twelve unless `columns` says otherwise), the board's own gap, each `ArrangeFrame` spanning the columns it names. A frame writes `grid-column: span N`, which only a grid parent reads, so frames placed straight in an `ArrangeBoard` stacked at full width; every board now lays its blocks on this one grid rather than on a grid of its own. `ArrangeGroup`'s body is the same grid inside the group, so a block is one width on the page and in a group, and while the page is arranged the grid opens its rows a step for each block's toolbar.
230
+
231
+ **`StackedColumns` keeps its top value inside the figure.** The axis's top tick is centred on the plot's top edge, so half of it stood above the plot; with no head row it fell outside the figure, and a container that clips its content cut the highest value in half. A chart with no head now keeps that half line above its plot, and the tick's line height is the tight step it is measured at.
232
+
233
+ **`WidgetFrame` stands on the card recipe.** It drew the elevated ground at a 12px inset, so a dashboard's figures were a different object from every card beside them. It now takes the card's ground (`--color-surface-subtle`), its hairline and corner, and the card's 16px inset on every part. The title takes a second line before it gives up a word (cut at one line, a frame three columns wide named "Tokens, last 14 days" as "Tokens, last 14 da"), and the controls stand on its first line. The citation is one line, the dataset's title ending before the time leaves it; in a frame narrower than 18rem it stacks, the title over the time. A stat tile drawn `flush` as the figure takes the frame's inset rather than doubling it. New `flush` lets a table reach the frame's sides: its row rules meet the border, and its cells take the frame's inset, so the first column starts under the title.
234
+
235
+ **`Note` takes a `heading`**, set at a card title's step in the note's ink, which names the note as a region. A note on a board then reads as one of its cards rather than as a label over loose prose.
236
+
237
+ **`DataTableColumn.minWidth`** is the narrowest the fit pass shrinks a `defaultWidth` column to. For the one column that gives up room to its box but has to stay readable while it does, a title beside short held columns: the fit took every pixel the box was short down to the table's floor, and a title read "READ…". Past it the table scrolls sideways.
238
+
239
+ **`DatasetSource` says how its rows are kept current on a line of its own**, under the facts, and sets its title at the medium weight. On the line of facts the refresh wrapped under them and began with the separator, and a rail of semibold titles outweighed the figures it cites.
240
+
241
+ What to change:
242
+
243
+ - Wrap a board's page of frames in `ArrangeGrid` (inside `ArrangeBoard`) in place of a grid of your own.
244
+ - Pass `flush` to a `WidgetFrame` whose figure is a table.
245
+ - A host that relied on the frame's elevated ground or its one-line title restyles nothing: both changed for every figure.
246
+
207
247
  ## Changes in 0.27.1
208
248
 
209
249
  **`useSlideKeys` answers every key with the newest handlers.** It re-added its document listener after each render, so after every step there was a gap, between the new slide's commit and the effect that re-added the listener, in which a quick second press (a clicker held down, two taps) reached the previous slide's handlers and moved to the slide already shown: the press was lost. The hook now keeps one listener for as long as it is `enabled` and reads the handlers from a ref it brings up to date as each render commits, before the browser can dispatch another event. A show whose stage stays mounted across slides, as `SlideStage fit="view"` does, met the gap on almost every quick press.
@@ -1,8 +1,8 @@
1
- export { ACCESS_DENIED_REASONS, AccessDeniedCard } from '../chunk-G3EEUNZQ.js';
1
+ export { ACCESS_DENIED_REASONS, AccessDeniedCard } from '../chunk-UB7TJEKZ.js';
2
2
  import '../chunk-RA2ULG6H.js';
3
- import '../chunk-YZCJ63JF.js';
3
+ import '../chunk-ACA27MZH.js';
4
4
  import '../chunk-AV2DXAEL.js';
5
- import '../chunk-PQADV6P6.js';
6
5
  import '../chunk-BHHIIK3M.js';
6
+ import '../chunk-PQADV6P6.js';
7
7
  import '../chunk-BZFWDIV6.js';
8
8
  import '../chunk-ODEQTPFM.js';
@@ -1,6 +1,6 @@
1
- export { Accordion, AccordionItem } from '../chunk-G2AVKPSL.js';
2
- import '../chunk-ENJUPIND.js';
3
- import '../chunk-PQADV6P6.js';
1
+ export { Accordion, AccordionItem } from '../chunk-RIAZM6L3.js';
2
+ import '../chunk-FZVJDJFN.js';
4
3
  import '../chunk-BHHIIK3M.js';
4
+ import '../chunk-PQADV6P6.js';
5
5
  import '../chunk-BZFWDIV6.js';
6
6
  import '../chunk-ODEQTPFM.js';
@@ -1,9 +1,9 @@
1
- export { AccountRow, AppShell, AppShellRail, AppShellRailRow, AppShellToggle, AppShellTopbar, useAppShell } from '../chunk-BFQK7CYJ.js';
1
+ export { AccountRow, AppShell, AppShellRail, AppShellRailRow, AppShellToggle, AppShellTopbar, useAppShell } from '../chunk-EBNI36UQ.js';
2
2
  import '../chunk-IG75YMUN.js';
3
- import '../chunk-UFKUWVMV.js';
4
- import '../chunk-OG6CL3EB.js';
3
+ import '../chunk-2HIOJ4YZ.js';
5
4
  import '../chunk-HMPFGIWM.js';
6
5
  import '../chunk-R25RGPUB.js';
6
+ import '../chunk-OG6CL3EB.js';
7
7
  import '../chunk-4FQT6ZAY.js';
8
8
  import '../chunk-BZFWDIV6.js';
9
9
  import '../chunk-ODEQTPFM.js';
@@ -489,9 +489,12 @@
489
489
  }
490
490
 
491
491
  /* A screen that draws to the bottom of the window: the scroller stops
492
- scrolling and the content column takes the height that is left. */
492
+ scrolling and the content column takes the height that is left. It
493
+ reserves no scrollbar gutter either, since nothing in it scrolls: the
494
+ reserved strip was a dead band down the screen's end edge. */
493
495
  .crewlet-app-shell--fill .crewlet-app-shell__main {
494
496
  overflow: hidden;
497
+ scrollbar-gutter: auto;
495
498
  }
496
499
 
497
500
  .crewlet-app-shell--fill .crewlet-app-shell__content {
@@ -0,0 +1,22 @@
1
+ import type { HTMLAttributes, ReactNode } from 'react';
2
+ export interface ArrangeGridProps extends HTMLAttributes<HTMLDivElement> {
3
+ /** Columns of the grid, which each block spans a number of. Twelve by default. */
4
+ columns?: number | undefined;
5
+ children?: ReactNode;
6
+ }
7
+ /**
8
+ * The page grid a board's blocks stand on: equal columns, each block
9
+ * (an `ArrangeFrame`) spanning the number of them it says.
10
+ *
11
+ * A FRAME'S WIDTH IS READ ONLY BY A GRID. `ArrangeFrame` writes
12
+ * `grid-column: span N`, which means nothing to a block parent, so frames
13
+ * placed straight in an `ArrangeBoard` stack at the page's full width. This is
14
+ * that grid, once, for every board: the page's blocks stand on it, and an
15
+ * `ArrangeGroup`'s body is the same grid inside the group, so a block is the
16
+ * same width on the page and in a group.
17
+ *
18
+ * ITS GAP IS THE BOARD'S. The board's column lanes are drawn from
19
+ * `--crewlet-arrange-board-gap`, and so is this, so a lane is exactly the
20
+ * column a block snaps to.
21
+ */
22
+ export declare function ArrangeGrid({ columns, className, style, children, ...rest }: ArrangeGridProps): import("react").JSX.Element;
@@ -0,0 +1,3 @@
1
+ import './ArrangeGrid.css';
2
+ export { ArrangeGrid } from './ArrangeGrid.js';
3
+ export type { ArrangeGridProps } from './ArrangeGrid.js';
@@ -0,0 +1,2 @@
1
+ export { ArrangeGrid } from '../chunk-QBA5B2Z5.js';
2
+ import '../chunk-ODEQTPFM.js';
@@ -0,0 +1,17 @@
1
+ /*
2
+ * ArrangeGrid: the page grid a board's blocks stand on. Equal columns, the
3
+ * board's gap between them, and each block stretched to its row's height, so
4
+ * the cards in one row share their bottom edge.
5
+ */
6
+ .crewlet-arrange-grid {
7
+ display: grid;
8
+ grid-template-columns: repeat(var(--crewlet-arrange-columns, 12), minmax(0, 1fr));
9
+ gap: var(--crewlet-arrange-board-gap, var(--spacing-4));
10
+ align-items: stretch;
11
+ }
12
+
13
+ /* More room between rows while the page is arranged: each block's toolbar
14
+ sits on its top edge, half in the gap above it. */
15
+ .crewlet-arrange-board.is-editing .crewlet-arrange-grid {
16
+ row-gap: var(--spacing-5);
17
+ }
@@ -1,4 +1,4 @@
1
- export { ArrangeGroup } from '../chunk-35XVR5JQ.js';
1
+ export { ArrangeGroup } from '../chunk-B4EBHPK3.js';
2
2
  import '../chunk-BHHIIK3M.js';
3
3
  import '../chunk-BZFWDIV6.js';
4
4
  import '../chunk-ODEQTPFM.js';
@@ -132,11 +132,10 @@
132
132
  margin-inline-start: auto;
133
133
  }
134
134
 
135
+ /* The body is the page's grid (ArrangeGrid's `.crewlet-arrange-grid`), inside
136
+ the group: the same columns and gap, so a block is one width on the page
137
+ and in a group. */
135
138
  .crewlet-arrange-group__body {
136
- display: grid;
137
- grid-template-columns: repeat(var(--crewlet-arrange-columns, 12), minmax(0, 1fr));
138
- gap: var(--spacing-4);
139
- align-items: stretch;
140
139
  padding: var(--spacing-4);
141
140
  min-height: 5rem;
142
141
  }
@@ -0,0 +1,143 @@
1
+ import { type ReactNode } from 'react';
2
+ import type { ArtifactKind } from '../ArtifactCard/index.js';
3
+ import { type MenuEntry } from '../Menu/index.js';
4
+ /**
5
+ * One control at the bar's end: a panel it opens, or an action it runs.
6
+ *
7
+ * A TOOL IS DATA, NOT AN ELEMENT, because the bar draws each one twice: as an
8
+ * icon button while the bar has room, and as a row of the More menu once it
9
+ * does not. An element could only ever be drawn in one of the two.
10
+ */
11
+ export interface ArtifactBarTool {
12
+ key: string;
13
+ /** What it does, in words: the button's name, its tooltip and its menu row. */
14
+ label: string;
15
+ /** A glyph from @crewlethq/icons/glyphs. */
16
+ icon: ReactNode;
17
+ onSelect: () => void;
18
+ /** A panel it opens is open: drawn pressed, and said to be. */
19
+ pressed?: boolean | undefined;
20
+ /**
21
+ * The shortcut, as the keys it is pressed with (`['h']`, `['Mod', 'k']`).
22
+ * Drawn in the tooltip and the menu row and set as `aria-keyshortcuts`;
23
+ * binding it is the caller's.
24
+ */
25
+ keys?: readonly string[] | undefined;
26
+ /** A small figure on the glyph: how many people are here. Say it in `label` too. */
27
+ badge?: string | number | undefined;
28
+ /** Unavailable, and why. The control stays drawn and says it. */
29
+ disabledReason?: string | undefined;
30
+ /**
31
+ * Drawn with its word beside the glyph while the bar is wide, and kept in
32
+ * the bar as a glyph when it is not, rather than folded into More: Share,
33
+ * or a kind's primary action such as a doc's Edit.
34
+ */
35
+ labelled?: boolean | undefined;
36
+ }
37
+ /** The ways a kind draws itself, as one choice: a deck's Edit, Grid and Present. */
38
+ export interface ArtifactBarModes {
39
+ /** Names the group: "View". */
40
+ label: string;
41
+ value: string;
42
+ options: readonly {
43
+ value: string;
44
+ label: string;
45
+ icon?: ReactNode;
46
+ }[];
47
+ onValueChange: (value: string) => void;
48
+ }
49
+ export interface ArtifactBarLabels {
50
+ /** The More menu's name. */
51
+ more: (title: string) => string;
52
+ /** Said after the title's own name when it can be renamed by pressing it. */
53
+ renameHint: string;
54
+ /** The title field's name while renaming. */
55
+ titleField: string;
56
+ /** What an empty title is told. */
57
+ emptyTitle: string;
58
+ }
59
+ export declare const ARTIFACT_BAR_LABELS: ArtifactBarLabels;
60
+ export interface ArtifactBarProps {
61
+ title: string;
62
+ kind: ArtifactKind;
63
+ /** The artifact's own icon word; its kind's glyph where it has none. */
64
+ icon?: string | null | undefined;
65
+ /** What the kind is called, said with the glyph: "Slides". */
66
+ kindLabel: string;
67
+ /** The way back to where the reader came from, as a link. */
68
+ back?: {
69
+ href: string;
70
+ label: string;
71
+ } | undefined;
72
+ /** Before everything, such as an application shell's navigation toggle. */
73
+ start?: ReactNode;
74
+ /**
75
+ * Renames in place. Left out, the title is read only. It answers what went
76
+ * wrong, in a sentence, to keep the field open and say it; or nothing when
77
+ * the new title was taken.
78
+ */
79
+ onRename?: ((title: string) => Promise<string | null | undefined | void> | string | null | undefined | void) | undefined;
80
+ /** Whether the title is being renamed now; controlled, for a Rename row elsewhere. */
81
+ renaming?: boolean | undefined;
82
+ onRenamingChange?: ((renaming: boolean) => void) | undefined;
83
+ /** Beside the title: the version chip ([ArtifactVersionChip]). */
84
+ version?: ReactNode;
85
+ /** The kind's views, drawn in the middle of the bar. */
86
+ modes?: ArtifactBarModes | undefined;
87
+ /** Who else is here, such as a presence stack. Folded away first on a narrower bar. */
88
+ presence?: ReactNode;
89
+ /** The kind's own controls, before the panels: a doc's Edit. */
90
+ kindTools?: readonly ArtifactBarTool[] | undefined;
91
+ /** The panels and actions every artifact has: details, history, people, share. */
92
+ tools?: readonly ArtifactBarTool[] | undefined;
93
+ /** The More menu's own rows. The tools that fold on a narrow bar are added above them. */
94
+ menu?: readonly MenuEntry[] | undefined;
95
+ /** `header` stands as the page's banner; `div` sits inside a host's own. */
96
+ as?: 'header' | 'div' | undefined;
97
+ /** The title's heading level: 1 where the bar is the page's own head. */
98
+ headingLevel?: 1 | 2 | 3 | undefined;
99
+ /** The title is still being read: a placeholder stands in its place. */
100
+ pending?: boolean | undefined;
101
+ labels?: Partial<ArtifactBarLabels> | undefined;
102
+ className?: string | undefined;
103
+ }
104
+ /**
105
+ * The one slim bar an open artifact sits under, so the artifact keeps the
106
+ * rest of the screen.
107
+ *
108
+ * WHAT IT HOLDS, IN THE ORDER A READER SCANS IT: the way back, what the
109
+ * artifact is (its glyph and its title, renamed in place by whoever may), the
110
+ * version on show, then the kind's own views in the middle, and at the end
111
+ * who else is here, the kind's tools, the panels every artifact has, Share
112
+ * and More. Everything past the title opens on demand: a panel, a menu or a
113
+ * dialog, never a second row of chrome.
114
+ *
115
+ * IT FOLDS BY ITS OWN WIDTH, a container query rather than the window's, since
116
+ * a sidebar or a panel beside it is what decides its room. Narrower than a
117
+ * laptop's sheet the presence stack goes, then the labelled tools' words;
118
+ * narrower than a phone's two panes, the views and every tool but the
119
+ * labelled ones fold into More, where each is a row with its shortcut, and
120
+ * the kind's glyph gives the title its room. Both arrangements are drawn and
121
+ * the stylesheet shows one, so no control is ever in two places a reader can
122
+ * see at once and nothing is measured in script.
123
+ */
124
+ export declare function ArtifactBar({ title, kind, icon, kindLabel, back, start, onRename, renaming, onRenamingChange, version, modes, presence, kindTools, tools, menu, as, headingLevel, pending, labels, className, }: ArtifactBarProps): import("react").JSX.Element;
125
+ export interface ArtifactVersionChipProps {
126
+ /** The version on show. */
127
+ version: number;
128
+ /** The newest version. */
129
+ latest: number;
130
+ /** The versions to pick from, newest first, and what else the menu offers. */
131
+ items: readonly MenuEntry[];
132
+ /** Names the menu. */
133
+ label?: string | undefined;
134
+ /** The chip's words: `v3`, or `v2 of 3` for an older one. */
135
+ format?: ((version: number, latest: number) => string) | undefined;
136
+ }
137
+ /**
138
+ * The version on show, as a quiet chip beside the title that opens the
139
+ * versions. An older version than the newest says so in the chip itself and
140
+ * takes the accent, so a reader looking at history cannot mistake it for
141
+ * what everyone else sees.
142
+ */
143
+ export declare function ArtifactVersionChip({ version, latest, items, label, format, }: ArtifactVersionChipProps): import("react").JSX.Element;
@@ -0,0 +1,3 @@
1
+ import './ArtifactBar.css';
2
+ export { ARTIFACT_BAR_LABELS, ArtifactBar, ArtifactVersionChip } from './ArtifactBar.js';
3
+ export type { ArtifactBarLabels, ArtifactBarModes, ArtifactBarProps, ArtifactBarTool, ArtifactVersionChipProps, } from './ArtifactBar.js';
@@ -0,0 +1,25 @@
1
+ export { ARTIFACT_BAR_LABELS, ArtifactBar, ArtifactVersionChip } from '../chunk-QMBP23BL.js';
2
+ import '../chunk-FQCLKD7U.js';
3
+ import '../chunk-SMBKXWML.js';
4
+ import '../chunk-QWOPX2MN.js';
5
+ import '../chunk-RCQXUT5K.js';
6
+ import '../chunk-HJEVSQN6.js';
7
+ import '../chunk-RKKO7QHH.js';
8
+ import '../chunk-4JUKWWUD.js';
9
+ import '../chunk-GOSQXEZU.js';
10
+ import '../chunk-4KP4RC3O.js';
11
+ import '../chunk-3CZ7XAVY.js';
12
+ import '../chunk-EUCC37WY.js';
13
+ import '../chunk-UAN5NE7M.js';
14
+ import '../chunk-5OM447RW.js';
15
+ import '../chunk-ACA27MZH.js';
16
+ import '../chunk-AV2DXAEL.js';
17
+ import '../chunk-BHHIIK3M.js';
18
+ import '../chunk-PQADV6P6.js';
19
+ import '../chunk-2HIOJ4YZ.js';
20
+ import '../chunk-HMPFGIWM.js';
21
+ import '../chunk-R25RGPUB.js';
22
+ import '../chunk-OG6CL3EB.js';
23
+ import '../chunk-4FQT6ZAY.js';
24
+ import '../chunk-BZFWDIV6.js';
25
+ import '../chunk-ODEQTPFM.js';