@mt-gloss/ui 0.1.8 → 0.1.10

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.
@@ -4,11 +4,28 @@
4
4
  * Renders `count` buttons inside a `role="tablist"`. Click dispatches
5
5
  * `onSelect(index)`. Keyboard ← → loop forward/backward with wrap semantics
6
6
  * (D-25). Hollow default, filled for the current section.
7
+ *
8
+ * Phase 4 — drag-to-edge-auto-advance — additive extension per D-09/D-10/D-11:
9
+ * - `provisionalIndex` marks an unconfirmed section with hollow-stroke dot
10
+ * (`data-state='provisional-hollow'`) and `aria-label='Unconfirmed section'`.
11
+ * - `pulseIndex` triggers the refuse-pulse animation (`data-state='pulse'`).
12
+ * - `pulseNonce` is composited into the React `key` for the pulsed index so a
13
+ * nonce bump forces a re-mount — which restarts the CSS keyframe animation
14
+ * even if the same index is pulsed twice in a row.
15
+ *
16
+ * All new props are optional; omitting them preserves the Phase 23 two-state
17
+ * `data-state='current'|'hollow'` render exactly (parity contract).
7
18
  */
8
19
  export interface SectionDotsProps {
9
20
  count: number;
10
21
  currentIndex: number;
11
22
  onSelect: (index: number) => void;
12
23
  'aria-label'?: string;
24
+ /** Phase 4 D-09 — index of the unconfirmed ("provisional") section, if any. */
25
+ provisionalIndex?: number;
26
+ /** Phase 4 D-09 — index of the dot currently playing the refuse pulse, if any. */
27
+ pulseIndex?: number;
28
+ /** Phase 4 D-10 — monotonically-increasing nonce; bump to replay the pulse keyframe. */
29
+ pulseNonce?: number;
13
30
  }
14
- export declare function SectionDots({ count, currentIndex, onSelect, 'aria-label': ariaLabel, }: SectionDotsProps): import("react/jsx-runtime").JSX.Element;
31
+ export declare function SectionDots({ count, currentIndex, onSelect, 'aria-label': ariaLabel, provisionalIndex, pulseIndex, pulseNonce, }: SectionDotsProps): import("react/jsx-runtime").JSX.Element;
@@ -1,5 +1,5 @@
1
1
  import * as React from 'react';
2
- export type SectionDividerState = 'hidden' | 'revealed' | 'emphasized';
2
+ export type SectionDividerState = 'hidden' | 'revealed' | 'emphasized' | 'provisional';
3
3
  export interface SectionDividerProps extends React.HTMLAttributes<HTMLDivElement> {
4
4
  state: SectionDividerState;
5
5
  /** Left-to-right cascade position (0, 1, 2, ...) multiplied by staggerMs for animation-delay. */
@@ -0,0 +1,33 @@
1
+ import * as React from 'react';
2
+ /**
3
+ * SwingReveal — shared swing-from-behind reveal wrapper (Phase 5 Plan 01).
4
+ *
5
+ * MOTION-03 source of truth: gridMotionPrimitives.swingReveal (enterDurationMs, exitDurationMs,
6
+ * enterEasing, exitEasing, translateOffsetPx). See gridMotionPrimitives.ts for values.
7
+ *
8
+ * MOTION-08 invariant: ALL timing/easing values come from gridMotionPrimitives.
9
+ * No inline literals in this file or swing-reveal.scss (SCSS reads via CSS custom props).
10
+ *
11
+ * MOTION-09 under prefers-reduced-motion: 100ms opacity-only (reducedMotion.swingEnterMs);
12
+ * transform: none. Handled entirely by CSS @media query in swing-reveal.scss (research Q3).
13
+ *
14
+ * D-05-07 flat-sibling placement; D-05-08 variant-gated API (no open timing props);
15
+ * D-05-09 trigger="hover+focus" uses CSS :has(:focus-visible) (research Q2); D-05-10 4px from swingReveal.translateOffsetPx.
16
+ *
17
+ * RESIZE-12 consumers: EdgeHoverHandle (Plan 02) + EmptyCellPackAffordance (Plan 02).
18
+ */
19
+ export type SwingRevealVariant = 'pack' | 'handle';
20
+ export type SwingRevealTrigger = 'hover' | 'hover+focus';
21
+ export interface SwingRevealProps {
22
+ /** Imperative visibility flag — toggles data-visible attribute and .gloss-swing-reveal[data-visible='true'] CSS state. */
23
+ visible: boolean;
24
+ /** Variant drives modifier class + future per-variant timing differentiation (D-05-08 variant-gated API — no open timing props). */
25
+ variant: SwingRevealVariant;
26
+ /** 'hover' = imperative only; 'hover+focus' = also reveal under :has(:focus-visible) via CSS (research Q2 CSS approach). */
27
+ trigger: SwingRevealTrigger;
28
+ /** Children rendered inside the span wrapper. */
29
+ children: React.ReactNode;
30
+ /** Optional caller class appended after built-in classes. */
31
+ className?: string;
32
+ }
33
+ export declare const SwingReveal: React.FC<SwingRevealProps>;
@@ -0,0 +1,2 @@
1
+ export { SwingReveal } from './SwingReveal';
2
+ export type { SwingRevealProps, SwingRevealVariant, SwingRevealTrigger } from './SwingReveal';
@@ -20,4 +20,5 @@ export * from './EmptyCellPackAffordance';
20
20
  export * from './DragGhost';
21
21
  export * from './SnapOutline';
22
22
  export * from './CascadePreview';
23
+ export * from './SwingReveal';
23
24
  export * from './gridMotionPrimitives';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mt-gloss/ui",
3
- "version": "0.1.8",
3
+ "version": "0.1.10",
4
4
  "type": "module",
5
5
  "publishConfig": {
6
6
  "access": "restricted"