@crewlethq/ui 0.32.0 → 0.33.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 +131 -5
- package/dist/AccessDeniedCard/AccessDeniedCard.d.ts +5 -0
- package/dist/AccessDeniedCard/index.js +1 -5
- package/dist/AccessDeniedCard-QVNDMT46.css +8 -0
- package/dist/AppShell/index.js +4 -4
- package/dist/{AppShell-GCM4TDVY.css → AppShell-JTSEOA57.css} +3 -1
- package/dist/ArrangeGroup/ArrangeGroup.d.ts +16 -1
- package/dist/ArrangeGroup/index.d.ts +1 -1
- package/dist/ArrangeGroup/index.js +1 -1
- package/dist/{ArrangeGroup-GY5YMP6E.css → ArrangeGroup-KRWWOJKR.css} +43 -0
- package/dist/ArrangeList/index.js +2 -2
- package/dist/ArtifactBar/index.js +12 -12
- package/dist/{ArtifactBar-MLMJHWY6.css → ArtifactBar-C462VD4C.css} +8 -3
- package/dist/ArtifactCard/ArtifactCard.d.ts +19 -1
- package/dist/ArtifactCard/index.d.ts +1 -1
- package/dist/ArtifactCard/index.js +4 -4
- package/dist/{ArtifactCard-EXVAEBV6.css → ArtifactCard-AS5Z4CVI.css} +17 -2
- package/dist/ArtifactCover/index.js +6 -6
- package/dist/ArtifactIcon/index.js +5 -5
- package/dist/ArtifactPanel/ArtifactPanel.d.ts +6 -2
- package/dist/ArtifactPanel/index.js +1 -1
- package/dist/{ArtifactPanel-YFXT5O77.css → ArtifactPanel-HW3SU7CP.css} +25 -7
- package/dist/Avatar/Avatar.d.ts +6 -4
- package/dist/Avatar/index.js +2 -2
- package/dist/AvatarPicker/index.js +8 -8
- package/dist/Callout/index.js +1 -1
- package/dist/{Callout-SXXK4B5R.css → Callout-ZAVG3P66.css} +46 -6
- package/dist/Canvas/Canvas.d.ts +33 -2
- package/dist/Canvas/index.d.ts +1 -1
- package/dist/Canvas/index.js +4 -4
- package/dist/{Canvas-LRVNW7XN.css → Canvas-VUG2HLZK.css} +23 -0
- package/dist/CanvasBoard/CanvasBoard.d.ts +38 -3
- package/dist/CanvasBoard/budget.d.ts +9 -3
- package/dist/CanvasBoard/index.d.ts +2 -2
- package/dist/CanvasBoard/index.js +7 -7
- package/dist/{CanvasBoard-MBZVBWDO.css → CanvasBoard-5NNSKY6A.css} +127 -6
- package/dist/CanvasToolbar/index.js +5 -5
- package/dist/{CanvasToolbar-AE5MXH7T.css → CanvasToolbar-EM5EVZED.css} +4 -2
- package/dist/ChangeMark/index.js +4 -4
- package/dist/CharacterPicker/index.js +2 -2
- package/dist/Charts/ActivityStrip.d.ts +16 -1
- package/dist/Charts/BarList.d.ts +6 -0
- package/dist/Charts/ChartEmpty.d.ts +33 -0
- package/dist/Charts/Legend.d.ts +6 -0
- package/dist/Charts/StackedBar.d.ts +4 -1
- package/dist/Charts/StackedColumns.d.ts +14 -3
- package/dist/Charts/TimeSeries.d.ts +11 -1
- package/dist/Charts/index.d.ts +2 -0
- package/dist/Charts/index.js +1 -1
- package/dist/{Charts-RY4JN5FC.css → Charts-MBJG72BS.css} +140 -16
- package/dist/Checkbox/index.js +1 -1
- package/dist/{Checkbox-5UORUG3F.css → Checkbox-ALWG3WV2.css} +11 -0
- package/dist/CommandPalette/index.js +3 -3
- package/dist/{CommandPalette-HBTNKHZQ.css → CommandPalette-7CFGVBND.css} +4 -0
- package/dist/CommentThread/index.js +5 -5
- package/dist/Container/index.js +1 -1
- package/dist/{Container-3TSKMGNI.css → Container-34BAKG7B.css} +3 -1
- package/dist/{DashboardCover-RMINBODB.css → DashboardCover-KYGYMRKW.css} +42 -9
- package/dist/DataTable/index.js +5 -5
- package/dist/{DataTable-WZK3V62B.css → DataTable-NL2YWAIA.css} +4 -1
- package/dist/DataView/index.js +8 -8
- package/dist/DateTimePicker/index.js +3 -3
- package/dist/DocTabsEditor/DocTabsEditor.d.ts +34 -21
- package/dist/DocTabsEditor/index.js +4 -1
- package/dist/DocTabsEditor-4M452LNS.css +189 -0
- package/dist/Document/Document.d.ts +18 -1
- package/dist/Document/index.d.ts +2 -2
- package/dist/Document/index.js +1 -1
- package/dist/{Document-G3YTZIUL.css → Document-JUGCSQ4L.css} +78 -5
- package/dist/EditingStatus/index.js +1 -1
- package/dist/{EditingStatus-L6THUAN7.css → EditingStatus-NNA2CKIL.css} +17 -4
- package/dist/{Editor-YWBUJAQU.js → Editor-UUZ7XKCU.js} +5 -5
- package/dist/EntityChip/index.js +3 -3
- package/dist/FactList/index.js +3 -3
- package/dist/FollowBanner/index.js +3 -3
- package/dist/Fullscreen/index.d.ts +1 -0
- package/dist/Fullscreen/index.js +1 -1
- package/dist/Fullscreen/useIdle.d.ts +16 -0
- package/dist/HuePicker/index.js +3 -3
- package/dist/ImageUpload/index.js +3 -3
- package/dist/Layer/index.d.ts +1 -1
- package/dist/Layer/index.js +1 -1
- package/dist/Layer/place.d.ts +18 -0
- package/dist/LayersList/LayersList.d.ts +57 -0
- package/dist/LayersList/index.d.ts +3 -0
- package/dist/LayersList/index.js +3 -0
- package/dist/LayersList-NQZEIPZB.css +82 -0
- package/dist/LinkInterstitial/index.js +4 -4
- package/dist/ListInput/index.js +1 -1
- package/dist/Markdown/index.js +1 -1
- package/dist/MarkdownEditor/index.js +5 -5
- package/dist/MediaMatch/index.d.ts +1 -0
- package/dist/MediaMatch/index.js +1 -0
- package/dist/MediaMatch/useMediaMatch.d.ts +19 -0
- package/dist/Menu/index.js +2 -2
- package/dist/MergeConflicts/index.js +4 -4
- package/dist/Modal/index.js +2 -2
- package/dist/{Modal-XOSV6FAH.css → Modal-7MWRCWAI.css} +30 -0
- package/dist/Note/index.js +1 -1
- package/dist/{Note-ONSKKTOA.css → Note-WI5MLZOO.css} +13 -0
- package/dist/OrgLabel/index.js +3 -3
- package/dist/OrgNode/index.js +4 -4
- package/dist/OrgTable/index.js +7 -7
- package/dist/PeopleRail/index.js +3 -3
- package/dist/Popover/index.js +2 -2
- package/dist/PresenceStack/index.js +3 -3
- package/dist/{PresenceStack-QSXQJND5.css → PresenceStack-FJJQVH74.css} +11 -3
- package/dist/PresenterView/PresenterView.d.ts +3 -0
- package/dist/PresenterView/index.js +5 -3
- package/dist/PresenterView-T3EXIQ5S.css +147 -0
- package/dist/Principal/index.js +3 -3
- package/dist/PrincipalPicker/index.js +4 -4
- package/dist/RichEditor/index.js +5 -5
- package/dist/RichEditor/schema.d.ts +1 -1
- package/dist/RichEditorMarkdown/index.js +3 -3
- package/dist/SandboxedFrame/SandboxedFrame.d.ts +44 -2
- package/dist/SandboxedFrame/index.d.ts +2 -2
- package/dist/SandboxedFrame/index.js +3 -3
- package/dist/SandboxedFrame-P5NASXB7.css +72 -0
- package/dist/Section/index.js +1 -1
- package/dist/{Section-QR3ILQVK.css → Section-O5AHGSOG.css} +28 -5
- package/dist/SegmentedControl/index.js +3 -3
- package/dist/Select/index.js +2 -2
- package/dist/ShareDialog/ShareDialog.d.ts +10 -0
- package/dist/ShareDialog/index.js +9 -9
- package/dist/{ShareDialog-YZ4F37MW.css → ShareDialog-4QDCBWMH.css} +12 -0
- package/dist/SheetGrid/SheetGrid.d.ts +3 -1
- package/dist/SheetGrid/index.js +8 -8
- package/dist/{SheetGrid-J3TKKXZL.css → SheetGrid-AKPUCK67.css} +106 -7
- package/dist/SheetModel/fit.d.ts +34 -0
- package/dist/SheetModel/index.d.ts +1 -0
- package/dist/SheetModel/index.js +1 -1
- package/dist/Shortcut/index.js +1 -1
- package/dist/Skeleton/Skeleton.d.ts +2 -1
- package/dist/Skeleton/index.js +1 -1
- package/dist/SlideCompare/SlideCompare.d.ts +6 -1
- package/dist/SlideCompare/index.js +3 -3
- package/dist/{SlideCompare-MGM3U2ME.css → SlideCompare-HTCMPQFY.css} +36 -3
- package/dist/SlideFilmstrip/SlideFilmstrip.d.ts +14 -3
- package/dist/SlideFilmstrip/index.js +3 -3
- package/dist/{SlideFilmstrip-BCLNAHFX.css → SlideFilmstrip-5U6Z55GS.css} +63 -2
- package/dist/SlideGrid/index.js +3 -3
- package/dist/{SlideGrid-RT6QEQEE.css → SlideGrid-S4LTJ4UU.css} +9 -5
- package/dist/SlideNav/SlideNav.d.ts +49 -0
- package/dist/SlideNav/index.d.ts +3 -0
- package/dist/SlideNav/index.js +4 -0
- package/dist/SlideNav-BLFJF6AH.css +53 -0
- package/dist/SlideStage/SlideStage.d.ts +9 -1
- package/dist/SlideStage/index.js +2 -2
- package/dist/{SlideStage-KGRRALXR.css → SlideStage-S2FISF4C.css} +23 -0
- package/dist/StatCard/StatCard.d.ts +16 -1
- package/dist/StatCard/index.js +1 -1
- package/dist/{StatCard-KPAFD4E2.css → StatCard-4T7TMWMN.css} +40 -13
- package/dist/Switcher/index.js +6 -6
- package/dist/TableCells/index.js +3 -3
- package/dist/Tabs/Tabs.d.ts +21 -4
- package/dist/Tabs/index.js +1 -1
- package/dist/{Tabs-CJGO35BH.css → Tabs-MMZXV5EF.css} +9 -8
- package/dist/TagsInput/index.js +1 -1
- package/dist/ThemeSwitcher/index.js +4 -4
- package/dist/TimeWindowPicker/index.js +4 -4
- package/dist/Toaster/index.js +2 -2
- package/dist/{Toaster-EOOOTSJT.css → Toaster-C6BQ7L6I.css} +10 -1
- package/dist/Toolbar/index.js +1 -1
- package/dist/Tooltip/index.js +2 -2
- package/dist/TreeCanvas/index.js +5 -5
- package/dist/TreeGrid/index.js +3 -3
- package/dist/VersionCompare/index.js +4 -4
- package/dist/VersionTimeline/index.js +4 -4
- package/dist/WidgetFrame/WidgetFrame.d.ts +8 -1
- package/dist/WidgetFrame/index.js +2 -2
- package/dist/{WidgetFrame-LRZIL62O.css → WidgetFrame-BTFW3CRK.css} +49 -5
- package/dist/{chunk-OTN35CI4.js → chunk-22UEIXZE.js} +18 -6
- package/dist/{chunk-UZ6MA2V6.js → chunk-2DHMVB5J.js} +2 -2
- package/dist/{chunk-WJDQ7XQA.js → chunk-2QEDJSJC.js} +1 -1
- package/dist/{chunk-2HIOJ4YZ.js → chunk-3EB2AV3H.js} +2 -3
- package/dist/{chunk-ODT5H4MN.js → chunk-3LYWD3BO.js} +2 -2
- package/dist/{chunk-FAQGGX2Z.js → chunk-3TFDQLW3.js} +1 -1
- package/dist/{chunk-VYDFB6PJ.js → chunk-3U7S6ZUN.js} +50 -17
- package/dist/{chunk-A4E5YLXO.js → chunk-4B6LSFDS.js} +1 -1
- package/dist/{chunk-WTNUVQVI.js → chunk-4IJS5CPF.js} +1 -1
- package/dist/{chunk-UAN5NE7M.js → chunk-5AQBPHZD.js} +1 -1
- package/dist/{chunk-QWOPX2MN.js → chunk-5FYPE5GL.js} +2 -3
- package/dist/{chunk-CJKMURZO.js → chunk-5SZGKSGL.js} +1 -1
- package/dist/chunk-6VOS2GMB.js +54 -0
- package/dist/{chunk-3ZAFJ4GK.js → chunk-7Q7WDXHG.js} +4 -4
- package/dist/{chunk-JI5AVQLA.js → chunk-7WHDPLVJ.js} +1 -1
- package/dist/{chunk-QH3AKP2N.js → chunk-AC22RZKC.js} +2 -2
- package/dist/{chunk-ZITJKF6Z.js → chunk-AYB6AYNH.js} +1 -1
- package/dist/{chunk-Y5NQ2LMS.js → chunk-BY4N65PM.js} +1 -1
- package/dist/{chunk-YFW4MTK4.js → chunk-C7DKX453.js} +1 -1
- package/dist/{chunk-RCQXUT5K.js → chunk-CCAXYHQS.js} +1 -1
- package/dist/{chunk-4KP4RC3O.js → chunk-CI3VPIJN.js} +1 -1
- package/dist/{chunk-7T42VQQT.js → chunk-CPEPST4S.js} +1 -1
- package/dist/{chunk-AAOH2P6Y.js → chunk-DFK5EQTU.js} +5 -3
- package/dist/{chunk-GOSQXEZU.js → chunk-DFZMYB5X.js} +16 -10
- package/dist/{chunk-TGYDROIB.js → chunk-EBCHVFCS.js} +4 -4
- package/dist/{chunk-YDBC4DNW.js → chunk-FWYHRU7M.js} +1 -1
- package/dist/{chunk-LWXRD6L6.js → chunk-G4ZW7A2W.js} +123 -31
- package/dist/{chunk-E6EWK5YY.js → chunk-GLSOD5Z4.js} +3 -3
- package/dist/{chunk-LIXSV5YI.js → chunk-GPHWCK7M.js} +1 -1
- package/dist/{chunk-UQHKFF2N.js → chunk-GPWJCP3U.js} +1 -1
- package/dist/{chunk-77DRMDXR.js → chunk-HG5VF3TZ.js} +192 -67
- package/dist/{chunk-4JUKWWUD.js → chunk-HH2GKAAE.js} +1 -1
- package/dist/{chunk-QVE4GJAT.js → chunk-HJO4WCH6.js} +1 -1
- package/dist/{chunk-I3BSQUKN.js → chunk-HUVG2FFT.js} +1 -1
- package/dist/{chunk-VS3KOOOL.js → chunk-ILAEBSLJ.js} +3 -3
- package/dist/{chunk-GR55WT4R.js → chunk-IYO2N5ZH.js} +2 -2
- package/dist/{chunk-RWA4H2TV.js → chunk-J6ON5SYE.js} +1 -1
- package/dist/{chunk-NHBP2XS5.js → chunk-J6ZSH3F5.js} +49 -1
- package/dist/{chunk-AMNN4WDX.js → chunk-JBUMD6DS.js} +2 -2
- package/dist/{chunk-BWRGFKJP.js → chunk-K3IJQNB7.js} +2 -3
- package/dist/{chunk-LFNUH4GY.js → chunk-K4VP6ZKE.js} +1 -1
- package/dist/{chunk-ZR5VN5IV.js → chunk-KD2IRYCT.js} +2 -2
- package/dist/{chunk-SKOYC2CF.js → chunk-KK5OYNAF.js} +2 -1
- package/dist/{chunk-UB7TJEKZ.js → chunk-KV3ODJXH.js} +6 -7
- package/dist/chunk-LL5AFXU7.js +96 -0
- package/dist/{chunk-VYOKRN2I.js → chunk-LM3ISVJA.js} +1 -1
- package/dist/{chunk-E6CR5PEV.js → chunk-LV4APO72.js} +8 -2
- package/dist/{chunk-B4EBHPK3.js → chunk-M5KZX5JE.js} +9 -2
- package/dist/{chunk-PJD2KFHX.js → chunk-MDNVHIB2.js} +38 -13
- package/dist/{chunk-V5IGUXMZ.js → chunk-MTMKIUWF.js} +4 -4
- package/dist/{chunk-HVNTQ36V.js → chunk-O37AQNLK.js} +4 -4
- package/dist/{chunk-HMPFGIWM.js → chunk-OMV5W53A.js} +10 -1
- package/dist/chunk-ONL54WMH.js +55 -0
- package/dist/{chunk-AKEZ3G5V.js → chunk-ONQKKHON.js} +1 -1
- package/dist/{chunk-LZHLSQYK.js → chunk-OOWPSBIS.js} +2 -2
- package/dist/{chunk-JQLTG4KH.js → chunk-ORT5IKHP.js} +62 -51
- package/dist/{chunk-4KWOKX2B.js → chunk-OSKJZNBT.js} +1 -1
- package/dist/{chunk-EHQTPVV4.js → chunk-PLTCDSTU.js} +1 -1
- package/dist/{chunk-5OM447RW.js → chunk-PZKHBB7D.js} +1 -1
- package/dist/{chunk-VEB5ERRE.js → chunk-QWNVSR6G.js} +2 -2
- package/dist/{chunk-IG75YMUN.js → chunk-RTPQDNW3.js} +1 -1
- package/dist/{chunk-SVSCLHHI.js → chunk-SZZRIHGT.js} +1 -1
- package/dist/{chunk-EBNI36UQ.js → chunk-T46NR3WP.js} +3 -3
- package/dist/{chunk-FPS3JIPQ.js → chunk-TC7DJTXI.js} +1 -1
- package/dist/{chunk-W5J7R5EB.js → chunk-TEUQWOWZ.js} +1 -1
- package/dist/chunk-THROPJZC.js +115 -0
- package/dist/{chunk-IDBHX5SR.js → chunk-TRQCHF2F.js} +1 -1
- package/dist/{chunk-M3LUNN7F.js → chunk-TYKQ33CL.js} +13 -2
- package/dist/{chunk-VVRL27HM.js → chunk-ULPL26BU.js} +2 -2
- package/dist/{chunk-6AH2XJ3Q.js → chunk-UNXLTJU7.js} +3 -3
- package/dist/{chunk-FC4YTTFJ.js → chunk-UQGFHNDI.js} +2 -3
- package/dist/{chunk-EBJREOKS.js → chunk-UXXJDIYE.js} +4 -4
- package/dist/{chunk-5LUI3WQP.js → chunk-V43UVX4H.js} +1 -1
- package/dist/{chunk-W4XYY73O.js → chunk-VHZ3AXJD.js} +1 -1
- package/dist/{chunk-HJEVSQN6.js → chunk-VL6CUNSX.js} +11 -5
- package/dist/{chunk-XDTYBF2F.js → chunk-W5XCNEZC.js} +39 -1
- package/dist/{chunk-LDJ3J4TQ.js → chunk-WGD2HX2A.js} +1 -1
- package/dist/{chunk-FQCLKD7U.js → chunk-WKEPORNM.js} +1 -1
- package/dist/{chunk-I3KKZ2O3.js → chunk-XEGZHHRH.js} +45 -36
- package/dist/{chunk-IKB6HFGK.js → chunk-XO7PUL4F.js} +6 -4
- package/dist/chunk-XV32RKQZ.js +142 -0
- package/dist/{chunk-TBMDMXEX.js → chunk-YA3AWELW.js} +1 -1
- package/dist/{chunk-HVIX5ECM.js → chunk-YEVG2X5R.js} +1 -1
- package/dist/chunk-YZFLH463.js +215 -0
- package/dist/{chunk-P4BOXB6E.js → chunk-Z6GFMI2Z.js} +6 -7
- package/dist/{chunk-YEKYVJQR.js → chunk-ZNBLFCQS.js} +2 -2
- package/dist/generated/index.d.ts +3 -0
- package/dist/generated/index.js +105 -103
- package/dist/index.js +105 -103
- package/dist/styles.css +1448 -211
- package/package.json +3 -3
- package/dist/AccessDeniedCard-WXM5DBDZ.css +0 -8
- package/dist/DocTabsEditor-RCOWHX5J.css +0 -78
- package/dist/PresenterView-T2C6ZZ3N.css +0 -103
- package/dist/SandboxedFrame-L6HBQZCD.css +0 -50
- package/dist/chunk-CRKFL423.js +0 -74
- package/dist/chunk-MBNFJSZS.js +0 -107
- package/dist/chunk-RV7SZAHR.js +0 -105
- package/dist/chunk-UZ7ZUSLH.js +0 -179
- package/dist/utils/useMediaMatch.d.ts +0 -12
- /package/dist/{chunk-TF2P3OPS.js → chunk-2JJIN6JN.js} +0 -0
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { EmptyState } from './chunk-RA2ULG6H.js';
|
|
2
|
-
import { Card } from './chunk-ACA27MZH.js';
|
|
3
2
|
import { cx } from './chunk-ODEQTPFM.js';
|
|
4
|
-
import './AccessDeniedCard-
|
|
3
|
+
import './AccessDeniedCard-QVNDMT46.css';
|
|
5
4
|
import { ShieldGlyph, LockGlyph, EyeOffGlyph } from '@crewlethq/icons/glyphs';
|
|
6
5
|
import { jsx } from 'react/jsx-runtime';
|
|
7
6
|
|
|
@@ -21,17 +20,17 @@ var LABELS = {
|
|
|
21
20
|
}
|
|
22
21
|
};
|
|
23
22
|
var GLYPHS = {
|
|
24
|
-
"not-found": /* @__PURE__ */ jsx(EyeOffGlyph, { size:
|
|
25
|
-
"no-access": /* @__PURE__ */ jsx(LockGlyph, { size:
|
|
26
|
-
revoked: /* @__PURE__ */ jsx(LockGlyph, { size:
|
|
27
|
-
"app-locked": /* @__PURE__ */ jsx(ShieldGlyph, { size:
|
|
23
|
+
"not-found": /* @__PURE__ */ jsx(EyeOffGlyph, { size: "xl" }),
|
|
24
|
+
"no-access": /* @__PURE__ */ jsx(LockGlyph, { size: "xl" }),
|
|
25
|
+
revoked: /* @__PURE__ */ jsx(LockGlyph, { size: "xl" }),
|
|
26
|
+
"app-locked": /* @__PURE__ */ jsx(ShieldGlyph, { size: "xl" })
|
|
28
27
|
};
|
|
29
28
|
function AccessDeniedCard({ reason, owner, action, headingLevel, className, labels }) {
|
|
30
29
|
const text = {
|
|
31
30
|
titles: { ...LABELS.titles, ...labels?.titles },
|
|
32
31
|
descriptions: { ...LABELS.descriptions, ...labels?.descriptions }
|
|
33
32
|
};
|
|
34
|
-
return /* @__PURE__ */ jsx(
|
|
33
|
+
return /* @__PURE__ */ jsx("div", { className: cx("crewlet-access-denied-card", className), "data-reason": reason, children: /* @__PURE__ */ jsx(
|
|
35
34
|
EmptyState,
|
|
36
35
|
{
|
|
37
36
|
icon: GLYPHS[reason],
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import { SlideStage } from './chunk-LV4APO72.js';
|
|
2
|
+
import { Button } from './chunk-OG6CL3EB.js';
|
|
3
|
+
import { VisuallyHidden } from './chunk-BZFWDIV6.js';
|
|
4
|
+
import { cx } from './chunk-ODEQTPFM.js';
|
|
5
|
+
import './SlideCompare-HTCMPQFY.css';
|
|
6
|
+
import { useState } from 'react';
|
|
7
|
+
import { MinusGlyph, PlusGlyph, PencilGlyph, ArrowUpDownGlyph } from '@crewlethq/icons/glyphs';
|
|
8
|
+
import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
|
|
9
|
+
|
|
10
|
+
var plural = (n, one, many) => `${n} ${n === 1 ? one : many}`;
|
|
11
|
+
var SLIDE_COMPARE_LABELS = {
|
|
12
|
+
changed: "Changed",
|
|
13
|
+
added: "Added",
|
|
14
|
+
removed: "Removed",
|
|
15
|
+
unchanged: "Unchanged",
|
|
16
|
+
moved: (from, to) => `Moved from ${from} to ${to}`,
|
|
17
|
+
missing: "Not in this version",
|
|
18
|
+
summary: (c) => [
|
|
19
|
+
c.changed && plural(c.changed, "slide changed", "slides changed"),
|
|
20
|
+
c.added && plural(c.added, "added", "added"),
|
|
21
|
+
c.removed && plural(c.removed, "removed", "removed"),
|
|
22
|
+
c.moved && plural(c.moved, "moved", "moved")
|
|
23
|
+
].filter(Boolean).join(", ") + ".",
|
|
24
|
+
showUnchanged: (n) => `Show the ${plural(n, "unchanged slide", "unchanged slides")}`,
|
|
25
|
+
hideUnchanged: "Hide the unchanged slides",
|
|
26
|
+
identical: "The two versions hold the same slides, in the same order."
|
|
27
|
+
};
|
|
28
|
+
var MARKS = {
|
|
29
|
+
changed: PencilGlyph,
|
|
30
|
+
added: PlusGlyph,
|
|
31
|
+
removed: MinusGlyph,
|
|
32
|
+
unchanged: null
|
|
33
|
+
};
|
|
34
|
+
function SlideCompare({ rows, fromLabel, toLabel, className, labels }) {
|
|
35
|
+
const text = { ...SLIDE_COMPARE_LABELS, ...labels };
|
|
36
|
+
const [showAll, setShowAll] = useState(false);
|
|
37
|
+
const counts = { changed: 0, added: 0, removed: 0, moved: 0 };
|
|
38
|
+
for (const r of rows) {
|
|
39
|
+
if (r.change !== "unchanged") counts[r.change] += 1;
|
|
40
|
+
if (r.moved) counts.moved += 1;
|
|
41
|
+
}
|
|
42
|
+
const still = rows.filter((r) => r.change === "unchanged" && !r.moved);
|
|
43
|
+
const shown = showAll ? rows : rows.filter((r) => r.change !== "unchanged" || r.moved);
|
|
44
|
+
const differs = counts.changed + counts.added + counts.removed + counts.moved > 0;
|
|
45
|
+
return /* @__PURE__ */ jsxs("div", { className: cx("crewlet-slide-compare", className), children: [
|
|
46
|
+
/* @__PURE__ */ jsx("p", { className: "crewlet-slide-compare__summary", children: differs ? text.summary(counts) : text.identical }),
|
|
47
|
+
shown.length > 0 ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
48
|
+
/* @__PURE__ */ jsxs("div", { className: "crewlet-slide-compare__columns", "aria-hidden": "true", children: [
|
|
49
|
+
/* @__PURE__ */ jsx("span", { children: fromLabel }),
|
|
50
|
+
/* @__PURE__ */ jsx("span", { children: toLabel })
|
|
51
|
+
] }),
|
|
52
|
+
/* @__PURE__ */ jsx("ol", { className: "crewlet-slide-compare__list", children: shown.map((row) => {
|
|
53
|
+
const Mark = MARKS[row.change];
|
|
54
|
+
return /* @__PURE__ */ jsxs("li", { className: "crewlet-slide-compare__row", "data-change": row.change, children: [
|
|
55
|
+
/* @__PURE__ */ jsxs("div", { className: "crewlet-slide-compare__head", children: [
|
|
56
|
+
/* @__PURE__ */ jsxs("span", { className: "crewlet-slide-compare__title", children: [
|
|
57
|
+
row.toPosition ?? row.fromPosition,
|
|
58
|
+
". ",
|
|
59
|
+
row.title
|
|
60
|
+
] }),
|
|
61
|
+
row.change === "unchanged" && row.moved ? null : /* @__PURE__ */ jsxs("span", { className: "crewlet-slide-compare__change", children: [
|
|
62
|
+
Mark ? /* @__PURE__ */ jsx(Mark, { size: "sm" }) : null,
|
|
63
|
+
text[row.change]
|
|
64
|
+
] }),
|
|
65
|
+
row.moved && row.fromPosition !== void 0 && row.toPosition !== void 0 ? /* @__PURE__ */ jsxs("span", { className: "crewlet-slide-compare__change", children: [
|
|
66
|
+
/* @__PURE__ */ jsx(ArrowUpDownGlyph, { size: "sm" }),
|
|
67
|
+
text.moved(row.fromPosition, row.toPosition)
|
|
68
|
+
] }) : null
|
|
69
|
+
] }),
|
|
70
|
+
/* @__PURE__ */ jsx("div", { className: "crewlet-slide-compare__sides", children: [
|
|
71
|
+
{ side: "from", label: fromLabel, node: row.from, at: row.fromPosition },
|
|
72
|
+
{ side: "to", label: toLabel, node: row.to, at: row.toPosition }
|
|
73
|
+
].map((s) => /* @__PURE__ */ jsxs("div", { className: "crewlet-slide-compare__side", "data-side": s.side, children: [
|
|
74
|
+
/* @__PURE__ */ jsx("span", { className: "crewlet-slide-compare__side-label", "aria-hidden": "true", children: s.label }),
|
|
75
|
+
s.node !== void 0 && s.node !== null ? /* @__PURE__ */ jsx(SlideStage, { label: `${s.label}, slide ${s.at ?? ""}, ${row.title}`, framed: true, children: s.node }) : /* @__PURE__ */ jsxs("p", { className: "crewlet-slide-compare__missing", children: [
|
|
76
|
+
/* @__PURE__ */ jsx(VisuallyHidden, { children: `${s.label}: ` }),
|
|
77
|
+
text.missing
|
|
78
|
+
] })
|
|
79
|
+
] }, s.side)) })
|
|
80
|
+
] }, row.key);
|
|
81
|
+
}) })
|
|
82
|
+
] }) : null,
|
|
83
|
+
still.length > 0 ? /* @__PURE__ */ jsx(
|
|
84
|
+
Button,
|
|
85
|
+
{
|
|
86
|
+
className: "crewlet-slide-compare__toggle",
|
|
87
|
+
size: "small",
|
|
88
|
+
variant: "ghost",
|
|
89
|
+
onClick: () => setShowAll((v) => !v),
|
|
90
|
+
children: showAll ? text.hideUnchanged : text.showUnchanged(still.length)
|
|
91
|
+
}
|
|
92
|
+
) : null
|
|
93
|
+
] });
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
export { SLIDE_COMPARE_LABELS, SlideCompare };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { isComposing } from './chunk-R25RGPUB.js';
|
|
2
2
|
import { cx } from './chunk-ODEQTPFM.js';
|
|
3
|
-
import './SlideStage-
|
|
3
|
+
import './SlideStage-S2FISF4C.css';
|
|
4
4
|
import { useRef, useState, useLayoutEffect, useEffect } from 'react';
|
|
5
5
|
import { jsx } from 'react/jsx-runtime';
|
|
6
6
|
|
|
@@ -76,6 +76,7 @@ function SlideStage({
|
|
|
76
76
|
width = SLIDE_WIDTH,
|
|
77
77
|
height = SLIDE_HEIGHT,
|
|
78
78
|
roleDescription = "slide",
|
|
79
|
+
framed = false,
|
|
79
80
|
className
|
|
80
81
|
}) {
|
|
81
82
|
const box = useRef(null);
|
|
@@ -121,7 +122,12 @@ function SlideStage({
|
|
|
121
122
|
"div",
|
|
122
123
|
{
|
|
123
124
|
ref: box,
|
|
124
|
-
className: cx(
|
|
125
|
+
className: cx(
|
|
126
|
+
"crewlet-slide-stage",
|
|
127
|
+
`crewlet-slide-stage--${fit}`,
|
|
128
|
+
framed && fit !== "contain" && "crewlet-slide-stage--framed",
|
|
129
|
+
className
|
|
130
|
+
),
|
|
125
131
|
style: boxStyle,
|
|
126
132
|
role: "group",
|
|
127
133
|
"aria-roledescription": roleDescription,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Count } from './chunk-BHHIIK3M.js';
|
|
2
2
|
import { cx } from './chunk-ODEQTPFM.js';
|
|
3
|
-
import './ArrangeGroup-
|
|
3
|
+
import './ArrangeGroup-KRWWOJKR.css';
|
|
4
4
|
import { useId } from 'react';
|
|
5
5
|
import { ChevronDownGlyph } from '@crewlethq/icons/glyphs';
|
|
6
6
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
@@ -9,6 +9,7 @@ var PLACEHOLDER = "Name this group";
|
|
|
9
9
|
function ArrangeGroup({
|
|
10
10
|
title,
|
|
11
11
|
tone = "none",
|
|
12
|
+
variant = "band",
|
|
12
13
|
collapsed,
|
|
13
14
|
onCollapsedChange,
|
|
14
15
|
count,
|
|
@@ -27,7 +28,13 @@ function ArrangeGroup({
|
|
|
27
28
|
return /* @__PURE__ */ jsxs(
|
|
28
29
|
"section",
|
|
29
30
|
{
|
|
30
|
-
className: cx(
|
|
31
|
+
className: cx(
|
|
32
|
+
"crewlet-arrange-group",
|
|
33
|
+
`crewlet-arrange-group--${tone}`,
|
|
34
|
+
variant === "section" && "crewlet-arrange-group--section",
|
|
35
|
+
collapsed && "is-collapsed",
|
|
36
|
+
className
|
|
37
|
+
),
|
|
31
38
|
"aria-label": title || "Untitled group",
|
|
32
39
|
...rest,
|
|
33
40
|
children: [
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { Note } from './chunk-
|
|
2
|
-
import { CanvasToolbar, toolForKey } from './chunk-
|
|
3
|
-
import { IDENTITY_VIEW, Canvas } from './chunk-
|
|
1
|
+
import { Note } from './chunk-5SZGKSGL.js';
|
|
2
|
+
import { CanvasToolbar, toolForKey } from './chunk-GLSOD5Z4.js';
|
|
3
|
+
import { IDENTITY_VIEW, Canvas } from './chunk-22UEIXZE.js';
|
|
4
4
|
import { IconButton } from './chunk-4FQT6ZAY.js';
|
|
5
5
|
import { cx } from './chunk-ODEQTPFM.js';
|
|
6
|
-
import './CanvasBoard-
|
|
6
|
+
import './CanvasBoard-5NNSKY6A.css';
|
|
7
7
|
import { useState, useRef, useImperativeHandle, useCallback, useMemo, useEffect } from 'react';
|
|
8
8
|
import { MaximizeGlyph, PencilGlyph, TrashGlyph, MousePointer2Glyph, HandGlyph, TypeGlyph, StickyNoteGlyph } from '@crewlethq/icons/glyphs';
|
|
9
9
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
10
10
|
|
|
11
11
|
// src/CanvasBoard/budget.ts
|
|
12
12
|
var CANVAS_BOARD_MAX_LIVE = 12;
|
|
13
|
-
var CANVAS_BOARD_MIN_LIVE_WIDTH =
|
|
13
|
+
var CANVAS_BOARD_MIN_LIVE_WIDTH = 96;
|
|
14
14
|
function liveBoards(boards, view, viewport, max = CANVAS_BOARD_MAX_LIVE, minWidth = CANVAS_BOARD_MIN_LIVE_WIDTH) {
|
|
15
15
|
if (max <= 0 || viewport.width <= 0 || viewport.height <= 0) return [];
|
|
16
16
|
const ranked = [];
|
|
@@ -203,6 +203,16 @@ function useFrameGestures(zoom, minSide, maxSide, commit) {
|
|
|
203
203
|
});
|
|
204
204
|
return { preview, handle, pointer };
|
|
205
205
|
}
|
|
206
|
+
var sameSelection = (a, b) => a === b || a !== null && b !== null && a.kind === b.kind && a.id === b.id;
|
|
207
|
+
function boardRoom(width, height) {
|
|
208
|
+
const title = width >= BOARD_TITLE_MIN_WIDTH;
|
|
209
|
+
if (width >= PLACEHOLDER_FULL.width && height >= PLACEHOLDER_FULL.height) return { title, lines: 2 };
|
|
210
|
+
if (width >= PLACEHOLDER_SIZE.width && height >= PLACEHOLDER_SIZE.height) return { title, lines: 1 };
|
|
211
|
+
return { title, lines: 0 };
|
|
212
|
+
}
|
|
213
|
+
var BOARD_TITLE_MIN_WIDTH = 40;
|
|
214
|
+
var PLACEHOLDER_SIZE = { width: 96, height: 32 };
|
|
215
|
+
var PLACEHOLDER_FULL = { width: 200, height: 64 };
|
|
206
216
|
var TYPING = "input, textarea, select, [contenteditable='true']";
|
|
207
217
|
function CanvasBoard({
|
|
208
218
|
label,
|
|
@@ -220,6 +230,8 @@ function CanvasBoard({
|
|
|
220
230
|
onNoteCreate,
|
|
221
231
|
onOpen,
|
|
222
232
|
onActivate,
|
|
233
|
+
selected: heldSelection,
|
|
234
|
+
onSelectedChange,
|
|
223
235
|
controlsExtra,
|
|
224
236
|
toolbar = true,
|
|
225
237
|
labels,
|
|
@@ -232,7 +244,13 @@ function CanvasBoard({
|
|
|
232
244
|
const [viewport, setViewport] = useState({ width: 0, height: 0 });
|
|
233
245
|
const [active, setActive] = useState(null);
|
|
234
246
|
const [editing, setEditing] = useState(null);
|
|
235
|
-
const [
|
|
247
|
+
const [ownSelection, setOwnSelection] = useState(null);
|
|
248
|
+
const selected = heldSelection !== void 0 ? heldSelection : ownSelection;
|
|
249
|
+
const setSelected = (next) => {
|
|
250
|
+
if (sameSelection(next, selected)) return;
|
|
251
|
+
if (heldSelection === void 0) setOwnSelection(next);
|
|
252
|
+
onSelectedChange?.(next);
|
|
253
|
+
};
|
|
236
254
|
const [chosenTool, setTool] = useState("move");
|
|
237
255
|
const [spaceHeld, setSpaceHeld] = useState(false);
|
|
238
256
|
const canvas = useRef(null);
|
|
@@ -363,7 +381,7 @@ function CanvasBoard({
|
|
|
363
381
|
label,
|
|
364
382
|
content,
|
|
365
383
|
largestItemWidth: largest || void 0,
|
|
366
|
-
ground: "
|
|
384
|
+
ground: "grid",
|
|
367
385
|
cursor: TOOL_CURSOR[acting],
|
|
368
386
|
minZoom: CANVAS_BOARD_MIN_ZOOM,
|
|
369
387
|
refitOnResize: true,
|
|
@@ -382,10 +400,12 @@ function CanvasBoard({
|
|
|
382
400
|
const isLive = live.has(b.id);
|
|
383
401
|
const isActive = !editable && active === b.id && isLive;
|
|
384
402
|
const chosen = isSelected("board", b.id);
|
|
403
|
+
const room = boardRoom(b.w * view.k, b.h * view.k);
|
|
385
404
|
return /* @__PURE__ */ jsxs(
|
|
386
405
|
"section",
|
|
387
406
|
{
|
|
388
407
|
className: "crewlet-canvas-board__board",
|
|
408
|
+
"data-untitled": !room.title || void 0,
|
|
389
409
|
"data-live": isLive || void 0,
|
|
390
410
|
"data-active": isActive || void 0,
|
|
391
411
|
"data-selected": chosen || void 0,
|
|
@@ -423,6 +443,7 @@ function CanvasBoard({
|
|
|
423
443
|
{
|
|
424
444
|
size: "sm",
|
|
425
445
|
variant: "ghost",
|
|
446
|
+
className: "crewlet-canvas-board__open",
|
|
426
447
|
label: text.open(b.title),
|
|
427
448
|
icon: /* @__PURE__ */ jsx(MaximizeGlyph, {}),
|
|
428
449
|
onClick: () => onOpen(b.id)
|
|
@@ -430,11 +451,15 @@ function CanvasBoard({
|
|
|
430
451
|
)
|
|
431
452
|
] }),
|
|
432
453
|
/* @__PURE__ */ jsxs("div", { className: "crewlet-canvas-board__body", children: [
|
|
433
|
-
isLive ? renderBoard(b) :
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
454
|
+
isLive ? renderBoard(b) : (
|
|
455
|
+
// NAMED BY ITS TITLE ABOVE IT, as a live board is, so it
|
|
456
|
+
// says only what a running board does not: its size and
|
|
457
|
+
// why it is not running, as much of that as fits.
|
|
458
|
+
/* @__PURE__ */ jsx("div", { className: "crewlet-canvas-board__placeholder", children: room.lines > 0 && /* @__PURE__ */ jsxs("span", { className: "crewlet-canvas-board__placeholder-text", children: [
|
|
459
|
+
/* @__PURE__ */ jsx("span", { className: "crewlet-canvas-board__placeholder-size", children: text.size(b.w, b.h) }),
|
|
460
|
+
room.lines > 1 && /* @__PURE__ */ jsx("span", { children: text.paused })
|
|
461
|
+
] }) })
|
|
462
|
+
),
|
|
438
463
|
!isActive && // A press here pans the canvas like the field around it;
|
|
439
464
|
// a click selects the board and a double-click hands a
|
|
440
465
|
// live board the pointer. The board's page stays
|
|
@@ -639,4 +664,4 @@ function NoteView({
|
|
|
639
664
|
return /* @__PURE__ */ jsx("div", { className: "crewlet-canvas-board__note", "data-kind": "title", style: frame, ...paper, children: body });
|
|
640
665
|
}
|
|
641
666
|
|
|
642
|
-
export { CANVAS_BOARD_MAX_LIVE, CANVAS_BOARD_MIN_LIVE_WIDTH, CANVAS_BOARD_MIN_ZOOM, CANVAS_NOTE_COLORS, CanvasBoard, TITLE_GLYPH_EM, liveBoards, titleSize };
|
|
667
|
+
export { BOARD_TITLE_MIN_WIDTH, CANVAS_BOARD_MAX_LIVE, CANVAS_BOARD_MIN_LIVE_WIDTH, CANVAS_BOARD_MIN_ZOOM, CANVAS_NOTE_COLORS, CanvasBoard, TITLE_GLYPH_EM, boardRoom, liveBoards, titleSize };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { richEditorLabels } from './chunk-
|
|
2
|
-
import { Skeleton } from './chunk-
|
|
3
|
-
import { Callout } from './chunk-
|
|
1
|
+
import { richEditorLabels } from './chunk-4B6LSFDS.js';
|
|
2
|
+
import { Skeleton } from './chunk-TEUQWOWZ.js';
|
|
3
|
+
import { Callout } from './chunk-SZZRIHGT.js';
|
|
4
4
|
import { Button } from './chunk-OG6CL3EB.js';
|
|
5
5
|
import './RichEditor-NPD2KAPS.css';
|
|
6
6
|
import { forwardRef, useState, useEffect } from 'react';
|
|
@@ -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-UUZ7XKCU.js').then(
|
|
13
13
|
(module) => {
|
|
14
14
|
engine = module.Editor;
|
|
15
15
|
return engine;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { Skeleton } from './chunk-
|
|
2
|
-
import { Modal } from './chunk-
|
|
1
|
+
import { Skeleton } from './chunk-TEUQWOWZ.js';
|
|
2
|
+
import { Modal } from './chunk-XEGZHHRH.js';
|
|
3
3
|
import { useListbox, useOptionKeys } from './chunk-F73MC7EZ.js';
|
|
4
|
-
import { Popover } from './chunk-
|
|
4
|
+
import { Popover } from './chunk-K3IJQNB7.js';
|
|
5
5
|
import { KeyChip, highlightMatch } from './chunk-FYTIJM2T.js';
|
|
6
6
|
import { Input } from './chunk-6QFAK2WV.js';
|
|
7
|
-
import { useMediaMatch } from './chunk-
|
|
7
|
+
import { useMediaMatch } from './chunk-RTPQDNW3.js';
|
|
8
8
|
import { focusables, isComposing } from './chunk-R25RGPUB.js';
|
|
9
9
|
import { announce } from './chunk-RSAQOKH3.js';
|
|
10
10
|
import { VisuallyHidden } from './chunk-BZFWDIV6.js';
|
|
@@ -23,6 +23,15 @@ function placePopup(anchor, size, bounds, gap = LAYER_GAP, prefer = "below") {
|
|
|
23
23
|
function viewportBounds() {
|
|
24
24
|
return { x: 0, y: 0, width: window.innerWidth, height: window.innerHeight };
|
|
25
25
|
}
|
|
26
|
+
function anchorGone(anchor, host, inHost) {
|
|
27
|
+
const own = {
|
|
28
|
+
x: anchor.left - (inHost ? host.x : 0),
|
|
29
|
+
y: anchor.top - (inHost ? host.y : 0),
|
|
30
|
+
width: anchor.width,
|
|
31
|
+
height: anchor.height
|
|
32
|
+
};
|
|
33
|
+
return outsideBounds(own, { x: 0, y: 0, width: host.width, height: host.height });
|
|
34
|
+
}
|
|
26
35
|
function outsideBounds(anchor, bounds) {
|
|
27
36
|
return anchor.x + anchor.width < bounds.x || anchor.y + anchor.height < bounds.y || anchor.x > bounds.x + bounds.width || anchor.y > bounds.y + bounds.height;
|
|
28
37
|
}
|
|
@@ -40,4 +49,4 @@ function useLayerContainer() {
|
|
|
40
49
|
return typeof document === "undefined" ? null : document.body;
|
|
41
50
|
}
|
|
42
51
|
|
|
43
|
-
export { LAYER_GAP, LAYER_REPOSITION_EVENT, LayerHost, outsideBounds, placePopup, useLayerContainer, viewportBounds };
|
|
52
|
+
export { LAYER_GAP, LAYER_REPOSITION_EVENT, LayerHost, anchorGone, outsideBounds, placePopup, useLayerContainer, viewportBounds };
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { useRoving } from './chunk-RKKO7QHH.js';
|
|
2
|
+
import { cx } from './chunk-ODEQTPFM.js';
|
|
3
|
+
import './LayersList-NQZEIPZB.css';
|
|
4
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
5
|
+
|
|
6
|
+
var LAYERS_LIST_LABELS = {
|
|
7
|
+
openable: (label) => `${label}, press Enter or double-click to open`
|
|
8
|
+
};
|
|
9
|
+
function LayersList({
|
|
10
|
+
label,
|
|
11
|
+
items,
|
|
12
|
+
selected = null,
|
|
13
|
+
onSelect,
|
|
14
|
+
onOpen,
|
|
15
|
+
heading,
|
|
16
|
+
labels,
|
|
17
|
+
className
|
|
18
|
+
}) {
|
|
19
|
+
const text = { ...LAYERS_LIST_LABELS, ...labels };
|
|
20
|
+
const roving = useRoving(items.length, null, { followFocus: true });
|
|
21
|
+
const picked = items.findIndex((item) => item.id === selected);
|
|
22
|
+
const stop = roving.focused ?? Math.max(0, picked);
|
|
23
|
+
const onKeyDown = (event, id) => {
|
|
24
|
+
if (event.key === "Enter" && onOpen) {
|
|
25
|
+
event.preventDefault();
|
|
26
|
+
onOpen(id);
|
|
27
|
+
return;
|
|
28
|
+
}
|
|
29
|
+
roving.onKeyDown(event, true);
|
|
30
|
+
};
|
|
31
|
+
return /* @__PURE__ */ jsxs("nav", { className: cx("crewlet-layers-list", className), "aria-label": label, children: [
|
|
32
|
+
heading !== void 0 && heading !== null ? /* @__PURE__ */ jsx("div", { className: "crewlet-layers-list__heading", children: heading }) : null,
|
|
33
|
+
/* @__PURE__ */ jsx("ol", { className: "crewlet-layers-list__items", children: items.map((item, index) => /* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsx(
|
|
34
|
+
"button",
|
|
35
|
+
{
|
|
36
|
+
type: "button",
|
|
37
|
+
ref: (el) => {
|
|
38
|
+
roving.buttons.current[index] = el;
|
|
39
|
+
},
|
|
40
|
+
className: "crewlet-layers-list__item",
|
|
41
|
+
"aria-label": onOpen ? text.openable(item.label) : void 0,
|
|
42
|
+
"aria-current": item.id === selected ? "true" : void 0,
|
|
43
|
+
title: item.label,
|
|
44
|
+
tabIndex: index === stop ? 0 : -1,
|
|
45
|
+
onFocus: () => roving.onFocusAt(index),
|
|
46
|
+
onClick: () => onSelect?.(item.id),
|
|
47
|
+
onDoubleClick: onOpen ? () => onOpen(item.id) : void 0,
|
|
48
|
+
onKeyDown: (event) => onKeyDown(event, item.id),
|
|
49
|
+
children: item.label
|
|
50
|
+
}
|
|
51
|
+
) }, item.id)) })
|
|
52
|
+
] });
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
export { LAYERS_LIST_LABELS, LayersList };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Toolbar } from './chunk-PGRPNDWM.js';
|
|
2
|
-
import { SegmentedControl } from './chunk-
|
|
3
|
-
import { tabId } from './chunk-
|
|
2
|
+
import { SegmentedControl } from './chunk-CCAXYHQS.js';
|
|
3
|
+
import { tabId } from './chunk-VL6CUNSX.js';
|
|
4
4
|
import { IconButton } from './chunk-4FQT6ZAY.js';
|
|
5
5
|
import { cx } from './chunk-ODEQTPFM.js';
|
|
6
6
|
import './MarkdownEditor-WOKV7CLK.css';
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { Select } from './chunk-
|
|
1
|
+
import { Select } from './chunk-UQGFHNDI.js';
|
|
2
2
|
import { CopyButton } from './chunk-W46LPU4R.js';
|
|
3
|
-
import { Modal } from './chunk-
|
|
4
|
-
import { Callout } from './chunk-
|
|
5
|
-
import { PrincipalAvatar } from './chunk-
|
|
3
|
+
import { Modal } from './chunk-XEGZHHRH.js';
|
|
4
|
+
import { Callout } from './chunk-SZZRIHGT.js';
|
|
5
|
+
import { PrincipalAvatar } from './chunk-CI3VPIJN.js';
|
|
6
6
|
import { useHeadingLevel, headingTag } from './chunk-PQADV6P6.js';
|
|
7
|
-
import { useMediaMatch } from './chunk-
|
|
7
|
+
import { useMediaMatch } from './chunk-RTPQDNW3.js';
|
|
8
8
|
import { Button } from './chunk-OG6CL3EB.js';
|
|
9
9
|
import { IconButton } from './chunk-4FQT6ZAY.js';
|
|
10
10
|
import { cx } from './chunk-ODEQTPFM.js';
|
|
11
|
-
import './ShareDialog-
|
|
11
|
+
import './ShareDialog-4QDCBWMH.css';
|
|
12
12
|
import { useState, useId } from 'react';
|
|
13
13
|
import { breakpoint } from '@crewlethq/tokens';
|
|
14
14
|
import { XGlyph } from '@crewlethq/icons/glyphs';
|
|
@@ -43,6 +43,7 @@ var LABELS = {
|
|
|
43
43
|
},
|
|
44
44
|
roleFor: (name) => `Role for ${name}`,
|
|
45
45
|
remove: (name) => `Remove ${name}`,
|
|
46
|
+
noAccess: "No access",
|
|
46
47
|
saving: "Saving",
|
|
47
48
|
busy: "Wait for the change to finish.",
|
|
48
49
|
agentNote: (name, role) => `${name} can ${AGENT_CAN[role]}.`,
|
|
@@ -143,52 +144,62 @@ function ShareDialog({
|
|
|
143
144
|
/* @__PURE__ */ jsx(Heading, { id: audienceId, className: "crewlet-share-dialog__heading", children: text.audience }),
|
|
144
145
|
/* @__PURE__ */ jsx("ul", { className: "crewlet-share-dialog__audience", children: audience.map((row) => {
|
|
145
146
|
const direct = row.via === void 0 && row.role !== "owner";
|
|
146
|
-
const
|
|
147
|
-
const
|
|
148
|
-
const
|
|
147
|
+
const invalid = row.invalid !== void 0 && row.invalid !== "";
|
|
148
|
+
const editable = !invalid && !readOnly && onRoleChange !== void 0 && (row.editable ?? direct);
|
|
149
|
+
const removable = !readOnly && onRemove !== void 0 && (invalid ? row.removable ?? true : row.removable ?? (row.editable ?? direct));
|
|
150
|
+
const rowNote = invalid ? void 0 : row.note ?? (row.principal.kind === "agent" ? text.agentNote(row.principal.name, row.role) : void 0);
|
|
149
151
|
const detail = row.via ?? row.principal.detail;
|
|
150
|
-
return /* @__PURE__ */ jsxs(
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
152
|
+
return /* @__PURE__ */ jsxs(
|
|
153
|
+
"li",
|
|
154
|
+
{
|
|
155
|
+
className: cx("crewlet-share-dialog__row", row.pending && "is-pending", invalid && "is-invalid"),
|
|
156
|
+
"aria-busy": row.pending || void 0,
|
|
157
|
+
children: [
|
|
158
|
+
/* @__PURE__ */ jsx(PrincipalAvatar, { principal: row.principal, size: "md" }),
|
|
159
|
+
/* @__PURE__ */ jsxs("span", { className: "crewlet-share-dialog__who", children: [
|
|
160
|
+
/* @__PURE__ */ jsxs("span", { className: "crewlet-share-dialog__name", children: [
|
|
161
|
+
row.principal.name,
|
|
162
|
+
row.self ? /* @__PURE__ */ jsxs("span", { className: "crewlet-share-dialog__you", children: [
|
|
163
|
+
" ",
|
|
164
|
+
text.you
|
|
165
|
+
] }) : null
|
|
166
|
+
] }),
|
|
167
|
+
detail ? /* @__PURE__ */ jsx("span", { className: "crewlet-share-dialog__detail", children: detail }) : null
|
|
168
|
+
] }),
|
|
169
|
+
/* @__PURE__ */ jsxs("span", { className: "crewlet-share-dialog__controls", children: [
|
|
170
|
+
row.pending ? /* @__PURE__ */ jsx("span", { className: "crewlet-share-dialog__saving", children: text.saving }) : null,
|
|
171
|
+
editable && row.role !== "owner" ? /* @__PURE__ */ jsx(
|
|
172
|
+
Select,
|
|
173
|
+
{
|
|
174
|
+
value: row.role,
|
|
175
|
+
options: roleOptions,
|
|
176
|
+
onChange: (value) => onRoleChange(row, value),
|
|
177
|
+
ariaLabel: text.roleFor(row.principal.name),
|
|
178
|
+
disabled: row.pending ?? false,
|
|
179
|
+
size: "sm",
|
|
180
|
+
width: "auto",
|
|
181
|
+
align: "right"
|
|
182
|
+
}
|
|
183
|
+
) : /* @__PURE__ */ jsx("span", { className: "crewlet-share-dialog__role", children: invalid ? text.noAccess : text.roles[row.role] }),
|
|
184
|
+
removable ? /* @__PURE__ */ jsx(
|
|
185
|
+
IconButton,
|
|
186
|
+
{
|
|
187
|
+
label: text.remove(row.principal.name),
|
|
188
|
+
icon: /* @__PURE__ */ jsx(XGlyph, {}),
|
|
189
|
+
size: "sm",
|
|
190
|
+
variant: "ghost",
|
|
191
|
+
disabledReason: row.pending ? text.busy : void 0,
|
|
192
|
+
onClick: () => onRemove(row)
|
|
193
|
+
}
|
|
194
|
+
) : null
|
|
195
|
+
] }),
|
|
196
|
+
rowNote ? /* @__PURE__ */ jsx("span", { className: "crewlet-share-dialog__note", children: rowNote }) : null,
|
|
197
|
+
invalid ? /* @__PURE__ */ jsx("span", { className: "crewlet-share-dialog__invalid", children: row.invalid }) : null,
|
|
198
|
+
/* @__PURE__ */ jsx("span", { className: "crewlet-share-dialog__refusal", "aria-live": "polite", children: row.refusal ?? "" })
|
|
199
|
+
]
|
|
200
|
+
},
|
|
201
|
+
row.id
|
|
202
|
+
);
|
|
192
203
|
}) })
|
|
193
204
|
] }),
|
|
194
205
|
/* @__PURE__ */ jsxs("section", { className: "crewlet-share-dialog__section", "aria-labelledby": companyId, "aria-busy": companyPending || void 0, children: [
|
|
@@ -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-CCAXYHQS.js';
|
|
3
3
|
import { EmptyState } from './chunk-RA2ULG6H.js';
|
|
4
4
|
import { useHeadingLevel, headingTag, nextHeadingLevel, HeadingLevelProvider } from './chunk-PQADV6P6.js';
|
|
5
5
|
import { cx } from './chunk-ODEQTPFM.js';
|
|
@@ -20,7 +20,7 @@ function avatarInitialsName(name, kind) {
|
|
|
20
20
|
var AVATAR_CHARACTER_FULL_DETAIL = 56;
|
|
21
21
|
var getInitials = (name) => {
|
|
22
22
|
if (!name) return "?";
|
|
23
|
-
const words = name.trim().split(/[\s\-_
|
|
23
|
+
const words = name.trim().split(/[\s\-_.:]+/).map((word2) => word2.replace(/^\p{P}+|\p{P}+$/gu, "")).filter(Boolean);
|
|
24
24
|
if (words.length === 0) return "?";
|
|
25
25
|
const first = (word2) => (Array.from(word2)[0] ?? "").toUpperCase();
|
|
26
26
|
if (words.length >= 2) return words.slice(0, 2).map(first).join("") || "?";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useTreeState, treeExpandable, treeLevel, treePosInSet, treeSetSize, treeItemAction, treePrevious, treeNext, treeStep } from './chunk-MY374UUD.js';
|
|
2
|
-
import { LayerNodeBridge } from './chunk-
|
|
3
|
-
import { LayerHost, LAYER_REPOSITION_EVENT } from './chunk-
|
|
2
|
+
import { LayerNodeBridge } from './chunk-LM3ISVJA.js';
|
|
3
|
+
import { LayerHost, LAYER_REPOSITION_EVENT } from './chunk-OMV5W53A.js';
|
|
4
4
|
import { focusables } from './chunk-R25RGPUB.js';
|
|
5
5
|
import { IconButton } from './chunk-4FQT6ZAY.js';
|
|
6
6
|
import { VisuallyHidden } from './chunk-BZFWDIV6.js';
|