@mt-gloss/ui 0.1.48 → 0.1.49

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.
@@ -18,7 +18,10 @@
18
18
  */
19
19
  export interface SectionDotsProps {
20
20
  count: number;
21
- currentIndex: number;
21
+ /**
22
+ * @deprecated Phase 12 D-09 — prefer `currentSection`. Kept optional for v2.0 back-compat callers.
23
+ */
24
+ currentIndex?: number;
22
25
  onSelect: (index: number) => void;
23
26
  'aria-label'?: string;
24
27
  /** Phase 4 D-09 — index of the unconfirmed ("provisional") section, if any. */
@@ -32,5 +35,4 @@ export interface SectionDotsProps {
32
35
  /** Phase 12 D-09 — how many sections fit in viewport at once. Default 1 (preserves v2.0 model). */
33
36
  sectionsPerView?: number;
34
37
  }
35
- export declare function SectionDots({ count, currentIndex, onSelect, 'aria-label': ariaLabel, provisionalIndex, pulseIndex, pulseNonce, currentSection, // D-08 back-compat shim
36
- sectionsPerView, }: SectionDotsProps): import("react/jsx-runtime").JSX.Element | null;
38
+ export declare function SectionDots({ count, currentIndex, onSelect, 'aria-label': ariaLabel, provisionalIndex, pulseIndex, pulseNonce, currentSection, sectionsPerView, }: SectionDotsProps): import("react/jsx-runtime").JSX.Element | null;
@@ -0,0 +1,57 @@
1
+ import { UseEdgeHoverResizeReturn } from './useEdgeHoverResize';
2
+ import { CellTintVariant } from '../CellTintOverlay';
3
+ type Cell = {
4
+ section: 0 | 1 | 2 | 3;
5
+ col: 0 | 1 | 2;
6
+ row: 0 | 1 | 2;
7
+ };
8
+ export interface UseResizeChoreographyArgs {
9
+ /** Pass-through of useEdgeHoverResize return — never mutated. D-03. */
10
+ edgeHover: UseEdgeHoverResizeReturn & {
11
+ /** D-04 — locked lifecycle states. The base hook today exposes the legacy
12
+ * ResizeState union; consumer-side adapters can also pass the canonical
13
+ * 4-state lifecycle. The hook treats {idle, settling, cancelled} as
14
+ * null-output and {arming, dwelling, handle-visible, dragging, active}
15
+ * as channel-emitting states. */
16
+ state: string;
17
+ /** Live preview colSpan as a float OR integer. Required for ramp lerp;
18
+ * numbers between integers drive the ramp toward commit. */
19
+ previewColSpan: number;
20
+ /** Hysteresis-snapped target colSpan (D-07). Drives outline / tints / shrink. */
21
+ hysteresisTargetColSpan: 1 | 2 | 3;
22
+ /** Card's current colSpan (pre-resize baseline). */
23
+ currentColSpan: 1 | 2 | 3;
24
+ /** Direction discriminator. */
25
+ direction: string;
26
+ };
27
+ sourceCell: Cell;
28
+ activeSection: 0 | 1 | 2 | 3;
29
+ /** Cascade result for current preview colSpan — passed in from reptime reducer
30
+ * state. Hook is reducer-agnostic per D-03 + RESEARCH §Open Question 2. */
31
+ cascadeResult: {
32
+ result: 'ok' | 'rejected';
33
+ reason?: 'spans-sections' | 'section-full' | 'spillover-blocked' | 'occupied-target' | string;
34
+ } | null;
35
+ colWidth: number;
36
+ rowHeight: number;
37
+ gap: number;
38
+ }
39
+ export interface UseResizeChoreographyReturn {
40
+ trackingOutline: {
41
+ cell: Cell;
42
+ colSpan: 1 | 2 | 3;
43
+ pattern: 'solid' | 'dashed-retreated';
44
+ } | null;
45
+ cellTints: Array<{
46
+ cell: Cell;
47
+ variant: CellTintVariant;
48
+ rampColor?: string;
49
+ }>;
50
+ refusePulse: {
51
+ cell: Cell;
52
+ fireKey: number;
53
+ } | null;
54
+ shrinkFreedCells: Cell[];
55
+ }
56
+ export declare function useResizeChoreography(args: UseResizeChoreographyArgs): UseResizeChoreographyReturn;
57
+ export {};
@@ -44,3 +44,4 @@ export * from './TrackingOutline';
44
44
  export * from './CellTintOverlay';
45
45
  export * from './RefusePulse';
46
46
  export { ResizeTrackingOutline, type ResizeTrackingOutlineProps, } from './ResizeTrackingOutline';
47
+ export { useResizeChoreography, type UseResizeChoreographyArgs, type UseResizeChoreographyReturn, } from './MetricCard/useResizeChoreography';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mt-gloss/ui",
3
- "version": "0.1.48",
3
+ "version": "0.1.49",
4
4
  "type": "module",
5
5
  "publishConfig": {
6
6
  "access": "restricted"