@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
|
@@ -0,0 +1,214 @@
|
|
|
1
|
+
import { useAppShellPeek, ResizeHandle } from './chunk-PIYJNCN7.js';
|
|
2
|
+
import { ButtonLink } from './chunk-HD4QJ2SI.js';
|
|
3
|
+
import { IconButton } from './chunk-2BQYODY3.js';
|
|
4
|
+
import { cx } from './chunk-ODEQTPFM.js';
|
|
5
|
+
import './HitArea-QUOS6ZDJ.css';
|
|
6
|
+
import './ResizeHandle-2UNSZ4ZQ.css';
|
|
7
|
+
import './PeekRail-4L5YUQMW.css';
|
|
8
|
+
import { createContext, useRef, useEffect, useState, useMemo, useContext, Fragment as Fragment$1 } from 'react';
|
|
9
|
+
import { ChevronUpGlyph, ChevronDownGlyph, ArrowUpRightGlyph, XGlyph } from '@crewlethq/icons/glyphs';
|
|
10
|
+
import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
|
|
11
|
+
|
|
12
|
+
var PEEK_RAIL_WIDTH = 420;
|
|
13
|
+
var PEEK_RAIL_MIN_WIDTH = 330;
|
|
14
|
+
var PEEK_RAIL_MAX_WIDTH = 640;
|
|
15
|
+
var PEEK_RAIL_LABELS = {
|
|
16
|
+
previous: "Previous",
|
|
17
|
+
next: "Next",
|
|
18
|
+
close: "Close",
|
|
19
|
+
open: "Open",
|
|
20
|
+
resize: "Resize the detail panel"
|
|
21
|
+
};
|
|
22
|
+
function PeekRail({
|
|
23
|
+
label,
|
|
24
|
+
shape: asked,
|
|
25
|
+
width = PEEK_RAIL_WIDTH,
|
|
26
|
+
minWidth = PEEK_RAIL_MIN_WIDTH,
|
|
27
|
+
maxWidth = PEEK_RAIL_MAX_WIDTH,
|
|
28
|
+
defaultWidth = PEEK_RAIL_WIDTH,
|
|
29
|
+
reserve,
|
|
30
|
+
onWidthChange,
|
|
31
|
+
onWidthCommit,
|
|
32
|
+
onClose,
|
|
33
|
+
onStep,
|
|
34
|
+
openHref,
|
|
35
|
+
labels,
|
|
36
|
+
className,
|
|
37
|
+
children
|
|
38
|
+
}) {
|
|
39
|
+
const words = { ...PEEK_RAIL_LABELS, ...labels };
|
|
40
|
+
const slot = useAppShellPeek();
|
|
41
|
+
const shape = asked ?? slot?.shape ?? "column";
|
|
42
|
+
const rail = useRef(null);
|
|
43
|
+
const close = useRef(onClose);
|
|
44
|
+
close.current = onClose;
|
|
45
|
+
useEffect(() => {
|
|
46
|
+
const element = rail.current;
|
|
47
|
+
if (!element) return void 0;
|
|
48
|
+
const doc = element.ownerDocument;
|
|
49
|
+
const onKeyDown = (event) => {
|
|
50
|
+
if (event.key !== "Escape" || event.defaultPrevented || event.isComposing) return;
|
|
51
|
+
if (!(event.target instanceof Node) || !element.contains(event.target)) return;
|
|
52
|
+
event.preventDefault();
|
|
53
|
+
close.current();
|
|
54
|
+
};
|
|
55
|
+
doc.addEventListener("keydown", onKeyDown);
|
|
56
|
+
return () => doc.removeEventListener("keydown", onKeyDown);
|
|
57
|
+
}, []);
|
|
58
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
59
|
+
shape === "drawer" ? (
|
|
60
|
+
// A press on the page behind the drawer closes it, as a press on
|
|
61
|
+
// nothing does beside a column. The veil is a pointer convenience:
|
|
62
|
+
// the keyboard closes the rail with Close or Escape.
|
|
63
|
+
/* @__PURE__ */ jsx("div", { className: "crewlet-peek-rail__veil", role: "presentation", onClick: onClose })
|
|
64
|
+
) : null,
|
|
65
|
+
/* @__PURE__ */ jsxs(
|
|
66
|
+
"aside",
|
|
67
|
+
{
|
|
68
|
+
ref: rail,
|
|
69
|
+
className: cx("crewlet-peek-rail", className),
|
|
70
|
+
"data-shape": shape,
|
|
71
|
+
"aria-label": label,
|
|
72
|
+
style: {
|
|
73
|
+
["--crewlet-peek-rail-width"]: `${width}px`,
|
|
74
|
+
...reserve === void 0 ? null : { ["--crewlet-peek-rail-reserve"]: `${reserve}px` }
|
|
75
|
+
},
|
|
76
|
+
children: [
|
|
77
|
+
shape === "column" && onWidthChange ? /* @__PURE__ */ jsx(
|
|
78
|
+
ResizeHandle,
|
|
79
|
+
{
|
|
80
|
+
label: words.resize,
|
|
81
|
+
value: width,
|
|
82
|
+
min: minWidth,
|
|
83
|
+
max: maxWidth,
|
|
84
|
+
defaultValue: defaultWidth,
|
|
85
|
+
onValueChange: onWidthChange,
|
|
86
|
+
onValueCommit: onWidthCommit,
|
|
87
|
+
edge: "left"
|
|
88
|
+
}
|
|
89
|
+
) : null,
|
|
90
|
+
/* @__PURE__ */ jsxs("div", { className: "crewlet-peek-rail__bar", children: [
|
|
91
|
+
onStep ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
92
|
+
/* @__PURE__ */ jsx(
|
|
93
|
+
IconButton,
|
|
94
|
+
{
|
|
95
|
+
size: "sm",
|
|
96
|
+
variant: "ghost",
|
|
97
|
+
icon: /* @__PURE__ */ jsx(ChevronUpGlyph, { size: "sm" }),
|
|
98
|
+
label: words.previous,
|
|
99
|
+
title: words.previousHint,
|
|
100
|
+
onClick: () => onStep(-1)
|
|
101
|
+
}
|
|
102
|
+
),
|
|
103
|
+
/* @__PURE__ */ jsx(
|
|
104
|
+
IconButton,
|
|
105
|
+
{
|
|
106
|
+
size: "sm",
|
|
107
|
+
variant: "ghost",
|
|
108
|
+
icon: /* @__PURE__ */ jsx(ChevronDownGlyph, { size: "sm" }),
|
|
109
|
+
label: words.next,
|
|
110
|
+
title: words.nextHint,
|
|
111
|
+
onClick: () => onStep(1)
|
|
112
|
+
}
|
|
113
|
+
)
|
|
114
|
+
] }) : null,
|
|
115
|
+
/* @__PURE__ */ jsx("span", { className: "crewlet-peek-rail__spacer" }),
|
|
116
|
+
openHref ? /* @__PURE__ */ jsx(
|
|
117
|
+
ButtonLink,
|
|
118
|
+
{
|
|
119
|
+
size: "small",
|
|
120
|
+
variant: "secondary",
|
|
121
|
+
href: openHref,
|
|
122
|
+
trailingIcon: /* @__PURE__ */ jsx(ArrowUpRightGlyph, { size: "sm" }),
|
|
123
|
+
children: words.open
|
|
124
|
+
}
|
|
125
|
+
) : null,
|
|
126
|
+
/* @__PURE__ */ jsx(
|
|
127
|
+
IconButton,
|
|
128
|
+
{
|
|
129
|
+
size: "sm",
|
|
130
|
+
variant: "ghost",
|
|
131
|
+
icon: /* @__PURE__ */ jsx(XGlyph, { size: "sm" }),
|
|
132
|
+
label: words.close,
|
|
133
|
+
title: words.closeHint,
|
|
134
|
+
onClick: onClose
|
|
135
|
+
}
|
|
136
|
+
)
|
|
137
|
+
] }),
|
|
138
|
+
/* @__PURE__ */ jsx("div", { className: "crewlet-peek-rail__body", children })
|
|
139
|
+
]
|
|
140
|
+
}
|
|
141
|
+
)
|
|
142
|
+
] });
|
|
143
|
+
}
|
|
144
|
+
var NeighbourContext = createContext(null);
|
|
145
|
+
var NOTHING = { tokens: [] };
|
|
146
|
+
function PeekNeighbours({ children }) {
|
|
147
|
+
const [published, publish] = useState(NOTHING);
|
|
148
|
+
const value = useMemo(() => ({ ...published, publish }), [published]);
|
|
149
|
+
return /* @__PURE__ */ jsx(NeighbourContext.Provider, { value, children });
|
|
150
|
+
}
|
|
151
|
+
function usePeekOrder() {
|
|
152
|
+
const host = useContext(NeighbourContext);
|
|
153
|
+
return host ? { tokens: host.tokens, query: host.query } : NOTHING;
|
|
154
|
+
}
|
|
155
|
+
function usePeekNeighbours(tokens, query) {
|
|
156
|
+
const publish = useContext(NeighbourContext)?.publish;
|
|
157
|
+
const key = tokens.join("\0");
|
|
158
|
+
const queryKey = query ? new URLSearchParams(query).toString() : "";
|
|
159
|
+
useEffect(() => {
|
|
160
|
+
if (!publish) return void 0;
|
|
161
|
+
const order = {
|
|
162
|
+
tokens: key === "" ? [] : key.split("\0"),
|
|
163
|
+
...queryKey === "" ? null : { query: Object.fromEntries(new URLSearchParams(queryKey)) }
|
|
164
|
+
};
|
|
165
|
+
publish(order);
|
|
166
|
+
return () => publish(NOTHING);
|
|
167
|
+
}, [key, queryKey, publish]);
|
|
168
|
+
}
|
|
169
|
+
function usePeekStep(current, move) {
|
|
170
|
+
const { tokens } = usePeekOrder();
|
|
171
|
+
if (current === null) return void 0;
|
|
172
|
+
const at = tokens.indexOf(current);
|
|
173
|
+
if (at < 0 || tokens.length < 2) return void 0;
|
|
174
|
+
return (delta) => {
|
|
175
|
+
const next = tokens[Math.max(0, Math.min(tokens.length - 1, at + delta))];
|
|
176
|
+
if (next !== void 0 && next !== current) move(next);
|
|
177
|
+
};
|
|
178
|
+
}
|
|
179
|
+
function PeekHost({ current, render, label, onClose, onMove, openHref, boundary, ...rail }) {
|
|
180
|
+
const order = usePeekOrder();
|
|
181
|
+
const step = usePeekStep(current, onMove);
|
|
182
|
+
const body = current === null ? void 0 : render(current);
|
|
183
|
+
const missing = current !== null && body === void 0;
|
|
184
|
+
useEffect(() => {
|
|
185
|
+
if (missing) onClose();
|
|
186
|
+
}, [missing, onClose]);
|
|
187
|
+
if (current === null || body === void 0) return null;
|
|
188
|
+
const query = order.tokens.includes(current) ? order.query : void 0;
|
|
189
|
+
return /* @__PURE__ */ jsx(PeekRail, { ...rail, label: label(current), onClose, onStep: step, openHref: openHref?.(current, query), children: /* @__PURE__ */ jsx(Fragment$1, { children: boundary ? boundary(current, body) : body }, current) });
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
// src/PeekRail/activation.ts
|
|
193
|
+
function isPlainPress(event) {
|
|
194
|
+
return !event.defaultPrevented && event.button === 0 && !event.metaKey && !event.ctrlKey && !event.shiftKey && !event.altKey;
|
|
195
|
+
}
|
|
196
|
+
function peekClickHandler(open) {
|
|
197
|
+
if (!open) return void 0;
|
|
198
|
+
return (event) => {
|
|
199
|
+
if (!isPlainPress(event)) return;
|
|
200
|
+
event.preventDefault();
|
|
201
|
+
open();
|
|
202
|
+
};
|
|
203
|
+
}
|
|
204
|
+
function peekRowActivation(open) {
|
|
205
|
+
return (row, event) => {
|
|
206
|
+
if (!("button" in event)) {
|
|
207
|
+
open(row);
|
|
208
|
+
return;
|
|
209
|
+
}
|
|
210
|
+
peekClickHandler(() => open(row))?.(event);
|
|
211
|
+
};
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
export { PEEK_RAIL_LABELS, PEEK_RAIL_MAX_WIDTH, PEEK_RAIL_MIN_WIDTH, PEEK_RAIL_WIDTH, PeekHost, PeekNeighbours, PeekRail, isPlainPress, peekClickHandler, peekRowActivation, usePeekNeighbours, usePeekOrder, usePeekStep };
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { Select } from './chunk-XQZ6EWOE.js';
|
|
2
2
|
import { today, shiftMonth, CalendarGrid, compareDays } from './chunk-GXQ3B46I.js';
|
|
3
3
|
import { Popover } from './chunk-KHJIEPZV.js';
|
|
4
|
-
import { Input } from './chunk-
|
|
5
|
-
import { Button } from './chunk-
|
|
4
|
+
import { Input } from './chunk-FXQLNETQ.js';
|
|
5
|
+
import { Button } from './chunk-HD4QJ2SI.js';
|
|
6
6
|
import { isComposing } from './chunk-H5XTJ7GJ.js';
|
|
7
|
-
import { IconButton } from './chunk-
|
|
7
|
+
import { IconButton } from './chunk-2BQYODY3.js';
|
|
8
8
|
import { useFocusModality } from './chunk-NUZHC6MM.js';
|
|
9
9
|
import { cx } from './chunk-ODEQTPFM.js';
|
|
10
10
|
import './TimeWindowPicker-I3HXC74I.css';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { useThemePreference, useSystemTheme, resolveTheme } from './chunk-Z24ZUSTX.js';
|
|
2
|
-
import { IconButton } from './chunk-
|
|
2
|
+
import { IconButton } from './chunk-2BQYODY3.js';
|
|
3
3
|
import { SunGlyph, MoonGlyph } from '@crewlethq/icons/glyphs';
|
|
4
4
|
import { jsx } from 'react/jsx-runtime';
|
|
5
5
|
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
import { DiffList } from './chunk-Z3GDMNMU.js';
|
|
2
|
+
import { Tag } from './chunk-KYIAFNU7.js';
|
|
3
|
+
import { Disclosure } from './chunk-GG4QZWMQ.js';
|
|
4
|
+
import { VisuallyHidden } from './chunk-BZFWDIV6.js';
|
|
5
|
+
import { cx } from './chunk-ODEQTPFM.js';
|
|
6
|
+
import './ChangeList-CB2DLR5S.css';
|
|
7
|
+
import { useId } from 'react';
|
|
8
|
+
import { ArrowRightGlyph } from '@crewlethq/icons/glyphs';
|
|
9
|
+
import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
|
|
10
|
+
|
|
11
|
+
var CHANGE_LIST_LABELS = {
|
|
12
|
+
changedFrom: "Changed from",
|
|
13
|
+
to: "to",
|
|
14
|
+
added: "Added:",
|
|
15
|
+
removed: "Removed:",
|
|
16
|
+
isNew: "New",
|
|
17
|
+
addedWords: "added",
|
|
18
|
+
removedWords: "removed",
|
|
19
|
+
showWhole: "Show the whole change"
|
|
20
|
+
};
|
|
21
|
+
var CHANGE_LIST_COLLAPSE_OVER = 80;
|
|
22
|
+
var ELLIPSIS = "\u2026";
|
|
23
|
+
function shortenUnchanged(text, place, max = CHANGE_LIST_COLLAPSE_OVER) {
|
|
24
|
+
if (text.length <= max) return text;
|
|
25
|
+
const keep = place === "middle" ? Math.floor(max / 2) : max;
|
|
26
|
+
const words = text.trim();
|
|
27
|
+
const head = () => {
|
|
28
|
+
const cut = words.slice(0, keep);
|
|
29
|
+
const space = cut.lastIndexOf(" ");
|
|
30
|
+
return (space > 0 ? cut.slice(0, space) : cut).trim();
|
|
31
|
+
};
|
|
32
|
+
const tail = () => {
|
|
33
|
+
const cut = words.slice(Math.max(0, words.length - keep));
|
|
34
|
+
const space = cut.indexOf(" ");
|
|
35
|
+
return (space >= 0 ? cut.slice(space + 1) : cut).trim();
|
|
36
|
+
};
|
|
37
|
+
const lead = /^\s/.test(text) ? " " : "";
|
|
38
|
+
const trail = /\s$/.test(text) ? " " : "";
|
|
39
|
+
if (place === "first") return `${ELLIPSIS} ${tail()}${trail}`;
|
|
40
|
+
if (place === "last") return `${lead}${head()} ${ELLIPSIS}`;
|
|
41
|
+
return `${lead}${head()} ${ELLIPSIS} ${tail()}${trail}`;
|
|
42
|
+
}
|
|
43
|
+
function WordDiff({ row, labels }) {
|
|
44
|
+
const max = row.collapseOver ?? CHANGE_LIST_COLLAPSE_OVER;
|
|
45
|
+
const changes = row.words.map((part, index) => part.op === "=" ? -1 : index).filter((index) => index >= 0);
|
|
46
|
+
const firstChange = changes[0] ?? Number.POSITIVE_INFINITY;
|
|
47
|
+
const lastChange = changes[changes.length - 1] ?? Number.NEGATIVE_INFINITY;
|
|
48
|
+
return /* @__PURE__ */ jsx("p", { className: "crewlet-change-list__words", children: row.words.map((part, index) => {
|
|
49
|
+
if (part.op === "+") {
|
|
50
|
+
return /* @__PURE__ */ jsxs("ins", { className: "crewlet-change-list__inserted", children: [
|
|
51
|
+
/* @__PURE__ */ jsx(VisuallyHidden, { children: `${labels.addedWords} ` }),
|
|
52
|
+
part.text
|
|
53
|
+
] }, index);
|
|
54
|
+
}
|
|
55
|
+
if (part.op === "-") {
|
|
56
|
+
return /* @__PURE__ */ jsxs("del", { className: "crewlet-change-list__deleted", children: [
|
|
57
|
+
/* @__PURE__ */ jsx(VisuallyHidden, { children: `${labels.removedWords} ` }),
|
|
58
|
+
part.text
|
|
59
|
+
] }, index);
|
|
60
|
+
}
|
|
61
|
+
const place = index < firstChange ? "first" : index > lastChange ? "last" : "middle";
|
|
62
|
+
return /* @__PURE__ */ jsx("span", { children: shortenUnchanged(part.text, place, max) }, index);
|
|
63
|
+
}) });
|
|
64
|
+
}
|
|
65
|
+
function Value({ row, labels }) {
|
|
66
|
+
switch (row.kind) {
|
|
67
|
+
case "fact":
|
|
68
|
+
return /* @__PURE__ */ jsx("span", { className: "crewlet-change-list__fact", children: row.value });
|
|
69
|
+
case "changed":
|
|
70
|
+
return /* @__PURE__ */ jsxs("span", { className: "crewlet-change-list__pair", children: [
|
|
71
|
+
/* @__PURE__ */ jsx(VisuallyHidden, { children: `${labels.changedFrom} ` }),
|
|
72
|
+
/* @__PURE__ */ jsx("del", { className: "crewlet-change-list__from", children: row.from }),
|
|
73
|
+
/* @__PURE__ */ jsxs("span", { className: "crewlet-change-list__next", children: [
|
|
74
|
+
/* @__PURE__ */ jsx(ArrowRightGlyph, { size: "sm", className: "crewlet-change-list__arrow" }),
|
|
75
|
+
/* @__PURE__ */ jsx(VisuallyHidden, { children: ` ${labels.to} ` }),
|
|
76
|
+
/* @__PURE__ */ jsx("ins", { className: "crewlet-change-list__to", children: row.to })
|
|
77
|
+
] })
|
|
78
|
+
] });
|
|
79
|
+
case "added":
|
|
80
|
+
return /* @__PURE__ */ jsxs("span", { className: "crewlet-change-list__pair", children: [
|
|
81
|
+
/* @__PURE__ */ jsxs("ins", { className: "crewlet-change-list__to", children: [
|
|
82
|
+
/* @__PURE__ */ jsx(VisuallyHidden, { children: `${labels.added} ` }),
|
|
83
|
+
row.to
|
|
84
|
+
] }),
|
|
85
|
+
row.isNew ? /* @__PURE__ */ jsx(Tag, { size: "xs", variant: "success", children: labels.isNew }) : null
|
|
86
|
+
] });
|
|
87
|
+
case "removed":
|
|
88
|
+
return /* @__PURE__ */ jsxs("del", { className: "crewlet-change-list__removed", children: [
|
|
89
|
+
/* @__PURE__ */ jsx(VisuallyHidden, { children: `${labels.removed} ` }),
|
|
90
|
+
row.from
|
|
91
|
+
] });
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
function ChangeList({ rows, heading, settled = false, labels: overrides, diffLabels, className }) {
|
|
95
|
+
const labels = overrides ? { ...CHANGE_LIST_LABELS, ...overrides } : CHANGE_LIST_LABELS;
|
|
96
|
+
const headingId = useId();
|
|
97
|
+
return /* @__PURE__ */ jsxs("div", { className: cx("crewlet-change-list", settled && "crewlet-change-list--settled", className), children: [
|
|
98
|
+
heading === void 0 || heading === null ? null : /* @__PURE__ */ jsx("div", { id: headingId, className: "crewlet-change-list__heading", children: heading }),
|
|
99
|
+
/* @__PURE__ */ jsx("dl", { className: "crewlet-change-list__rows", "aria-labelledby": heading === void 0 || heading === null ? void 0 : headingId, children: rows.map((row, index) => /* @__PURE__ */ jsxs(
|
|
100
|
+
"div",
|
|
101
|
+
{
|
|
102
|
+
className: cx("crewlet-change-list__row", `crewlet-change-list__row--${row.kind}`),
|
|
103
|
+
children: [
|
|
104
|
+
/* @__PURE__ */ jsx("dt", { className: "crewlet-change-list__label", children: row.label }),
|
|
105
|
+
/* @__PURE__ */ jsxs("dd", { className: "crewlet-change-list__value", children: [
|
|
106
|
+
row.kind === "text" ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
107
|
+
/* @__PURE__ */ jsx(WordDiff, { row, labels }),
|
|
108
|
+
row.whole && row.whole.length > 0 ? /* @__PURE__ */ jsx(Disclosure, { title: labels.showWhole, headingLevel: "none", size: "compact", className: "crewlet-change-list__whole", children: /* @__PURE__ */ jsx(DiffList, { rows: [...row.whole], layout: "auto", labels: diffLabels }) }) : null
|
|
109
|
+
] }) : /* @__PURE__ */ jsx(Value, { row, labels }),
|
|
110
|
+
row.note === void 0 || row.note === null ? null : /* @__PURE__ */ jsx("span", { className: "crewlet-change-list__note", children: row.note })
|
|
111
|
+
] })
|
|
112
|
+
]
|
|
113
|
+
},
|
|
114
|
+
`${index}:${row.label}`
|
|
115
|
+
)) })
|
|
116
|
+
] });
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
export { CHANGE_LIST_COLLAPSE_OVER, CHANGE_LIST_LABELS, ChangeList, shortenUnchanged };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { richEditorLabels } from './chunk-CSQTDGTS.js';
|
|
2
2
|
import { Callout } from './chunk-BPCY7ZID.js';
|
|
3
3
|
import { Skeleton } from './chunk-TEUQWOWZ.js';
|
|
4
|
-
import { Button } from './chunk-
|
|
4
|
+
import { Button } from './chunk-HD4QJ2SI.js';
|
|
5
5
|
import './RichEditor-NPD2KAPS.css';
|
|
6
6
|
import { forwardRef, useState, useEffect } from 'react';
|
|
7
7
|
import { jsx } from 'react/jsx-runtime';
|
|
@@ -9,7 +9,7 @@ import { jsx } from 'react/jsx-runtime';
|
|
|
9
9
|
var engine = null;
|
|
10
10
|
var loading = null;
|
|
11
11
|
function loadEngine() {
|
|
12
|
-
loading ??= import('./Editor-
|
|
12
|
+
loading ??= import('./Editor-X2J47LPD.js').then(
|
|
13
13
|
(module) => {
|
|
14
14
|
engine = module.Editor;
|
|
15
15
|
return engine;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Toolbar } from './chunk-NR4CPM4T.js';
|
|
2
|
-
import { Button } from './chunk-OG6CL3EB.js';
|
|
3
|
-
import { returnFocus } from './chunk-NUZHC6MM.js';
|
|
4
2
|
import { announce } from './chunk-RSAQOKH3.js';
|
|
3
|
+
import { Button } from './chunk-HD4QJ2SI.js';
|
|
4
|
+
import { returnFocus } from './chunk-NUZHC6MM.js';
|
|
5
5
|
import { cx } from './chunk-ODEQTPFM.js';
|
|
6
6
|
import './SelectionBar-XPWKUOSC.css';
|
|
7
7
|
import { useRef, useEffect } from 'react';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { diffLines, diffStat, collapseDiff, DiffSummary, DiffView } from './chunk-BVWSLXTY.js';
|
|
2
|
-
import { SegmentedControl } from './chunk-
|
|
2
|
+
import { SegmentedControl } from './chunk-AWSFK2IK.js';
|
|
3
3
|
import { EmptyState } from './chunk-PPUR46MK.js';
|
|
4
4
|
import { useHeadingLevel, headingTag, nextHeadingLevel, HeadingLevelProvider } from './chunk-PQADV6P6.js';
|
|
5
5
|
import { cx } from './chunk-ODEQTPFM.js';
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { Select } from './chunk-XQZ6EWOE.js';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import { CopyButton } from './chunk-ES4HR34Y.js';
|
|
3
|
+
import { Modal } from './chunk-QZ4B72FP.js';
|
|
4
4
|
import { Callout } from './chunk-BPCY7ZID.js';
|
|
5
5
|
import { PrincipalAvatar } from './chunk-CI3VPIJN.js';
|
|
6
|
-
import { useMediaMatch } from './chunk-RTPQDNW3.js';
|
|
7
6
|
import { useHeadingLevel, headingTag } from './chunk-PQADV6P6.js';
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
7
|
+
import { useMediaMatch } from './chunk-RTPQDNW3.js';
|
|
8
|
+
import { Button } from './chunk-HD4QJ2SI.js';
|
|
9
|
+
import { IconButton } from './chunk-2BQYODY3.js';
|
|
10
10
|
import { cx } from './chunk-ODEQTPFM.js';
|
|
11
11
|
import './ShareDialog-4QDCBWMH.css';
|
|
12
12
|
import { useState, useId } from 'react';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { frameThemeMessage, readFrameHello, frameOriginMatches, negotiateBridge, FRAME_MESSAGE, portTargetOrigin, checkFrameSandbox, httpOrigin, isFrameNonce, frameFragment, readOpenLink, externalUrl, isFocusExit } from './chunk-F6V2PTN6.js';
|
|
2
2
|
import { Callout } from './chunk-BPCY7ZID.js';
|
|
3
3
|
import { Skeleton } from './chunk-TEUQWOWZ.js';
|
|
4
|
-
import { Button } from './chunk-
|
|
4
|
+
import { Button } from './chunk-HD4QJ2SI.js';
|
|
5
5
|
import { cx } from './chunk-ODEQTPFM.js';
|
|
6
6
|
import './SandboxedFrame-P5NASXB7.css';
|
|
7
7
|
import { useState, useMemo, useRef, useEffect } from 'react';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Skeleton } from './chunk-TEUQWOWZ.js';
|
|
2
|
-
import { RelativeTime } from './chunk-
|
|
2
|
+
import { RelativeTime } from './chunk-KS7YIJ4S.js';
|
|
3
3
|
import { VisuallyHidden } from './chunk-BZFWDIV6.js';
|
|
4
4
|
import { cx } from './chunk-ODEQTPFM.js';
|
|
5
5
|
import './WidgetFrame-BTFW3CRK.css';
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
import { HIT_AREA_CLASS } from './chunk-2YTOOH3A.js';
|
|
2
|
+
import { cx } from './chunk-ODEQTPFM.js';
|
|
3
|
+
import { createContext, useContext, useState, useRef, useCallback } from 'react';
|
|
4
|
+
import { jsx } from 'react/jsx-runtime';
|
|
5
|
+
|
|
6
|
+
var AsideContext = createContext(null);
|
|
7
|
+
var PeekContext = createContext(null);
|
|
8
|
+
function useAppShellAside() {
|
|
9
|
+
return useContext(AsideContext);
|
|
10
|
+
}
|
|
11
|
+
function useAppShellPeek() {
|
|
12
|
+
return useContext(PeekContext);
|
|
13
|
+
}
|
|
14
|
+
var RESIZE_HANDLE_STEP = 16;
|
|
15
|
+
var RESIZE_HANDLE_LARGE_STEP = 64;
|
|
16
|
+
function clampSize(value, min, max) {
|
|
17
|
+
const ceiling = Math.max(min, max);
|
|
18
|
+
return Math.round(Math.min(ceiling, Math.max(min, value)));
|
|
19
|
+
}
|
|
20
|
+
function ResizeHandle({
|
|
21
|
+
value,
|
|
22
|
+
min,
|
|
23
|
+
max,
|
|
24
|
+
onValueChange,
|
|
25
|
+
onValueCommit,
|
|
26
|
+
defaultValue,
|
|
27
|
+
label,
|
|
28
|
+
edge = "left",
|
|
29
|
+
controls,
|
|
30
|
+
valueText = (px) => `${px} pixels`,
|
|
31
|
+
step = RESIZE_HANDLE_STEP,
|
|
32
|
+
largeStep = RESIZE_HANDLE_LARGE_STEP,
|
|
33
|
+
className
|
|
34
|
+
}) {
|
|
35
|
+
const now = clampSize(value, min, max);
|
|
36
|
+
const ceiling = Math.max(min, max);
|
|
37
|
+
const [dragging, setDragging] = useState(false);
|
|
38
|
+
const drag = useRef(null);
|
|
39
|
+
const grows = edge === "left" ? -1 : 1;
|
|
40
|
+
const change = useCallback(
|
|
41
|
+
(next, commit) => {
|
|
42
|
+
const clamped = clampSize(next, min, max);
|
|
43
|
+
if (clamped !== now) onValueChange(clamped);
|
|
44
|
+
if (commit) onValueCommit?.(clamped);
|
|
45
|
+
},
|
|
46
|
+
[max, min, now, onValueChange, onValueCommit]
|
|
47
|
+
);
|
|
48
|
+
const onKeyDown = (event) => {
|
|
49
|
+
const by = event.shiftKey ? largeStep : step;
|
|
50
|
+
switch (event.key) {
|
|
51
|
+
case "ArrowLeft":
|
|
52
|
+
change(now - by * grows, true);
|
|
53
|
+
break;
|
|
54
|
+
case "ArrowRight":
|
|
55
|
+
change(now + by * grows, true);
|
|
56
|
+
break;
|
|
57
|
+
case "Home":
|
|
58
|
+
change(min, true);
|
|
59
|
+
break;
|
|
60
|
+
case "End":
|
|
61
|
+
change(ceiling, true);
|
|
62
|
+
break;
|
|
63
|
+
case "Enter":
|
|
64
|
+
if (defaultValue === void 0) return;
|
|
65
|
+
change(defaultValue, true);
|
|
66
|
+
break;
|
|
67
|
+
default:
|
|
68
|
+
return;
|
|
69
|
+
}
|
|
70
|
+
event.preventDefault();
|
|
71
|
+
};
|
|
72
|
+
const onPointerDown = (event) => {
|
|
73
|
+
if (event.button !== 0) return;
|
|
74
|
+
event.preventDefault();
|
|
75
|
+
drag.current = { x: event.clientX, from: now, last: now, pointer: event.pointerId };
|
|
76
|
+
event.currentTarget.setPointerCapture?.(event.pointerId);
|
|
77
|
+
setDragging(true);
|
|
78
|
+
};
|
|
79
|
+
const onPointerMove = (event) => {
|
|
80
|
+
const start = drag.current;
|
|
81
|
+
if (!start || start.pointer !== event.pointerId) return;
|
|
82
|
+
const next = clampSize(start.from + (event.clientX - start.x) * grows, min, max);
|
|
83
|
+
if (next === start.last) return;
|
|
84
|
+
start.last = next;
|
|
85
|
+
onValueChange(next);
|
|
86
|
+
};
|
|
87
|
+
const end = (event) => {
|
|
88
|
+
const start = drag.current;
|
|
89
|
+
if (!start || start.pointer !== event.pointerId) return;
|
|
90
|
+
drag.current = null;
|
|
91
|
+
setDragging(false);
|
|
92
|
+
onValueCommit?.(start.last);
|
|
93
|
+
};
|
|
94
|
+
return (
|
|
95
|
+
// eslint-disable-next-line jsx-a11y/no-noninteractive-element-interactions -- see above
|
|
96
|
+
/* @__PURE__ */ jsx(
|
|
97
|
+
"div",
|
|
98
|
+
{
|
|
99
|
+
role: "separator",
|
|
100
|
+
"aria-orientation": "vertical",
|
|
101
|
+
"aria-label": label,
|
|
102
|
+
"aria-valuenow": now,
|
|
103
|
+
"aria-valuemin": min,
|
|
104
|
+
"aria-valuemax": ceiling,
|
|
105
|
+
"aria-valuetext": valueText(now),
|
|
106
|
+
"aria-controls": controls,
|
|
107
|
+
tabIndex: 0,
|
|
108
|
+
className: cx("crewlet-resize-handle", `crewlet-resize-handle--${edge}`, HIT_AREA_CLASS, className),
|
|
109
|
+
"data-dragging": dragging || void 0,
|
|
110
|
+
onKeyDown,
|
|
111
|
+
onPointerDown,
|
|
112
|
+
onPointerMove,
|
|
113
|
+
onPointerUp: end,
|
|
114
|
+
onPointerCancel: end,
|
|
115
|
+
onLostPointerCapture: end,
|
|
116
|
+
onDoubleClick: () => {
|
|
117
|
+
if (defaultValue !== void 0) change(defaultValue, true);
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
)
|
|
121
|
+
);
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
export { AsideContext, PeekContext, RESIZE_HANDLE_LARGE_STEP, RESIZE_HANDLE_STEP, ResizeHandle, clampSize, useAppShellAside, useAppShellPeek };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Note } from './chunk-5SZGKSGL.js';
|
|
2
|
-
import { CanvasToolbar, toolForKey } from './chunk-
|
|
3
|
-
import { IDENTITY_VIEW, Canvas } from './chunk-
|
|
4
|
-
import { IconButton } from './chunk-
|
|
2
|
+
import { CanvasToolbar, toolForKey } from './chunk-LQ6AGUDL.js';
|
|
3
|
+
import { IDENTITY_VIEW, Canvas } from './chunk-YEURM24I.js';
|
|
4
|
+
import { IconButton } from './chunk-2BQYODY3.js';
|
|
5
5
|
import { cx } from './chunk-ODEQTPFM.js';
|
|
6
6
|
import './CanvasBoard-JMYNIAHK.css';
|
|
7
7
|
import { useState, useRef, useImperativeHandle, useCallback, useMemo, useEffect } from 'react';
|