@mt-gloss/ui 0.1.60 → 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.
@@ -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,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.60",
3
+ "version": "0.1.61",
4
4
  "type": "module",
5
5
  "publishConfig": {
6
6
  "access": "restricted"