cursedbelt 5.96.1 → 5.97.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/react/components/PaneSplit.d.ts +11 -2
- package/dist/react/components/PaneSplit.d.ts.map +1 -1
- package/dist/react/components/PaneSplit.js +12 -11
- package/dist/react/components/PaneSplit.js.map +1 -1
- package/dist/react/components/PanelGrid.d.ts +14 -8
- package/dist/react/components/PanelGrid.d.ts.map +1 -1
- package/dist/react/components/PanelGrid.js +10 -3
- package/dist/react/components/PanelGrid.js.map +1 -1
- package/dist/react/components/SplitPane.d.ts +3 -9
- package/dist/react/components/SplitPane.d.ts.map +1 -1
- package/dist/react/components/SplitPane.js +0 -3
- package/dist/react/components/SplitPane.js.map +1 -1
- package/dist/react/components/paneSplit.css +8 -0
- package/dist/react/filter-rail/railResize.d.ts +16 -5
- package/dist/react/filter-rail/railResize.d.ts.map +1 -1
- package/dist/react/filter-rail/railResize.js +27 -9
- package/dist/react/filter-rail/railResize.js.map +1 -1
- package/dist/react/filter-rail/railWidth.d.ts +10 -5
- package/dist/react/filter-rail/railWidth.d.ts.map +1 -1
- package/dist/react/filter-rail/railWidth.js +13 -8
- package/dist/react/filter-rail/railWidth.js.map +1 -1
- package/dist/react/index.d.ts +1 -0
- package/dist/react/index.d.ts.map +1 -1
- package/dist/react/index.js +1 -0
- package/dist/react/index.js.map +1 -1
- package/dist/react/lib/paneReach.d.ts +36 -0
- package/dist/react/lib/paneReach.d.ts.map +1 -0
- package/dist/react/lib/paneReach.js +72 -0
- package/dist/react/lib/paneReach.js.map +1 -0
- package/dist/react/master-detail/MasterDetail.d.ts +6 -3
- package/dist/react/master-detail/MasterDetail.d.ts.map +1 -1
- package/dist/react/master-detail/MasterDetail.js +3 -2
- package/dist/react/master-detail/MasterDetail.js.map +1 -1
- package/dist/react/media/videoEnhance.d.ts +1 -1
- package/dist/react/media/videoEnhance.js +1 -1
- package/dist/scripts/guardrailsEnforce.d.ts.map +1 -1
- package/dist/testing/phoneRules.js +3 -3
- package/dist/testing/phoneRules.js.map +1 -1
- package/package.json +2 -1
- package/scripts/guardrailsEnforce.spec.ts +25 -0
- package/scripts/guardrailsEnforce.ts +61 -0
- package/src/react/components/PaneSplit.spec.tsx +26 -3
- package/src/react/components/PaneSplit.tsx +26 -13
- package/src/react/components/PanelGrid.tsx +16 -11
- package/src/react/components/SplitPane.spec.tsx +10 -5
- package/src/react/components/SplitPane.tsx +3 -12
- package/src/react/components/paneSplit.css +8 -0
- package/src/react/filter-rail/FilterRail.spec.tsx +7 -3
- package/src/react/filter-rail/railResize.spec.tsx +27 -5
- package/src/react/filter-rail/railResize.tsx +46 -15
- package/src/react/filter-rail/railWidth.ts +13 -8
- package/src/react/index.ts +1 -0
- package/src/react/lib/paneReach.spec.ts +58 -0
- package/src/react/lib/paneReach.ts +65 -0
- package/src/react/master-detail/MasterDetail.tsx +10 -5
- package/src/react/media/videoEnhance.ts +1 -1
- package/src/testing/phoneRules.ts +2 -2
|
@@ -11,7 +11,11 @@
|
|
|
11
11
|
* and the arithmetic that turns a pointer into a pair of fractions. Unlike `PanelGrid` it owns no
|
|
12
12
|
* sizes and persists nothing, which is what an app that stores its layout as a setting needs.
|
|
13
13
|
*
|
|
14
|
-
* 🔴 **The seam is keyboard-operable.** Arrow keys move it by 2%, Home/End
|
|
14
|
+
* 🔴 **The seam is keyboard-operable.** Arrow keys move it by 2%, Home/End shut the pane either side.
|
|
15
|
+
*
|
|
16
|
+
* 🔴 **No seam is a wall** (the owner, 2026-10-27: *"let me drag them as far as I want including
|
|
17
|
+
* shutting a pane completely"*). `minFraction` is a snap, not a floor: `lib/paneReach.ts` shuts a pane
|
|
18
|
+
* dragged below half of it, and a shut pane's seam stays at the edge to drag it open again.
|
|
15
19
|
*
|
|
16
20
|
* 🔴 **The hit strip lives inside the seam's own track** — a real flex item, never a bar hung over
|
|
17
21
|
* the boundary. An invisible strip centered on the seam sits over the first pixels of the pane beside
|
|
@@ -24,6 +28,8 @@
|
|
|
24
28
|
*/
|
|
25
29
|
import type { JSX } from 'react';
|
|
26
30
|
import './paneSplit.css';
|
|
31
|
+
/** The rule every divider obeys — re-exported for a seam an app draws itself (guardrails' `no-hand-rolled-divider`). */
|
|
32
|
+
export { reachSize, stepSize } from '../lib/paneReach.js';
|
|
27
33
|
export type PaneSplitDirection = 'row' | 'column';
|
|
28
34
|
export type PaneSplitNode<P> = {
|
|
29
35
|
kind: 'leaf';
|
|
@@ -43,7 +49,10 @@ export interface PaneSplitProps<P> {
|
|
|
43
49
|
renderPane: (pane: P) => JSX.Element;
|
|
44
50
|
/** A seam moved: the split at `path` now has these fractions. */
|
|
45
51
|
onResize: (path: PaneSplitPath, sizes: number[]) => void;
|
|
46
|
-
/**
|
|
52
|
+
/**
|
|
53
|
+
* The snap: a pane dragged below half of this share shuts, and between half and all of it holds
|
|
54
|
+
* here (`lib/paneReach.ts`). Never a floor — any pane can be shut. Default 0.12.
|
|
55
|
+
*/
|
|
47
56
|
minFraction?: number;
|
|
48
57
|
/** Where `node` sits — only for a tree drawn from below its root. */
|
|
49
58
|
path?: PaneSplitPath;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PaneSplit.d.ts","sourceRoot":"","sources":["../../../src/react/components/PaneSplit.tsx"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"PaneSplit.d.ts","sourceRoot":"","sources":["../../../src/react/components/PaneSplit.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AAEH,OAAO,KAAK,EAAiB,GAAG,EAA0E,MAAM,OAAO,CAAC;AAGxH,OAAO,iBAAiB,CAAC;AAEzB,wHAAwH;AACxH,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAE1D,MAAM,MAAM,kBAAkB,GAAG,KAAK,GAAG,QAAQ,CAAC;AAElD,MAAM,MAAM,aAAa,CAAC,CAAC,IACvB;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,CAAC,CAAA;CAAE,GACzB;IAAE,IAAI,EAAE,OAAO,CAAC;IAAC,SAAS,EAAE,kBAAkB,CAAC;IAAC,KAAK,EAAE,SAAS,MAAM,EAAE,CAAC;IAAC,QAAQ,EAAE,SAAS,aAAa,CAAC,CAAC,CAAC,EAAE,CAAA;CAAE,CAAC;AAEtH,mFAAmF;AACnF,MAAM,MAAM,aAAa,GAAG,SAAS,MAAM,EAAE,CAAC;AAE9C,MAAM,WAAW,cAAc,CAAC,CAAC;IAC/B,IAAI,EAAE,aAAa,CAAC,CAAC,CAAC,CAAC;IACvB,gGAAgG;IAChG,OAAO,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,MAAM,CAAC;IAC7B,UAAU,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,GAAG,CAAC,OAAO,CAAC;IACrC,iEAAiE;IACjE,QAAQ,EAAE,CAAC,IAAI,EAAE,aAAa,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,IAAI,CAAC;IACzD;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,qEAAqE;IACrE,IAAI,CAAC,EAAE,aAAa,CAAC;CACtB;AAaD,wBAAgB,SAAS,CAAC,CAAC,EAAE,KAAK,EAAE,cAAc,CAAC,CAAC,CAAC,GAAG,GAAG,CAAC,OAAO,CAIlE"}
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { useCallback, useRef } from 'react';
|
|
3
|
+
import { reachSize, stepSize } from '../lib/paneReach.js';
|
|
3
4
|
import './paneSplit.css';
|
|
5
|
+
/** The rule every divider obeys — re-exported for a seam an app draws itself (guardrails' `no-hand-rolled-divider`). */
|
|
6
|
+
export { reachSize, stepSize } from '../lib/paneReach.js';
|
|
4
7
|
const DEFAULT_MIN_FRACTION = 0.12;
|
|
5
8
|
/**
|
|
6
9
|
* A key for a child that follows its content rather than its position: closing a pane in the middle
|
|
@@ -21,16 +24,15 @@ function SplitNode({ node, path, paneKey, renderPane, onResize, minFraction = DE
|
|
|
21
24
|
const frame = useRef(null);
|
|
22
25
|
const dragging = useRef(null);
|
|
23
26
|
/** Set the share of the pair either side of seam `index`; only those two panes move. */
|
|
24
|
-
const setShare = useCallback((index,
|
|
27
|
+
const setShare = useCallback((index, bounded) => {
|
|
25
28
|
const pair = (node.sizes[index] ?? 0) + (node.sizes[index + 1] ?? 0);
|
|
26
29
|
if (pair <= 0)
|
|
27
30
|
return;
|
|
28
|
-
const bounded = Math.min(Math.max(share, minFraction), 1 - minFraction);
|
|
29
31
|
const sizes = [...node.sizes];
|
|
30
32
|
sizes[index] = pair * bounded;
|
|
31
33
|
sizes[index + 1] = pair * (1 - bounded);
|
|
32
34
|
onResize(path, sizes);
|
|
33
|
-
}, [node.sizes,
|
|
35
|
+
}, [node.sizes, onResize, path]);
|
|
34
36
|
const moveSeam = (index, position) => {
|
|
35
37
|
const box = frame.current?.getBoundingClientRect();
|
|
36
38
|
if (!box)
|
|
@@ -43,13 +45,13 @@ function SplitNode({ node, path, paneKey, renderPane, onResize, minFraction = DE
|
|
|
43
45
|
const pair = (node.sizes[index] ?? 0) + (node.sizes[index + 1] ?? 0);
|
|
44
46
|
if (pair <= 0)
|
|
45
47
|
return;
|
|
46
|
-
setShare(index, (offset - before) / pair);
|
|
48
|
+
setShare(index, reachSize((offset - before) / pair, minFraction, 1));
|
|
47
49
|
};
|
|
48
50
|
const nudgeSeam = (index, delta) => {
|
|
49
51
|
const pair = (node.sizes[index] ?? 0) + (node.sizes[index + 1] ?? 0);
|
|
50
52
|
if (pair <= 0)
|
|
51
53
|
return;
|
|
52
|
-
setShare(index, (node.sizes[index] ?? 0) / pair
|
|
54
|
+
setShare(index, stepSize((node.sizes[index] ?? 0) / pair, delta, minFraction, 1));
|
|
53
55
|
};
|
|
54
56
|
const onKeyDown = (event, index) => {
|
|
55
57
|
const back = node.direction === 'row' ? 'ArrowLeft' : 'ArrowUp';
|
|
@@ -59,9 +61,9 @@ function SplitNode({ node, path, paneKey, renderPane, onResize, minFraction = DE
|
|
|
59
61
|
else if (event.key === forward)
|
|
60
62
|
nudgeSeam(index, 0.02);
|
|
61
63
|
else if (event.key === 'Home')
|
|
62
|
-
|
|
64
|
+
setShare(index, 0);
|
|
63
65
|
else if (event.key === 'End')
|
|
64
|
-
|
|
66
|
+
setShare(index, 1);
|
|
65
67
|
else
|
|
66
68
|
return;
|
|
67
69
|
event.preventDefault();
|
|
@@ -85,12 +87,11 @@ function SplitNode({ node, path, paneKey, renderPane, onResize, minFraction = DE
|
|
|
85
87
|
if (event.currentTarget.hasPointerCapture?.(event.pointerId))
|
|
86
88
|
event.currentTarget.releasePointerCapture(event.pointerId);
|
|
87
89
|
};
|
|
88
|
-
const minPercent = Math.round(minFraction * 100);
|
|
89
90
|
return (_jsx("div", { className: "cb-panesplit", "data-direction": node.direction, ref: frame, children: node.children.map((child, index) => (_jsx(ChildAndSeam, { last: index === node.children.length - 1, size: node.sizes[index] ?? 1 / node.children.length, seam: {
|
|
90
91
|
direction: node.direction,
|
|
91
92
|
percent: Math.round((node.sizes[index] ?? 0) * 100),
|
|
92
|
-
min:
|
|
93
|
-
max: 100
|
|
93
|
+
min: 0,
|
|
94
|
+
max: 100,
|
|
94
95
|
onKeyDown: (event) => onKeyDown(event, index),
|
|
95
96
|
onPointerDown: (event) => onPointerDown(event, index),
|
|
96
97
|
onPointerMove,
|
|
@@ -98,6 +99,6 @@ function SplitNode({ node, path, paneKey, renderPane, onResize, minFraction = DE
|
|
|
98
99
|
}, children: _jsx(PaneSplit, { node: child, path: [...path, index], paneKey: paneKey, renderPane: renderPane, onResize: onResize, minFraction: minFraction }) }, childKey(child, paneKey)))) }));
|
|
99
100
|
}
|
|
100
101
|
function ChildAndSeam({ last, size, seam, children }) {
|
|
101
|
-
return (_jsxs(_Fragment, { children: [_jsx("div", { className: "cb-panesplit__cell", style: { '--cb-panesplit-share': size }, children: children }), !last && (_jsx("div", { className: "cb-panesplit__seam", role: "separator", tabIndex: 0, "aria-orientation": seam.direction === 'row' ? 'vertical' : 'horizontal', "aria-label": seam.direction === 'row' ? 'Width of the pane on the left' : 'Height of the pane above', "aria-valuenow": seam.percent, "aria-valuemin": seam.min, "aria-valuemax": seam.max, onKeyDown: seam.onKeyDown, onPointerDown: seam.onPointerDown, onPointerMove: seam.onPointerMove, onPointerUp: seam.endDrag, onPointerCancel: seam.endDrag }))] }));
|
|
102
|
+
return (_jsxs(_Fragment, { children: [_jsx("div", { className: "cb-panesplit__cell", "data-shut": size <= 0 ? '' : undefined, style: { '--cb-panesplit-share': size }, children: children }), !last && (_jsx("div", { className: "cb-panesplit__seam", role: "separator", tabIndex: 0, "aria-orientation": seam.direction === 'row' ? 'vertical' : 'horizontal', "aria-label": seam.direction === 'row' ? 'Width of the pane on the left' : 'Height of the pane above', "aria-valuenow": seam.percent, "aria-valuemin": seam.min, "aria-valuemax": seam.max, onKeyDown: seam.onKeyDown, onPointerDown: seam.onPointerDown, onPointerMove: seam.onPointerMove, onPointerUp: seam.endDrag, onPointerCancel: seam.endDrag }))] }));
|
|
102
103
|
}
|
|
103
104
|
//# sourceMappingURL=PaneSplit.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PaneSplit.js","sourceRoot":"","sources":["../../../src/react/components/PaneSplit.tsx"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"PaneSplit.js","sourceRoot":"","sources":["../../../src/react/components/PaneSplit.tsx"],"names":[],"mappings":";AA8BA,OAAO,EAAE,WAAW,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAC5C,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAC1D,OAAO,iBAAiB,CAAC;AAEzB,wHAAwH;AACxH,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AA2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W,EAChB,QAAQ,EAAE,CAAC,sBACO,IAAI,CAAC,SAAS,KAAK,KAAK,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,YAAY,gBAC1D,IAAI,CAAC,SAAS,KAAK,KAAK,CAAC,CAAC,CAAC,+BAA+B,CAAC,CAAC,CAAC,0BAA0B,mBACpF,IAAI,CAAC,OAAO,mBACZ,IAAI,CAAC,GAAG,mBACR,IAAI,CAAC,GAAG,EACvB,SAAS,EAAE,IAAI,CAAC,SAAS,EACzB,aAAa,EAAE,IAAI,CAAC,aAAa,EACjC,aAAa,EAAE,IAAI,CAAC,aAAa,EACjC,WAAW,EAAE,IAAI,CAAC,OAAO,EACzB,eAAe,EAAE,IAAI,CAAC,OAAO,GAC7B,CACH,IACA,CACJ,CAAC;AACJ,CAAC"}
|
|
@@ -14,11 +14,11 @@ export interface PanelGridLeaf {
|
|
|
14
14
|
* this exact confusion collapsed a contact list to ~34px).
|
|
15
15
|
*/
|
|
16
16
|
defaultSize?: number | string;
|
|
17
|
+
/**
|
|
18
|
+
* The snap, never a floor: dragged below half of this the pane SHUTS, between half and all of it
|
|
19
|
+
* it holds here. Same rule as `lib/paneReach.ts`, applied by the library's collapsible panel.
|
|
20
|
+
*/
|
|
17
21
|
minSize?: number | string;
|
|
18
|
-
maxSize?: number | string;
|
|
19
|
-
/** Panel collapses to `collapsedSize` when dragged below `minSize`. */
|
|
20
|
-
collapsible?: boolean;
|
|
21
|
-
collapsedSize?: number | string;
|
|
22
22
|
className?: string;
|
|
23
23
|
}
|
|
24
24
|
/** A split — lays its children out along `direction` with dividers between them. */
|
|
@@ -33,10 +33,9 @@ export interface PanelGridSplit {
|
|
|
33
33
|
resizable?: boolean;
|
|
34
34
|
/** Divider look for THIS split's dividers (overrides the grid-level setting). */
|
|
35
35
|
separatorVariant?: PanelSeparatorVariant;
|
|
36
|
-
/** Sizing of this split when it is itself a cell of a parent split. */
|
|
36
|
+
/** Sizing of this split when it is itself a cell of a parent split (`minSize` is a snap, as on a leaf). */
|
|
37
37
|
defaultSize?: number | string;
|
|
38
38
|
minSize?: number | string;
|
|
39
|
-
maxSize?: number | string;
|
|
40
39
|
className?: string;
|
|
41
40
|
}
|
|
42
41
|
export type PanelGridNode = PanelGridLeaf | PanelGridSplit;
|
|
@@ -81,7 +80,7 @@ export interface PanelGridProps {
|
|
|
81
80
|
* root={{
|
|
82
81
|
* type: 'split', id: 'row', direction: 'horizontal',
|
|
83
82
|
* children: [
|
|
84
|
-
* { id: 'sidebar', content: <Nav />, defaultSize: '240px', minSize: '160px'
|
|
83
|
+
* { id: 'sidebar', content: <Nav />, defaultSize: '240px', minSize: '160px' },
|
|
85
84
|
* {
|
|
86
85
|
* type: 'split', id: 'main', direction: 'vertical',
|
|
87
86
|
* children: [
|
|
@@ -94,7 +93,14 @@ export interface PanelGridProps {
|
|
|
94
93
|
* />
|
|
95
94
|
* ```
|
|
96
95
|
*
|
|
97
|
-
*
|
|
96
|
+
* 🔴 **No divider is a wall** (the owner, 2026-10-27: *"let me drag them as far as I want
|
|
97
|
+
* including shutting a pane completely … I don't want any panes to block me"*). So there is no
|
|
98
|
+
* `maxSize` and no `collapsible` to turn off: EVERY cell is collapsible to 0, and its `minSize`
|
|
99
|
+
* is the snap `lib/paneReach.ts` describes — below half of it the cell shuts, so the cell beside it
|
|
100
|
+
* can take the whole split. station's Queue capped its task list at 36% and cut off the titles it
|
|
101
|
+
* was opened to read; that is the bug this removes the means to write.
|
|
102
|
+
*
|
|
103
|
+
* Keyboard resizing (Enter shuts/opens a pane), hit-target enlargement, and
|
|
98
104
|
* aria roles come from react-resizable-panels; the divider look comes from
|
|
99
105
|
* `PanelSeparator` (single hairline + invisible wide hotspot — panel content
|
|
100
106
|
* must not draw its own border against a divider).
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PanelGrid.d.ts","sourceRoot":"","sources":["../../../src/react/components/PanelGrid.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,SAAS,EA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,EAAE,MAAM,GAAG,MAAM,CAAC;IAC1B,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,MAAM,aAAa,GAAG,aAAa,GAAG,cAAc,CAAC;AAE3D,MAAM,WAAW,cAAc;IAC7B,+EAA+E;IAC/E,IAAI,EAAE,cAAc,CAAC;IACrB;;;;OAIG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,kCAAkC;IAClC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,iDAAiD;IACjD,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB;;;;OAIG;IACH,gBAAgB,CAAC,EAAE,qBAAqB,CAAC;IACzC;;;;OAIG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAUD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AACH,wBAAgB,SAAS,CAAC,EACxB,IAAI,EACJ,UAAU,EACV,QAAQ,EACR,WAAkB,EAClB,gBAAyB,EACzB,WAAkB,EAClB,SAAS,EACT,GAAG,IAAI,EACR,EAAE,cAAc,+BA2BhB"}
|
|
@@ -24,7 +24,7 @@ function leavesOf(node) {
|
|
|
24
24
|
* root={{
|
|
25
25
|
* type: 'split', id: 'row', direction: 'horizontal',
|
|
26
26
|
* children: [
|
|
27
|
-
* { id: 'sidebar', content: <Nav />, defaultSize: '240px', minSize: '160px'
|
|
27
|
+
* { id: 'sidebar', content: <Nav />, defaultSize: '240px', minSize: '160px' },
|
|
28
28
|
* {
|
|
29
29
|
* type: 'split', id: 'main', direction: 'vertical',
|
|
30
30
|
* children: [
|
|
@@ -37,7 +37,14 @@ function leavesOf(node) {
|
|
|
37
37
|
* />
|
|
38
38
|
* ```
|
|
39
39
|
*
|
|
40
|
-
*
|
|
40
|
+
* 🔴 **No divider is a wall** (the owner, 2026-10-27: *"let me drag them as far as I want
|
|
41
|
+
* including shutting a pane completely … I don't want any panes to block me"*). So there is no
|
|
42
|
+
* `maxSize` and no `collapsible` to turn off: EVERY cell is collapsible to 0, and its `minSize`
|
|
43
|
+
* is the snap `lib/paneReach.ts` describes — below half of it the cell shuts, so the cell beside it
|
|
44
|
+
* can take the whole split. station's Queue capped its task list at 36% and cut off the titles it
|
|
45
|
+
* was opened to read; that is the bug this removes the means to write.
|
|
46
|
+
*
|
|
47
|
+
* Keyboard resizing (Enter shuts/opens a pane), hit-target enlargement, and
|
|
41
48
|
* aria roles come from react-resizable-panels; the divider look comes from
|
|
42
49
|
* `PanelSeparator` (single hairline + invisible wide hotspot — panel content
|
|
43
50
|
* must not draw its own border against a divider).
|
|
@@ -72,6 +79,6 @@ function GridChildren({ node, storageKey, disabled, withHandles, separatorVarian
|
|
|
72
79
|
return (_jsx(_Fragment, { children: node.children.map((child, i) => (_jsx(GridCell, { child: child, direction: node.direction, storageKey: storageKey, disabled: disabled, withHandles: withHandles, separatorVariant: variant, separatorBefore: i > 0 && showSeparators }, child.id))) }));
|
|
73
80
|
}
|
|
74
81
|
function GridCell({ child, direction, storageKey, disabled, withHandles, separatorVariant, separatorBefore, }) {
|
|
75
|
-
return (_jsxs(_Fragment, { children: [separatorBefore && (_jsx(PanelSeparator, { direction: direction, disabled: disabled, variant: separatorVariant, withHandle: withHandles })), _jsx(Panel, { id: child.id, defaultSize: child.defaultSize, minSize: child.minSize,
|
|
82
|
+
return (_jsxs(_Fragment, { children: [separatorBefore && (_jsx(PanelSeparator, { direction: direction, disabled: disabled, variant: separatorVariant, withHandle: withHandles })), _jsx(Panel, { id: child.id, defaultSize: child.defaultSize, minSize: child.minSize, collapsible: true, collapsedSize: 0, className: cn('min-h-0 min-w-0', child.className), children: isSplit(child) ? (_jsx(GridSplit, { node: child, storageKey: storageKey, disabled: disabled, withHandles: withHandles, separatorVariant: separatorVariant, className: 'h-full' })) : (child.content) })] }));
|
|
76
83
|
}
|
|
77
84
|
//# sourceMappingURL=PanelGrid.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PanelGrid.js","sourceRoot":"","sources":["../../../src/react/components/PanelGrid.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAkB,OAAO,EAAE,MAAM,OAAO,CAAC;AAChD,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AACxE,OAAO,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAC1D,OAAO,EAAE,EAAE,EAAE,MAAM,cAAc,CAAC;AAClC,OAAO,EAAE,cAAc,EAA8B,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"PanelGrid.js","sourceRoot":"","sources":["../../../src/react/components/PanelGrid.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAkB,OAAO,EAAE,MAAM,OAAO,CAAC;AAChD,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AACxE,OAAO,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAC1D,OAAO,EAAE,EAAE,EAAE,MAAM,cAAc,CAAC;AAClC,OAAO,EAAE,cAAc,EAA8B,MAAM,qBAAqB,CAAC;AAwEjF,SAAS,OAAO,CAAC,IAAmB;IAClC,OAAO,IAAI,CAAC,IAAI,KAAK,OAAO,CAAC;AAC/B,CAAC;AAED,SAAS,QAAQ,CAAC,IAAmB;IACnC,OAAO,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC;AAClE,CAAC;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AACH,MAAM,UAAU,SAAS,CAAC,EACxB,IAAI,EACJ,UAAU,EACV,QAAQ,EACR,WAAW,GAAG,IAAI,EAClB,gBAAgB,GAAG,MAAM,EACzB,WAAW,GAAG,IAAI,EAClB,SAAS,EACT,GAAG,IA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AC,QAAQ,GAClB,CACH,CAAC,CAAC,CAAC,CACF,KAAK,CAAC,OAAO,CACd,GACK,IACP,CACJ,CAAC;AACJ,CAAC"}
|
|
@@ -10,17 +10,11 @@ export interface SplitPaneItem {
|
|
|
10
10
|
* number is NOT treated as a percentage (it silently becomes a pixel size).
|
|
11
11
|
*/
|
|
12
12
|
defaultSize?: number | string;
|
|
13
|
-
/** Minimum size constraint. */
|
|
14
|
-
minSize?: number | string;
|
|
15
|
-
/** Maximum size constraint. */
|
|
16
|
-
maxSize?: number | string;
|
|
17
13
|
/**
|
|
18
|
-
*
|
|
19
|
-
*
|
|
14
|
+
* The snap, never a floor: dragged below half of this the pane SHUTS, between half and all of it
|
|
15
|
+
* it holds here (`lib/paneReach.ts`). There is no maximum and no opting out — see `PanelGrid`.
|
|
20
16
|
*/
|
|
21
|
-
|
|
22
|
-
/** Size when collapsed; defaults to 0. */
|
|
23
|
-
collapsedSize?: number | string;
|
|
17
|
+
minSize?: number | string;
|
|
24
18
|
className?: string;
|
|
25
19
|
}
|
|
26
20
|
export interface SplitPaneProps {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SplitPane.d.ts","sourceRoot":"","sources":["../../../src/react/components/SplitPane.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAC;AAEjE,MAAM,WAAW,aAAa;IAC5B,6DAA6D;IAC7D,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,EAAE,SAAS,CAAC;IACnB;;;;OAIG;IACH,WAAW,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAC9B
|
|
1
|
+
{"version":3,"file":"SplitPane.d.ts","sourceRoot":"","sources":["../../../src/react/components/SplitPane.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAC;AAEjE,MAAM,WAAW,aAAa;IAC5B,6DAA6D;IAC7D,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,EAAE,SAAS,CAAC;IACnB;;;;OAIG;IACH,WAAW,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAC9B;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAC1B,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,cAAc;IAC7B,MAAM,EAAE,aAAa,EAAE,CAAC;IACxB,6FAA6F;IAC7F,SAAS,CAAC,EAAE,YAAY,GAAG,UAAU,CAAC;IACtC;;;;OAIG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,kCAAkC;IAClC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;;OAIG;IACH,gBAAgB,CAAC,EAAE,qBAAqB,CAAC;IACzC,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;;;;;;GAQG;AACH,wBAAgB,SAAS,CAAC,EACxB,MAAM,EACN,SAAwB,EACxB,UAAU,EACV,QAAQ,EACR,gBAAgB,EAChB,SAAS,EACT,GAAG,IAAI,EACR,EAAE,cAAc,+BAkBhB"}
|
|
@@ -15,9 +15,6 @@ export function SplitPane({ panels, direction = 'horizontal', storageKey, disabl
|
|
|
15
15
|
content: p.content,
|
|
16
16
|
defaultSize: p.defaultSize,
|
|
17
17
|
minSize: p.minSize,
|
|
18
|
-
maxSize: p.maxSize,
|
|
19
|
-
collapsible: p.collapsible,
|
|
20
|
-
collapsedSize: p.collapsedSize,
|
|
21
18
|
className: p.className,
|
|
22
19
|
}));
|
|
23
20
|
return (_jsx(PanelGrid, { ...rest, root: { type: 'split', id: 'root', direction, children: leaves }, storageKey: storageKey, disabled: disabled, separatorVariant: separatorVariant, className: className }));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SplitPane.js","sourceRoot":"","sources":["../../../src/react/components/SplitPane.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,SAAS,EAAsB,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"SplitPane.js","sourceRoot":"","sources":["../../../src/react/components/SplitPane.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,SAAS,EAAsB,MAAM,gBAAgB,CAAC;AA0C/D;;;;;;;;GAQG;AACH,MAAM,UAAU,SAAS,CAAC,EACxB,MAAM,EACN,SAAS,GAAG,YAAY,EACxB,UAAU,EACV,QAAQ,EACR,gBAAgB,EAChB,SAAS,EACT,GAAG,IAAI,EACQ;IACf,MAAM,MAAM,GAAoB,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;QACjD,EAAE,EAAE,CAAC,CAAC,EAAE;QACR,OAAO,EAAE,CAAC,CAAC,OAAO;QAClB,WAAW,EAAE,CAAC,CAAC,WAAW;QAC1B,OAAO,EAAE,CAAC,CAAC,OAAO;QAClB,SAAS,EAAE,CAAC,CAAC,SAAS;KACvB,CAAC,CAAC,CAAC;IACJ,OAAO,CACL,KAAC,SAAS,OACJ,IAAI,EACR,IAAI,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,EAAE,EAAE,MAAM,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,EAAE,EAChE,UAAU,EAAE,UAAU,EACtB,QAAQ,EAAE,QAAQ,EAClB,gBAAgB,EAAE,gBAAgB,EAClC,SAAS,EAAE,SAAS,GACpB,CACH,CAAC;AACJ,CAAC"}
|
|
@@ -40,6 +40,14 @@
|
|
|
40
40
|
min-height: 0;
|
|
41
41
|
}
|
|
42
42
|
|
|
43
|
+
/* A shut pane (dragged to nothing — `lib/paneReach.ts`) draws nothing and takes no focus; its
|
|
44
|
+
content would otherwise spill out of a zero-wide track. The seam beside it is a sibling, so it
|
|
45
|
+
stays to drag the pane open again. */
|
|
46
|
+
.cb-panesplit__cell[data-shut] {
|
|
47
|
+
visibility: hidden;
|
|
48
|
+
overflow: hidden;
|
|
49
|
+
}
|
|
50
|
+
|
|
43
51
|
.cb-panesplit__seam {
|
|
44
52
|
flex: 0 0 auto;
|
|
45
53
|
position: relative;
|
|
@@ -13,10 +13,13 @@
|
|
|
13
13
|
* reach;
|
|
14
14
|
* - **a `separator` role with real `aria-value*`**, the ARIA splitter pattern;
|
|
15
15
|
* - **double-click resets** to the rail's own default width, and forgets the stored one;
|
|
16
|
-
* - remembered on RELEASE — a drag is one decision, not sixty writes a second
|
|
16
|
+
* - remembered on RELEASE — a drag is one decision, not sixty writes a second;
|
|
17
|
+
* - 🔴 **no wall** (the owner, 2026-10-27): the drag reaches the far side of the row the rail
|
|
18
|
+
* shares, and below half of `MIN_RAIL_PX` the rail SHUTS — `lib/paneReach.ts`, the rule every
|
|
19
|
+
* cursedbelt divider obeys. A shut rail draws nothing but its handle, at the edge, to drag back.
|
|
17
20
|
*
|
|
18
|
-
*
|
|
19
|
-
*
|
|
21
|
+
* Storage is `railWidth.ts`, so the width is announced through `preferenceSync` like every other
|
|
22
|
+
* viewer preference.
|
|
20
23
|
*/
|
|
21
24
|
import type { CSSProperties, KeyboardEvent as ReactKeyboardEvent, PointerEvent as ReactPointerEvent, RefObject } from 'react';
|
|
22
25
|
export interface UseRailResizeOptions {
|
|
@@ -32,9 +35,15 @@ export interface RailResize<E extends HTMLElement = HTMLElement> {
|
|
|
32
35
|
railRef: RefObject<E | null>;
|
|
33
36
|
/** Whether a handle is drawn: a `resizeKey` was given and `enabled` is true. */
|
|
34
37
|
active: boolean;
|
|
35
|
-
/** The dragged width in px, or `null` for "the rail's own default width". Null while inactive. */
|
|
38
|
+
/** The dragged width in px (0 = shut), or `null` for "the rail's own default width". Null while inactive. */
|
|
36
39
|
width: number | null;
|
|
37
|
-
/**
|
|
40
|
+
/** Dragged all the way shut. The rail must then draw nothing but the handle — `style` does it. */
|
|
41
|
+
shut: boolean;
|
|
42
|
+
/**
|
|
43
|
+
* Spread onto the rail's `style` — `undefined` at the default width. 🔴 Spread ALL of it, not
|
|
44
|
+
* just `width`: a shut rail is also borderless and `visibility: hidden` (its content would
|
|
45
|
+
* otherwise spill out of a zero-wide box), and a wide one is held to its row by `maxWidth`.
|
|
46
|
+
*/
|
|
38
47
|
style: CSSProperties | undefined;
|
|
39
48
|
/** Forget the dragged width (what a double-click on the handle does). */
|
|
40
49
|
reset: () => void;
|
|
@@ -45,6 +54,8 @@ export interface RailResize<E extends HTMLElement = HTMLElement> {
|
|
|
45
54
|
onKeyDown: (event: ReactKeyboardEvent<HTMLElement>) => void;
|
|
46
55
|
/** The rail's current rendered width, for `aria-valuenow` before any drag. */
|
|
47
56
|
measure: () => number;
|
|
57
|
+
/** The width of the row the rail shares — how far it can grow. */
|
|
58
|
+
room: () => number;
|
|
48
59
|
};
|
|
49
60
|
}
|
|
50
61
|
export declare function useRailResize<E extends HTMLElement = HTMLElement>({ resizeKey, label, enabled, }: UseRailResizeOptions): RailResize<E>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"railResize.d.ts","sourceRoot":"","sources":["../../../src/react/filter-rail/railResize.tsx"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"railResize.d.ts","sourceRoot":"","sources":["../../../src/react/filter-rail/railResize.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,OAAO,KAAK,EAAE,aAAa,EAAE,aAAa,IAAI,kBAAkB,EAAE,YAAY,IAAI,iBAAiB,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAM9H,MAAM,WAAW,oBAAoB;IACnC,yFAAyF;IACzF,SAAS,EAAE,MAAM,GAAG,SAAS,CAAC;IAC9B,4EAA4E;IAC5E,KAAK,EAAE,MAAM,CAAC;IACd,2FAA2F;IAC3F,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,MAAM,WAAW,UAAU,CAAC,CAAC,SAAS,WAAW,GAAG,WAAW;IAC7D,wEAAwE;IACxE,OAAO,EAAE,SAAS,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC;IAC7B,gFAAgF;IAChF,MAAM,EAAE,OAAO,CAAC;IAChB,6GAA6G;IAC7G,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,kGAAkG;IAClG,IAAI,EAAE,OAAO,CAAC;IACd;;;;OAIG;IACH,KAAK,EAAE,aAAa,GAAG,SAAS,CAAC;IACjC,yEAAyE;IACzE,KAAK,EAAE,MAAM,IAAI,CAAC;IAClB,8CAA8C;IAC9C,QAAQ,CAAC,MAAM,EAAE;QACf,KAAK,EAAE,MAAM,CAAC;QACd,aAAa,EAAE,CAAC,KAAK,EAAE,iBAAiB,CAAC,WAAW,CAAC,KAAK,IAAI,CAAC;QAC/D,SAAS,EAAE,CAAC,KAAK,EAAE,kBAAkB,CAAC,WAAW,CAAC,KAAK,IAAI,CAAC;QAC5D,8EAA8E;QAC9E,OAAO,EAAE,MAAM,MAAM,CAAC;QACtB,kEAAkE;QAClE,IAAI,EAAE,MAAM,MAAM,CAAC;KACpB,CAAC;CACH;AAED,wBAAgB,aAAa,CAAC,CAAC,SAAS,WAAW,GAAG,WAAW,EAAE,EACjE,SAAS,EACT,KAAK,EACL,OAAc,GACf,EAAE,oBAAoB,GAAG,UAAU,CAAC,CAAC,CAAC,CAsEtC;AAWD;;;;;;;GAOG;AACH,wBAAgB,gBAAgB,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,GAAG,IAAI,EAAE,EAAE;IAAE,IAAI,EAAE,UAAU,CAAC;IAAC,SAAS,CAAC,EAAE,MAAM,CAAA;CAAE,sCA2BtG"}
|
|
@@ -1,22 +1,30 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { useCallback, useRef, useState } from 'react';
|
|
3
3
|
import { cn } from '../lib/cn.js';
|
|
4
|
-
import {
|
|
4
|
+
import { reachSize, stepSize } from '../lib/paneReach.js';
|
|
5
|
+
import { MIN_RAIL_PX, readRailWidth, writeRailWidth } from './railWidth.js';
|
|
5
6
|
export function useRailResize({ resizeKey, label, enabled = true, }) {
|
|
6
7
|
const railRef = useRef(null);
|
|
7
8
|
const [dragged, setDragged] = useState(() => (resizeKey ? readRailWidth(resizeKey) : null));
|
|
8
9
|
const active = Boolean(resizeKey) && enabled;
|
|
9
10
|
const measure = useCallback(() => railRef.current?.getBoundingClientRect().width ?? MIN_RAIL_PX, []);
|
|
11
|
+
// The row the rail shares with the page it navigates. A box with no layout (a test DOM, a hidden
|
|
12
|
+
// tab) measures 0, so the window stands in — never 0, which would make every width "shut".
|
|
13
|
+
const room = useCallback(() => {
|
|
14
|
+
const row = railRef.current?.parentElement?.getBoundingClientRect().width ?? 0;
|
|
15
|
+
return row > 0 ? row : globalThis.innerWidth || MIN_RAIL_PX * 4;
|
|
16
|
+
}, []);
|
|
10
17
|
const onPointerDown = useCallback((event) => {
|
|
11
18
|
if (!resizeKey || event.button !== 0)
|
|
12
19
|
return;
|
|
13
20
|
const handle = event.currentTarget;
|
|
14
21
|
const startX = event.clientX;
|
|
15
22
|
const startWidth = measure();
|
|
23
|
+
const total = room();
|
|
16
24
|
let latest = startWidth;
|
|
17
25
|
handle.setPointerCapture?.(event.pointerId);
|
|
18
26
|
const move = (moveEvent) => {
|
|
19
|
-
latest =
|
|
27
|
+
latest = Math.round(reachSize(startWidth + moveEvent.clientX - startX, MIN_RAIL_PX, total));
|
|
20
28
|
setDragged(latest);
|
|
21
29
|
};
|
|
22
30
|
const end = () => {
|
|
@@ -31,7 +39,7 @@ export function useRailResize({ resizeKey, label, enabled = true, }) {
|
|
|
31
39
|
handle.addEventListener('pointerup', end);
|
|
32
40
|
handle.addEventListener('pointercancel', end);
|
|
33
41
|
event.preventDefault();
|
|
34
|
-
}, [resizeKey, measure]);
|
|
42
|
+
}, [resizeKey, measure, room]);
|
|
35
43
|
const onKeyDown = useCallback((event) => {
|
|
36
44
|
if (!resizeKey)
|
|
37
45
|
return;
|
|
@@ -40,25 +48,35 @@ export function useRailResize({ resizeKey, label, enabled = true, }) {
|
|
|
40
48
|
if (!delta)
|
|
41
49
|
return;
|
|
42
50
|
event.preventDefault();
|
|
43
|
-
const next =
|
|
51
|
+
const next = Math.round(stepSize(dragged ?? measure(), delta, MIN_RAIL_PX, room()));
|
|
44
52
|
setDragged(next);
|
|
45
53
|
writeRailWidth(resizeKey, next);
|
|
46
|
-
}, [resizeKey, dragged, measure]);
|
|
54
|
+
}, [resizeKey, dragged, measure, room]);
|
|
47
55
|
const reset = useCallback(() => {
|
|
48
56
|
setDragged(null);
|
|
49
57
|
if (resizeKey)
|
|
50
58
|
writeRailWidth(resizeKey, null);
|
|
51
59
|
}, [resizeKey]);
|
|
52
60
|
const width = active ? dragged : null;
|
|
61
|
+
const shut = width === 0;
|
|
53
62
|
return {
|
|
54
63
|
railRef,
|
|
55
64
|
active,
|
|
56
65
|
width,
|
|
57
|
-
|
|
66
|
+
shut,
|
|
67
|
+
style: width === null ? undefined : shut ? SHUT_STYLE : { width, maxWidth: '100%' },
|
|
58
68
|
reset,
|
|
59
|
-
handle: { label, onPointerDown, onKeyDown, measure },
|
|
69
|
+
handle: { label, onPointerDown, onKeyDown, measure, room },
|
|
60
70
|
};
|
|
61
71
|
}
|
|
72
|
+
/** A shut rail: no width, no padding (a padded box is never narrower than its padding), no border,
|
|
73
|
+
* and nothing drawn but the handle, which opts back in. `overflow: visible`, because a rail that
|
|
74
|
+
* scrolls itself (`overflow-y-auto`) would clip its handle out of a zero-wide box — still in the
|
|
75
|
+
* DOM, never under the pointer; its content is hidden by `visibility` instead. */
|
|
76
|
+
const SHUT_STYLE = { width: 0, minWidth: 0, padding: 0, borderRightWidth: 0, overflow: 'visible', visibility: 'hidden' };
|
|
77
|
+
/** The shut rail's handle: visible again, and wholly on the page side of the edge, so all 12px of
|
|
78
|
+
* it can be grabbed even when the rail sits against the window's edge. */
|
|
79
|
+
const SHUT_HANDLE_STYLE = { visibility: 'visible', right: -12 };
|
|
62
80
|
/**
|
|
63
81
|
* The handle itself — a 12px hotspot centered on the rail's right border. The RAIL must be
|
|
64
82
|
* `position: relative` (the handle is absolutely positioned against it). Renders nothing while
|
|
@@ -70,8 +88,8 @@ export function useRailResize({ resizeKey, label, enabled = true, }) {
|
|
|
70
88
|
export function RailResizeHandle({ rail, className, ...rest }) {
|
|
71
89
|
if (!rail.active)
|
|
72
90
|
return null;
|
|
73
|
-
const { label, onPointerDown, onKeyDown, measure } = rail.handle;
|
|
74
|
-
return (_jsx("div", { ...rest, role: 'separator', "aria-orientation": 'vertical', "aria-label": `Resize ${label}`, "aria-valuemin":
|
|
91
|
+
const { label, onPointerDown, onKeyDown, measure, room } = rail.handle;
|
|
92
|
+
return (_jsx("div", { ...rest, role: 'separator', "aria-orientation": 'vertical', "aria-label": `Resize ${label}`, "aria-valuemin": 0, "aria-valuemax": Math.round(room()), "aria-valuenow": Math.round(rail.width ?? measure()), ...(rail.shut ? { style: SHUT_HANDLE_STYLE } : {}), tabIndex: 0, "data-cb-rail-resize": '', onPointerDown: onPointerDown, onKeyDown: onKeyDown, onDoubleClick: rail.reset,
|
|
75
93
|
// A 1px edge you cannot hit is not a handle: the hotspot is 12px, centred on the border,
|
|
76
94
|
// and only the hairline tints — no layout shift, like `PanelSeparator`.
|
|
77
95
|
className: cn('absolute inset-y-0 -right-1.5 z-20 w-3 cursor-col-resize touch-none bg-transparent transition-colors hover:bg-accent/20 active:bg-accent focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring', className) }));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"railResize.js","sourceRoot":"","sources":["../../../src/react/filter-rail/railResize.tsx"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"railResize.js","sourceRoot":"","sources":["../../../src/react/filter-rail/railResize.tsx"],"names":[],"mappings":";AAwBA,OAAO,EAAE,WAAW,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACtD,OAAO,EAAE,EAAE,EAAE,M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ACxE,SAAS,EAAE,EAAE,CACX,kNAAkN,EAClN,SAAS,CACV,GACD,CACH,CAAC;AACJ,CAAC"}
|
|
@@ -1,10 +1,15 @@
|
|
|
1
|
-
/**
|
|
1
|
+
/**
|
|
2
|
+
* Narrower than this and a row is an icon and an ellipsis — so it is the SNAP, not a floor:
|
|
3
|
+
* dragged below half of it the rail shuts (width 0), between half and all of it it holds here
|
|
4
|
+
* (`lib/paneReach.ts`). There is no maximum: the owner, 2026-10-27, *"let me drag them as far as
|
|
5
|
+
* I want including shutting a pane completely"* — a rail grows until the page beside it is shut.
|
|
6
|
+
*/
|
|
2
7
|
export declare const MIN_RAIL_PX = 160;
|
|
3
|
-
/**
|
|
4
|
-
|
|
8
|
+
/** A width as stored: whole pixels, and snapped at the bottom like a drag (0 is a shut rail), so a
|
|
9
|
+
* sliver written by an older build or by hand is never drawn. No top — `maxWidth` holds it to its row. */
|
|
5
10
|
export declare const clampRailWidth: (px: number) => number;
|
|
6
|
-
/** The remembered width, or null for "the rail's default". Wrapped: `localStorage`
|
|
7
|
-
* a sandboxed iframe and in Safari's private mode. */
|
|
11
|
+
/** The remembered width (0 = shut), or null for "the rail's default". Wrapped: `localStorage`
|
|
12
|
+
* throws in a sandboxed iframe and in Safari's private mode. */
|
|
8
13
|
export declare function readRailWidth(key: string): number | null;
|
|
9
14
|
/** Remember it, or forget it (`null` — the double-click reset). */
|
|
10
15
|
export declare function writeRailWidth(key: string, width: number | null): void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"railWidth.d.ts","sourceRoot":"","sources":["../../../src/react/filter-rail/railWidth.ts"],"names":[],"mappings":"AAeA
|
|
1
|
+
{"version":3,"file":"railWidth.d.ts","sourceRoot":"","sources":["../../../src/react/filter-rail/railWidth.ts"],"names":[],"mappings":"AAeA;;;;;GAKG;AACH,eAAO,MAAM,WAAW,MAAM,CAAC;AAE/B;2GAC2G;AAC3G,eAAO,MAAM,cAAc,GAAI,IAAI,MAAM,KAAG,MACsB,CAAC;AAEnE;iEACiE;AACjE,wBAAgB,aAAa,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CASxD;AAED,mEAAmE;AACnE,wBAAgB,cAAc,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,IAAI,GAAG,IAAI,CAStE"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* How wide the person dragged a sidebar — the pure half, so the
|
|
2
|
+
* How wide the person dragged a sidebar — the pure half, so the storage is testable without a
|
|
3
3
|
* pointer.
|
|
4
4
|
*
|
|
5
5
|
* Owner, 2026-09-24: *"the cb filetree sidebars should allow grabbing their right edge and
|
|
@@ -12,20 +12,25 @@
|
|
|
12
12
|
* the width to every device like the rest of them.
|
|
13
13
|
*/
|
|
14
14
|
import { announcePreference } from '../media-gallery/preferenceBus.js';
|
|
15
|
-
/**
|
|
15
|
+
/**
|
|
16
|
+
* Narrower than this and a row is an icon and an ellipsis — so it is the SNAP, not a floor:
|
|
17
|
+
* dragged below half of it the rail shuts (width 0), between half and all of it it holds here
|
|
18
|
+
* (`lib/paneReach.ts`). There is no maximum: the owner, 2026-10-27, *"let me drag them as far as
|
|
19
|
+
* I want including shutting a pane completely"* — a rail grows until the page beside it is shut.
|
|
20
|
+
*/
|
|
16
21
|
export const MIN_RAIL_PX = 160;
|
|
17
|
-
/**
|
|
18
|
-
|
|
19
|
-
export const clampRailWidth = (px) => Math.round(Math.
|
|
20
|
-
/** The remembered width, or null for "the rail's default". Wrapped: `localStorage`
|
|
21
|
-
* a sandboxed iframe and in Safari's private mode. */
|
|
22
|
+
/** A width as stored: whole pixels, and snapped at the bottom like a drag (0 is a shut rail), so a
|
|
23
|
+
* sliver written by an older build or by hand is never drawn. No top — `maxWidth` holds it to its row. */
|
|
24
|
+
export const clampRailWidth = (px) => px < MIN_RAIL_PX / 2 ? 0 : Math.round(Math.max(MIN_RAIL_PX, px));
|
|
25
|
+
/** The remembered width (0 = shut), or null for "the rail's default". Wrapped: `localStorage`
|
|
26
|
+
* throws in a sandboxed iframe and in Safari's private mode. */
|
|
22
27
|
export function readRailWidth(key) {
|
|
23
28
|
try {
|
|
24
29
|
const raw = globalThis.localStorage?.getItem(key);
|
|
25
30
|
if (raw == null)
|
|
26
31
|
return null;
|
|
27
32
|
const stored = Number(raw);
|
|
28
|
-
return Number.isFinite(stored) && stored
|
|
33
|
+
return raw.trim() !== '' && Number.isFinite(stored) && stored >= 0 ? clampRailWidth(stored) : null;
|
|
29
34
|
}
|
|
30
35
|
catch {
|
|
31
36
|
return null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"railWidth.js","sourceRoot":"","sources":["../../../src/react/filter-rail/railWidth.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AACH,OAAO,EAAE,kBAAkB,EAAE,MAAM,mCAAmC,CAAC;AAEvE
|
|
1
|
+
{"version":3,"file":"railWidth.js","sourceRoot":"","sources":["../../../src/react/filter-rail/railWidth.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AACH,OAAO,EAAE,kBAAkB,EAAE,MAAM,mCAAmC,CAAC;AAEvE;;;;;GAKG;AACH,MAAM,CAAC,MAAM,WAAW,GAAG,GAAG,CAAC;AAE/B;2GAC2G;AAC3G,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,EAAU,EAAU,EAAE,CACnD,EAAE,GAAG,WAAW,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,WAAW,EAAE,EAAE,CAAC,CAAC,CAAC;AAEnE;iEACiE;AACjE,MAAM,UAAU,aAAa,CAAC,GAAW;IACvC,IAAI,CAAC;QACH,MAAM,GAAG,GAAG,UAAU,CAAC,YAAY,EAAE,OAAO,CAAC,GAAG,CAAC,CAAC;QAClD,IAAI,GAAG,IAAI,IAAI;YAAE,OAAO,IAAI,CAAC;QAC7B,MAAM,MAAM,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC;QAC3B,OAAO,GAAG,CAAC,IAAI,EAAE,KAAK,EAAE,IAAI,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,IAAI,MAAM,IAAI,CAAC,CAAC,CAAC,CAAC,cAAc,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;IACrG,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,IAAI,CAAC;IACd,CAAC;AACH,CAAC;AAED,mEAAmE;AACnE,MAAM,UAAU,cAAc,CAAC,GAAW,EAAE,KAAoB;IAC9D,MAAM,KAAK,GAAG,KAAK,KAAK,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC,CAAC;IACpE,IAAI,CAAC;QACH,IAAI,KAAK,KAAK,IAAI;YAAE,UAAU,CAAC,YAAY,EAAE,UAAU,CAAC,GAAG,CAAC,CAAC;;YACxD,UAAU,CAAC,YAAY,EAAE,OAAO,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC;IACpD,CAAC;IAAC,MAAM,CAAC;QACP,8EAA8E;IAChF,CAAC;IACD,kBAAkB,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC;AACjC,CAAC"}
|
package/dist/react/index.d.ts
CHANGED
|
@@ -185,6 +185,7 @@ export { MeterList, type MeterListItem, type MeterListProps } from './components
|
|
|
185
185
|
export { HEAT_BANDS, HEAT_CLASS, HEAT_LABEL, HeatCell, type HeatCellProps, HeatLegend, type HeatLegendProps, type HeatBand, type HeatScale, type HeatSteps, LIMIT_STEPS, RELATIVE_STEPS, heatBandOf, heatChartTone, heatColumn, heatScaleFrom, heatTileTone, } from './components/Heat.js';
|
|
186
186
|
export { PanelSeparator, type PanelSeparatorProps } from './components/PanelSeparator.js';
|
|
187
187
|
export { SplitPane, type SplitPaneItem, type SplitPaneProps, } from './components/SplitPane.js';
|
|
188
|
+
export { reachSize, stepSize } from './lib/paneReach.js';
|
|
188
189
|
export { Sparkline, type SparklineProps } from './components/Sparkline.js';
|
|
189
190
|
export { StatStrip, type StatStripItem, type StatStripProps } from './components/StatStrip.js';
|
|
190
191
|
export { StatTile, type StatTileBudget, type StatTileProps, type StatTileTone, type StatValueSize, } from './components/StatTile.js';
|