@mt-gloss/ui 0.0.48 → 0.0.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.
package/internals.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import { b as B } from "./UIContext-C3E-k7HI.js";
2
2
  import { F as A, I, G as H, H as M, af as $, ah as R, c as E, h as F, t as O, D as U, w as z, x as W, v as L, y as j, A as G, z as V, k as X, ai as Z, a7 as q, aa as J, a9 as K, a8 as Q, ab as Y, Q as aa, W as sa, X as ea, V as oa, a0 as ta, a1 as la, e as ra, a4 as ia, a6 as da, a5 as na, g as ca, i as Ba, aj as ga, a3 as ba, J as ma, M as ua, K as pa, L as ya, a2 as ha, B as _a, ag as fa, l as va, ac as Ca, O as ka, P as Da, n as Ta, p as wa, r as xa, q as Sa, o as Na, s as Pa, d as Aa, ad as Ia, j as Ha, Y as Ma, $ as $a, _ as Ra, ae as Ea, m as Fa, N as Oa, f as Ua, C as za, E as Wa, R as La, S as ja, T as Ga, a as Va, U as Xa, Z as Za, u as qa } from "./UIContext-C3E-k7HI.js";
3
3
  import { jsx as d, jsxs as g, Fragment as b } from "react/jsx-runtime";
