@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
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
import { StatusDot } from './chunk-WIATRXEJ.js';
|
|
2
|
+
import { Spinner } from './chunk-EA23JG6R.js';
|
|
2
3
|
import { VisuallyHidden } from './chunk-BZFWDIV6.js';
|
|
3
4
|
import { cx } from './chunk-ODEQTPFM.js';
|
|
4
5
|
import './Stepper-QEJI5RGX.css';
|
|
5
|
-
import
|
|
6
|
+
import './StepList-A4YVU4JI.css';
|
|
7
|
+
import { CircleCheckGlyph, CircleAlertGlyph, LockGlyph, CircleStopGlyph, ClockGlyph, CheckGlyph, TriangleAlertGlyph } from '@crewlethq/icons/glyphs';
|
|
6
8
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
9
|
+
import { Fragment as Fragment$1 } from 'react';
|
|
7
10
|
|
|
8
11
|
function Stepper({
|
|
9
12
|
steps,
|
|
@@ -125,5 +128,64 @@ function Stepper({
|
|
|
125
128
|
)
|
|
126
129
|
);
|
|
127
130
|
}
|
|
131
|
+
var STEP_STATES = ["running", "done", "failed", "refused", "stopped", "waiting"];
|
|
132
|
+
var STEP_STATE_LABELS = {
|
|
133
|
+
running: "Running",
|
|
134
|
+
done: "Done",
|
|
135
|
+
failed: "Failed",
|
|
136
|
+
refused: "Not permitted",
|
|
137
|
+
stopped: "Stopped",
|
|
138
|
+
waiting: "Waiting for your approval"
|
|
139
|
+
};
|
|
140
|
+
function StepStateMark({ state, className }) {
|
|
141
|
+
return /* @__PURE__ */ jsx("span", { className: cx("crewlet-step-mark", `crewlet-step-mark--${state}`, className), "aria-hidden": "true", children: state === "running" ? /* @__PURE__ */ jsx(Spinner, { size: "sm" }) : state === "done" ? /* @__PURE__ */ jsx(CircleCheckGlyph, { size: "sm" }) : state === "failed" ? /* @__PURE__ */ jsx(CircleAlertGlyph, { size: "sm" }) : state === "refused" ? /* @__PURE__ */ jsx(LockGlyph, { size: "sm" }) : state === "stopped" ? /* @__PURE__ */ jsx(CircleStopGlyph, { size: "sm" }) : /* @__PURE__ */ jsx(ClockGlyph, { size: "sm" }) });
|
|
142
|
+
}
|
|
143
|
+
function stepDetailPieces(text) {
|
|
144
|
+
const pieces = [];
|
|
145
|
+
let piece = "";
|
|
146
|
+
for (const character of text) {
|
|
147
|
+
if (character === " ") {
|
|
148
|
+
if (piece) pieces.push(piece);
|
|
149
|
+
pieces.push(" ");
|
|
150
|
+
piece = "";
|
|
151
|
+
continue;
|
|
152
|
+
}
|
|
153
|
+
piece += character;
|
|
154
|
+
if (character === "/" || character === "?" || character === "&") {
|
|
155
|
+
pieces.push(piece);
|
|
156
|
+
piece = "";
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
if (piece) pieces.push(piece);
|
|
160
|
+
return pieces;
|
|
161
|
+
}
|
|
162
|
+
function Detail({ children }) {
|
|
163
|
+
if (typeof children !== "string") return /* @__PURE__ */ jsx(Fragment, { children });
|
|
164
|
+
return /* @__PURE__ */ jsx(Fragment, { children: stepDetailPieces(children).map(
|
|
165
|
+
(piece, index) => piece === " " ? /* @__PURE__ */ jsx(Fragment$1, { children: " " }, index) : /* @__PURE__ */ jsx("span", { className: "crewlet-step-list__piece", children: piece }, index)
|
|
166
|
+
) });
|
|
167
|
+
}
|
|
168
|
+
function StepList({ steps, label, summary, labels: overrides, className, ...rest }) {
|
|
169
|
+
const labels = overrides ? { ...STEP_STATE_LABELS, ...overrides } : STEP_STATE_LABELS;
|
|
170
|
+
const seen = /* @__PURE__ */ new Set();
|
|
171
|
+
for (const step of steps) {
|
|
172
|
+
if (seen.has(step.id)) throw new RangeError(`StepList step ids must be unique; "${step.id}" is used twice`);
|
|
173
|
+
seen.add(step.id);
|
|
174
|
+
}
|
|
175
|
+
return /* @__PURE__ */ jsxs("div", { ...rest, className: cx("crewlet-step-list", className), children: [
|
|
176
|
+
summary === void 0 ? null : /* @__PURE__ */ jsx("div", { className: "crewlet-step-list__summary", children: summary }),
|
|
177
|
+
/* @__PURE__ */ jsx("ol", { role: "list", "aria-label": label, className: "crewlet-step-list__steps", children: steps.map((step) => /* @__PURE__ */ jsxs("li", { className: cx("crewlet-step-list__step", `crewlet-step-list__step--${step.state}`), children: [
|
|
178
|
+
/* @__PURE__ */ jsx(StepStateMark, { state: step.state, className: "crewlet-step-list__mark" }),
|
|
179
|
+
/* @__PURE__ */ jsxs("span", { className: "crewlet-step-list__text", children: [
|
|
180
|
+
/* @__PURE__ */ jsxs("span", { className: "crewlet-step-list__label", children: [
|
|
181
|
+
step.label,
|
|
182
|
+
/* @__PURE__ */ jsx(VisuallyHidden, { children: `, ${labels[step.state]}` })
|
|
183
|
+
] }),
|
|
184
|
+
step.detail === void 0 ? null : /* @__PURE__ */ jsx("code", { className: "crewlet-step-list__detail", children: /* @__PURE__ */ jsx(Detail, { children: step.detail }) })
|
|
185
|
+
] }),
|
|
186
|
+
step.duration === void 0 ? null : /* @__PURE__ */ jsx("span", { className: "crewlet-step-list__duration", children: step.duration })
|
|
187
|
+
] }, step.id)) })
|
|
188
|
+
] });
|
|
189
|
+
}
|
|
128
190
|
|
|
129
|
-
export { Stepper };
|
|
191
|
+
export { STEP_STATES, STEP_STATE_LABELS, StepList, StepStateMark, Stepper, stepDetailPieces };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Stepper } from './chunk-
|
|
1
|
+
import { Stepper } from './chunk-CGT4R7LW.js';
|
|
2
2
|
import { PageHeader } from './chunk-DKB73KZI.js';
|
|
3
|
-
import { Disclosure } from './chunk-
|
|
3
|
+
import { Disclosure } from './chunk-GG4QZWMQ.js';
|
|
4
4
|
import { useHeadingLevel, nextHeadingLevel, headingTag, HeadingLevelProvider } from './chunk-PQADV6P6.js';
|
|
5
5
|
import { useMediaMatch } from './chunk-RTPQDNW3.js';
|
|
6
6
|
import { cx } from './chunk-ODEQTPFM.js';
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { useReorder } from './chunk-XJ2QEBMM.js';
|
|
2
2
|
import { Kbd } from './chunk-SMBKXWML.js';
|
|
3
|
-
import { FormField, Textarea } from './chunk-
|
|
3
|
+
import { FormField, Textarea } from './chunk-FXQLNETQ.js';
|
|
4
4
|
import { characterCountState, CharacterCount, countCharacters } from './chunk-XCUUI7E7.js';
|
|
5
5
|
import { announce } from './chunk-RSAQOKH3.js';
|
|
6
|
-
import { Button } from './chunk-
|
|
6
|
+
import { Button } from './chunk-HD4QJ2SI.js';
|
|
7
7
|
import { isComposing } from './chunk-H5XTJ7GJ.js';
|
|
8
|
-
import { IconButton } from './chunk-
|
|
8
|
+
import { IconButton } from './chunk-2BQYODY3.js';
|
|
9
9
|
import { cx } from './chunk-ODEQTPFM.js';
|
|
10
10
|
import './ListInput-RLQND5QK.css';
|
|
11
11
|
import { forwardRef, useState, useRef, useImperativeHandle, useLayoutEffect, useId } from 'react';
|
|
@@ -1,12 +1,23 @@
|
|
|
1
1
|
import { useLayerContainer } from './chunk-OMV5W53A.js';
|
|
2
2
|
import { VisuallyHidden } from './chunk-BZFWDIV6.js';
|
|
3
3
|
import { cx } from './chunk-ODEQTPFM.js';
|
|
4
|
-
import './Toaster-
|
|
4
|
+
import './Toaster-MX7TBMC3.css';
|
|
5
5
|
import { createContext, useMemo, useState, useRef, useEffect, useContext, useCallback } from 'react';
|
|
6
6
|
import { createPortal } from 'react-dom';
|
|
7
7
|
import { XGlyph, CircleAlertGlyph, TriangleAlertGlyph, CircleCheckGlyph, InfoGlyph } from '@crewlethq/icons/glyphs';
|
|
8
8
|
import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
|
|
9
9
|
|
|
10
|
+
function toasterInsetStyle(inset) {
|
|
11
|
+
if (!inset) return void 0;
|
|
12
|
+
const px = (value) => typeof value === "number" && Number.isFinite(value) && value > 0 ? value : 0;
|
|
13
|
+
const inline = px(inset.inline);
|
|
14
|
+
const block = px(inset.block);
|
|
15
|
+
if (inline === 0 && block === 0) return void 0;
|
|
16
|
+
return {
|
|
17
|
+
"--crewlet-toaster-inset-inline": `${inline}px`,
|
|
18
|
+
"--crewlet-toaster-inset-block": `${block}px`
|
|
19
|
+
};
|
|
20
|
+
}
|
|
10
21
|
var ICONS = {
|
|
11
22
|
info: /* @__PURE__ */ jsx(InfoGlyph, { size: "lg" }),
|
|
12
23
|
success: /* @__PURE__ */ jsx(CircleCheckGlyph, { size: "lg" }),
|
|
@@ -149,6 +160,7 @@ function Toaster({
|
|
|
149
160
|
onDismiss,
|
|
150
161
|
renderAction,
|
|
151
162
|
position = "bottom-right",
|
|
163
|
+
inset,
|
|
152
164
|
politeLabel = "Notifications",
|
|
153
165
|
assertiveLabel = "Alerts",
|
|
154
166
|
dismissLabel = "Dismiss notification",
|
|
@@ -189,7 +201,7 @@ function Toaster({
|
|
|
189
201
|
* they watch a region for changes, and a region's first appearance is not
|
|
190
202
|
* one.
|
|
191
203
|
*/
|
|
192
|
-
/* @__PURE__ */ jsxs("div", { className: cx("crewlet-toaster", `crewlet-toaster--${position}`, className), children: [
|
|
204
|
+
/* @__PURE__ */ jsxs("div", { className: cx("crewlet-toaster", `crewlet-toaster--${position}`, className), style: toasterInsetStyle(inset), children: [
|
|
193
205
|
toasts.map((toast) => /* @__PURE__ */ jsx(
|
|
194
206
|
ToastItem,
|
|
195
207
|
{
|
|
@@ -229,7 +241,7 @@ function admit(held, toast, max) {
|
|
|
229
241
|
);
|
|
230
242
|
return stack.filter((one) => !evicted.has(one));
|
|
231
243
|
}
|
|
232
|
-
function ToastProvider({ children, position = "bottom-right", renderAction, max = 4 }) {
|
|
244
|
+
function ToastProvider({ children, position = "bottom-right", inset, renderAction, max = 4 }) {
|
|
233
245
|
const [toasts, setToasts] = useState([]);
|
|
234
246
|
const next = useRef(1);
|
|
235
247
|
const dismiss = useCallback((id) => {
|
|
@@ -257,8 +269,8 @@ function ToastProvider({ children, position = "bottom-right", renderAction, max
|
|
|
257
269
|
);
|
|
258
270
|
return /* @__PURE__ */ jsxs(ToastContext.Provider, { value: api, children: [
|
|
259
271
|
children,
|
|
260
|
-
/* @__PURE__ */ jsx(Toaster, { toasts, onDismiss: dismiss, position, renderAction })
|
|
272
|
+
/* @__PURE__ */ jsx(Toaster, { toasts, onDismiss: dismiss, position, inset, renderAction })
|
|
261
273
|
] });
|
|
262
274
|
}
|
|
263
275
|
|
|
264
|
-
export { ToastProvider, Toaster, useToast };
|
|
276
|
+
export { ToastProvider, Toaster, toasterInsetStyle, useToast };
|
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
import { ReceiptStrip, RefusalStrip } from './chunk-XQI2OUV4.js';
|
|
2
|
+
import { StatusCard } from './chunk-WDIVALLP.js';
|
|
3
|
+
import { ChangeList } from './chunk-NEHSV55H.js';
|
|
4
|
+
import { Button } from './chunk-HD4QJ2SI.js';
|
|
5
|
+
import { Spinner } from './chunk-EA23JG6R.js';
|
|
6
|
+
import { cx } from './chunk-ODEQTPFM.js';
|
|
7
|
+
import './ProposalCard-HLB3FNLA.css';
|
|
8
|
+
import { RefreshCwGlyph, LockGlyph, BanGlyph, ClockGlyph, CircleAlertGlyph, CircleCheckGlyph } from '@crewlethq/icons/glyphs';
|
|
9
|
+
import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
|
|
10
|
+
|
|
11
|
+
var PROPOSAL_STATES = [
|
|
12
|
+
"pending",
|
|
13
|
+
"stepup",
|
|
14
|
+
"applying",
|
|
15
|
+
"applied",
|
|
16
|
+
"declined",
|
|
17
|
+
"expired",
|
|
18
|
+
"stale",
|
|
19
|
+
"failed"
|
|
20
|
+
];
|
|
21
|
+
var PROPOSAL_CARD_LABELS = {
|
|
22
|
+
needsApproval: "Needs your approval",
|
|
23
|
+
needsSignIn: "Needs sign-in",
|
|
24
|
+
applying: "Applying",
|
|
25
|
+
saving: "Saving",
|
|
26
|
+
applied: "Applied",
|
|
27
|
+
saved: "Saved",
|
|
28
|
+
declined: "Declined",
|
|
29
|
+
expired: "Expired",
|
|
30
|
+
stale: "Needs a fresh look",
|
|
31
|
+
notApplied: "Not applied",
|
|
32
|
+
decline: "Decline",
|
|
33
|
+
confirmIdentity: "Confirm it\u2019s you",
|
|
34
|
+
prepareAgain: "Prepare it again",
|
|
35
|
+
tryAgain: "Try again",
|
|
36
|
+
whatWillChange: "What will change",
|
|
37
|
+
whatWillBeCreated: "What will be created",
|
|
38
|
+
whatChanged: "What changed",
|
|
39
|
+
whatWasCreated: "What was created",
|
|
40
|
+
whatWasProposed: "What was proposed",
|
|
41
|
+
stepUpNotice: "This approval asks you to sign in again. Nothing changed yet.",
|
|
42
|
+
declinedNotice: "You declined this. Nothing changed.",
|
|
43
|
+
expiredNotice: "This proposal expired. Nothing changed.",
|
|
44
|
+
staleNotice: "What this would change moved after it was prepared, so it was not applied. Nothing changed.",
|
|
45
|
+
nothingChanged: "Nothing changed.",
|
|
46
|
+
busy: "The approved change is being carried out"
|
|
47
|
+
};
|
|
48
|
+
var SETTLED = /* @__PURE__ */ new Set(["applied", "declined", "expired", "stale", "failed"]);
|
|
49
|
+
function statusOf(state, scope, labels) {
|
|
50
|
+
switch (state) {
|
|
51
|
+
case "pending":
|
|
52
|
+
return { label: labels.needsApproval, tone: "warning", icon: /* @__PURE__ */ jsx(ClockGlyph, { size: "xs" }) };
|
|
53
|
+
case "stepup":
|
|
54
|
+
return { label: labels.needsSignIn, tone: "warning", icon: /* @__PURE__ */ jsx(LockGlyph, { size: "xs" }) };
|
|
55
|
+
case "applying":
|
|
56
|
+
return { label: scope === "page" ? labels.applying : labels.saving, tone: "neutral", icon: /* @__PURE__ */ jsx(Spinner, { size: "xs" }) };
|
|
57
|
+
case "applied":
|
|
58
|
+
return { label: scope === "page" ? labels.applied : labels.saved, tone: "success", icon: /* @__PURE__ */ jsx(CircleCheckGlyph, { size: "xs" }) };
|
|
59
|
+
case "declined":
|
|
60
|
+
return { label: labels.declined, tone: "neutral", icon: /* @__PURE__ */ jsx(BanGlyph, { size: "xs" }) };
|
|
61
|
+
case "expired":
|
|
62
|
+
return { label: labels.expired, tone: "neutral", icon: /* @__PURE__ */ jsx(ClockGlyph, { size: "xs" }) };
|
|
63
|
+
case "stale":
|
|
64
|
+
return { label: labels.stale, tone: "neutral", icon: /* @__PURE__ */ jsx(ClockGlyph, { size: "xs" }) };
|
|
65
|
+
case "failed":
|
|
66
|
+
return { label: labels.notApplied, tone: "danger", icon: /* @__PURE__ */ jsx(CircleAlertGlyph, { size: "xs" }) };
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
function headingOf(state, kind, labels) {
|
|
70
|
+
if (state === "applied") return kind === "create" ? labels.whatWasCreated : labels.whatChanged;
|
|
71
|
+
if (SETTLED.has(state)) return labels.whatWasProposed;
|
|
72
|
+
return kind === "create" ? labels.whatWillBeCreated : labels.whatWillChange;
|
|
73
|
+
}
|
|
74
|
+
function ProposalCard({
|
|
75
|
+
title,
|
|
76
|
+
subtitle,
|
|
77
|
+
state,
|
|
78
|
+
scope = "server",
|
|
79
|
+
kind = "change",
|
|
80
|
+
summary,
|
|
81
|
+
changes,
|
|
82
|
+
changesHeading,
|
|
83
|
+
note,
|
|
84
|
+
approveLabel,
|
|
85
|
+
onApprove,
|
|
86
|
+
onDecline,
|
|
87
|
+
onPrepareAgain,
|
|
88
|
+
onRetry,
|
|
89
|
+
receipt,
|
|
90
|
+
failure,
|
|
91
|
+
failureHint,
|
|
92
|
+
approveBlocked,
|
|
93
|
+
notice,
|
|
94
|
+
labels: overrides,
|
|
95
|
+
changeLabels,
|
|
96
|
+
diffLabels,
|
|
97
|
+
className,
|
|
98
|
+
...rest
|
|
99
|
+
}) {
|
|
100
|
+
const labels = overrides ? { ...PROPOSAL_CARD_LABELS, ...overrides } : PROPOSAL_CARD_LABELS;
|
|
101
|
+
const settled = SETTLED.has(state);
|
|
102
|
+
const blocked = (state === "pending" || state === "stepup") && approveBlocked ? approveBlocked : void 0;
|
|
103
|
+
const decision = state === "pending" || state === "stepup" || state === "applying" ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
104
|
+
blocked === void 0 ? null : /* @__PURE__ */ jsx("p", { className: "crewlet-proposal-card__blocked", "aria-hidden": "true", children: blocked }),
|
|
105
|
+
/* @__PURE__ */ jsx(
|
|
106
|
+
Button,
|
|
107
|
+
{
|
|
108
|
+
variant: "secondary",
|
|
109
|
+
onClick: onDecline,
|
|
110
|
+
disabledReason: state === "applying" ? labels.busy : void 0,
|
|
111
|
+
children: labels.decline
|
|
112
|
+
}
|
|
113
|
+
),
|
|
114
|
+
/* @__PURE__ */ jsx(Button, { variant: "primary", loading: state === "applying", disabledReason: blocked, onClick: onApprove, children: state === "stepup" ? labels.confirmIdentity : approveLabel })
|
|
115
|
+
] }) : void 0;
|
|
116
|
+
const again = (state === "expired" || state === "stale") && onPrepareAgain ? /* @__PURE__ */ jsx(Button, { variant: "secondary", size: "small", leadingIcon: /* @__PURE__ */ jsx(RefreshCwGlyph, {}), onClick: onPrepareAgain, children: labels.prepareAgain }) : void 0;
|
|
117
|
+
const strip = state === "stepup" ? /* @__PURE__ */ jsx(ReceiptStrip, { tone: "neutral", icon: /* @__PURE__ */ jsx(LockGlyph, { size: "md" }), children: notice ?? labels.stepUpNotice }) : state === "applied" && receipt !== void 0 ? /* @__PURE__ */ jsx(ReceiptStrip, { tone: "success", children: receipt }) : state === "declined" ? /* @__PURE__ */ jsx(ReceiptStrip, { tone: "neutral", icon: /* @__PURE__ */ jsx(BanGlyph, { size: "md" }), children: notice ?? labels.declinedNotice }) : state === "expired" ? /* @__PURE__ */ jsx(ReceiptStrip, { tone: "neutral", icon: /* @__PURE__ */ jsx(ClockGlyph, { size: "md" }), children: notice ?? labels.expiredNotice }) : state === "stale" ? /* @__PURE__ */ jsx(ReceiptStrip, { tone: "neutral", icon: /* @__PURE__ */ jsx(ClockGlyph, { size: "md" }), children: notice ?? labels.staleNotice }) : state === "failed" ? /* @__PURE__ */ jsx(
|
|
118
|
+
RefusalStrip,
|
|
119
|
+
{
|
|
120
|
+
placement: "foot",
|
|
121
|
+
hint: failure === void 0 ? void 0 : failureHint,
|
|
122
|
+
onRetry,
|
|
123
|
+
labels: { retry: labels.tryAgain },
|
|
124
|
+
children: failure === void 0 ? labels.nothingChanged : /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
125
|
+
failure,
|
|
126
|
+
" ",
|
|
127
|
+
labels.nothingChanged
|
|
128
|
+
] })
|
|
129
|
+
}
|
|
130
|
+
) : void 0;
|
|
131
|
+
return /* @__PURE__ */ jsxs(
|
|
132
|
+
StatusCard,
|
|
133
|
+
{
|
|
134
|
+
...rest,
|
|
135
|
+
title,
|
|
136
|
+
subtitle,
|
|
137
|
+
status: statusOf(state, scope, labels),
|
|
138
|
+
settled,
|
|
139
|
+
strip,
|
|
140
|
+
actions: decision ?? again,
|
|
141
|
+
actionsAlign: decision ? "end" : "start",
|
|
142
|
+
className: cx("crewlet-proposal-card", `crewlet-proposal-card--${state}`, className),
|
|
143
|
+
"data-state": state,
|
|
144
|
+
children: [
|
|
145
|
+
summary === void 0 || summary === null ? null : /* @__PURE__ */ jsx("p", { className: "crewlet-proposal-card__summary", children: summary }),
|
|
146
|
+
/* @__PURE__ */ jsx(
|
|
147
|
+
ChangeList,
|
|
148
|
+
{
|
|
149
|
+
rows: changes,
|
|
150
|
+
heading: changesHeading ?? headingOf(state, kind, labels),
|
|
151
|
+
settled,
|
|
152
|
+
labels: changeLabels,
|
|
153
|
+
diffLabels
|
|
154
|
+
}
|
|
155
|
+
),
|
|
156
|
+
note === void 0 || note === null ? null : /* @__PURE__ */ jsx("p", { className: "crewlet-proposal-card__note", children: note })
|
|
157
|
+
]
|
|
158
|
+
}
|
|
159
|
+
);
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
export { PROPOSAL_CARD_LABELS, PROPOSAL_STATES, ProposalCard };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { cx } from './chunk-ODEQTPFM.js';
|
|
2
|
+
import './Spinner-XZ2TVYE5.css';
|
|
3
|
+
import { jsx } from 'react/jsx-runtime';
|
|
4
|
+
|
|
5
|
+
function Spinner({ size = "em", className, ...rest }) {
|
|
6
|
+
return /* @__PURE__ */ jsx("span", { ...rest, "aria-hidden": "true", className: cx("crewlet-spinner", `crewlet-spinner--${size}`, className) });
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export { Spinner };
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { Select } from './chunk-XQZ6EWOE.js';
|
|
2
2
|
import { SHEET_LABELS, SHEET_COLUMN_TYPES, optionHue, retypeColumn } from './chunk-LFSIKGRQ.js';
|
|
3
|
-
import { HueSwatch } from './chunk-
|
|
3
|
+
import { HueSwatch } from './chunk-OYAXKHVW.js';
|
|
4
4
|
import { NODE_HUES, NODE_HUE_NAMES } from './chunk-AYKXMIOR.js';
|
|
5
|
-
import { Checkbox } from './chunk-
|
|
5
|
+
import { Checkbox } from './chunk-NHJQXDHA.js';
|
|
6
6
|
import { Kbd } from './chunk-SMBKXWML.js';
|
|
7
|
-
import { FormField, Input } from './chunk-
|
|
8
|
-
import { Menu } from './chunk-
|
|
9
|
-
import { Button } from './chunk-
|
|
10
|
-
import { IconButton } from './chunk-
|
|
7
|
+
import { FormField, Input } from './chunk-FXQLNETQ.js';
|
|
8
|
+
import { Menu } from './chunk-TKS7FTTO.js';
|
|
9
|
+
import { Button } from './chunk-HD4QJ2SI.js';
|
|
10
|
+
import { IconButton } from './chunk-2BQYODY3.js';
|
|
11
11
|
import { VisuallyHidden } from './chunk-BZFWDIV6.js';
|
|
12
12
|
import { cx } from './chunk-ODEQTPFM.js';
|
|
13
13
|
import './SheetColumnEditor-BO2HKFRB.css';
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { Checkbox } from './chunk-
|
|
1
|
+
import { Checkbox } from './chunk-NHJQXDHA.js';
|
|
2
2
|
import { EmptyState } from './chunk-PPUR46MK.js';
|
|
3
3
|
import { useMediaMatch } from './chunk-RTPQDNW3.js';
|
|
4
|
-
import { Button } from './chunk-
|
|
4
|
+
import { Button } from './chunk-HD4QJ2SI.js';
|
|
5
5
|
import { VisuallyHidden } from './chunk-BZFWDIV6.js';
|
|
6
6
|
import { cx } from './chunk-ODEQTPFM.js';
|
|
7
7
|
import './DataGrid-VNGQESJA.css';
|
|
8
|
-
import { useId, useRef, useState, useMemo, useCallback, useLayoutEffect, useImperativeHandle } from 'react';
|
|
8
|
+
import { useId, useRef, useState, useMemo, useCallback, useLayoutEffect, useImperativeHandle, useSyncExternalStore, useEffect } from 'react';
|
|
9
9
|
import { breakpoint } from '@crewlethq/tokens';
|
|
10
10
|
import { ChevronDownGlyph, ChevronUpGlyph } from '@crewlethq/icons/glyphs';
|
|
11
11
|
import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
|
|
@@ -279,9 +279,9 @@ function DataGrid({
|
|
|
279
279
|
const [boxWidth, setBoxWidth] = useState(0);
|
|
280
280
|
useLayoutEffect(() => {
|
|
281
281
|
if (!wrap || typeof ResizeObserver !== "function") return;
|
|
282
|
-
const
|
|
283
|
-
|
|
284
|
-
return () =>
|
|
282
|
+
const watch2 = new ResizeObserver(() => setBoxWidth(wrap.clientWidth));
|
|
283
|
+
watch2.observe(wrap);
|
|
284
|
+
return () => watch2.disconnect();
|
|
285
285
|
}, [wrap]);
|
|
286
286
|
useLayoutEffect(() => {
|
|
287
287
|
const el = wrap;
|
|
@@ -482,5 +482,55 @@ function DataGrid({
|
|
|
482
482
|
}
|
|
483
483
|
);
|
|
484
484
|
}
|
|
485
|
+
var drivable = [];
|
|
486
|
+
var touched = null;
|
|
487
|
+
var revision = 0;
|
|
488
|
+
var watchers = /* @__PURE__ */ new Set();
|
|
489
|
+
function announce() {
|
|
490
|
+
revision += 1;
|
|
491
|
+
for (const watcher of watchers) watcher();
|
|
492
|
+
}
|
|
493
|
+
function watch(watcher) {
|
|
494
|
+
watchers.add(watcher);
|
|
495
|
+
return () => {
|
|
496
|
+
watchers.delete(watcher);
|
|
497
|
+
};
|
|
498
|
+
}
|
|
499
|
+
function current() {
|
|
500
|
+
return revision;
|
|
501
|
+
}
|
|
502
|
+
function isDriving(id) {
|
|
503
|
+
if (touched !== null) return touched === id;
|
|
504
|
+
return drivable[0] === id;
|
|
505
|
+
}
|
|
506
|
+
function countDataGridRows(rows, bands) {
|
|
507
|
+
const inBand = (band) => band.bands ? band.bands.reduce((n, sub) => n + inBand(sub), 0) : band.rows.length;
|
|
508
|
+
return bands ? bands.reduce((n, band) => n + inBand(band), 0) : rows?.length ?? 0;
|
|
509
|
+
}
|
|
510
|
+
function useDataGridDriving(drivableNow) {
|
|
511
|
+
const id = useId();
|
|
512
|
+
useSyncExternalStore(watch, current, current);
|
|
513
|
+
useEffect(() => {
|
|
514
|
+
if (!drivableNow) return void 0;
|
|
515
|
+
drivable.push(id);
|
|
516
|
+
announce();
|
|
517
|
+
return () => {
|
|
518
|
+
const at = drivable.indexOf(id);
|
|
519
|
+
if (at >= 0) drivable.splice(at, 1);
|
|
520
|
+
if (touched === id) touched = null;
|
|
521
|
+
announce();
|
|
522
|
+
};
|
|
523
|
+
}, [id, drivableNow]);
|
|
524
|
+
const claim = useCallback(() => {
|
|
525
|
+
if (touched === id) return;
|
|
526
|
+
touched = id;
|
|
527
|
+
announce();
|
|
528
|
+
}, [id]);
|
|
529
|
+
return { driving: drivableNow && isDriving(id), claim };
|
|
530
|
+
}
|
|
531
|
+
function useAnyDataGridDriving() {
|
|
532
|
+
useSyncExternalStore(watch, current, current);
|
|
533
|
+
return drivable.length > 0;
|
|
534
|
+
}
|
|
485
535
|
|
|
486
|
-
export { ChooserList, ColumnChooser, DataGrid, columnChoicesOf, fitGridColumns, parseGridSort };
|
|
536
|
+
export { ChooserList, ColumnChooser, DataGrid, columnChoicesOf, countDataGridRows, fitGridColumns, parseGridSort, useAnyDataGridDriving, useDataGridDriving };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { SlideNav } from './chunk-
|
|
1
|
+
import { SlideNav } from './chunk-OHBXOEP3.js';
|
|
2
2
|
import { SlideStage, SLIDE_WIDTH, SLIDE_HEIGHT } from './chunk-RMEBFYL7.js';
|
|
3
3
|
import { Eyebrow } from './chunk-RK4XPHVG.js';
|
|
4
|
-
import { Button } from './chunk-
|
|
4
|
+
import { Button } from './chunk-HD4QJ2SI.js';
|
|
5
5
|
import { cx } from './chunk-ODEQTPFM.js';
|
|
6
6
|
import './PresenterView-T3EXIQ5S.css';
|
|
7
7
|
import { useRef, useState, useEffect } from 'react';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useClipboard } from './chunk-STJ7QBC3.js';
|
|
2
|
-
import { Button } from './chunk-
|
|
3
|
-
import { IconButton } from './chunk-
|
|
2
|
+
import { Button } from './chunk-HD4QJ2SI.js';
|
|
3
|
+
import { IconButton } from './chunk-2BQYODY3.js';
|
|
4
4
|
import { VisuallyHidden } from './chunk-BZFWDIV6.js';
|
|
5
5
|
import { cx } from './chunk-ODEQTPFM.js';
|
|
6
6
|
import './Copyable-5PNRFOLS.css';
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
import { StepStateMark } from './chunk-CGT4R7LW.js';
|
|
2
|
+
import { DisclosureAnatomy } from './chunk-TFGCNBWP.js';
|
|
3
|
+
import { VisuallyHidden } from './chunk-BZFWDIV6.js';
|
|
4
|
+
import { cx } from './chunk-ODEQTPFM.js';
|
|
5
|
+
import './RunChip-I2S4VZ3R.css';
|
|
6
|
+
import { useState, useRef, useEffect, useId } from 'react';
|
|
7
|
+
import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
|
|
8
|
+
|
|
9
|
+
var RUN_STATES = [
|
|
10
|
+
"thinking",
|
|
11
|
+
"working",
|
|
12
|
+
"done",
|
|
13
|
+
"waiting",
|
|
14
|
+
"applying",
|
|
15
|
+
"stopped",
|
|
16
|
+
"failed",
|
|
17
|
+
"refused"
|
|
18
|
+
];
|
|
19
|
+
var ACTIVE = /* @__PURE__ */ new Set(["thinking", "working", "applying"]);
|
|
20
|
+
var MARK = {
|
|
21
|
+
thinking: "running",
|
|
22
|
+
working: "running",
|
|
23
|
+
applying: "running",
|
|
24
|
+
done: "done",
|
|
25
|
+
waiting: "waiting",
|
|
26
|
+
stopped: "stopped",
|
|
27
|
+
failed: "failed",
|
|
28
|
+
refused: "refused"
|
|
29
|
+
};
|
|
30
|
+
function RunChip({
|
|
31
|
+
state,
|
|
32
|
+
title,
|
|
33
|
+
meta,
|
|
34
|
+
children,
|
|
35
|
+
expandable: expandableProp,
|
|
36
|
+
open: controlledOpen,
|
|
37
|
+
defaultOpen,
|
|
38
|
+
onOpenChange,
|
|
39
|
+
className,
|
|
40
|
+
...rest
|
|
41
|
+
}) {
|
|
42
|
+
const expandable = expandableProp ?? (children !== void 0 && children !== null && children !== false);
|
|
43
|
+
const controlled = controlledOpen !== void 0;
|
|
44
|
+
const [uncontrolled, setUncontrolled] = useState(defaultOpen ?? ACTIVE.has(state));
|
|
45
|
+
const active = ACTIVE.has(state);
|
|
46
|
+
const wasActive = useRef(active);
|
|
47
|
+
useEffect(() => {
|
|
48
|
+
if (controlled || wasActive.current === active) return;
|
|
49
|
+
wasActive.current = active;
|
|
50
|
+
setUncontrolled(active);
|
|
51
|
+
}, [active, controlled]);
|
|
52
|
+
const open = expandable && (controlled ? controlledOpen : uncontrolled);
|
|
53
|
+
const rid = useId();
|
|
54
|
+
const toggle = () => {
|
|
55
|
+
if (!controlled) setUncontrolled(!open);
|
|
56
|
+
onOpenChange?.(!open);
|
|
57
|
+
};
|
|
58
|
+
return /* @__PURE__ */ jsxs(
|
|
59
|
+
"div",
|
|
60
|
+
{
|
|
61
|
+
...rest,
|
|
62
|
+
className: cx("crewlet-run-chip", `crewlet-run-chip--${state}`, className),
|
|
63
|
+
"data-state": open ? "open" : "closed",
|
|
64
|
+
children: [
|
|
65
|
+
/* @__PURE__ */ jsx(
|
|
66
|
+
DisclosureAnatomy,
|
|
67
|
+
{
|
|
68
|
+
open,
|
|
69
|
+
onToggle: toggle,
|
|
70
|
+
expandable,
|
|
71
|
+
icon: /* @__PURE__ */ jsx(StepStateMark, { state: MARK[state] }),
|
|
72
|
+
title: /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
73
|
+
title,
|
|
74
|
+
meta === void 0 ? null : /* @__PURE__ */ jsx(VisuallyHidden, { children: "," })
|
|
75
|
+
] }),
|
|
76
|
+
meta: meta === void 0 ? void 0 : /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
77
|
+
/* @__PURE__ */ jsx("span", { className: "crewlet-run-chip__separator", "aria-hidden": "true", children: "\xB7 " }),
|
|
78
|
+
meta
|
|
79
|
+
] }),
|
|
80
|
+
headingLevel: "none",
|
|
81
|
+
triggerId: `${rid}-trigger`,
|
|
82
|
+
panelId: `${rid}-panel`,
|
|
83
|
+
triggerClassName: "crewlet-run-chip__trigger"
|
|
84
|
+
}
|
|
85
|
+
),
|
|
86
|
+
expandable ? /* @__PURE__ */ jsx(
|
|
87
|
+
"div",
|
|
88
|
+
{
|
|
89
|
+
id: `${rid}-panel`,
|
|
90
|
+
role: "region",
|
|
91
|
+
"aria-labelledby": `${rid}-trigger`,
|
|
92
|
+
className: "crewlet-run-chip__panel",
|
|
93
|
+
hidden: !open,
|
|
94
|
+
children
|
|
95
|
+
}
|
|
96
|
+
) : null
|
|
97
|
+
]
|
|
98
|
+
}
|
|
99
|
+
);
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
export { RUN_STATES, RunChip };
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { StatusCard } from './chunk-WDIVALLP.js';
|
|
2
|
+
import { cx } from './chunk-ODEQTPFM.js';
|
|
3
|
+
import './EntityList-XIICECVC.css';
|
|
4
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
5
|
+
|
|
6
|
+
function EntityList({ items, label, title, className, ...rest }) {
|
|
7
|
+
const list = (
|
|
8
|
+
// The role is restated for WebKit, which drops it from a list with no markers.
|
|
9
|
+
// eslint-disable-next-line jsx-a11y/no-redundant-roles
|
|
10
|
+
/* @__PURE__ */ jsx("ul", { role: "list", "aria-label": title === void 0 ? label : void 0, className: "crewlet-entity-list__rows", children: items.map((item) => /* @__PURE__ */ jsxs("li", { className: "crewlet-entity-list__row", children: [
|
|
11
|
+
item.avatar === void 0 ? null : /* @__PURE__ */ jsx("span", { className: "crewlet-entity-list__avatar", "aria-hidden": "true", children: item.avatar }),
|
|
12
|
+
/* @__PURE__ */ jsxs("span", { className: "crewlet-entity-list__words", children: [
|
|
13
|
+
/* @__PURE__ */ jsx("span", { className: "crewlet-entity-list__name", children: item.name }),
|
|
14
|
+
item.fact === void 0 || item.fact === null ? null : /* @__PURE__ */ jsx("span", { className: "crewlet-entity-list__fact", children: item.fact })
|
|
15
|
+
] }),
|
|
16
|
+
item.action === void 0 || item.action === null ? null : /* @__PURE__ */ jsx("span", { className: "crewlet-entity-list__action", children: item.action })
|
|
17
|
+
] }, item.id)) })
|
|
18
|
+
);
|
|
19
|
+
if (title === void 0) {
|
|
20
|
+
return /* @__PURE__ */ jsx("div", { ...rest, className: cx("crewlet-entity-list", className), children: list });
|
|
21
|
+
}
|
|
22
|
+
return /* @__PURE__ */ jsx(StatusCard, { ...rest, title, bodyPadding: "none", className: cx("crewlet-entity-list", "crewlet-entity-list--card", className), children: list });
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export { EntityList };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { announce } from './chunk-RSAQOKH3.js';
|
|
2
|
-
import { IconButton } from './chunk-
|
|
2
|
+
import { IconButton } from './chunk-2BQYODY3.js';
|
|
3
3
|
import { cx } from './chunk-ODEQTPFM.js';
|
|
4
4
|
import './ArrangeFrame-QXOQTFAH.css';
|
|
5
5
|
import { forwardRef, useRef, useCallback, useState, useEffect } from 'react';
|
|
@@ -2,7 +2,7 @@ import { characterCountState, CharacterCount } from './chunk-XCUUI7E7.js';
|
|
|
2
2
|
import { useHeadingLevel, headingTag, HeadingLevelProvider, nextHeadingLevel } from './chunk-PQADV6P6.js';
|
|
3
3
|
import { announce } from './chunk-RSAQOKH3.js';
|
|
4
4
|
import { isComposing } from './chunk-H5XTJ7GJ.js';
|
|
5
|
-
import { IconButton } from './chunk-
|
|
5
|
+
import { IconButton } from './chunk-2BQYODY3.js';
|
|
6
6
|
import { useFocusModality } from './chunk-NUZHC6MM.js';
|
|
7
7
|
import { VisuallyHidden } from './chunk-BZFWDIV6.js';
|
|
8
8
|
import { cx } from './chunk-ODEQTPFM.js';
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { Timeline } from './chunk-AUQPBL4O.js';
|
|
2
2
|
import { Section } from './chunk-JQ7IFSF6.js';
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { ArtifactPanel } from './chunk-
|
|
6
|
-
import { Button } from './chunk-
|
|
3
|
+
import { Composer } from './chunk-JLRXCKTS.js';
|
|
4
|
+
import { Disclosure } from './chunk-GG4QZWMQ.js';
|
|
5
|
+
import { ArtifactPanel } from './chunk-HGYHWWA5.js';
|
|
6
|
+
import { Button } from './chunk-HD4QJ2SI.js';
|
|
7
7
|
import { cx } from './chunk-ODEQTPFM.js';
|
|
8
8
|
import './AgentHandoffPanel-JWSW62GU.css';
|
|
9
9
|
import { useId, useRef, useEffect } from 'react';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { DisclosureAnatomy } from './chunk-
|
|
1
|
+
import { DisclosureAnatomy } from './chunk-TFGCNBWP.js';
|
|
2
2
|
import { useHeadingLevel } from './chunk-PQADV6P6.js';
|
|
3
3
|
import { cx } from './chunk-ODEQTPFM.js';
|
|
4
|
-
import './Disclosure-
|
|
4
|
+
import './Disclosure-FVMA4RW2.css';
|
|
5
5
|
import { useState, useId, useCallback } from 'react';
|
|
6
6
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
7
7
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { TreeGrid } from './chunk-
|
|
1
|
+
import { TreeGrid } from './chunk-VRNUKH2W.js';
|
|
2
2
|
import { createTreeModel, treeParent } from './chunk-MY374UUD.js';
|
|
3
3
|
import { OrgLabel } from './chunk-ONQKKHON.js';
|
|
4
4
|
import { AddPill } from './chunk-TROLVEZY.js';
|
|
5
|
-
import { IconButton } from './chunk-
|
|
5
|
+
import { IconButton } from './chunk-2BQYODY3.js';
|
|
6
6
|
import { cx } from './chunk-ODEQTPFM.js';
|
|
7
7
|
import './OrgTable-JZSYTUIK.css';
|
|
8
8
|
import { useMemo, useRef, useImperativeHandle, useCallback } from 'react';
|