@mt-gloss/ui 0.0.44 → 0.0.46
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/index.js +1282 -1251
- package/lib/primitives/dashboard/DevTuningPanel/useResizeTuning.d.ts +1 -1
- package/lib/primitives/dashboard/MetricCard/GhostPreview.d.ts +21 -7
- package/lib/primitives/dashboard/MetricCard/__tests__/fixtures/nyquist-09-parity-matrix.d.ts +5 -2
- package/lib/primitives/dashboard/MetricCard/resizePhysics.d.ts +1 -1
- package/lib/primitives/dashboard/MetricCard/useEdgeHoverResize.d.ts +20 -6
- package/package.json +1 -1
- package/ui.css +1 -1
|
@@ -18,7 +18,7 @@ declare const _TUNING_DEFAULTS_LITERAL: {
|
|
|
18
18
|
readonly snapInPx: 60;
|
|
19
19
|
readonly snapOutPx: 90;
|
|
20
20
|
readonly stiffness: 500;
|
|
21
|
-
readonly damping:
|
|
21
|
+
readonly damping: 22;
|
|
22
22
|
readonly mass: 1;
|
|
23
23
|
readonly snapInFraction: number;
|
|
24
24
|
readonly snapOutFraction: number;
|
|
@@ -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
|
}
|
package/lib/primitives/dashboard/MetricCard/__tests__/fixtures/nyquist-09-parity-matrix.d.ts
CHANGED
|
@@ -3,7 +3,10 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Typed array of 144 rows enumerating the 7-axis resize parity space:
|
|
5
5
|
*
|
|
6
|
-
* spring — 3 presets: default (
|
|
6
|
+
* spring — 3 presets: default (S500D22M1, retuned 260419 for
|
|
7
|
+
* visible overshoot — was S500D35M1; see Fix E /
|
|
8
|
+
* 260419-resize-integration-broken), gentle (S300D30M1),
|
|
9
|
+
* stiff (S700D40M1)
|
|
7
10
|
* viewport — round-robin across [1280, 1920, 2560] (all 3 appear in asserted set)
|
|
8
11
|
* reducedMotion — {false, true}
|
|
9
12
|
* pointerType — {'mouse', 'touch'}
|
|
@@ -47,7 +50,7 @@
|
|
|
47
50
|
*/
|
|
48
51
|
export interface Nyquist09Row {
|
|
49
52
|
/**
|
|
50
|
-
* Stable row id, e.g. '
|
|
53
|
+
* Stable row id, e.g. 'S500D22M1-vw1280-rm_off-mouse-stack-commit-dndk_on'.
|
|
51
54
|
* Shape: `S{stiffness}D{damping}M{mass}-vw{viewport}-rm_{on|off}-{pointer}-{stack|spark}-{cancelPath}-dndk_{on|off}`.
|
|
52
55
|
*/
|
|
53
56
|
id: string;
|
|
@@ -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
|
};
|
|
@@ -71,7 +85,7 @@ export interface UseEdgeHoverResizeReturn {
|
|
|
71
85
|
* - MotionValue ghost tracking (D-07) — zero React re-renders per pointermove
|
|
72
86
|
* - Hysteresis snap (D-06) replaces Math.round(dx/step)
|
|
73
87
|
* - Velocity ring buffer (D-09) feeds spring commit
|
|
74
|
-
* - Spring commit via framer-motion animate() (D-08: stiffness 500, damping
|
|
88
|
+
* - Spring commit via framer-motion animate() (D-08: stiffness 500, damping 22, mass 1 — retuned 260419 for visible overshoot, was damping 35)
|
|
75
89
|
* - 'settling' state (D-12) hard-blocks re-engagement during spring
|
|
76
90
|
* - committed state removed (D-05) — rolls into settling → idle
|
|
77
91
|
* - Keyboard step (D-16): onKeyboardStep('grow'|'shrink')
|
|
@@ -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;
|