@crewlethq/ui 0.55.0 → 0.56.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 +87 -4
- package/dist/Accordion/index.js +2 -2
- package/dist/AgentHandoffPanel/index.js +14 -9
- package/dist/AppShell/AppShell.d.ts +74 -1
- package/dist/AppShell/ResizeHandle.d.ts +74 -0
- package/dist/AppShell/index.d.ts +7 -2
- package/dist/AppShell/index.js +6 -4
- package/dist/AppShell/regions.d.ts +34 -0
- package/dist/AppShell/storedWidth.d.ts +47 -0
- package/dist/{AppShell-5LPXYUV3.css → AppShell-ZVCJRGXH.css} +172 -1
- package/dist/ArrangeFrame/index.js +2 -2
- package/dist/ArrangeList/index.js +5 -5
- package/dist/ArtifactBar/ArtifactBar.d.ts +13 -2
- package/dist/ArtifactBar/index.js +9 -8
- package/dist/{ArtifactBar-UMZCTARR.css → ArtifactBar-LEBMR35Y.css} +19 -1
- package/dist/ArtifactCard/index.js +6 -6
- package/dist/ArtifactNameCell/ArtifactNameCell.d.ts +7 -1
- package/dist/ArtifactNameCell/index.js +1 -1
- package/dist/ArtifactPanel/ArtifactPanel.d.ts +11 -17
- package/dist/ArtifactPanel/index.d.ts +3 -0
- package/dist/ArtifactPanel/index.js +8 -2
- package/dist/ArtifactPanel-TN4FFK2F.css +43 -0
- package/dist/AvatarPicker/index.js +9 -8
- package/dist/Button/index.js +2 -1
- package/dist/{Button-UWKBTKYD.css → Button-VXJ7M5XF.css} +9 -32
- package/dist/Canvas/index.js +5 -4
- package/dist/CanvasBoard/index.js +7 -6
- package/dist/CanvasToolbar/index.js +6 -5
- package/dist/ChangeList/ChangeList.d.ts +114 -0
- package/dist/ChangeList/index.d.ts +3 -0
- package/dist/ChangeList/index.js +10 -0
- package/dist/ChangeList-CB2DLR5S.css +151 -0
- package/dist/ChatThread/ChatThread.d.ts +53 -0
- package/dist/ChatThread/index.d.ts +3 -0
- package/dist/ChatThread/index.js +6 -0
- package/dist/ChatThread-52KMDXHB.css +58 -0
- package/dist/Checkbox/index.js +4 -4
- package/dist/CodeBlock/index.js +5 -4
- package/dist/ColorField/index.js +4 -4
- package/dist/ColorSwatch/index.js +5 -4
- package/dist/Combobox/index.js +5 -5
- package/dist/CommandPalette/index.js +9 -8
- package/dist/CommentThread/index.js +9 -7
- package/dist/Composer/Composer.d.ts +39 -2
- package/dist/Composer/index.js +5 -4
- package/dist/Composer-JSGTOW3F.css +192 -0
- package/dist/ConfirmField/index.js +4 -4
- package/dist/ConflictNote/index.js +3 -2
- package/dist/ContrastHelp/index.js +2 -2
- package/dist/Copyable/index.js +4 -3
- package/dist/DataGrid/driving.d.ts +48 -0
- package/dist/DataGrid/index.d.ts +2 -0
- package/dist/DataGrid/index.js +8 -7
- package/dist/DataTable/index.js +10 -9
- package/dist/DataView/index.js +14 -13
- package/dist/DatasetSource/index.js +2 -2
- package/dist/DateTimePicker/index.js +4 -3
- package/dist/DiffList/DiffList.d.ts +12 -3
- package/dist/DiffList/index.d.ts +1 -1
- package/dist/DiffList/index.js +1 -1
- package/dist/{DiffList-3EX64AAE.css → DiffList-GE6YBRLJ.css} +53 -0
- package/dist/Disclosure/anatomy.d.ts +14 -1
- package/dist/Disclosure/index.js +2 -2
- package/dist/{Disclosure-P4FH3C35.css → Disclosure-FVMA4RW2.css} +36 -0
- package/dist/DocTabsEditor/index.js +8 -7
- package/dist/DownloadButton/DownloadButton.d.ts +21 -4
- package/dist/DownloadButton/index.d.ts +1 -1
- package/dist/DownloadButton/index.js +4 -3
- package/dist/EditingStatus/index.js +2 -2
- package/dist/{Editor-GNKMX3VF.js → Editor-X2J47LPD.js} +7 -6
- package/dist/EntityList/EntityList.d.ts +37 -0
- package/dist/EntityList/index.d.ts +3 -0
- package/dist/EntityList/index.js +10 -0
- package/dist/EntityList-XIICECVC.css +55 -0
- package/dist/ErrorBoundary/index.js +3 -2
- package/dist/FileDrop/index.js +3 -2
- package/dist/FollowBanner/index.js +3 -2
- package/dist/HuePicker/index.js +8 -7
- package/dist/IconButton/IconButton.d.ts +6 -1
- package/dist/IconButton/index.js +1 -1
- package/dist/{IconButton-K24JQHLF.css → IconButton-6WA7UEBJ.css} +44 -21
- package/dist/IconTile/IconTile.d.ts +8 -2
- package/dist/IconTile/index.js +1 -1
- package/dist/{IconTile-4GNWTLAW.css → IconTile-G52XZVR4.css} +3 -0
- package/dist/InlineEditor/index.js +6 -5
- package/dist/Input/index.js +3 -3
- package/dist/LinkInterstitial/index.js +6 -5
- package/dist/ListInput/index.js +7 -6
- package/dist/LogoSlot/index.js +4 -3
- package/dist/MarkdownEditor/index.js +8 -7
- package/dist/Menu/index.js +4 -3
- package/dist/MergeConflicts/index.js +8 -7
- package/dist/MessageBubble/MessageBubble.d.ts +34 -0
- package/dist/MessageBubble/index.d.ts +3 -0
- package/dist/MessageBubble/index.js +2 -0
- package/dist/MessageBubble-GKO6X3QG.css +71 -0
- package/dist/Modal/index.js +5 -4
- package/dist/OpenInAppCard/OpenInAppCard.d.ts +44 -0
- package/dist/OpenInAppCard/index.d.ts +3 -0
- package/dist/OpenInAppCard/index.js +15 -0
- package/dist/OpenInAppCard-CKHCK7DO.css +24 -0
- package/dist/OrgTable/index.js +3 -3
- package/dist/PeekRail/PeekHost.d.ts +90 -0
- package/dist/PeekRail/PeekRail.d.ts +83 -0
- package/dist/PeekRail/activation.d.ts +30 -0
- package/dist/PeekRail/index.d.ts +8 -0
- package/dist/PeekRail/index.js +8 -0
- package/dist/PeekRail-4L5YUQMW.css +95 -0
- package/dist/PeopleRail/index.js +4 -3
- package/dist/PinTile/index.js +2 -2
- package/dist/PresenterView/index.js +5 -4
- package/dist/PrincipalPicker/index.js +6 -6
- package/dist/ProposalCard/ProposalCard.d.ts +134 -0
- package/dist/ProposalCard/index.d.ts +3 -0
- package/dist/ProposalCard/index.js +17 -0
- package/dist/ProposalCard-HLB3FNLA.css +19 -0
- package/dist/ReceiptStrip/ReceiptStrip.d.ts +66 -0
- package/dist/ReceiptStrip/index.d.ts +3 -0
- package/dist/ReceiptStrip/index.js +5 -0
- package/dist/ReceiptStrip-IIRKRTBG.css +93 -0
- package/dist/RefusalCard/RefusalCard.d.ts +34 -0
- package/dist/RefusalCard/index.d.ts +3 -0
- package/dist/RefusalCard/index.js +10 -0
- package/dist/RefusalCard-UM67F5HB.css +8 -0
- package/dist/RelativeTime/clock.d.ts +0 -6
- package/dist/RelativeTime/index.js +1 -1
- package/dist/ResizeHandle-2UNSZ4ZQ.css +59 -0
- package/dist/ResultTableCard/ResultTableCard.d.ts +64 -0
- package/dist/ResultTableCard/index.d.ts +3 -0
- package/dist/ResultTableCard/index.js +16 -0
- package/dist/ResultTableCard-HZRUDNTX.css +40 -0
- package/dist/ReviewList/index.js +2 -2
- package/dist/RichEditor/index.js +3 -2
- package/dist/RunChip/RunChip.d.ts +53 -0
- package/dist/RunChip/index.d.ts +3 -0
- package/dist/RunChip/index.js +10 -0
- package/dist/RunChip-I2S4VZ3R.css +43 -0
- package/dist/SandboxedFrame/index.js +3 -2
- package/dist/SegmentedControl/index.js +7 -6
- package/dist/SelectionBar/index.js +4 -3
- package/dist/SendButton/SendButton.d.ts +38 -0
- package/dist/SendButton/index.d.ts +2 -0
- package/dist/SendButton/index.js +4 -0
- package/dist/SetupWizard/index.js +6 -5
- package/dist/ShareDialog/index.js +8 -7
- package/dist/SheetColumnEditor/index.js +13 -12
- package/dist/SheetGrid/index.js +7 -6
- package/dist/SidePanel/SidePanel.d.ts +137 -0
- package/dist/SidePanel/SidePanelBase.d.ts +59 -0
- package/dist/SidePanel/index.d.ts +5 -0
- package/dist/SidePanel/index.js +11 -0
- package/dist/SidePanel-ERBUIELD.css +235 -0
- package/dist/SlideCompare/index.js +3 -2
- package/dist/SlideFilmstrip/index.js +7 -6
- package/dist/SlideNav/index.js +2 -2
- package/dist/Spinner/Spinner.d.ts +35 -0
- package/dist/Spinner/index.d.ts +3 -0
- package/dist/Spinner/index.js +2 -0
- package/dist/Spinner-XZ2TVYE5.css +46 -0
- package/dist/StatusCard/StatusCard.d.ts +59 -0
- package/dist/StatusCard/index.d.ts +3 -0
- package/dist/StatusCard/index.js +9 -0
- package/dist/StatusCard-6RPEE6UU.css +62 -0
- package/dist/StepList-A4YVU4JI.css +119 -0
- package/dist/Stepper/StepList.d.ts +72 -0
- package/dist/Stepper/index.d.ts +3 -0
- package/dist/Stepper/index.js +2 -1
- package/dist/SuggestionRow/SuggestionRow.d.ts +45 -0
- package/dist/SuggestionRow/index.d.ts +3 -0
- package/dist/SuggestionRow/index.js +3 -0
- package/dist/SuggestionRow-OKBGNHSS.css +102 -0
- package/dist/Switcher/index.js +9 -8
- package/dist/Table/Table.d.ts +23 -2
- package/dist/Table/index.d.ts +1 -1
- package/dist/Table/index.js +1 -1
- package/dist/{Table-TGCS4C3F.css → Table-RUYMMWXT.css} +49 -0
- package/dist/TableCells/index.js +2 -2
- package/dist/Tabs/index.js +6 -5
- package/dist/TagsInput/index.js +4 -4
- package/dist/ThemeGallery/index.js +2 -2
- package/dist/ThemeSwitcher/index.js +8 -7
- package/dist/ThemeToggle/index.js +2 -2
- package/dist/TimeRangePicker/TimeRangePicker.d.ts +121 -0
- package/dist/TimeRangePicker/index.d.ts +2 -0
- package/dist/TimeRangePicker/index.js +23 -0
- package/dist/TimeWindowPicker/index.js +8 -7
- package/dist/Toaster/Toaster.d.ts +27 -3
- package/dist/Toaster/index.d.ts +2 -2
- package/dist/Toaster/index.js +1 -1
- package/dist/{Toaster-C6BQ7L6I.css → Toaster-MX7TBMC3.css} +32 -11
- package/dist/TreeCanvas/index.js +6 -5
- package/dist/TreeGrid/index.js +2 -2
- package/dist/VersionCompare/index.js +9 -8
- package/dist/VersionTimeline/index.js +4 -3
- package/dist/WidgetFrame/index.js +2 -2
- package/dist/{chunk-KHKZPZHO.js → chunk-272Y3YMV.js} +3 -3
- package/dist/{chunk-LACA4JGC.js → chunk-2BQYODY3.js} +1 -1
- package/dist/{chunk-CCPOLCZL.js → chunk-2TTFDRR3.js} +2 -2
- package/dist/{chunk-4BJK7FE5.js → chunk-3EYSYEXP.js} +1 -1
- package/dist/chunk-3LI4TRUR.js +22 -0
- package/dist/{chunk-ATCHK6LC.js → chunk-3NQS6KYG.js} +1 -1
- package/dist/{chunk-V2N3BMOT.js → chunk-45KMH3E3.js} +11 -4
- package/dist/{chunk-ZMBPEHYH.js → chunk-4CBGIRVU.js} +1 -1
- package/dist/{chunk-DFW5PDU5.js → chunk-4OINEWR4.js} +1 -1
- package/dist/{chunk-5XKI4ITH.js → chunk-56P72ZBE.js} +4 -4
- package/dist/{chunk-J24Q4HTD.js → chunk-5NT6OIPP.js} +13 -3
- package/dist/{chunk-O2KT7HBD.js → chunk-5OMV75GE.js} +3 -3
- package/dist/{chunk-6RMZH7P7.js → chunk-672GLRBU.js} +2 -2
- package/dist/{chunk-MFXN46NN.js → chunk-67F2AM4R.js} +3 -3
- package/dist/{chunk-NQCY44B3.js → chunk-67MW366X.js} +2 -2
- package/dist/{chunk-URV6MGWT.js → chunk-6KLK7E76.js} +2 -2
- package/dist/{chunk-ZFM5L7M4.js → chunk-6NJW5KSX.js} +2 -2
- package/dist/{chunk-A4GFEMVI.js → chunk-6T6V5565.js} +1 -1
- package/dist/{chunk-THDGBD6Y.js → chunk-AKFHMLEX.js} +1 -1
- package/dist/{chunk-CNGHOTHV.js → chunk-AWSFK2IK.js} +2 -2
- package/dist/{chunk-HQJ24WPM.js → chunk-AZ5BKSGV.js} +1 -1
- package/dist/chunk-BLPT6GHV.js +31 -0
- package/dist/chunk-C3FX7ZSU.js +30 -0
- package/dist/{chunk-LDGQIDIZ.js → chunk-CGT4R7LW.js} +64 -2
- package/dist/{chunk-DM4JG4M5.js → chunk-D5OSP3KI.js} +3 -3
- package/dist/{chunk-BTHQFWMG.js → chunk-DOPPU6TZ.js} +4 -4
- package/dist/{chunk-AC22RZKC.js → chunk-DRT4L4WC.js} +17 -5
- package/dist/chunk-E4DZOE55.js +162 -0
- package/dist/chunk-EA23JG6R.js +9 -0
- package/dist/{chunk-WHL3XZCK.js → chunk-EBG3V4MK.js} +6 -6
- package/dist/{chunk-5JDHMDMQ.js → chunk-EDNZHW4K.js} +57 -7
- package/dist/{chunk-E6HXFFWO.js → chunk-EGL24VY5.js} +2 -2
- package/dist/{chunk-7SHAFLEX.js → chunk-ES4HR34Y.js} +2 -2
- package/dist/chunk-EVWTLFKI.js +102 -0
- package/dist/chunk-FA44M2YT.js +25 -0
- package/dist/{chunk-LKBZV5IT.js → chunk-FLTMDSC3.js} +1 -1
- package/dist/{chunk-XANKR3EP.js → chunk-FXQLNETQ.js} +2 -2
- package/dist/{chunk-G22NPQG4.js → chunk-GCASX3FD.js} +4 -4
- package/dist/{chunk-OGXHZHRX.js → chunk-GG4QZWMQ.js} +2 -2
- package/dist/{chunk-XP7EXNKF.js → chunk-GPW4M4OI.js} +2 -2
- package/dist/chunk-GZMEWWXW.js +78 -0
- package/dist/{chunk-OG6CL3EB.js → chunk-HD4QJ2SI.js} +3 -2
- package/dist/{chunk-SYY26XBX.js → chunk-HGCDJOEF.js} +2 -2
- package/dist/chunk-HGYHWWA5.js +54 -0
- package/dist/{chunk-ZS63CFDO.js → chunk-HL4CPLEK.js} +7 -7
- package/dist/{chunk-BEHFTRMZ.js → chunk-HNK43Z3P.js} +23 -5
- package/dist/{chunk-UO7JZVCO.js → chunk-HVEDVKXL.js} +1 -1
- package/dist/{chunk-FS4IH7VB.js → chunk-I7VG6RQE.js} +2 -2
- package/dist/{chunk-3RCHEFIL.js → chunk-ICJRP6QW.js} +2 -2
- package/dist/{chunk-YRIZAIU6.js → chunk-IDQBSMMZ.js} +2 -2
- package/dist/chunk-JILNCBBS.js +27 -0
- package/dist/{chunk-W5GM452Z.js → chunk-JJ3NOBJ6.js} +5 -5
- package/dist/chunk-JLRXCKTS.js +97 -0
- package/dist/{chunk-OJCVVCAZ.js → chunk-JMMS2PQU.js} +1 -1
- package/dist/{chunk-IVAR7NRW.js → chunk-JS2TRHBF.js} +3 -3
- package/dist/{chunk-3CZ7XAVY.js → chunk-KS7YIJ4S.js} +10 -6
- package/dist/{chunk-MU5KH3JF.js → chunk-LQ6AGUDL.js} +2 -2
- package/dist/chunk-LXYSWQNE.js +214 -0
- package/dist/{chunk-EKLEYNGR.js → chunk-MYX4XABB.js} +3 -3
- package/dist/{chunk-PM3JVNRY.js → chunk-N3ISZVLK.js} +1 -1
- package/dist/chunk-NEHSV55H.js +119 -0
- package/dist/{chunk-LLHO4FJK.js → chunk-NHJQXDHA.js} +1 -1
- package/dist/{chunk-NTZQN7OR.js → chunk-NI7WUPH3.js} +2 -2
- package/dist/{chunk-F6CKQX5D.js → chunk-NK3D66PB.js} +2 -2
- package/dist/{chunk-RHPBTE3F.js → chunk-NQGZRMUG.js} +1 -1
- package/dist/chunk-NVZCANJ5.js +3 -0
- package/dist/{chunk-RRO7UEYU.js → chunk-OHBXOEP3.js} +1 -1
- package/dist/{chunk-USVUSO3S.js → chunk-OHG7762N.js} +1 -1
- package/dist/{chunk-OBUQVGEG.js → chunk-OJ2QULVH.js} +1 -1
- package/dist/{chunk-ITTECHM4.js → chunk-OOZ5AGPS.js} +5 -5
- package/dist/{chunk-BZXY2L2D.js → chunk-OYAXKHVW.js} +1 -1
- package/dist/{chunk-WQQ5T5SA.js → chunk-OZIBNFLO.js} +1 -1
- package/dist/{chunk-DFK5EQTU.js → chunk-PDTEPN4D.js} +1 -1
- package/dist/chunk-PIYJNCN7.js +124 -0
- package/dist/{chunk-ZVV2VERB.js → chunk-Q6R6EUQ4.js} +3 -3
- package/dist/chunk-QYEOGGVS.js +161 -0
- package/dist/{chunk-NWGGH2LN.js → chunk-QZ4B72FP.js} +3 -3
- package/dist/chunk-RV2FGESF.js +98 -0
- package/dist/{chunk-TQ3C3Q7V.js → chunk-S5C64PTT.js} +1 -1
- package/dist/chunk-SDSBVVLL.js +45 -0
- package/dist/{chunk-ZNOXQACX.js → chunk-T4D7RZNI.js} +2 -2
- package/dist/{chunk-TDVPYBNL.js → chunk-TA72CURM.js} +1 -1
- package/dist/{chunk-WXOYHVWG.js → chunk-TD3UHDFY.js} +4 -4
- package/dist/{chunk-H7FUQCQY.js → chunk-TDQZ4LB5.js} +8 -6
- package/dist/chunk-TFGCNBWP.js +64 -0
- package/dist/{chunk-TMM32U7D.js → chunk-TKS7FTTO.js} +2 -2
- package/dist/{chunk-NKHS2RQ2.js → chunk-U5PJSGHG.js} +1 -1
- package/dist/{chunk-7CGPPAYR.js → chunk-UV4LOQ3E.js} +1 -1
- package/dist/{chunk-34ANLQW2.js → chunk-UVYGMCJ4.js} +173 -8
- package/dist/{chunk-ON2E46DX.js → chunk-VRNUKH2W.js} +1 -1
- package/dist/{chunk-XX2VQE55.js → chunk-WBRC3MNE.js} +1 -1
- package/dist/chunk-WDIVALLP.js +51 -0
- package/dist/{chunk-QMIWMLFI.js → chunk-WOW5SCEK.js} +1 -1
- package/dist/chunk-XODESBSR.js +250 -0
- package/dist/chunk-XQI2OUV4.js +59 -0
- package/dist/{chunk-EJWPYEG4.js → chunk-XRZGGB6I.js} +1 -1
- package/dist/{chunk-34C7NYIQ.js → chunk-Y73BQL74.js} +1 -1
- package/dist/{chunk-KIRQZG3G.js → chunk-YCGZK2E4.js} +1 -1
- package/dist/{chunk-5TK3C6RG.js → chunk-YCZ2FBKA.js} +1 -1
- package/dist/{chunk-TV2QW6GX.js → chunk-YEURM24I.js} +3 -3
- package/dist/{chunk-IW55G7XG.js → chunk-YNRKVY7X.js} +11 -1
- package/dist/chunk-YY445YFQ.js +55 -0
- package/dist/{chunk-LFHCXZO5.js → chunk-Z3GDMNMU.js} +3 -3
- package/dist/{chunk-LQPU5O3B.js → chunk-Z7PJF6F3.js} +3 -3
- package/dist/{chunk-HDHL773Z.js → chunk-ZH4MJM73.js} +1 -1
- package/dist/generated/index.d.ts +17 -0
- package/dist/generated/index.js +141 -122
- package/dist/index.js +141 -122
- package/dist/styles.css +1877 -218
- package/dist/utils/index.js +1 -1
- package/dist/utils/useDownload.d.ts +6 -0
- package/package.json +3 -3
- package/dist/ArtifactPanel-KKUUIPEU.css +0 -159
- package/dist/Composer-TXULCPPV.css +0 -99
- package/dist/chunk-4E5MWUUJ.js +0 -48
- package/dist/chunk-FZVJDJFN.js +0 -54
- package/dist/chunk-IXJHTFXG.js +0 -17
- package/dist/chunk-NBDN5JZV.js +0 -123
- package/dist/{chunk-UTESMBPL.js → chunk-ESUZ27TS.js} +1 -1
- /package/dist/{chunk-55MPFB2U.js → chunk-EWTPXRRM.js} +0 -0
package/README.md
CHANGED
|
@@ -42,17 +42,18 @@ import { Button } from '@crewlethq/ui/Button'; // 8 KB of CSS, not 182 KB
|
|
|
42
42
|
| ---- | ---------- |
|
|
43
43
|
| Actions | `Button` and `ButtonLink` (variants `primary`, `secondary`, `outline`, `ghost`, `accent`, `danger`; sizes `small`, `medium`, `large`; shapes `square`, `pill`), `IconButton`, `Menu`, `Link`, `Copyable`, `CopyButton`, `DownloadButton`, `Kbd` |
|
|
44
44
|
| Content and text | `Text` (the eight registers and `inherit`), `Prose`, `Statement`, `Document`, `DocumentTitle` and `DocumentTitleField`, the Markdown grammar (`parseMarkdown`, `parseMarkdownSpans`, `markdownInline`, `safeHref` and the line readers, with no React in it), `Highlight`, `InlineCode`, `List` and `ListItem`, `DescriptionList`, `Timeline`, `RelativeTime`, `Note`, `Divider` |
|
|
45
|
-
| Forms | `Input`, `Textarea`, `Label`, `FormField`, `FormRow`, `Checkbox`, `CheckboxGroup`, `ConfirmField`, `Select`, `Tag`, `TagsInput`, `DateTimePicker`, `TimeWindowPicker`, `ImageUpload`, `CharacterPicker`, `HuePicker`, `AvatarPicker`, `FactList`, `ChoiceList`, `Composer`, `MarkdownEditor`, `RichEditor` (with `preloadRichEditor`, and the round trip `roundTripMarkdown` and `canonicalMarkdown` from `@crewlethq/ui/RichEditorMarkdown`) |
|
|
46
|
-
| Data display | `DataTable`, `CopyableCell`, `Table`, the read-only table cells (`TableKeyCell`, `TableNumberCell`, `TableDateCell`, `TableEntityCell`, `TableStatusCell`, `TableTagsCell`, `TableTextCell`), `StatCard`, `Meter`, `SegmentedMeter`, `Stepper`, `PricingCard`, `Avatar`, `AvatarStack`, `EntityChip`, `CodeBlock`, `QrCode`, `ObjectHeader`, `FactLine`, `SetByLine`, `Skeleton`, `Eyebrow`, `StatGroup`, `PinTile`, `IconTile`, `SettingsTable` (with `SettingsTable.Row`), `CatalogTile` |
|
|
45
|
+
| Forms | `Input`, `Textarea`, `Label`, `FormField`, `FormRow`, `Checkbox`, `CheckboxGroup`, `ConfirmField`, `Select`, `Tag`, `TagsInput`, `DateTimePicker`, `TimeWindowPicker`, `TimeRangePicker`, `ImageUpload`, `CharacterPicker`, `HuePicker`, `AvatarPicker`, `FactList`, `ChoiceList`, `Composer`, `MarkdownEditor`, `RichEditor` (with `preloadRichEditor`, and the round trip `roundTripMarkdown` and `canonicalMarkdown` from `@crewlethq/ui/RichEditorMarkdown`) |
|
|
46
|
+
| Data display | `DataGrid` (with `useDataGridDriving`, `useAnyDataGridDriving` and `countDataGridRows`), `DataTable`, `CopyableCell`, `Table`, the read-only table cells (`TableKeyCell`, `TableNumberCell`, `TableDateCell`, `TableEntityCell`, `TableStatusCell`, `TableTagsCell`, `TableTextCell`), `StatCard`, `Meter`, `SegmentedMeter`, `Stepper`, `PricingCard`, `Avatar`, `AvatarStack`, `EntityChip`, `CodeBlock`, `QrCode`, `ObjectHeader`, `FactLine`, `SetByLine`, `Skeleton`, `Eyebrow`, `StatGroup`, `PinTile`, `IconTile`, `SettingsTable` (with `SettingsTable.Row`), `CatalogTile` |
|
|
47
47
|
| List screens | `DataView`, and its parts on their own: `DataViewToolbar`, `FilterAxisBar`, `FilterAxisChip`, plus the filter model (`filterDefsFromColumns`, `applyColumnFilters`, `filterPredicate`, `blankFilterValue`) |
|
|
48
48
|
| Feedback and overlays | `Callout`, `ConflictNote`, `EditingStatus`, `Toaster`, `Modal` (with `variant="sheet"`), `ConfirmModal`, `CommandPalette`, `Tooltip`, `Popover`, `Announcer` |
|
|
49
49
|
| Documents and review | `DiffView` and `DiffSummary` with the line diff they draw (`diffLines`, `diffStat`, `collapseDiff`, `firstChangedLines`, `splitLines`, `MAX_DIFF_LINES`, with no React in it), `DiffList`, `VersionCompare`, `CommentThread` |
|
|
50
|
+
| Conversations and the assistant | `ChatThread` (with `ChatThreadHandle`), `MessageBubble`, `RunChip`, `StepList` and `StepStateMark`, `ProposalCard`, `ChangeList` (with `shortenUnchanged`), `StatusCard`, `ReceiptStrip`, `RefusalStrip`, `ResultTableCard`, `OpenInAppCard`, `EntityList`, `RefusalCard`, `SuggestionRow` and `SuggestionList`, `SendButton` |
|
|
50
51
|
| Charts | `Legend`, `BarList`, `StackedBar`, `StackedColumns`, `ActivityStrip`, `TimeSeries`, `Sparkline`, the reading layer they share (`ChartTooltip`, `useChartHover`), and the ramp (`DATA_COLORS`, `DATA_COLOR_OTHER`, `dataColor`) |
|
|
51
|
-
| Marks | `Count`, `StatusDot`, `EmptyValue`, `VisuallyHidden` |
|
|
52
|
+
| Marks | `Count`, `StatusDot`, `Spinner`, `EmptyValue`, `VisuallyHidden` |
|
|
52
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`) |
|
|
53
54
|
| Layout | `Container`, `Section`, `Card`, `TileGrid`, `ListDetail`, `AsideLayout`, `Tabs`, `Accordion`, `Disclosure`, `Outline` (with `useActiveHeading` and `scrollToHeading`), `TreeGrid` |
|
|
54
55
|
| Arranging a page | `ArrangeBoard`, `ArrangeGrid`, `ArrangeFrame` (with `useGridResize`), `ArrangeGroup`, `ArrangeList`, and the reorder hooks under them (`useReorder`, `useReorderLists`, `moveKey`) |
|
|
55
|
-
| Application shell | `AppShell` with `AppShell.Rail`, `SectionFrame` (with `SectionFrame.Nav` and `SectionFrame.Body`), `LockedLabel`, `AppShell.Topbar`, `AppShell.AccountRow` and `useAppShell`, `AuthLayout`, `SidebarNav` and `NavItem`, `DirectoryList`, `BrandLockup`, `SearchTrigger`, `PageHeader`, `Toolbar`, `Stack`, `Inline`, `Spacer`, `AutoGrid`, `ErrorBoundary`, `useShortcut`, `useFullscreen`, `useIdle`, `useMediaMatch` |
|
|
56
|
+
| Application shell | `AppShell` with `AppShell.Rail`, 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`, `DirectoryList`, `BrandLockup`, `SearchTrigger`, `PageHeader`, `Toolbar`, `Stack`, `Inline`, `Spacer`, `AutoGrid`, `ErrorBoundary`, `useShortcut`, `useFullscreen`, `useIdle`, `useMediaMatch` |
|
|
56
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 |
|
|
57
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 |
|
|
58
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) |
|
|
@@ -204,6 +205,88 @@ places:
|
|
|
204
205
|
- A surface that pans or zooms dispatches `LAYER_REPOSITION_EVENT` on its host
|
|
205
206
|
when the content beneath it moves, and every panel anchored inside follows.
|
|
206
207
|
|
|
208
|
+
## Changes in 0.56.0
|
|
209
|
+
|
|
210
|
+
### The frame and its panels
|
|
211
|
+
|
|
212
|
+
**`AppShell` takes an `aside`**: a panel the frame keeps beside every screen, such as an assistant, as a third track of the shell's grid that mirrors the rail. The host decides its shape (`asideShape`) from its own arithmetic, never a media query. A `column` is a complementary region named by `asideLabel`, a second sheet on the frame to the right of the page's: opening it pushes the page narrower, and the bar, the sticky heads, the one scroller and the measured gutter are the page's own and only narrower. An `overlay` covers the page's end edge behind a veil, and a `sheet` is the whole window on a phone. Both are modal dialogs on the shared layer stack: Tab stays in them, Escape and a press on the veil call `onAsideClose`, and focus goes back to what opened them. The panel is one element in every shape, so a window resized across the threshold does not remount it. `asideWidth` (420 by default) sizes the track, and `asideReserve` caps it so the page keeps its floor. `asideResize` (`min`, `max`, `defaultValue`, `onChange`, `onCommit`, `label`) puts a grip in the seam between the two sheets while the aside is a column. The panel arrives with a short entrance, never an exit, and none under reduced motion.
|
|
213
|
+
|
|
214
|
+
**`AppShell` takes a `peek`**: a detail panel beside the scroller, inside the sheet and under the bar, as a `column` or a `drawer` (`peekShape`, the host's decision). The scroller now stands in a body row (`crewlet-app-shell__body`) that is always rendered, so opening an aside or a peek never remounts `main` or its scroll position. A stylesheet that selected `main` as a direct child of `.crewlet-app-shell__sheet` should select it as a descendant.
|
|
215
|
+
|
|
216
|
+
**`AppShell.ResizeHandle` is new** (also exported as `ResizeHandle`): the WAI-ARIA window splitter, a focusable `separator` with `aria-orientation="vertical"`, `aria-valuenow`, `aria-valuemin`, `aria-valuemax` and a value text. It moves by pointer drag (measured from where the drag started, with the pointer captured), by ArrowLeft and ArrowRight (16px, 64px with Shift, `RESIZE_HANDLE_STEP` and `RESIZE_HANDLE_LARGE_STEP`), to its bounds by Home and End, and back to `defaultValue` by Enter or a double press. `onValueChange` reports every step and `onValueCommit` the end of each gesture. It is drawn as nothing at rest and a soft accent wash under the pointer, the keyboard and a drag, with a 24px target whatever its drawn width. **`useStoredWidth({ key, min, max, storage })`** keeps the width a reader dragged per browser: `width` is null until they choose one, `setWidth` draws, `commitWidth` draws and keeps, and a stored value is read back only when it is a finite number inside the bounds. Storage that throws leaves the width working for the session.
|
|
217
|
+
|
|
218
|
+
**`SidePanel` and `SidePanelFrame` are new.** `SidePanel` is the panel beside what the reader works on: a head at the page bar's height (`title`, `icon`, `actions`, Close), a scrolling body and a `footer`. It is a complementary region named by its heading (`hideTitle` keeps the name and hides the words), never a dialog except as a sheet. It takes focus to its heading on open without drawing a ring there, or to a field (`initialFocus`, or `'none'`), hands focus back on close, and closes on Escape from anywhere inside unless something inside answered first. `SidePanelFrame` lays it beside the content as a `column` (capped by `reserve`, with a grip on the panel's edge when `resizable`), over the content's end as a `drawer`, or over all of it as a `sheet` (a modal dialog), as the host decides; with no `shape` it measures itself. In the shell's aside a `SidePanel` fills the track and leaves the landmark, the width and the grip to the shell. **`ArtifactPanel` and `ArtifactWorkspace` are now presets of the two**, with the same props, drawing, class names, container names and `--crewlet-artifact-panel-inset`. The panel's root is a `div` with the complementary role, where it was an `aside`.
|
|
219
|
+
|
|
220
|
+
**`SidePanel` takes `flush`**: the body draws no inset, for content that owns its own edges, such as a `ChatThread`, which scrolls and insets itself, so the inset is drawn once and the thread's scrollbar stands on the panel's edge. `--crewlet-side-panel-inset` reads 0 inside a flush body, so a sticky foot that offsets itself by the inset still sits on the edge. A host that set the variable to 0 for the same result can pass `flush` instead.
|
|
221
|
+
|
|
222
|
+
**`ArtifactBar` takes `end`**: a control the host ends every page head with, such as an assistant's Ask button, placed after More as `start` is placed before everything, so an open artifact's own bar keeps it where every other page's bar does. It stands a step further from the bar's own tools than they stand from each other, never wraps, keeps its size while the title gives way, and is never folded into More at any width; a control that should draw smaller on a phone does so itself.
|
|
223
|
+
|
|
224
|
+
**`PeekRail` and `PeekHost` are new, moved from the engine dashboard.** `PeekRail` is the rail a list opens on one object: a bar with Previous and Next (`onStep`), Open (`openHref`) and Close, and a scrolling body that is a size container. As a column it is capped by `reserve` so the list keeps its floor, with a grip the keyboard moves; as a drawer it stands behind a veil a press on which closes it. In the shell's peek slot its shape is the shell's. `PeekHost` wires the generic half: the order a list publishes (`PeekNeighbours`, `usePeekNeighbours(tokens, query)`, `usePeekOrder`), the step through it (`usePeekStep(current, move)`), a body keyed on its object, a kind with no body closing the rail, an `openHref` that carries the list's query only for an object in the list, and an optional error `boundary`. The address, the keys and the bodies stay the host's. `peekClickHandler` and `peekRowActivation` hold the one rule for which presses on a row peek in place and which open elsewhere (`isPlainPress`).
|
|
225
|
+
|
|
226
|
+
**`useDataGridDriving(drivable)` decides which grid takes the row keys**, moved from the engine dashboard's grid wrapper: with several grids on one screen, the one the reader last pointed at (`claim`, passed as the grid's `onPointerDown`), and with no gesture yet the first mounted grid with rows. `useAnyDataGridDriving` tells a screen with keys of its own to stand aside, and `countDataGridRows` counts rows through bands.
|
|
227
|
+
|
|
228
|
+
**`TimeRangePicker` is new, moved from the engine dashboard**: the windows a screen offers as one row of radio segments, in the order given (`options`, `value`, `onChange`), and a window of the reader's own behind Custom (`custom`). It sits beside `TimeWindowPicker` rather than replacing it: this one is inline and never interprets a window, so a custom window comes back as the two typed strings for the screen to read on its own clock. The dialog is prefilled with the window on screen and takes two moments (`mode: 'instants'`) or two whole days (`mode: 'days'`). Each way the fields can be wrong is its own sentence (`timeRangeProblem`), a screen's own `validate` runs after them, Apply is the form's submit button, and a dismissed dialog leaves the reader on Custom as the group's one tab stop.
|
|
229
|
+
|
|
230
|
+
### The assistant's pieces
|
|
231
|
+
|
|
232
|
+
The parts the engine dashboard's assistant drawer is built from, each generic enough for any conversation, approval or result surface. Every one ships with a story for each state, holds still under reduced motion, and reads the same in the light, dark and named palettes.
|
|
233
|
+
|
|
234
|
+
**`Spinner` is new**: the package's one ring, a 2px ring in the current ink with its right quarter open, `inline-block` so it is a box inside a line of text, sized by the text (`em`) or on the glyph scale (`xs`, `sm`, `md`: 12, 14 and 16px). Under reduced motion it stops and stays open, because a closed ring reads as an empty status circle. A pending `Button` now draws it in its leading icon's place (`crewlet-btn__spinner` stays on the element), so a button, a request's state column and a status tag share one mark.
|
|
235
|
+
|
|
236
|
+
**`IconButton` takes `variant="primary"`**, the accent square, for the one icon-only control that is the decision on its surface. **The current place keeps its ink on every variant**: `IconButtonLink current` was declared above the variants and tied with them, so a ghost square's secondary ink won; it now follows them.
|
|
237
|
+
|
|
238
|
+
**`Composer` sends on Enter, carries attachments and says why it is disabled.** `submitOn="enter"` sends on Enter and writes a line on Shift+Enter, never on an Enter that ends an input method's composition (`mod-enter`, Command or Control with Enter, stays the default). `trailing` puts a control on the field's row, its corner nested in the box's, and the field then starts at one line and grows to six; a placeholder never wraps it taller. `attachments` is a group of tags above the field inside the edge, named by `attachmentsLabel` and read before the field. `disabledReason` fades the whole composer once (the field and its button inside keep full opacity), shows the reason as the placeholder, describes the field with it and keeps the draft. The edge is now `--color-border-field`, the 3:1 field edge, where it was the 1.46:1 `--color-border-strong`, stepping up to `--color-border-control` under the pointer.
|
|
239
|
+
|
|
240
|
+
**`SendButton` is new**: a chat composer's send, which becomes Stop while a request runs (`mode`, `onPress`), on one element so focus stays on it. Send is the primary `IconButton` with the arrow, Stop the secondary one with a filled square (`square` is now in the icons' `FILLABLE`). A `disabledReason` holds Send soft disabled; Stop is always available. `labels` words both.
|
|
241
|
+
|
|
242
|
+
**`StepList` and `StepStateMark` are new, beside `Stepper`**: the steps of a request, each with its own state (`running`, `done`, `failed`, `refused`, `stopped`, `waiting`; `STEP_STATES`) said in words after its label (`STEP_STATE_LABELS`) and drawn by `StepStateMark` in one 16px column on the label's first line, with a mono `duration` and `detail` on the inset ground. A string detail breaks only at a space or after `/`, `?` or `&`, never inside a name such as `sign-in` (`stepDetailPieces`).
|
|
243
|
+
|
|
244
|
+
**`RunChip` is new**: a request's state as the disclosure of its steps, eight states (`thinking`, `working`, `done`, `waiting`, `applying`, `stopped`, `failed`, `refused`; `RUN_STATES`) on the disclosure trigger with `StepStateMark` as its mark, the chevron hanging into the gutter, the title in the warning ink while it waits and the danger ink when it failed, and a `meta` behind a visible " · " that is hidden from assistive technology (a comma is said instead). Uncontrolled, it is open while the request works and closes itself when it settles. With nothing to open (`expandable`, or no children) it is words with the chevron's slot kept, so its mark does not move when the first step arrives. **`DisclosureAnatomy` takes `icon` and `expandable`** for it.
|
|
245
|
+
|
|
246
|
+
**`ChatThread` is new**: a conversation as it grows. A focusable `role="log"` with `aria-live="off"` (the host announces a completed answer once, through its `Announcer`) and `aria-busy` while a request runs. It follows the end while the reader is within 48px of it (`CHAT_THREAD_FOLLOW_WITHIN`), anchored in code with the browser's scroll anchoring off, stays put once they scroll up, and shows Jump to latest with a count of what arrived. Its handle (`ChatThreadHandle`) offers `scrollToLatest` and `reveal(element)`, which brings a card that needs a decision into view whole, or with its head at the top when it does not fit.
|
|
247
|
+
|
|
248
|
+
**`MessageBubble` is new**: one message on its writer's side, the reader's own at the end on the raised ground with a tail corner, anybody else's at the start inside a hairline, at most 85% of the thread and wrapping anywhere. An article named for who said it ("You said" by default), with an `attachment` slot for what it carried (the page a question was sent with, as a read-only `Tag`) and a `footer`.
|
|
249
|
+
|
|
250
|
+
**`StatusCard` is new**: a record with a state on the default `Card`, a sentence-case title, the state as a `Tag` at the end of the head, and a section named by both. What happened goes in `strip`, and the foot follows one rule (`actionsAlign`): a decision ends the row (its buttons share it as blocks on a card under 360px), utilities start it with a ghost button pulled onto the text edge. `settled` steps the body back to the secondary ink. No tone rail.
|
|
251
|
+
|
|
252
|
+
**`ReceiptStrip` and `RefusalStrip` are new**: what happened at a card's foot, on the card's hairline, a tone's soft tint under its ink and a 16px mark, a polite status or, for `danger`, an alert. `RefusalStrip` is the one drawing of a refusal, `inline` under the control that caused it or at a card's `foot`, with Try again (`onRetry`, `retrying`) and Dismiss (`onDismiss`) only where offered, and always in the caller's own sentence. The engine dashboard's write buttons can draw their refusal with it.
|
|
253
|
+
|
|
254
|
+
**`DiffList` takes `layout`**: `stacked` stands each path over its value and wraps both, so a value is read rather than cut by the 200px path track, and `auto` does so under 480px of the list's own width. `columns` stays the default.
|
|
255
|
+
|
|
256
|
+
**`ChangeList` is new**: a change as before and after pairs (decision D10) on `PropertyList`'s grid in `DiffList`'s tones. `fact`, `changed` (the old value struck through, an arrow and the new value on the added tint, wrapping as a unit), `added` (with a "New" tag for a field new to an existing record), `removed` and `text` rows, the last a word diff whose long unchanged runs are shortened at word boundaries (`shortenUnchanged`, `CHANGE_LIST_COLLAPSE_OVER`) with "Show the whole change" opening a stacking `DiffList`. A pair is said "Changed from X to Y", and added and removed values and words say so. `settled` keeps every pair in the secondary ink.
|
|
257
|
+
|
|
258
|
+
**`ProposalCard` is new**: a change from proposal to outcome. The title is the action, the subtitle its scope, and the Tag its state (`pending`, `stepup`, `applying`, `applied`, `declined`, `expired`, `stale`, `failed`; `PROPOSAL_STATES`), worded for where it lands (`scope`: Applying and Applied on a page, Saving and Saved on the server). The `ChangeList` heading follows `kind` and the state ("What will change", "What will be created", "What changed", "What was created", "What was proposed"). The foot is Decline and the primary named for its effect, or a strip saying what happened, with Prepare it again (`onPrepareAgain`) and Try again (`onRetry`) where offered. Nothing takes focus when it arrives; while the approved change is carried out the primary keeps its label with the spinner, soft disabled, and Decline is held with its reason. A refusal is the engine's sentence (`failure`) followed by "Nothing changed.". Every word is in `labels` (`PROPOSAL_CARD_LABELS`).
|
|
259
|
+
|
|
260
|
+
**`ProposalCard` takes `failureHint` and `approveBlocked`.** `failureHint` is what the person can do next about a failure, drawn on its own quieter line in the failure strip after the engine's sentence and "Nothing changed.", and only with `failure`. `approveBlocked` holds the primary soft disabled with a reason while the card is `pending` or `stepup` (a page action whose screen refuses the prepared change): it keeps its focus, says it is unavailable, is described by the reason, which the foot also shows above the decision, and never calls `onApprove`. Decline stays available, and the prop is ignored once the card is applying or settled.
|
|
261
|
+
|
|
262
|
+
**`Table` takes `footer`, `align` and `framed`**: a total row whose first cell heads the row, a column of figures standing at the end with tabular figures, and `framed={false}` for a table that fills a card, with no edge of its own and its outer cells on the card's inset.
|
|
263
|
+
|
|
264
|
+
**`DownloadButton` takes `file`**, an async source beside `text` for an export the server builds: the label stays with the spinner while it waits, a second press fetches nothing more, and a rejected fetch reads as a failed download. `useDownload` gains `downloadFile`. `DownloadButtonProps` is now a union of `DownloadButtonBaseProps` and `DownloadButtonSource`; an `interface` that extended it extends `DownloadButtonBaseProps` and adds its own source.
|
|
265
|
+
|
|
266
|
+
**`ResultTableCard` is new**: a result as a flush `Table` in a `StatusCard`, its title (also the table's hidden caption) over its `window`, end-aligned figures and a `total` row, and a foot of utilities: `downloads` fetched on their press and the host's `link` at the far end. Over `maxRows` (20) rows it shows the first `collapsedRows` (10) and "Show all 48".
|
|
267
|
+
|
|
268
|
+
**`IconTile` takes `tone="neutral"`**, the raised ground in the secondary ink, for a place or a record rather than a kind.
|
|
269
|
+
|
|
270
|
+
**`OpenInAppCard` is new**: a place an answer points to, opened only by the person's press, its glyph on a neutral tile with its name and last two crumbs, Open in new tab (drawn only for an address `safeHref` trusts, without opener or referrer) and Open here (`onOpenHere`); once `opened`, a success Tag and a strip.
|
|
271
|
+
|
|
272
|
+
**`EntityList`, `RefusalCard`, `SuggestionRow` and `SuggestionList` are new.** `EntityList` names people, seats or records as divided rows with one fact and the host's own link, bare or as a card under a `title`. `RefusalCard` says a request the person's access does not allow: Not permitted as a neutral Tag with the lock, the product's sentence, always "Nothing changed.", and utilities only. `SuggestionRow` is a suggested question or request in the list row's grammar, with an optional `detail`, `count` and `chevron`; a `fills` row says ", fills the message box" to assistive technology. `SuggestionList` puts each row in its own list item, plain or `divided` in a card.
|
|
273
|
+
|
|
274
|
+
**`ToastProvider` and `Toaster` take `inset`** (`ToasterInset`, `{ inline?, block? }` in pixels): room the stack keeps clear on its own side and edge, added to the window inset it already keeps. A host sets `inline` to the width a panel beside the page occupies, so a toast stands beside the panel rather than over its composer, and `block` to the height of a phone sheet's foot, so it stands above it. It may change while toasts are up and they move with it; anything but a finite number of zero or more reads as zero. It is drawn through `--crewlet-toaster-inset-inline` and `--crewlet-toaster-inset-block` on the stack (`toasterInsetStyle` builds them), which a host may also set itself. With no inset the stack stands exactly where it did.
|
|
275
|
+
|
|
276
|
+
**`ArtifactNameCell` takes words for some kinds only**: `ArtifactNameCellLabels.kinds` is now `Partial<Record<ArtifactKind, string>>`, merged over the kit's own words, so an application that words only the kinds it knows (one built before `brand`) compiles, and a kind it does not word reads in the kit's own word.
|
|
277
|
+
|
|
278
|
+
**The shared clock reads the time now after sitting idle.** `useNow` and `currentNow` (and so `RelativeTime` and `EditingStatus`'s "Saved 2m ago") read an instant the interval moves only while a reader is subscribed, so a reader mounted after a quiet spell rendered the time the last reader left, until the first tick: a save two minutes old read "1m ago". While the clock is idle, a reading more than a second old is now replaced before it is used.
|
|
279
|
+
|
|
280
|
+
**`@crewlethq/icons` adds `square-pen`, `square` and `circle-stop`** (`SquarePenGlyph`, `SquareGlyph`, which may be drawn filled, and `CircleStopGlyph`), vendored from the pinned `lucide-static`. Lucide publishes `history` as a retired alias of `rotate-ccw-clock`, which the package already carries, so a conversations list takes `RotateCcwClockGlyph`.
|
|
281
|
+
|
|
282
|
+
**`ProductMark` takes `product="assistant"`**: Orbit, the crewmate octagon opened into four chamfered blades turning around one core, on the family's tile and lower facet. No eyes and no visor, because the assistant acts as the signed-in person and is drawn as a capability rather than a crew member. Its blades and core are separate detail paths, so a working state can turn the blades and hold the core still.
|
|
283
|
+
|
|
284
|
+
**`@crewlethq/icons/product-mark` is new**: `ProductMark` and `PRODUCTS` on an entry of their own, whose import graph never reaches the root's illustrations, vendor marks or their stylesheets, so an Ask button in a first paint carries the marks alone. The root exports the same functions.
|
|
285
|
+
|
|
286
|
+
## Changes in 0.55.0
|
|
287
|
+
|
|
288
|
+
**`ProductMark` names its products `worklet` and `doclet`** (`@crewlethq/icons`). Worklet (projects and tasks) and Doclet (spaces and pages) are the two services' names, so the product values are `'worklet'`, `'doclet'` and `'chat'`. What to change: replace `product="works"` with `product="worklet"` and `product="knowledge"` with `product="doclet"`; the `crewlet-product-mark--*` modifier classes and the `svg/product/*.svg` files follow the values.
|
|
289
|
+
|
|
207
290
|
## Changes in 0.54.0
|
|
208
291
|
|
|
209
292
|
The setup wizard's review step and footer, laid out for a decision.
|
package/dist/Accordion/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export { Accordion, AccordionItem } from '../chunk-
|
|
2
|
-
import '../chunk-
|
|
1
|
+
export { Accordion, AccordionItem } from '../chunk-T4D7RZNI.js';
|
|
2
|
+
import '../chunk-TFGCNBWP.js';
|
|
3
3
|
import '../chunk-BHHIIK3M.js';
|
|
4
4
|
import '../chunk-PQADV6P6.js';
|
|
5
5
|
import '../chunk-BZFWDIV6.js';
|
|
@@ -1,19 +1,24 @@
|
|
|
1
|
-
export { AGENT_HANDOFF_LABELS, AgentHandoffPanel } from '../chunk-
|
|
1
|
+
export { AGENT_HANDOFF_LABELS, AgentHandoffPanel } from '../chunk-GCASX3FD.js';
|
|
2
2
|
import '../chunk-AUQPBL4O.js';
|
|
3
3
|
import '../chunk-JQ7IFSF6.js';
|
|
4
|
-
import '../chunk-
|
|
5
|
-
import '../chunk-
|
|
6
|
-
import '../chunk-
|
|
4
|
+
import '../chunk-JLRXCKTS.js';
|
|
5
|
+
import '../chunk-GG4QZWMQ.js';
|
|
6
|
+
import '../chunk-HGYHWWA5.js';
|
|
7
|
+
import '../chunk-XODESBSR.js';
|
|
7
8
|
import '../chunk-SMBKXWML.js';
|
|
8
|
-
import '../chunk-
|
|
9
|
+
import '../chunk-FXQLNETQ.js';
|
|
9
10
|
import '../chunk-XCUUI7E7.js';
|
|
10
|
-
import '../chunk-
|
|
11
|
+
import '../chunk-TFGCNBWP.js';
|
|
11
12
|
import '../chunk-BHHIIK3M.js';
|
|
12
13
|
import '../chunk-PQADV6P6.js';
|
|
13
|
-
import '../chunk-
|
|
14
|
+
import '../chunk-RSAQOKH3.js';
|
|
15
|
+
import '../chunk-PIYJNCN7.js';
|
|
16
|
+
import '../chunk-HD4QJ2SI.js';
|
|
17
|
+
import '../chunk-EA23JG6R.js';
|
|
18
|
+
import '../chunk-OMV5W53A.js';
|
|
19
|
+
import '../chunk-2YTOOH3A.js';
|
|
14
20
|
import '../chunk-H5XTJ7GJ.js';
|
|
15
|
-
import '../chunk-
|
|
21
|
+
import '../chunk-2BQYODY3.js';
|
|
16
22
|
import '../chunk-NUZHC6MM.js';
|
|
17
|
-
import '../chunk-RSAQOKH3.js';
|
|
18
23
|
import '../chunk-BZFWDIV6.js';
|
|
19
24
|
import '../chunk-ODEQTPFM.js';
|
|
@@ -36,9 +36,47 @@
|
|
|
36
36
|
* layout it belongs to ends. Hidden rather than merely moved off screen, too,
|
|
37
37
|
* because a rail translated out of view keeps every link in the tab order and
|
|
38
38
|
* a keyboard reader walks through a dozen stops nobody can see.
|
|
39
|
+
*
|
|
40
|
+
* THE ASIDE MIRRORS THE RAIL. A panel the whole frame keeps open beside every
|
|
41
|
+
* screen (the assistant) is a third track of the shell's grid, a second sheet
|
|
42
|
+
* on the frame to the right of the page's, so opening it PUSHES the page
|
|
43
|
+
* narrower rather than covering it. Nothing about the page changes but its
|
|
44
|
+
* width: the bar, the sticky headers, the one scroller and the measured
|
|
45
|
+
* gutter are all the sheet's, and the sheet keeps them. Where the window
|
|
46
|
+
* cannot hold the page and the panel side by side the panel is an overlay
|
|
47
|
+
* over the page's end, and on a phone it is the whole window; both are
|
|
48
|
+
* modal surfaces on the shared layer stack. WHICH SHAPE is the host's
|
|
49
|
+
* decision (`asideShape`), never a media query's: the width that leaves the
|
|
50
|
+
* page its floor depends on what else the frame holds and on the density,
|
|
51
|
+
* which only the application knows.
|
|
52
|
+
*
|
|
53
|
+
* AND THE PEEK IS A COLUMN OF THE SHEET. A detail panel opened from a list
|
|
54
|
+
* (`peek`) stands beside the scroller inside the sheet, under the bar, so the
|
|
55
|
+
* section the reader is on still reads across the top. It is a column where
|
|
56
|
+
* the host says there is room and a drawer over the page where there is not.
|
|
39
57
|
*/
|
|
40
58
|
import { type AriaAttributes, type HTMLAttributes, type MouseEventHandler, type ReactNode, type Ref } from 'react';
|
|
41
59
|
import type { Tone } from '../utils/tone.js';
|
|
60
|
+
import { type AppShellAsideShape, type AppShellPeekShape } from './regions.js';
|
|
61
|
+
export { useAppShellAside, useAppShellPeek } from './regions.js';
|
|
62
|
+
export type { AppShellAsideShape, AppShellPeekShape, AppShellRegionValue } from './regions.js';
|
|
63
|
+
/** The aside's resting width, in px, where the host names none. */
|
|
64
|
+
export declare const APP_SHELL_ASIDE_WIDTH = 420;
|
|
65
|
+
/** How the reader resizes the aside while it is a column. */
|
|
66
|
+
export interface AppShellAsideResize {
|
|
67
|
+
/** The narrowest the aside may be, in px. */
|
|
68
|
+
min: number;
|
|
69
|
+
/** The widest, in px, already capped by the host so the page keeps its floor. */
|
|
70
|
+
max: number;
|
|
71
|
+
/** The resting width a reset returns to. */
|
|
72
|
+
defaultValue?: number | undefined;
|
|
73
|
+
/** Every change while it happens. */
|
|
74
|
+
onChange: (width: number) => void;
|
|
75
|
+
/** Where a gesture ends: the moment to keep the width. */
|
|
76
|
+
onCommit?: ((width: number) => void) | undefined;
|
|
77
|
+
/** Names the grip: "Resize the assistant panel". */
|
|
78
|
+
label: string;
|
|
79
|
+
}
|
|
42
80
|
/** What the shell tells the components inside it. */
|
|
43
81
|
interface AppShellContextValue {
|
|
44
82
|
/** Whether the layout is below the shell breakpoint. */
|
|
@@ -97,9 +135,43 @@ export interface AppShellProps extends Omit<HTMLAttributes<HTMLDivElement>, 'tit
|
|
|
97
135
|
toggleLabel?: string | undefined;
|
|
98
136
|
/** The link that precedes everything, for a keyboard reader. */
|
|
99
137
|
skipLabel?: string | undefined;
|
|
138
|
+
/**
|
|
139
|
+
* A panel the frame keeps beside every screen: the assistant. Nothing (or
|
|
140
|
+
* null) means no aside and no track. Normally a `SidePanel`, which leaves
|
|
141
|
+
* the landmark, the width and the grip to the shell here.
|
|
142
|
+
*/
|
|
143
|
+
aside?: ReactNode;
|
|
144
|
+
/** The aside's width while it is a column or an overlay, in px. */
|
|
145
|
+
asideWidth?: number | undefined;
|
|
146
|
+
/**
|
|
147
|
+
* The page's floor beside an aside column, in px: the column's track is
|
|
148
|
+
* capped at what leaves the sheet this wide, so a width dragged on a wide
|
|
149
|
+
* window never takes a narrower window's page away.
|
|
150
|
+
*/
|
|
151
|
+
asideReserve?: number | undefined;
|
|
152
|
+
/** Names the complementary region and, as an overlay or a sheet, the dialog. */
|
|
153
|
+
asideLabel?: string | undefined;
|
|
154
|
+
/** Which shape the aside takes; the host decides it. */
|
|
155
|
+
asideShape?: AppShellAsideShape | undefined;
|
|
156
|
+
/** Closes the aside: Escape and a press on the veil, as an overlay or a sheet. */
|
|
157
|
+
onAsideClose?: (() => void) | undefined;
|
|
158
|
+
/** Gives the aside a grip in the seam beside it while it is a column. */
|
|
159
|
+
asideResize?: AppShellAsideResize | undefined;
|
|
160
|
+
/**
|
|
161
|
+
* A detail panel beside the scroller, inside the sheet and under the bar:
|
|
162
|
+
* a peek opened from a list. Normally a `PeekRail`.
|
|
163
|
+
*/
|
|
164
|
+
peek?: ReactNode;
|
|
165
|
+
/**
|
|
166
|
+
* Whether the peek is a column of the sheet or a drawer over the page; the
|
|
167
|
+
* host decides it. The peek sizes itself (`PeekRail` takes its width and
|
|
168
|
+
* the page's floor), because a column of the sheet is the peek's own box
|
|
169
|
+
* rather than a track of the frame.
|
|
170
|
+
*/
|
|
171
|
+
peekShape?: AppShellPeekShape | undefined;
|
|
100
172
|
children?: ReactNode;
|
|
101
173
|
}
|
|
102
|
-
export declare function AppShell({ sidebar, topbar, banner, footer, mainId, mainRef, fill, navigationKey, toggleLabel, skipLabel, className, style, children, ...rest }: AppShellProps): import("react").JSX.Element;
|
|
174
|
+
export declare function AppShell({ sidebar, topbar, banner, footer, mainId, mainRef, fill, navigationKey, toggleLabel, skipLabel, aside, asideWidth, asideReserve, asideLabel, asideShape, onAsideClose, asideResize, peek, peekShape, className, style, children, ...rest }: AppShellProps): import("react").JSX.Element;
|
|
103
175
|
export declare namespace AppShell {
|
|
104
176
|
var Rail: typeof AppShellRail;
|
|
105
177
|
var RailRow: import("react").ForwardRefExoticComponent<AppShellRailRowProps & import("react").RefAttributes<HTMLElement>>;
|
|
@@ -107,6 +179,7 @@ export declare namespace AppShell {
|
|
|
107
179
|
var Topbar: typeof AppShellTopbar;
|
|
108
180
|
var Toggle: typeof AppShellToggle;
|
|
109
181
|
var AccountRow: typeof import("./AccountRow.js").AccountRow;
|
|
182
|
+
var ResizeHandle: typeof import("./ResizeHandle.js").ResizeHandle;
|
|
110
183
|
}
|
|
111
184
|
export interface AppShellRailProps {
|
|
112
185
|
/**
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The grip that sizes a panel standing beside the page: the assistant in the
|
|
3
|
+
* shell's aside, a peek beside a list, a side panel beside an artifact.
|
|
4
|
+
*
|
|
5
|
+
* A SEPARATOR WITH A VALUE. It is `role="separator"` with
|
|
6
|
+
* `aria-orientation="vertical"` and the panel's width as `aria-valuenow`
|
|
7
|
+
* between `aria-valuemin` and `aria-valuemax`, which is the WAI-ARIA window
|
|
8
|
+
* splitter: a screen reader hears what it sizes and where it stands, and the
|
|
9
|
+
* keyboard moves it. The grip it replaces was mouse only, which left a reader
|
|
10
|
+
* without a pointer with whatever width somebody else had dragged.
|
|
11
|
+
*
|
|
12
|
+
* THE KEYS. Left and Right move the edge by `step` (16px), with Shift by
|
|
13
|
+
* `largeStep` (64px); Home and End take the panel to its narrowest and its
|
|
14
|
+
* widest; Enter or a double press puts it back at `defaultValue`. The edge
|
|
15
|
+
* moves the way the arrow points, so on a panel's left edge ArrowLeft widens
|
|
16
|
+
* it and on a right edge it narrows it.
|
|
17
|
+
*
|
|
18
|
+
* THE POINTER. A drag is measured from where it started, not from the
|
|
19
|
+
* window's edge: a panel inside an inset sheet stands a hairline and an inset
|
|
20
|
+
* in from the window, and a width read as `innerWidth - clientX` runs ahead
|
|
21
|
+
* of the hand by exactly that much. The pointer is captured, so a drag that
|
|
22
|
+
* leaves the grip, or the window, keeps sizing until it is released.
|
|
23
|
+
*
|
|
24
|
+
* TWO CALLBACKS, because the two moments are different: `onValueChange` for
|
|
25
|
+
* every step of a drag, to draw it, and `onValueCommit` once, where the
|
|
26
|
+
* gesture ends, to keep it. A preference written on every pointer move is a
|
|
27
|
+
* storage write per frame.
|
|
28
|
+
*
|
|
29
|
+
* Drawn as nothing at rest, a soft accent wash under the pointer, under
|
|
30
|
+
* focus and while dragging, and a 24px target whatever its drawn width.
|
|
31
|
+
*/
|
|
32
|
+
/** The step an arrow key moves the edge by, in px. */
|
|
33
|
+
export declare const RESIZE_HANDLE_STEP = 16;
|
|
34
|
+
/** The step Shift with an arrow key moves it by, in px. */
|
|
35
|
+
export declare const RESIZE_HANDLE_LARGE_STEP = 64;
|
|
36
|
+
export interface ResizeHandleProps {
|
|
37
|
+
/** The size the handle controls, in px. */
|
|
38
|
+
value: number;
|
|
39
|
+
/** The narrowest the panel may be, in px. */
|
|
40
|
+
min: number;
|
|
41
|
+
/**
|
|
42
|
+
* The widest, in px. A host that caps the panel so the page beside it
|
|
43
|
+
* keeps its floor passes the cap here, so End and a drag both stop where
|
|
44
|
+
* the panel is actually drawn.
|
|
45
|
+
*/
|
|
46
|
+
max: number;
|
|
47
|
+
/** Every change, while it happens: a drag's move, a key's step. */
|
|
48
|
+
onValueChange: (value: number) => void;
|
|
49
|
+
/** Where a gesture ends (a released drag, a key, a reset): the moment to persist. */
|
|
50
|
+
onValueCommit?: ((value: number) => void) | undefined;
|
|
51
|
+
/** The resting size Enter and a double press return to. Without one neither does anything. */
|
|
52
|
+
defaultValue?: number | undefined;
|
|
53
|
+
/** Names the separator: "Resize the assistant panel". */
|
|
54
|
+
label: string;
|
|
55
|
+
/**
|
|
56
|
+
* Which edge of the sized panel the handle stands on. On the `left` edge
|
|
57
|
+
* (a panel at the window's right) moving the edge left widens the panel;
|
|
58
|
+
* on the `right` edge (a panel at the left) moving it right does. The
|
|
59
|
+
* shell is drawn left to right throughout, so the edge is physical.
|
|
60
|
+
*/
|
|
61
|
+
edge?: 'left' | 'right' | undefined;
|
|
62
|
+
/** The element the handle sizes, by id. */
|
|
63
|
+
controls?: string | undefined;
|
|
64
|
+
/** What the value is read as: "420 pixels". */
|
|
65
|
+
valueText?: ((value: number) => string) | undefined;
|
|
66
|
+
/** The step an arrow key moves the edge by. */
|
|
67
|
+
step?: number | undefined;
|
|
68
|
+
/** The step Shift with an arrow key moves it by. */
|
|
69
|
+
largeStep?: number | undefined;
|
|
70
|
+
className?: string | undefined;
|
|
71
|
+
}
|
|
72
|
+
/** A width held inside its bounds, in whole pixels. */
|
|
73
|
+
export declare function clampSize(value: number, min: number, max: number): number;
|
|
74
|
+
export declare function ResizeHandle({ value, min, max, onValueChange, onValueCommit, defaultValue, label, edge, controls, valueText, step, largeStep, className, }: ResizeHandleProps): import("react").JSX.Element;
|
package/dist/AppShell/index.d.ts
CHANGED
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
import '../HitArea/HitArea.css';
|
|
2
2
|
import './AppShell.css';
|
|
3
|
-
|
|
3
|
+
import './ResizeHandle.css';
|
|
4
|
+
export { APP_SHELL_ASIDE_WIDTH, AppShell, AppShellRail, AppShellRailRow, AppShellRailStatus, AppShellToggle, AppShellTopbar, useAppShell, useAppShellAside, useAppShellPeek, } from './AppShell.js';
|
|
5
|
+
export { RESIZE_HANDLE_LARGE_STEP, RESIZE_HANDLE_STEP, ResizeHandle, clampSize } from './ResizeHandle.js';
|
|
6
|
+
export type { ResizeHandleProps } from './ResizeHandle.js';
|
|
7
|
+
export { readStoredWidth, useStoredWidth } from './storedWidth.js';
|
|
8
|
+
export type { StoredWidth, StoredWidthOptions, WidthStorage } from './storedWidth.js';
|
|
4
9
|
export { AccountRow } from './AccountRow.js';
|
|
5
10
|
export type { AccountRowMenu, AccountRowProps } from './AccountRow.js';
|
|
6
|
-
export type { ActionRailRowProps, ActionRailStatusProps, AppShellContextValue, AppShellProps, AppShellRailProps, AppShellRailRowProps, AppShellRailStatusProps, AppShellToggleProps, AppShellTopbarProps, RailRowCount, StaticRailRowProps, StaticRailStatusProps, } from './AppShell.js';
|
|
11
|
+
export type { ActionRailRowProps, ActionRailStatusProps, AppShellAsideResize, AppShellAsideShape, AppShellContextValue, AppShellPeekShape, AppShellProps, AppShellRailProps, AppShellRailRowProps, AppShellRailStatusProps, AppShellRegionValue, AppShellToggleProps, AppShellTopbarProps, RailRowCount, StaticRailRowProps, StaticRailStatusProps, } from './AppShell.js';
|
package/dist/AppShell/index.js
CHANGED
|
@@ -1,11 +1,13 @@
|
|
|
1
|
-
export { AccountRow, AppShell, AppShellRail, AppShellRailRow, AppShellRailStatus, AppShellToggle, AppShellTopbar, useAppShell } from '../chunk-
|
|
1
|
+
export { APP_SHELL_ASIDE_WIDTH, AccountRow, AppShell, AppShellRail, AppShellRailRow, AppShellRailStatus, AppShellToggle, AppShellTopbar, readStoredWidth, useAppShell, useStoredWidth } from '../chunk-UVYGMCJ4.js';
|
|
2
2
|
import '../chunk-RTPQDNW3.js';
|
|
3
|
-
import '../chunk-
|
|
3
|
+
import '../chunk-TKS7FTTO.js';
|
|
4
|
+
export { RESIZE_HANDLE_LARGE_STEP, RESIZE_HANDLE_STEP, ResizeHandle, clampSize, useAppShellAside, useAppShellPeek } from '../chunk-PIYJNCN7.js';
|
|
5
|
+
import '../chunk-HD4QJ2SI.js';
|
|
6
|
+
import '../chunk-EA23JG6R.js';
|
|
4
7
|
import '../chunk-OMV5W53A.js';
|
|
5
8
|
import '../chunk-2YTOOH3A.js';
|
|
6
|
-
import '../chunk-OG6CL3EB.js';
|
|
7
9
|
import '../chunk-H5XTJ7GJ.js';
|
|
8
|
-
import '../chunk-
|
|
10
|
+
import '../chunk-2BQYODY3.js';
|
|
9
11
|
import '../chunk-NUZHC6MM.js';
|
|
10
12
|
import '../chunk-BZFWDIV6.js';
|
|
11
13
|
import '../chunk-ODEQTPFM.js';
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Where a component stands in the shell: the aside, or the peek slot.
|
|
3
|
+
*
|
|
4
|
+
* Its own module, so a panel that asks (`SidePanel`, `PeekRail`) carries the
|
|
5
|
+
* question and not the whole shell.
|
|
6
|
+
*/
|
|
7
|
+
/**
|
|
8
|
+
* The shape the aside takes, decided by the host from its own arithmetic.
|
|
9
|
+
*
|
|
10
|
+
* - `column`: a track of the frame's grid beside the sheet, a complementary
|
|
11
|
+
* region; the page reflows narrower and stays reachable with Tab.
|
|
12
|
+
* - `overlay`: over the page's end edge, behind a veil, a modal dialog: Tab
|
|
13
|
+
* stays in it, Escape and a press on the veil close it, focus returns.
|
|
14
|
+
* - `sheet`: the whole window, for a phone; modal in the same way.
|
|
15
|
+
*/
|
|
16
|
+
export type AppShellAsideShape = 'column' | 'overlay' | 'sheet';
|
|
17
|
+
/** The shape a peek takes beside the scroller: a column of the sheet, or a drawer over the page. */
|
|
18
|
+
export type AppShellPeekShape = 'column' | 'drawer';
|
|
19
|
+
/** What a component inside the aside or the peek is told about where it stands. */
|
|
20
|
+
export interface AppShellRegionValue<Shape extends string> {
|
|
21
|
+
shape: Shape;
|
|
22
|
+
}
|
|
23
|
+
export declare const AsideContext: import("react").Context<AppShellRegionValue<AppShellAsideShape> | null>;
|
|
24
|
+
export declare const PeekContext: import("react").Context<AppShellRegionValue<AppShellPeekShape> | null>;
|
|
25
|
+
/**
|
|
26
|
+
* The aside this component stands in, or null outside one.
|
|
27
|
+
*
|
|
28
|
+
* Null rather than a throw, unlike `useAppShell`: a side panel is drawn in
|
|
29
|
+
* the shell's aside and in a frame of its own, and it asks which so it can
|
|
30
|
+
* leave the landmark, the width and the grip to the shell when it is here.
|
|
31
|
+
*/
|
|
32
|
+
export declare function useAppShellAside(): AppShellRegionValue<AppShellAsideShape> | null;
|
|
33
|
+
/** The peek slot this component stands in, or null outside one. */
|
|
34
|
+
export declare function useAppShellPeek(): AppShellRegionValue<AppShellPeekShape> | null;
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A width the reader dragged a panel to, kept per browser.
|
|
3
|
+
*
|
|
4
|
+
* NULL WHERE THEY NEVER DRAGGED ONE, rather than a default: the resting width
|
|
5
|
+
* is the host's (a canvas may rest a panel narrower than a list does), and a
|
|
6
|
+
* preference that answered with a default when nothing was stored would read
|
|
7
|
+
* as a reader who chose it.
|
|
8
|
+
*
|
|
9
|
+
* WHAT IS STORED IS A NUMBER AND NOTHING ELSE. A stored value is read back
|
|
10
|
+
* only when it is a finite number inside the bounds, so a value another
|
|
11
|
+
* build wrote, a hand-edited one, or one outside today's bounds is ignored
|
|
12
|
+
* rather than trusted. Storage that cannot be read or written (a private
|
|
13
|
+
* window, a blocked origin, a full quota) leaves the width working for the
|
|
14
|
+
* session: a preference is a convenience, never a reason to draw no panel.
|
|
15
|
+
*
|
|
16
|
+
* The key is the caller's, so an application keeps every storage key it
|
|
17
|
+
* writes in one registry of its own.
|
|
18
|
+
*/
|
|
19
|
+
/** The part of `Storage` the hook reads and writes. */
|
|
20
|
+
export interface WidthStorage {
|
|
21
|
+
getItem(key: string): string | null;
|
|
22
|
+
setItem(key: string, value: string): void;
|
|
23
|
+
}
|
|
24
|
+
export interface StoredWidthOptions {
|
|
25
|
+
/** The storage key, from the application's own registry. */
|
|
26
|
+
key: string;
|
|
27
|
+
/** The narrowest width that is kept, in px. */
|
|
28
|
+
min: number;
|
|
29
|
+
/** The widest, in px. */
|
|
30
|
+
max: number;
|
|
31
|
+
/**
|
|
32
|
+
* Where the width is kept. The browser's `localStorage` when left out;
|
|
33
|
+
* `null` keeps it for the session only.
|
|
34
|
+
*/
|
|
35
|
+
storage?: WidthStorage | null | undefined;
|
|
36
|
+
}
|
|
37
|
+
export interface StoredWidth {
|
|
38
|
+
/** The width the reader chose, or null where they never chose one. */
|
|
39
|
+
width: number | null;
|
|
40
|
+
/** Draw a width without keeping it: a drag's every move. */
|
|
41
|
+
setWidth: (px: number) => void;
|
|
42
|
+
/** Draw a width and keep it: where a drag or a key press ends. */
|
|
43
|
+
commitWidth: (px: number) => void;
|
|
44
|
+
}
|
|
45
|
+
/** The stored width, when it is one this panel can take; null otherwise. */
|
|
46
|
+
export declare function readStoredWidth(storage: WidthStorage | null, key: string, min: number, max: number): number | null;
|
|
47
|
+
export declare function useStoredWidth({ key, min, max, storage }: StoredWidthOptions): StoredWidth;
|