@crewlethq/ui 0.31.1 → 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 +151 -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 +81 -4
- package/dist/Canvas/ShortcutTip.d.ts +22 -0
- package/dist/Canvas/geometry.d.ts +13 -3
- package/dist/Canvas/index.d.ts +4 -2
- package/dist/Canvas/index.js +5 -3
- package/dist/{Canvas-YVXHMWLN.css → Canvas-VUG2HLZK.css} +62 -3
- package/dist/CanvasBoard/CanvasBoard.d.ts +110 -12
- package/dist/CanvasBoard/budget.d.ts +9 -3
- package/dist/CanvasBoard/index.d.ts +2 -2
- package/dist/CanvasBoard/index.js +9 -5
- package/dist/CanvasBoard-5NNSKY6A.css +462 -0
- package/dist/CanvasToolbar/CanvasToolbar.d.ts +48 -0
- package/dist/CanvasToolbar/index.d.ts +3 -0
- package/dist/CanvasToolbar/index.js +12 -0
- package/dist/CanvasToolbar-EM5EVZED.css +34 -0
- 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 +9 -9
- 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-YZ7KG2RD.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 +10 -10
- 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 +14 -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 +6 -4
- 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-OJ45PPCV.js → chunk-22UEIXZE.js} +127 -32
- 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-S6VG5ZFZ.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-RODMM35O.js → chunk-7Q7WDXHG.js} +5 -5
- 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-CT4EZF62.js → chunk-G4ZW7A2W.js} +125 -33
- package/dist/chunk-GLSOD5Z4.js +33 -0
- 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-3C3BRIMY.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-O63MWA4G.js → chunk-LV4APO72.js} +10 -3
- package/dist/{chunk-B4EBHPK3.js → chunk-M5KZX5JE.js} +9 -2
- package/dist/{chunk-JODJS7MR.js → chunk-MDNVHIB2.js} +276 -47
- package/dist/{chunk-VOX3YRFO.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 +4 -0
- package/dist/generated/index.js +107 -104
- package/dist/index.js +107 -104
- package/dist/styles.css +1648 -235
- package/package.json +3 -3
- package/dist/AccessDeniedCard-WXM5DBDZ.css +0 -8
- package/dist/CanvasBoard-ZLPDINSM.css +0 -236
- package/dist/DocTabsEditor-RCOWHX5J.css +0 -78
- package/dist/PresenterView-T2C6ZZ3N.css +0 -103
- package/dist/SandboxedFrame-L6HBQZCD.css +0 -50
- package/dist/chunk-ALMSY7RL.js +0 -74
- package/dist/chunk-LR5QTFOE.js +0 -105
- package/dist/chunk-OGAAHVF6.js +0 -107
- package/dist/chunk-UZ7ZUSLH.js +0 -179
- package/dist/utils/useMediaMatch.d.ts +0 -12
- /package/dist/{chunk-OC46246T.js → chunk-2JJIN6JN.js} +0 -0
|
@@ -11,23 +11,46 @@
|
|
|
11
11
|
* [CANVAS_BOARD_MAX_LIVE] at once; every other board draws as a placeholder of
|
|
12
12
|
* its size, so a canvas of sixty boards runs a dozen pages, not sixty.
|
|
13
13
|
*
|
|
14
|
+
* TOOLS, AS A DESIGN TOOL HAS THEM (CanvasToolbar). Move (`V`) selects: a
|
|
15
|
+
* click on a board or a note selects it, a click on the field clears it, and
|
|
16
|
+
* the pointer is the arrow. Hand (`H`, or Space held) pans whatever is under
|
|
17
|
+
* the pointer, boards included, with the open hand. An editable canvas that
|
|
18
|
+
* can create notes adds Text (`T`) and Sticky (`S`): a click on the field
|
|
19
|
+
* places one there, opens it for typing, and hands back the Move tool. The
|
|
20
|
+
* pointer is always the tool's (the Canvas cursors), and a pan in progress is
|
|
21
|
+
* always the closed hand.
|
|
22
|
+
*
|
|
14
23
|
* A PAGE INSIDE A BOARD NEVER TAKES THE CANVAS'S POINTER BY SURPRISE. A live
|
|
15
24
|
* board is covered by a shield that pans the canvas like the field around it;
|
|
16
|
-
* a click
|
|
17
|
-
* receive the pointer. Escape gives the pointer back to the
|
|
25
|
+
* a click on it selects the board, a double-click activates it, and only then
|
|
26
|
+
* does the page receive the pointer. Escape gives the pointer back to the
|
|
27
|
+
* canvas, and a second Escape clears the selection.
|
|
28
|
+
*
|
|
29
|
+
* EDITING (`editable`). A board's name becomes its move handle and a selected
|
|
30
|
+
* item's corners its resize handles, by pointer or, on the bottom right
|
|
31
|
+
* corner, by the arrow keys (Shift for a larger step); a note is moved by its
|
|
32
|
+
* own paper or its handle, retyped on a double-click, and deleted with Delete
|
|
33
|
+
* while selected. Each finished gesture is reported once, with whole canvas
|
|
34
|
+
* pixels, and the caller decides what a change is (for a design, a new
|
|
35
|
+
* version of its canvas).
|
|
18
36
|
*
|
|
19
|
-
*
|
|
20
|
-
*
|
|
21
|
-
*
|
|
22
|
-
*
|
|
23
|
-
*
|
|
37
|
+
* HOVER AND SELECTION ARE OUTLINES IN THE ACCENT, at one screen pixel and two,
|
|
38
|
+
* over a board's own hairline edge; hovering a board's name outlines its board,
|
|
39
|
+
* because the name is how a reader picks a board out of a crowded canvas. The
|
|
40
|
+
* selection is the component's own unless the caller holds it (`selected`
|
|
41
|
+
* with `onSelectedChange`), which is how a list of boards beside the canvas
|
|
42
|
+
* marks the board picked on it and picks one there.
|
|
24
43
|
*
|
|
25
|
-
* THE CHROME STAYS ONE SIZE ON SCREEN. Titles and handles
|
|
26
|
-
* by the zoom, so a board's label is readable
|
|
27
|
-
*
|
|
44
|
+
* THE CHROME STAYS ONE SIZE ON SCREEN. Titles, edges, outlines and handles
|
|
45
|
+
* are counter-scaled by the zoom, so a board's label is readable, its edge is
|
|
46
|
+
* a hairline and its handle is a full pointer target whatever the zoom, while
|
|
47
|
+
* the board itself scales with the canvas. What a board says is held to the
|
|
48
|
+
* room it is drawn in (`boardRoom`): a name too narrow to read is not drawn,
|
|
49
|
+
* and a placeholder drops the lines it has no room for rather than spill them
|
|
50
|
+
* over the boards beside it.
|
|
28
51
|
*/
|
|
29
52
|
import { type ReactNode, type Ref } from 'react';
|
|
30
|
-
import { type CanvasHandle, type CanvasLabels } from '../Canvas/index.js';
|
|
53
|
+
import { type CanvasHandle, type CanvasLabels, type CanvasPoint } from '../Canvas/index.js';
|
|
31
54
|
/** An artboard: an id, its frame in canvas pixels and its title. */
|
|
32
55
|
export interface CanvasBoardItem {
|
|
33
56
|
id: string;
|
|
@@ -41,6 +64,17 @@ export interface CanvasBoardItem {
|
|
|
41
64
|
export type CanvasNoteColor = 'yellow' | 'pink' | 'blue' | 'green' | 'purple';
|
|
42
65
|
/** Every sticky colour, the first being a sticky's default. */
|
|
43
66
|
export declare const CANVAS_NOTE_COLORS: readonly ["yellow", "pink", "blue", "green", "purple"];
|
|
67
|
+
/**
|
|
68
|
+
* The type size a title is set in, in canvas pixels: as large as its box's
|
|
69
|
+
* height allows (three fifths of it), and no larger than lets its text run
|
|
70
|
+
* the box's width on one line, measured at an average glyph of
|
|
71
|
+
* [TITLE_GLYPH_EM] of the size. A long title is set smaller rather than run
|
|
72
|
+
* past its box over the boards beside it; the box clips whatever an unusually
|
|
73
|
+
* wide face still overruns.
|
|
74
|
+
*/
|
|
75
|
+
export declare function titleSize(note: Pick<CanvasBoardNote, 'w' | 'h' | 'text'>): number;
|
|
76
|
+
/** The average advance of a title's glyph, as a share of its size. */
|
|
77
|
+
export declare const TITLE_GLYPH_EM = 0.58;
|
|
44
78
|
/** A note: a title over a group of boards, or a sticky beside them. */
|
|
45
79
|
export interface CanvasBoardNote {
|
|
46
80
|
id: string;
|
|
@@ -52,6 +86,11 @@ export interface CanvasBoardNote {
|
|
|
52
86
|
text: string;
|
|
53
87
|
color?: CanvasNoteColor | undefined;
|
|
54
88
|
}
|
|
89
|
+
/** What is selected on a board canvas: one board or one note. */
|
|
90
|
+
export interface CanvasBoardSelection {
|
|
91
|
+
kind: 'board' | 'note';
|
|
92
|
+
id: string;
|
|
93
|
+
}
|
|
55
94
|
/** A frame as an edit reports it. */
|
|
56
95
|
export interface CanvasBoardRect {
|
|
57
96
|
x: number;
|
|
@@ -79,7 +118,32 @@ export interface CanvasBoardLabels {
|
|
|
79
118
|
paused: string;
|
|
80
119
|
/** Said by an active board, so a reader knows how to give the pointer back. */
|
|
81
120
|
active: string;
|
|
121
|
+
/** Said by a selected live board, so a reader knows how to use its page. */
|
|
122
|
+
interact: string;
|
|
123
|
+
/** The tool palette's name. */
|
|
124
|
+
tools: string;
|
|
125
|
+
/** Each tool's name. */
|
|
126
|
+
moveTool: string;
|
|
127
|
+
handTool: string;
|
|
128
|
+
textTool: string;
|
|
129
|
+
stickyTool: string;
|
|
82
130
|
}
|
|
131
|
+
/**
|
|
132
|
+
* The tools a board canvas offers. Move and Hand always; Text and Sticky only
|
|
133
|
+
* where a person may edit and the caller places notes (`onNoteCreate`).
|
|
134
|
+
*
|
|
135
|
+
* NO FRAME TOOL. A board is a page an agent or an upload made, with a file
|
|
136
|
+
* behind it, and an empty frame drawn here would be a board with nothing to
|
|
137
|
+
* render. NO COMMENT TOOL until a canvas has comments to anchor.
|
|
138
|
+
*/
|
|
139
|
+
export type CanvasBoardTool = 'move' | 'hand' | 'text' | 'sticky';
|
|
140
|
+
/**
|
|
141
|
+
* The smallest zoom a board canvas fits at. A design laid out across many
|
|
142
|
+
* full-size pages is many screens wide, and every board has to be on screen
|
|
143
|
+
* at the fit, so the floor is far below a chart's; the visibility budget is
|
|
144
|
+
* what keeps a canvas this far out cheap.
|
|
145
|
+
*/
|
|
146
|
+
export declare const CANVAS_BOARD_MIN_ZOOM = 0.02;
|
|
83
147
|
export interface CanvasBoardProps {
|
|
84
148
|
/** The accessible name of the canvas, such as "Launch landing page". */
|
|
85
149
|
label: string;
|
|
@@ -102,16 +166,50 @@ export interface CanvasBoardProps {
|
|
|
102
166
|
onNoteChange?: ((note: CanvasBoardNote) => void) | undefined;
|
|
103
167
|
/** A note was deleted. */
|
|
104
168
|
onNoteRemove?: ((id: string) => void) | undefined;
|
|
169
|
+
/**
|
|
170
|
+
* The Text or Sticky tool placed a note at a canvas point (its top left, in
|
|
171
|
+
* canvas pixels). The caller adds the note, with whatever size and starting
|
|
172
|
+
* text it gives new notes, and returns its id, which the canvas then opens
|
|
173
|
+
* for typing. Absent, or on a canvas that is not editable, neither tool is
|
|
174
|
+
* offered.
|
|
175
|
+
*/
|
|
176
|
+
onNoteCreate?: ((kind: CanvasBoardNote['kind'], at: CanvasPoint) => string | undefined) | undefined;
|
|
105
177
|
/** The control that opens one board full size; absent, there is none. */
|
|
106
178
|
onOpen?: ((id: string) => void) | undefined;
|
|
107
179
|
/** The board that holds the pointer changed; null is the canvas itself. */
|
|
108
180
|
onActivate?: ((id: string | null) => void) | undefined;
|
|
181
|
+
/**
|
|
182
|
+
* The selected board or note, for a caller that holds it (a list of boards
|
|
183
|
+
* that marks the one picked on the canvas). Left out, the canvas keeps its
|
|
184
|
+
* own; null is nothing selected.
|
|
185
|
+
*/
|
|
186
|
+
selected?: CanvasBoardSelection | null | undefined;
|
|
187
|
+
/** The selection changed, by a press on the canvas or by Escape. */
|
|
188
|
+
onSelectedChange?: ((selection: CanvasBoardSelection | null) => void) | undefined;
|
|
109
189
|
/** Anything else in the canvas's control bar. */
|
|
110
190
|
controlsExtra?: ReactNode | undefined;
|
|
191
|
+
/** The floating tool palette. On by default; the keys work either way. */
|
|
192
|
+
toolbar?: boolean | undefined;
|
|
111
193
|
labels?: Partial<CanvasBoardLabels> | undefined;
|
|
112
194
|
canvasLabels?: Partial<CanvasLabels> | undefined;
|
|
113
195
|
/** The canvas underneath, for a caller that reveals or fits a board. */
|
|
114
196
|
canvasRef?: Ref<CanvasHandle> | undefined;
|
|
115
197
|
className?: string | undefined;
|
|
116
198
|
}
|
|
117
|
-
|
|
199
|
+
/**
|
|
200
|
+
* WHAT A BOARD HAS ROOM TO SAY, from its size on screen.
|
|
201
|
+
*
|
|
202
|
+
* `title` is whether its name is drawn above it: a name narrower than a few
|
|
203
|
+
* letters reads as a stray mark, so a board drawn narrower than
|
|
204
|
+
* [BOARD_TITLE_MIN_WIDTH] goes unnamed until it is zoomed into. `lines` is how
|
|
205
|
+
* many of a placeholder's two lines (its size, then why it is not running) fit
|
|
206
|
+
* inside it at the chrome's own type, so the lines it has no room for are left
|
|
207
|
+
* out rather than clipped at both ends.
|
|
208
|
+
*/
|
|
209
|
+
export declare function boardRoom(width: number, height: number): {
|
|
210
|
+
title: boolean;
|
|
211
|
+
lines: 0 | 1 | 2;
|
|
212
|
+
};
|
|
213
|
+
/** The narrowest a board is drawn, in screen pixels, with its name above it. */
|
|
214
|
+
export declare const BOARD_TITLE_MIN_WIDTH = 40;
|
|
215
|
+
export declare function CanvasBoard({ label, boards, notes, renderBoard, maxLive, minLiveWidth, editable, minSide, maxSide, onBoardChange, onNoteChange, onNoteRemove, onNoteCreate, onOpen, onActivate, selected: heldSelection, onSelectedChange, controlsExtra, toolbar, labels, canvasLabels, canvasRef, className, }: CanvasBoardProps): import("react").JSX.Element;
|
|
@@ -26,10 +26,16 @@ export interface BoardFrame {
|
|
|
26
26
|
*/
|
|
27
27
|
export declare const CANVAS_BOARD_MAX_LIVE = 12;
|
|
28
28
|
/**
|
|
29
|
-
* The narrowest a board may be drawn, in screen pixels, and still be live
|
|
30
|
-
*
|
|
29
|
+
* The narrowest a board may be drawn, in screen pixels, and still be live.
|
|
30
|
+
*
|
|
31
|
+
* Below it a page is a smear, so running it buys nothing. Above it the page's
|
|
32
|
+
* text may be too small to read, but its layout and colour are not, and they
|
|
33
|
+
* are how a reader tells one board of a design from the next: a canvas
|
|
34
|
+
* fitted on a phone or zoomed out over a dozen boards draws them a hundred or
|
|
35
|
+
* so pixels wide, and at a wider floor every one of them was a grey box. The
|
|
36
|
+
* cost of running more is held by [CANVAS_BOARD_MAX_LIVE], not by this.
|
|
31
37
|
*/
|
|
32
|
-
export declare const CANVAS_BOARD_MIN_LIVE_WIDTH =
|
|
38
|
+
export declare const CANVAS_BOARD_MIN_LIVE_WIDTH = 96;
|
|
33
39
|
/**
|
|
34
40
|
* The boards to frame for a view: those on screen and at least `minWidth`
|
|
35
41
|
* pixels wide there, the most visible area first, at most `max` of them,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import './CanvasBoard.css';
|
|
2
|
-
export { CanvasBoard, CANVAS_NOTE_COLORS } from './CanvasBoard.js';
|
|
3
|
-
export type { CanvasBoardItem, CanvasBoardLabels, CanvasBoardNote, CanvasBoardProps, CanvasBoardRect, CanvasNoteColor, } from './CanvasBoard.js';
|
|
2
|
+
export { BOARD_TITLE_MIN_WIDTH, CanvasBoard, CANVAS_BOARD_MIN_ZOOM, CANVAS_NOTE_COLORS, TITLE_GLYPH_EM, boardRoom, titleSize, } from './CanvasBoard.js';
|
|
3
|
+
export type { CanvasBoardItem, CanvasBoardLabels, CanvasBoardNote, CanvasBoardProps, CanvasBoardRect, CanvasBoardSelection, CanvasBoardTool, CanvasNoteColor, } from './CanvasBoard.js';
|
|
4
4
|
export { CANVAS_BOARD_MAX_LIVE, CANVAS_BOARD_MIN_LIVE_WIDTH, liveBoards } from './budget.js';
|
|
5
5
|
export type { BoardFrame } from './budget.js';
|
|
@@ -1,8 +1,12 @@
|
|
|
1
|
-
export { CANVAS_BOARD_MAX_LIVE, CANVAS_BOARD_MIN_LIVE_WIDTH, CANVAS_NOTE_COLORS, CanvasBoard, liveBoards } from '../chunk-
|
|
2
|
-
import '../chunk-
|
|
3
|
-
import '../chunk-
|
|
4
|
-
import '../chunk-
|
|
5
|
-
import '../chunk-
|
|
1
|
+
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 } from '../chunk-MDNVHIB2.js';
|
|
2
|
+
import '../chunk-5SZGKSGL.js';
|
|
3
|
+
import '../chunk-GLSOD5Z4.js';
|
|
4
|
+
import '../chunk-PGRPNDWM.js';
|
|
5
|
+
import '../chunk-22UEIXZE.js';
|
|
6
|
+
import '../chunk-LM3ISVJA.js';
|
|
7
|
+
import '../chunk-SMBKXWML.js';
|
|
8
|
+
import '../chunk-5FYPE5GL.js';
|
|
9
|
+
import '../chunk-OMV5W53A.js';
|
|
6
10
|
import '../chunk-R25RGPUB.js';
|
|
7
11
|
import '../chunk-OG6CL3EB.js';
|
|
8
12
|
import '../chunk-4FQT6ZAY.js';
|
|
@@ -0,0 +1,462 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* A canvas of artboards and notes (CanvasBoard.tsx). Boards and notes are laid
|
|
3
|
+
* out in canvas pixels inside the canvas's world and scale with it; their
|
|
4
|
+
* chrome (titles, handles, tools) is counter-scaled by the zoom the component
|
|
5
|
+
* writes on the layer, so it stays one size on screen.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
/*
|
|
9
|
+
* A SIZE CONTAINER BY ITS WIDTH, so the palette can tell a canvas too narrow
|
|
10
|
+
* to hold it beside the zoom bar on one line (see below).
|
|
11
|
+
*/
|
|
12
|
+
.crewlet-canvas-board {
|
|
13
|
+
container: crewlet-canvas-board / inline-size;
|
|
14
|
+
height: 100%;
|
|
15
|
+
min-height: 0;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.crewlet-canvas-board__layer {
|
|
19
|
+
--crewlet-canvas-board-zoom: 1;
|
|
20
|
+
--crewlet-canvas-board-unzoom: calc(1 / var(--crewlet-canvas-board-zoom));
|
|
21
|
+
position: relative;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
/*
|
|
25
|
+
* UNDER HAND, TEXT AND STICKY NOTHING ON THE CANVAS TAKES A PRESS: every press
|
|
26
|
+
* reaches the field, which pans it (Hand) or places a note on it (Text and
|
|
27
|
+
* Sticky), and nothing is outlined under a pointer that cannot select it.
|
|
28
|
+
*/
|
|
29
|
+
.crewlet-canvas-board:not([data-tool='move']) .crewlet-canvas-board__layer {
|
|
30
|
+
pointer-events: none;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
/* ---- the tool palette, floating at the foot of the field ----------------- */
|
|
34
|
+
|
|
35
|
+
/*
|
|
36
|
+
* CENTRED AT THE FOOT, on the zoom bar's line: the two bars are one control
|
|
37
|
+
* step tall and stand the same inset from the field's edge.
|
|
38
|
+
*/
|
|
39
|
+
.crewlet-canvas-board__tools {
|
|
40
|
+
position: absolute;
|
|
41
|
+
bottom: var(--spacing-3);
|
|
42
|
+
left: 50%;
|
|
43
|
+
z-index: var(--z-index-raised);
|
|
44
|
+
transform: translateX(-50%);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
/*
|
|
48
|
+
* A NARROW CANVAS (a phone, a split pane) has no room at its foot for the
|
|
49
|
+
* palette between the zoom bar and the edge, so the palette moves to the top
|
|
50
|
+
* left corner, which the zoom bar never takes.
|
|
51
|
+
*/
|
|
52
|
+
@container crewlet-canvas-board (width < 36rem) {
|
|
53
|
+
.crewlet-canvas-board__tools {
|
|
54
|
+
top: var(--spacing-3);
|
|
55
|
+
bottom: auto;
|
|
56
|
+
left: var(--spacing-3);
|
|
57
|
+
transform: none;
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
/* ---- a board ------------------------------------------------------------ */
|
|
62
|
+
|
|
63
|
+
.crewlet-canvas-board__board {
|
|
64
|
+
position: absolute;
|
|
65
|
+
box-sizing: border-box;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
/*
|
|
69
|
+
* A BOARD'S EDGE IS A HAIRLINE, one screen pixel at every zoom, drawn as a
|
|
70
|
+
* ring outside the box rather than a border inside it: a border would take
|
|
71
|
+
* its width out of the page the board runs, and counter-scaled to stay one
|
|
72
|
+
* pixel it would take more the further out the canvas is zoomed. The strong
|
|
73
|
+
* hairline's ink, so a white page still has an edge on a light field and a
|
|
74
|
+
* dark one on a dark field.
|
|
75
|
+
*/
|
|
76
|
+
.crewlet-canvas-board__body {
|
|
77
|
+
position: absolute;
|
|
78
|
+
inset: 0;
|
|
79
|
+
overflow: hidden;
|
|
80
|
+
background: var(--color-surface-elevated);
|
|
81
|
+
box-shadow: 0 0 0 calc(1px * var(--crewlet-canvas-board-unzoom)) var(--color-border-strong);
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
/*
|
|
85
|
+
* HOVER, then SELECTION, in the accent: one screen pixel and then two, over
|
|
86
|
+
* the hairline. Hovering a board's name is hovering its board, which is how a
|
|
87
|
+
* reader finds the board a name belongs to on a crowded canvas.
|
|
88
|
+
*/
|
|
89
|
+
.crewlet-canvas-board__board:hover .crewlet-canvas-board__body,
|
|
90
|
+
.crewlet-canvas-board__note:hover {
|
|
91
|
+
outline: calc(1px * var(--crewlet-canvas-board-unzoom)) solid var(--color-brand-accent);
|
|
92
|
+
outline-offset: 0;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
.crewlet-canvas-board__board[data-selected] .crewlet-canvas-board__body,
|
|
96
|
+
.crewlet-canvas-board__note[data-selected] {
|
|
97
|
+
outline: calc(2px * var(--crewlet-canvas-board-unzoom)) solid var(--color-brand-accent);
|
|
98
|
+
outline-offset: 0;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
/* The page a live board runs fills its frame exactly. */
|
|
102
|
+
.crewlet-canvas-board__body > :not(.crewlet-canvas-board__shield) {
|
|
103
|
+
width: 100%;
|
|
104
|
+
height: 100%;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
.crewlet-canvas-board__board[data-active] .crewlet-canvas-board__body {
|
|
108
|
+
outline: calc(2px * var(--crewlet-canvas-board-unzoom)) solid var(--color-focus);
|
|
109
|
+
outline-offset: 0;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
/*
|
|
113
|
+
* THE SHIELD over a live board that does not hold the pointer: a press on it
|
|
114
|
+
* pans the canvas as the field around it does, because a sandboxed page would
|
|
115
|
+
* otherwise swallow every press that began over it.
|
|
116
|
+
*/
|
|
117
|
+
.crewlet-canvas-board__shield {
|
|
118
|
+
position: absolute;
|
|
119
|
+
inset: 0;
|
|
120
|
+
cursor: var(--crewlet-canvas-cursor-pointer, default);
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
/* A board that is not running draws its size, and why, at screen size. */
|
|
124
|
+
.crewlet-canvas-board__placeholder {
|
|
125
|
+
position: absolute;
|
|
126
|
+
inset: 0;
|
|
127
|
+
display: flex;
|
|
128
|
+
align-items: center;
|
|
129
|
+
justify-content: center;
|
|
130
|
+
overflow: hidden;
|
|
131
|
+
background: var(--color-surface-subtle);
|
|
132
|
+
color: var(--color-text-tertiary);
|
|
133
|
+
font-size: var(--font-size-xs);
|
|
134
|
+
text-align: center;
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
/*
|
|
138
|
+
* ONE BLOCK, SCALED ONCE: its lines keep their spacing at screen size rather
|
|
139
|
+
* than each line shrinking back into the space the zoom left it. It is held to
|
|
140
|
+
* the board's width ON SCREEN (the board's own width times the zoom, less a
|
|
141
|
+
* margin each side), so a line the component judged to fit never runs past
|
|
142
|
+
* the board's edges into the boards beside it.
|
|
143
|
+
*/
|
|
144
|
+
.crewlet-canvas-board__placeholder-text {
|
|
145
|
+
display: flex;
|
|
146
|
+
flex-direction: column;
|
|
147
|
+
align-items: center;
|
|
148
|
+
gap: var(--spacing-1);
|
|
149
|
+
flex: none;
|
|
150
|
+
box-sizing: border-box;
|
|
151
|
+
max-width: calc(100% * var(--crewlet-canvas-board-zoom));
|
|
152
|
+
padding-inline: var(--spacing-2);
|
|
153
|
+
transform: scale(var(--crewlet-canvas-board-unzoom));
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
.crewlet-canvas-board__placeholder-text > * {
|
|
157
|
+
max-width: 100%;
|
|
158
|
+
overflow: hidden;
|
|
159
|
+
text-overflow: ellipsis;
|
|
160
|
+
white-space: nowrap;
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
.crewlet-canvas-board__placeholder-size {
|
|
164
|
+
color: var(--color-text-secondary);
|
|
165
|
+
font-weight: var(--font-weight-medium);
|
|
166
|
+
font-variant-numeric: tabular-nums;
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
/* ---- chrome, at screen size --------------------------------------------- */
|
|
170
|
+
|
|
171
|
+
/*
|
|
172
|
+
* THE CHROME IS DRAWN OVER THE CONTENT, every board's and note's over every
|
|
173
|
+
* board and note, as a design tool draws its frame names. It is counter-scaled
|
|
174
|
+
* to one size on screen while the content shrinks with the zoom, so far out a
|
|
175
|
+
* name reaches over the note or board above it; drawn in document order it
|
|
176
|
+
* went under a note laid out after its board, and that note took every press
|
|
177
|
+
* meant for the name and the open control.
|
|
178
|
+
*/
|
|
179
|
+
.crewlet-canvas-board__chrome,
|
|
180
|
+
.crewlet-canvas-board__note-tools,
|
|
181
|
+
.crewlet-canvas-board__resize {
|
|
182
|
+
z-index: 1;
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
/*
|
|
186
|
+
* ONE LINE OF TYPE TALL, whatever sits in it: the open control is centred on
|
|
187
|
+
* the line and allowed past it, so a row of boards zoomed far out loses only
|
|
188
|
+
* a title's height to the names above it rather than a button's.
|
|
189
|
+
*/
|
|
190
|
+
.crewlet-canvas-board__chrome {
|
|
191
|
+
position: absolute;
|
|
192
|
+
bottom: 100%;
|
|
193
|
+
left: 0;
|
|
194
|
+
display: flex;
|
|
195
|
+
align-items: center;
|
|
196
|
+
gap: var(--spacing-1);
|
|
197
|
+
box-sizing: border-box;
|
|
198
|
+
width: calc(100% * var(--crewlet-canvas-board-zoom));
|
|
199
|
+
height: calc(var(--font-size-xs) * var(--font-line-height-normal) + var(--spacing-1));
|
|
200
|
+
padding-bottom: var(--spacing-1);
|
|
201
|
+
transform: scale(var(--crewlet-canvas-board-unzoom));
|
|
202
|
+
transform-origin: bottom left;
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
/* A board drawn too narrow to name goes unnamed (`boardRoom`). */
|
|
206
|
+
.crewlet-canvas-board__board[data-untitled] > .crewlet-canvas-board__chrome {
|
|
207
|
+
display: none;
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
.crewlet-canvas-board__open {
|
|
211
|
+
flex: none;
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
/*
|
|
215
|
+
* THE OPEN CONTROL IS THE BOARD'S, NOT THE CANVAS'S: where a pointer can
|
|
216
|
+
* hover, it is drawn on the board under it, the selected board and the
|
|
217
|
+
* control that has focus, so a canvas at rest shows its names and nothing
|
|
218
|
+
* else. A touch screen has no hover to find it by, so it is always drawn
|
|
219
|
+
* there.
|
|
220
|
+
*/
|
|
221
|
+
@media (hover: hover) {
|
|
222
|
+
/*
|
|
223
|
+
* HIDDEN, IT TAKES NO ROOM: out of the row rather than only transparent, so
|
|
224
|
+
* a narrow board's name has the whole width to itself at rest instead of
|
|
225
|
+
* being cut to its first letter beside an empty slot. It still takes focus,
|
|
226
|
+
* and is put back in the row when it has it.
|
|
227
|
+
*/
|
|
228
|
+
.crewlet-canvas-board__board:not(:hover, [data-selected]) .crewlet-canvas-board__open:not(:focus-visible) {
|
|
229
|
+
position: absolute;
|
|
230
|
+
opacity: 0;
|
|
231
|
+
pointer-events: none;
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
/* The board's name: small, quiet, and the accent once its board is picked out. */
|
|
236
|
+
.crewlet-canvas-board__title {
|
|
237
|
+
min-width: 0;
|
|
238
|
+
overflow: hidden;
|
|
239
|
+
color: var(--color-text-tertiary);
|
|
240
|
+
font-size: var(--font-size-xs);
|
|
241
|
+
font-weight: var(--font-weight-medium);
|
|
242
|
+
line-height: var(--font-line-height-normal);
|
|
243
|
+
text-overflow: ellipsis;
|
|
244
|
+
white-space: nowrap;
|
|
245
|
+
cursor: var(--crewlet-canvas-cursor-pointer, default);
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
.crewlet-canvas-board__board:hover .crewlet-canvas-board__title,
|
|
249
|
+
.crewlet-canvas-board__board[data-selected] .crewlet-canvas-board__title {
|
|
250
|
+
color: var(--color-brand-accent-ink);
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
.crewlet-canvas-board__handle {
|
|
254
|
+
appearance: none;
|
|
255
|
+
margin: 0;
|
|
256
|
+
padding: var(--spacing-1) var(--spacing-2);
|
|
257
|
+
border: 1px solid transparent;
|
|
258
|
+
border-radius: var(--radius-md);
|
|
259
|
+
background: transparent;
|
|
260
|
+
font: inherit;
|
|
261
|
+
cursor: var(--crewlet-canvas-cursor-pointer, default);
|
|
262
|
+
touch-action: none;
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
.crewlet-canvas-board__handle:hover {
|
|
266
|
+
background: var(--color-surface-hover);
|
|
267
|
+
border-color: var(--color-border-default);
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
/*
|
|
271
|
+
* A NAME THAT IS ALSO A MOVE HANDLE keeps the name's type and its place: the
|
|
272
|
+
* handle's padding and edge are taken back by a margin the same size, so the
|
|
273
|
+
* letters stay on the board's left edge and the title's line, and only the
|
|
274
|
+
* hover's box reaches past them.
|
|
275
|
+
*/
|
|
276
|
+
.crewlet-canvas-board__title.crewlet-canvas-board__handle {
|
|
277
|
+
flex: 0 1 auto;
|
|
278
|
+
margin-block: calc(-1 * (var(--spacing-1) + 1px));
|
|
279
|
+
margin-inline-start: calc(-1 * (var(--spacing-2) + 1px));
|
|
280
|
+
font-size: var(--font-size-xs);
|
|
281
|
+
font-weight: var(--font-weight-medium);
|
|
282
|
+
line-height: var(--font-line-height-normal);
|
|
283
|
+
}
|
|
284
|
+
|
|
285
|
+
/* Both handles draw an edge of their own, so the ring sits over it. */
|
|
286
|
+
.crewlet-canvas-board__handle:focus-visible,
|
|
287
|
+
.crewlet-canvas-board__resize:focus-visible {
|
|
288
|
+
outline: 2px solid var(--color-focus);
|
|
289
|
+
outline-offset: var(--size-focus-ring-inset-offset);
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
/*
|
|
293
|
+
* A RESIZE CORNER: a full pointer target, drawn as the small square a design
|
|
294
|
+
* tool draws, centred on its corner and counter-scaled so it is one size on
|
|
295
|
+
* screen. Drawn on a selected item, and on the keyboard's corner while it has
|
|
296
|
+
* focus; otherwise it is neither seen nor pressed.
|
|
297
|
+
*/
|
|
298
|
+
.crewlet-canvas-board__resize {
|
|
299
|
+
position: absolute;
|
|
300
|
+
display: grid;
|
|
301
|
+
place-items: center;
|
|
302
|
+
width: var(--spacing-6);
|
|
303
|
+
height: var(--spacing-6);
|
|
304
|
+
margin: 0;
|
|
305
|
+
padding: 0;
|
|
306
|
+
border: none;
|
|
307
|
+
background: transparent;
|
|
308
|
+
opacity: 0;
|
|
309
|
+
pointer-events: none;
|
|
310
|
+
touch-action: none;
|
|
311
|
+
}
|
|
312
|
+
|
|
313
|
+
.crewlet-canvas-board__resize::before {
|
|
314
|
+
content: '';
|
|
315
|
+
width: var(--spacing-2);
|
|
316
|
+
height: var(--spacing-2);
|
|
317
|
+
box-sizing: border-box;
|
|
318
|
+
border: 1px solid var(--color-brand-accent);
|
|
319
|
+
border-radius: var(--radius-xs);
|
|
320
|
+
background: var(--color-surface-elevated);
|
|
321
|
+
}
|
|
322
|
+
|
|
323
|
+
.crewlet-canvas-board__board[data-selected] > .crewlet-canvas-board__resize,
|
|
324
|
+
.crewlet-canvas-board__note[data-selected] .crewlet-canvas-board__resize,
|
|
325
|
+
.crewlet-canvas-board__resize:focus-visible {
|
|
326
|
+
opacity: 1;
|
|
327
|
+
pointer-events: auto;
|
|
328
|
+
}
|
|
329
|
+
|
|
330
|
+
.crewlet-canvas-board__resize[data-corner='resize-nw'] {
|
|
331
|
+
top: 0;
|
|
332
|
+
left: 0;
|
|
333
|
+
cursor: nwse-resize;
|
|
334
|
+
transform: translate(-50%, -50%) scale(var(--crewlet-canvas-board-unzoom));
|
|
335
|
+
}
|
|
336
|
+
|
|
337
|
+
.crewlet-canvas-board__resize[data-corner='resize-ne'] {
|
|
338
|
+
top: 0;
|
|
339
|
+
right: 0;
|
|
340
|
+
cursor: nesw-resize;
|
|
341
|
+
transform: translate(50%, -50%) scale(var(--crewlet-canvas-board-unzoom));
|
|
342
|
+
}
|
|
343
|
+
|
|
344
|
+
.crewlet-canvas-board__resize[data-corner='resize-sw'] {
|
|
345
|
+
bottom: 0;
|
|
346
|
+
left: 0;
|
|
347
|
+
cursor: nesw-resize;
|
|
348
|
+
transform: translate(-50%, 50%) scale(var(--crewlet-canvas-board-unzoom));
|
|
349
|
+
}
|
|
350
|
+
|
|
351
|
+
.crewlet-canvas-board__resize[data-corner='resize-se'] {
|
|
352
|
+
right: 0;
|
|
353
|
+
bottom: 0;
|
|
354
|
+
cursor: nwse-resize;
|
|
355
|
+
transform: translate(50%, 50%) scale(var(--crewlet-canvas-board-unzoom));
|
|
356
|
+
}
|
|
357
|
+
|
|
358
|
+
|
|
359
|
+
/* ---- a note ------------------------------------------------------------- */
|
|
360
|
+
|
|
361
|
+
.crewlet-canvas-board__note {
|
|
362
|
+
position: absolute;
|
|
363
|
+
box-sizing: border-box;
|
|
364
|
+
cursor: var(--crewlet-canvas-cursor-pointer, default);
|
|
365
|
+
}
|
|
366
|
+
|
|
367
|
+
/*
|
|
368
|
+
* A sticky's tools and corners sit outside its paper, so the paper does not
|
|
369
|
+
* clip; its words are held to the paper instead.
|
|
370
|
+
*/
|
|
371
|
+
.crewlet-canvas-board__note[data-kind='sticky'] {
|
|
372
|
+
overflow: visible;
|
|
373
|
+
}
|
|
374
|
+
|
|
375
|
+
.crewlet-canvas-board__note[data-kind='sticky'] .crewlet-canvas-board__note-text {
|
|
376
|
+
max-height: 100%;
|
|
377
|
+
overflow: hidden;
|
|
378
|
+
}
|
|
379
|
+
|
|
380
|
+
/*
|
|
381
|
+
* A TITLE IS SET TO FILL ITS BOX, so the author's frame is the type size: a
|
|
382
|
+
* heading over a group of boards is as large as the box drawn for it, and a
|
|
383
|
+
* long one is set smaller rather than run over the boards beside it.
|
|
384
|
+
*/
|
|
385
|
+
.crewlet-canvas-board__note[data-kind='title'] {
|
|
386
|
+
display: flex;
|
|
387
|
+
align-items: center;
|
|
388
|
+
color: var(--color-text-primary);
|
|
389
|
+
}
|
|
390
|
+
|
|
391
|
+
/*
|
|
392
|
+
* The size is the component's (`titleSize`), fitted to the box both ways. The
|
|
393
|
+
* TEXT clips at the box, not the box itself: the box's tools and corners sit
|
|
394
|
+
* outside it, and a box that clipped would cut them away.
|
|
395
|
+
*/
|
|
396
|
+
.crewlet-canvas-board__note[data-kind='title'] .crewlet-canvas-board__note-text {
|
|
397
|
+
min-width: 0;
|
|
398
|
+
max-width: 100%;
|
|
399
|
+
overflow: hidden;
|
|
400
|
+
font-weight: var(--font-weight-semibold);
|
|
401
|
+
letter-spacing: var(--font-letter-spacing-tight);
|
|
402
|
+
line-height: var(--font-line-height-tight);
|
|
403
|
+
white-space: nowrap;
|
|
404
|
+
}
|
|
405
|
+
|
|
406
|
+
.crewlet-canvas-board__note-text {
|
|
407
|
+
margin: 0;
|
|
408
|
+
white-space: pre-wrap;
|
|
409
|
+
}
|
|
410
|
+
|
|
411
|
+
.crewlet-canvas-board__note-field {
|
|
412
|
+
box-sizing: border-box;
|
|
413
|
+
width: 100%;
|
|
414
|
+
height: 100%;
|
|
415
|
+
padding: 0;
|
|
416
|
+
border: none;
|
|
417
|
+
background: transparent;
|
|
418
|
+
color: inherit;
|
|
419
|
+
font: inherit;
|
|
420
|
+
resize: none;
|
|
421
|
+
}
|
|
422
|
+
|
|
423
|
+
.crewlet-canvas-board__note-field:focus-visible {
|
|
424
|
+
outline: 2px solid var(--color-focus);
|
|
425
|
+
outline-offset: var(--size-focus-ring-inset-offset);
|
|
426
|
+
}
|
|
427
|
+
|
|
428
|
+
.crewlet-canvas-board__note-tools {
|
|
429
|
+
position: absolute;
|
|
430
|
+
bottom: 100%;
|
|
431
|
+
left: 0;
|
|
432
|
+
display: flex;
|
|
433
|
+
align-items: center;
|
|
434
|
+
gap: var(--spacing-1);
|
|
435
|
+
padding-bottom: var(--spacing-1);
|
|
436
|
+
transform: scale(var(--crewlet-canvas-board-unzoom));
|
|
437
|
+
transform-origin: bottom left;
|
|
438
|
+
}
|
|
439
|
+
|
|
440
|
+
/*
|
|
441
|
+
* A NOTE'S TOOLS ARE THE NOTE'S, as a board's open control is the board's:
|
|
442
|
+
* where a pointer can hover they are drawn on the note under it, the selected
|
|
443
|
+
* note and the note holding focus, rather than over every note at once.
|
|
444
|
+
*/
|
|
445
|
+
@media (hover: hover) {
|
|
446
|
+
.crewlet-canvas-board__note-tools {
|
|
447
|
+
opacity: 0;
|
|
448
|
+
}
|
|
449
|
+
|
|
450
|
+
.crewlet-canvas-board__note:hover .crewlet-canvas-board__note-tools,
|
|
451
|
+
.crewlet-canvas-board__note[data-selected] .crewlet-canvas-board__note-tools,
|
|
452
|
+
.crewlet-canvas-board__note:focus-within .crewlet-canvas-board__note-tools {
|
|
453
|
+
opacity: 1;
|
|
454
|
+
}
|
|
455
|
+
}
|
|
456
|
+
|
|
457
|
+
.crewlet-canvas-board__note-move {
|
|
458
|
+
width: var(--spacing-6);
|
|
459
|
+
height: var(--spacing-6);
|
|
460
|
+
background-image: radial-gradient(var(--color-text-tertiary) 1px, transparent 1.5px);
|
|
461
|
+
background-size: var(--spacing-2) var(--spacing-2);
|
|
462
|
+
}
|