@mt-gloss/ui 0.1.59 → 0.1.61
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/{BaseAsyncButton-DAeHnhMt.js → BaseAsyncButton-Cq_l7clO.js} +1 -1
- package/{Expandable-BgEhifn0.js → Expandable-DyUAv0HO.js} +2897 -2854
- package/{UIContext-CDdyubSF.js → UIContext-DP6JGCto.js} +8 -8
- package/catalog.js +4 -4
- package/index.js +882 -881
- package/internals.js +3 -3
- package/lib/primitives/dashboard/CascadePreview/CascadePreview.d.ts +1 -1
- package/lib/primitives/dashboard/DragGhost/DragGhost.d.ts +1 -1
- package/lib/primitives/dashboard/DropAnchorCell/DropAnchorCell.d.ts +7 -1
- package/lib/primitives/dashboard/EmptyCellPackAffordance/EmptyCellPackAffordance.d.ts +7 -7
- package/lib/primitives/dashboard/MetricCard/EdgeHoverHandle.d.ts +13 -0
- package/lib/primitives/dashboard/MetricCard/GhostPreview.d.ts +1 -1
- package/lib/primitives/dashboard/MetricCard/useEdgeHoverResize.d.ts +1 -1
- package/lib/primitives/dashboard/gridInteractivePalette.d.ts +11 -1
- package/lib/primitives/dashboard/hooks/useAffordanceVisibility.d.ts +1 -24
- package/package.json +3 -3
- package/ui.css +1 -1
package/internals.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { d as B } from "./UIContext-
|
|
2
|
-
import { G as A, J as I, H, I as M, af as $, ah as R, a as E, i as F, v as O, F as U, x as z, y as W, w as L, z as j, D as G, A as V, l as X, ai as Z, a8 as q, ab as J, aa as K, a9 as Q, ac as Y, V as aa, X as sa, Y as ea, W as oa, a1 as ta, a2 as la, f as ra, a5 as ia, a7 as da, a6 as na, h as ca, j as Ba, aj as ga, a4 as ba, K as ma, N as ua, L as pa, M as ya, a3 as ha, B as _a, ag as fa, m as va, ad as Ca, P as ka, Q as Da, o as Ta, q as wa, s as xa, r as Sa, p as Na, t as Pa, e as Aa, b as Ia, k as Ha, _ as Ma, a0 as $a, $ as Ra, ae as Ea, n as Fa, O as Oa, g as Ua, C as za, E as Wa, R as La, S as ja, T as Ga, c as Va, U as Xa, Z as Za, u as qa } from "./UIContext-
|
|
1
|
+
import { d as B } from "./UIContext-DP6JGCto.js";
|
|
2
|
+
import { G as A, J as I, H, I as M, af as $, ah as R, a as E, i as F, v as O, F as U, x as z, y as W, w as L, z as j, D as G, A as V, l as X, ai as Z, a8 as q, ab as J, aa as K, a9 as Q, ac as Y, V as aa, X as sa, Y as ea, W as oa, a1 as ta, a2 as la, f as ra, a5 as ia, a7 as da, a6 as na, h as ca, j as Ba, aj as ga, a4 as ba, K as ma, N as ua, L as pa, M as ya, a3 as ha, B as _a, ag as fa, m as va, ad as Ca, P as ka, Q as Da, o as Ta, q as wa, s as xa, r as Sa, p as Na, t as Pa, e as Aa, b as Ia, k as Ha, _ as Ma, a0 as $a, $ as Ra, ae as Ea, n as Fa, O as Oa, g as Ua, C as za, E as Wa, R as La, S as ja, T as Ga, c as Va, U as Xa, Z as Za, u as qa } from "./UIContext-DP6JGCto.js";
|
|
3
3
|
import { jsx as d, jsxs as g, Fragment as b } from "react/jsx-runtime";
|
|
4
|
-
import { c as Ka, e as Qa, d as Ya, B as as, b as ss, a as es } from "./BaseAsyncButton-
|
|
4
|
+
import { c as Ka, e as Qa, d as Ya, B as as, b as ss, a as es } from "./BaseAsyncButton-Cq_l7clO.js";
|
|
5
5
|
const T = {
|
|
6
6
|
DurationFast: "var(--gloss-motion-duration-fast)",
|
|
7
7
|
DurationNormal: "var(--gloss-motion-duration-normal)",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { MotionValue } from '
|
|
1
|
+
import { MotionValue } from 'motion/react';
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
export interface DragGhostProps {
|
|
4
4
|
/** 'ok' = blue dashed (--gloss-valid-stroke/fill); 'rejected' = pink solid (--gloss-rejection-stroke/fill) */
|
|
@@ -20,6 +20,12 @@ export interface DropAnchorCellProps extends React.HTMLAttributes<HTMLDivElement
|
|
|
20
20
|
* Border PERSISTS during drag/resize (PKG-04 invariant); only affordance GLYPHS hide
|
|
21
21
|
* via useAffordanceVisibility(). The border IS the drop-target affordance. */
|
|
22
22
|
state?: 'empty';
|
|
23
|
+
/** Quick 260503-dac — Cross-section resize reject (R-11). When true, primitive
|
|
24
|
+
* renders sparse-dash red stroke (#BB2A39, dasharray 10/6) + pink fill
|
|
25
|
+
* (#F0BAC1) via [data-rejection='true'] SCSS rule. Consumer sets this on the
|
|
26
|
+
* cell whose target colSpan would cross a section divider during resize.
|
|
27
|
+
* Mirrors the data-blocked undefined-when-false pattern (no DOM noise at idle). */
|
|
28
|
+
rejection?: boolean;
|
|
23
29
|
children?: React.ReactNode;
|
|
24
30
|
}
|
|
25
31
|
/**
|
|
@@ -38,4 +44,4 @@ export interface DropAnchorCellProps extends React.HTMLAttributes<HTMLDivElement
|
|
|
38
44
|
*
|
|
39
45
|
* Respects prefers-reduced-motion.
|
|
40
46
|
*/
|
|
41
|
-
export declare function DropAnchorCell({ density, canAccept, blocked, proximityOpacity, state, className, children, ...rest }: DropAnchorCellProps): import("react/jsx-runtime").JSX.Element;
|
|
47
|
+
export declare function DropAnchorCell({ density, canAccept, blocked, proximityOpacity, state, rejection, className, children, ...rest }: DropAnchorCellProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -23,13 +23,13 @@ import * as React from 'react';
|
|
|
23
23
|
* Without it, clicking a glyph would pack/add AND open the catalog
|
|
24
24
|
* simultaneously.
|
|
25
25
|
*
|
|
26
|
-
* PKG-04 hide-during-drag
|
|
27
|
-
*
|
|
28
|
-
*
|
|
29
|
-
*
|
|
30
|
-
*
|
|
31
|
-
*
|
|
32
|
-
*
|
|
26
|
+
* PKG-04 hide-during-drag IS implemented via `useAffordanceVisibility()`
|
|
27
|
+
* (single-source gate; migrated 2026-05-03 quick/260503-aff). The hook
|
|
28
|
+
* subscribes to `GestureStateProvider` and applies a 200ms idle dwell-delay
|
|
29
|
+
* before re-emergence per A-01-affordance-dwell-reemergence.svg. Both the
|
|
30
|
+
* `+` and `×` SwingReveal wrappers AND-gate `visible` on `affordancesVisible`
|
|
31
|
+
* — the consumer-side `enabled` for `×` continues to express the D-19
|
|
32
|
+
* predicate independently.
|
|
33
33
|
*
|
|
34
34
|
* @see .planning/phases/13-track-g-add-remove-collapse/13-CONTEXT.md §D-04, §D-06, §D-10, §D-18
|
|
35
35
|
*/
|
|
@@ -49,5 +49,18 @@ export interface EdgeHoverHandleProps {
|
|
|
49
49
|
* first few px — pointerup then fires on whatever is underneath, the handle's
|
|
50
50
|
* React onPointerUp never runs, and the state machine stays stuck at
|
|
51
51
|
* 'dragging' (so onResize is never called and the card never commits).
|
|
52
|
+
*
|
|
53
|
+
* Cross-card gesture suppression (260503-aff): during ANY drag/resize, the
|
|
54
|
+
* resize handles on NON-source cards must hide so they don't compete with
|
|
55
|
+
* the in-flight gesture's chrome. Achieved by AND-gating ONLY the
|
|
56
|
+
* `'handle-visible'` branch on `useAffordanceVisibility().affordancesVisible`.
|
|
57
|
+
* The `'dragging'` and `'settling'` branches stay un-gated to preserve the
|
|
58
|
+
* SOURCE card's pointer-capture invariant — the source card's own handle MUST
|
|
59
|
+
* remain visible (and pointer-capture-eligible) throughout its own gesture,
|
|
60
|
+
* regardless of `affordancesVisible`. Non-source cards sit at
|
|
61
|
+
* `'handle-visible'` or earlier, so when `affordancesVisible=false` (during
|
|
62
|
+
* any global gesture + 200ms idle dwell), they hide. After the global
|
|
63
|
+
* gesture settles back to idle and the dwell elapses, all handles re-emerge
|
|
64
|
+
* together with the rest of the affordance chrome.
|
|
52
65
|
*/
|
|
53
66
|
export declare const EdgeHoverHandle: import('react').ForwardRefExoticComponent<EdgeHoverHandleProps & import('react').RefAttributes<HTMLButtonElement>>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { MotionValue } from '
|
|
1
|
+
import { MotionValue } from 'motion/react';
|
|
2
2
|
import { ResizePhysicsConfig } from './resizePhysics';
|
|
3
3
|
export type ResizeState = 'idle' | 'dwelling' | 'handle-visible' | 'dragging' | 'settling' | 'cancelled';
|
|
4
4
|
export type ResizeDirection = 'grow' | 'shrink';
|
|
@@ -20,7 +20,9 @@
|
|
|
20
20
|
*
|
|
21
21
|
* Requirement mapping:
|
|
22
22
|
* GEV-02 — paletteHex / paletteVars / STROKE_DASHED / STROKE_SOLID /
|
|
23
|
-
* STROKE_SPARSE_DASH / STROKE_OUTLINE /
|
|
23
|
+
* STROKE_SPARSE_DASH / STROKE_OUTLINE /
|
|
24
|
+
* STROKE_DASHED_DASHARRAY / STROKE_SPARSE_DASH_DASHARRAY /
|
|
25
|
+
* PaletteToken
|
|
24
26
|
*
|
|
25
27
|
* Structural precedent: ./gridMotionPrimitives.ts §colorTokens (lines 79-87).
|
|
26
28
|
*/
|
|
@@ -58,5 +60,13 @@ export declare const STROKE_SOLID: "solid";
|
|
|
58
60
|
export declare const STROKE_SPARSE_DASH: "sparse-dash";
|
|
59
61
|
/** D-09 — Tracking-outline 2px no-fill pattern. */
|
|
60
62
|
export declare const STROKE_OUTLINE: "2px no-fill";
|
|
63
|
+
/** Quick 260503-dac — D-04 eligibility dashed pattern dasharray (matches spec
|
|
64
|
+
* D-04 §Specification — eligibility border #6F87D2, 1.5px, dasharray 6 4). */
|
|
65
|
+
export declare const STROKE_DASHED_DASHARRAY: "6 4";
|
|
66
|
+
/** Quick 260503-dac — R-11 rejection sparse-dash dasharray (matches spec
|
|
67
|
+
* R-11 §B — rejection stroke #BB2A39, 3px, dasharray 10 6). Distinct from
|
|
68
|
+
* the eligibility 6/4 pattern so users can perceive the reject state without
|
|
69
|
+
* relying on hue alone (colorblind-safe redundancy). */
|
|
70
|
+
export declare const STROKE_SPARSE_DASH_DASHARRAY: "10 6";
|
|
61
71
|
/** GEV-02 — Derived from paletteHex via typeof; symmetric with paletteVars. */
|
|
62
72
|
export type PaletteToken = keyof typeof paletteHex;
|
|
@@ -1,28 +1,5 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* useAffordanceVisibility — Phase 13 D-10 / D-18 contract section 3.
|
|
3
|
-
*
|
|
4
|
-
* Returns the visibility flag for empty-cell affordance glyphs (+ and ×) during
|
|
5
|
-
* drag/resize gestures (PKG-04 hide-on-active rule).
|
|
6
|
-
*
|
|
7
|
-
* **Phase 13 ships a stub** that returns `{ affordancesVisible: true }` unconditionally.
|
|
8
|
-
* **Phase 12 fills the real implementation** when its affordance state machine ships
|
|
9
|
-
* (Track D — AFF-01). The contract Phase 12 must honor:
|
|
10
|
-
*
|
|
11
|
-
* - Read gridChannels lifecycle state for the `chrome` channel.
|
|
12
|
-
* - Return `{ affordancesVisible: true }` when LifecycleState ∈ ['idle', 'arming']
|
|
13
|
-
* (matches `gridChannels.chrome.applicableStates`).
|
|
14
|
-
* - Return `{ affordancesVisible: false }` when LifecycleState === 'active' or 'settling'
|
|
15
|
-
* (matches `gridChannels.hideOnActive.applicableStates`).
|
|
16
|
-
*
|
|
17
|
-
* The DropAnchorCell `state='empty'` dashed border is NOT gated by this hook —
|
|
18
|
-
* the border persists during drag/resize because it IS the drop-target affordance
|
|
19
|
-
* (D-07 critical invariant).
|
|
20
|
-
*
|
|
21
|
-
* @see .planning/phases/13-track-g-add-remove-collapse/13-CONTEXT.md §D-10, §D-18
|
|
22
|
-
* @see .planning/phases/09-track-a-gev-foundation/HANDOFF.json#contracts.channels (chrome, hideOnActive)
|
|
23
|
-
*/
|
|
24
1
|
export interface UseAffordanceVisibilityReturn {
|
|
25
|
-
/** true when affordance glyphs
|
|
2
|
+
/** true when affordance glyphs should render; false during gesture + 200ms idle dwell. */
|
|
26
3
|
affordancesVisible: boolean;
|
|
27
4
|
}
|
|
28
5
|
export declare function useAffordanceVisibility(): UseAffordanceVisibilityReturn;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mt-gloss/ui",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.61",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "restricted"
|
|
@@ -63,7 +63,7 @@
|
|
|
63
63
|
"@mt-gloss/utils": ">=0.0.1",
|
|
64
64
|
"@mt-gloss/motion": ">=0.0.1",
|
|
65
65
|
"@floating-ui/react": ">=0.27.0",
|
|
66
|
-
"
|
|
66
|
+
"motion": ">=12.0.0",
|
|
67
67
|
"zod": "^4.0.0"
|
|
68
68
|
},
|
|
69
69
|
"peerDependenciesMeta": {
|
|
@@ -106,7 +106,7 @@
|
|
|
106
106
|
"@floating-ui/react": {
|
|
107
107
|
"optional": true
|
|
108
108
|
},
|
|
109
|
-
"
|
|
109
|
+
"motion": {
|
|
110
110
|
"optional": true
|
|
111
111
|
},
|
|
112
112
|
"zod": {
|