4
- import { c as Ka, e as Qa, d as Ya, B as as, b as ss, a as es } from "./BaseAsyncButton-nFOdhiBv.js";
4
+ import { c as Ka, e as Qa, d as Ya, B as as, b as ss, a as es } from "./BaseAsyncButton-usdApZUY.js";
5
5
  const T = {
6
6
  DurationFast: "var(--gloss-motion-duration-fast)",
7
7
  DurationNormal: "var(--gloss-motion-duration-normal)",
@@ -0,0 +1,19 @@
1
+ import * as React from 'react';
2
+ /**
3
+ * Phase 23 — TOOLBAR-01 — persistent ~36px strip per D-23 / D-24.
4
+ *
5
+ * Always visible (not tied to edit-session state). Three named slots — left, center,
6
+ * right — composed by the consumer. Reptime supplies a `<PageDropdown>` in `slotLeft`
7
+ * and `<SectionDots>` in `slotCenter`; `slotRight` is reserved for future controls.
8
+ */
9
+ export interface BottomToolbarProps {
10
+ slotLeft?: React.ReactNode;
11
+ slotCenter?: React.ReactNode;
12
+ slotRight?: React.ReactNode;
13
+ /** Override D-23 default 36px height. */
14
+ height?: number;
15
+ className?: string;
16
+ style?: React.CSSProperties;
17
+ 'aria-label'?: string;
18
+ }
19
+ export declare function BottomToolbar({ slotLeft, slotCenter, slotRight, height, className, style, 'aria-label': ariaLabel, }: BottomToolbarProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,14 @@
1
+ /**
2
+ * Phase 23 — TOOLBAR-01 — N-button section navigator per D-24 / D-25.
3
+ *
4
+ * Renders `count` buttons inside a `role="tablist"`. Click dispatches
5
+ * `onSelect(index)`. Keyboard ← → loop forward/backward with wrap semantics
6
+ * (D-25). Hollow default, filled for the current section.
7
+ */
8
+ export interface SectionDotsProps {
9
+ count: number;
10
+ currentIndex: number;
11
+ onSelect: (index: number) => void;
12
+ 'aria-label'?: string;
13
+ }
14
+ export declare function SectionDots({ count, currentIndex, onSelect, 'aria-label': ariaLabel, }: SectionDotsProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,4 @@
1
+ export { BottomToolbar } from './BottomToolbar';
2
+ export type { BottomToolbarProps } from './BottomToolbar';
3
+ export { SectionDots } from './SectionDots';
4
+ export type { SectionDotsProps } from './SectionDots';
@@ -0,0 +1 @@
1
+ export * from './BottomToolbar';
@@ -0,0 +1,29 @@
1
+ import * as React from 'react';
2
+ export type DropAnchorDensity = 'near' | 'adjacent' | 'far' | 'distant' | 'none';
3
+ export interface DropAnchorCellProps extends React.HTMLAttributes<HTMLDivElement> {
4
+ density: DropAnchorDensity;
5
+ /** D-13 / DRAG-AN-02 — occupied cells never highlight. Pass false for occupied cells. */
6
+ canAccept: boolean;
7
+ /** Brief not-allowed pulse when user attempts drop on occupied. */
8
+ blocked?: boolean;
9
+ /** Stable cell id for test selectors + future instrumentation. */
10
+ ['data-cell-id']?: string;
11
+ children?: React.ReactNode;
12
+ }
13
+ /**
14
+ * DropAnchorCell — DRAG-AN-01/02/03 (Phase 23 D-13/D-14).
15
+ *
16
+ * Presentational cell wrapper that drives drop-anchor tint via `data-density`
17
+ * + `data-can-accept` attrs. Consumers (Plan 23-06) compute density bucket per
18
+ * cell relative to the cursor; this primitive owns the visual contract only.
19
+ *
20
+ * Visual contract (see drop-anchor-cell.scss):
21
+ * - data-density ∈ {near|adjacent|far|distant} drives ::after opacity per
22
+ * D-14 array [0.80, 0.50, 0.30, 0.15].
23
+ * - data-can-accept="false" suppresses highlight unconditionally (D-13 —
24
+ * occupied cells never light up).
25
+ * - data-blocked="true" + className modifier triggers brief not-allowed pulse.
26
+ *
27
+ * Respects prefers-reduced-motion.
28
+ */
29
+ export declare function DropAnchorCell({ density, canAccept, blocked, className, children, ...rest }: DropAnchorCellProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,2 @@
1
+ export { DropAnchorCell } from './DropAnchorCell';
2
+ export type { DropAnchorCellProps, DropAnchorDensity } from './DropAnchorCell';
@@ -0,0 +1,17 @@
1
+ import * as React from 'react';
2
+ /**
3
+ * Phase 23 — EMPTY-PACK-01 — `[×]` empty-cell pack affordance per D-19 / D-20.
4
+ *
5
+ * Renders a small top-right button on an empty cell that, when clicked, requests
6
+ * right-neighbor left-shift via `onPack()`. When `enabled=false` (all cells to
7
+ * the right are also empty), the affordance is fully hidden (returns `null`).
8
+ */
9
+ export interface EmptyCellPackAffordanceProps {
10
+ /** D-19 — hide when all cells to the right are also empty. Consumer decides. */
11
+ enabled: boolean;
12
+ onPack: () => void;
13
+ ariaLabel?: string;
14
+ className?: string;
15
+ style?: React.CSSProperties;
16
+ }
17
+ export declare function EmptyCellPackAffordance({ enabled, onPack, ariaLabel, className, style, }: EmptyCellPackAffordanceProps): import("react/jsx-runtime").JSX.Element | null;
@@ -0,0 +1,2 @@
1
+ export { EmptyCellPackAffordance } from './EmptyCellPackAffordance';
2
+ export type { EmptyCellPackAffordanceProps } from './EmptyCellPackAffordance';
@@ -0,0 +1,29 @@
1
+ /**
2
+ * gridInteractionPhysics — D-26 Phase 23 config tokens.
3
+ *
4
+ * STRICT SEPARATION from resizePhysics.ts (D-27): this module contains
5
+ * ONLY grid-interaction timings not already in resizePhysics.ts. Spring +
6
+ * hysteresis + blueprint constants continue to live in resizePhysics.ts
7
+ * and are imported from there by consumers. Forking resizePhysics.ts is
8
+ * AP-16 equivalent and forbidden.
9
+ *
10
+ * Keys sourced from 23-CONTEXT.md D-26 + 23-RESEARCH.md Pattern 13.
11
+ */
12
+ export declare const DEFAULT_GRID_INTERACTION_PHYSICS: {
13
+ readonly staggerMs: 50;
14
+ readonly reverseStaggerMs: 30;
15
+ readonly envelopeEnterMs: 180;
16
+ readonly envelopeExitMs: 140;
17
+ readonly rubberBandRatio: 0.33;
18
+ readonly dragEdgeHoldMs: 400;
19
+ readonly spilloverArcDurationMs: 600;
20
+ readonly spilloverStaggerMs: 50;
21
+ readonly anchorProximityOpacities: readonly [0.8, 0.5, 0.3, 0.15];
22
+ readonly anchorFadeStaggerMs: 30;
23
+ readonly editStandbyMs: 4000;
24
+ readonly editFadeOutMs: 600;
25
+ readonly sectionDividerFadeInMs: 120;
26
+ readonly sectionDividerFadeOutMs: 80;
27
+ readonly sectionDividerStaggerMs: 40;
28
+ };
29
+ export type GridInteractionPhysicsConfig = typeof DEFAULT_GRID_INTERACTION_PHYSICS;
@@ -13,6 +13,8 @@ export { DEFAULT_RESIZE_PHYSICS } from './resizePhysics';
13
13
  export type { ResizePhysicsConfig } from './resizePhysics';
14
14
  export { VelocityBuffer } from './velocityBuffer';
15
15
  export type { VelocitySample } from './velocityBuffer';
16
+ export { DEFAULT_GRID_INTERACTION_PHYSICS } from './gridInteractionPhysics';
17
+ export type { GridInteractionPhysicsConfig } from './gridInteractionPhysics';
16
18
  export * from './flipAndStage';
17
19
  export * from './types';
18
20
  export type { CardBackProps } from './CardBack';
@@ -0,0 +1,41 @@
1
+ import * as React from 'react';
2
+ export type ResizeEnvelopeState = 'hidden' | 'entering' | 'entered' | 'exiting';
3
+ export interface ResizeEnvelopeProps {
4
+ state: ResizeEnvelopeState;
5
+ originX: number;
6
+ originY: number;
7
+ leftEdgeX: number;
8
+ rightEdgeX: number;
9
+ minBoundaryX: number;
10
+ /** Intermediate permeable snap positions between min and max; rendered as dotted lines. */
11
+ snapBoundariesX: number[];
12
+ topY: number;
13
+ bottomY: number;
14
+ /** Override D-07 enter duration (default: DEFAULT_GRID_INTERACTION_PHYSICS.envelopeEnterMs = 180ms). */
15
+ enterMs?: number;
16
+ /** Override D-07 exit duration (default: DEFAULT_GRID_INTERACTION_PHYSICS.envelopeExitMs = 140ms). */
17
+ exitMs?: number;
18
+ className?: string;
19
+ style?: React.CSSProperties;
20
+ }
21
+ /**
22
+ * Phase 23 — RESIZE-ENV-01 — D-05/D-06/D-07
23
+ *
24
+ * Pure presentational overlay drawn on pointerdown of a resize handle. Shows
25
+ * the full resize option space:
26
+ * - Solid LEFT edge (card's fixed anchor)
27
+ * - Solid RIGHT edge (max colSpan extent)
28
+ * - Solid MIN-BOUNDARY interior line (the wall — impermeable)
29
+ * - Dotted INTERMEDIATE snap lines (permeable snap points)
30
+ *
31
+ * Asymmetric D-07 timings:
32
+ * - Enter 180ms: 120ms solid edges fade-in + 60ms dotted fade-in (offset by 120ms)
33
+ * - Exit 140ms: 40ms dotted fade-out + 100ms solid collapse (offset by 40ms)
34
+ *
35
+ * Defaults pull from `DEFAULT_GRID_INTERACTION_PHYSICS` (CONFIG-01); never
36
+ * hardcode duration strings in consumers. Respects `prefers-reduced-motion`.
37
+ *
38
+ * Aria-hidden — purely decorative overlay; the underlying resize gesture
39
+ * carries the semantic meaning.
40
+ */
41
+ export declare function ResizeEnvelope({ state, originX, originY, leftEdgeX, rightEdgeX, minBoundaryX, snapBoundariesX, topY, bottomY, enterMs, exitMs, className, style, }: ResizeEnvelopeProps): import("react/jsx-runtime").JSX.Element | null;
@@ -0,0 +1,2 @@
1
+ export { ResizeEnvelope } from './ResizeEnvelope';
2
+ export type { ResizeEnvelopeProps, ResizeEnvelopeState } from './ResizeEnvelope';
@@ -0,0 +1,29 @@
1
+ import * as React from 'react';
2
+ export type SectionDividerState = 'hidden' | 'revealed' | 'emphasized';
3
+ export interface SectionDividerProps extends React.HTMLAttributes<HTMLDivElement> {
4
+ state: SectionDividerState;
5
+ /** Left-to-right cascade position (0, 1, 2, ...) multiplied by staggerMs for animation-delay. */
6
+ staggerIndex?: number;
7
+ fadeInMs?: number;
8
+ fadeOutMs?: number;
9
+ staggerMs?: number;
10
+ }
11
+ /**
12
+ * SectionDivider — SECTION-DIV-01 (Phase 23 D-22).
13
+ *
14
+ * Dashed vertical divider revealed only during grid manipulation. Three-state
15
+ * machine (hidden|revealed|emphasized) drives opacity + color via CSS class
16
+ * modifiers. Each instance accepts a `staggerIndex` so consumers (Plan 23-06)
17
+ * can render N dividers with a left-to-right cascade — index threads through
18
+ * a CSS custom property as `staggerIndex × staggerMs` ms.
19
+ *
20
+ * Visual contract (see section-divider.scss):
21
+ * - state='hidden': opacity 0, no chrome
22
+ * - state='revealed': opacity 0.4, neutral border color, fade-in over fadeInMs
23
+ * - state='emphasized': opacity 0.85, accent color (current section), fade-in
24
+ * over fadeInMs
25
+ *
26
+ * Defaults bind to DEFAULT_GRID_INTERACTION_PHYSICS (CONFIG-01).
27
+ * Respects prefers-reduced-motion.
28
+ */
29
+ export declare function SectionDivider({ state, staggerIndex, fadeInMs, fadeOutMs, staggerMs, className, style, ...rest }: SectionDividerProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,2 @@
1
+ export { SectionDivider } from './SectionDivider';
2
+ export type { SectionDividerProps, SectionDividerState } from './SectionDivider';
@@ -0,0 +1,30 @@
1
+ import * as React from 'react';
2
+ export interface ArcSegment {
3
+ id: string;
4
+ fromX: number;
5
+ fromY: number;
6
+ toX: number;
7
+ toY: number;
8
+ }
9
+ export interface SpilloverArcProps {
10
+ segments: ArcSegment[];
11
+ /** D-18 — full arc lifetime (default spilloverArcDurationMs = 600). */
12
+ durationMs?: number;
13
+ /** D-18 — per-segment stagger (default spilloverStaggerMs = 50). */
14
+ staggerMs?: number;
15
+ className?: string;
16
+ style?: React.CSSProperties;
17
+ }
18
+ /**
19
+ * SpilloverArc — DRAG-SPILL-01 (Phase 23 D-17/D-18).
20
+ *
21
+ * Single `<svg>` overlay rendering N quadratic Bezier `<path>` arcs from a
22
+ * drop origin to each spilled card's final position. Each path fades over
23
+ * `durationMs` (default 600) with `staggerMs` (default 50) per-arc offset.
24
+ *
25
+ * Single-SVG strategy (vs. one SVG per segment) chosen for paint perf and to
26
+ * eliminate cross-arc clipping concerns. See 23-RESEARCH.md §Pattern 9.
27
+ *
28
+ * Respects prefers-reduced-motion.
29
+ */
30
+ export declare function SpilloverArc({ segments, durationMs, staggerMs, className, style, }: SpilloverArcProps): import("react/jsx-runtime").JSX.Element | null;
@@ -0,0 +1,2 @@
1
+ export { SpilloverArc } from './SpilloverArc';
2
+ export type { SpilloverArcProps, ArcSegment } from './SpilloverArc';
@@ -12,3 +12,8 @@ export * from './MetricCardGrid';
12
12
  export * from './TabbedDataView';
13
13
  export * from './MetricGroupContainer';
14
14
  export * from './DevTuningPanel';
15
+ export * from './ResizeEnvelope';
16
+ export * from './DropAnchorCell';
17
+ export * from './SpilloverArc';
18
+ export * from './SectionDivider';
19
+ export * from './EmptyCellPackAffordance';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mt-gloss/ui",
3
- "version": "0.0.48",
3
+ "version": "0.0.49",
4
4
  "type": "module",
5
5
  "publishConfig": {
6
6
  "access": "restricted"