Wardic: its internal types

Interfaces

Animate()

animate's two forms (Motion's animate, as useAnimate gives it): a subject to values, or a sequence. Each an Effect for a Command, succeeding once the animation ends with whether it landed, failing with AnimationFailed when nothing finds anything to animate, and stopped by its fiber's interruption.

Call Signature

Animate(
   subject, 
   values, 
   options?
): Effect<WardicAnimationEnd, AnimationFailed, Wardic>;

An Imperative animation of subject: an element, a selector resolved under options.scope's element, else the w.Provider() element, else the document, or a list of elements, to values on options' transition. A Wardic element animates through its own spine, latest wins, as Motion's; a plain element through a spine of its own. Fails when the subject finds nothing, a scope not mounted included. Wrap it in Command.define, with resources: wardic.resources on the program.

Parameters
subject

WardicAnimationSubject

values

WardicVariant

options?

any

Returns

Effect<WardicAnimationEnd, AnimationFailed, Wardic>

Call Signature

Animate(sequence, options?): Effect<WardicAnimationEnd, AnimationFailed, Wardic>;

A Sequence: its Segments laid out in time, labels and at among them, played as one animation under options. Fails when the whole sequence animates nothing: every Segment of elements found none and no function Segment is in it; a Segment that finds nothing beside ones that do is skipped.

Parameters
sequence

Sequence

options?

any

Returns

Effect<WardicAnimationEnd, AnimationFailed, Wardic>


HandleRef

A Handle as the Wardic service holds it: a mark, so a Command's Effect types no builder.

Properties

[HANDLE]
readonly [HANDLE]: true;

Scoped

What a Command's animation options carry on Foldkit: the scope the binding's, onComplete the Effect's success, so neither reaches dom.

Properties

onComplete?
readonly onComplete?: undefined;
scope?
readonly scope?: AnimationScope;

Type Aliases

Attributes

type Attributes<Message> = ReadonlyArray<
  | Attribute<Message>
  | ChildAttribute
| Attribute>;

What a w.* element takes: Foldkit's attributes and Wardic's.

Type Parameters

Message

Message


Needs

type Needs<F, N, Factory> = N extends Feature.PropFeatureNames<F> ? Factory : Feature.NeedsFeature<N>;

A Feature's attribute factory on a builder whose Handle has Features F (ADR-0071 Amendment (#516); #793, Q11): the factory when F names the Feature N; else what names the missing one, so calling it is a type error reading NeedsFeature<"hover">.

Type Parameters

F

F

N

N extends Feature.PropFeature

Factory

Factory