@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
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
import { type ReactNode, type Ref } from 'react';
|
|
2
|
-
/**
|
|
3
|
-
|
|
2
|
+
/**
|
|
3
|
+
* How wide a panel rests beside the artifact: text (facts, a list, a form) or
|
|
4
|
+
* a table. ONE WIDTH FOR TEXT, so moving from one text panel to another never
|
|
5
|
+
* moves the artifact's edge under the reader.
|
|
6
|
+
*/
|
|
7
|
+
export type ArtifactPanelSize = 'md' | 'lg';
|
|
4
8
|
export interface ArtifactPanelLabels {
|
|
5
9
|
close: (title: string) => string;
|
|
6
10
|
expand: string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { ARTIFACT_PANEL_LABELS, ArtifactPanel, ArtifactWorkspace } from '../chunk-
|
|
1
|
+
export { ARTIFACT_PANEL_LABELS, ArtifactPanel, ArtifactWorkspace } from '../chunk-HUVG2FFT.js';
|
|
2
2
|
import '../chunk-PQADV6P6.js';
|
|
3
3
|
import '../chunk-4FQT6ZAY.js';
|
|
4
4
|
import '../chunk-BZFWDIV6.js';
|
|
@@ -28,7 +28,9 @@
|
|
|
28
28
|
}
|
|
29
29
|
|
|
30
30
|
.crewlet-artifact-panel {
|
|
31
|
-
|
|
31
|
+
/* THE TEXT WIDTH, every panel of facts, a list or a form: three widths for
|
|
32
|
+
those moved the artifact's edge 80px between Details and History. */
|
|
33
|
+
--crewlet-artifact-panel-width: 22.5rem;
|
|
32
34
|
display: flex;
|
|
33
35
|
flex: none;
|
|
34
36
|
flex-direction: column;
|
|
@@ -38,10 +40,6 @@
|
|
|
38
40
|
background: var(--color-surface-background);
|
|
39
41
|
}
|
|
40
42
|
|
|
41
|
-
.crewlet-artifact-panel--sm {
|
|
42
|
-
--crewlet-artifact-panel-width: 20rem;
|
|
43
|
-
}
|
|
44
|
-
|
|
45
43
|
.crewlet-artifact-panel--lg {
|
|
46
44
|
--crewlet-artifact-panel-width: 36rem;
|
|
47
45
|
}
|
|
@@ -94,10 +92,27 @@
|
|
|
94
92
|
gap: var(--spacing-1);
|
|
95
93
|
}
|
|
96
94
|
|
|
95
|
+
/* THE BODY'S INSET IS PUBLISHED (--crewlet-artifact-panel-inset) for content
|
|
96
|
+
that sticks to its scrollport: a sticky edge stops at the padding, so a
|
|
97
|
+
foot with `bottom: 0` left a band under it that the content scrolled
|
|
98
|
+
through; such a foot offsets itself by the inset to sit on the edge. */
|
|
97
99
|
.crewlet-artifact-panel__body {
|
|
100
|
+
/* THE PANEL'S OWN MEASURE, so what it holds folds to the panel's width
|
|
101
|
+
rather than the window's; and its sections head at the panel title's
|
|
102
|
+
step, a level under it and never louder than it. */
|
|
103
|
+
container: crewlet-artifact-panel / inline-size;
|
|
104
|
+
--crewlet-section-title-size: var(--font-size-sm);
|
|
105
|
+
--crewlet-artifact-panel-inset: var(--spacing-4);
|
|
106
|
+
|
|
107
|
+
/* A COLUMN, so content that should fit the panel rather than scroll it
|
|
108
|
+
can: a child that sets `min-height: 0` shrinks to the room the body has
|
|
109
|
+
(a sheet's rows, whose grid then scrolls itself), and every other child
|
|
110
|
+
keeps its content's height and scrolls the body as before. */
|
|
111
|
+
display: flex;
|
|
112
|
+
flex-direction: column;
|
|
98
113
|
flex: 1 1 auto;
|
|
99
114
|
min-height: 0;
|
|
100
|
-
padding: var(--
|
|
115
|
+
padding: var(--crewlet-artifact-panel-inset);
|
|
101
116
|
overflow: auto;
|
|
102
117
|
overscroll-behavior: contain;
|
|
103
118
|
}
|
|
@@ -111,7 +126,10 @@
|
|
|
111
126
|
inset-inline-end: 0;
|
|
112
127
|
z-index: var(--z-index-overlay);
|
|
113
128
|
width: min(var(--crewlet-artifact-panel-width), 100%);
|
|
114
|
-
|
|
129
|
+
/* THE DRAWER'S LIFT, the shell's own rail drawer's: the large step falls
|
|
130
|
+
below a box and left the panel's start edge reading as a cut through
|
|
131
|
+
the artifact rather than a sheet over it. */
|
|
132
|
+
box-shadow: var(--shadow-xl);
|
|
115
133
|
}
|
|
116
134
|
|
|
117
135
|
.crewlet-artifact-panel[data-expanded] {
|
package/dist/Avatar/Avatar.d.ts
CHANGED
|
@@ -176,10 +176,12 @@ export declare const AVATAR_CHARACTER_FULL_DETAIL = 56;
|
|
|
176
176
|
/**
|
|
177
177
|
* Two uppercase initials, or one where the name has only one letter to give.
|
|
178
178
|
*
|
|
179
|
-
* SPLIT ON WHITESPACE, HYPHEN, UNDERSCORE AND
|
|
180
|
-
* draws are handles rather than names: `backend-engineer` gives BE,
|
|
181
|
-
* `sre_lead` gives SL
|
|
182
|
-
* alone gives B, S and C and a roster of identical
|
|
179
|
+
* SPLIT ON WHITESPACE, HYPHEN, UNDERSCORE, DOT AND COLON, because half the
|
|
180
|
+
* names this draws are handles rather than names: `backend-engineer` gives BE,
|
|
181
|
+
* `sre_lead` gives SL, `carlos.diaz` gives CD and `ci:release` CR, where
|
|
182
|
+
* splitting on spaces alone gives B, S, C and C and a roster of identical
|
|
183
|
+
* badges. PUNCTUATION AROUND A WORD IS NOT A LETTER: "review (API token)"
|
|
184
|
+
* gave R( where it gives RA.
|
|
183
185
|
*
|
|
184
186
|
* A SINGLE WORD STILL GIVES TWO LETTERS, because the seats an org chart names
|
|
185
187
|
* in one word are the ones it draws most (CEO, SWE, PM, DevRel), and a badge
|
package/dist/Avatar/index.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { AvatarStack, avatarStackLabel } from '../chunk-
|
|
2
|
-
export { AVATAR_CHARACTER_FULL_DETAIL, AVATAR_CORNER_RATIO, AVATAR_SIZES, AVATAR_STATUSES, AVATAR_STATUS_LABELS, Avatar, avatarCorner, avatarInitialsName, avatarPixels, avatarTint, getInitials } from '../chunk-
|
|
1
|
+
export { AvatarStack, avatarStackLabel } from '../chunk-5AQBPHZD.js';
|
|
2
|
+
export { AVATAR_CHARACTER_FULL_DETAIL, AVATAR_CORNER_RATIO, AVATAR_SIZES, AVATAR_STATUSES, AVATAR_STATUS_LABELS, Avatar, avatarCorner, avatarInitialsName, avatarPixels, avatarTint, getInitials } from '../chunk-PZKHBB7D.js';
|
|
3
3
|
import '../chunk-ODEQTPFM.js';
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
export { AvatarPicker } from '../chunk-
|
|
2
|
-
import '../chunk-
|
|
3
|
-
import '../chunk-
|
|
1
|
+
export { AvatarPicker } from '../chunk-EBCHVFCS.js';
|
|
2
|
+
import '../chunk-GPHWCK7M.js';
|
|
3
|
+
import '../chunk-K3IJQNB7.js';
|
|
4
4
|
import '../chunk-AYKXMIOR.js';
|
|
5
|
-
import '../chunk-
|
|
6
|
-
import '../chunk-
|
|
7
|
-
import '../chunk-
|
|
5
|
+
import '../chunk-YEVG2X5R.js';
|
|
6
|
+
import '../chunk-CCAXYHQS.js';
|
|
7
|
+
import '../chunk-VL6CUNSX.js';
|
|
8
8
|
import '../chunk-RKKO7QHH.js';
|
|
9
|
-
import '../chunk-
|
|
9
|
+
import '../chunk-PZKHBB7D.js';
|
|
10
10
|
import '../chunk-BHHIIK3M.js';
|
|
11
|
-
import '../chunk-
|
|
11
|
+
import '../chunk-OMV5W53A.js';
|
|
12
12
|
import '../chunk-R25RGPUB.js';
|
|
13
13
|
import '../chunk-BZFWDIV6.js';
|
|
14
14
|
import '../chunk-ODEQTPFM.js';
|
package/dist/Callout/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { Callout } from '../chunk-
|
|
1
|
+
export { Callout } from '../chunk-SZZRIHGT.js';
|
|
2
2
|
import '../chunk-ODEQTPFM.js';
|
|
@@ -22,8 +22,15 @@
|
|
|
22
22
|
*/
|
|
23
23
|
--crewlet-callout-line: transparent;
|
|
24
24
|
|
|
25
|
-
|
|
26
|
-
|
|
25
|
+
/* THE GLYPH, THE TEXT, AND AN ACTION'S COLUMN only where there is one: the
|
|
26
|
+
third track is implicit, so a callout without an action keeps no gap
|
|
27
|
+
for it at its end. A grid rather than a row, so a narrow callout can put
|
|
28
|
+
its action under the text, in the text's own column, whatever the glyph
|
|
29
|
+
is. */
|
|
30
|
+
display: grid;
|
|
31
|
+
grid-template-columns: auto minmax(0, 1fr);
|
|
32
|
+
grid-auto-columns: auto;
|
|
33
|
+
align-items: start;
|
|
27
34
|
gap: var(--spacing-2);
|
|
28
35
|
/* The engine's own: a tight strip rather than a padded card. This sits
|
|
29
36
|
above a screen or between two sections and takes a line or two of text,
|
|
@@ -38,17 +45,29 @@
|
|
|
38
45
|
line-height: var(--font-line-height-normal);
|
|
39
46
|
}
|
|
40
47
|
|
|
48
|
+
/*
|
|
49
|
+
* WITH AN ACTION, ONE LINE OF TEXT CENTRES ON THE BUTTON. The row is the
|
|
50
|
+
* button's height and the text sat at its top, three pixels above the
|
|
51
|
+
* button's label. The content is padded by half of what the control is
|
|
52
|
+
* taller than a line, and the icon moved down with it, so a one-line callout
|
|
53
|
+
* reads as one line and a longer one keeps its icon on its first line.
|
|
54
|
+
*/
|
|
55
|
+
.crewlet-callout:has(> .crewlet-callout__action) {
|
|
56
|
+
--crewlet-callout-lead: max(0px, calc((var(--size-control-sm) - 1lh) / 2));
|
|
57
|
+
/* Measured by its own width, so the action can move under the text. */
|
|
58
|
+
container: crewlet-callout / inline-size;
|
|
59
|
+
}
|
|
60
|
+
|
|
41
61
|
.crewlet-callout__icon {
|
|
42
62
|
display: inline-flex;
|
|
43
|
-
flex: none;
|
|
44
63
|
/* On the first line's optical centre rather than its box top, which a 16px
|
|
45
64
|
glyph beside a 13px line sits two pixels above. */
|
|
46
|
-
margin-top: 2px;
|
|
65
|
+
margin-top: calc(2px + var(--crewlet-callout-lead, 0px));
|
|
47
66
|
}
|
|
48
67
|
|
|
49
68
|
.crewlet-callout__content {
|
|
50
69
|
min-width: 0;
|
|
51
|
-
|
|
70
|
+
padding-block: var(--crewlet-callout-lead, 0px);
|
|
52
71
|
}
|
|
53
72
|
|
|
54
73
|
.crewlet-callout__title {
|
|
@@ -59,10 +78,31 @@
|
|
|
59
78
|
}
|
|
60
79
|
|
|
61
80
|
.crewlet-callout__action {
|
|
62
|
-
|
|
81
|
+
grid-column: 3;
|
|
82
|
+
grid-row: 1;
|
|
63
83
|
align-self: center;
|
|
64
84
|
}
|
|
65
85
|
|
|
86
|
+
/*
|
|
87
|
+
* A NARROW CALLOUT PUTS ITS ACTION UNDER THE TEXT, at the start of the text's
|
|
88
|
+
* column, so the sentence keeps the callout's whole measure. Beside it, a
|
|
89
|
+
* phone's width left the message a column of a word or two a line. The text
|
|
90
|
+
* no longer centres on a button beside it, so it sits at its own top.
|
|
91
|
+
*/
|
|
92
|
+
@container crewlet-callout (width < 28rem) {
|
|
93
|
+
.crewlet-callout__icon,
|
|
94
|
+
.crewlet-callout__content {
|
|
95
|
+
--crewlet-callout-lead: 0px;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
.crewlet-callout__action {
|
|
99
|
+
grid-column: 2;
|
|
100
|
+
grid-row: 2;
|
|
101
|
+
justify-self: start;
|
|
102
|
+
align-self: start;
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
|
|
66
106
|
/*
|
|
67
107
|
* Inline code inside a callout takes the callout's ink. A mono chip that kept
|
|
68
108
|
* its own neutral ink inside a danger banner read as the one part of the
|
package/dist/Canvas/Canvas.d.ts
CHANGED
|
@@ -56,7 +56,13 @@
|
|
|
56
56
|
* - FIT HAPPENS ONCE, on the first layout that has both a measured viewport
|
|
57
57
|
* and content bounds, and again only on request. A data push that changes
|
|
58
58
|
* the content never moves the operator's view, and nothing is shown before
|
|
59
|
-
* that first fit.
|
|
59
|
+
* that first fit. With `refitOnResize`, a RESIZE refits a view nobody has
|
|
60
|
+
* moved since its last fit: that view was the whole content, and a window
|
|
61
|
+
* made narrower that kept the old zoom would cut the content off for a
|
|
62
|
+
* reader who never asked to look at less of it. Once the reader has panned
|
|
63
|
+
* or zoomed, a resize keeps their view and only keeps the content
|
|
64
|
+
* reachable. It is opt in because a screen that chooses its own views
|
|
65
|
+
* after a fit (a chart held at a legible zoom) decides its own refits.
|
|
60
66
|
* - MOTION ONLY ON REQUEST. A fit, a zoom button or a reveal eases; a drag, a
|
|
61
67
|
* pinch, a wheel and a relayout anchor never do, and under reduced motion
|
|
62
68
|
* nothing does. An easing lasts as long as its transition: a clamp that
|
|
@@ -85,6 +91,8 @@ export interface CanvasHandle {
|
|
|
85
91
|
fit(): void;
|
|
86
92
|
/** Zoom about the viewport centre. */
|
|
87
93
|
zoomBy(factor: number): void;
|
|
94
|
+
/** Zoom about the viewport centre to one scale, 1 being actual size, within the limits. */
|
|
95
|
+
zoomTo(scale: number): void;
|
|
88
96
|
/** Pan the least distance that brings a world rectangle into view. */
|
|
89
97
|
reveal(target: CanvasRect): void;
|
|
90
98
|
/** Keep a node still on screen across a relayout: see `anchorView`. */
|
|
@@ -125,12 +133,28 @@ export interface CanvasHandle {
|
|
|
125
133
|
restoreView(): void;
|
|
126
134
|
/** A world rectangle in viewport coordinates, for positioning an overlay. */
|
|
127
135
|
screenRect(target: CanvasRect): CanvasRect;
|
|
136
|
+
/**
|
|
137
|
+
* The world point under a point on the page, such as a click's
|
|
138
|
+
* `clientX` and `clientY`: where a tool that places something puts it.
|
|
139
|
+
*/
|
|
140
|
+
worldAt(client: CanvasPoint): CanvasPoint;
|
|
128
141
|
}
|
|
142
|
+
/**
|
|
143
|
+
* The pointer the field shows while nothing is being dragged.
|
|
144
|
+
*
|
|
145
|
+
* `hand` says the field pans, which is what a chart moved by dragging it
|
|
146
|
+
* wants. A surface with tools names the one its tool means: `pointer` for
|
|
147
|
+
* selecting, `crosshair` for placing a thing, `text` for placing text. A pan
|
|
148
|
+
* in progress always shows the closed hand, whatever the tool.
|
|
149
|
+
*/
|
|
150
|
+
export type CanvasCursor = 'hand' | 'pointer' | 'crosshair' | 'text';
|
|
129
151
|
/** Every string the canvas renders on its own. */
|
|
130
152
|
export interface CanvasLabels {
|
|
131
153
|
zoomIn: string;
|
|
132
154
|
zoomOut: string;
|
|
133
155
|
fit: string;
|
|
156
|
+
/** The control that shows the content at actual size. */
|
|
157
|
+
actualSize: string;
|
|
134
158
|
/**
|
|
135
159
|
* The zoom readout, given the zoom as a whole percentage. It is also what
|
|
136
160
|
* opens the box a reader types one into, so it says both.
|
|
@@ -145,9 +169,10 @@ export interface CanvasLabels {
|
|
|
145
169
|
}
|
|
146
170
|
/**
|
|
147
171
|
* What the field under the content is drawn as. `plain` is the page's own
|
|
148
|
-
* ground; `dotted` lays a grid of dots on
|
|
172
|
+
* ground; `dotted` lays a grid of dots on the frame, and `grid` lays one on
|
|
173
|
+
* the content's own plane. See [CanvasProps.ground].
|
|
149
174
|
*/
|
|
150
|
-
export type CanvasGround = 'plain' | 'dotted';
|
|
175
|
+
export type CanvasGround = 'plain' | 'dotted' | 'grid';
|
|
151
176
|
export interface CanvasProps {
|
|
152
177
|
/** The accessible name of the viewport, such as "Organization chart". */
|
|
153
178
|
label: string;
|
|
@@ -184,6 +209,12 @@ export interface CanvasProps {
|
|
|
184
209
|
* acts on the canvas from 800px away is a control nobody finds.
|
|
185
210
|
*/
|
|
186
211
|
controlsExtra?: ReactNode | undefined;
|
|
212
|
+
/**
|
|
213
|
+
* A control in the zoom bar that shows the content at actual size, which
|
|
214
|
+
* Shift 0 does whether or not it is drawn. For a canvas of pages, where a
|
|
215
|
+
* page at its own size is a view a reader asks for by name.
|
|
216
|
+
*/
|
|
217
|
+
controlsActualSize?: boolean | undefined;
|
|
187
218
|
/**
|
|
188
219
|
* Bars of the caller's own, stacked under the control bar in the same
|
|
189
220
|
* corner: a switch between two drawings of the content, a note about a key.
|
|
@@ -229,8 +260,31 @@ export interface CanvasProps {
|
|
|
229
260
|
* anybody drags it. They are drawn on the frame rather than on the content,
|
|
230
261
|
* so they stay put while the content moves over them. `plain`, the default,
|
|
231
262
|
* is the page's own ground and nothing else.
|
|
263
|
+
*
|
|
264
|
+
* `grid` is a design tool's ground: the same dots laid on the content's own
|
|
265
|
+
* plane, so they pan with it and their pitch follows the zoom (see
|
|
266
|
+
* [gridOf]). For a canvas of things a person places and arranges, where the
|
|
267
|
+
* grid is the surface they are placed ON rather than a texture behind a
|
|
268
|
+
* chart, and a grid that stayed put while the boards moved over it would
|
|
269
|
+
* read as two planes sliding apart.
|
|
232
270
|
*/
|
|
233
271
|
ground?: CanvasGround | undefined;
|
|
272
|
+
/**
|
|
273
|
+
* The smallest zoom a fit may take: see [fitView]. [CANVAS_MIN_ZOOM] unless
|
|
274
|
+
* it is named, which suits a chart of cards; a canvas of pages names a
|
|
275
|
+
* lower one, so that a fit shows all of a design however wide it is laid.
|
|
276
|
+
*/
|
|
277
|
+
minZoom?: number | undefined;
|
|
278
|
+
/** The pointer the field shows: see [CanvasCursor]. */
|
|
279
|
+
cursor?: CanvasCursor | undefined;
|
|
280
|
+
/**
|
|
281
|
+
* Refit on a resize while the view is still the last fit, rather than keep
|
|
282
|
+
* the zoom the old size was fitted at. For a surface whose fit is the view
|
|
283
|
+
* a reader expects back whatever the window does, such as a design's
|
|
284
|
+
* boards. Off by default: a screen that adjusts the view after each fit
|
|
285
|
+
* (holding a zoom, revealing a card) runs its own refit.
|
|
286
|
+
*/
|
|
287
|
+
refitOnResize?: boolean | undefined;
|
|
234
288
|
/**
|
|
235
289
|
* Whether one finger can pan the canvas at all.
|
|
236
290
|
*
|
|
@@ -257,4 +311,27 @@ export interface CanvasProps {
|
|
|
257
311
|
ref?: Ref<CanvasHandle> | undefined;
|
|
258
312
|
className?: string | undefined;
|
|
259
313
|
}
|
|
260
|
-
export declare function Canvas({ label, content, children, overlay, controls, controlsPlacement, controlsExtra, controlsBelow, hint, largestItemWidth, dimmed, ground, touch, labels, onReady, onViewChange, ref, className, }: CanvasProps): import("react").JSX.Element;
|
|
314
|
+
export declare function Canvas({ label, content, children, overlay, controls, controlsPlacement, controlsExtra, controlsActualSize, controlsBelow, hint, largestItemWidth, dimmed, ground, minZoom, cursor, refitOnResize, touch, labels, onReady, onViewChange, ref, className, }: CanvasProps): import("react").JSX.Element;
|
|
315
|
+
/**
|
|
316
|
+
* Every pointer cursor, as custom properties on the canvas's root: the field
|
|
317
|
+
* reads the one its [CanvasCursor] names, and content inside the canvas (a
|
|
318
|
+
* board's shield, a resize handle's neighbours) reads the same drawings
|
|
319
|
+
* rather than the browser's own, so one pointer family runs across the whole
|
|
320
|
+
* surface. Each falls back to its keyword where it is read.
|
|
321
|
+
*/
|
|
322
|
+
/**
|
|
323
|
+
* WHERE A `grid` GROUND'S DOTS FALL for a view: their pitch on screen as a
|
|
324
|
+
* multiple of the dotted step, and the screen point one of them sits on.
|
|
325
|
+
*
|
|
326
|
+
* The world's pitch doubles or halves with the zoom so the screen pitch stays
|
|
327
|
+
* between one and two steps, as a design tool's grid does: at every zoom the
|
|
328
|
+
* dots are as dense as the dotted ground's and never twice as sparse, and one
|
|
329
|
+
* of them always sits on the content's origin, so the grid and the content
|
|
330
|
+
* never slide apart. The offset is the view's own translation, since the
|
|
331
|
+
* background repeats from it both ways.
|
|
332
|
+
*/
|
|
333
|
+
export declare function gridOf(view: CanvasView): {
|
|
334
|
+
scale: number;
|
|
335
|
+
x: number;
|
|
336
|
+
y: number;
|
|
337
|
+
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A control's tooltip that names its keyboard shortcut: "Zoom in" and the key
|
|
3
|
+
* that does it, drawn as keycaps.
|
|
4
|
+
*
|
|
5
|
+
* Every control on a canvas has a key, and a reader who has to hover each one
|
|
6
|
+
* to learn its key is a reader who is told it the moment it is useful. The tip
|
|
7
|
+
* describes the control rather than naming it (see Tooltip), so a screen reader
|
|
8
|
+
* hears the control's own name and then its shortcut, which the keycaps read
|
|
9
|
+
* aloud through Kbd's spoken form.
|
|
10
|
+
*/
|
|
11
|
+
import type { ReactElement } from 'react';
|
|
12
|
+
import { type TooltipPlacement } from '../Tooltip/index.js';
|
|
13
|
+
export interface ShortcutTipProps {
|
|
14
|
+
/** What the control does: the words the tooltip opens with. */
|
|
15
|
+
label: string;
|
|
16
|
+
/** The keys of the shortcut, in Kbd's names: `['Shift', '1']`, `['V']`. */
|
|
17
|
+
keys: readonly string[];
|
|
18
|
+
placement?: TooltipPlacement | undefined;
|
|
19
|
+
/** Exactly one element: the control. */
|
|
20
|
+
children: ReactElement;
|
|
21
|
+
}
|
|
22
|
+
export declare function ShortcutTip({ label, keys, placement, children }: ShortcutTipProps): import("react").JSX.Element;
|
|
@@ -160,8 +160,10 @@ export declare const CANVAS_ZOOM_LIMITS: CanvasZoomLimits;
|
|
|
160
160
|
* width in world units of the widest one, which the chart above this knows
|
|
161
161
|
* because it measured every card; with none given the fixed ceiling stands. It
|
|
162
162
|
* never goes below that fixed ceiling and never above [CANVAS_ZOOM_CEILING].
|
|
163
|
+
*
|
|
164
|
+
* `floor` is the fit's own floor, passed through to [fitView].
|
|
163
165
|
*/
|
|
164
|
-
export declare function zoomLimits(content: CanvasRect | null, viewport: CanvasSize, largestItem?: number, padding?: number): CanvasZoomLimits;
|
|
166
|
+
export declare function zoomLimits(content: CanvasRect | null, viewport: CanvasSize, largestItem?: number, padding?: number, floor?: number): CanvasZoomLimits;
|
|
165
167
|
export declare function clampZoom(k: number, limits?: CanvasZoomLimits): number;
|
|
166
168
|
/** Where a world point is drawn, in viewport coordinates. */
|
|
167
169
|
export declare function toScreen(view: CanvasView, point: CanvasPoint): CanvasPoint;
|
|
@@ -177,8 +179,16 @@ export declare function zoomAt(view: CanvasView, factor: number, focus: CanvasPo
|
|
|
177
179
|
* screen on each axis. A view that already satisfies it comes back unchanged.
|
|
178
180
|
*/
|
|
179
181
|
export declare function clampPan(view: CanvasView, content: CanvasRect, viewport: CanvasSize, margin?: number): CanvasView;
|
|
180
|
-
/**
|
|
181
|
-
|
|
182
|
+
/**
|
|
183
|
+
* The view that shows all of `content`, centred, at no more than actual size.
|
|
184
|
+
*
|
|
185
|
+
* `floor` is the smallest zoom the fit may take, [CANVAS_MIN_ZOOM] unless it
|
|
186
|
+
* is named. A chart of cards keeps that floor, because below it a card is a
|
|
187
|
+
* grey smudge and panning the overflow is the better view. A canvas of pages
|
|
188
|
+
* names a lower one: a design laid out across many 1440px boards is several
|
|
189
|
+
* screens wide, and a fit that stops at a quarter clips it on every side.
|
|
190
|
+
*/
|
|
191
|
+
export declare function fitView(content: CanvasRect, viewport: CanvasSize, padding?: number, floor?: number): CanvasView;
|
|
182
192
|
/** The smallest pan that brings world rectangle `target` inside the padded viewport. */
|
|
183
193
|
export declare function revealView(view: CanvasView, target: CanvasRect, viewport: CanvasSize, padding?: number): CanvasView;
|
|
184
194
|
/**
|
package/dist/Canvas/index.d.ts
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import './Canvas.css';
|
|
2
|
-
export { Canvas } from './Canvas.js';
|
|
3
|
-
export type { CanvasGround, CanvasHandle, CanvasLabels, CanvasProps } from './Canvas.js';
|
|
2
|
+
export { Canvas, gridOf } from './Canvas.js';
|
|
3
|
+
export type { CanvasCursor, CanvasGround, CanvasHandle, CanvasLabels, CanvasProps } from './Canvas.js';
|
|
4
|
+
export { ShortcutTip } from './ShortcutTip.js';
|
|
5
|
+
export type { ShortcutTipProps } from './ShortcutTip.js';
|
|
4
6
|
export { CANVAS_COMPOSE_CONTEXT, CANVAS_FIT_MAX_ZOOM, CANVAS_FIT_PADDING, CANVAS_FOCUS_CONTEXT, CANVAS_MAX_ZOOM, CANVAS_MIN_ZOOM, CANVAS_PAN_MARGIN, CANVAS_PAN_STEP, CANVAS_REVEAL_PADDING, CANVAS_TAP_SLOP, CANVAS_WHEEL_LINE_PX, CANVAS_WHEEL_ZOOM_PER_PIXEL, CANVAS_ZOOM_CEILING, CANVAS_ZOOM_LIMITS, CANVAS_ZOOM_STEP, IDENTITY_VIEW, anchorView, beyondSlop, clampPan, clampZoom, fitView, panBy, pinchView, regionView, revealView, screenRect, toScreen, toWorld, wheelPixels, wheelZoomFactor, zoomAt, zoomLimits, } from './geometry.js';
|
|
5
7
|
export type { CanvasPoint, CanvasRect, CanvasSize, CanvasView, CanvasZoomLimits, PinchStart, WheelLike, } from './geometry.js';
|
package/dist/Canvas/index.js
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
export { CANVAS_COMPOSE_CONTEXT, CANVAS_FIT_MAX_ZOOM, CANVAS_FIT_PADDING, CANVAS_FOCUS_CONTEXT, CANVAS_MAX_ZOOM, CANVAS_MIN_ZOOM, CANVAS_PAN_MARGIN, CANVAS_PAN_STEP, CANVAS_REVEAL_PADDING, CANVAS_TAP_SLOP, CANVAS_WHEEL_LINE_PX, CANVAS_WHEEL_ZOOM_PER_PIXEL, CANVAS_ZOOM_CEILING, CANVAS_ZOOM_LIMITS, CANVAS_ZOOM_STEP, Canvas, IDENTITY_VIEW, anchorView, beyondSlop, clampPan, clampZoom, fitView, panBy, pinchView, regionView, revealView, screenRect, toScreen, toWorld, wheelPixels, wheelZoomFactor, zoomAt, zoomLimits } from '../chunk-
|
|
2
|
-
import '../chunk-
|
|
3
|
-
import '../chunk-
|
|
1
|
+
export { CANVAS_COMPOSE_CONTEXT, CANVAS_FIT_MAX_ZOOM, CANVAS_FIT_PADDING, CANVAS_FOCUS_CONTEXT, CANVAS_MAX_ZOOM, CANVAS_MIN_ZOOM, CANVAS_PAN_MARGIN, CANVAS_PAN_STEP, CANVAS_REVEAL_PADDING, CANVAS_TAP_SLOP, CANVAS_WHEEL_LINE_PX, CANVAS_WHEEL_ZOOM_PER_PIXEL, CANVAS_ZOOM_CEILING, CANVAS_ZOOM_LIMITS, CANVAS_ZOOM_STEP, Canvas, IDENTITY_VIEW, ShortcutTip, anchorView, beyondSlop, clampPan, clampZoom, fitView, gridOf, panBy, pinchView, regionView, revealView, screenRect, toScreen, toWorld, wheelPixels, wheelZoomFactor, zoomAt, zoomLimits } from '../chunk-22UEIXZE.js';
|
|
2
|
+
import '../chunk-LM3ISVJA.js';
|
|
3
|
+
import '../chunk-SMBKXWML.js';
|
|
4
|
+
import '../chunk-5FYPE5GL.js';
|
|
5
|
+
import '../chunk-OMV5W53A.js';
|
|
4
6
|
import '../chunk-R25RGPUB.js';
|
|
5
7
|
import '../chunk-OG6CL3EB.js';
|
|
6
8
|
import '../chunk-4FQT6ZAY.js';
|
|
@@ -33,11 +33,24 @@
|
|
|
33
33
|
background-size: var(--spacing-5) var(--spacing-5);
|
|
34
34
|
}
|
|
35
35
|
|
|
36
|
+
/*
|
|
37
|
+
* A GRID ON THE CONTENT'S PLANE (`ground="grid"`): the same dots, but pitched
|
|
38
|
+
* and placed by the view (`gridOf`), so they pan and zoom with the content.
|
|
39
|
+
* The dots themselves stay one screen pixel, as a design tool's do.
|
|
40
|
+
*/
|
|
41
|
+
.crewlet-canvas[data-ground='grid'] {
|
|
42
|
+
background-image: radial-gradient(var(--color-border-strong) 1px, transparent 1.2px);
|
|
43
|
+
background-size:
|
|
44
|
+
calc(var(--spacing-5) * var(--crewlet-canvas-grid-scale, 1))
|
|
45
|
+
calc(var(--spacing-5) * var(--crewlet-canvas-grid-scale, 1));
|
|
46
|
+
background-position: var(--crewlet-canvas-grid-x, 0) var(--crewlet-canvas-grid-y, 0);
|
|
47
|
+
}
|
|
48
|
+
|
|
36
49
|
.crewlet-canvas__viewport {
|
|
37
50
|
position: absolute;
|
|
38
51
|
inset: 0;
|
|
39
52
|
overflow: hidden;
|
|
40
|
-
cursor: grab;
|
|
53
|
+
cursor: var(--crewlet-canvas-cursor-hand, grab);
|
|
41
54
|
/* Until it is tapped, one finger belongs to the page's vertical scroll. */
|
|
42
55
|
touch-action: pan-y;
|
|
43
56
|
}
|
|
@@ -55,8 +68,28 @@
|
|
|
55
68
|
touch-action: none;
|
|
56
69
|
}
|
|
57
70
|
|
|
58
|
-
|
|
59
|
-
|
|
71
|
+
/*
|
|
72
|
+
* THE POINTER SAYS WHAT A PRESS WILL DO. The drawings are the component's
|
|
73
|
+
* (`CURSORS`, written on the root), each falling back to its keyword. A pan in
|
|
74
|
+
* progress shows the closed hand whatever the tool, and it is set on the whole
|
|
75
|
+
* canvas rather than the field, so a drag that crosses a board or a note keeps
|
|
76
|
+
* the hand it started with.
|
|
77
|
+
*/
|
|
78
|
+
.crewlet-canvas[data-cursor='pointer'] .crewlet-canvas__viewport {
|
|
79
|
+
cursor: var(--crewlet-canvas-cursor-pointer, default);
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
.crewlet-canvas[data-cursor='crosshair'] .crewlet-canvas__viewport {
|
|
83
|
+
cursor: var(--crewlet-canvas-cursor-crosshair, crosshair);
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
.crewlet-canvas[data-cursor='text'] .crewlet-canvas__viewport {
|
|
87
|
+
cursor: var(--crewlet-canvas-cursor-text, text);
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
.crewlet-canvas[data-panning='true'] .crewlet-canvas__viewport,
|
|
91
|
+
.crewlet-canvas[data-panning='true'] .crewlet-canvas__viewport * {
|
|
92
|
+
cursor: var(--crewlet-canvas-cursor-grabbing, grabbing);
|
|
60
93
|
user-select: none;
|
|
61
94
|
}
|
|
62
95
|
|
|
@@ -219,6 +252,16 @@
|
|
|
219
252
|
display: none;
|
|
220
253
|
}
|
|
221
254
|
|
|
255
|
+
/*
|
|
256
|
+
* THE NOTE GROWS AWAY FROM THE CORNER. It comes and goes as the canvas's state
|
|
257
|
+
* does, and drawn on the corner's side of the zoom bar it would push the bar
|
|
258
|
+
* out from under a pointer on its way to it; so in a bottom corner it is drawn
|
|
259
|
+
* above the bar, and the bar never moves.
|
|
260
|
+
*/
|
|
261
|
+
.crewlet-canvas__controls:not([data-placement='top-right']) .crewlet-canvas__hint {
|
|
262
|
+
order: -1;
|
|
263
|
+
}
|
|
264
|
+
|
|
222
265
|
/*
|
|
223
266
|
* THE ZOOM READOUT, between the two steppers. It says where the view stands,
|
|
224
267
|
* which two chevrons never do, and it is the way to a number without pressing a
|
|
@@ -261,6 +304,22 @@
|
|
|
261
304
|
border-radius: var(--radius-chip);
|
|
262
305
|
}
|
|
263
306
|
|
|
307
|
+
/* Actual size, as a ratio: the readout's own control, at the button step. */
|
|
308
|
+
.crewlet-canvas__actual {
|
|
309
|
+
width: var(--size-control-sm);
|
|
310
|
+
}
|
|
311
|
+
|
|
312
|
+
/*
|
|
313
|
+
* A control's tip with its shortcut (ShortcutTip.tsx): the words, then the
|
|
314
|
+
* keycaps, on one line.
|
|
315
|
+
*/
|
|
316
|
+
.crewlet-shortcut-tip {
|
|
317
|
+
display: inline-flex;
|
|
318
|
+
align-items: center;
|
|
319
|
+
gap: var(--spacing-2);
|
|
320
|
+
white-space: nowrap;
|
|
321
|
+
}
|
|
322
|
+
|
|
264
323
|
.crewlet-canvas__zoom:hover:not(:disabled) {
|
|
265
324
|
color: var(--color-text-primary);
|
|
266
325
|
background: var(--color-surface-hover);
|