@crewlethq/ui 0.82.0 → 0.84.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +63 -1
- package/dist/ActionCard/ActionCard.d.ts +7 -7
- package/dist/ActionCard/index.js +1 -1
- package/dist/ActionCard-YZKL3CKR.css +130 -0
- package/dist/AppShell/AccountRow.d.ts +6 -1
- package/dist/AppShell/AppShell.d.ts +25 -13
- package/dist/AppShell/index.d.ts +1 -1
- package/dist/AppShell/index.js +8 -5
- package/dist/AppShell/railMotion.d.ts +60 -0
- package/dist/AppShell/railShape.d.ts +5 -0
- package/dist/{AppShell-F7RID4P4.css → AppShell-NX5HCD4O.css} +251 -90
- package/dist/ArrangeList/index.js +3 -2
- package/dist/ArtifactBar/index.js +7 -5
- package/dist/ArtifactCard/index.js +3 -3
- package/dist/ArtifactKindIllustration/index.js +1 -1
- package/dist/{ArtifactKinds-3EH4KR3F.css → ArtifactKinds-27TE3KJL.css} +7 -7
- package/dist/ArtifactMakeRow/index.js +1 -1
- package/dist/ArtifactNameCell/index.js +1 -1
- package/dist/AuthLayout/index.js +3 -3
- package/dist/AvatarPicker/index.js +7 -6
- package/dist/BrandLockup/index.js +2 -2
- package/dist/BriefCard/index.js +2 -1
- package/dist/Canvas/index.js +4 -2
- package/dist/CanvasBoard/index.js +6 -4
- package/dist/CanvasToolbar/index.js +5 -3
- package/dist/CatalogTile/CatalogTile.d.ts +23 -5
- package/dist/CatalogTile/index.d.ts +1 -1
- package/dist/CatalogTile/index.js +2 -1
- package/dist/{CatalogTile-6VF36JWA.css → CatalogTile-TMOSGSV3.css} +4 -3
- package/dist/ChangeMark/index.js +4 -2
- package/dist/ChatThread/index.js +2 -2
- package/dist/CommandPalette/index.js +3 -2
- package/dist/CompactNav/CompactNav.d.ts +10 -6
- package/dist/CompactNav/index.js +2 -1
- package/dist/ContrastHelp/index.js +3 -2
- package/dist/DataGrid/index.js +2 -2
- package/dist/DataTable/index.js +4 -3
- package/dist/DataView/index.js +8 -7
- package/dist/DateTimePicker/index.js +3 -2
- package/dist/DeepWorkCard/index.js +2 -2
- package/dist/DirectoryList/index.js +1 -1
- package/dist/{DirectoryList-XZOWYOA3.css → DirectoryList-IXQIMNFS.css} +8 -1
- package/dist/DocTabsEditor/index.js +5 -3
- package/dist/DockColumn/DockColumn.d.ts +68 -0
- package/dist/DockColumn/index.d.ts +3 -0
- package/dist/DockColumn/index.js +6 -0
- package/dist/DockColumn-SMJCXHS4.css +61 -0
- package/dist/{Editor-7EQWP3RN.js → Editor-VGNB35NJ.js} +2 -1
- package/dist/EmojiPicker/index.js +5 -3
- package/dist/FactList/index.js +4 -2
- package/dist/HuePicker/index.js +5 -4
- package/dist/InboxList/InboxList.d.ts +28 -2
- package/dist/InboxList/index.d.ts +1 -1
- package/dist/InboxList/index.js +6 -1
- package/dist/{InboxList-OFGSX5IH.css → InboxList-X5Q5WWAI.css} +63 -2
- package/dist/LinkInterstitial/index.js +3 -2
- package/dist/ListDetail/ListDetail.d.ts +6 -0
- package/dist/ListDetail/index.js +1 -1
- package/dist/{ListDetail-N3L7PB46.css → ListDetail-JGESKTR7.css} +38 -0
- package/dist/ListInput/index.js +3 -2
- package/dist/MarkdownEditor/index.js +5 -4
- package/dist/MediaMatch/index.d.ts +1 -1
- package/dist/MediaMatch/index.js +1 -1
- package/dist/MediaMatch/useMediaMatch.d.ts +14 -0
- package/dist/Menu/index.js +2 -1
- package/dist/MergeConflicts/index.js +5 -4
- package/dist/MessageActions/index.js +6 -4
- package/dist/Modal/index.js +2 -1
- package/dist/OpenInAppCard/index.js +2 -2
- package/dist/Outline/index.js +2 -1
- package/dist/Popover/index.js +2 -1
- package/dist/Presence/index.d.ts +2 -0
- package/dist/Presence/index.js +4 -0
- package/dist/Presence/usePresence.d.ts +109 -0
- package/dist/ReactionBar/index.js +6 -4
- package/dist/ReadingPane/ReadingPane.d.ts +17 -1
- package/dist/ReadingPane/index.d.ts +1 -1
- package/dist/ReadingPane/index.js +2 -1
- package/dist/{ReadingPane-VLYOWMCM.css → ReadingPane-VFTRDPC5.css} +19 -0
- package/dist/RecordChip/index.js +3 -2
- package/dist/Reorder/index.js +2 -1
- package/dist/RichEditor/index.js +1 -1
- package/dist/SectionFrame/index.js +2 -2
- package/dist/SegmentedControl/index.js +4 -3
- package/dist/SetupWizard/index.js +2 -2
- package/dist/ShareDialog/index.js +5 -4
- package/dist/SheetColumnEditor/index.js +6 -5
- package/dist/SheetGrid/index.js +8 -6
- package/dist/SidebarNav/SidebarNav.d.ts +18 -2
- package/dist/SidebarNav/index.d.ts +1 -1
- package/dist/SidebarNav/index.js +1 -1
- package/dist/{SidebarNav-E7PZGGA6.css → SidebarNav-IKBKGXW4.css} +20 -0
- package/dist/SlideFilmstrip/index.js +5 -3
- package/dist/Switcher/index.js +5 -4
- package/dist/Tabs/index.js +3 -2
- package/dist/ThemeSwitcher/index.js +5 -4
- package/dist/TimeRangePicker/index.js +6 -5
- package/dist/TimeWindowPicker/index.js +3 -2
- package/dist/Tooltip/index.js +3 -1
- package/dist/TreeCanvas/index.js +6 -3
- package/dist/VersionCompare/index.js +5 -4
- package/dist/{chunk-KJR5X4II.js → chunk-22CU7V4J.js} +2 -2
- package/dist/{chunk-4RYELYWG.js → chunk-2SVQBQAD.js} +2 -2
- package/dist/{chunk-N2T7Y5KR.js → chunk-3AMWXJQX.js} +1 -1
- package/dist/{chunk-HQFOZJQ4.js → chunk-46FIBJCV.js} +4 -4
- package/dist/{chunk-LQRN2XZK.js → chunk-4DEKONVJ.js} +2 -2
- package/dist/chunk-5JPOFAVN.js +58 -0
- package/dist/{chunk-C7UHDM7Y.js → chunk-5V6GW6HK.js} +1 -1
- package/dist/{chunk-Q7N2ATMC.js → chunk-64JNKLLP.js} +57 -9
- package/dist/chunk-6C7GQOBV.js +10 -0
- package/dist/{chunk-YRNNUCQP.js → chunk-7BDBO2NP.js} +1 -1
- package/dist/{chunk-XGLMPPDW.js → chunk-7K6LVM5I.js} +1 -1
- package/dist/{chunk-FKAJBN6G.js → chunk-7M7WKYOV.js} +3 -3
- package/dist/{chunk-A5YKNRG6.js → chunk-7QCSISHM.js} +2 -1
- package/dist/{chunk-3QQIGMY3.js → chunk-7ZSEUO5Q.js} +6 -30
- package/dist/{chunk-57BFL323.js → chunk-ABRWL5FJ.js} +1 -1
- package/dist/{chunk-HFOTRZFU.js → chunk-AQNP3KQU.js} +2 -2
- package/dist/{chunk-GZVAZ3LL.js → chunk-AZYE7NR4.js} +1 -1
- package/dist/{chunk-6IOQWMYJ.js → chunk-BN5FEJL5.js} +1 -1
- package/dist/{chunk-25JQNHTC.js → chunk-BRK3HXGZ.js} +8 -2
- package/dist/{chunk-MPVMB2DV.js → chunk-BVML4UVB.js} +3 -2
- package/dist/{chunk-OAHRMR4U.js → chunk-C42XW5YP.js} +1 -1
- package/dist/{chunk-2H6YDUR5.js → chunk-C4JTX25K.js} +3 -3
- package/dist/{chunk-QE4OIE3Q.js → chunk-DJIWCW5Z.js} +6 -4
- package/dist/{chunk-HA2PL7PA.js → chunk-DRFOTWJE.js} +1 -1
- package/dist/{chunk-SM4P2SHB.js → chunk-EC6EUIAD.js} +7 -4
- package/dist/{chunk-QPHD4UUG.js → chunk-F6ZUM66S.js} +160 -25
- package/dist/{chunk-AMUXSJ2A.js → chunk-FPU7AA3X.js} +4 -15
- package/dist/{chunk-KLAVEJIO.js → chunk-GLKQHN7G.js} +1 -1
- package/dist/{chunk-MVMVMHYI.js → chunk-HDEKHP65.js} +1 -1
- package/dist/{chunk-XY4O2XMR.js → chunk-HKUZ2GYX.js} +4 -4
- package/dist/chunk-HTS5RJ7S.js +6 -0
- package/dist/{chunk-ZB3E2Z4Y.js → chunk-J5T5TDM2.js} +1 -1
- package/dist/{chunk-ISQANI6Q.js → chunk-JLOESTT2.js} +2 -1
- package/dist/{chunk-C75WZMXG.js → chunk-K6RWEQ6P.js} +1 -1
- package/dist/{chunk-GVPUCEWH.js → chunk-KXWJJWBD.js} +1 -1
- package/dist/chunk-L72URIHR.js +36 -0
- package/dist/{chunk-2TOGGCDM.js → chunk-LT44RL62.js} +2 -2
- package/dist/{chunk-C46DDVTK.js → chunk-LTD7KLOU.js} +1 -1
- package/dist/{chunk-HCUECVZ3.js → chunk-MVKUE4FI.js} +1 -1
- package/dist/{chunk-6YBBQAEM.js → chunk-MYAARF4Z.js} +1 -1
- package/dist/{chunk-SEKO6P3Y.js → chunk-NCUSI4ZU.js} +1 -1
- package/dist/{chunk-YBC2CYPD.js → chunk-O4VTQMEF.js} +1 -1
- package/dist/{chunk-HTBTAIH6.js → chunk-OM2LABPS.js} +2 -2
- package/dist/{chunk-T4IEESXN.js → chunk-ORONAXSF.js} +91 -25
- package/dist/chunk-PCAT2EFB.js +104 -0
- package/dist/{chunk-GP5TNTZH.js → chunk-QWRAWKB2.js} +53 -14
- package/dist/{chunk-TGCGLKD4.js → chunk-RBQRTGXX.js} +1 -1
- package/dist/{chunk-B3X4DHRB.js → chunk-RDIQB5ZE.js} +2 -2
- package/dist/{chunk-SRDNGGZE.js → chunk-RKIJAXQA.js} +1 -1
- package/dist/{chunk-T7WESRZF.js → chunk-RO5JU6SN.js} +2 -2
- package/dist/{chunk-IUWP2LSE.js → chunk-SGMWLUYQ.js} +2 -2
- package/dist/{chunk-LSOR77RZ.js → chunk-SHH7UD5U.js} +1 -1
- package/dist/{chunk-JV6JM6W6.js → chunk-SNQ7PH3D.js} +1 -1
- package/dist/{chunk-MPYRC3GO.js → chunk-SPNTUQBV.js} +2 -2
- package/dist/{chunk-YM77TZ7Q.js → chunk-T3S3D4FC.js} +1 -1
- package/dist/{chunk-YOJAGKTS.js → chunk-TGGYSQRD.js} +3 -4
- package/dist/{chunk-2KJCUCVE.js → chunk-TQKQRS2J.js} +2 -2
- package/dist/{chunk-ONNXUS5Y.js → chunk-VB3FVKNI.js} +1 -1
- package/dist/{chunk-JHQGNFN3.js → chunk-VONEKR3J.js} +2 -2
- package/dist/{chunk-P6F3PE4V.js → chunk-WANKINXG.js} +2 -2
- package/dist/{chunk-PXLS6JKL.js → chunk-WMO722J2.js} +1 -1
- package/dist/{chunk-SYVQXMLO.js → chunk-XRWHDW6F.js} +4 -4
- package/dist/{chunk-WT3B76MG.js → chunk-XTJHMP3W.js} +1 -1
- package/dist/{chunk-CF4M6N6A.js → chunk-XYSSFI5C.js} +1 -7
- package/dist/{chunk-RTPQDNW3.js → chunk-YJQXESOJ.js} +5 -1
- package/dist/{chunk-VGOWSOUA.js → chunk-YXKSUILG.js} +1 -1
- package/dist/{chunk-G6ZFSUIH.js → chunk-ZJVLGYE3.js} +2 -2
- package/dist/{chunk-BSAU7QRW.js → chunk-ZPTKAYJK.js} +1 -1
- package/dist/{chunk-XXDB6KPV.js → chunk-ZXXZESCD.js} +3 -4
- package/dist/generated/index.d.ts +2 -0
- package/dist/generated/index.js +108 -103
- package/dist/index.js +108 -103
- package/dist/styles.css +525 -134
- package/dist/utils/composedRef.d.ts +39 -0
- package/dist/utils/developing.d.ts +10 -0
- package/dist/utils/index.d.ts +2 -0
- package/dist/utils/index.js +3 -1
- package/dist/utils/tokenMs.d.ts +6 -0
- package/package.json +5 -5
- package/dist/ActionCard-47WSZ2O5.css +0 -110
- package/dist/{chunk-IYI6HWKN.js → chunk-CV2LU2T2.js} +1 -1
- package/dist/{chunk-FVZPSTL2.js → chunk-G4EHZHKM.js} +1 -1
- /package/dist/{chunk-FEJANUZK.js → chunk-KBSD476L.js} +0 -0
- /package/dist/{chunk-KLWWNV25.js → chunk-REEZQCML.js} +0 -0
package/README.md
CHANGED
|
@@ -53,7 +53,7 @@ import { Button } from '@crewlethq/ui/Button'; // 8 KB of CSS, not 182 KB
|
|
|
53
53
|
| 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`) |
|
|
54
54
|
| Layout | `Container`, `Section`, `Card`, `TileGrid`, `ListDetail`, `AsideLayout`, `Tabs`, `Accordion`, `Disclosure`, `Outline` (with `useActiveHeading` and `scrollToHeading`), `TreeGrid` |
|
|
55
55
|
| Arranging a page | `ArrangeBoard`, `ArrangeGrid`, `ArrangeFrame` (with `useGridResize`), `ArrangeGroup`, `ArrangeList`, and the reorder hooks under them (`useReorder`, `useReorderLists`, `moveKey`) |
|
|
56
|
-
| Application shell | `AppShell` with `AppShell.Rail`, the compact rail (`rail="compact"`, the one fold control from `onRailChange`, and `useAppShell().rail` to pick the shape) and `fill="flush"`, the `aside` track and the `peek` slot (`useAppShellAside`, `useAppShellPeek`), `AppShell.ResizeHandle` (also `ResizeHandle`) and `useStoredWidth`, `SidePanel` and `SidePanelFrame`, `PeekRail` and `PeekHost` (with `PeekNeighbours`, `usePeekNeighbours`, `usePeekStep`, `peekClickHandler`, `peekRowActivation`), `SectionFrame` (with `SectionFrame.Nav` and `SectionFrame.Body`), `LockedLabel`, `AppShell.Topbar`, `AppShell.AccountRow` and `useAppShell`, `AuthLayout`, `SidebarNav` and `NavItem` (with `dense` lists, `unread` and `muted` rows and `collapsible` groups), `CompactNav` with `CompactNavItem`, `CompactNavGroup` and `CompactNavSeparator` (the rail folded to its marks, fed from the same places), `DirectoryList`, `BrandLockup`, `SearchTrigger`, `PageHeader`, `Toolbar`, `Stack`, `Inline`, `Spacer`, `AutoGrid`, `ErrorBoundary`, `useShortcut`, `useFullscreen`, `useIdle`, `useMediaMatch` |
|
|
56
|
+
| Application shell | `AppShell` with `AppShell.Rail`, the compact rail (`rail="compact"`, the one fold control from `onRailChange`, and `useAppShell().rail` to pick the shape) and `fill="flush"`, the `aside` track and the `peek` slot (`useAppShellAside`, `useAppShellPeek`), `AppShell.ResizeHandle` (also `ResizeHandle`) and `useStoredWidth`, `SidePanel` and `SidePanelFrame`, `PeekRail` and `PeekHost` (with `PeekNeighbours`, `usePeekNeighbours`, `usePeekStep`, `peekClickHandler`, `peekRowActivation`), `SectionFrame` (with `SectionFrame.Nav` and `SectionFrame.Body`), `DockColumn` and `usePresence`, `LockedLabel`, `AppShell.Topbar`, `AppShell.AccountRow` and `useAppShell`, `AuthLayout`, `SidebarNav` and `NavItem` (with `dense` lists, `unread` and `muted` rows and `collapsible` groups), `CompactNav` with `CompactNavItem`, `CompactNavGroup` and `CompactNavSeparator` (the rail folded to its marks, fed from the same places), `DirectoryList`, `BrandLockup`, `SearchTrigger`, `PageHeader`, `Toolbar`, `Stack`, `Inline`, `Spacer`, `AutoGrid`, `ErrorBoundary`, `useShortcut`, `useFullscreen`, `useIdle`, `useMediaMatch` |
|
|
57
57
|
| 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 |
|
|
58
58
|
| Artifacts | `SandboxedFrame` (with `SandboxedFramePlaceholder` and `SandboxedFrameNotice`), `LinkInterstitial` and `openExternal`, `VersionTimeline`, `ShareDialog` with the role ladder (`ARTIFACT_ROLES`, `SHAREABLE_ROLES`, `roleAtLeast`), `PrincipalPicker`, `Principal` and `PrincipalAvatar`, `ArtifactCard`, `ArtifactKindGlyph` and `ArtifactPreviewGlyph` (the preview a card draws with no cover, for a cover with nothing to draw), `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`), `CanvasToolbar` (a canvas's tool palette, with `toolForKey`), `LayersList` (the list of a canvas's items beside it, marked by the canvas's selection), `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), `ArtifactNameCell` and `ArtifactAccessLabel` (with `ArtifactAccessGlyph`) for a list of artifacts |
|
|
59
59
|
| 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) |
|
|
@@ -205,6 +205,68 @@ places:
|
|
|
205
205
|
- A surface that pans or zooms dispatches `LAYER_REPOSITION_EVENT` on its host
|
|
206
206
|
when the content beneath it moves, and every panel anchored inside follows.
|
|
207
207
|
|
|
208
|
+
## Changes in 0.84.0
|
|
209
|
+
|
|
210
|
+
### The application rail
|
|
211
|
+
|
|
212
|
+
**The fold control is a chevron again, before the brand's mark.** The plus and minus of 0.83.0 give way to the chevrons the control drew before them, pointing left to fold the rail while it is full and right to unfold it while it is compact, and the control moves from the rail's top left corner onto the head's row, just before the brand's mark. The control and the mark are one pair, a step apart (`--spacing-1`) and centred together in the compact column, so the 76px column holds both (12, 24, 4, 24, 12) and neither moves when the rail folds; the mark's inset follows from the same arithmetic. Its names, `aria-expanded`, `aria-controls`, `aria-keyshortcuts`, the keys in its tooltip, its target floor and its ring inside its own box are unchanged. In the compact rail the lockup gives up its end inset, so the mark is all the column holds. Props are unchanged.
|
|
213
|
+
|
|
214
|
+
**A badge takes a tone.** `NavItem`'s and `CompactNavItem`'s `badge` (type `NavBadge`) take `tone`, `'attention' | 'quiet'` (Count's own `CountTone`), with `attention` the default, so the inbox's accent pill is unchanged. `quiet` keeps the round pill, its size and its place on the row's end line, in the quiet count's grey: a neutral wash (`--color-fill-soft`) carrying the secondary ink, lifting to the row's ink on the reader's own row, measured on every ground a row can have in every palette. It is for work that is the reader's own and waits but does not call: My work beside the Inbox. In the compact rail a quiet badge is the tile's quiet figure, and a folded group's tile adds up only the badges that call. Story: `SidebarNav` Badge Tones.
|
|
215
|
+
|
|
216
|
+
**Choosing a place in a folded group's flyout leaves focus somewhere.** The flyout closed on every choice, by a press, by the pointer resting and by the keys, but only a choice made with the keys handed focus back to the tile; a press left focus on the place's link, which went with the flyout, so the reader's next Tab started from the top of the document. Focus now follows the navigation: the destination takes it first (the place's handler, or a router that focuses the page it lands on, in its handler or its effects, often only where nothing holds focus), and only where nothing has taken it by the next frame does it go back to the tile, by a press as by a key (without a ring for a pointer reader). A place with no `href` closes like Escape, with focus straight back on the tile.
|
|
217
|
+
|
|
218
|
+
**A choice does not reopen the flyout under a resting pointer.** Choosing a place closed the flyout with the pointer still on the tile or beside it, and resting there opened it again a moment later, over the page just chosen, so the flyout looked as if it had stayed open. After a choice, resting no longer opens it until the pointer has been somewhere other than the tile; a press and the keys still open it at once.
|
|
219
|
+
|
|
220
|
+
### Screens that fill the window
|
|
221
|
+
|
|
222
|
+
**A list's detail draws its scrollbar on the sheet's edge.** On a fill screen the scroller reserved its scrollbar's gutter and the content column padded inside it, so a `ListDetail`'s detail drew its scrollbar 31px inside the sheet beside an empty strip, and a trailing control (a header's Disconnect, a tile's Open) touched that scrollbar. A fill screen's scroller now reserves no gutter: its column pads its end by the inset plus the gutter instead, so its content stands exactly where it did, publishes that length as `--crewlet-app-shell-bleed-end`, and runs the sheet's whole width (a fill column no longer takes the `--size-content-max` measure; prose inside it keeps its own). A `ListDetail` placed directly in that column takes the length back, so its detail is the pane's outermost box and its scrollbar the sheet's last pixel. The detail reserves its gutter (`scrollbar-gutter: stable`) and keeps the screen's side inset inside itself (`--crewlet-list-detail-end`, the shell's inset by default), so its content, header actions and right-aligned section buttons end under the bar's last control whether or not it scrolls; folded to one pane, the list does the same. Only there: a `ListDetail` on a scrolling or a flush screen, or outside a shell, is as wide as its box, with nothing reserved. On a fill screen the shell reads the scrollbar's width off a hidden gauge, so the bar's controls keep their place between a fill screen and a scrolling one; a flush screen is unchanged. The bar and the column now share one inset, `--crewlet-app-shell-inset` (20px, 16px under the shell's breakpoint). Props are unchanged. Story: `ListDetail` In A Fill Screen, whose play function measures these edges.
|
|
223
|
+
|
|
224
|
+
**A directory's lines clear its scrollbar.** `DirectoryList`'s groups, which scroll on their own above the foot, now reserve their scrollbar's gutter and end their lines a step (`--spacing-2`) before it, so a line's state pill no longer touches the scrollbar and does not move when the list grows long enough to scroll. Props are unchanged.
|
|
225
|
+
|
|
226
|
+
### Catalogue tiles
|
|
227
|
+
|
|
228
|
+
**Breaking: `CatalogTile`'s `status` is a tone and a word.** It took any node, so one row of tiles drew a service's In use as a soft pill and an app's Connected as a dot and a word, at two heights. It now takes `{ tone, label }` (type `CatalogTileStatus`, `tone` from the kit's `Tone`), and the tile draws every state the same way, the tone's dot and its word, at the caption step. On a compact tile the state stands after the name and the fact after the state on the header line; on a comfortable tile the fact stays in the foot. Pass `status={{ tone: 'success', label: 'In use' }}` where a `Tag` or a `StatusDot` was passed.
|
|
229
|
+
|
|
230
|
+
### Answering in the inbox
|
|
231
|
+
|
|
232
|
+
**A row taken from a group closes its height.** An `InboxGroup` keeps a keyed row that leaves its children drawn in its place, inert (focus inside it is let go), while its one track eases from `1fr` to `0fr` and it fades, on the slow step with the emphasized curve, so the rows under it slide up rather than jump; it is drawn no more once that motion has ended. The host only removes the row, in the same commit it adds it to another group. Rows need stable keys of their own, such as their ids: a row without one is told apart by its position, so it is not kept while it leaves (it goes at once), and the group says so once in development. Any keyed component child is kept as a row, so a host that draws its rows through a wrapper of its own (a memoized item) has the wrapper forward `leaving` and `onLeft` to its `InboxRow`; a plain element such as an empty state's `li` goes at once. The host's own `onLeft` on a row still runs, once, when the row has closed, which is how a host keeps a group that has emptied drawn until its last row has gone. A list of the host's own can drive the same with `InboxRow`'s `leaving` and `onLeft`. The row's content now stands in one box (`crewlet-inbox-row__body`) so its track can close over it. The motion a suite fakes is exported as `INBOX_ROW_LEAVE` (a transition of the row's own `grid-template-rows`).
|
|
233
|
+
|
|
234
|
+
**An arrival is washed.** `InboxRow`'s `arrived` plays a brief wash of the accent that fades back to the row's own ground, and `InboxGroup`'s `arrived`, a token such as the arriving row's key, plays it over the group's label and count each time it changes, so a row that lands in a closed group is seen to land. Pass either only for a row that has just arrived.
|
|
235
|
+
|
|
236
|
+
**`ReadingPane` moves on with its item.** `contentKey` names what the pane shows: a new value draws the item afresh and plays it in (a short fade and rise on the moderate step, `READING_PANE_ENTER` on the column), and moves focus to its title, without scrolling the page, where the reader was last in the pane (focus came into it, or a press landed in it), as after the control they answered with has gone with its item. A focused body is not taken as the pane's: Safari does not focus a pressed control and a live update moves nothing, so a reader in the list, or nowhere, keeps their place. Every change plays the item in, a return to the first item included. `focusTarget` names another place for it. `ReadingPaneTitle` is now focusable from code (`tabIndex={-1}`), never a tab stop. Under reduced motion nothing moves, and focus still follows. Story: `InboxList` Answering Moves On.
|
|
237
|
+
|
|
238
|
+
### First-step cards
|
|
239
|
+
|
|
240
|
+
**`ActionCard` is calmer, in light and dark.** The cards a new room opens with ("Add people and agents", "Add a description", "Start from a template") stood on saturated slabs of the kind's hue, deep purple, navy and brown on the dark sheet, under a full-hue edge and a muddy glow. Each ground is now a calm tint: the card rung, tinted by a share of the kind's hue (`--color-artifact-kind-<kind>-ground` and its steps, derived by the tokens build at 0.42 of the hue's chroma and 0.12 of its lightness from the card's neutral, 0.6 and 0.18 under the pointer, held to a chroma ceiling and to 4.5:1 for the title in every palette). The edge is the kind's own, at 3:1: its hue stepped toward the palette's ink until it clears 3:1 on the sheet and on the card's tint (`--color-artifact-kind-<kind>-edge`, derived by the tokens build), and a step further under the pointer (`-edge-strong`, against the strong tint), where the tint deepens and a small shadow lifts the card; the ring is drawn over the card's own edge. The corner and the shadow are from the edge scale (`--radius-xl`, `--shadow-xs`, `--shadow-sm` under the pointer). Every kind's drawing takes the same box, the card's width less its inset at the drawing canvas's own shape, so a tall page and a wide slide weigh the same, set a step into the card's foot on a soft shadow of the kind's Fill, with a lower halo (the glow at 0.24, was 0.46). Props are unchanged.
|
|
241
|
+
|
|
242
|
+
## Changes in 0.83.0
|
|
243
|
+
|
|
244
|
+
### The application rail
|
|
245
|
+
|
|
246
|
+
**The fold control is a plus and a minus in the rail's top left corner.** The chevron in the row under the rail's head is gone. In its place `AppShell` draws one control in the corner the head leaves empty, up and to the left of the brand's mark: a minus (`MinusGlyph`) while the rail is full, to make it smaller, and a plus (`PlusGlyph`) while it is compact, to open it. It is the same element in both shapes and never moves, so focus stays on it across a fold. It keeps its names ("Collapse the sidebar" and "Expand the sidebar", or `railFoldLabels`), `aria-controls`, `aria-keyshortcuts` and the keys in its tooltip, and now says `aria-expanded` (true while the rail is full). It stands at the target floor (`--size-target-min`, 24px) at every density, its ring is drawn inside its own box, and it is quiet until the rail is pointed at. Full, the search field keeps the nav's own columns, since nothing stands before it any more. Props are unchanged.
|
|
247
|
+
|
|
248
|
+
**The rail eases between its two shapes.** Its width moves on the slow step with the emphasized curve, the motion a `DockColumn` opens by, and what it holds keeps the width of the shape drawn, so the moving edge clips the rail's words rather than squeezing or rewrapping them, and the column under the edge never drifts. Folding, the full rail's middle, foot and status stay drawn and inert while its words fade out (focus inside them goes to the rail's first live control: the fold control, or the brand's link in the head, which stays live; with neither, the folded rail's first control once it is drawn), then the compact column fades in once the rail has moved; unfolding, the full rail is drawn at once and fades in while the edge uncovers it. The brand's mark and the fold control do not move or fade. Both shapes are a `usePresence` each, so the rail waits on the motion actually running on it, as a `DockColumn` does. `useAppShell().rail` reports the shape drawn, so it stays `full` until a fold has moved; the root's `data-rail-motion` (`fold`, `folded`, `unfold`, and `reverse` for a fold pressed again mid way, type `AppShellRailMotion`) names the phase under way. The words leave by a transition of their opacity, so a reversal brings them back from wherever their fade had reached rather than blinking them out and in; `usePresence` reports such a return as `returning`. Under reduced motion, and wherever nothing moves, the new shape is drawn at once. A change that arrives with the window crossing into the wide layout is drawn at once too. The rail's grid track is now `auto` and the rail takes `--crewlet-app-shell-rail` as its own width, which is still the one variable a host sets for a narrower rail. An aside column capped by the page's floor (`asideReserve`) now takes what the grid leaves it beside the rail's LIVE width, so it widens and narrows with the rail frame by frame, where a cap computed from the rail's variable jumped at both ends of a fold (story: `AppShellAside` Cap Follows A Folding Rail). While the rail moves the shell holds what it measures (the screen's width that `useScreenWidth` and `useScreenBelow` read, the scroller's gutter, the aside's width) and takes each once when the rail comes to rest, so no screen re-renders on every frame of a fold or changes shape mid way; a container query on the content column still follows every frame.
|
|
249
|
+
|
|
250
|
+
**In the compact rail the status has a row of its own under the brand's mark**, where the fold chevron stood, rather than at the top of the foot: the `AppShell.RailStatus` dot and count, centred, a small control step tall, before the places. It keeps its button, its name ("Engine serving, 2 alarms"), its popup attributes and its ref. A panel it opens now stands at the top of the rail, so open it below the status (`side="bottom"`) in both shapes. Full, it stays at the end of the head's line.
|
|
251
|
+
|
|
252
|
+
**The compact account face is centred on the tiles' line.** It took the full row's badge column and the step after it, which stood the face 4px left of the column's centre in a box 8px wider than the face. It now sits in a box of its own size, centred under the tiles. Hand the face at the tiles' height in the compact rail (`Avatar size="sm"`, 26px); the full row keeps `size="md"`.
|
|
253
|
+
|
|
254
|
+
**A place that waits on the reader takes the badge, whichever place it is.** `NavItem` and `CompactNavItem` draw a `badge` as the one filled accent pill, centred on the row's line and ending on the row's end inset, so a column of badges lines up down the rail; a `count` is the quiet figure. Nothing changed in how either is drawn: to show the reader's own work as the inbox is shown, pass `badge` rather than `count`. New stories: `AppShell` Fold Control In Both Shapes, `SidebarNav` Badges On The Rows About You, and `DockColumn` (Pinned Beside A Conversation, Unpinned, At The End).
|
|
255
|
+
|
|
256
|
+
### Columns that ease open and shut
|
|
257
|
+
|
|
258
|
+
**`usePresence` is new**: something kept drawn while it leaves. `usePresence(shown, ref, { transitions, animations, instant })` answers `present` (draw it), `leaving` (drawn only to finish leaving: make it `inert`) and `entering` (shown again, never on the first draw, while its motion runs: the window a stylesheet scopes an entrance to). It waits only for the surface's OWN motion (`MotionOwnership`), as it is actually running (`getAnimations()`), never for a duration written in code: the transitions on `ref`'s element itself (by property; any, if `transitions` is left out) and the keyframes it names in `animations`, wherever they run under it. A motion something else inside it runs (a meter filling, a badge arriving), a paused one and an endless one (a pulse) are never waited for, a motion replaced mid way is waited out in its turn, a reopen on the way out cancels the wait, and no wait outlasts the motion's own remaining time and a margin (the fast step), so a tab hidden mid motion still settles. Under `prefers-reduced-motion: reduce`, where nothing runs, where the Web Animations API is missing, and for a change the host marks `instant`, it goes straight through in the same commit, before any paint. `afterMotion(element, done, owned)` and `runningMotion(element, owned)` are the same wait for a host with its own state, `tokenMs(motion.duration.fast)` turns a motion token into milliseconds (Tooltip and CompactNav each kept a copy), `releaseFocus(container, target)` takes focus out of something about to turn inert (to the host's `target`, or off it). The reader's motion preference is now asked through one spelling of the query, **`REDUCED_MOTION_QUERY`**, with **`prefersReducedMotion(view)`** for a read outside render, both beside `useMediaMatch`; `ChatThread`, `Outline`, `useReorder` and `TreeCanvas` use them where each kept a copy of the string. The ui-tests helper `apps/ui-tests/src/motion.ts` (`driveMotion`, `settleMotion`, `preferReducedMotion`) starts and ends motion by hand in jsdom.
|
|
259
|
+
|
|
260
|
+
**`DockColumn` is new**: a column a host docks beside its content and takes away again, such as a list of rooms pinned beside a conversation. It stands in the host's own `auto` grid track (or as a flex item that does not grow) and eases its width between none and its panel's (`width`, px or any length) on the slow step with the emphasized curve, so the content beside it resizes frame by frame rather than jumping. The panel keeps its own width and is held to the edge that faces the content, so it slides in from the outer edge, and on close it stays drawn and `inert` until the column has closed over it; opened again on the way out, it is live where it is. Closed from inside (an Unpin in its own head), focus goes to `focusOnClose`, the control that docks it again, and is never left in the panel. `side` (`start`, the default, or `end`) places it, `divider` (on by default) draws the hairline on the edge that faces the content, and `--crewlet-dock-column-ground` gives the panel a ground. It is a plain column, not a landmark: what it holds names itself. Under reduced motion it simply is or is not. Types: `DockColumnProps`, `DockColumnSide`.
|
|
261
|
+
|
|
262
|
+
### React
|
|
263
|
+
|
|
264
|
+
**The package asks for React 19** (`react` and `react-dom` `>=19`, was `>=18`). The components already used what React 19 brought, `inert` as a boolean prop and `ref` as a plain prop of a function component and of an element (`ArrangeFrame`, `Tooltip`, `ListInput`, and now `DockColumn`, the folding rail and `Popover`), and under React 18 neither fails loudly: `inert` is dropped with a warning, so a panel on its way out stays focusable, and a ref read from props is undefined, so a trigger's own ref is lost. Every Crewlet application is on React 19. A suite holds the peer range to the source.
|
|
265
|
+
|
|
266
|
+
### Refs
|
|
267
|
+
|
|
268
|
+
**A trigger keeps its own ref across re-renders.** `Tooltip` cloned its trigger with a new ref callback on every render, so React took the element away from the trigger's own ref and gave it back in each commit, and a layout effect earlier in the tree read null while the control stood in the document (a `DockColumn` handing focus to a tooltip-wrapped Pin control as it closed). `Tooltip`, `Popover`, `Menu`'s trigger props and `Modal`'s frame now join their refs with **`useComposedRef(...refs)`** (new, with **`composeRefs`** for code outside a component and **`attachRef`** for one ref), one callback for any number of refs that is the same callback while they are the same and releases each the way React would. `Popover` also keeps the ref its trigger carried, which it used to replace.
|
|
269
|
+
|
|
208
270
|
## Changes in 0.82.0
|
|
209
271
|
|
|
210
272
|
### A conversation's messages
|
|
@@ -19,14 +19,14 @@ export interface ActionCardProps extends Omit<ButtonHTMLAttributes<HTMLButtonEle
|
|
|
19
19
|
onSelect: () => void;
|
|
20
20
|
}
|
|
21
21
|
/**
|
|
22
|
-
* A first step offered as a picture: a tall card on
|
|
23
|
-
*
|
|
24
|
-
*
|
|
25
|
-
* template) until its first message.
|
|
22
|
+
* A first step offered as a picture: a tall card on a calm tint of one of
|
|
23
|
+
* the kit's kind colours, edged in the kind's hairline, its title at the top
|
|
24
|
+
* and a drawing at its foot. A new room opens with a row of these (add
|
|
25
|
+
* people, add a description, start from a template) until its first message.
|
|
26
26
|
*
|
|
27
|
-
* A QUIET HOVER. The
|
|
28
|
-
* off the page; nothing moves, so a row of cards
|
|
29
|
-
* passing over it.
|
|
27
|
+
* A QUIET HOVER. The tint deepens a step, the edge takes the kind's hue and a
|
|
28
|
+
* small shadow lifts the card off the page; nothing moves, so a row of cards
|
|
29
|
+
* holds still under a pointer passing over it.
|
|
30
30
|
*
|
|
31
31
|
* A BUTTON NAMED BY ITS TITLE. The drawing is hidden from assistive
|
|
32
32
|
* technology, so a reader hears "Add people and agents, button" and nothing
|
package/dist/ActionCard/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { ACTION_CARD_GROUND, ActionCard, ActionCardRow } from '../chunk-
|
|
1
|
+
export { ACTION_CARD_GROUND, ActionCard, ActionCardRow } from '../chunk-OM2LABPS.js';
|
|
2
2
|
import '../chunk-ODEQTPFM.js';
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* ActionCard: a first step offered as a picture, on a CALM TINT of an
|
|
3
|
+
* artifact kind's hue. The ground is the kind's own Ground steps
|
|
4
|
+
* (ArtifactKinds.css): the card rung tinted by a share of the hue's chroma,
|
|
5
|
+
* never a slab of it, which the palette suite holds to 4.5:1 for the primary
|
|
6
|
+
* text in every palette and both modes and to a chroma ceiling. The edge is
|
|
7
|
+
* the kind's hue stepped toward the ink until it clears 3:1, a step further
|
|
8
|
+
* under the pointer, and a soft halo of the hue stands behind the drawing.
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
/*
|
|
12
|
+
* ONE ROW THAT SCROLLS SIDEWAYS when it runs out of width, so a phone shows
|
|
13
|
+
* two cards and part of the third (the part says there is more) instead of a
|
|
14
|
+
* tall stack. The block padding keeps the focus ring and the hover shadow
|
|
15
|
+
* inside the scroller's clip; the negative margin gives that space back to
|
|
16
|
+
* the layout. A host that runs the row to its container's edges sets the
|
|
17
|
+
* inline padding and `scroll-padding-inline` to its own inset.
|
|
18
|
+
*/
|
|
19
|
+
.crewlet-action-cards {
|
|
20
|
+
display: flex;
|
|
21
|
+
gap: var(--spacing-2);
|
|
22
|
+
overflow-x: auto;
|
|
23
|
+
margin-block: calc(var(--spacing-1) * -1) calc(var(--spacing-2) * -1);
|
|
24
|
+
padding-block: var(--spacing-1) var(--spacing-2);
|
|
25
|
+
scroll-snap-type: x mandatory;
|
|
26
|
+
overscroll-behavior-x: contain;
|
|
27
|
+
scrollbar-width: none;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.crewlet-action-cards::-webkit-scrollbar {
|
|
31
|
+
display: none;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.crewlet-action-card {
|
|
35
|
+
--crewlet-action-card-ground: var(--crewlet-kind-ground);
|
|
36
|
+
--crewlet-action-card-edge: var(--crewlet-kind-edge);
|
|
37
|
+
position: relative;
|
|
38
|
+
display: flex;
|
|
39
|
+
flex: none;
|
|
40
|
+
flex-direction: column;
|
|
41
|
+
justify-content: space-between;
|
|
42
|
+
width: 148px;
|
|
43
|
+
height: 172px;
|
|
44
|
+
box-sizing: border-box;
|
|
45
|
+
overflow: hidden;
|
|
46
|
+
padding: var(--spacing-3) var(--spacing-3) 0;
|
|
47
|
+
/* THE KIND'S OWN EDGE: its hue stepped toward the ink until it clears 3:1
|
|
48
|
+
on the sheet and on the card's tint (`--color-artifact-kind-<kind>-edge`,
|
|
49
|
+
derived by the tokens build and held by its suite). The Line step, the
|
|
50
|
+
hue at 0.38, did not clear it, and a neutral grey outline read as a card
|
|
51
|
+
from another family. */
|
|
52
|
+
border: 1px solid var(--crewlet-action-card-edge);
|
|
53
|
+
/* The edge scale: the extra-large corner a tall card of its own takes, and
|
|
54
|
+
the smallest shadow, so the card sits on the page rather than in it. */
|
|
55
|
+
border-radius: var(--radius-xl);
|
|
56
|
+
background-color: var(--color-surface-subtle);
|
|
57
|
+
background-image:
|
|
58
|
+
radial-gradient(90% 56% at 50% 100%, var(--crewlet-kind-glow) 0%, transparent 72%),
|
|
59
|
+
linear-gradient(180deg, var(--crewlet-action-card-ground) 0%, var(--crewlet-kind-ground-end) 100%);
|
|
60
|
+
box-shadow: var(--shadow-xs);
|
|
61
|
+
color: var(--color-text-primary);
|
|
62
|
+
font: inherit;
|
|
63
|
+
text-align: left;
|
|
64
|
+
cursor: pointer;
|
|
65
|
+
scroll-snap-align: start;
|
|
66
|
+
transition:
|
|
67
|
+
box-shadow var(--motion-duration-fast) var(--motion-easing-default),
|
|
68
|
+
border-color var(--motion-duration-fast) var(--motion-easing-default);
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
/* A QUIET HOVER: the tint deepens a step, the edge takes a stronger step of
|
|
72
|
+
the hue, and a small shadow lifts the card off the page. Nothing moves, so
|
|
73
|
+
a row of cards stays still under a pointer passing over it. */
|
|
74
|
+
.crewlet-action-card:hover {
|
|
75
|
+
--crewlet-action-card-ground: var(--crewlet-kind-ground-strong);
|
|
76
|
+
--crewlet-action-card-edge: var(--crewlet-kind-edge-strong);
|
|
77
|
+
box-shadow: var(--shadow-sm);
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
/* The card draws its own edge, so the ring is drawn over it, on the same
|
|
81
|
+
corner. */
|
|
82
|
+
.crewlet-action-card:focus-visible {
|
|
83
|
+
outline: 2px solid var(--color-focus);
|
|
84
|
+
outline-offset: var(--size-focus-ring-inset-offset);
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
/* The title at the medium weight, as every emphasis in a conversation is,
|
|
88
|
+
two lines at most at its width, balanced so neither line is one word. */
|
|
89
|
+
.crewlet-action-card__title {
|
|
90
|
+
max-width: 14ch;
|
|
91
|
+
font-size: var(--font-size-sm);
|
|
92
|
+
font-weight: var(--font-weight-medium);
|
|
93
|
+
line-height: var(--font-line-height-snug);
|
|
94
|
+
text-wrap: balance;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
/*
|
|
98
|
+
* THE DRAWING STANDS ON THE CARD'S FOOT, still, the card's own width less its
|
|
99
|
+
* inset. Every kind's drawing is one canvas (160 by 120), so each takes the
|
|
100
|
+
* same box whatever its shape, a tall page and a wide slide alike, where a
|
|
101
|
+
* fixed width and a height cap drew a page half the size of a slide. It is
|
|
102
|
+
* set a step into the foot, so it stands on the edge rather than floating
|
|
103
|
+
* above it, on a soft shadow of the kind's Fill.
|
|
104
|
+
*/
|
|
105
|
+
.crewlet-action-card__art {
|
|
106
|
+
display: flex;
|
|
107
|
+
align-items: flex-end;
|
|
108
|
+
justify-content: center;
|
|
109
|
+
margin-bottom: calc(var(--spacing-2) * -1);
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
.crewlet-action-card__art .crewlet-kind-illustration {
|
|
113
|
+
width: 100%;
|
|
114
|
+
height: auto;
|
|
115
|
+
filter: drop-shadow(0 4px 10px var(--crewlet-kind-fill));
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
/* FORCED COLORS drops the ground and the hue; the edge is drawn in the
|
|
119
|
+
system's text colour, so the card keeps its outline. */
|
|
120
|
+
@media (forced-colors: active) {
|
|
121
|
+
.crewlet-action-card {
|
|
122
|
+
border-color: CanvasText;
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
@media (prefers-reduced-motion: reduce) {
|
|
127
|
+
.crewlet-action-card {
|
|
128
|
+
transition: none;
|
|
129
|
+
}
|
|
130
|
+
}
|
|
@@ -13,6 +13,9 @@ export interface AccountRowProps {
|
|
|
13
13
|
/**
|
|
14
14
|
* The reader's badge, drawn decorative: the name beside it says who it is.
|
|
15
15
|
* In a rail's foot the row is sized for a medium one (`size="md"`, 32px).
|
|
16
|
+
* In the compact rail the face stands among the compact places' tiles and
|
|
17
|
+
* takes their height, a small one (`size="sm"`, 26px), centred in the
|
|
18
|
+
* column as each tile is.
|
|
16
19
|
*/
|
|
17
20
|
avatar: ReactNode;
|
|
18
21
|
/** Who the reader is. */
|
|
@@ -73,6 +76,8 @@ export interface AccountRowProps {
|
|
|
73
76
|
* IN THE COMPACT RAIL THE ROW IS THE READER'S FACE (`compact`): the same link
|
|
74
77
|
* or menu button, holding the badge alone, named by the name and the detail
|
|
75
78
|
* as the full row is, and showing them in a tooltip, since a face says who
|
|
76
|
-
* it is only to somebody who already knows.
|
|
79
|
+
* it is only to somebody who already knows. The face is centred in the
|
|
80
|
+
* column on the line the tiles above it are centred on, and at their height
|
|
81
|
+
* when it is handed at the small step.
|
|
77
82
|
*/
|
|
78
83
|
export declare function AccountRow({ avatar, name, detail, href, menu, current, title, linkSuffix, actions, compact: compactProp, className, }: AccountRowProps): import("react").JSX.Element;
|
|
@@ -63,6 +63,7 @@ import { type AppShellRailShape } from './railShape.js';
|
|
|
63
63
|
export { useAppShellAside, useAppShellPeek } from './regions.js';
|
|
64
64
|
export type { AppShellAsideShape, AppShellPeekShape, AppShellRegionValue } from './regions.js';
|
|
65
65
|
export type { AppShellRailShape } from './railShape.js';
|
|
66
|
+
export type { AppShellRailMotion } from './railMotion.js';
|
|
66
67
|
/** The aside's resting width, in px, where the host names none. */
|
|
67
68
|
export declare const APP_SHELL_ASIDE_WIDTH = 420;
|
|
68
69
|
/** How the reader resizes the aside while it is a column. */
|
|
@@ -97,6 +98,8 @@ interface AppShellContextValue {
|
|
|
97
98
|
* The shape the rail is drawn in NOW: `compact` only where the host asked
|
|
98
99
|
* for it and the layout is wide, `full` in the drawer and everywhere else,
|
|
99
100
|
* so an application picks `CompactNav` or `SidebarNav` from this alone.
|
|
101
|
+
* While the rail folds it is still `full`, and it turns `compact` when the
|
|
102
|
+
* rail reaches the compact column (see `railMotion.ts`).
|
|
100
103
|
*/
|
|
101
104
|
rail: AppShellRailShape;
|
|
102
105
|
}
|
|
@@ -129,15 +132,18 @@ export interface AppShellProps extends Omit<HTMLAttributes<HTMLDivElement>, 'tit
|
|
|
129
132
|
/** The scroll container itself, for a router restoring a position. */
|
|
130
133
|
mainRef?: Ref<HTMLElement> | undefined;
|
|
131
134
|
/**
|
|
132
|
-
* Gives the screen the whole height left under the bar, as a flex
|
|
133
|
-
* for a canvas or a split view that draws to the bottom of the
|
|
134
|
-
* instead of scrolling.
|
|
135
|
+
* Gives the screen the whole height and width left under the bar, as a flex
|
|
136
|
+
* column, for a canvas or a split view that draws to the bottom of the
|
|
137
|
+
* window instead of scrolling. The column keeps its pad, and its end pad
|
|
138
|
+
* counts the scrollbar's width, so its content stands where a scrolling
|
|
139
|
+
* screen's does; a `ListDetail` standing in it reaches past that pad, so
|
|
140
|
+
* its detail's scrollbar is on the sheet's edge.
|
|
135
141
|
*
|
|
136
142
|
* `flush` is the same column EDGE TO EDGE: the content column gives up its
|
|
137
|
-
* pad
|
|
138
|
-
*
|
|
139
|
-
*
|
|
140
|
-
*
|
|
143
|
+
* pad and its gap as well, for a screen that draws its own frame to the
|
|
144
|
+
* sheet's edges (a conversation with a list and a pane either side of it).
|
|
145
|
+
* The column is positioned, so a `LayerHost` the screen keeps inside it
|
|
146
|
+
* fills exactly the screen.
|
|
141
147
|
*/
|
|
142
148
|
fill?: boolean | 'flush' | undefined;
|
|
143
149
|
/**
|
|
@@ -159,8 +165,10 @@ export interface AppShellProps extends Omit<HTMLAttributes<HTMLDivElement>, 'tit
|
|
|
159
165
|
rail?: AppShellRailShape | undefined;
|
|
160
166
|
/**
|
|
161
167
|
* Called with the other shape when the reader presses the fold control.
|
|
162
|
-
* Given, the shell draws THE fold control (never in the drawer)
|
|
163
|
-
*
|
|
168
|
+
* Given, the shell draws THE fold control (never in the drawer): a chevron
|
|
169
|
+
* on the head's row, before the brand's mark, pointing left while the rail
|
|
170
|
+
* is full and right while it is compact. Keeping the choice, and binding a
|
|
171
|
+
* key to it, are the application's.
|
|
164
172
|
*/
|
|
165
173
|
onRailChange?: ((next: AppShellRailShape) => void) | undefined;
|
|
166
174
|
/**
|
|
@@ -248,7 +256,8 @@ export interface AppShellRailProps {
|
|
|
248
256
|
* A compact status at the end of the head's line, beside the name the head
|
|
249
257
|
* carries: an `<AppShell.RailStatus>`, the application's own state in a
|
|
250
258
|
* dot and a count. It takes its own width, so the name keeps the rest and
|
|
251
|
-
* truncates there, and it stands in the drawer's head the same way.
|
|
259
|
+
* truncates there, and it stands in the drawer's head the same way. In the
|
|
260
|
+
* compact rail it has a row of its own under the head's mark.
|
|
252
261
|
*/
|
|
253
262
|
status?: ReactNode;
|
|
254
263
|
/**
|
|
@@ -268,9 +277,12 @@ export interface AppShellRailProps {
|
|
|
268
277
|
* alone (the lockup shows its mark, over the column's centre, and keeps its
|
|
269
278
|
* name as the link's name and title); the field is not drawn, because a
|
|
270
279
|
* 76px column has no room for one and the application draws a Search tile
|
|
271
|
-
* among its `CompactNav` places instead; and the status stands
|
|
272
|
-
* the
|
|
273
|
-
* mark.
|
|
280
|
+
* among its `CompactNav` places instead; and the status stands in a row of
|
|
281
|
+
* its own under the mark, as its dot and count, since the head has no line
|
|
282
|
+
* left beside the mark. That row is the first thing under the head in the
|
|
283
|
+
* column, before the places, so the state a reader checks at a glance is
|
|
284
|
+
* where their eye starts. The middle and the foot are drawn as the
|
|
285
|
+
* application gives them.
|
|
274
286
|
*/
|
|
275
287
|
export declare function AppShellRail({ header, search, status, footer, className, children }: AppShellRailProps): import("react").JSX.Element;
|
|
276
288
|
/**
|
package/dist/AppShell/index.d.ts
CHANGED
|
@@ -9,4 +9,4 @@ export { useScreenBelow, useScreenWidth } from './screenWidth.js';
|
|
|
9
9
|
export type { StoredWidth, StoredWidthOptions, WidthStorage } from './storedWidth.js';
|
|
10
10
|
export { AccountRow } from './AccountRow.js';
|
|
11
11
|
export type { AccountRowMenu, AccountRowProps } from './AccountRow.js';
|
|
12
|
-
export type { ActionRailRowProps, ActionRailStatusProps, AppShellAsideResize, AppShellAsideShape, AppShellContextValue, AppShellPeekShape, AppShellProps, AppShellRailShape, AppShellRailProps, AppShellRailRowProps, AppShellRailStatusProps, AppShellRegionValue, AppShellToggleProps, AppShellTopbarProps, RailRowCount, StaticRailRowProps, StaticRailStatusProps, } from './AppShell.js';
|
|
12
|
+
export type { ActionRailRowProps, ActionRailStatusProps, AppShellAsideResize, AppShellAsideShape, AppShellContextValue, AppShellPeekShape, AppShellProps, AppShellRailMotion, AppShellRailShape, AppShellRailProps, AppShellRailRowProps, AppShellRailStatusProps, AppShellRegionValue, AppShellToggleProps, AppShellTopbarProps, RailRowCount, StaticRailRowProps, StaticRailStatusProps, } from './AppShell.js';
|
package/dist/AppShell/index.js
CHANGED
|
@@ -1,8 +1,11 @@
|
|
|
1
|
-
export { APP_SHELL_ASIDE_WIDTH, AccountRow, AppShell, AppShellRail, AppShellRailRow, AppShellRailStatus, AppShellToggle, AppShellTopbar, readStoredWidth, useAppShell, useScreenBelow, useScreenWidth, useStoredWidth } from '../chunk-
|
|
2
|
-
import '../chunk-
|
|
3
|
-
import '../chunk-
|
|
4
|
-
import '../chunk-
|
|
5
|
-
import '../chunk-
|
|
1
|
+
export { APP_SHELL_ASIDE_WIDTH, AccountRow, AppShell, AppShellRail, AppShellRailRow, AppShellRailStatus, AppShellToggle, AppShellTopbar, readStoredWidth, useAppShell, useScreenBelow, useScreenWidth, useStoredWidth } from '../chunk-ORONAXSF.js';
|
|
2
|
+
import '../chunk-PCAT2EFB.js';
|
|
3
|
+
import '../chunk-JLOESTT2.js';
|
|
4
|
+
import '../chunk-YJQXESOJ.js';
|
|
5
|
+
import '../chunk-7ZSEUO5Q.js';
|
|
6
|
+
import '../chunk-HTS5RJ7S.js';
|
|
7
|
+
import '../chunk-TGGYSQRD.js';
|
|
8
|
+
import '../chunk-L72URIHR.js';
|
|
6
9
|
export { RESIZE_HANDLE_LARGE_STEP, RESIZE_HANDLE_STEP, ResizeHandle, clampSize, useAppShellAside, useAppShellPeek } from '../chunk-PIYJNCN7.js';
|
|
7
10
|
import '../chunk-CMAZZY2I.js';
|
|
8
11
|
import '../chunk-DGXZ635L.js';
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* How the rail moves between its two shapes.
|
|
3
|
+
*
|
|
4
|
+
* THE STYLESHEET MOVES IT, THIS DECIDES THE ORDER. The rail's width eases
|
|
5
|
+
* between the full rail and the compact column (AppShell.css), and its
|
|
6
|
+
* content is laid out at the width of the shape drawn, clipped by the moving
|
|
7
|
+
* edge, so nothing in it rewraps at a width it will never rest at. What the
|
|
8
|
+
* stylesheet cannot decide is WHEN the content changes shape, because the
|
|
9
|
+
* application draws a different tree for each one:
|
|
10
|
+
*
|
|
11
|
+
* - UNFOLDING, the full rail is drawn at once, and the moving edge uncovers
|
|
12
|
+
* it while its words fade in (`unfold`).
|
|
13
|
+
* - FOLDING, the full rail stays drawn, inert, while the edge narrows over it
|
|
14
|
+
* and its words fade out (`fold`), and the compact column is drawn once the
|
|
15
|
+
* rail's motion has ended, fading in (`folded`). Drawn at once instead, the
|
|
16
|
+
* column would replace the words before the reader saw them go.
|
|
17
|
+
*
|
|
18
|
+
* ONE MECHANISM FOR EVERY COLUMN THAT EASES. Both shapes are a `usePresence`
|
|
19
|
+
* each, waiting on the motion actually running on the rail, as a
|
|
20
|
+
* `DockColumn` waits on its own: no duration is written again here, nothing
|
|
21
|
+
* waits under reduced motion, and where nothing moves the new shape is drawn
|
|
22
|
+
* in the same commit, before any paint.
|
|
23
|
+
*/
|
|
24
|
+
import { type RefObject } from 'react';
|
|
25
|
+
import type { AppShellRailShape } from './railShape.js';
|
|
26
|
+
/**
|
|
27
|
+
* Where a change of shape is: `fold` while the rail narrows over the full
|
|
28
|
+
* rail's fading words, `folded` while the compact column fades in after it,
|
|
29
|
+
* `unfold` while the rail widens and the full rail's words fade in, and
|
|
30
|
+
* `reverse` while a fold pressed again mid way widens the rail back and its
|
|
31
|
+
* words return from wherever their fade had reached.
|
|
32
|
+
*/
|
|
33
|
+
export type AppShellRailMotion = 'fold' | 'folded' | 'unfold' | 'reverse';
|
|
34
|
+
/**
|
|
35
|
+
* The rail's own motion, which a change of shape waits for: its width, on the
|
|
36
|
+
* rail itself, and the keyframes its words arrive by (AppShell.css), wherever
|
|
37
|
+
* they run inside it. Named, so that nothing else moving inside the rail (a
|
|
38
|
+
* meter filling, a badge arriving, a paused animation) holds a fold. The
|
|
39
|
+
* words LEAVE by a transition of their opacity, which a reversal turns back
|
|
40
|
+
* from where it is, and the rail's width outlasts it.
|
|
41
|
+
*/
|
|
42
|
+
export declare const RAIL_MOTION: {
|
|
43
|
+
readonly transitions: readonly ["width"];
|
|
44
|
+
readonly animations: readonly ["crewlet-app-shell-rail-unfold", "crewlet-app-shell-rail-settle"];
|
|
45
|
+
};
|
|
46
|
+
/**
|
|
47
|
+
* The shape to draw the rail's content in, the phase of the change under
|
|
48
|
+
* way, and whether the content drawn is only leaving (and so inert), for a
|
|
49
|
+
* rail whose chosen shape is `target`.
|
|
50
|
+
*
|
|
51
|
+
* `moves` is whether a change may animate at all: never in the drawer, where
|
|
52
|
+
* the rail is always the full list and a shape is not a width. A change that
|
|
53
|
+
* arrives WITH the window crossing into the wide layout does not animate
|
|
54
|
+
* either: the reader resized a window, they did not fold a rail.
|
|
55
|
+
*/
|
|
56
|
+
export declare function useRailMotion(target: AppShellRailShape, moves: boolean, rail: RefObject<HTMLElement | null>): {
|
|
57
|
+
drawn: AppShellRailShape;
|
|
58
|
+
motion: AppShellRailMotion | null;
|
|
59
|
+
leaving: boolean;
|
|
60
|
+
};
|
|
@@ -15,3 +15,8 @@ export type AppShellRailShape = 'full' | 'compact';
|
|
|
15
15
|
export declare const RailShapeContext: import("react").Context<AppShellRailShape>;
|
|
16
16
|
/** The shape the rail around this component is drawn in now: `full` outside a shell, and in the drawer. */
|
|
17
17
|
export declare function useRailShape(): AppShellRailShape;
|
|
18
|
+
/**
|
|
19
|
+
* Whether the rail's content is drawn only to finish leaving, while the rail
|
|
20
|
+
* folds over it (railMotion.ts): `AppShell.Rail` makes it inert then.
|
|
21
|
+
*/
|
|
22
|
+
export declare const RailLeavingContext: import("react").Context<boolean>;
|