@mt-gloss/ui 0.1.6 → 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.
- package/{Expandable-CsLVYNv3.js → Expandable-CTI-osAf.js} +2015 -2010
- package/catalog.js +2 -2
- package/index.d.ts +1 -0
- package/index.js +508 -452
- package/lib/primitives/dashboard/gridMotionPrimitives.d.ts +82 -0
- package/lib/primitives/dashboard/index.d.ts +1 -0
- package/package.json +1 -1
- package/ui.css +1 -1
|
@@ -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';
|