- Name
reason- Kind
- property
- Type
ResizableReason- Requirement
- required
DocsAPI referenceUI machinesresizable
resizable machine
The public state machine contract for @grassroot/ui-machines/resizable. The machine owns behaviour; the matching headless layer owns composition.
@grassroot/ui-machines/resizable
Package
Service example
resizable.tsts
import { createService } from "@grassroot/statechart";import { resizableMachine } from "@grassroot/ui-machines/resizable"; const service = createService(resizableMachine, { input: {} });service.start();service.send({ type: "…" });service.stop();10 of 10
Exports
ResizableCommand
typeResizableCommandts
type ResizableCommand = CommandObject & { readonly type: "RESIZE_REQUEST"; readonly size: number; readonly reason: ResizableReason;};Name
Kind
Type
Requirement
reasonproperty
ResizableReasonrequired
sizeproperty
numberrequired
typeproperty
stringrequired
- Name
size- Kind
- property
- Type
number- Requirement
- required
- Name
type- Kind
- property
- Type
string- Requirement
- required
ResizableContext
typeResizableContextts
type ResizableContext = { readonly size: number; readonly mode: BindingMode;};Name
Kind
Type
Requirement
modeproperty
BindingModerequired
sizeproperty
numberrequired
- Name
mode- Kind
- property
- Type
BindingMode- Requirement
- required
- Name
size- Kind
- property
- Type
number- Requirement
- required
ResizableDiagnosticCodes
valueResizableDiagnosticCodests
export declare const ResizableDiagnosticCodes: readonly DiagnosticCatalogueEntry[];ResizableEvent
typeResizableEventts
type ResizableEvent = { readonly type: "RESIZE"; readonly value: number; readonly reason: ResizableReason;} | { readonly type: "NUDGE"; readonly direction: -1 | 1; readonly reason: ResizableReason;} | { readonly type: "HOME"; readonly reason: ResizableReason;} | { readonly type: "END"; readonly reason: ResizableReason;} | { readonly type: "RESET";};ResizableInput
typeResizableInputts
type ResizableInput = { readonly value?: number; readonly defaultSize?: number; readonly minSize?: number; readonly step?: number; readonly direction?: "horizontal" | "vertical";};Name
Kind
Type
Requirement
defaultSizeproperty
numberoptional
directionproperty
"horizontal" | "vertical"optional
minSizeproperty
numberoptional
stepproperty
numberoptional
valueproperty
numberoptional
- Name
defaultSize- Kind
- property
- Type
number- Requirement
- optional
- Name
direction- Kind
- property
- Type
"horizontal" | "vertical"- Requirement
- optional
- Name
minSize- Kind
- property
- Type
number- Requirement
- optional
- Name
step- Kind
- property
- Type
number- Requirement
- optional
- Name
value- Kind
- property
- Type
number- Requirement
- optional
resizableMachine
valueresizableMachinets
export declare const resizableMachine: Machine<ResizableInput, "ready", ResizableContext, ResizableEvent, ResizableCommand>;ResizableReason
typeResizableReasonts
type ResizableReason = "pointer" | "keyboard" | "programmatic";resizableReplaySequence
valueresizableReplaySequencets
export declare const resizableReplaySequence: readonly ResizableEvent[];resizableSelectors
valueresizableSelectorsts
export declare const resizableSelectors: { size: (snapshot: ResizableSnapshot) => number;};Name
Kind
Type
Requirement
sizeproperty
(snapshot: ResizableSnapshot) => numberrequired
- Name
size- Kind
- property
- Type
(snapshot: ResizableSnapshot) => number- Requirement
- required
ResizableSnapshot
typeResizableSnapshotts
type ResizableSnapshot = Snapshot<"ready", ResizableContext>;