@crewlethq/ui 0.54.1 → 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 +90 -7
- package/dist/Accordion/index.js +2 -2
- package/dist/AgentHandoffPanel/index.js +13 -8
- 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 +4 -4
- package/dist/ArtifactBar/ArtifactBar.d.ts +13 -2
- package/dist/ArtifactBar/index.js +7 -6
- package/dist/{ArtifactBar-UMZCTARR.css → ArtifactBar-LEBMR35Y.css} +19 -1
- package/dist/ArtifactCard/index.js +5 -5
- 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 +8 -7
- package/dist/Breadcrumb/index.js +1 -1
- package/dist/Button/index.js +2 -1
- package/dist/{Button-UWKBTKYD.css → Button-VXJ7M5XF.css} +9 -32
- package/dist/Canvas/index.js +4 -3
- package/dist/CanvasBoard/index.js +6 -5
- package/dist/CanvasToolbar/index.js +5 -4
- 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 +3 -3
- package/dist/CodeBlock/index.js +5 -4
- package/dist/ColorField/index.js +3 -3
- package/dist/ColorSwatch/index.js +5 -4
- package/dist/Combobox/index.js +3 -3
- package/dist/CommandPalette/index.js +6 -5
- package/dist/CommentThread/index.js +8 -6
- package/dist/Composer/Composer.d.ts +39 -2
- package/dist/Composer/index.js +4 -3
- package/dist/Composer-JSGTOW3F.css +192 -0
- package/dist/ConfirmField/index.js +3 -3
- 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 +6 -5
- package/dist/DataTable/index.js +8 -7
- package/dist/DataView/index.js +12 -11
- 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 +6 -5
- 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-FEKMRFBK.js → Editor-X2J47LPD.js} +5 -4
- 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 +7 -6
- 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 +5 -4
- package/dist/Input/index.js +2 -2
- package/dist/LinkInterstitial/index.js +5 -4
- package/dist/ListInput/index.js +5 -4
- package/dist/LogoSlot/index.js +4 -3
- package/dist/Markdown/grammar.d.ts +1 -1
- package/dist/MarkdownEditor/index.js +7 -6
- package/dist/Menu/index.js +4 -3
- package/dist/MergeConflicts/index.js +7 -6
- 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 +4 -3
- 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 +4 -4
- 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/codec.d.ts +1 -1
- package/dist/RichEditor/index.js +3 -2
- package/dist/RichEditor/roundtrip.d.ts +1 -1
- 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 +6 -5
- package/dist/SelectionBar/index.js +3 -2
- 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 +5 -4
- package/dist/ShareDialog/index.js +7 -6
- package/dist/SheetColumnEditor/index.js +10 -9
- package/dist/SheetGrid/index.js +6 -5
- 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 +5 -4
- 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 +6 -5
- 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 +5 -4
- package/dist/TagsInput/index.js +3 -3
- package/dist/ThemeGallery/index.js +2 -2
- package/dist/ThemeSwitcher/index.js +7 -6
- 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 +5 -4
- 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 +5 -4
- package/dist/TreeGrid/index.js +2 -2
- package/dist/VersionCompare/index.js +7 -6
- package/dist/VersionTimeline/index.js +4 -3
- package/dist/WidgetFrame/index.js +2 -2
- package/dist/{chunk-SS4XCUUJ.js → chunk-272Y3YMV.js} +3 -3
- package/dist/{chunk-LACA4JGC.js → chunk-2BQYODY3.js} +1 -1
- package/dist/{chunk-XS2FJVMT.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-5WYPSVRX.js → chunk-3NQS6KYG.js} +1 -1
- package/dist/{chunk-V2N3BMOT.js → chunk-45KMH3E3.js} +11 -4
- package/dist/{chunk-2GIWL7IS.js → chunk-4CBGIRVU.js} +1 -1
- package/dist/{chunk-3QSKDZR5.js → chunk-4OINEWR4.js} +1 -1
- package/dist/{chunk-EZ43L6T7.js → chunk-56P72ZBE.js} +4 -4
- package/dist/{chunk-J24Q4HTD.js → chunk-5NT6OIPP.js} +13 -3
- package/dist/{chunk-FNPZ3LLQ.js → chunk-5OMV75GE.js} +3 -3
- package/dist/{chunk-6RMZH7P7.js → chunk-672GLRBU.js} +2 -2
- package/dist/{chunk-GPZXBJFU.js → chunk-67F2AM4R.js} +2 -2
- package/dist/{chunk-NQCY44B3.js → chunk-67MW366X.js} +2 -2
- package/dist/{chunk-SSHDQBHR.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-6FVGSWLS.js → chunk-AWSFK2IK.js} +1 -1
- 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-WXWMHYKW.js → chunk-D5OSP3KI.js} +2 -2
- package/dist/{chunk-CQEYF3UW.js → chunk-DOPPU6TZ.js} +3 -3
- 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-J53T2QAH.js → chunk-EBG3V4MK.js} +6 -6
- package/dist/{chunk-7PE56HHD.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-VWYT3GVV.js → chunk-FLTMDSC3.js} +1 -1
- package/dist/{chunk-LJHH4WWB.js → chunk-FXQLNETQ.js} +1 -1
- package/dist/{chunk-3NXWH5NC.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-GRKGLZFM.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-ILFEWRLG.js → chunk-I7VG6RQE.js} +1 -1
- package/dist/{chunk-3RCHEFIL.js → chunk-ICJRP6QW.js} +2 -2
- package/dist/{chunk-CUL5XV6O.js → chunk-IDQBSMMZ.js} +2 -2
- package/dist/chunk-JILNCBBS.js +27 -0
- package/dist/{chunk-5O72FSOK.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-SXBJMBSV.js → chunk-JS2TRHBF.js} +2 -2
- package/dist/{chunk-3CZ7XAVY.js → chunk-KS7YIJ4S.js} +10 -6
- package/dist/{chunk-VWNC2L6W.js → chunk-KW6KCVM7.js} +1 -1
- package/dist/{chunk-X4NIE7CI.js → chunk-LQ6AGUDL.js} +2 -2
- package/dist/chunk-LXYSWQNE.js +214 -0
- package/dist/{chunk-6VQA2LZC.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-RQI43UJ7.js → chunk-NHJQXDHA.js} +1 -1
- package/dist/{chunk-VVOPDWLX.js → chunk-NI7WUPH3.js} +2 -2
- package/dist/{chunk-OCRVY42T.js → chunk-NK3D66PB.js} +1 -1
- 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-RFPCHMSX.js → chunk-OHG7762N.js} +1 -1
- package/dist/{chunk-OBUQVGEG.js → chunk-OJ2QULVH.js} +1 -1
- package/dist/{chunk-PGYIDNGG.js → chunk-OOZ5AGPS.js} +4 -4
- package/dist/{chunk-34RMTXDZ.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-VP2ODUCC.js → chunk-Q6R6EUQ4.js} +3 -3
- package/dist/chunk-QYEOGGVS.js +161 -0
- package/dist/{chunk-YCC2S7DF.js → chunk-QZ4B72FP.js} +2 -2
- package/dist/chunk-RV2FGESF.js +98 -0
- package/dist/{chunk-SEPSXOGJ.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-G5SUSCWL.js → chunk-TA72CURM.js} +1 -1
- package/dist/{chunk-WXOYHVWG.js → chunk-TD3UHDFY.js} +4 -4
- package/dist/{chunk-VN47PYUF.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-C6Z3MLSA.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-SQ4JFHO7.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-CAVWDJF4.js → chunk-YCZ2FBKA.js} +1 -1
- package/dist/{chunk-D7Q5MQRF.js → chunk-YEURM24I.js} +2 -2
- 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-NMR7AJSB.js → chunk-Z7PJF6F3.js} +2 -2
- package/dist/{chunk-U3LNU4B2.js → chunk-ZH4MJM73.js} +1 -1
- package/dist/generated/index.d.ts +17 -0
- package/dist/generated/index.js +138 -119
- package/dist/index.js +138 -119
- 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-FZVJDJFN.js +0 -54
- package/dist/chunk-IXJHTFXG.js +0 -17
- package/dist/chunk-NBDN5JZV.js +0 -123
- package/dist/chunk-UJ4VVK7R.js +0 -48
- package/dist/{chunk-UTESMBPL.js → chunk-ESUZ27TS.js} +1 -1
- /package/dist/{chunk-55MPFB2U.js → chunk-EWTPXRRM.js} +0 -0
package/dist/utils/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { ElementToPngError, elementToPng, parseCsv, serializeElement, toCsv } from '../chunk-FEJANUZK.js';
|
|
2
|
-
export { downloadBlob, downloadText, safeFilename, useDownload } from '../chunk-
|
|
2
|
+
export { downloadBlob, downloadText, safeFilename, useDownload } from '../chunk-YNRKVY7X.js';
|
|
3
3
|
export { useClipboard, writeClipboard } from '../chunk-STJ7QBC3.js';
|
|
4
4
|
export { useOutcome } from '../chunk-DTIW4CHZ.js';
|
|
5
5
|
export { NODE_HUES, NODE_HUE_NAMES, isNodeHue } from '../chunk-AYKXMIOR.js';
|
|
@@ -10,6 +10,12 @@ export interface Download {
|
|
|
10
10
|
* text may be a thunk, resolved on the press.
|
|
11
11
|
*/
|
|
12
12
|
download: (text: string | (() => string), filename: string, mime?: string) => Promise<boolean>;
|
|
13
|
+
/**
|
|
14
|
+
* Offers a file the caller fetches on the press (an export the server
|
|
15
|
+
* builds), and answers whether the browser took it. A fetch that rejects is
|
|
16
|
+
* a refusal, never an uncaught error: the control says the download failed.
|
|
17
|
+
*/
|
|
18
|
+
downloadFile: (file: () => Promise<Blob>, filename: string) => Promise<boolean>;
|
|
13
19
|
}
|
|
14
20
|
/**
|
|
15
21
|
* Handing text to the reader as a file, and saying whether it landed: the
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@crewlethq/ui",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.56.0",
|
|
4
4
|
"description": "Crewlet shared React components built on @crewlethq/tokens and @crewlethq/icons.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -42,8 +42,8 @@
|
|
|
42
42
|
"clean": "rm -rf dist src/generated"
|
|
43
43
|
},
|
|
44
44
|
"dependencies": {
|
|
45
|
-
"@crewlethq/icons": "0.
|
|
46
|
-
"@crewlethq/tokens": "0.
|
|
45
|
+
"@crewlethq/icons": "0.56.0",
|
|
46
|
+
"@crewlethq/tokens": "0.56.0",
|
|
47
47
|
"prosemirror-commands": "1.7.2",
|
|
48
48
|
"prosemirror-gapcursor": "1.4.1",
|
|
49
49
|
"prosemirror-history": "1.5.1",
|
|
@@ -1,159 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* The workspace is a row: the artifact's body, then at most one panel. The
|
|
3
|
-
* body scrolls itself, so a panel beside it stays in view however far the
|
|
4
|
-
* artifact is read; the panel's own body scrolls under its head.
|
|
5
|
-
*
|
|
6
|
-
* ONE HAIRLINE between the two, the panel's start edge, and none at the
|
|
7
|
-
* workspace's own edges: whatever frames the workspace already draws those.
|
|
8
|
-
*/
|
|
9
|
-
|
|
10
|
-
.crewlet-artifact-workspace {
|
|
11
|
-
container: crewlet-artifact-workspace / inline-size;
|
|
12
|
-
position: relative;
|
|
13
|
-
display: flex;
|
|
14
|
-
min-width: 0;
|
|
15
|
-
min-height: 0;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
.crewlet-artifact-workspace__body {
|
|
19
|
-
flex: 1 1 auto;
|
|
20
|
-
min-width: 0;
|
|
21
|
-
min-height: 0;
|
|
22
|
-
overflow: auto;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
/* EXPANDED, the panel is the workspace; the body stays mounted behind it. */
|
|
26
|
-
.crewlet-artifact-workspace[data-panel='expanded'] > .crewlet-artifact-workspace__body {
|
|
27
|
-
display: none;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
.crewlet-artifact-panel {
|
|
31
|
-
/* THE TEXT WIDTH, every panel of facts, a list or a form: three widths for
|
|
32
|
-
those moved the artifact's edge 80px between Details and History. */
|
|
33
|
-
--crewlet-artifact-panel-width: 22.5rem;
|
|
34
|
-
display: flex;
|
|
35
|
-
flex: none;
|
|
36
|
-
flex-direction: column;
|
|
37
|
-
width: var(--crewlet-artifact-panel-width);
|
|
38
|
-
min-height: 0;
|
|
39
|
-
border-left: 1px solid var(--color-border-default);
|
|
40
|
-
background: var(--color-surface-background);
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
.crewlet-artifact-panel--lg {
|
|
44
|
-
--crewlet-artifact-panel-width: 36rem;
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
.crewlet-artifact-panel[data-expanded] {
|
|
48
|
-
flex: 1 1 auto;
|
|
49
|
-
width: auto;
|
|
50
|
-
border-left: 0;
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
.crewlet-artifact-panel__head {
|
|
54
|
-
display: flex;
|
|
55
|
-
flex: none;
|
|
56
|
-
align-items: center;
|
|
57
|
-
gap: var(--spacing-2);
|
|
58
|
-
height: var(--size-row-lg);
|
|
59
|
-
padding: 0 var(--spacing-2) 0 var(--spacing-4);
|
|
60
|
-
border-bottom: 1px solid var(--color-border-default);
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
.crewlet-artifact-panel__icon {
|
|
64
|
-
display: inline-flex;
|
|
65
|
-
flex: none;
|
|
66
|
-
color: var(--color-text-tertiary);
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
.crewlet-artifact-panel__title {
|
|
70
|
-
flex: 1 1 auto;
|
|
71
|
-
min-width: 0;
|
|
72
|
-
margin: 0;
|
|
73
|
-
overflow: hidden;
|
|
74
|
-
color: var(--color-text-primary);
|
|
75
|
-
font-size: var(--font-size-sm);
|
|
76
|
-
font-weight: var(--font-weight-semibold);
|
|
77
|
-
line-height: var(--font-line-height-snug);
|
|
78
|
-
text-overflow: ellipsis;
|
|
79
|
-
white-space: nowrap;
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
.crewlet-artifact-panel__title:focus-visible {
|
|
83
|
-
outline: 2px solid var(--color-focus);
|
|
84
|
-
outline-offset: var(--size-focus-ring-inset-offset);
|
|
85
|
-
border-radius: var(--radius-sm);
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
.crewlet-artifact-panel__actions {
|
|
89
|
-
display: inline-flex;
|
|
90
|
-
flex: none;
|
|
91
|
-
align-items: center;
|
|
92
|
-
gap: var(--spacing-1);
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
/* THE BODY'S INSET IS PUBLISHED (--crewlet-artifact-panel-inset) for content
|
|
96
|
-
that sticks to its scrollport: a sticky edge stops at the padding, so a
|
|
97
|
-
foot with `bottom: 0` left a band under it that the content scrolled
|
|
98
|
-
through; such a foot offsets itself by the inset to sit on the edge. */
|
|
99
|
-
.crewlet-artifact-panel__body {
|
|
100
|
-
/* THE PANEL'S OWN MEASURE, so what it holds folds to the panel's width
|
|
101
|
-
rather than the window's; and its sections head at the panel title's
|
|
102
|
-
step, a level under it and never louder than it. */
|
|
103
|
-
container: crewlet-artifact-panel / inline-size;
|
|
104
|
-
--crewlet-section-title-size: var(--font-size-sm);
|
|
105
|
-
--crewlet-artifact-panel-inset: var(--spacing-4);
|
|
106
|
-
|
|
107
|
-
/* A COLUMN, so content that should fit the panel rather than scroll it
|
|
108
|
-
can: a child that sets `min-height: 0` shrinks to the room the body has
|
|
109
|
-
(a sheet's rows, whose grid then scrolls itself), and every other child
|
|
110
|
-
keeps its content's height and scrolls the body as before. */
|
|
111
|
-
display: flex;
|
|
112
|
-
flex-direction: column;
|
|
113
|
-
flex: 1 1 auto;
|
|
114
|
-
min-height: 0;
|
|
115
|
-
padding: var(--crewlet-artifact-panel-inset);
|
|
116
|
-
overflow: auto;
|
|
117
|
-
overscroll-behavior: contain;
|
|
118
|
-
}
|
|
119
|
-
|
|
120
|
-
/* THE FOOT holds the panel's own commit, outside the scrolling body, so it
|
|
121
|
-
stays in reach at every scroll. Its inset is the body's. */
|
|
122
|
-
.crewlet-artifact-panel__foot {
|
|
123
|
-
flex: none;
|
|
124
|
-
padding: var(--spacing-3) var(--spacing-4);
|
|
125
|
-
border-top: 1px solid var(--color-border-default);
|
|
126
|
-
background: var(--color-surface-background);
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
/* NOT ROOM FOR TWO COLUMNS: the panel slides over the artifact's end edge,
|
|
130
|
-
raised off it, rather than squeezing the artifact under a useful width. */
|
|
131
|
-
@container crewlet-artifact-workspace (width < 960px) {
|
|
132
|
-
.crewlet-artifact-panel {
|
|
133
|
-
position: absolute;
|
|
134
|
-
inset-block: 0;
|
|
135
|
-
inset-inline-end: 0;
|
|
136
|
-
z-index: var(--z-index-overlay);
|
|
137
|
-
width: min(var(--crewlet-artifact-panel-width), 100%);
|
|
138
|
-
/* THE DRAWER'S LIFT, the shell's own rail drawer's: the large step falls
|
|
139
|
-
below a box and left the panel's start edge reading as a cut through
|
|
140
|
-
the artifact rather than a sheet over it. */
|
|
141
|
-
box-shadow: var(--shadow-xl);
|
|
142
|
-
}
|
|
143
|
-
|
|
144
|
-
.crewlet-artifact-panel[data-expanded] {
|
|
145
|
-
inset-inline-start: 0;
|
|
146
|
-
width: auto;
|
|
147
|
-
box-shadow: none;
|
|
148
|
-
}
|
|
149
|
-
}
|
|
150
|
-
|
|
151
|
-
/* A PHONE: the panel is the screen until it is closed. */
|
|
152
|
-
@container crewlet-artifact-workspace (width < 640px) {
|
|
153
|
-
.crewlet-artifact-panel {
|
|
154
|
-
inset-inline-start: 0;
|
|
155
|
-
width: auto;
|
|
156
|
-
border-left: 0;
|
|
157
|
-
box-shadow: none;
|
|
158
|
-
}
|
|
159
|
-
}
|
|
@@ -1,99 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* A message written in place: the field and its footer strip in one box. The
|
|
3
|
-
* BOX takes the focus ring every field in the package draws (see Input.css):
|
|
4
|
-
* an outline over its boundary, 2px for the keyboard and the hairline for a
|
|
5
|
-
* pointer, so the field inside draws no border or outline of its own and the
|
|
6
|
-
* footer reads as part of what is being written. It used to recolour the
|
|
7
|
-
* border to the accent AND lay a 2px soft halo outside it: two highlights for
|
|
8
|
-
* one state, and the loudest edge on a page whose field was focused on load.
|
|
9
|
-
*/
|
|
10
|
-
.crewlet-composer {
|
|
11
|
-
display: grid;
|
|
12
|
-
overflow: hidden;
|
|
13
|
-
border: 1px solid var(--color-border-strong);
|
|
14
|
-
border-radius: var(--radius-md);
|
|
15
|
-
background: var(--color-surface-background);
|
|
16
|
-
transition: border-color var(--motion-duration-fast) var(--motion-easing-default);
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
.crewlet-composer:hover {
|
|
20
|
-
border-color: var(--color-border-strong-hover);
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
/* Keyed on the FIELD, not :focus-within: the footer holds the send action,
|
|
24
|
-
and a reader tabbing onto it is shown that button's ring, not the box's. */
|
|
25
|
-
.crewlet-composer:has(.crewlet-composer__field:focus-visible) {
|
|
26
|
-
outline: 2px solid var(--color-focus);
|
|
27
|
-
outline-offset: -1px;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
:where(:root[data-crewlet-focus='pointer']) .crewlet-composer:has(.crewlet-composer__field:focus-visible) {
|
|
31
|
-
outline-width: 1px;
|
|
32
|
-
outline-color: var(--color-border-selected);
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
.crewlet-composer .crewlet-composer__field {
|
|
36
|
-
min-height: 68px;
|
|
37
|
-
max-height: 220px;
|
|
38
|
-
padding: var(--spacing-2) var(--spacing-3);
|
|
39
|
-
border: 0;
|
|
40
|
-
border-radius: 0;
|
|
41
|
-
background: transparent;
|
|
42
|
-
resize: none;
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
/* The ring is the box's, above, so the field inside never draws one: left to
|
|
46
|
-
the textarea's own rule it would be a second ring inside the box's, and in
|
|
47
|
-
forced colours the box's outline is the one the system repaints. Stated on
|
|
48
|
-
the field at rest, at a weight the textarea's focus rule cannot outrank. */
|
|
49
|
-
.crewlet-composer .crewlet-composer__field.crewlet-textarea {
|
|
50
|
-
outline: none;
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
/* Past its cap the field scrolls rather than pushing the page. */
|
|
54
|
-
.crewlet-composer .crewlet-composer__field.is-auto-resize {
|
|
55
|
-
overflow-y: auto;
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
.crewlet-composer__footer {
|
|
59
|
-
display: flex;
|
|
60
|
-
flex-wrap: wrap;
|
|
61
|
-
align-items: center;
|
|
62
|
-
gap: var(--spacing-2);
|
|
63
|
-
padding: var(--spacing-1) var(--spacing-1) var(--spacing-1) var(--spacing-3);
|
|
64
|
-
border-top: 1px solid var(--color-border-default);
|
|
65
|
-
background: var(--color-surface-subtle);
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
.crewlet-composer__hint {
|
|
69
|
-
display: inline-flex;
|
|
70
|
-
align-items: center;
|
|
71
|
-
gap: var(--spacing-1);
|
|
72
|
-
font-size: var(--font-size-2xs);
|
|
73
|
-
color: var(--color-text-tertiary);
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
.crewlet-composer__counter {
|
|
77
|
-
font-family: var(--font-family-mono);
|
|
78
|
-
font-size: var(--font-size-2xs);
|
|
79
|
-
font-variant-numeric: tabular-nums;
|
|
80
|
-
color: var(--color-feedback-warning-ink);
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
.crewlet-composer__spacer {
|
|
84
|
-
flex: 1;
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
/* On a phone the hint goes, and a footer that held only the hint goes with it. */
|
|
88
|
-
@media (width < 640px) {
|
|
89
|
-
.crewlet-composer__hint,
|
|
90
|
-
.crewlet-composer__footer[data-hint-only] {
|
|
91
|
-
display: none;
|
|
92
|
-
}
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
@media (prefers-reduced-motion: reduce) {
|
|
96
|
-
.crewlet-composer {
|
|
97
|
-
transition: none;
|
|
98
|
-
}
|
|
99
|
-
}
|
package/dist/chunk-FZVJDJFN.js
DELETED
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
import { Count } from './chunk-BHHIIK3M.js';
|
|
2
|
-
import { headingTag } from './chunk-PQADV6P6.js';
|
|
3
|
-
import { cx } from './chunk-ODEQTPFM.js';
|
|
4
|
-
import { ChevronDownGlyph } from '@crewlethq/icons/glyphs';
|
|
5
|
-
import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
|
|
6
|
-
|
|
7
|
-
function DisclosureAnatomy({
|
|
8
|
-
open,
|
|
9
|
-
onToggle,
|
|
10
|
-
title,
|
|
11
|
-
meta,
|
|
12
|
-
count,
|
|
13
|
-
mono = false,
|
|
14
|
-
actions,
|
|
15
|
-
disabled = false,
|
|
16
|
-
headingLevel,
|
|
17
|
-
triggerId,
|
|
18
|
-
panelId,
|
|
19
|
-
triggerClassName,
|
|
20
|
-
onKeyDown
|
|
21
|
-
}) {
|
|
22
|
-
const trigger = /* @__PURE__ */ jsxs(
|
|
23
|
-
"button",
|
|
24
|
-
{
|
|
25
|
-
type: "button",
|
|
26
|
-
id: triggerId,
|
|
27
|
-
className: cx("crewlet-disclosure__trigger", triggerClassName),
|
|
28
|
-
"aria-expanded": open,
|
|
29
|
-
"aria-controls": panelId,
|
|
30
|
-
disabled,
|
|
31
|
-
onClick: onToggle,
|
|
32
|
-
onKeyDown,
|
|
33
|
-
children: [
|
|
34
|
-
/* @__PURE__ */ jsx(ChevronDownGlyph, { className: "crewlet-disclosure__chevron", size: "sm" }),
|
|
35
|
-
/* @__PURE__ */ jsx("span", { className: cx("crewlet-disclosure__title", mono && "crewlet-disclosure__title--mono"), children: title }),
|
|
36
|
-
meta === void 0 ? null : /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
37
|
-
" ",
|
|
38
|
-
/* @__PURE__ */ jsx("span", { className: "crewlet-disclosure__meta", children: meta })
|
|
39
|
-
] }),
|
|
40
|
-
count === void 0 ? null : /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
41
|
-
" ",
|
|
42
|
-
/* @__PURE__ */ jsx(Count, { value: count })
|
|
43
|
-
] })
|
|
44
|
-
]
|
|
45
|
-
}
|
|
46
|
-
);
|
|
47
|
-
const Heading = headingLevel === "none" ? null : headingTag(headingLevel);
|
|
48
|
-
return /* @__PURE__ */ jsxs("div", { className: "crewlet-disclosure__bar", children: [
|
|
49
|
-
Heading === null ? trigger : /* @__PURE__ */ jsx(Heading, { className: "crewlet-disclosure__heading", children: trigger }),
|
|
50
|
-
actions === void 0 ? null : /* @__PURE__ */ jsx("div", { className: "crewlet-disclosure__actions", children: actions })
|
|
51
|
-
] });
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
export { DisclosureAnatomy };
|
package/dist/chunk-IXJHTFXG.js
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { cx } from './chunk-ODEQTPFM.js';
|
|
2
|
-
import './IconTile-4GNWTLAW.css';
|
|
3
|
-
import { jsx } from 'react/jsx-runtime';
|
|
4
|
-
|
|
5
|
-
function IconTile({ children, hue, size = "md", className, ...rest }) {
|
|
6
|
-
return /* @__PURE__ */ jsx(
|
|
7
|
-
"span",
|
|
8
|
-
{
|
|
9
|
-
"aria-hidden": "true",
|
|
10
|
-
...rest,
|
|
11
|
-
className: cx("crewlet-icon-tile", `crewlet-icon-tile--${size}`, hue && `crewlet-icon-tile--${hue}`, className),
|
|
12
|
-
children
|
|
13
|
-
}
|
|
14
|
-
);
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
export { IconTile };
|
package/dist/chunk-NBDN5JZV.js
DELETED
|
@@ -1,123 +0,0 @@
|
|
|
1
|
-
import { HeadingLevelProvider } from './chunk-PQADV6P6.js';
|
|
2
|
-
import { IconButton } from './chunk-LACA4JGC.js';
|
|
3
|
-
import { cx } from './chunk-ODEQTPFM.js';
|
|
4
|
-
import './ArtifactPanel-KKUUIPEU.css';
|
|
5
|
-
import { useId, useRef, useLayoutEffect, useEffect } from 'react';
|
|
6
|
-
import { MinimizeGlyph, MaximizeGlyph, XGlyph } from '@crewlethq/icons/glyphs';
|
|
7
|
-
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
8
|
-
|
|
9
|
-
var ARTIFACT_PANEL_LABELS = {
|
|
10
|
-
close: (title) => `Close ${title.toLowerCase()}`,
|
|
11
|
-
expand: "Expand to the full view",
|
|
12
|
-
collapse: "Back to the side"
|
|
13
|
-
};
|
|
14
|
-
function ArtifactPanel({
|
|
15
|
-
title,
|
|
16
|
-
icon,
|
|
17
|
-
onClose,
|
|
18
|
-
size = "md",
|
|
19
|
-
expanded = false,
|
|
20
|
-
onExpandedChange,
|
|
21
|
-
actions,
|
|
22
|
-
footer,
|
|
23
|
-
focusOnOpen = true,
|
|
24
|
-
labels,
|
|
25
|
-
className,
|
|
26
|
-
children
|
|
27
|
-
}) {
|
|
28
|
-
const words = { ...ARTIFACT_PANEL_LABELS, ...labels };
|
|
29
|
-
const titleId = useId();
|
|
30
|
-
const root = useRef(null);
|
|
31
|
-
const heading = useRef(null);
|
|
32
|
-
const before = useRef(null);
|
|
33
|
-
const focusing = useRef(focusOnOpen);
|
|
34
|
-
useLayoutEffect(() => {
|
|
35
|
-
const panel = root.current;
|
|
36
|
-
before.current = document.activeElement;
|
|
37
|
-
if (focusing.current) heading.current?.focus({ preventScroll: true });
|
|
38
|
-
return () => {
|
|
39
|
-
const back = before.current;
|
|
40
|
-
if (panel?.contains(document.activeElement) && back instanceof HTMLElement && back.isConnected) {
|
|
41
|
-
back.focus({ preventScroll: true });
|
|
42
|
-
}
|
|
43
|
-
};
|
|
44
|
-
}, []);
|
|
45
|
-
const close = useRef(onClose);
|
|
46
|
-
close.current = onClose;
|
|
47
|
-
useEffect(() => {
|
|
48
|
-
const panel = root.current;
|
|
49
|
-
if (!panel) return void 0;
|
|
50
|
-
const doc = panel.ownerDocument;
|
|
51
|
-
const onKeyDown = (event) => {
|
|
52
|
-
if (event.key !== "Escape" || event.defaultPrevented || event.isComposing) return;
|
|
53
|
-
if (!(event.target instanceof Node) || !panel.contains(event.target)) return;
|
|
54
|
-
event.preventDefault();
|
|
55
|
-
close.current();
|
|
56
|
-
};
|
|
57
|
-
doc.addEventListener("keydown", onKeyDown);
|
|
58
|
-
return () => doc.removeEventListener("keydown", onKeyDown);
|
|
59
|
-
}, []);
|
|
60
|
-
return /* @__PURE__ */ jsxs(
|
|
61
|
-
"aside",
|
|
62
|
-
{
|
|
63
|
-
ref: root,
|
|
64
|
-
className: cx("crewlet-artifact-panel", `crewlet-artifact-panel--${size}`, className),
|
|
65
|
-
"aria-labelledby": titleId,
|
|
66
|
-
"data-expanded": expanded || void 0,
|
|
67
|
-
children: [
|
|
68
|
-
/* @__PURE__ */ jsxs("div", { className: "crewlet-artifact-panel__head", children: [
|
|
69
|
-
icon ? /* @__PURE__ */ jsx("span", { className: "crewlet-artifact-panel__icon", "aria-hidden": true, children: icon }) : null,
|
|
70
|
-
/* @__PURE__ */ jsx("h2", { ref: heading, id: titleId, className: "crewlet-artifact-panel__title", tabIndex: -1, children: title }),
|
|
71
|
-
/* @__PURE__ */ jsxs("span", { className: "crewlet-artifact-panel__actions", children: [
|
|
72
|
-
actions,
|
|
73
|
-
onExpandedChange ? /* @__PURE__ */ jsx(
|
|
74
|
-
IconButton,
|
|
75
|
-
{
|
|
76
|
-
label: expanded ? words.collapse : words.expand,
|
|
77
|
-
icon: expanded ? /* @__PURE__ */ jsx(MinimizeGlyph, { size: "sm" }) : /* @__PURE__ */ jsx(MaximizeGlyph, { size: "sm" }),
|
|
78
|
-
size: "sm",
|
|
79
|
-
variant: "ghost",
|
|
80
|
-
onClick: () => onExpandedChange(!expanded)
|
|
81
|
-
}
|
|
82
|
-
) : null,
|
|
83
|
-
/* @__PURE__ */ jsx(IconButton, { label: words.close(title), icon: /* @__PURE__ */ jsx(XGlyph, { size: "sm" }), size: "sm", variant: "ghost", onClick: onClose })
|
|
84
|
-
] })
|
|
85
|
-
] }),
|
|
86
|
-
/* @__PURE__ */ jsx("div", { className: "crewlet-artifact-panel__body", children: /* @__PURE__ */ jsx(HeadingLevelProvider, { level: 3, children }) }),
|
|
87
|
-
footer ? /* @__PURE__ */ jsx("div", { className: "crewlet-artifact-panel__foot", children: footer }) : null
|
|
88
|
-
]
|
|
89
|
-
}
|
|
90
|
-
);
|
|
91
|
-
}
|
|
92
|
-
function ArtifactWorkspace({
|
|
93
|
-
panel,
|
|
94
|
-
expanded = false,
|
|
95
|
-
bodyRef,
|
|
96
|
-
bodyClassName,
|
|
97
|
-
bodyLabel,
|
|
98
|
-
className,
|
|
99
|
-
children
|
|
100
|
-
}) {
|
|
101
|
-
return /* @__PURE__ */ jsxs(
|
|
102
|
-
"div",
|
|
103
|
-
{
|
|
104
|
-
className: cx("crewlet-artifact-workspace", className),
|
|
105
|
-
"data-panel": panel ? expanded ? "expanded" : "open" : void 0,
|
|
106
|
-
children: [
|
|
107
|
-
/* @__PURE__ */ jsx(
|
|
108
|
-
"div",
|
|
109
|
-
{
|
|
110
|
-
ref: bodyRef,
|
|
111
|
-
className: cx("crewlet-artifact-workspace__body", bodyClassName),
|
|
112
|
-
role: bodyLabel ? "region" : void 0,
|
|
113
|
-
"aria-label": bodyLabel,
|
|
114
|
-
children
|
|
115
|
-
}
|
|
116
|
-
),
|
|
117
|
-
panel
|
|
118
|
-
]
|
|
119
|
-
}
|
|
120
|
-
);
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
export { ARTIFACT_PANEL_LABELS, ArtifactPanel, ArtifactWorkspace };
|
package/dist/chunk-UJ4VVK7R.js
DELETED
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
import { Kbd } from './chunk-SMBKXWML.js';
|
|
2
|
-
import { Textarea } from './chunk-LJHH4WWB.js';
|
|
3
|
-
import { cx } from './chunk-ODEQTPFM.js';
|
|
4
|
-
import './Composer-TXULCPPV.css';
|
|
5
|
-
import { forwardRef } from 'react';
|
|
6
|
-
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
7
|
-
|
|
8
|
-
var COMPOSER_COUNTER_AT = 0.8;
|
|
9
|
-
var Composer = forwardRef(function Composer2({ value, onChange, onSubmit, label, actions, maxLength, className, rows = 3, onKeyDown, ...rest }, ref) {
|
|
10
|
-
const near = maxLength !== void 0 && value.length >= maxLength * COMPOSER_COUNTER_AT;
|
|
11
|
-
const hasActions = actions !== void 0 && actions !== null && actions !== false;
|
|
12
|
-
const keyDown = (event) => {
|
|
13
|
-
onKeyDown?.(event);
|
|
14
|
-
if (event.defaultPrevented || !onSubmit) return;
|
|
15
|
-
if (event.key === "Enter" && (event.metaKey || event.ctrlKey)) {
|
|
16
|
-
event.preventDefault();
|
|
17
|
-
onSubmit();
|
|
18
|
-
}
|
|
19
|
-
};
|
|
20
|
-
return /* @__PURE__ */ jsxs("div", { className: cx("crewlet-composer", className), children: [
|
|
21
|
-
/* @__PURE__ */ jsx(
|
|
22
|
-
Textarea,
|
|
23
|
-
{
|
|
24
|
-
ref,
|
|
25
|
-
className: "crewlet-composer__field",
|
|
26
|
-
"aria-label": label,
|
|
27
|
-
value,
|
|
28
|
-
onChange: (event) => onChange(event.target.value),
|
|
29
|
-
onKeyDown: keyDown,
|
|
30
|
-
maxLength,
|
|
31
|
-
rows,
|
|
32
|
-
autoResize: true,
|
|
33
|
-
...rest
|
|
34
|
-
}
|
|
35
|
-
),
|
|
36
|
-
onSubmit || near || hasActions ? /* @__PURE__ */ jsxs("div", { className: "crewlet-composer__footer", "data-hint-only": !near && !hasActions || void 0, children: [
|
|
37
|
-
onSubmit ? /* @__PURE__ */ jsxs("span", { className: "crewlet-composer__hint", children: [
|
|
38
|
-
/* @__PURE__ */ jsx(Kbd, { keys: ["Mod", "Enter"], subtle: true }),
|
|
39
|
-
" to send"
|
|
40
|
-
] }) : null,
|
|
41
|
-
near ? /* @__PURE__ */ jsx("span", { className: "crewlet-composer__counter", "aria-live": "polite", children: `${value.length.toLocaleString()} / ${maxLength.toLocaleString()}` }) : null,
|
|
42
|
-
/* @__PURE__ */ jsx("span", { className: "crewlet-composer__spacer" }),
|
|
43
|
-
actions
|
|
44
|
-
] }) : null
|
|
45
|
-
] });
|
|
46
|
-
});
|
|
47
|
-
|
|
48
|
-
export { COMPOSER_COUNTER_AT, Composer };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ThemeSwatch } from './chunk-MNFU2RNT.js';
|
|
2
|
-
import { Tag } from './chunk-KYIAFNU7.js';
|
|
3
2
|
import { useHighlightRest } from './chunk-7KHM2FZH.js';
|
|
3
|
+
import { Tag } from './chunk-KYIAFNU7.js';
|
|
4
4
|
import { useRoving, tabStop } from './chunk-EGMQURBR.js';
|
|
5
5
|
import { cx } from './chunk-ODEQTPFM.js';
|
|
6
6
|
import './ThemeGallery-UEFZRT6W.css';
|
|
File without changes
|