@mt-gloss/ui 0.0.44 → 0.0.45
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.
|
@@ -4,8 +4,15 @@ export interface GhostPreviewProps {
|
|
|
4
4
|
visible: boolean;
|
|
5
5
|
/** The target column span being previewed. */
|
|
6
6
|
targetColSpan: 1 | 2 | 3;
|
|
7
|
-
/**
|
|
8
|
-
|
|
7
|
+
/**
|
|
8
|
+
* D-07 rework 260419-v2 — MotionValue driving the ghost's WIDTH (px).
|
|
9
|
+
* The ghost is left-anchored at the slot origin; the ghost RIGHT edge
|
|
10
|
+
* follows the cursor via direct width animation (no translateX). Zero
|
|
11
|
+
* React re-renders per pointermove. Framer-motion animates width via rAF
|
|
12
|
+
* + direct style writes, so there is no CSS-engine transition on width
|
|
13
|
+
* (AP-19 companion — `transition-property` in edge-hover.scss is opacity-only).
|
|
14
|
+
*/
|
|
15
|
+
ghostWidth: MotionValue<number>;
|
|
9
16
|
/** AN-06 enter duration in ms. Default: 180ms */
|
|
10
17
|
enterMs?: number;
|
|
11
18
|
/** AN-06 exit duration in ms. Default: 120ms */
|
|
@@ -14,14 +21,21 @@ export interface GhostPreviewProps {
|
|
|
14
21
|
/**
|
|
15
22
|
* GhostPreview — Dashed outline overlay rendered during an active resize drag.
|
|
16
23
|
*
|
|
17
|
-
*
|
|
18
|
-
*
|
|
19
|
-
*
|
|
24
|
+
* Rework 260419-v2: ghost is LEFT-ANCHORED WIDTH (no translateX). The left
|
|
25
|
+
* edge stays pinned at the slot origin; the right edge follows the cursor
|
|
26
|
+
* via framer-motion MotionValue → `style={{ width }}`. Supersedes the prior
|
|
27
|
+
* translateX (D-07) rendering, which caused the ghost to slide horizontally
|
|
28
|
+
* across the page when compounded with the pre-Phase-19 wrapper (see debug
|
|
29
|
+
* session 260419-ghost-slides-across-page).
|
|
30
|
+
*
|
|
31
|
+
* D-24's "translateX over scaleX" rationale (corner distortion under scaleX)
|
|
32
|
+
* does NOT apply to direct `width` animation — the border/corners draw at
|
|
33
|
+
* every frame at the current width with no geometric scaling.
|
|
20
34
|
*
|
|
21
35
|
* Hidden via aria-hidden — purely decorative visual feedback.
|
|
22
|
-
* Motion contract (AN-06): enter 180ms, exit 120ms.
|
|
36
|
+
* Motion contract (AN-06): enter 180ms, exit 120ms (opacity only).
|
|
23
37
|
*/
|
|
24
|
-
export declare function GhostPreview({ visible, targetColSpan,
|
|
38
|
+
export declare function GhostPreview({ visible, targetColSpan, ghostWidth, enterMs, exitMs, }: GhostPreviewProps): import("react/jsx-runtime").JSX.Element;
|
|
25
39
|
export declare namespace GhostPreview {
|
|
26
40
|
var displayName: string;
|
|
27
41
|
}
|
|
@@ -15,6 +15,13 @@ export interface UseEdgeHoverResizeArgs {
|
|
|
15
15
|
onCancel?: () => void;
|
|
16
16
|
/** D-14 — colWidth snapshot passed per-render; captured at pointerdown. Default: 180px (1280px viewport). */
|
|
17
17
|
step?: number;
|
|
18
|
+
/**
|
|
19
|
+
* Grid gap (px) between adjacent columns. Used to compute the ghost's
|
|
20
|
+
* left-anchored width as `colSpan * step + (colSpan - 1) * gap`. Default: 0
|
|
21
|
+
* (single-column grids). Rework 260419-v2 — ghost is width-driven, not
|
|
22
|
+
* translateX-driven; this is the companion scalar.
|
|
23
|
+
*/
|
|
24
|
+
gap?: number;
|
|
18
25
|
/** D-03 panel override; falls back to DEFAULT_RESIZE_PHYSICS. */
|
|
19
26
|
tuning?: Partial<ResizePhysicsConfig>;
|
|
20
27
|
/** Hover dwell time before handle appears. Default: 120ms */
|
|
@@ -25,8 +32,8 @@ export interface UseEdgeHoverResizeArgs {
|
|
|
25
32
|
exitMs?: number;
|
|
26
33
|
/**
|
|
27
34
|
* Max colSpan supported by the grid (D-13 — right-edge-only grow). Default: 3.
|
|
28
|
-
* Used to clamp
|
|
29
|
-
* past the maximum-allowed column
|
|
35
|
+
* Used to clamp ghostWidth writes during drag so the ghost cannot grow
|
|
36
|
+
* past the maximum-allowed column width at any cursor position (debug
|
|
30
37
|
* session 260419-ghost-slides-across-page — AP-17 companion invariant).
|
|
31
38
|
*/
|
|
32
39
|
maxColSpan?: 1 | 2 | 3;
|
|
@@ -50,8 +57,15 @@ export interface UseEdgeHoverResizeReturn {
|
|
|
50
57
|
ghostProps: {
|
|
51
58
|
visible: boolean;
|
|
52
59
|
targetColSpan: 1 | 2 | 3;
|
|
53
|
-
/**
|
|
54
|
-
|
|
60
|
+
/**
|
|
61
|
+
* D-07 rework 260419-v2 — MotionValue driving ghost WIDTH (left-anchored).
|
|
62
|
+
* The ghost LEFT edge is pinned at the slot origin; the ghost RIGHT edge
|
|
63
|
+
* follows the cursor; `ghostWidth` carries that width imperatively with
|
|
64
|
+
* zero React re-renders per pointermove. Supersedes the prior `motionX`
|
|
65
|
+
* translateX semantic (which slid the entire ghost horizontally — see
|
|
66
|
+
* debug session 260419-ghost-slides-across-page).
|
|
67
|
+
*/
|
|
68
|
+
ghostWidth: MotionValue<number>;
|
|
55
69
|
enterMs: number;
|
|
56
70
|
exitMs: number;
|
|
57
71
|
};
|
|
@@ -84,4 +98,4 @@ export interface UseEdgeHoverResizeReturn {
|
|
|
84
98
|
* - Bug E handle pointerenter keeps zone alive on sentinel→handle crossover
|
|
85
99
|
* - Dwell timer cleanup on unmount
|
|
86
100
|
*/
|
|
87
|
-
export declare function useEdgeHoverResize({ currentColSpan, stackable, onResize, onCancel, step, tuning, dwellMs, enterMs, exitMs, maxColSpan, }: UseEdgeHoverResizeArgs): UseEdgeHoverResizeReturn;
|
|
101
|
+
export declare function useEdgeHoverResize({ currentColSpan, stackable, onResize, onCancel, step, gap, tuning, dwellMs, enterMs, exitMs, maxColSpan, }: UseEdgeHoverResizeArgs): UseEdgeHoverResizeReturn;
|