@mt-gloss/ui 0.1.5 → 0.1.7

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.
@@ -35,6 +35,13 @@ export interface UseEdgeHoverResizeArgs {
35
35
  * Used to clamp ghostWidth writes during drag so the ghost cannot grow
36
36
  * past the maximum-allowed column width at any cursor position (debug
37
37
  * session 260419-ghost-slides-across-page — AP-17 companion invariant).
38
+ *
39
+ * Bug fix 260420-resize-past-sections — this cap is now enforced on the
40
+ * COMMIT path as well (onPointerUp + onKeyboardStep + hysteresisSnap).
41
+ * Previously only the live ghost width was clamped; onPointerUp passed
42
+ * raw `dx` to hysteresisSnap whose forward walk + final clamp used a
43
+ * hardcoded `3`, letting fast drags commit `targetColSpan = 3` past the
44
+ * section boundary.
38
45
  */
39
46
  maxColSpan?: 1 | 2 | 3;
40
47
  /**
@@ -0,0 +1,82 @@
1
+ /**
2
+ * gridMotionPrimitives — Grid v2 shared motion vocabulary (Phase 0).
3
+ *
4
+ * Single source of truth for all timing, easing, color-token-name, and feedback
5
+ * constants consumed by Phases 1–5 (Grid Foundation, Cascade, Drag Feedback,
6
+ * Drag-to-Edge Auto-Advance, Resize + [×]). Zero behavior — framework-agnostic,
7
+ * no React, no Framer Motion, no hooks. Consumers import plain constants +
8
+ * `getMotionMode()` and decide how to apply them.
9
+ *
10
+ * Requirement mapping:
11
+ * MOTION-01 (no fade-from-nowhere) — documented principle; enforced in review
12
+ * MOTION-02 — cascadePhysics
13
+ * MOTION-03 — swingReveal
14
+ * MOTION-04 — colorTokens.rejection*, colorTokens.valid*, colorTokens.validCellStroke
15
+ * MOTION-05 — rejectionFeedback
16
+ * MOTION-06 — provisional, colorTokens.provisionalWash
17
+ * MOTION-07 — HARD_CLIP
18
+ * MOTION-08 — this file is the lone source; no inline timing/hex/easing in
19
+ * consuming component code (grep-enforced in each consumer phase)
20
+ * MOTION-09 — reducedMotion, getMotionMode()
21
+ *
22
+ * Structural precedent: libs/gloss-ui/src/lib/primitives/overlays/ActionStrip/motion.ts
23
+ */
24
+ /** MOTION-02 — Forward (digest) and reverse (undo) cascade physics. Asymmetric by design. */
25
+ export declare const cascadePhysics: {
26
+ readonly forwardStaggerMs: 50;
27
+ readonly reverseStaggerMs: 30;
28
+ readonly springStiffness: 380;
29
+ readonly springDamping: 32;
30
+ readonly reverseVelocityMultiplier: 1.4;
31
+ };
32
+ /** MOTION-03 — Swing-from-behind reveal (resize handle, [×] affordance, future hover-intent micro-affordances). */
33
+ export declare const swingReveal: {
34
+ readonly enterDurationMs: 220;
35
+ readonly exitDurationMs: 140;
36
+ readonly enterEasing: "cubic-bezier(0.34, 1.56, 0.64, 1)";
37
+ readonly exitEasing: "cubic-bezier(0.4, 0, 1, 1)";
38
+ readonly translateOffsetPx: 4;
39
+ };
40
+ /** MOTION-05 — Rejection kinesthetic: ghost shiver on invalid drop. */
41
+ export declare const rejectionFeedback: {
42
+ readonly shiverCycles: 3;
43
+ readonly shiverAmplitudePx: 2;
44
+ readonly shiverDurationMs: 180;
45
+ readonly validCellOpacity: 0.6;
46
+ };
47
+ /** MOTION-06 — Provisional section/dot materialize + dematerialize. */
48
+ export declare const provisional: {
49
+ readonly materializeMs: 180;
50
+ readonly dematerializeMs: 140;
51
+ readonly easing: "cubic-bezier(0.22, 1, 0.36, 1)";
52
+ readonly dotStrokePx: 2;
53
+ readonly dividerDashGapPx: 4;
54
+ };
55
+ /** MOTION-09 — Substitution values when prefers-reduced-motion: reduce is active. */
56
+ export declare const reducedMotion: {
57
+ readonly cascadeStaggerMs: 0;
58
+ readonly cascadeSpringCapMs: 120;
59
+ readonly swingEnterMs: 100;
60
+ readonly swingEnterStyle: "opacity";
61
+ readonly provisionalMs: 80;
62
+ readonly provisionalStyle: "opacity";
63
+ readonly shiverMs: 200;
64
+ readonly shiverStyle: "color-flash";
65
+ };
66
+ /**
67
+ * MOTION-07 — Hard-clip marker. True = when fixed neighbor grows over a card,
68
+ * cards clip at advancing edge (no fade). Downstream phases must reference this
69
+ * constant as the canonical source for the hard-clip rule.
70
+ */
71
+ export declare const HARD_CLIP: true;
72
+ /** MOTION-04, MOTION-06 — CSS custom property NAMES (not literals). Consumers use var(...). */
73
+ export declare const colorTokens: {
74
+ readonly rejectionFill: "var(--gloss-rejection-fill)";
75
+ readonly rejectionStroke: "var(--gloss-rejection-stroke)";
76
+ readonly validFill: "var(--gloss-valid-fill)";
77
+ readonly validStroke: "var(--gloss-valid-stroke)";
78
+ readonly validCellStroke: "var(--gloss-valid-cell-stroke)";
79
+ readonly provisionalWash: "var(--gloss-provisional-wash)";
80
+ };
81
+ /** MOTION-09 — Motion mode resolver. Pure; SSR-safe; returns 'full' when window is undefined. */
82
+ export declare function getMotionMode(): 'full' | 'reduced';
@@ -17,3 +17,4 @@ export * from './DropAnchorCell';
17
17
  export * from './SpilloverArc';
18
18
  export * from './SectionDivider';
19
19
  export * from './EmptyCellPackAffordance';
20
+ export * from './gridMotionPrimitives';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mt-gloss/ui",
3
- "version": "0.1.5",
3
+ "version": "0.1.7",
4
4
  "type": "module",
5
5
  "publishConfig": {
6
6
  "access": "restricted"