@multiplatform.one/components 10.2.0 → 10.3.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/dist/cjs/views/Gantt.cjs +54 -37
- package/dist/cjs/views/Gantt.native.cjs +45 -30
- package/dist/cjs/views/Gantt.native.js +45 -30
- package/dist/cjs/views/Gantt.native.js.map +1 -1
- package/dist/cjs/views/GanttDateGrip.cjs +3 -3
- package/dist/cjs/views/GanttDateGrip.native.cjs +3 -3
- package/dist/cjs/views/GanttDateGrip.native.js +3 -3
- package/dist/cjs/views/GanttDateGrip.native.js.map +1 -1
- package/dist/cjs/views/eventTint.cjs +16 -4
- package/dist/cjs/views/eventTint.native.cjs +17 -4
- package/dist/cjs/views/eventTint.native.js +17 -4
- package/dist/cjs/views/eventTint.native.js.map +1 -1
- package/dist/cjs/views/ganttMath.cjs +10 -0
- package/dist/cjs/views/ganttMath.native.cjs +10 -0
- package/dist/cjs/views/ganttMath.native.js +10 -0
- package/dist/cjs/views/ganttMath.native.js.map +1 -1
- package/dist/cjs/views/index.cjs +3 -0
- package/dist/cjs/views/index.native.cjs +3 -0
- package/dist/cjs/views/index.native.js +3 -0
- package/dist/cjs/views/index.native.js.map +1 -1
- package/dist/esm/views/Gantt.mjs +58 -41
- package/dist/esm/views/Gantt.mjs.map +1 -1
- package/dist/esm/views/Gantt.native.js +49 -34
- package/dist/esm/views/Gantt.native.js.map +1 -1
- package/dist/esm/views/GanttDateGrip.mjs +3 -3
- package/dist/esm/views/GanttDateGrip.mjs.map +1 -1
- package/dist/esm/views/GanttDateGrip.native.js +3 -3
- package/dist/esm/views/GanttDateGrip.native.js.map +1 -1
- package/dist/esm/views/eventTint.mjs +15 -5
- package/dist/esm/views/eventTint.mjs.map +1 -1
- package/dist/esm/views/eventTint.native.js +16 -5
- package/dist/esm/views/eventTint.native.js.map +1 -1
- package/dist/esm/views/ganttMath.mjs +8 -1
- package/dist/esm/views/ganttMath.mjs.map +1 -1
- package/dist/esm/views/ganttMath.native.js +8 -1
- package/dist/esm/views/ganttMath.native.js.map +1 -1
- package/dist/esm/views/index.mjs +2 -2
- package/dist/esm/views/index.native.js +2 -2
- package/dist/jsx/views/Gantt.mjs +58 -41
- package/dist/jsx/views/Gantt.mjs.map +1 -1
- package/dist/jsx/views/Gantt.native.cjs +45 -30
- package/dist/jsx/views/Gantt.native.js +45 -30
- package/dist/jsx/views/Gantt.native.js.map +1 -1
- package/dist/jsx/views/GanttDateGrip.mjs +3 -3
- package/dist/jsx/views/GanttDateGrip.mjs.map +1 -1
- package/dist/jsx/views/GanttDateGrip.native.cjs +3 -3
- package/dist/jsx/views/GanttDateGrip.native.js +3 -3
- package/dist/jsx/views/GanttDateGrip.native.js.map +1 -1
- package/dist/jsx/views/eventTint.mjs +15 -5
- package/dist/jsx/views/eventTint.mjs.map +1 -1
- package/dist/jsx/views/eventTint.native.cjs +17 -4
- package/dist/jsx/views/eventTint.native.js +17 -4
- package/dist/jsx/views/eventTint.native.js.map +1 -1
- package/dist/jsx/views/ganttMath.mjs +8 -1
- package/dist/jsx/views/ganttMath.mjs.map +1 -1
- package/dist/jsx/views/ganttMath.native.cjs +10 -0
- package/dist/jsx/views/ganttMath.native.js +10 -0
- package/dist/jsx/views/ganttMath.native.js.map +1 -1
- package/dist/jsx/views/index.mjs +2 -2
- package/dist/jsx/views/index.native.cjs +3 -0
- package/dist/jsx/views/index.native.js +3 -0
- package/dist/jsx/views/index.native.js.map +1 -1
- package/package.json +7 -7
- package/src/views/Gantt.barInk.spec.tsx +149 -21
- package/src/views/Gantt.grips.spec.tsx +21 -4
- package/src/views/Gantt.phone.spec.tsx +205 -0
- package/src/views/Gantt.spec.tsx +15 -2
- package/src/views/Gantt.tint.palette.spec.ts +14 -7
- package/src/views/Gantt.tsx +144 -101
- package/src/views/GanttDateGrip.tsx +4 -4
- package/src/views/eventTint.ts +23 -4
- package/src/views/ganttMath.ts +26 -0
- package/src/views/index.ts +3 -0
- package/types/views/Gantt.d.ts.map +1 -1
- package/types/views/eventTint.d.ts +5 -2
- package/types/views/eventTint.d.ts.map +1 -1
- package/types/views/ganttMath.d.ts +14 -0
- package/types/views/ganttMath.d.ts.map +1 -1
- package/types/views/index.d.ts +1 -1
- package/types/views/index.d.ts.map +1 -1
package/src/views/Gantt.tsx
CHANGED
|
@@ -10,6 +10,7 @@ import {
|
|
|
10
10
|
hairlineWidth,
|
|
11
11
|
keyboardFocusRingProps,
|
|
12
12
|
useChartPalette,
|
|
13
|
+
useLayoutSizeClass,
|
|
13
14
|
useResolvedKnobs,
|
|
14
15
|
wasKeyboardFocus,
|
|
15
16
|
} from "@multiplatform.one/theme";
|
|
@@ -36,12 +37,14 @@ import { SizableText, Text as TamaguiText, XStack, YStack, isWeb, type YStackPro
|
|
|
36
37
|
import { ScrollView } from "../ScrollView";
|
|
37
38
|
import { LinearGradient } from "tamagui/linear-gradient";
|
|
38
39
|
import { normalizeColor } from "@tamagui/core";
|
|
39
|
-
import { useTheme, getTokenValue } from "tamagui";
|
|
40
|
+
import { useTheme, getFontSize, getTokenValue, type FontSizeTokens } from "tamagui";
|
|
40
41
|
import { GanttDateGrip } from "./GanttDateGrip";
|
|
41
42
|
import { GanttGripDot } from "./GanttGripDot";
|
|
42
43
|
import {
|
|
43
44
|
EVENT_BAR_PX,
|
|
44
45
|
EVENT_GRIP_DOT_PX,
|
|
46
|
+
EVENT_STRIP_BAND_PX,
|
|
47
|
+
EVENT_STRIP_BOTTOM_PX,
|
|
45
48
|
eventLabelInk,
|
|
46
49
|
eventPaint,
|
|
47
50
|
eventSolid,
|
|
@@ -65,6 +68,7 @@ import {
|
|
|
65
68
|
ganttTaskAccessibleLabel,
|
|
66
69
|
generateTicks,
|
|
67
70
|
isBoundedSpan,
|
|
71
|
+
labelFitsBar,
|
|
68
72
|
openBarGeometry,
|
|
69
73
|
openSpanExtents,
|
|
70
74
|
openSpanLabelParts,
|
|
@@ -421,8 +425,8 @@ function BarIntentWrap({
|
|
|
421
425
|
return <Intent name={intent}>{children}</Intent>;
|
|
422
426
|
}
|
|
423
427
|
|
|
428
|
+
const MONTH_LABEL_MIN_PX = 36;
|
|
424
429
|
const STRIP_INSET_PX = 4;
|
|
425
|
-
const STRIP_BOTTOM_PX = 2;
|
|
426
430
|
const STRIP_TRACK_OPACITY = 0.3;
|
|
427
431
|
|
|
428
432
|
function GanttBarLabel({
|
|
@@ -431,12 +435,14 @@ function GanttBarLabel({
|
|
|
431
435
|
state,
|
|
432
436
|
surface,
|
|
433
437
|
dark,
|
|
438
|
+
stripBand,
|
|
434
439
|
}: {
|
|
435
440
|
title: string;
|
|
436
441
|
fill: string;
|
|
437
442
|
state: EventState;
|
|
438
443
|
surface: string | undefined;
|
|
439
444
|
dark: boolean;
|
|
445
|
+
stripBand: number;
|
|
440
446
|
}) {
|
|
441
447
|
const { knobProps } = useResolvedKnobs();
|
|
442
448
|
const theme = useTheme() as unknown as EventThemeValues;
|
|
@@ -456,6 +462,7 @@ function GanttBarLabel({
|
|
|
456
462
|
{...knobProps.label}
|
|
457
463
|
numberOfLines={1}
|
|
458
464
|
paddingHorizontal={knobProps.control.paddingHorizontal}
|
|
465
|
+
marginBottom={stripBand}
|
|
459
466
|
pointerEvents="none"
|
|
460
467
|
zIndex={1}
|
|
461
468
|
aria-hidden
|
|
@@ -547,23 +554,23 @@ function GanttIntervalFill({
|
|
|
547
554
|
/>
|
|
548
555
|
);
|
|
549
556
|
})}
|
|
550
|
-
{
|
|
557
|
+
{strip && progress != null && (
|
|
551
558
|
<YStack
|
|
552
559
|
position="absolute"
|
|
553
|
-
bottom={
|
|
560
|
+
bottom={EVENT_STRIP_BOTTOM_PX}
|
|
554
561
|
height={EVENT_BAR_PX}
|
|
555
562
|
{...(rtl ? { right: stripStart } : { left: stripStart })}
|
|
556
563
|
width={Math.max(0, width - stripStart - STRIP_INSET_PX)}
|
|
557
564
|
borderRadius={EVENT_BAR_PX / 2}
|
|
558
|
-
backgroundColor={
|
|
565
|
+
backgroundColor={strip as any}
|
|
559
566
|
opacity={STRIP_TRACK_OPACITY}
|
|
560
|
-
{...{ "data-gantt-progress-track":
|
|
567
|
+
{...{ "data-gantt-progress-track": strip }}
|
|
561
568
|
/>
|
|
562
569
|
)}
|
|
563
570
|
{stripWidth > 0 && (
|
|
564
571
|
<YStack
|
|
565
572
|
position="absolute"
|
|
566
|
-
bottom={
|
|
573
|
+
bottom={EVENT_STRIP_BOTTOM_PX}
|
|
567
574
|
height={EVENT_BAR_PX}
|
|
568
575
|
{...(rtl ? { right: stripStart } : { left: stripStart })}
|
|
569
576
|
width={stripWidth}
|
|
@@ -701,6 +708,7 @@ export function GanttView({
|
|
|
701
708
|
const canvasBackground = canvasTheme.background?.val;
|
|
702
709
|
const canvasGround = typeof canvasBackground === "string" ? canvasBackground : undefined;
|
|
703
710
|
const dark = useEventDark();
|
|
711
|
+
const sizeClass = useLayoutSizeClass();
|
|
704
712
|
const { t } = useTranslation();
|
|
705
713
|
const { knobProps } = useResolvedKnobs();
|
|
706
714
|
const [zoom, setZoom] = useState<GanttZoom>(initialZoom);
|
|
@@ -730,6 +738,15 @@ export function GanttView({
|
|
|
730
738
|
const pxPerDay = controlHeight * (zoom === "day" ? 1.6 : zoom === "week" ? 0.6 : 0.2);
|
|
731
739
|
const barInset = controlGap;
|
|
732
740
|
const barHeight = rowHeight - barInset * 2;
|
|
741
|
+
// responsive-parity: a phone drops the task label column so the canvas takes
|
|
742
|
+
// the whole width, and each row's name rides its own bar (LC-307 carries a
|
|
743
|
+
// name its bar cannot fit onto the canvas beside it).
|
|
744
|
+
const hasLabelColumn = sizeClass !== "compact";
|
|
745
|
+
const columnWidth = hasLabelColumn ? labelWidth : 0;
|
|
746
|
+
const labelPadding = Number(knobProps.control.paddingHorizontal);
|
|
747
|
+
const labelFontSize = getFontSize(String(knobProps.label.fontSize) as FontSizeTokens, {
|
|
748
|
+
font: String(knobProps.label.fontFamily) as any,
|
|
749
|
+
});
|
|
733
750
|
const railHeight = barHeight / 2;
|
|
734
751
|
const transition = knobProps.motion.slide.transition;
|
|
735
752
|
// Layout props (left) only tween on web — the RN driver cannot animate
|
|
@@ -797,7 +814,7 @@ export function GanttView({
|
|
|
797
814
|
const viewportWidth = canvasViewportRef.current;
|
|
798
815
|
if (viewportWidth === null) pendingAnchorRef.current = date;
|
|
799
816
|
const x = scrollAnchorX(date, range.start, pxPerDay, {
|
|
800
|
-
labelWidth,
|
|
817
|
+
labelWidth: columnWidth,
|
|
801
818
|
chartWidth,
|
|
802
819
|
viewportWidth,
|
|
803
820
|
rtl,
|
|
@@ -808,7 +825,7 @@ export function GanttView({
|
|
|
808
825
|
// don't emit onScroll.
|
|
809
826
|
axisScrollRef.current?.scrollTo?.({ x, animated: false });
|
|
810
827
|
},
|
|
811
|
-
[range.start, pxPerDay,
|
|
828
|
+
[range.start, pxPerDay, columnWidth, rtl, chartWidth],
|
|
812
829
|
);
|
|
813
830
|
const previousRange = useRef({ start: range.start, end: range.end, pxPerDay, rtl });
|
|
814
831
|
useLayoutEffect(() => {
|
|
@@ -1457,25 +1474,24 @@ export function GanttView({
|
|
|
1457
1474
|
// Progress is a fraction of a DURATION; an open span has none, so a bar
|
|
1458
1475
|
// that claimed 40% of forever would be inventing the denominator.
|
|
1459
1476
|
const progress = bounded && !ghost ? clampProgress(span.progress ?? task.progress) : null;
|
|
1460
|
-
const
|
|
1461
|
-
const
|
|
1477
|
+
const fitsLabel = labelFitsBar(barTitle, liveWidth, labelPadding, labelFontSize);
|
|
1478
|
+
const carriesOutside = !geom.eternal && !ghost && resolveSpans(task).length === 1;
|
|
1479
|
+
const labelReadsInside = liveWidth >= 44 && (fitsLabel || !carriesOutside);
|
|
1480
|
+
const showLabel = (!geom.eternal || !hasLabelColumn) && labelReadsInside;
|
|
1481
|
+
const labelOutside = carriesOutside && !labelReadsInside;
|
|
1462
1482
|
const isBarFocused = focusedBarId === barKey;
|
|
1463
1483
|
const showHandles = hoveredId === task.id || sessionLive || isBarFocused;
|
|
1464
|
-
const barState: EventState = ghost
|
|
1465
|
-
? "ghost"
|
|
1466
|
-
: showHandles || geom.eternal
|
|
1467
|
-
? "selected"
|
|
1468
|
-
: "rest";
|
|
1484
|
+
const barState: EventState = ghost ? "ghost" : showHandles ? "selected" : "rest";
|
|
1469
1485
|
// Edge handles map physical sides to logical edges (mirrored under RTL).
|
|
1470
1486
|
const handleWidth = bounded ? (geom.width >= 24 ? 8 : geom.width >= 12 ? 4 : 0) : 0;
|
|
1471
1487
|
const physicalLeftEdge: GanttResizeEdge = rtl ? "end" : "start";
|
|
1472
1488
|
const physicalRightEdge: GanttResizeEdge = rtl ? "start" : "end";
|
|
1473
1489
|
const logicalLeft = geom.x + liveTransformX * dirSign;
|
|
1474
1490
|
const gripShift = (edge: GanttResizeEdge) => {
|
|
1475
|
-
const at = edge === "start" ? logicalLeft : logicalLeft + liveWidth;
|
|
1491
|
+
const at = edge === "start" ? logicalLeft : logicalLeft + liveWidth - EVENT_GRIP_DOT_PX;
|
|
1476
1492
|
const inside = Math.max(
|
|
1477
|
-
visibleWindow.start
|
|
1478
|
-
Math.min(at, visibleWindow.end - EVENT_GRIP_DOT_PX
|
|
1493
|
+
visibleWindow.start,
|
|
1494
|
+
Math.min(at, visibleWindow.end - EVENT_GRIP_DOT_PX),
|
|
1479
1495
|
);
|
|
1480
1496
|
return (inside - at) * dirSign;
|
|
1481
1497
|
};
|
|
@@ -1614,6 +1630,7 @@ export function GanttView({
|
|
|
1614
1630
|
state={barState}
|
|
1615
1631
|
surface={canvasGround}
|
|
1616
1632
|
dark={dark}
|
|
1633
|
+
stripBand={progress != null ? EVENT_STRIP_BAND_PX : 0}
|
|
1617
1634
|
/>
|
|
1618
1635
|
)}
|
|
1619
1636
|
|
|
@@ -1675,8 +1692,8 @@ export function GanttView({
|
|
|
1675
1692
|
{...{ "data-gantt-resize-handle": physicalLeftEdge }}
|
|
1676
1693
|
>
|
|
1677
1694
|
<GanttGripDot
|
|
1678
|
-
left={gripShift(physicalLeftEdge)
|
|
1679
|
-
top={
|
|
1695
|
+
left={gripShift(physicalLeftEdge)}
|
|
1696
|
+
top={physicalLeftEdge === "start" ? height - EVENT_GRIP_DOT_PX : 0}
|
|
1680
1697
|
color={fill}
|
|
1681
1698
|
shown={showHandles}
|
|
1682
1699
|
edge={physicalLeftEdge}
|
|
@@ -1693,8 +1710,8 @@ export function GanttView({
|
|
|
1693
1710
|
{...{ "data-gantt-resize-handle": physicalRightEdge }}
|
|
1694
1711
|
>
|
|
1695
1712
|
<GanttGripDot
|
|
1696
|
-
left={handleWidth + gripShift(physicalRightEdge)
|
|
1697
|
-
top={
|
|
1713
|
+
left={handleWidth - EVENT_GRIP_DOT_PX + gripShift(physicalRightEdge)}
|
|
1714
|
+
top={physicalRightEdge === "start" ? height - EVENT_GRIP_DOT_PX : 0}
|
|
1698
1715
|
color={fill}
|
|
1699
1716
|
shown={showHandles}
|
|
1700
1717
|
edge={physicalRightEdge}
|
|
@@ -1792,7 +1809,7 @@ export function GanttView({
|
|
|
1792
1809
|
return (
|
|
1793
1810
|
<AsyncBoundary
|
|
1794
1811
|
loading={
|
|
1795
|
-
showSkeleton ? <GanttSkeleton labelWidth={
|
|
1812
|
+
showSkeleton ? <GanttSkeleton labelWidth={columnWidth} rowHeight={rowHeight} /> : false
|
|
1796
1813
|
}
|
|
1797
1814
|
empty={!error && !isLoading && tasks.length === 0}
|
|
1798
1815
|
error={error}
|
|
@@ -1830,9 +1847,14 @@ export function GanttView({
|
|
|
1830
1847
|
)}
|
|
1831
1848
|
|
|
1832
1849
|
{/* Range title is the panel's section heading — shared scale (LC-17). */}
|
|
1833
|
-
|
|
1834
|
-
|
|
1835
|
-
|
|
1850
|
+
{/* responsive-parity: a phone drops this title, where it had no room
|
|
1851
|
+
to read anyway, and the axis month band is its phone twin — it
|
|
1852
|
+
pins the month and year to the canvas viewport. */}
|
|
1853
|
+
{sizeClass === "compact" ? null : (
|
|
1854
|
+
<SizableText {...sectionHeading} {...knobProps.heading} numberOfLines={1}>
|
|
1855
|
+
{rangeLabel}
|
|
1856
|
+
</SizableText>
|
|
1857
|
+
)}
|
|
1836
1858
|
|
|
1837
1859
|
{showZoomSwitcher && (
|
|
1838
1860
|
/* Canonical fused view picker (LC-16 ONE-IMPLEMENTATION). */
|
|
@@ -1854,20 +1876,22 @@ export function GanttView({
|
|
|
1854
1876
|
of the canvas scroller (works web + native), so the tick grid and
|
|
1855
1877
|
bars can never drift apart horizontally. */}
|
|
1856
1878
|
<XStack {...hairline.bottom} borderColor="border-color" data-gantt-axis-row={"true"}>
|
|
1857
|
-
|
|
1858
|
-
|
|
1859
|
-
|
|
1860
|
-
|
|
1861
|
-
|
|
1862
|
-
|
|
1863
|
-
|
|
1864
|
-
|
|
1865
|
-
|
|
1866
|
-
|
|
1867
|
-
|
|
1868
|
-
{
|
|
1869
|
-
|
|
1870
|
-
|
|
1879
|
+
{hasLabelColumn ? (
|
|
1880
|
+
<XStack
|
|
1881
|
+
width={columnWidth}
|
|
1882
|
+
flexShrink={0}
|
|
1883
|
+
height={axisHeight}
|
|
1884
|
+
alignItems="center"
|
|
1885
|
+
paddingHorizontal={knobProps.panelPadding.padding}
|
|
1886
|
+
{...hairlineEnd}
|
|
1887
|
+
borderColor="border-color"
|
|
1888
|
+
backgroundColor={componentColors.surface.background}
|
|
1889
|
+
>
|
|
1890
|
+
<TamaguiText {...knobProps.label} color={knobProps.textAccentColor} numberOfLines={1}>
|
|
1891
|
+
{t("Task")}
|
|
1892
|
+
</TamaguiText>
|
|
1893
|
+
</XStack>
|
|
1894
|
+
) : null}
|
|
1871
1895
|
<ScrollView
|
|
1872
1896
|
ref={axisScrollRef}
|
|
1873
1897
|
horizontal
|
|
@@ -1910,22 +1934,34 @@ export function GanttView({
|
|
|
1910
1934
|
pointerEvents="none"
|
|
1911
1935
|
/>
|
|
1912
1936
|
)}
|
|
1913
|
-
{months.map((band) =>
|
|
1914
|
-
|
|
1937
|
+
{months.map((band) => {
|
|
1938
|
+
const bandEnd = band.x + band.width;
|
|
1939
|
+
// The month and year follow the scroll instead of leaving with
|
|
1940
|
+
// the band's own left edge, so a narrow canvas always names the
|
|
1941
|
+
// month it is showing (FZ-11773).
|
|
1942
|
+
const shown =
|
|
1943
|
+
Math.min(bandEnd, visibleWindow.end) - Math.max(band.x, visibleWindow.start);
|
|
1944
|
+
if (shown < MONTH_LABEL_MIN_PX) return null;
|
|
1945
|
+
const x = Math.min(
|
|
1946
|
+
Math.max(band.x, visibleWindow.start),
|
|
1947
|
+
bandEnd - MONTH_LABEL_MIN_PX,
|
|
1948
|
+
);
|
|
1949
|
+
return (
|
|
1915
1950
|
<TamaguiText
|
|
1916
1951
|
key={band.key}
|
|
1917
1952
|
position="absolute"
|
|
1918
|
-
{...(rtl ? { right:
|
|
1953
|
+
{...(rtl ? { right: x + 4 } : { left: x + 4 })}
|
|
1919
1954
|
top={2}
|
|
1920
|
-
width={Math.max(0,
|
|
1955
|
+
width={Math.max(0, bandEnd - x - 8)}
|
|
1921
1956
|
{...knobProps.label}
|
|
1922
1957
|
color={knobProps.textAccentColor}
|
|
1923
1958
|
numberOfLines={1}
|
|
1959
|
+
{...{ "data-gantt-month": band.key }}
|
|
1924
1960
|
>
|
|
1925
1961
|
{band.label}
|
|
1926
1962
|
</TamaguiText>
|
|
1927
|
-
)
|
|
1928
|
-
)}
|
|
1963
|
+
);
|
|
1964
|
+
})}
|
|
1929
1965
|
{ticks.map((tick) => (
|
|
1930
1966
|
<TamaguiText
|
|
1931
1967
|
key={tick.date.toISOString()}
|
|
@@ -2012,60 +2048,67 @@ export function GanttView({
|
|
|
2012
2048
|
<ScrollView flex={1} scrollEnabled={!scrollLocked}>
|
|
2013
2049
|
<XStack {...{ "data-gantt-scroll-body": "true" }}>
|
|
2014
2050
|
{/* Task label column */}
|
|
2015
|
-
|
|
2016
|
-
|
|
2017
|
-
|
|
2018
|
-
|
|
2019
|
-
|
|
2020
|
-
|
|
2021
|
-
|
|
2022
|
-
|
|
2023
|
-
|
|
2024
|
-
|
|
2025
|
-
|
|
2026
|
-
|
|
2027
|
-
|
|
2028
|
-
|
|
2029
|
-
|
|
2030
|
-
|
|
2031
|
-
|
|
2032
|
-
|
|
2033
|
-
|
|
2034
|
-
|
|
2035
|
-
|
|
2036
|
-
|
|
2037
|
-
|
|
2038
|
-
|
|
2039
|
-
|
|
2040
|
-
|
|
2041
|
-
|
|
2042
|
-
|
|
2043
|
-
|
|
2044
|
-
|
|
2045
|
-
|
|
2046
|
-
|
|
2047
|
-
|
|
2048
|
-
|
|
2049
|
-
|
|
2050
|
-
|
|
2051
|
-
|
|
2052
|
-
|
|
2053
|
-
|
|
2054
|
-
|
|
2055
|
-
|
|
2056
|
-
|
|
2057
|
-
|
|
2058
|
-
|
|
2059
|
-
|
|
2060
|
-
|
|
2061
|
-
|
|
2062
|
-
|
|
2063
|
-
|
|
2064
|
-
|
|
2065
|
-
|
|
2066
|
-
|
|
2067
|
-
|
|
2068
|
-
|
|
2051
|
+
{hasLabelColumn ? (
|
|
2052
|
+
<YStack
|
|
2053
|
+
width={columnWidth}
|
|
2054
|
+
flexShrink={0}
|
|
2055
|
+
{...hairlineEnd}
|
|
2056
|
+
borderColor="border-color"
|
|
2057
|
+
>
|
|
2058
|
+
{tasks.map((task, index) => {
|
|
2059
|
+
const refs = resolveSpans(task);
|
|
2060
|
+
// A row is "selected" when any of ITS spans holds focus — for
|
|
2061
|
+
// a single-span row that is still `focusedBarId === task.id`.
|
|
2062
|
+
const selected = refs.some((ref) => ref.key === focusedBarId);
|
|
2063
|
+
const hovered = hoveredId === task.id;
|
|
2064
|
+
const last = index === tasks.length - 1;
|
|
2065
|
+
const firstKey = refs[0]?.key ?? task.id;
|
|
2066
|
+
return (
|
|
2067
|
+
<XStack
|
|
2068
|
+
key={task.id}
|
|
2069
|
+
height={rowHeight}
|
|
2070
|
+
alignItems="center"
|
|
2071
|
+
paddingHorizontal={knobProps.panelPadding.padding}
|
|
2072
|
+
{...(last ? null : hairline.bottom)}
|
|
2073
|
+
borderColor={minorGridColor}
|
|
2074
|
+
backgroundColor={{
|
|
2075
|
+
default: selected
|
|
2076
|
+
? hovered
|
|
2077
|
+
? componentColors.selection.hover
|
|
2078
|
+
: componentColors.selection.background
|
|
2079
|
+
: hovered
|
|
2080
|
+
? componentColors.interactive.background
|
|
2081
|
+
: "transparent",
|
|
2082
|
+
...(selected ? { press: componentColors.selection.press } : undefined),
|
|
2083
|
+
}}
|
|
2084
|
+
cursor={onItemPress ? "pointer" : undefined}
|
|
2085
|
+
// Tamagui forwards onHoverIn/onHoverOut at runtime; the
|
|
2086
|
+
// RN-flavored View prop type omits them (house Record cast).
|
|
2087
|
+
{...({
|
|
2088
|
+
onHoverIn: () => setHoveredId(task.id),
|
|
2089
|
+
onHoverOut: () => setHoveredId((id) => (id === task.id ? null : id)),
|
|
2090
|
+
} as Record<string, unknown>)}
|
|
2091
|
+
onPress={
|
|
2092
|
+
onItemPress
|
|
2093
|
+
? () => {
|
|
2094
|
+
if (suppressClickRef.current) return;
|
|
2095
|
+
setFocusedBarId(firstKey);
|
|
2096
|
+
setBarKeyboardRing(false);
|
|
2097
|
+
onItemPress(task);
|
|
2098
|
+
}
|
|
2099
|
+
: () => {
|
|
2100
|
+
setFocusedBarId(firstKey);
|
|
2101
|
+
setBarKeyboardRing(false);
|
|
2102
|
+
}
|
|
2103
|
+
}
|
|
2104
|
+
{...{ "data-gantt-row-label": task.id }}
|
|
2105
|
+
>
|
|
2106
|
+
<GanttTaskName title={task.title} selected={selected} body={knobProps.body} />
|
|
2107
|
+
</XStack>
|
|
2108
|
+
);
|
|
2109
|
+
})}
|
|
2110
|
+
</YStack>
|
|
2111
|
+
) : null}
|
|
2069
2112
|
|
|
2070
2113
|
{/* Timeline chart. On native the scroller is the raw RN ScrollView:
|
|
2071
2114
|
Tamagui's styled ScrollView does not deliver onScroll there, and
|
|
@@ -90,11 +90,11 @@ export function GanttDateGrip(props: GanttDateGripProps) {
|
|
|
90
90
|
);
|
|
91
91
|
const left = rtl ? chartWidth - logicalLeft - width : logicalLeft;
|
|
92
92
|
const dotX = Math.max(
|
|
93
|
-
viewport.start
|
|
94
|
-
Math.min(x, viewport.end - EVENT_GRIP_DOT_PX
|
|
93
|
+
viewport.start,
|
|
94
|
+
Math.min(edge === "start" ? x : x - EVENT_GRIP_DOT_PX, viewport.end - EVENT_GRIP_DOT_PX),
|
|
95
95
|
);
|
|
96
|
-
const dotLeft = (rtl ? chartWidth - dotX : dotX) - left
|
|
97
|
-
const dotTop =
|
|
96
|
+
const dotLeft = (rtl ? chartWidth - dotX - EVENT_GRIP_DOT_PX : dotX) - left;
|
|
97
|
+
const dotTop = edge === "start" ? props.barBottom - EVENT_GRIP_DOT_PX : props.barTop;
|
|
98
98
|
const visible = props.shown || focused;
|
|
99
99
|
|
|
100
100
|
const begin = (startX: number) => {
|
package/src/views/eventTint.ts
CHANGED
|
@@ -13,6 +13,9 @@ import {
|
|
|
13
13
|
import { useThemeName } from "tamagui";
|
|
14
14
|
|
|
15
15
|
export const EVENT_BAR_PX = 3;
|
|
16
|
+
export const EVENT_STRIP_BOTTOM_PX = 2;
|
|
17
|
+
/** The band a progress strip owns at the bar's bottom: the strip and its clearance either side. */
|
|
18
|
+
export const EVENT_STRIP_BAND_PX = EVENT_BAR_PX + EVENT_STRIP_BOTTOM_PX * 2;
|
|
16
19
|
export const EVENT_GRIP_DOT_PX = 10;
|
|
17
20
|
|
|
18
21
|
export type EventState = "rest" | "selected" | "ghost";
|
|
@@ -275,8 +278,8 @@ export function eventInk(
|
|
|
275
278
|
/**
|
|
276
279
|
* Ink is the hue's own step 12 in both schemes. Secondary text (times, a
|
|
277
280
|
* proposed bar's label) takes the tone nearest step 11 on the 11-to-12 line
|
|
278
|
-
* that still clears AA on every ground, so it stays dimmer than
|
|
279
|
-
* where step 11 itself fails.
|
|
281
|
+
* that still clears AA and APCA Lc 60 on every ground, so it stays dimmer than
|
|
282
|
+
* the title even where step 11 itself fails.
|
|
280
283
|
*/
|
|
281
284
|
export function eventLabelInk(
|
|
282
285
|
theme: EventThemeValues,
|
|
@@ -294,12 +297,28 @@ export function eventLabelInk(
|
|
|
294
297
|
.map((ground) => (ground ? normalizeToHex(ground) : null))
|
|
295
298
|
.filter((hex): hex is string => hex !== null);
|
|
296
299
|
const reads = (ink: string) =>
|
|
297
|
-
grounded.every(
|
|
300
|
+
grounded.every(
|
|
301
|
+
(ground) =>
|
|
302
|
+
contrast(ink, ground) >= aaTextContrastRatio &&
|
|
303
|
+
Math.abs(apcaContrast(ink, ground)) >= fillLabelLc,
|
|
304
|
+
);
|
|
298
305
|
if (full && tone === "secondary" && dim)
|
|
299
306
|
for (let percent = 0; percent < 100; percent++) {
|
|
300
307
|
const ink = blendOver(full, dim, percent / 100);
|
|
301
308
|
if (ink && reads(ink)) return ink;
|
|
302
309
|
}
|
|
303
310
|
if (full && reads(full)) return full;
|
|
304
|
-
|
|
311
|
+
const anchored = eventInk(
|
|
312
|
+
theme,
|
|
313
|
+
grounds,
|
|
314
|
+
full ?? (tone === "secondary" ? "color-11" : "color-12"),
|
|
315
|
+
);
|
|
316
|
+
const value = themeValue(theme, anchored) ?? anchored;
|
|
317
|
+
const start = normalizeToHex(value);
|
|
318
|
+
if (!start || reads(start)) return anchored;
|
|
319
|
+
for (let percent = 1; percent <= 100; percent++) {
|
|
320
|
+
const held = blendOver(dark ? "#ffffff" : "#000000", start, percent / 100);
|
|
321
|
+
if (held && reads(held)) return held;
|
|
322
|
+
}
|
|
323
|
+
return anchored;
|
|
305
324
|
}
|
package/src/views/ganttMath.ts
CHANGED
|
@@ -475,3 +475,29 @@ export function openSpanLabelParts(span: GanttOpenSpan): { start?: string; end?:
|
|
|
475
475
|
: monthDayLabel(lastDay.getTime() >= startEdge.getTime() ? lastDay : startEdge),
|
|
476
476
|
};
|
|
477
477
|
}
|
|
478
|
+
|
|
479
|
+
/**
|
|
480
|
+
* Average character advance of a single-line label, in em. The house already
|
|
481
|
+
* measures a prose column this way (`READING_WIDTH_CH_EM` is 0.5 for lowercase
|
|
482
|
+
* prose); a task name carries capitals and digits, so it runs wider.
|
|
483
|
+
*/
|
|
484
|
+
export const LABEL_CHAR_EM = 0.62;
|
|
485
|
+
|
|
486
|
+
/** What a one-line label needs, with no text metrics to ask. */
|
|
487
|
+
export function estimateLabelWidth(text: string, fontSize: number): number {
|
|
488
|
+
return text.length * LABEL_CHAR_EM * fontSize;
|
|
489
|
+
}
|
|
490
|
+
|
|
491
|
+
/**
|
|
492
|
+
* Whether `title` reads in full inside a bar `width` wide with `padding`
|
|
493
|
+
* either side. A bar's width comes from its dates, never from its text, so a
|
|
494
|
+
* title that does not fit has to read somewhere else (LC-297).
|
|
495
|
+
*/
|
|
496
|
+
export function labelFitsBar(
|
|
497
|
+
title: string,
|
|
498
|
+
width: number,
|
|
499
|
+
padding: number,
|
|
500
|
+
fontSize: number,
|
|
501
|
+
): boolean {
|
|
502
|
+
return width - padding * 2 >= estimateLabelWidth(title, fontSize);
|
|
503
|
+
}
|
package/src/views/index.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Gantt.d.ts","sourceRoot":"","sources":["../../src/views/Gantt.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Gantt.d.ts","sourceRoot":"","sources":["../../src/views/Gantt.tsx"],"names":[],"mappings":"AAwBA,OAAO,KAAK,EAAE,EAOZ,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AAGf,OAAO,EAA2D,KAAK,WAAW,EAAE,MAAM,SAAS,CAAC;AAoBpG,OAAO,EAAmC,KAAK,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACvF,OAAO,EAyBL,KAAK,aAAa,EAIlB,KAAK,SAAS,EACf,MAAM,aAAa,CAAC;AAQrB;;;;;;GAMG;AACH,MAAM,WAAW,aAAa;IAC5B,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB;;;;OAIG;IACH,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,mDAAmD;IACnD,KAAK,CAAC,EAAE,IAAI,CA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,EAAE,MAAM,CAAC;CACtB;AAkWD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0DG;AACH,wBAAgB,SAAS,CAAC,EACxB,KAAK,EACL,IAAI,EAAE,WAAoB,EAC1B,YAAY,EACZ,WAAW,EACX,UAAU,EACV,cAAc,EACd,gBAAgB,EAChB,QAAgB,EAChB,SAAiB,EACjB,KAAY,EACZ,OAAO,EACP,UAAU,EACV,gBAAgB,EAChB,MAAM,EAAE,UAAU,EAClB,UAAgB,EAChB,SAAgB,EAChB,cAAqB,EACrB,gBAAuB,EACvB,cAAkB,EAClB,WAAW,EACX,UAAU,EACV,kBAAkB,EAClB,gBAAgB,EAChB,WAAW,EACX,GAAG,UAAU,EACd,EAAE,cAAc,qBA0hDhB"}
|
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
export declare const EVENT_BAR_PX = 3;
|
|
2
|
+
export declare const EVENT_STRIP_BOTTOM_PX = 2;
|
|
3
|
+
/** The band a progress strip owns at the bar's bottom: the strip and its clearance either side. */
|
|
4
|
+
export declare const EVENT_STRIP_BAND_PX: number;
|
|
2
5
|
export declare const EVENT_GRIP_DOT_PX = 10;
|
|
3
6
|
export type EventState = "rest" | "selected" | "ghost";
|
|
4
7
|
export interface EventTint {
|
|
@@ -65,8 +68,8 @@ export declare function eventInk(theme: EventThemeValues, grounds: readonly (str
|
|
|
65
68
|
/**
|
|
66
69
|
* Ink is the hue's own step 12 in both schemes. Secondary text (times, a
|
|
67
70
|
* proposed bar's label) takes the tone nearest step 11 on the 11-to-12 line
|
|
68
|
-
* that still clears AA on every ground, so it stays dimmer than
|
|
69
|
-
* where step 11 itself fails.
|
|
71
|
+
* that still clears AA and APCA Lc 60 on every ground, so it stays dimmer than
|
|
72
|
+
* the title even where step 11 itself fails.
|
|
70
73
|
*/
|
|
71
74
|
export declare function eventLabelInk(theme: EventThemeValues, fill: string, grounds: readonly (string | null | undefined)[], dark: boolean, tone?: "primary" | "secondary"): string;
|
|
72
75
|
//# sourceMappingURL=eventTint.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"eventTint.d.ts","sourceRoot":"","sources":["../../src/views/eventTint.ts"],"names":[],"mappings":"AAcA,eAAO,MAAM,YAAY,IAAI,CAAC;AAC9B,eAAO,MAAM,iBAAiB,KAAK,CAAC;AAEpC,MAAM,MAAM,UAAU,GAAG,MAAM,GAAG,UAAU,GAAG,OAAO,CAAC;AAEvD,MAAM,WAAW,SAAS;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;CACf;AAED,8GAA8G;AAC9G,eAAO,MAAM,UAAU,EAAE,MAAM,CAAC,OAAO,GAAG,MAAM,EAAE,SAAS,CAG1D,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,cAAc,EAAE,MAAM,CAAC,OAAO,CAAC,UAAU,EAAE,OAAO,CAAC,EAAE,MAAM,CAGvE,CAAC;AACF,eAAO,MAAM,gBAAgB,MAAM,CAAC;AACpC,4GAA4G;AAC5G,eAAO,MAAM,gBAAgB,KAAK,CAAC;AACnC,eAAO,MAAM,iBAAiB,IAAI,CAAC;AAKnC,wBAAgB,YAAY,CAAC,SAAS,EAAE,MAAM,GAAG,SAAS,GAAG,IAAI,GAAG,SAAS,CAE5E;AAED,wBAAgB,YAAY,IAAI,SAAS,CAExC;AAED,wBAAgB,YAAY,IAAI,OAAO,CAEtC;AAED,MAAM,MAAM,gBAAgB,GAAG,MAAM,CAAC,MAAM,EAAE;IAAE,GAAG,CAAC,EAAE,OAAO,CAAA;CAAE,GAAG,SAAS,CAAC,CAAC;AAE7E,wBAAgB,UAAU,CAAC,KAAK,EAAE,gBAAgB,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAKrF;AAED,4FAA4F;AAC5F,wBAAgB,SAAS,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,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EAAE,EAAE;IAAE,IAAI,EAAE,OAAO,CAAC;IAAC,OAAO,CAAC,EAAE,MAAM,CAAA;CAAE,GACrD,MAAM,GAAG,IAAI,CAsBf;AAED;;;;GAIG;AACH,wBAAgB,QAAQ,CACtB,KAAK,EAAE,gBAAgB,EACvB,OAAO,EAAE,SAAS,CAAC,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC,EAAE,EAC/C,SAAS,SAAa,GACrB,MAAM,CAYR;AAED;;;;;GAKG;AACH,wBAAgB,aAAa,CAC3B,KAAK,EAAE,gBAAgB,EACvB,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,SAAS,CAAC,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC,EAAE,EAC/C,IAAI,EAAE,OAAO,EACb,IAAI,GAAE,SAAS,GAAG,WAAuB,GACxC,MAAM,CAkCR"}
|
|
@@ -199,4 +199,18 @@ export declare function openSpanLabelParts(span: GanttOpenSpan): {
|
|
|
199
199
|
start?: string;
|
|
200
200
|
end?: string;
|
|
201
201
|
};
|
|
202
|
+
/**
|
|
203
|
+
* Average character advance of a single-line label, in em. The house already
|
|
204
|
+
* measures a prose column this way (`READING_WIDTH_CH_EM` is 0.5 for lowercase
|
|
205
|
+
* prose); a task name carries capitals and digits, so it runs wider.
|
|
206
|
+
*/
|
|
207
|
+
export declare const LABEL_CHAR_EM = 0.62;
|
|
208
|
+
/** What a one-line label needs, with no text metrics to ask. */
|
|
209
|
+
export declare function estimateLabelWidth(text: string, fontSize: number): number;
|
|
210
|
+
/**
|
|
211
|
+
* Whether `title` reads in full inside a bar `width` wide with `padding`
|
|
212
|
+
* either side. A bar's width comes from its dates, never from its text, so a
|
|
213
|
+
* title that does not fit has to read somewhere else (LC-297).
|
|
214
|
+
*/
|
|
215
|
+
export declare function labelFitsBar(title: string, width: number, padding: number, fontSize: number): boolean;
|
|
202
216
|
//# sourceMappingURL=ganttMath.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"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AI,EAAE,SAAS,EACf,QAAQ,EAAE,MAAM,EAChB,cAAc,GAAE,CAAC,GAAG,CAAK,GACxB,SAAS,EAAE,CAqCb;AAED,uEAAuE;AACvE,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,UAAU,GAAG,MAAM,CAI1D;AAED;;;GAGG;AACH,wBAAgB,wBAAwB,CAAC,IAAI,EAAE;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,IAAI,CAAC;IAAC,GAAG,EAAE,IAAI,CAAA;CAAE,GAAG,MAAM,CAQhG;AAED,6EAA6E;AAC7E,wBAAgB,eAAe,CAAC,IAAI,EAAE,SAAS,GAAG,MAAM,CAMvD;AAED;;;;GAIG;AACH,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,aAAa,GAAG;IAAE,KAAK,CAAC,EAAE,MAAM,CAAC;IAAC,GAAG,CAAC,EAAE,MAAM,CAAA;CAAE,CAYxF;AAED;;;;GAIG;AACH,eAAO,MAAM,aAAa,OAAO,CAAC;AAElC,gEAAgE;AAChE,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,CAEzE;AAED;;;;GAIG;AACH,wBAAgB,YAAY,CAC1B,KAAK,EAAE,MAAM,EACb,KAAK,EAAE,MAAM,EACb,OAAO,EAAE,MAAM,EACf,QAAQ,EAAE,MAAM,GACf,OAAO,CAET"}
|
package/types/views/index.d.ts
CHANGED
|
@@ -9,7 +9,7 @@ export { ImageGrid, PHOTOS_GRID_GUTTER, useImageGridGeometry, type ImageGridHotk
|
|
|
9
9
|
export { Dashboard, KPICard, ChartCard, ProgressCard, ShortcutCard, ListCard, calculateTrend, calculatePercentageChange, aggregateData, resolveTrendColor, type DashboardProps, type DashboardWidget, type KPICardConfig, type KPICardProps, type ChartConfig, type ChartCardProps, type ChartDataPoint, type ChartType, type TrendDirection, type ProgressConfig, type ProgressCardProps, type ShortcutConfig, type ShortcutCardProps, type ListConfig, type ListCardProps, type DashboardListItem, } from "./Dashboard";
|
|
10
10
|
export { ReportBuilder, type ReportBuilderProps, type ReportColumn, type GroupByConfig, } from "./ReportBuilder";
|
|
11
11
|
export { GanttView, type GanttViewProps, type GanttTask, type GanttTaskSpan, type GanttSpanRef, type GanttItemMoveRange, } from "./Gantt";
|
|
12
|
-
export { addDays, barGeometry, clampResizeDayDelta, computeGanttRange, dateLineX, dateToX, dayDiff, dxToDayDelta, formatRangeLabel, formatSpanLabel, ganttTaskAccessibleLabel, generateTicks, isBoundedSpan, isEternalSpan, MS_PER_DAY, normalizeSpanEdges, openBarGeometry, openSpanExtent, openSpanExtents, openSpanLabelParts, rangeDays, resizeSpanByDays, scrollAnchorX, shiftSpanByDays, spanInclusiveDays, startOfDay, startOfMonth, startOfWeek, todayLineX, xToDate, type GanttBarGeometry, type GanttOpenBarGeometry, type GanttOpenSpan, type GanttRange, type GanttResizeEdge, type GanttSpan, type GanttTick, type GanttZoom, } from "./ganttMath";
|
|
12
|
+
export { addDays, barGeometry, clampResizeDayDelta, computeGanttRange, dateLineX, dateToX, dayDiff, dxToDayDelta, formatRangeLabel, formatSpanLabel, ganttTaskAccessibleLabel, generateTicks, estimateLabelWidth, isBoundedSpan, isEternalSpan, LABEL_CHAR_EM, labelFitsBar, MS_PER_DAY, normalizeSpanEdges, openBarGeometry, openSpanExtent, openSpanExtents, openSpanLabelParts, rangeDays, resizeSpanByDays, scrollAnchorX, shiftSpanByDays, spanInclusiveDays, startOfDay, startOfMonth, startOfWeek, todayLineX, xToDate, type GanttBarGeometry, type GanttOpenBarGeometry, type GanttOpenSpan, type GanttRange, type GanttResizeEdge, type GanttSpan, type GanttTick, type GanttZoom, } from "./ganttMath";
|
|
13
13
|
export { MatrixView, type MatrixViewProps, type MatrixRow, type MatrixCellRef, type MatrixLegendItem, } from "./Matrix";
|
|
14
14
|
export { alignMatrixRange, bucketName, bucketStart, computeMatrixRange, generateBuckets, localDateKey, matrixCellIntensity, matrixCellKey, matrixMaxValue, nextBucketStart, summarizeMatrixCells, type MatrixBucket, type MatrixBucketRule, type MatrixCell, type MatrixCellSummary, type MatrixIntent, type MatrixRange, } from "./matrixMath";
|
|
15
15
|
export { renumberIdx, keyboardLift, keyboardMove, resolveDrop, describeDragState, describeCancel, maxInsertionIndex, insertionIndexForY, gapPosition, siblingOffset, autoScrollVelocity, formatListAnnouncement, TOUCH_LONG_PRESS_MS, AUTO_SCROLL_EDGE_PX, AUTO_SCROLL_MAX_SPEED, LIFT_SCALE, type KanbanDropTarget, type KanbanBoardColumnSnapshot, type KanbanKeyboardDrag, type KanbanMoveDirection, type KanbanAnnouncement, type KanbanDropResult, } from "./kanbanDnd";
|