@mt-gloss/ui 0.1.41 → 0.1.42

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.
@@ -13,6 +13,9 @@ export interface CascadePreviewItem {
13
13
  cardId: string;
14
14
  x: MotionValue<number>;
15
15
  y: MotionValue<number>;
16
+ /** Static layout in CSS px. NOT MotionValue — Phase 10 does not animate dimensions (Track C/Phase 11). Consumer formula: width = (cell.colSpan ?? 1) * colWidth, height = (cell.rowSpan ?? 1) * rowHeight. */
17
+ width: number;
18
+ height: number;
16
19
  }
17
20
  export interface CascadePreviewProps {
18
21
  items: CascadePreviewItem[];
@@ -51,5 +54,7 @@ export interface CascadePreviewProps {
51
54
  * hosts the DragGhost only.
52
55
  * - Consumer places this inside a `position: relative` parent so `position:
53
56
  * absolute` items stack correctly.
57
+ *
58
+ * Each item's inner motion.div renders at consumer-supplied {width, height} in CSS px. Dimensions are static; resize-cascade animation is Track C/Phase 11.
54
59
  */
55
60
  export declare function CascadePreview({ items, children, className, }: CascadePreviewProps): React.JSX.Element | null;
@@ -0,0 +1,66 @@
1
+ /**
2
+ * gridChannels — Grid v3.1 channel vocabulary (Track A foundation).
3
+ *
4
+ * Single authoritative vocabulary for the 9 grid-gesture channels (G-01 spec).
5
+ * Channels are CONTRACTS — names + which lifecycle states they apply in.
6
+ * Zero behavior, zero runtime: const record + types-via-typeof.
7
+ *
8
+ * Requirement mapping:
9
+ * GEV-01 — gridChannels (9-channel const record)
10
+ * GEV-01 — ChannelName, ChannelDef, LifecycleState (derived types)
11
+ *
12
+ * Layered relationship (D-02 — no bridge by design):
13
+ * - gridChannels.ts = vocabulary / contracts (this file)
14
+ * - gridMotionPrimitives.ts = physics / timing / color-token names
15
+ * Different abstraction layers stay in different files.
16
+ *
17
+ * Structural precedent: ./gridMotionPrimitives.ts
18
+ */
19
+ /**
20
+ * GEV-01 (lifecycle) — 4 states. Section-jump path skips 'arming'
21
+ * (encoded in consumer reducer per D-05, not in this type).
22
+ */
23
+ export type LifecycleState = 'idle' | 'arming' | 'active' | 'settling';
24
+ /** GEV-01 — 9-channel vocabulary. Single authoritative gallery. No discriminated unions (D-04); no enums (bundle weight). */
25
+ export declare const gridChannels: {
26
+ /** GEV-01 — Eligibility tint. Contiguous-from-source paint; blocked by first occupied cell (Principle 4). */
27
+ readonly eligibilityTint: {
28
+ readonly applicableStates: readonly ["arming", "active"];
29
+ };
30
+ /** GEV-01 — Commit tint. Fill+stroke emphasis on the commit-target cell footprint (G-02). */
31
+ readonly commitTint: {
32
+ readonly applicableStates: readonly ["active"];
33
+ };
34
+ /** GEV-01 — Rejection tint. Static fill on cells beyond reach. Stays while rejection condition holds. */
35
+ readonly rejectionTint: {
36
+ readonly applicableStates: readonly ["active"];
37
+ };
38
+ /** GEV-01 — Tracking outline. Solid 2.5px outline at commit footprint (G-02). Dashes + retreats on rejection — NEVER red (D-01 / Principle 1). */
39
+ readonly trackingOutline: {
40
+ readonly applicableStates: readonly ["active", "settling"];
41
+ };
42
+ /** GEV-01 — Commit ghost. Drag-only floating clone (D-01 — clean card with shadow + scale). Resize: N/A (subsumed by trackingOutline). */
43
+ readonly commitGhost: {
44
+ readonly applicableStates: readonly ["active", "settling"];
45
+ };
46
+ /** GEV-01 — Displaced preview. Neighbor-shift preview during cascade-insert. */
47
+ readonly displacedPreview: {
48
+ readonly applicableStates: readonly ["active"];
49
+ };
50
+ /** GEV-01 — Chrome. Drag/resize affordances — hidden when active per R-05 hide-on-active rule. */
51
+ readonly chrome: {
52
+ readonly applicableStates: readonly ["idle", "arming"];
53
+ };
54
+ /** GEV-01 — Hide-on-active rule. The rule itself: while a gesture is active, chrome+affordances suppress. */
55
+ readonly hideOnActive: {
56
+ readonly applicableStates: readonly ["active"];
57
+ };
58
+ /** GEV-01 — Refuse pulse. Discrete moment of crossing into rejection. Fires ONCE per transition (Principle 2). No strobing. */
59
+ readonly refusePulse: {
60
+ readonly applicableStates: readonly ["active"];
61
+ };
62
+ };
63
+ /** GEV-01 — Derived from gridChannels via typeof (D-04). */
64
+ export type ChannelName = keyof typeof gridChannels;
65
+ /** GEV-01 — Channel entry shape: { applicableStates: readonly LifecycleState[] }. */
66
+ export type ChannelDef = (typeof gridChannels)[ChannelName];
@@ -0,0 +1,62 @@
1
+ /**
2
+ * gridInteractivePalette — G-02 grid-interaction palette tokens (Phase 9 / Track A).
3
+ *
4
+ * Single authoritative source for the 7-token interactive grid palette consumed
5
+ * by Phases 10–14 visual primitives (drag feedback, resize choreography, section
6
+ * navigation, affordances, add/remove). Pure data — zero imports, no React, no
7
+ * runtime functions.
8
+ *
9
+ * D-07 dual-export pattern: BOTH locked hex literals (the spec) AND themable
10
+ * `var(...)` consumer hooks ship from this file. Hex values match the G-02 spec
11
+ * lock verbatim and never drift.
12
+ *
13
+ * Layered relationship: `paletteVars` uses the `--gloss-g02-*` prefix so it does
14
+ * NOT collide with Phase 0 `gridMotionPrimitives.colorTokens.rejectionFill` /
15
+ * `rejectionStroke` (which still resolve to `--gloss-rejection-{fill,stroke}`
16
+ * declared in `reptime-cloud/react-dashboard/app/styles/uplift-tokens.css`).
17
+ * Per D-02, the Phase 0 visual contract is preserved — this file is a sibling,
18
+ * not a replacement. SCSS defaults for the new vars are added in Plan 06 (only
19
+ * for vars consumed by the SnapOutline rewire smoke wire).
20
+ *
21
+ * Requirement mapping:
22
+ * GEV-02 — paletteHex / paletteVars / STROKE_DASHED / STROKE_SOLID /
23
+ * STROKE_SPARSE_DASH / STROKE_OUTLINE / PaletteToken
24
+ *
25
+ * Structural precedent: ./gridMotionPrimitives.ts §colorTokens (lines 79-87).
26
+ */
27
+ /** GEV-02 — G-02 hex literals. AUTHORITATIVE SPEC LOCK. Defaults match. */
28
+ export declare const paletteHex: {
29
+ readonly baseCellTint: "#F1F4F8";
30
+ readonly eligibilityFill: "#6F87D2";
31
+ readonly commitFill: "#4664C0";
32
+ readonly commitStroke: "#2541A1";
33
+ readonly rejectionFill: "#F0BAC1";
34
+ readonly rejectionStroke: "#BB2A39";
35
+ readonly trackingOutline: "#2541A1";
36
+ };
37
+ /**
38
+ * GEV-02 — Themable consumer hooks. Var names use `--gloss-g02-*` prefix to
39
+ * avoid colliding with Phase 0 `--gloss-rejection-{fill,stroke}` (D-02 keep
40
+ * Phase 0 untouched). Defaults are declared by Plan 06 SCSS for vars consumed
41
+ * by the smoke wire (currently only `--gloss-g02-tracking-outline` via
42
+ * SnapOutline rewire).
43
+ */
44
+ export declare const paletteVars: {
45
+ readonly baseCellTint: "var(--gloss-g02-base-cell-tint)";
46
+ readonly eligibilityFill: "var(--gloss-g02-eligibility-fill)";
47
+ readonly commitFill: "var(--gloss-g02-commit-fill)";
48
+ readonly commitStroke: "var(--gloss-g02-commit-stroke)";
49
+ readonly rejectionFill: "var(--gloss-g02-rejection-fill)";
50
+ readonly rejectionStroke: "var(--gloss-g02-rejection-stroke)";
51
+ readonly trackingOutline: "var(--gloss-g02-tracking-outline)";
52
+ };
53
+ /** D-09 — Eligibility + provisional dashed stroke pattern. */
54
+ export declare const STROKE_DASHED: "dashed";
55
+ /** D-09 — Commit solid stroke pattern. */
56
+ export declare const STROKE_SOLID: "solid";
57
+ /** D-09 — Rejection sparse-dash stroke pattern (colorblind-safe redundancy). */
58
+ export declare const STROKE_SPARSE_DASH: "sparse-dash";
59
+ /** D-09 — Tracking-outline 2px no-fill pattern. */
60
+ export declare const STROKE_OUTLINE: "2px no-fill";
61
+ /** GEV-02 — Derived from paletteHex via typeof; symmetric with paletteVars. */
62
+ export type PaletteToken = keyof typeof paletteHex;
@@ -36,3 +36,5 @@ export * from './LeaderboardCard';
36
36
  export * from './ExceptionListCard';
37
37
  export * from './StackedGroupTilePreview';
38
38
  export * from './gridMotionPrimitives';
39
+ export * from './gridChannels';
40
+ export * from './gridInteractivePalette';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mt-gloss/ui",
3
- "version": "0.1.41",
3
+ "version": "0.1.42",
4
4
  "type": "module",
5
5
  "publishConfig": {
6
6
  "access": "restricted"