import * as _angular_core from '@angular/core'; import { WritingDirection } from 'forty-cdk/core'; /** * Headless implementation of the * [WAI-ARIA Window Splitter pattern](https://www.w3.org/WAI/ARIA/apg/patterns/windowsplitter/): * the focusable divider between two resizable panes. Carries `role="separator"` * with live `aria-valuenow` / `aria-valuemin` / `aria-valuemax`, is tabbable, * handles arrow keys / Page Up-Down / Home / End / (optional) Enter, and * supports pointer drag with `setPointerCapture`. Emits `(resizing)` on every * mutation and `(resizeCommit)` once per key release / drag end. * * It is essentially a 1-D slider wearing a separator role; the static * `[forSeparator]` divider stays a separate, thinner primitive so a visual-only * separator never pulls the drag / keyboard-resize code in. * * Pointer drag arms only after the pointer travels past a small dead-zone (a * few px), so a plain click that fires a stray sub-threshold `pointermove` * never mutates the value — `(resizing)` won't fire on a jittery click. * A press also focuses the divider (the drag's `preventDefault` suppresses the * browser's native focus-on-press), so arrow-key fine-tuning works immediately * after a release and AT tracks `aria-valuenow` during the gesture. * Pressing `Escape` (or a `pointercancel`) during a drag reverts the value to * where the gesture started and emits no `(resizeCommit)`. Being destroyed * mid-drag reverts too, reporting the pre-drag value through the * `[valueRevert]` callback because `[(value)]` can no longer emit during * teardown. * * @example * ```html * *
* ``` */ declare class ForPaneResizer { #private; /** * Axis the divider line runs along. `horizontal` splits content stacked * vertically; `vertical` splits content arranged horizontally. Defaults to * `horizontal`. * * `orientation` describes the *separator line*; the resize axis runs * perpendicular to it. APG: a horizontal pane stack uses a vertical * separator, and arrow keys move along the resize axis. */ readonly orientation: _angular_core.InputSignal<"horizontal" | "vertical">; /** * Disables the resizer: it drops out of tab order, no keyboard or pointer * mutation fires, and `aria-disabled` / `data-disabled` are reflected. */ readonly disabled: _angular_core.InputSignalWithTransform; /** * Two-way bindable. The current value along the resize axis. Units are * consumer-defined (px, %, fr, rem, …) — the directive treats this as an * opaque number constrained by `min` / `max`. Pointer drag adds raw px * deltas, so use px units when wiring drag directly; keyboard navigation is * unit-agnostic. * * The `model()` change emitter (`(valueChange)`) follows the project-wide * contract: it fires only on internal updates (keyboard, drag), never on * consumer writes via `[(value)]` — observe transitions without binding * back. `(resizing)` carries the same value with a verb-named alias for * one-way wiring. */ readonly value: _angular_core.ModelSignal; /** Lower bound for `value`. Default `0`. */ readonly min: _angular_core.InputSignal; /** Upper bound for `value`. Default `100` (matches a percentage default). */ readonly max: _angular_core.InputSignal; /** Step applied by ArrowKeys along the resize axis. Default `1`. */ readonly step: _angular_core.InputSignal; /** Step applied by `Page Up` / `Page Down`. Default `10`. */ readonly largeStep: _angular_core.InputSignal; /** * Optional human-readable value for `aria-valuetext`. Use when the bare * number is not meaningful to AT (e.g. `"30 percent of viewport"`). When * `null`, AT reads `aria-valuenow`. */ readonly valueText: _angular_core.InputSignal; /** * Space-separated list of element ids the resizer splits. Surfaces as * `aria-controls`. Recommended per APG so AT can relate the resizer to the * panes it affects. */ readonly controls: _angular_core.InputSignal; /** * Opt-in `Enter` (and `Space`) toggle: collapses the value to `min`, and on * the next press restores the last size the resizer itself settled on above * `min` — whether that came from a pointer drag, a keyboard burst, or a * previous collapse. It falls back to `max` only when no such size exists * yet (nothing above `min` has ever been committed). APG-optional behaviour * for resizers that back a collapsible pane. Off by default — enabling it * changes the meaning of `Enter`. */ readonly collapsible: _angular_core.InputSignalWithTransform; /** * Reading direction. RTL inverts ArrowLeft / ArrowRight on a vertical * separator (horizontal pane stack) and the horizontal axis of pointer * drag. When unset (default `null`), the inherited ambient direction is * resolved from the nearest ancestor carrying a `dir` attribute (or * ``), defaulting to `'ltr'`. An explicit `[dir]` always wins and * the resolved value is reflected to the host `dir` attribute. */ readonly _dirInput: _angular_core.InputSignal; readonly dir: _angular_core.Signal; /** * `touch-action` for the divider: capture the resize axis so a finger drag * across it can't be stolen by page scrolling (which would fire * `pointercancel` mid-resize), while freeing the perpendicular axis for * scrolling. A `vertical` separator resizes along x (`pan-y`); a `horizontal` * separator resizes along y (`pan-x`). Suppressed while disabled (no drag to * protect). */ readonly touchAction: _angular_core.Signal; /** * Verb-named alias for the model change emitter. Fires on every value * mutation (keyboard step, pointer-move tick). Emits the same value as * `(valueChange)`; pick one or the other based on whether you want * two-way binding (`[(value)]`) or one-shot observation. */ readonly resizing: _angular_core.OutputEmitterRef; /** * Fires once at the end of a resize burst — when the user releases the * pointer (or it is cancelled), releases an arrow / page key, or the burst * ends because focus left the divider before the key was released * (Tab-away). Useful for persisting the final size after a drag, where * `(resizing)` may fire 60+ times per second. */ readonly resizeCommit: _angular_core.OutputEmitterRef; /** * Teardown-only revert channel. Called with the pre-drag value when the resizer is * destroyed mid-drag (the pane layout is unmounted while the pointer is still down), * so the transient drag value never survives as the consumer's persisted size. On * every other revert path (`Escape`, `pointercancel`) the pre-drag value arrives * through `[(value)]` / `(resizing)` as usual and this callback does not fire. * * Bound as a function reference (`[valueRevert]="onRevert"`), not as an event binding: * the `[(value)]` model — like `(resizing)` and every other `output()` here — is * already destroyed when the unmount revert happens, so an emitter-based channel * cannot deliver it. */ readonly valueRevert: _angular_core.InputSignal<((value: number) => void) | undefined>; constructor(); protected onKeyDown(event: KeyboardEvent): void; protected onKeyUp(_event: KeyboardEvent): void; protected onBlur(): void; static ɵfac: _angular_core.ɵɵFactoryDeclaration; static ɵdir: _angular_core.ɵɵDirectiveDeclaration; } export { ForPaneResizer };