@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/internals.js CHANGED
@@ -1,7 +1,7 @@
1
- import { d as B } from "./UIContext-CDdyubSF.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-CDdyubSF.js";
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-DAeHnhMt.js";
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 'framer-motion';
1
+ import { MotionValue } from 'motion/react';
2
2
  import * as React from 'react';
3
3
  /**
4
4
  * Per-card MotionValue pair carried alongside its cardId. Consumers (Plan 05
@@ -1,4 +1,4 @@
1
- import { MotionValue } from 'framer-motion';
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 is NOT implemented in this primitive — it is
27
- * deferred to Phase 12 (Track D AFF-01) via the `useAffordanceVisibility()`
28
- * hook seam declared in `../hooks/useAffordanceVisibility.ts`. Phase 13 ships
29
- * the seam with a `{ affordancesVisible: true }` stub; Phase 12 fills the
30
- * gridChannels-driven implementation. Until then, glyphs remain visible
31
- * during drag/resize Phase 13's UAT scenarios for hide-during-drag verify
32
- * the seam exists but cannot exercise the gate behaviour.
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 'framer-motion';
1
+ import { MotionValue } from 'motion/react';
2
2
  export interface GhostPreviewProps {
3
3
  /** Whether the ghost overlay is currently visible (active during drag/settling). */
4
4
  visible: boolean;
@@ -1,4 +1,4 @@
1
- import { MotionValue } from 'framer-motion';
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 / PaletteToken
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 (+ and ×) should render; false during drag/resize. */
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.59",
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
- "framer-motion": ">=12.0.0",
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
- "framer-motion": {
109
+ "motion": {
110
110
  "optional": true
111
111
  },
112
112
  "zod": {