@baleada/logic 0.23.4 → 0.24.0

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.
Files changed (4) hide show
  1. package/lib/index.cjs +2268 -1915
  2. package/lib/index.d.ts +934 -587
  3. package/lib/index.js +2195 -1881
  4. package/package.json +4 -3
package/lib/index.d.ts CHANGED
@@ -1,150 +1,254 @@
1
1
  import { getStroke, StrokeOptions } from 'perfect-freehand';
2
2
  import * as ky_distribution_types_ky from 'ky/distribution/types/ky';
3
- import ky, { Options } from 'ky';
4
- import { Config, DOMPurifyI } from 'dompurify';
5
- import { FullOptions, MatchData, Searcher } from 'fast-fuzzy';
6
- import { Options as Options$1 } from '@sindresorhus/slugify';
3
+ import ky, { Options as Options$1 } from 'ky';
7
4
  import { ClassValue } from 'clsx';
5
+ import { FullOptions, sortKind, MatchData } from 'fast-fuzzy';
6
+ import { Config } from 'dompurify';
7
+ import { Options } from '@sindresorhus/slugify';
8
8
 
9
- type AnimateableKeyframe = {
10
- progress: number;
11
- properties: {
12
- [key: string]: number | string | any[];
9
+ type AnyTransform<Transformed> = (param: any) => Transformed;
10
+ /**
11
+ * [Docs](https://baleada.dev/docs/logic/pipes/clone)
12
+ */
13
+ declare function createClone<Any>(): AnyTransform<Any>;
14
+ /**
15
+ * [Docs](https://baleada.dev/docs/logic/pipes/deep-equal)
16
+ */
17
+ declare function createDeepEqual(compared: any): AnyTransform<boolean>;
18
+ /**
19
+ * [Docs](https://baleada.dev/docs/logic/pipes/equal)
20
+ */
21
+ declare function createEqual(compared: any): AnyTransform<boolean>;
22
+
23
+ type ArrayTransform<Item, Transformed> = (array: Item[]) => Transformed;
24
+ /**
25
+ * [Docs](https://baleada.dev/docs/logic/pipes/concat)
26
+ */
27
+ declare function createConcat<Item>(...arrays: Item[][]): ArrayTransform<Item, Item[]>;
28
+ /**
29
+ * [Docs](https://baleada.dev/docs/logic/pipes/filter)
30
+ */
31
+ declare function createFilter<Item>(predicate: (item: Item, index: number) => boolean): ArrayTransform<Item, Item[]>;
32
+ /**
33
+ * [Docs](https://baleada.dev/docs/logic/pipes/insert)
34
+ */
35
+ declare function createInsert<Item>(item: Item, index: number): ArrayTransform<Item, Item[]>;
36
+ /**
37
+ * [Docs](https://baleada.dev/docs/logic/pipes/map)
38
+ */
39
+ declare function createMap<Item, Transformed = Item>(transform: (item: Item, index: number) => Transformed): ArrayTransform<Item, Transformed[]>;
40
+ /**
41
+ * [Docs](https://baleada.dev/docs/logic/pipes/reduce)
42
+ */
43
+ declare function createReduce<Item, Accumulator>(accumulate: (accumulator: Accumulator, item: Item, index: number) => Accumulator, initialValue?: Accumulator): (array: Item[]) => Accumulator;
44
+ /**
45
+ * [Docs](https://baleada.dev/docs/logic/pipes/remove)
46
+ */
47
+ declare function createRemove<Item>(index: number): ArrayTransform<Item, Item[]>;
48
+ /**
49
+ * [Docs](https://baleada.dev/docs/logic/pipes/reorder)
50
+ */
51
+ declare function createReorder<Item>(from: {
52
+ start: number;
53
+ itemCount: number;
54
+ } | number, to: number): ArrayTransform<Item, Item[]>;
55
+ /**
56
+ * [Docs](https://baleada.dev/docs/logic/pipes/replace)
57
+ */
58
+ declare function createReplace<Item>(index: number, replacement: Item): ArrayTransform<Item, Item[]>;
59
+ /**
60
+ * [Docs](https://baleada.dev/docs/logic/pipes/reverse)
61
+ */
62
+ declare function createReverse<Item>(): ArrayTransform<Item, Item[]>;
63
+ /**
64
+ * [Docs](https://baleada.dev/docs/logic/pipes/slice)
65
+ */
66
+ declare function createSlice<Item>(from: number, to?: number): ArrayTransform<Item, Item[]>;
67
+ /**
68
+ * [Docs](https://baleada.dev/docs/logic/pipes/shuffle)
69
+ */
70
+ declare function createShuffle<Item>(): ArrayTransform<Item, Item[]>;
71
+ /**
72
+ * [Docs](https://baleada.dev/docs/logic/pipes/sort)
73
+ */
74
+ declare function createSort<Item>(compare?: (itemA: Item, itemB: Item) => number): ArrayTransform<Item, Item[]>;
75
+ /**
76
+ * [Docs](https://baleada.dev/docs/logic/pipes/swap)
77
+ */
78
+ declare function createSwap<Item>(item1Index: number, item2Index: number): ArrayTransform<Item, Item[]>;
79
+ /**
80
+ * [Docs](https://baleada.dev/docs/logic/pipes/unique)
81
+ */
82
+ declare function createUnique<Item>(): ArrayTransform<Item, Item[]>;
83
+
84
+ type ArrayAsyncTransform<Item, Transformed> = (array: Item[]) => Promise<Transformed>;
85
+ /**
86
+ * [Docs](https://baleada.dev/docs/logic/pipes/filter-async)
87
+ */
88
+ declare function createFilterAsync<Item>(predicate: (item: Item, index: number) => Promise<boolean>): ArrayAsyncTransform<Item, Item[]>;
89
+ /**
90
+ * [Docs](https://baleada.dev/docs/logic/pipes/find-async)
91
+ */
92
+ declare function createFindAsync<Item>(predicate: (item: Item, index: number) => Promise<boolean>): ArrayAsyncTransform<Item, Item | undefined>;
93
+ /**
94
+ * [Docs](https://baleada.dev/docs/logic/pipes/find-index-async)
95
+ */
96
+ declare function createFindIndexAsync<Item>(predicate: (item: Item, index: number) => Promise<boolean>): ArrayAsyncTransform<Item, number>;
97
+ /**
98
+ * [Docs](https://baleada.dev/docs/logic/pipes/map-async)
99
+ */
100
+ declare function createMapAsync<Item, Mapped>(transform: (item: Item, index: number) => Promise<Mapped>): ArrayAsyncTransform<Item, Mapped[]>;
101
+ /**
102
+ * [Docs](https://baleada.dev/docs/logic/pipes/reduce-async)
103
+ */
104
+ declare function createReduceAsync<Item, Accumulator>(accumulate: (accumulator: Accumulator, item: Item, index: number) => Promise<Accumulator>, initialValue?: Accumulator): (array: Item[]) => Promise<Accumulator>;
105
+
106
+ type AssociativeArrayEffect<Key, Value> = (associativeArray: AssociativeArray<Key, Value>) => AssociativeArray<Key, Value>;
107
+ /**
108
+ * [Docs](https://baleada.dev/docs/logic/links/associative-array-set)
109
+ */
110
+ declare function createSet$1<Key extends any, Value extends any>(key: Key, value: Value, options?: WithPredicateKey): AssociativeArrayEffect<Key, Value>;
111
+ /**
112
+ * [Docs](https://baleada.dev/docs/logic/links/associative-array-clear)
113
+ */
114
+ declare function createClear$1<Key extends any, Value extends any>(): AssociativeArrayEffect<Key, Value>;
115
+ /**
116
+ * [Docs](https://baleada.dev/docs/logic/links/associative-array-delete)
117
+ */
118
+ declare function createDelete$1<Key extends any>(key: Key, options?: WithPredicateKey): AssociativeArrayEffect<Key, any>;
119
+
120
+ type AssociativeArray<Key, Value> = [Key, Value][];
121
+
122
+ type KeyStatusCode = string;
123
+
124
+ type CreateAliasesOptions = {
125
+ toLonghand?: (shorthand: string) => string;
126
+ };
127
+
128
+ type CreateKeycomboDownOptions = CreateAliasesOptions & {
129
+ toCode?: (alias: string) => KeyStatusCode;
130
+ };
131
+
132
+ type CreateKeycomboMatchOptions$1 = CreateKeycomboDownOptions & {
133
+ toAliases?: (code: KeyStatusCode) => string[];
134
+ };
135
+
136
+ type KeyboardEventDescriptor = {
137
+ code: string;
138
+ shiftKey?: boolean;
139
+ altKey?: boolean;
140
+ ctrlKey?: boolean;
141
+ metaKey?: boolean;
142
+ };
143
+
144
+ type Direction = 'up' | 'upRight' | 'right' | 'downRight' | 'down' | 'downLeft' | 'left' | 'upLeft';
145
+
146
+ type HookApi<Type extends ListenableSupportedType, Metadata extends Record<any, any>> = {
147
+ status: RecognizeableStatus;
148
+ metadata: Metadata;
149
+ sequence: ListenEffectParam<Type>[];
150
+ };
151
+
152
+ type PolarCoordinates = {
153
+ distance: number;
154
+ angle: {
155
+ radians: number;
156
+ degrees: number;
13
157
  };
14
- timing?: AnimateableTiming;
15
158
  };
16
- type AnimateableOptions = {
17
- duration?: number;
18
- timing?: AnimateableTiming;
19
- iterations?: number | true;
20
- alternates?: boolean;
159
+
160
+ type KeyboardTimeMetadata = {
161
+ times: {
162
+ start: number;
163
+ end: number;
164
+ };
165
+ duration: number;
21
166
  };
22
- type AnimateableTiming = [number, number, number, number];
23
- type AnimateFrameEffect = (frame?: AnimateFrame) => any;
24
- type AnimateFrame = {
25
- properties: {
26
- [key: string]: {
27
- progress: {
28
- time: number;
29
- animation: number;
30
- };
31
- interpolated: number | string | any[];
167
+
168
+ type PointerStartMetadata = {
169
+ points: {
170
+ start: {
171
+ x: number;
172
+ y: number;
173
+ };
174
+ end: {
175
+ x: number;
176
+ y: number;
32
177
  };
33
178
  };
34
- timestamp: number;
35
179
  };
36
- type AnimateOptions = {
37
- interpolate?: {
38
- colorModel?: 'rgb' | 'hsl' | 'lab' | 'lch' | 'xyz';
180
+
181
+ type PointerTimeMetadata = {
182
+ times: {
183
+ start: number;
184
+ end: number;
39
185
  };
186
+ duration: number;
187
+ velocity: number;
40
188
  };
41
- type AnimateableStatus = 'ready' | 'playing' | 'played' | 'reversing' | 'reversed' | 'paused' | 'sought' | 'stopped';
42
- declare class Animateable {
43
- private initialDuration;
44
- private iterationLimit;
45
- private alternates;
46
- private controlPoints;
47
- private reversedControlPoints;
48
- private toAnimationProgress;
49
- private reversedToAnimationProgress;
50
- private playCache;
51
- private reverseCache;
52
- private pauseCache;
53
- private seekCache;
54
- private alternateCache;
55
- private visibilitychange;
56
- private getEaseables;
57
- private getReversedEaseables;
58
- constructor(keyframes: AnimateableKeyframe[], options?: AnimateableOptions);
59
- private computedStatus;
60
- private ready;
61
- private computedTime;
62
- private resetTime;
63
- private computedProgress;
64
- private resetProgress;
65
- private computedIterations;
66
- private resetIterations;
67
- get keyframes(): AnimateableKeyframe[];
68
- set keyframes(keyframes: AnimateableKeyframe[]);
69
- get playbackRate(): number;
70
- set playbackRate(playbackRate: number);
71
- get status(): AnimateableStatus;
72
- get iterations(): number;
73
- get request(): number;
74
- get time(): {
75
- elapsed: number;
76
- remaining: number;
189
+
190
+ type PointerMoveMetadata = {
191
+ distance: {
192
+ straight: {
193
+ fromStart: PolarCoordinates['distance'];
194
+ fromPrevious: PolarCoordinates['distance'];
195
+ };
196
+ horizontal: {
197
+ fromStart: PolarCoordinates['distance'];
198
+ fromPrevious: PolarCoordinates['distance'];
199
+ };
200
+ vertical: {
201
+ fromStart: PolarCoordinates['distance'];
202
+ fromPrevious: PolarCoordinates['distance'];
203
+ };
77
204
  };
78
- get progress(): {
79
- time: number;
80
- animation: number;
205
+ angle: {
206
+ fromPrevious: PolarCoordinates['angle'];
207
+ fromStart: PolarCoordinates['angle'];
81
208
  };
82
- private computedKeyframes;
83
- private reversedKeyframes;
84
- private properties;
85
- private easeables;
86
- private reversedEaseables;
87
- setKeyframes(keyframes: AnimateableKeyframe[]): this;
88
- private computedPlaybackRate;
89
- private duration;
90
- private totalTimeInvisible;
91
- setPlaybackRate(playbackRate: number): this;
92
- play(effect: AnimateFrameEffect, options?: AnimateOptions): this;
93
- private playing;
94
- private played;
95
- reverse(effect: AnimateFrameEffect, options?: AnimateOptions): this;
96
- private reversing;
97
- private reversed;
98
- private invisibleAt;
99
- private listenForVisibilitychange;
100
- private computedRequest;
101
- private createAnimate;
102
- private startTime;
103
- private setStartTimeAndStatus;
104
- private getToAnimationProgress;
105
- private getFrame;
106
- private recurse;
107
- pause(): this;
108
- private paused;
109
- private cancelAnimate;
110
- seek(timeProgress: number, options?: {
111
- effect?: AnimateFrameEffect;
112
- } & AnimateOptions): this;
113
- private sought;
114
- restart(): this;
115
- stop(): this;
116
- private stopped;
117
- }
118
- declare const linear: AnimateableKeyframe['timing'];
119
- declare const materialStandard: AnimateableKeyframe['timing'];
120
- declare const materialDecelerated: AnimateableKeyframe['timing'];
121
- declare const materialAccelerated: AnimateableKeyframe['timing'];
122
- declare const verouEase: AnimateableKeyframe['timing'];
123
- declare const verouEaseIn: AnimateableKeyframe['timing'];
124
- declare const verouEaseOut: AnimateableKeyframe['timing'];
125
- declare const verouEaseInOut: AnimateableKeyframe['timing'];
126
- declare const easingsNetInSine: AnimateableKeyframe['timing'];
127
- declare const easingsNetOutSine: AnimateableKeyframe['timing'];
128
- declare const easingsNetInOutSine: AnimateableKeyframe['timing'];
129
- declare const easingsNetInQuad: AnimateableKeyframe['timing'];
130
- declare const easingsNetOutQuad: AnimateableKeyframe['timing'];
131
- declare const easingsNetInOutQuad: AnimateableKeyframe['timing'];
132
- declare const easingsNetInCubic: AnimateableKeyframe['timing'];
133
- declare const easingsNetOutCubic: AnimateableKeyframe['timing'];
134
- declare const easingsNetInOutCubic: AnimateableKeyframe['timing'];
135
- declare const easingsNetInQuart: AnimateableKeyframe['timing'];
136
- declare const easingsNetInQuint: AnimateableKeyframe['timing'];
137
- declare const easingsNetOutQuint: AnimateableKeyframe['timing'];
138
- declare const easingsNetInOutQuint: AnimateableKeyframe['timing'];
139
- declare const easingsNetInExpo: AnimateableKeyframe['timing'];
140
- declare const easingsNetOutExpo: AnimateableKeyframe['timing'];
141
- declare const easingsNetInOutExpo: AnimateableKeyframe['timing'];
142
- declare const easingsNetInCirc: AnimateableKeyframe['timing'];
143
- declare const easingsNetOutCirc: AnimateableKeyframe['timing'];
144
- declare const easingsNetInOutCirc: AnimateableKeyframe['timing'];
145
- declare const easingsNetInBack: AnimateableKeyframe['timing'];
146
- declare const easingsNetOutBack: AnimateableKeyframe['timing'];
147
- declare const easingsNetInOutBack: AnimateableKeyframe['timing'];
209
+ direction: {
210
+ fromPrevious: Direction;
211
+ fromStart: Direction;
212
+ };
213
+ };
214
+
215
+ type Graph<Id extends string, StateValue> = {
216
+ nodes: GraphNode<Id>[];
217
+ edges: GraphEdge<Id, StateValue>[];
218
+ };
219
+ type GraphNode<Id extends string> = Id;
220
+ type GraphEdge<Id extends string, StateValue> = {
221
+ from: Id;
222
+ to: Id;
223
+ predicateShouldTraverse: (state: GraphState<Id, StateValue>) => boolean;
224
+ };
225
+ type GraphState<Id extends string, StateValue> = Record<Id, {
226
+ status: 'set' | 'unset';
227
+ value?: StateValue | undefined;
228
+ }>;
229
+ type GraphPath<Id extends string> = GraphNode<Id>[];
230
+ type GraphStep<Id extends string, StateValue> = {
231
+ state: GraphState<Id, StateValue>;
232
+ path: GraphPath<Id>;
233
+ };
234
+ type GraphCommonAncestor<Id extends string> = {
235
+ node: GraphNode<Id>;
236
+ distances: Record<GraphNode<Id>, number>;
237
+ };
238
+ type GraphTreeNode<Id extends string> = {
239
+ node: GraphNode<Id>;
240
+ children: GraphTreeNode<Id>[];
241
+ };
242
+ type GraphTree<Id extends string> = GraphTreeNode<Id>[];
243
+ type GraphAsync<Id extends string, StateValue> = {
244
+ nodes: GraphNode<Id>[];
245
+ edges: GraphAsyncEdge<Id, StateValue>[];
246
+ };
247
+ type GraphAsyncEdge<Id extends string, StateValue> = {
248
+ from: Id;
249
+ to: Id;
250
+ predicateShouldTraverse: (state: GraphState<Id, StateValue>) => Promise<boolean>;
251
+ };
148
252
 
149
253
  type RecognizeableOptions<Type extends ListenableSupportedType, Metadata extends Record<any, any>> = {
150
254
  maxSequenceLength?: true | number;
@@ -161,12 +265,18 @@ type RecognizeableEffectApi<Type extends ListenableSupportedType, Metadata exten
161
265
  denied: () => void;
162
266
  getSequence: () => ListenEffectParam<Type>[];
163
267
  pushSequence: (sequenceItem: ListenEffectParam<Type>) => void;
164
- onRecognized: (sequenceItem: ListenEffectParam<Type>) => any;
268
+ listenInjection: RecognizeOptions<Type>['listenInjection'];
165
269
  };
166
270
  type RecognizeableStatus = 'recognized' | 'recognizing' | 'denied' | 'ready';
167
271
  type RecognizeOptions<Type extends ListenableSupportedType> = {
168
- onRecognized?: (sequenceItem: ListenEffectParam<Type>) => any;
272
+ listenInjection?: {
273
+ effect: (sequenceItem: ListenEffectParam<Type>) => any;
274
+ optionsByType: Record<Type, ListenOptions<Type>>;
275
+ };
169
276
  };
277
+ /**
278
+ * [Docs](https://baleada.dev/docs/logic/classes/recognizeable)
279
+ */
170
280
  declare class Recognizeable<Type extends ListenableSupportedType, Metadata extends Record<any, any>> {
171
281
  private maxSequenceLength;
172
282
  private effects;
@@ -184,7 +294,7 @@ declare class Recognizeable<Type extends ListenableSupportedType, Metadata exten
184
294
  get metadata(): Metadata;
185
295
  private computedSequence;
186
296
  setSequence(sequence: ListenEffectParam<Type>[]): this;
187
- recognize(sequenceItem: ListenEffectParam<Type>, { onRecognized }?: RecognizeOptions<Type>): this;
297
+ recognize(sequenceItem: ListenEffectParam<Type>, options?: RecognizeOptions<Type>): this;
188
298
  private recognizing;
189
299
  private toType;
190
300
  }
@@ -202,7 +312,7 @@ type ListenableOptions<Type extends ListenableSupportedType, RecognizeableMetada
202
312
  recognizeable?: RecognizeableOptions<Type, RecognizeableMetadata>;
203
313
  };
204
314
  type ListenEffect<Type extends ListenableSupportedType> = Type extends 'intersect' ? (entries: ListenEffectParam<Type>) => any : Type extends 'mutate' ? (records: ListenEffectParam<Type>) => any : Type extends 'resize' ? (entries: ListenEffectParam<Type>) => any : Type extends 'idle' ? (deadline: ListenEffectParam<Type>) => any : Type extends ('message' | 'messageerror') ? (event: MessageEvent) => any : Type extends ListenableMediaQuery ? (event: ListenEffectParam<Type>) => any : Type extends (ListenableLeftClick | ListenableRightClick) ? (event: ListenEffectParam<Type>) => any : Type extends (ListenablePointer) ? (event: ListenEffectParam<Type>) => any : Type extends ('keydown' | 'keyup') ? (event: ListenEffectParam<Type>) => any : Type extends keyof Omit<HTMLElementEventMap, 'resize'> ? (event: ListenEffectParam<Type>) => any : Type extends keyof Omit<DocumentEventMap, 'resize'> ? (event: ListenEffectParam<Type>) => any : never;
205
- type ListenEffectParam<Type extends ListenableSupportedType> = Type extends 'intersect' ? IntersectionObserverEntry[] : Type extends 'mutate' ? MutationRecord[] : Type extends 'resize' ? ResizeObserverEntry[] : Type extends 'idle' ? IdleDeadline : Type extends ListenableMediaQuery ? MediaQueryListEvent : Type extends ListenableRightClick ? MouseEvent : Type extends keyof Omit<HTMLElementEventMap, 'resize'> ? HTMLElementEventMap[Type] : Type extends keyof Omit<DocumentEventMap, 'resize'> ? DocumentEventMap[Type] : never;
315
+ type ListenEffectParam<Type extends ListenableSupportedType> = Type extends 'intersect' ? IntersectionObserverEntry[] : Type extends 'mutate' ? MutationRecord[] : Type extends 'resize' ? ResizeObserverEntry[] : Type extends 'idle' ? IdleDeadline : Type extends ('message' | 'messageerror') ? MessageEvent : Type extends ListenableMediaQuery ? MediaQueryListEvent : Type extends ListenableRightClick ? MouseEvent : Type extends keyof Omit<HTMLElementEventMap, 'resize'> ? HTMLElementEventMap[Type] : Type extends keyof Omit<DocumentEventMap, 'resize'> ? DocumentEventMap[Type] : never;
206
316
  type ListenOptions<Type extends ListenableSupportedType> = Type extends 'intersect' ? {
207
317
  observer?: IntersectionObserverInit;
208
318
  } & ObservationListenOptions : Type extends 'mutate' ? {
@@ -256,6 +366,9 @@ type ListenableActiveEventId<Type extends ListenableSupportedEventType> = [
256
366
  optionsOrUseCapture: AddEventListenerOptions | boolean
257
367
  ];
258
368
  type ListenableStatus = 'ready' | 'listening' | 'stopped';
369
+ /**
370
+ * [Docs](https://baleada.dev/docs/logic/classes/listenable)
371
+ */
259
372
  declare class Listenable<Type extends ListenableSupportedType, RecognizeableMetadata extends Record<any, any> = Record<any, any>> {
260
373
  private computedRecognizeable;
261
374
  private recognizeableEffectsKeys;
@@ -263,36 +376,527 @@ declare class Listenable<Type extends ListenableSupportedType, RecognizeableMeta
263
376
  constructor(type: Type, options?: ListenableOptions<Type, RecognizeableMetadata>);
264
377
  private computedStatus;
265
378
  private ready;
266
- get type(): string;
267
- set type(type: string);
268
- get status(): ListenableStatus;
269
- get active(): Set<ListenableActive<Type, RecognizeableMetadata>>;
270
- get recognizeable(): Recognizeable<Type, RecognizeableMetadata>;
271
- private computedType;
272
- private implementation;
273
- setType(type: string): this;
274
- listen(effect: ListenEffect<Type>, options?: ListenOptions<Type>): this;
275
- private intersectionListen;
276
- private mutationListen;
277
- private resizeListen;
278
- private mediaQueryListen;
279
- private idleListen;
280
- private messageListen;
281
- private recognizeableListen;
282
- private documentEventListen;
283
- private eventListen;
284
- private addEventListeners;
285
- private listening;
286
- stop(options?: {
287
- target?: Element | Document | (Window & typeof globalThis);
288
- }): this;
379
+ get type(): string;
380
+ set type(type: string);
381
+ get status(): ListenableStatus;
382
+ get active(): Set<ListenableActive<Type, RecognizeableMetadata>>;
383
+ get recognizeable(): Recognizeable<Type, RecognizeableMetadata>;
384
+ private computedType;
385
+ private implementation;
386
+ setType(type: string): this;
387
+ listen(effect: ListenEffect<Type>, options?: ListenOptions<Type>): this;
388
+ private intersectionListen;
389
+ private mutationListen;
390
+ private resizeListen;
391
+ private mediaQueryListen;
392
+ private idleListen;
393
+ private messageListen;
394
+ private recognizeableListen;
395
+ private documentEventListen;
396
+ private eventListen;
397
+ private addEventListeners;
398
+ private listening;
399
+ stop(options?: {
400
+ target?: Element | Document | (Window & typeof globalThis);
401
+ }): this;
402
+ private stopped;
403
+ private getDefaultListenOptions;
404
+ }
405
+
406
+ type AssociativeArrayTransform<Key, Value, Transformed> = (associativeArray: AssociativeArray<Key, Value>) => Transformed;
407
+ type WithPredicateKey = {
408
+ predicateKey?: (candidate: any) => boolean;
409
+ };
410
+ /**
411
+ * [Docs](https://baleada.dev/docs/logic/pipes/associative-array-value)
412
+ */
413
+ declare function createValue$1<Key extends any, Value extends any>(key: Key, options?: WithPredicateKey): AssociativeArrayTransform<Key, Value, Value | undefined>;
414
+ /**
415
+ * [Docs](https://baleada.dev/docs/logic/pipes/associative-array-has)
416
+ */
417
+ declare function createHas$1<Key extends any>(key: Key, options?: WithPredicateKey): AssociativeArrayTransform<Key, any, boolean>;
418
+ /**
419
+ * [Docs](https://baleada.dev/docs/logic/pipes/associative-array-keys)
420
+ */
421
+ declare function createKeys$1<Key extends any>(): AssociativeArrayTransform<Key, any, Key[]>;
422
+ /**
423
+ * [Docs](https://baleada.dev/docs/logic/pipes/associative-array-values)
424
+ */
425
+ declare function createValues<Value extends any>(): AssociativeArrayTransform<any, Value, Value[]>;
426
+
427
+ type ManyTransform<Parameter, Transformed> = (...params: Parameter[]) => Transformed;
428
+
429
+ /**
430
+ * [Docs](https://baleada.dev/docs/logic/pipes/list)
431
+ */
432
+ declare function createList(): ManyTransform<ClassValue, string>;
433
+
434
+ type MixColorTransform<Transformed> = (mixColor: MixColor) => Transformed;
435
+ type ColorInterpolationMethod = RectangularColorSpace | PolarColorSpace | `${PolarColorSpace} ${HueInterpolationMethod}`;
436
+ type RectangularColorSpace = 'srgb' | 'srgb-linear' | 'lab' | 'oklab' | 'xyz' | 'xyz-d50' | 'xyz-d65';
437
+ type PolarColorSpace = 'hsl' | 'hwb' | 'lch' | 'oklch';
438
+ type HueInterpolationMethod = 'shorter' | 'longer' | 'increasing' | 'decreasing';
439
+ type CreateMixOptions = {
440
+ method?: ColorInterpolationMethod;
441
+ tag?: string;
442
+ getParent?: () => HTMLElement;
443
+ };
444
+ type MixColor = `${string} ${number}%` | string;
445
+ /**
446
+ * [Docs](https://baleada.dev/docs/logic/pipes/mix)
447
+ */
448
+ declare function createMix(color2: MixColor, options?: CreateMixOptions): MixColorTransform<string>;
449
+
450
+ type GraphStateTransform<Id extends string, Metadata, Transformed> = (state: GraphState<Id, Metadata>) => Transformed;
451
+
452
+ type GeneratorTransform<Parameter, Yielded> = (param: Parameter) => Generator<Yielded>;
453
+
454
+ type GraphNodeTransform<Id extends string, Transformed> = (node: GraphNode<Id>) => Transformed;
455
+ type GraphNodeGeneratorTransform<Id extends string, Yielded> = GeneratorTransform<GraphNode<Id>, Yielded>;
456
+ type GraphNodeTupleTransform<Id extends string, Transformed> = (...nodes: [GraphNode<Id>, GraphNode<Id>]) => Transformed;
457
+ type GraphNodeTupleGeneratorTransform<Id extends string, Yielded> = (...nodes: [GraphNode<Id>, GraphNode<Id>]) => Generator<Yielded>;
458
+ /**
459
+ * [Docs](https://baleada.dev/docs/logic/pipes/root)
460
+ */
461
+ declare function createRoot<Id extends string, Metadata, GraphType extends Graph<Id, Metadata> | GraphAsync<Id, Metadata>>(graph: GraphType): GraphNodeTransform<Id, boolean>;
462
+ /**
463
+ * [Docs](https://baleada.dev/docs/logic/pipes/terminal)
464
+ */
465
+ declare function createTerminal<Id extends string, Metadata, GraphType extends Graph<Id, Metadata> | GraphAsync<Id, Metadata>>(graph: GraphType): GraphNodeTransform<Id, boolean>;
466
+ /**
467
+ * [Docs](https://baleada.dev/docs/logic/pipes/children)
468
+ */
469
+ declare function createChildren<Id extends string, Metadata, GraphType extends Graph<Id, Metadata> | GraphAsync<Id, Metadata>>(graph: GraphType): GraphNodeGeneratorTransform<GraphNode<Id>, GraphNode<Id>>;
470
+ /**
471
+ * [Docs](https://baleada.dev/docs/logic/pipes/indegree)
472
+ */
473
+ declare function createIndegree<Id extends string, Metadata, GraphType extends Graph<Id, Metadata> | GraphAsync<Id, Metadata>>(graph: GraphType): GraphNodeTransform<Id, number>;
474
+ /**
475
+ * [Docs](https://baleada.dev/docs/logic/pipes/outdegree)
476
+ */
477
+ declare function createOutdegree<Id extends string, Metadata, GraphType extends Graph<Id, Metadata> | GraphAsync<Id, Metadata>>(graph: GraphType): GraphNodeTransform<Id, number>;
478
+ /**
479
+ * [Docs](https://baleada.dev/docs/logic/pipes/incoming)
480
+ */
481
+ declare function createIncoming<Id extends string, Metadata, GraphType extends Graph<Id, Metadata> | GraphAsync<Id, Metadata>>(graph: GraphType): GraphNodeGeneratorTransform<GraphNode<Id>, GraphType extends GraphAsync<Id, Metadata> ? GraphAsyncEdge<Id, Metadata> : GraphEdge<Id, Metadata>>;
482
+ /**
483
+ * [Docs](https://baleada.dev/docs/logic/pipes/outgoing)
484
+ */
485
+ declare function createOutgoing<Id extends string, Metadata, GraphType extends Graph<Id, Metadata> | GraphAsync<Id, Metadata>>(graph: GraphType): GraphNodeGeneratorTransform<GraphNode<Id>, GraphType extends GraphAsync<Id, Metadata> ? GraphAsyncEdge<Id, Metadata> : GraphEdge<Id, Metadata>>;
486
+ declare function createOnlyChild<Id extends string, Metadata, GraphType extends Graph<Id, Metadata> | GraphAsync<Id, Metadata>>(graph: GraphType): GraphNodeTransform<Id, boolean>;
487
+ /**
488
+ * [Docs](https://baleada.dev/docs/logic/pipes/total-siblings)
489
+ */
490
+ declare function createTotalSiblings<Id extends string, Metadata, GraphType extends Graph<Id, Metadata> | GraphAsync<Id, Metadata>>(graph: GraphType): GraphNodeTransform<Id, number>;
491
+ /**
492
+ * [Docs](https://baleada.dev/docs/logic/pipes/siblings)
493
+ */
494
+ declare function createSiblings<Id extends string, Metadata, GraphType extends Graph<Id, Metadata> | GraphAsync<Id, Metadata>>(graph: GraphType): GraphNodeGeneratorTransform<GraphNode<Id>, GraphNode<Id>>;
495
+
496
+ type GraphTransform<Id extends string, Metadata, Transformed> = (graph: Graph<Id, Metadata>) => Transformed;
497
+ type GraphGeneratorTransform<Id extends string, Metadata, Yielded> = GeneratorTransform<Graph<Id, Metadata>, Yielded>;
498
+
499
+ type GeneratorAsyncTransform<Parameter, Yielded> = (param: Parameter) => AsyncGenerator<Yielded>;
500
+
501
+ type GraphAsyncTransform<Id extends string, Metadata, Transformed> = (graph: GraphAsync<Id, Metadata>) => Promise<Transformed>;
502
+ type GraphAsyncGeneratorTransform<Id extends string, Metadata, Yielded> = GeneratorTransform<GraphAsync<Id, Metadata>, Yielded>;
503
+ type GraphAsyncGeneratorAsyncTransform<Id extends string, Metadata, Yielded> = GeneratorAsyncTransform<GraphAsync<Id, Metadata>, Yielded>;
504
+
505
+ type CreatePathConfig<Id extends string, Metadata> = {
506
+ predicatePathable: (node: GraphNode<Id>) => boolean;
507
+ toTraversalCandidates: (path: GraphPath<Id>) => Iterable<GraphEdge<Id, Metadata>>;
508
+ };
509
+ /**
510
+ * [Docs](https://baleada.dev/docs/logic/pipes/directed-acyclic-path)
511
+ */
512
+ declare function createPath$2<Id extends string, Metadata>(directedAcyclic: Graph<Id, Metadata>, config: CreatePathConfig<Id, Metadata>): GraphStateTransform<Id, Metadata, GraphPath<Id>>;
513
+
514
+ /**
515
+ * [Docs](https://baleada.dev/docs/logic/pipes/directed-acyclic-layers)
516
+ */
517
+ declare function createLayers$1<Id extends string>(options?: {
518
+ createDepthFirstSteps?: CreateStepsOptions$1<Id>;
519
+ }): GraphGeneratorTransform<Id, any, GraphNode<Id>[]>;
520
+ /**
521
+ * [Docs](https://baleada.dev/docs/logic/pipes/directed-acyclic-tree)
522
+ */
523
+ declare function createTree$2<Id extends string>(options?: {
524
+ createDepthFirstSteps?: CreateStepsOptions$1<Id>;
525
+ }): GraphTransform<Id, any, GraphTree<Id>>;
526
+ type CreateDepthFirstStepsOptions<Id extends string, StateValue = number> = CreateStepsOptions$1<Id> & {
527
+ getSetStateValue?: (api: {
528
+ node: GraphNode<Id>;
529
+ totalChildrenDiscovered: number;
530
+ }) => StateValue;
531
+ };
532
+ /**
533
+ * [Docs](https://baleada.dev/docs/logic/pipes/directed-acyclic-depth-first-steps)
534
+ */
535
+ declare function createDepthFirstSteps$2<Id extends string, StateValue = number>(options?: CreateDepthFirstStepsOptions<Id, StateValue>): GraphGeneratorTransform<Id, StateValue, GraphStep<Id, StateValue>>;
536
+ type CreateStepsOptions$1<Id extends string> = {
537
+ kind?: 'directed acyclic' | 'arborescence';
538
+ root?: GraphNode<Id>;
539
+ };
540
+ /**
541
+ * [Docs](https://baleada.dev/docs/logic/pipes/directed-acyclic-roots)
542
+ */
543
+ declare function createRoots<Id extends string, StateValue, GraphType extends Graph<Id, StateValue> | GraphAsync<Id, StateValue> = Graph<Id, StateValue>>(options?: {
544
+ kind?: 'directed acyclic' | 'arborescence';
545
+ }): (GraphType extends GraphAsync<Id, StateValue> ? GraphAsyncGeneratorTransform<Id, StateValue, GraphNode<Id>> : GraphGeneratorTransform<Id, StateValue, GraphNode<Id>>);
546
+
547
+ /**
548
+ * [Docs](https://baleada.dev/docs/logic/pipes/directed-acyclic-common-ancestors)
549
+ */
550
+ declare function createCommonAncestors$2<Id extends string, Metadata>(directedAcyclic: Graph<Id, Metadata>): GraphNodeTupleGeneratorTransform<Id, GraphCommonAncestor<Id>>;
551
+ /**
552
+ * [Docs](https://baleada.dev/docs/logic/pipes/directed-acyclic-ancestor)
553
+ */
554
+ declare function createAncestor$2<Id extends string, Metadata>(directedAcyclic: Graph<Id, Metadata>): GraphNodeTupleTransform<Id, boolean>;
555
+ /**
556
+ * [Docs](https://baleada.dev/docs/logic/pipes/directed-acyclic-node-depth-first-steps)
557
+ */
558
+ declare function createNodeDepthFirstSteps$2<Id extends string, Metadata>(directedAcyclic: Graph<Id, Metadata>, options?: {
559
+ createDepthFirstSteps?: CreateDepthFirstStepsOptions<Id, Metadata>;
560
+ }): GraphNodeGeneratorTransform<Id, GraphStep<Id, Metadata>>;
561
+
562
+ type CreateStepsOptions<Id extends string> = Pick<CreateStepsOptions$1<Id>, 'kind'> & {
563
+ priorityBranch?: boolean;
564
+ };
565
+ type DecisionTree<Id extends string> = Graph<Id, DecisionTreeStateValue>;
566
+ type DecisionTreeStateValue = boolean;
567
+ declare function createTree$1<Id extends string>(options?: {
568
+ createDepthFirstSteps?: CreateStepsOptions<Id>;
569
+ }): GraphTransform<Id, any, GraphTree<Id>>;
570
+ declare function createCommonAncestors$1<Id extends string>(...params: Parameters<typeof createCommonAncestors$2<Id, DecisionTreeStateValue>>): GraphNodeTupleGeneratorTransform<Id, GraphCommonAncestor<Id>>;
571
+ declare function createAncestor$1<Id extends string>(...params: Parameters<typeof createAncestor$2<Id, DecisionTreeStateValue>>): GraphNodeTupleTransform<Id, boolean>;
572
+ declare function createNodeDepthFirstSteps$1<Id extends string>(decisionTree: DecisionTree<Id>, options?: {
573
+ createDepthFirstSteps?: CreateStepsOptions<Id>;
574
+ }): GraphNodeGeneratorTransform<Id, GraphStep<Id, boolean>>;
575
+ declare function createDepthFirstSteps$1<Id extends string>(options: CreateStepsOptions<Id>): GraphGeneratorTransform<Id, boolean, GraphStep<Id, boolean>>;
576
+ declare function createPath$1<Id extends string>(...params: Parameters<typeof createPath$2<Id, DecisionTreeStateValue>>): GraphStateTransform<Id, boolean, GraphPath<Id>>;
577
+
578
+ /**
579
+ * [Docs](https://baleada.dev/docs/logic/pipes/directed-acyclic-async-layers)
580
+ */
581
+ declare function createLayers<Id extends string>(options?: {
582
+ createDepthFirstSteps?: CreateStepsOptions$1<Id>;
583
+ }): GraphAsyncTransform<Id, any, GraphNode<Id>[][]>;
584
+ /**
585
+ * [Docs](https://baleada.dev/docs/logic/pipes/directed-acyclic-async-tree)
586
+ */
587
+ declare function createTree<Id extends string>(options?: {
588
+ createDepthFirstSteps?: CreateStepsOptions$1<Id>;
589
+ }): GraphAsyncTransform<Id, any, GraphTree<Id>>;
590
+ /**
591
+ * [Docs](https://baleada.dev/docs/logic/pipes/directed-acyclic-async-depth-first-steps)
592
+ */
593
+ declare function createDepthFirstSteps<Id extends string, StateValue = number>(options?: CreateDepthFirstStepsOptions<Id, StateValue>): GraphAsyncGeneratorAsyncTransform<Id, StateValue, GraphStep<Id, StateValue>>;
594
+
595
+ type GraphAsyncNodeGeneratorAsyncTransform<Id extends string, Yielded> = GeneratorAsyncTransform<GraphNode<Id>, Yielded>;
596
+ type GraphAsyncNodeTupleTransform<Id extends string, Transformed> = (...nodes: [GraphNode<Id>, GraphNode<Id>]) => Promise<Transformed>;
597
+ type GraphNodeTupleGeneratorAsyncTransform<Id extends string, Yielded> = (...nodes: [GraphNode<Id>, GraphNode<Id>]) => AsyncGenerator<Yielded>;
598
+
599
+ /**
600
+ * [Docs](https://baleada.dev/docs/logic/pipes/directed-acyclic-common-ancestors)
601
+ */
602
+ declare function createCommonAncestors<Id extends string, Metadata>(directedAcyclicAsync: GraphAsync<Id, Metadata>): GraphNodeTupleGeneratorAsyncTransform<Id, GraphCommonAncestor<Id>>;
603
+ /**
604
+ * [Docs](https://baleada.dev/docs/logic/pipes/Ancestor)
605
+ */
606
+ declare function createAncestor<Id extends string, Metadata>(directedAcyclicAsync: GraphAsync<Id, Metadata>): GraphAsyncNodeTupleTransform<Id, boolean>;
607
+ /**
608
+ * [Docs](https://baleada.dev/docs/logic/pipes/NodeDepthFirstSteps)
609
+ */
610
+ declare function createNodeDepthFirstSteps<Id extends string, Metadata>(directedAcyclicAsync: GraphAsync<Id, Metadata>, options?: {
611
+ createDepthFirstSteps?: CreateDepthFirstStepsOptions<Id, Metadata>;
612
+ }): GraphAsyncNodeGeneratorAsyncTransform<Id, GraphStep<Id, Metadata>>;
613
+
614
+ type GraphAsyncStateTransform<Id extends string, Metadata, Transformed> = (state: GraphState<Id, Metadata>) => Promise<Transformed>;
615
+
616
+ /**
617
+ * [Docs](https://baleada.dev/docs/logic/pipes/directed-acyclic-async-path)
618
+ */
619
+ declare function createPath<Id extends string, Metadata>(directedAcyclicAsync: GraphAsync<Id, Metadata>, config: CreatePathConfig<Id, Metadata>): GraphAsyncStateTransform<Id, Metadata, GraphPath<Id>>;
620
+
621
+ type ElementTransform<El extends HTMLElement, Transformed> = (element: El) => Transformed;
622
+ type CreateFocusableOptions = {
623
+ predicatesElement?: boolean;
624
+ tabbableSelector?: string;
625
+ };
626
+ /**
627
+ * [Docs](https://baleada.dev/docs/logic/pipes/focusable)
628
+ */
629
+ declare function createFocusable(order: 'first' | 'last', options?: CreateFocusableOptions): ElementTransform<HTMLElement, HTMLElement | undefined>;
630
+ /**
631
+ * [Docs](https://baleada.dev/docs/logic/pipes/computed-style)
632
+ */
633
+ declare function createComputedStyle(pseudoElement?: string): ElementTransform<HTMLElement, CSSStyleDeclaration>;
634
+
635
+ type GraphTreeTransform<Id extends string, Transformed> = (tree: GraphTree<Id>) => Transformed;
636
+ /**
637
+ * [Docs](https://baleada.dev/docs/logic/pipes/find)
638
+ */
639
+ declare function createFind<Id extends string>(node: GraphNode<Id>): GraphTreeTransform<Id, GraphTreeNode<Id>>;
640
+
641
+ type KeyboardEventTransform<Transformed> = (keyboardEvent: KeyboardEvent) => Transformed;
642
+ type CreateKeycomboMatchOptions = Omit<CreateKeycomboMatchOptions$1, 'toAliases'> & {
643
+ toAliases?: (descriptor: KeyboardEventDescriptor) => string[];
644
+ };
645
+ /**
646
+ * [Docs](https://baleada.dev/docs/logic/pipes/keycombo-match)
647
+ */
648
+ declare const createKeycomboMatch: (keycombo: string, options?: CreateKeycomboMatchOptions) => KeyboardEventTransform<boolean>;
649
+
650
+ type NumberTransform<Transformed> = (number: number) => Transformed;
651
+ /**
652
+ * [Docs](https://baleada.dev/docs/logic/pipes/clamp)
653
+ */
654
+ declare function createClamp(min: number, max: number): NumberTransform<number>;
655
+ type Potentiality<Outcome> = {
656
+ outcome: Outcome;
657
+ probability: number;
658
+ };
659
+ /**
660
+ * [Docs](https://baleada.dev/docs/logic/pipes/determine)
661
+ */
662
+ declare function createDetermine<Outcome>(potentialities: Potentiality<Outcome>[]): NumberTransform<Outcome>;
663
+ /**
664
+ * [Docs](https://baleada.dev/docs/logic/pipes/greater)
665
+ */
666
+ declare function createGreater(threshold: number): NumberTransform<boolean>;
667
+ /**
668
+ * [Docs](https://baleada.dev/docs/logic/pipes/greater-or-equal)
669
+ */
670
+ declare function createGreaterOrEqual(threshold: number): NumberTransform<boolean>;
671
+ /**
672
+ * [Docs](https://baleada.dev/docs/logic/pipes/less-or-equal)
673
+ */
674
+ declare function createLessOrEqual(threshold: number): NumberTransform<boolean>;
675
+ /**
676
+ * [Docs](https://baleada.dev/docs/logic/pipes/less)
677
+ */
678
+ declare function createLess(threshold: number): NumberTransform<boolean>;
679
+
680
+ type ObjectTransform<Type extends Record<any, any>, Transformed> = (transform: Type) => Transformed;
681
+ type ValueOf<Type> = Type[keyof Type];
682
+ /**
683
+ * [Docs](https://baleada.dev/docs/logic/pipes/value)
684
+ */
685
+ declare function createValue<Type extends Record<any, any>>(key: keyof Type): ObjectTransform<Type, ValueOf<Type>>;
686
+ /**
687
+ * [Docs](https://baleada.dev/docs/logic/pipes/has)
688
+ */
689
+ declare function createHas<Type extends Record<any, any>>(key: keyof Type): ObjectTransform<Type, boolean>;
690
+ /**
691
+ * [Docs](https://baleada.dev/docs/logic/pipes/keys)
692
+ */
693
+ declare function createKeys<Type extends Record<any, any>>(): ObjectTransform<Type, (keyof Type)[]>;
694
+ /**
695
+ * [Docs](https://baleada.dev/docs/logic/pipes/entries)
696
+ */
697
+ declare function createEntries<Type extends Record<any, any>>(): ObjectTransform<Type, [keyof Type, ValueOf<Type>][]>;
698
+ /**
699
+ * [Docs](https://baleada.dev/docs/logic/pipes/every)
700
+ */
701
+ declare function createEvery<Type extends Record<any, any>>(predicate: (key: keyof Type, value: ValueOf<Type>) => unknown): ObjectTransform<Type, boolean>;
702
+ /**
703
+ * [Docs](https://baleada.dev/docs/logic/pipes/some)
704
+ */
705
+ declare function createSome<Type extends Record<any, any>>(predicate: (key: keyof Type, value: ValueOf<Type>) => unknown): ObjectTransform<Type, boolean>;
706
+ /**
707
+ * [Docs](https://baleada.dev/docs/logic/pipes/deep-merge)
708
+ */
709
+ declare function createDeepMerge<Type extends Record<any, any>>(override?: Type): ObjectTransform<Type, Type>;
710
+
711
+ type StringTransform<Transformed> = (string: string) => Transformed;
712
+ /**
713
+ * [Docs](https://baleada.dev/docs/logic/pipes/clip)
714
+ */
715
+ declare function createClip(content: string | RegExp): StringTransform<string>;
716
+ /**
717
+ * [Docs](https://baleada.dev/docs/logic/pipes/slug)
718
+ */
719
+ declare function createSlug(options?: Options): StringTransform<string>;
720
+ /**
721
+ * [Docs](https://baleada.dev/docs/logic/pipes/sanitize)
722
+ */
723
+ declare function createSanitize(options?: Config): StringTransform<string>;
724
+ /**
725
+ * [Docs](https://baleada.dev/docs/logic/pipes/number)
726
+ */
727
+ declare function createNumber(options?: {
728
+ radix?: number;
729
+ }): StringTransform<number>;
730
+ type CreateResultsOptions<Candidate extends string | object, MatchData extends boolean> = Omit<FullOptions<Candidate>, 'returnMatchData'> & {
731
+ returnMatchData?: MatchData;
732
+ };
733
+ declare function createResults<Candidate extends string | object, MatchData extends boolean = false>(candidates: Candidate[], options?: (CreateResultsOptions<Candidate, MatchData> | ((sortKind: typeof sortKind) => CreateResultsOptions<Candidate, MatchData>))): StringTransform<MatchData extends true ? MatchData<Candidate>[] : Candidate[]>;
734
+
735
+ type ToGraphYielded = {
736
+ node: GraphNode<string>;
737
+ edge: PartialGraphEdge | undefined;
738
+ };
739
+ type PartialGraphEdge = Omit<GraphEdge<string, unknown>, 'predicateShouldTraverse'>;
740
+ type CreateGraphOptions<TreeNode> = {
741
+ toId?: (node: TreeNode) => string;
742
+ toChildren?: (node: TreeNode) => TreeNode[];
743
+ };
744
+ /**
745
+ * [Docs](https://baleada.dev/docs/logic/pipes/graph)
746
+ */
747
+ declare function createGraph<TreeNode>(options?: CreateGraphOptions<TreeNode>): GeneratorTransform<TreeNode[], ToGraphYielded>;
748
+
749
+ type AnimateableKeyframe<Value extends string | number | any[]> = {
750
+ progress: number;
751
+ properties: {
752
+ [key: string]: AnimateableValue<Value>;
753
+ };
754
+ timing?: AnimateableTiming;
755
+ };
756
+ type AnimateableValue<Value extends string | number | any[]> = Value extends `${string} ${number}%` ? never : (Value | number | any[]);
757
+ type AnimateableOptions = {
758
+ duration?: number;
759
+ timing?: AnimateableTiming;
760
+ iterations?: number | true;
761
+ alternates?: boolean;
762
+ };
763
+ type AnimateableTiming = [number, number, number, number];
764
+ type AnimateFrameEffect = (frame?: AnimateFrame) => any;
765
+ type AnimateFrame = {
766
+ properties: {
767
+ [key: string]: {
768
+ progress: {
769
+ time: number;
770
+ animation: number;
771
+ };
772
+ interpolated: number | string | any[];
773
+ };
774
+ };
775
+ timestamp: number;
776
+ };
777
+ type AnimateOptions = {
778
+ interpolate?: {
779
+ color?: CreateMixOptions;
780
+ };
781
+ };
782
+ type AnimateableStatus = 'ready' | 'playing' | 'played' | 'reversing' | 'reversed' | 'paused' | 'sought' | 'stopped';
783
+ /**
784
+ * [Docs](https://baleada.dev/docs/logic/classes/animateable)
785
+ */
786
+ declare class Animateable<Value extends string | number | any[]> {
787
+ private initialDuration;
788
+ private iterationLimit;
789
+ private alternates;
790
+ private controlPoints;
791
+ private reversedControlPoints;
792
+ private toAnimationProgress;
793
+ private reversedToAnimationProgress;
794
+ private playCache;
795
+ private reverseCache;
796
+ private pauseCache;
797
+ private seekCache;
798
+ private alternateCache;
799
+ private visibilitychange;
800
+ private getEaseables;
801
+ private getReversedEaseables;
802
+ constructor(keyframes: AnimateableKeyframe<Value>[], options?: AnimateableOptions);
803
+ private computedStatus;
804
+ private ready;
805
+ private computedTime;
806
+ private resetTime;
807
+ private computedProgress;
808
+ private resetProgress;
809
+ private computedIterations;
810
+ private resetIterations;
811
+ get keyframes(): AnimateableKeyframe<Value>[];
812
+ set keyframes(keyframes: AnimateableKeyframe<Value>[]);
813
+ get playbackRate(): number;
814
+ set playbackRate(playbackRate: number);
815
+ get status(): AnimateableStatus;
816
+ get iterations(): number;
817
+ get request(): number;
818
+ get time(): {
819
+ elapsed: number;
820
+ remaining: number;
821
+ };
822
+ get progress(): {
823
+ time: number;
824
+ animation: number;
825
+ };
826
+ private computedKeyframes;
827
+ private reversedKeyframes;
828
+ private properties;
829
+ private easeables;
830
+ private reversedEaseables;
831
+ setKeyframes(keyframes: AnimateableKeyframe<Value>[]): this;
832
+ private computedPlaybackRate;
833
+ private duration;
834
+ private totalTimeInvisible;
835
+ setPlaybackRate(playbackRate: number): this;
836
+ play(effect: AnimateFrameEffect, options?: AnimateOptions): this;
837
+ private playing;
838
+ private played;
839
+ reverse(effect: AnimateFrameEffect, options?: AnimateOptions): this;
840
+ private reversing;
841
+ private reversed;
842
+ private invisibleAt;
843
+ private listenForVisibilitychange;
844
+ private computedRequest;
845
+ private createAnimate;
846
+ private startTime;
847
+ private setStartTimeAndStatus;
848
+ private getToAnimationProgress;
849
+ private getFrame;
850
+ private recurse;
851
+ pause(): this;
852
+ private paused;
853
+ private cancelAnimate;
854
+ seek(timeProgress: number, options?: {
855
+ effect?: AnimateFrameEffect;
856
+ } & AnimateOptions): this;
857
+ private sought;
858
+ restart(): this;
859
+ stop(): this;
289
860
  private stopped;
290
861
  }
862
+ declare const linear: AnimateableKeyframe<any>['timing'];
863
+ declare const materialStandard: AnimateableKeyframe<any>['timing'];
864
+ declare const materialDecelerated: AnimateableKeyframe<any>['timing'];
865
+ declare const materialAccelerated: AnimateableKeyframe<any>['timing'];
866
+ declare const verouEase: AnimateableKeyframe<any>['timing'];
867
+ declare const verouEaseIn: AnimateableKeyframe<any>['timing'];
868
+ declare const verouEaseOut: AnimateableKeyframe<any>['timing'];
869
+ declare const verouEaseInOut: AnimateableKeyframe<any>['timing'];
870
+ declare const easingsNetInSine: AnimateableKeyframe<any>['timing'];
871
+ declare const easingsNetOutSine: AnimateableKeyframe<any>['timing'];
872
+ declare const easingsNetInOutSine: AnimateableKeyframe<any>['timing'];
873
+ declare const easingsNetInQuad: AnimateableKeyframe<any>['timing'];
874
+ declare const easingsNetOutQuad: AnimateableKeyframe<any>['timing'];
875
+ declare const easingsNetInOutQuad: AnimateableKeyframe<any>['timing'];
876
+ declare const easingsNetInCubic: AnimateableKeyframe<any>['timing'];
877
+ declare const easingsNetOutCubic: AnimateableKeyframe<any>['timing'];
878
+ declare const easingsNetInOutCubic: AnimateableKeyframe<any>['timing'];
879
+ declare const easingsNetInQuart: AnimateableKeyframe<any>['timing'];
880
+ declare const easingsNetInQuint: AnimateableKeyframe<any>['timing'];
881
+ declare const easingsNetOutQuint: AnimateableKeyframe<any>['timing'];
882
+ declare const easingsNetInOutQuint: AnimateableKeyframe<any>['timing'];
883
+ declare const easingsNetInExpo: AnimateableKeyframe<any>['timing'];
884
+ declare const easingsNetOutExpo: AnimateableKeyframe<any>['timing'];
885
+ declare const easingsNetInOutExpo: AnimateableKeyframe<any>['timing'];
886
+ declare const easingsNetInCirc: AnimateableKeyframe<any>['timing'];
887
+ declare const easingsNetOutCirc: AnimateableKeyframe<any>['timing'];
888
+ declare const easingsNetInOutCirc: AnimateableKeyframe<any>['timing'];
889
+ declare const easingsNetInBack: AnimateableKeyframe<any>['timing'];
890
+ declare const easingsNetOutBack: AnimateableKeyframe<any>['timing'];
891
+ declare const easingsNetInOutBack: AnimateableKeyframe<any>['timing'];
291
892
 
292
893
  type BroadcastableOptions = {
293
894
  name?: string;
294
895
  };
295
896
  type BroadcastableStatus = 'ready' | 'broadcasting' | 'broadcasted' | 'errored' | 'stopped';
897
+ /**
898
+ * [Docs](https://baleada.dev/docs/logic/classes/broadcastable)
899
+ */
296
900
  declare class Broadcastable<State> {
297
901
  private name;
298
902
  constructor(state: State, options?: BroadcastableOptions);
@@ -359,6 +963,9 @@ type CompleteOptions = {
359
963
  after: string;
360
964
  }) => Completeable['selection']);
361
965
  };
966
+ /**
967
+ * [Docs](https://baleada.dev/docs/logic/classes/completeable)
968
+ */
362
969
  declare class Completeable {
363
970
  private segmentFrom;
364
971
  private segmentTo;
@@ -408,6 +1015,9 @@ declare class Completeable {
408
1015
 
409
1016
  type CopyableOptions = Record<never, never>;
410
1017
  type CopyableStatus = 'ready' | 'copying' | 'copied' | 'errored';
1018
+ /**
1019
+ * [Docs](https://baleada.dev/docs/logic/classes/copyable)
1020
+ */
411
1021
  declare class Copyable {
412
1022
  private computedIsClipboardText;
413
1023
  private copyListenable;
@@ -442,6 +1052,9 @@ type DelayableOptions = {
442
1052
  };
443
1053
  type DelayableEffect = (timestamp: number) => any;
444
1054
  type DelayableStatus = 'ready' | 'delaying' | 'delayed' | 'paused' | 'sought' | 'stopped';
1055
+ /**
1056
+ * [Docs](https://baleada.dev/docs/logic/classes/delayable)
1057
+ */
445
1058
  declare class Delayable {
446
1059
  private animateable;
447
1060
  constructor(effect: DelayableEffect, options?: DelayableOptions);
@@ -472,15 +1085,18 @@ declare class Delayable {
472
1085
  private stopped;
473
1086
  }
474
1087
 
475
- type DrawableState = ReturnType<typeof getStroke>;
1088
+ type DrawableStroke = ReturnType<typeof getStroke>;
476
1089
  type DrawableOptions = {
477
- toD?: (stroke: DrawableState) => string;
1090
+ toD?: (stroke: DrawableStroke) => string;
478
1091
  };
479
1092
  type DrawableStatus = 'ready' | 'drawing' | 'drawn';
1093
+ /**
1094
+ * [Docs](https://baleada.dev/docs/logic/classes/drawable)
1095
+ */
480
1096
  declare class Drawable {
481
1097
  private computedD;
482
1098
  private toD;
483
- constructor(stroke: DrawableState, options?: DrawableOptions);
1099
+ constructor(stroke: DrawableStroke, options?: DrawableOptions);
484
1100
  computedStatus: DrawableStatus;
485
1101
  private ready;
486
1102
  get stroke(): number[][];
@@ -488,7 +1104,7 @@ declare class Drawable {
488
1104
  get status(): DrawableStatus;
489
1105
  get d(): string;
490
1106
  private computedStroke;
491
- setStroke(stroke: DrawableState): this;
1107
+ setStroke(stroke: DrawableStroke): this;
492
1108
  draw(points: Parameters<typeof getStroke>[0], options?: StrokeOptions): this;
493
1109
  private drawing;
494
1110
  private drawn;
@@ -497,32 +1113,41 @@ declare function toD(stroke: number[][]): string;
497
1113
  declare function toFlattenedD(stroke: number[][]): string;
498
1114
 
499
1115
  type ResolveableOptions = Record<never, never>;
500
- type ResolveableGetPromise<Value> = (...args: any[]) => (Promise<Value> | Promise<Value>[]);
501
1116
  type ResolveableStatus = 'ready' | 'resolving' | 'resolved' | 'errored';
1117
+ /**
1118
+ * [Docs](https://baleada.dev/docs/logic/classes/resolveable)
1119
+ */
502
1120
  declare class Resolveable<Value> {
503
- constructor(getPromise: ResolveableGetPromise<Value>, options?: ResolveableOptions);
1121
+ constructor(getPromise: () => Promise<Value>, options?: ResolveableOptions);
504
1122
  private computedStatus;
505
1123
  private ready;
506
- get getPromise(): (...args: any[]) => Promise<Value> | Promise<Value>[];
507
- set getPromise(getPromise: (...args: any[]) => Promise<Value> | Promise<Value>[]);
1124
+ get getPromise(): () => Promise<Value>;
1125
+ set getPromise(getPromise: () => Promise<Value>);
508
1126
  get status(): ResolveableStatus;
509
- get value(): Error | Value | Value[];
1127
+ get value(): Value;
1128
+ get error(): Error;
510
1129
  private computedGetPromise;
511
- setGetPromise(getPromise: (...args: any[]) => (Promise<Value> | Promise<Value>[])): this;
1130
+ setGetPromise(getPromise: () => Promise<Value>): this;
512
1131
  private computedValue;
513
- resolve(...args: any[]): Promise<this>;
1132
+ private computedError;
1133
+ resolve(): Promise<this>;
514
1134
  private resolving;
515
1135
  private resolved;
516
1136
  private errored;
517
1137
  }
518
1138
 
519
1139
  type FetchableOptions = {
520
- ky?: Options | ((api: ToKyOptionsApi) => Options);
1140
+ ky?: Options$1 | ((api: ToKyOptionsApi) => Options$1);
521
1141
  };
522
1142
  type ToKyOptionsApi = {
523
1143
  stop: typeof ky['stop'];
524
1144
  };
525
1145
  type FetchableStatus = 'ready' | 'fetching' | 'fetched' | 'retrying' | 'aborted' | 'errored';
1146
+ type FetchOptions = Omit<Options$1, 'signal'>;
1147
+ type FetchMethodOptions = Omit<FetchOptions, 'method'>;
1148
+ /**
1149
+ * [Docs](https://baleada.dev/docs/logic/classes/fetchable)
1150
+ */
526
1151
  declare class Fetchable {
527
1152
  private computedArrayBuffer;
528
1153
  private computedBlob;
@@ -534,14 +1159,14 @@ declare class Fetchable {
534
1159
  private ready;
535
1160
  get resource(): string;
536
1161
  set resource(resource: string);
1162
+ get status(): FetchableStatus;
537
1163
  private computedKy;
538
1164
  get ky(): ky_distribution_types_ky.KyInstance;
539
1165
  private computedAbortController;
540
1166
  get abortController(): AbortController;
541
- get status(): FetchableStatus;
542
- get response(): Response;
543
1167
  private computedRetryCount;
544
1168
  get retryCount(): number;
1169
+ get response(): Response;
545
1170
  get error(): Error;
546
1171
  get arrayBuffer(): Resolveable<ArrayBuffer>;
547
1172
  get blob(): Resolveable<Blob>;
@@ -552,24 +1177,27 @@ declare class Fetchable {
552
1177
  setResource(resource: string): this;
553
1178
  private computedResponse;
554
1179
  private computedError;
555
- fetch(options?: Options): Promise<this>;
1180
+ fetch(options?: FetchOptions): Promise<this>;
556
1181
  private fetching;
557
1182
  private retrying;
558
1183
  private fetched;
559
1184
  private aborted;
560
1185
  private errored;
561
- get(options?: Options): Promise<this>;
562
- patch(options?: Options): Promise<this>;
563
- post(options?: Options): Promise<this>;
564
- put(options?: Options): Promise<this>;
565
- delete(options?: Options): Promise<this>;
566
- head(options?: Options): Promise<this>;
1186
+ get(options?: FetchMethodOptions): Promise<this>;
1187
+ patch(options?: FetchMethodOptions): Promise<this>;
1188
+ post(options?: FetchMethodOptions): Promise<this>;
1189
+ put(options?: FetchMethodOptions): Promise<this>;
1190
+ delete(options?: FetchMethodOptions): Promise<this>;
1191
+ head(options?: FetchMethodOptions): Promise<this>;
567
1192
  abort(): this;
568
1193
  }
569
1194
 
570
1195
  type FullscreenableOptions = Record<never, never>;
571
1196
  type FullscreenableGetElement<ElementType> = ((...args: any[]) => ElementType);
572
1197
  type FullscreenableStatus = 'ready' | 'fullscreened' | 'errored' | 'exited';
1198
+ /**
1199
+ * [Docs](https://baleada.dev/docs/logic/classes/fullscreenable)
1200
+ */
573
1201
  declare class Fullscreenable<ElementType extends Element> {
574
1202
  constructor(getElement: FullscreenableGetElement<ElementType>, options?: FullscreenableOptions);
575
1203
  private computedStatus;
@@ -591,21 +1219,26 @@ declare class Fullscreenable<ElementType extends Element> {
591
1219
  }
592
1220
 
593
1221
  type GrantableOptions = Record<never, never>;
594
- type GrantableStatus = 'ready' | 'querying' | 'queried' | 'errored';
595
- declare class Grantable<DescriptorType extends PermissionDescriptor> {
596
- constructor(descriptor: DescriptorType, options?: GrantableOptions);
1222
+ type GrantableStatus = 'ready' | 'granting' | 'granted' | 'errored';
1223
+ /**
1224
+ * [Docs](https://baleada.dev/docs/logic/classes/grantable)
1225
+ */
1226
+ declare class Grantable {
1227
+ constructor(descriptor: PermissionDescriptor, options?: GrantableOptions);
597
1228
  private computedStatus;
598
1229
  private ready;
599
- get descriptor(): DescriptorType;
600
- set descriptor(descriptor: DescriptorType);
601
- get permission(): Error | PermissionStatus;
1230
+ get descriptor(): PermissionDescriptor;
1231
+ set descriptor(descriptor: PermissionDescriptor);
1232
+ get permission(): PermissionStatus;
1233
+ get error(): Error;
602
1234
  get status(): GrantableStatus;
603
1235
  private computedDescriptor;
604
- setDescriptor(descriptor: DescriptorType): this;
1236
+ setDescriptor(descriptor: PermissionDescriptor): this;
605
1237
  private computedPermission;
606
- query(): Promise<this>;
607
- private querying;
608
- private queried;
1238
+ private computedError;
1239
+ grant(): Promise<this>;
1240
+ private granting;
1241
+ private granted;
609
1242
  private errored;
610
1243
  }
611
1244
 
@@ -620,6 +1253,9 @@ type NextAndPreviousOptions = {
620
1253
  distance?: number;
621
1254
  loops?: boolean;
622
1255
  };
1256
+ /**
1257
+ * [Docs](https://baleada.dev/docs/logic/classes/navigateable)
1258
+ */
623
1259
  declare class Navigateable<Item> {
624
1260
  constructor(array: Item[], options?: NavigateableOptions);
625
1261
  private computedStatus;
@@ -657,6 +1293,9 @@ type PickOptions = {
657
1293
  replace?: 'none' | 'all' | 'fifo' | 'lifo';
658
1294
  allowsDuplicates?: boolean;
659
1295
  };
1296
+ /**
1297
+ * [Docs](https://baleada.dev/docs/logic/classes/pickable)
1298
+ */
660
1299
  declare class Pickable<Item> {
661
1300
  constructor(array: Item[], options?: PickableOptions);
662
1301
  private computedStatus;
@@ -673,11 +1312,11 @@ declare class Pickable<Item> {
673
1312
  get last(): number;
674
1313
  get oldest(): number;
675
1314
  get newest(): number;
676
- get status(): PickableStatus;
677
1315
  get items(): Item[];
678
1316
  private toItems;
679
1317
  computedMultiple: boolean;
680
1318
  get multiple(): boolean;
1319
+ get status(): PickableStatus;
681
1320
  private toPossiblePicks;
682
1321
  setArray(array: Item[]): this;
683
1322
  setPicks(indexOrIndices: number | number[]): this;
@@ -689,59 +1328,24 @@ declare class Pickable<Item> {
689
1328
  private omitted;
690
1329
  }
691
1330
 
692
- type SanitizeableOptions = Config;
693
- type SanitizeableStatus = 'ready' | 'sanitized';
694
- declare class Sanitizeable {
695
- private domPurifyConfig;
696
- constructor(html: string, options?: Config);
697
- private computedDompurify;
698
- private computedStatus;
699
- private ready;
700
- get html(): string;
701
- set html(html: string);
702
- get dompurify(): DOMPurifyI;
703
- get status(): SanitizeableStatus;
704
- private computedHtml;
705
- setHtml(html: string): this;
706
- sanitize(): this;
707
- private sanitized;
708
- }
709
-
710
- type SearchableOptions<Item> = FullOptions<Item>;
711
- type SearchableStatus = 'ready' | 'searched';
712
- declare class Searchable<Item extends string | object> {
713
- private searcherOptions;
714
- private computedResults;
715
- constructor(candidates: Item[], options?: FullOptions<Item>);
716
- private computedStatus;
717
- private ready;
718
- private computedCandidates;
719
- get candidates(): Item[];
720
- set candidates(candidates: Item[]);
721
- get results(): MatchData<Item>[] | Item[];
722
- get searcher(): Searcher<Item, FullOptions<Item>>;
723
- get status(): SearchableStatus;
724
- private computedSearcher;
725
- setCandidates(candidates: Item[]): this;
726
- search(query: string, options?: FullOptions<Item>): this;
727
- private searched;
728
- }
729
-
730
1331
  type ShareableOptions = Record<never, never>;
731
1332
  type ShareableStatus = 'ready' | 'sharing' | 'shared' | 'errored';
1333
+ /**
1334
+ * [Docs](https://baleada.dev/docs/logic/classes/shareable)
1335
+ */
732
1336
  declare class Shareable {
733
- constructor(state: ShareData, options?: ShareableOptions);
1337
+ constructor(shareData: ShareData, options?: ShareableOptions);
734
1338
  private computedStatus;
735
1339
  private ready;
736
- get state(): ShareData;
737
- set state(state: ShareData);
1340
+ get shareData(): ShareData;
1341
+ set shareData(shareData: ShareData);
738
1342
  get status(): ShareableStatus;
739
1343
  private computedCan;
740
1344
  get can(): Resolveable<boolean>;
741
1345
  private computedError;
742
1346
  get error(): Error;
743
1347
  private computedState;
744
- setState(state: ShareData): this;
1348
+ setShareData(shareData: ShareData): this;
745
1349
  share(): Promise<this>;
746
1350
  private sharing;
747
1351
  private shared;
@@ -753,6 +1357,9 @@ type StoreableOptions = {
753
1357
  statusKeySuffix?: string;
754
1358
  };
755
1359
  type StoreableStatus = 'ready' | 'constructing' | 'stored' | 'errored' | 'removed';
1360
+ /**
1361
+ * [Docs](https://baleada.dev/docs/logic/classes/storeable)
1362
+ */
756
1363
  declare class Storeable<String extends string> {
757
1364
  private kind;
758
1365
  private statusKeySuffix;
@@ -780,101 +1387,37 @@ declare class Storeable<String extends string> {
780
1387
  removeStatus(): this;
781
1388
  }
782
1389
 
783
- type AnyFn<Returned> = (param: any) => Returned;
784
- declare function createClone<Any>(): AnyFn<Any>;
785
- declare function createEqual(compared: any): AnyFn<boolean>;
786
-
787
- type ArrayFn<Item, Returned> = (array: Item[]) => Returned;
788
- declare function createConcat<Item>(...arrays: Item[][]): ArrayFn<Item, Item[]>;
789
- declare function createFilter<Item>(predicate: (item: Item, index: number) => boolean): ArrayFn<Item, Item[]>;
790
- declare function createInsert<Item>(item: Item, index: number): ArrayFn<Item, Item[]>;
791
- declare function createMap<Item, Transformed = Item>(transform: (item: Item, index: number) => Transformed): ArrayFn<Item, Transformed[]>;
792
- declare function createReduce<Item, Accumulator>(accumulate: (accumulator: Accumulator, item: Item, index: number) => Accumulator, initialValue?: Accumulator): (array: Item[]) => Accumulator;
793
- declare function createRemove<Item>(index: number): ArrayFn<Item, Item[]>;
794
- declare function createReorder<Item>(from: {
795
- start: number;
796
- itemCount: number;
797
- } | number, to: number): ArrayFn<Item, Item[]>;
798
- declare function createReplace<Item>(index: number, replacement: Item): ArrayFn<Item, Item[]>;
799
- declare function createReverse<Item>(): ArrayFn<Item, Item[]>;
800
- declare function createSlice<Item>(from: number, to?: number): ArrayFn<Item, Item[]>;
801
- declare function createSort<Item>(compare?: (itemA: Item, itemB: Item) => number): ArrayFn<Item, Item[]>;
802
- declare function createSwap<Item>(indices: [number, number]): ArrayFn<Item, Item[]>;
803
- declare function createUnique<Item>(): ArrayFn<Item, Item[]>;
804
-
805
- type ArrayAsyncFn<Item, Returned> = (array: Item[]) => Promise<Returned>;
806
- declare function createFilterAsync<Item>(predicate: (item: Item, index: number) => Promise<boolean>): ArrayAsyncFn<Item, Item[]>;
807
- declare function createFindAsync<Item>(predicate: (item: Item, index: number) => Promise<boolean>): ArrayAsyncFn<Item, Item | undefined>;
808
- declare function createFindIndexAsync<Item>(predicate: (item: Item, index: number) => Promise<boolean>): ArrayAsyncFn<Item, number>;
809
- declare function createForEachAsync<Item>(forEach: (item: Item, index: number) => any): ArrayAsyncFn<Item, any>;
810
- declare function createMapAsync<Item, Mapped>(transform: (item: Item, index: number) => Promise<Mapped>): ArrayAsyncFn<Item, Mapped[]>;
811
- declare function createReduceAsync<Item, Accumulator>(accumulate: (accumulator: Accumulator, item: Item, index: number) => Promise<Accumulator>, initialValue?: Accumulator): (array: Item[]) => Promise<Accumulator>;
812
-
813
- type StringFn<Returned> = (string: string) => Returned;
814
- declare function createClip(required: string | RegExp): StringFn<string>;
815
- declare function createSlug(options?: Options$1): StringFn<string>;
816
-
817
- type NumberFn<Returned> = (number: number) => Returned;
818
- declare function createClamp(min: number, max: number): NumberFn<number>;
819
- type Potentiality<Outcome> = {
820
- outcome: Outcome;
821
- probability: number;
822
- };
823
- declare function createDetermine<Outcome>(potentialities: Potentiality<Outcome>[]): NumberFn<Outcome>;
824
-
825
- type ObjectFn<Key extends string | number | symbol, Value, Returned> = (transform: Record<Key, Value>) => Returned;
826
- declare function createEntries<Key extends string | number | symbol, Value>(): ObjectFn<Key, Value, [Key, Value][]>;
827
- declare function createKeys<Key extends string | number | symbol>(): ObjectFn<Key, any, Key[]>;
828
- declare function createEvery<Key extends string | number | symbol, Value>(predicate: (key: Key, value: Value) => unknown): ObjectFn<Key, Value, boolean>;
829
- declare function createSome<Key extends string | number | symbol, Value>(predicate: (key: Key, value: Value) => unknown): ObjectFn<Key, Value, boolean>;
1390
+ type ArrayAsyncEffect<Item> = (array: Item[]) => Promise<Item[]>;
1391
+ /**
1392
+ * [Docs](https://baleada.dev/docs/logic/links/for-each-async)
1393
+ */
1394
+ declare function createForEachAsync<Item>(effect: (item: Item, index: number) => any): ArrayAsyncEffect<Item>;
830
1395
 
831
- type MapFn<Key, Value, Returned> = (transform: Map<Key, Value>) => Returned;
832
- declare function createRename<Key, Value>(from: Key, to: Key): MapFn<Key, Value, Map<Key, Value>>;
1396
+ type ObjectEffect<Key extends string | number | symbol, Value> = (object: Record<Key, Value>) => Record<Key, Value>;
1397
+ /**
1398
+ * [Docs](https://baleada.dev/docs/logic/links/set)
1399
+ */
1400
+ declare function createSet<Key extends string | number | symbol, Value extends any>(key: Key, value: Value): ObjectEffect<Key, Value>;
1401
+ /**
1402
+ * [Docs](https://baleada.dev/docs/logic/links/delete)
1403
+ */
1404
+ declare function createDelete<Key extends string | number | symbol, Value extends any>(key: Key): ObjectEffect<Key, Value>;
1405
+ /**
1406
+ * [Docs](https://baleada.dev/docs/logic/links/clear)
1407
+ */
1408
+ declare function createClear<Key extends string | number | symbol, Value extends any>(): ObjectEffect<Key, Value>;
833
1409
 
834
- type ElementFn<El extends HTMLElement, Returned> = (element: El) => Returned;
835
- type CreateFocusableOptions = {
836
- elementIsCandidate?: boolean;
837
- tabbableSelector?: string;
838
- };
839
- declare function createFocusable(order: 'first' | 'last', options?: CreateFocusableOptions): ElementFn<HTMLElement, HTMLElement | undefined>;
840
-
841
- type AssociativeArrayEntries<Key, Value> = [Key, Value][];
842
- declare function defineAssociativeArrayEntries<Key, Value>(entries: AssociativeArrayEntries<Key, Value>): AssociativeArrayEntries<Key, Value>;
1410
+ declare function createDepthPathConfig<Id extends string, Metadata>(directedAcyclic: Graph<Id, Metadata> | GraphAsync<Id, Metadata>): CreatePathConfig<Id, Metadata>;
843
1411
 
844
- type AssociativeArray<Key extends any, Value extends any> = {
845
- toValue: (key: Key) => Value | undefined;
846
- set: (key: Key, value: Value) => void;
847
- predicateHas: (key: Key) => boolean;
848
- clear: () => void;
849
- delete: (key: Key) => boolean;
850
- toKeys: () => Key[];
851
- toValues: () => Value[];
852
- toEntries: () => AssociativeArrayEntries<Key, Value>;
853
- };
854
- type AssociativeArrayOptions<Key extends any> = {
855
- initial?: AssociativeArrayEntries<Key, any>;
856
- createPredicateKey?: (query: Key) => (candidate: Key) => boolean;
857
- };
858
- declare function createAssociativeArray<Key extends any, Value extends any>(options?: AssociativeArrayOptions<Key>): {
859
- toValue: (key: Key) => Value;
860
- set: (key: Key, value: Value) => void;
861
- predicateHas: (key: Key) => boolean;
862
- clear: () => void;
863
- delete: (key: Key) => boolean;
864
- toKeys: () => Key[];
865
- toValues: () => Value[];
866
- toEntries: () => AssociativeArrayEntries<Key, Value>;
867
- };
1412
+ declare function createBreadthPathConfig<Id extends string, Metadata>(directedAcyclic: Graph<Id, Metadata> | GraphAsync<Id, Metadata>): CreatePathConfig<Id, Metadata>;
868
1413
 
869
1414
  type KeypressType = 'keydown' | 'keyup' | 'visibilitychange';
870
1415
  type KeypressMetadata = {
871
- pressed: string;
1416
+ keycombo: string;
872
1417
  } & KeyboardTimeMetadata;
873
- type KeypressOptions = {
1418
+ type KeypressOptions = CreateKeycomboMatchOptions$1 & {
874
1419
  minDuration?: number;
875
1420
  preventsDefaultUnlessDenied?: boolean;
876
- toDownKeys?: CreatePredicateKeycomboDownOptions['toDownKeys'];
877
- toAliases?: CreatePredicateKeycomboMatchOptions$1['toAliases'];
878
1421
  onDown?: KeypressHook;
879
1422
  onUp?: KeypressHook;
880
1423
  onVisibilitychange?: KeypressHook;
@@ -886,16 +1429,18 @@ declare function createKeypress(keycomboOrKeycombos: string | string[], options?
886
1429
  keyup: RecognizeableEffect<"keyup", KeypressMetadata>;
887
1430
  visibilitychange: RecognizeableEffect<"visibilitychange", KeypressMetadata>;
888
1431
  };
1432
+ declare class Keypress extends Listenable<KeypressType, KeypressMetadata> {
1433
+ constructor(keycomboOrKeycombos: string | string[], options?: KeypressOptions);
1434
+ get metadata(): KeypressMetadata;
1435
+ }
889
1436
 
890
1437
  type KeyreleaseType = 'keydown' | 'keyup' | 'visibilitychange';
891
1438
  type KeyreleaseMetadata = {
892
- released: string;
1439
+ keycombo: string;
893
1440
  } & KeyboardTimeMetadata;
894
- type KeyreleaseOptions = {
1441
+ type KeyreleaseOptions = CreateKeycomboMatchOptions$1 & {
895
1442
  minDuration?: number;
896
1443
  preventsDefaultUnlessDenied?: boolean;
897
- toDownKeys?: CreatePredicateKeycomboDownOptions['toDownKeys'];
898
- toAliases?: CreatePredicateKeycomboMatchOptions$1['toAliases'];
899
1444
  onDown?: KeyreleaseHook;
900
1445
  onUp?: KeyreleaseHook;
901
1446
  onVisibilitychange?: KeyreleaseHook;
@@ -907,44 +1452,57 @@ declare function createKeyrelease(keycomboOrKeycombos: string | string[], option
907
1452
  keyup: RecognizeableEffect<"keyup", KeyreleaseMetadata>;
908
1453
  visibilitychange: RecognizeableEffect<"visibilitychange", KeyreleaseMetadata>;
909
1454
  };
1455
+ declare class Keyrelease extends Listenable<KeyreleaseType, KeyreleaseMetadata> {
1456
+ constructor(keycomboOrKeycombos: string | string[], options?: KeyreleaseOptions);
1457
+ get metadata(): KeyreleaseMetadata;
1458
+ }
910
1459
 
911
1460
  type KeychordType = 'keydown' | 'keyup' | 'visibilitychange';
912
1461
  type KeychordMetadata = {
913
1462
  played: ({
914
- released: string;
1463
+ keycombo: string;
915
1464
  } & KeyboardTimeMetadata)[];
916
1465
  };
917
- type KeychordOptions = {
1466
+ type KeychordOptions = CreateKeycomboMatchOptions$1 & {
918
1467
  minDuration?: number;
919
1468
  maxInterval?: number;
920
1469
  preventsDefaultUnlessDenied?: boolean;
921
- toDownKeys?: CreatePredicateKeycomboDownOptions['toDownKeys'];
922
- toAliases?: CreatePredicateKeycomboMatchOptions$1['toAliases'];
923
1470
  onDown?: KeychordHook;
924
1471
  onUp?: KeychordHook;
925
1472
  onVisibilitychange?: KeychordHook;
926
1473
  };
927
1474
  type KeychordHook = (api: KeychordHookApi) => any;
928
1475
  type KeychordHookApi = HookApi<KeychordType, KeychordMetadata>;
929
- declare function createKeychord(keychord: string, options?: KeychordOptions): {
1476
+ declare function createKeychord(keycombos: string, options?: KeychordOptions): {
930
1477
  keydown: RecognizeableEffect<"keydown", KeychordMetadata>;
931
1478
  keyup: RecognizeableEffect<"keyup", KeychordMetadata>;
932
1479
  visibilitychange: RecognizeableEffect<"visibilitychange", KeychordMetadata>;
933
1480
  };
1481
+ declare class Keychord extends Listenable<KeychordType, KeychordMetadata> {
1482
+ constructor(keycombos: string, options?: KeychordOptions);
1483
+ get metadata(): KeychordMetadata;
1484
+ }
934
1485
 
935
1486
  type KonamiType = KeychordType;
936
1487
  type KonamiMetadata = KeychordMetadata;
937
1488
  type KonamiOptions = KeychordOptions;
938
1489
  type KonamiHook = KeychordHook;
939
1490
  type KonamiHookApi = KeychordHookApi;
940
- declare function createKonami(options?: KonamiOptions): RecognizeableOptions<KonamiType, KonamiMetadata>['effects'];
1491
+ declare function createKonami(options?: KonamiOptions): {
1492
+ keydown: RecognizeableEffect<"keydown", KeychordMetadata>;
1493
+ keyup: RecognizeableEffect<"keyup", KeychordMetadata>;
1494
+ visibilitychange: RecognizeableEffect<"visibilitychange", KeychordMetadata>;
1495
+ };
1496
+ declare class Konami extends Listenable<KonamiType, KonamiMetadata> {
1497
+ constructor(options?: KonamiOptions);
1498
+ get metadata(): KeychordMetadata;
1499
+ }
941
1500
 
942
1501
  type MousepressType = 'mousedown' | 'mouseleave' | 'mouseup';
943
1502
  type MousepressMetadata = PointerStartMetadata & PointerMoveMetadata & PointerTimeMetadata;
944
1503
  type MousepressOptions = {
945
1504
  minDuration?: number;
946
1505
  minDistance?: number;
947
- getMousemoveTarget?: (event: MouseEvent) => HTMLElement;
948
1506
  onDown?: MousepressHook;
949
1507
  onMove?: MousepressHook;
950
1508
  onLeave?: MousepressHook;
@@ -952,7 +1510,18 @@ type MousepressOptions = {
952
1510
  };
953
1511
  type MousepressHook = (api: MousepressHookApi) => any;
954
1512
  type MousepressHookApi = HookApi<MousepressType, MousepressMetadata>;
955
- declare function createMousepress(options?: MousepressOptions): RecognizeableOptions<MousepressType, MousepressMetadata>['effects'];
1513
+ /**
1514
+ * [Docs](https://baleada.dev/docs/logic/factories/mousepress)
1515
+ */
1516
+ declare function createMousepress(options?: MousepressOptions): {
1517
+ mousedown: RecognizeableEffect<"mousedown", MousepressMetadata>;
1518
+ mouseleave: RecognizeableEffect<"mouseleave", MousepressMetadata>;
1519
+ mouseup: RecognizeableEffect<"mouseup", MousepressMetadata>;
1520
+ };
1521
+ declare class Mousepress extends Listenable<MousepressType, MousepressMetadata> {
1522
+ constructor(options?: MousepressOptions);
1523
+ get metadata(): MousepressMetadata;
1524
+ }
956
1525
 
957
1526
  type MousereleaseType = 'mousedown' | 'mouseleave' | 'mouseup';
958
1527
  type MousereleaseMetadata = PointerStartMetadata & PointerMoveMetadata & PointerTimeMetadata;
@@ -960,7 +1529,6 @@ type MousereleaseOptions = {
960
1529
  minDuration?: number;
961
1530
  minDistance?: number;
962
1531
  minVelocity?: number;
963
- getMousemoveTarget?: (event: MouseEvent) => HTMLElement;
964
1532
  onDown?: MousereleaseHook;
965
1533
  onMove?: MousereleaseHook;
966
1534
  onLeave?: MousereleaseHook;
@@ -968,7 +1536,18 @@ type MousereleaseOptions = {
968
1536
  };
969
1537
  type MousereleaseHook = (api: MousereleaseHookApi) => any;
970
1538
  type MousereleaseHookApi = HookApi<MousereleaseType, MousereleaseMetadata>;
971
- declare function createMouserelease(options?: MousereleaseOptions): RecognizeableOptions<MousereleaseType, MousereleaseMetadata>['effects'];
1539
+ /**
1540
+ * [Docs](https://baleada.dev/docs/logic/factories/mouserelease)
1541
+ */
1542
+ declare function createMouserelease(options?: MousereleaseOptions): {
1543
+ mousedown: RecognizeableEffect<"mousedown", MousereleaseMetadata>;
1544
+ mouseleave: RecognizeableEffect<"mouseleave", MousereleaseMetadata>;
1545
+ mouseup: RecognizeableEffect<"mouseup", MousereleaseMetadata>;
1546
+ };
1547
+ declare class Mouserelease extends Listenable<MousereleaseType, MousereleaseMetadata> {
1548
+ constructor(options?: MousereleaseOptions);
1549
+ get metadata(): MousereleaseMetadata;
1550
+ }
972
1551
 
973
1552
  type TouchpressType = 'touchstart' | 'touchmove' | 'touchcancel' | 'touchend';
974
1553
  type TouchpressMetadata = PointerStartMetadata & PointerMoveMetadata & PointerTimeMetadata;
@@ -982,7 +1561,16 @@ type TouchpressOptions = {
982
1561
  };
983
1562
  type TouchpressHook = (api: TouchpressHookApi) => any;
984
1563
  type TouchpressHookApi = HookApi<TouchpressType, TouchpressMetadata>;
985
- declare function createTouchpress(options?: TouchpressOptions): RecognizeableOptions<TouchpressType, TouchpressMetadata>['effects'];
1564
+ declare function createTouchpress(options?: TouchpressOptions): {
1565
+ touchstart: RecognizeableEffect<"touchstart", TouchpressMetadata>;
1566
+ touchmove: RecognizeableEffect<"touchmove", TouchpressMetadata>;
1567
+ touchcancel: RecognizeableEffect<"touchcancel", TouchpressMetadata>;
1568
+ touchend: RecognizeableEffect<"touchend", TouchpressMetadata>;
1569
+ };
1570
+ declare class Touchpress extends Listenable<TouchpressType, TouchpressMetadata> {
1571
+ constructor(options?: TouchpressOptions);
1572
+ get metadata(): TouchpressMetadata;
1573
+ }
986
1574
 
987
1575
  type TouchreleaseType = 'touchstart' | 'touchmove' | 'touchcancel' | 'touchend';
988
1576
  type TouchreleaseMetadata = PointerStartMetadata & PointerMoveMetadata & PointerTimeMetadata;
@@ -997,256 +1585,15 @@ type TouchreleaseOptions = {
997
1585
  };
998
1586
  type TouchreleaseHook = (api: TouchreleaseHookApi) => any;
999
1587
  type TouchreleaseHookApi = HookApi<TouchreleaseType, TouchreleaseMetadata>;
1000
- declare function createTouchrelease(options?: TouchreleaseOptions): RecognizeableOptions<TouchreleaseType, TouchreleaseMetadata>['effects'];
1001
-
1002
- type KeyStatusKey = {
1003
- key?: string;
1004
- code?: string;
1005
- };
1006
-
1007
- type Expand<T> = T extends infer O ? {
1008
- [K in keyof O]: O[K];
1009
- } : never;
1010
-
1011
- type CreatePredicateKeycomboDownOptions = {
1012
- toDownKeys?: (alias: string) => KeyStatusKey[];
1013
- };
1014
-
1015
- type CreatePredicateKeycomboMatchOptions$1 = CreatePredicateKeycomboDownOptions & {
1016
- toAliases?: (key: KeyStatusKey) => string[];
1017
- };
1018
-
1019
- type Direction = 'up' | 'upRight' | 'right' | 'downRight' | 'down' | 'downLeft' | 'left' | 'upLeft';
1020
-
1021
- type HookApi<Type extends ListenableSupportedType, Metadata extends Record<any, any>> = {
1022
- status: RecognizeableStatus;
1023
- metadata: Metadata;
1024
- sequence: ListenEffectParam<Type>[];
1025
- };
1026
-
1027
- type PolarCoordinates = {
1028
- distance: number;
1029
- angle: {
1030
- radians: number;
1031
- degrees: number;
1032
- };
1033
- };
1034
-
1035
- type KeyboardTimeMetadata = {
1036
- times: {
1037
- start: number;
1038
- end: number;
1039
- };
1040
- duration: number;
1041
- };
1042
-
1043
- type PointerStartMetadata = {
1044
- points: {
1045
- start: {
1046
- x: number;
1047
- y: number;
1048
- };
1049
- end: {
1050
- x: number;
1051
- y: number;
1052
- };
1053
- };
1054
- };
1055
-
1056
- type PointerTimeMetadata = {
1057
- times: {
1058
- start: number;
1059
- end: number;
1060
- };
1061
- duration: number;
1062
- velocity: number;
1063
- };
1064
-
1065
- type PointerMoveMetadata = {
1066
- distance: {
1067
- straight: {
1068
- fromStart: PolarCoordinates['distance'];
1069
- fromPrevious: PolarCoordinates['distance'];
1070
- };
1071
- horizontal: {
1072
- fromStart: PolarCoordinates['distance'];
1073
- fromPrevious: PolarCoordinates['distance'];
1074
- };
1075
- vertical: {
1076
- fromStart: PolarCoordinates['distance'];
1077
- fromPrevious: PolarCoordinates['distance'];
1078
- };
1079
- };
1080
- angle: {
1081
- fromPrevious: PolarCoordinates['angle'];
1082
- fromStart: PolarCoordinates['angle'];
1083
- };
1084
- direction: {
1085
- fromPrevious: Direction;
1086
- fromStart: Direction;
1087
- };
1088
- };
1089
-
1090
- type Graph<Id extends string, Metadata> = {
1091
- nodes: GraphNode<Id>[];
1092
- edges: GraphEdge<Id, Metadata>[];
1093
- };
1094
- type GraphNode<Id extends string> = Id;
1095
- type GraphEdge<Id extends string, Metadata> = {
1096
- from: Id;
1097
- to: Id;
1098
- predicateTraversable: (state: GraphState<Id, Metadata>) => boolean;
1099
- };
1100
- type GraphState<Id extends string, Metadata> = Record<Id, {
1101
- status: 'set' | 'unset';
1102
- metadata: Metadata;
1103
- }>;
1104
- type GraphStep<Id extends string, Metadata> = {
1105
- path: GraphNode<Id>[];
1106
- state: GraphState<Id, Metadata>;
1107
- };
1108
- type GraphCommonAncestor<Id extends string> = {
1109
- node: GraphNode<Id>;
1110
- distances: Record<GraphNode<Id>, number>;
1111
- };
1112
- type GraphTreeNode<Id extends string> = {
1113
- node: GraphNode<Id>;
1114
- children: GraphTreeNode<Id>[];
1115
- };
1116
- declare function defineGraph<Id extends string, Metadata>(nodes: GraphNode<Id>[], edges: GraphEdge<Id, Metadata>[]): {
1117
- nodes: Id[];
1118
- edges: GraphEdge<Id, Metadata>[];
1119
- };
1120
- declare function defineGraphNodes<Id extends string>(nodes: GraphNode<Id>[]): Id[];
1121
- declare function defineGraphEdges<Id extends string, Metadata>(edges: GraphEdge<Id, Metadata>[]): GraphEdge<Id, Metadata>[];
1122
- declare function defineGraphNode<Id extends string>(node: GraphNode<Id>): Id;
1123
- declare function defineGraphEdge<Id extends string, Metadata>(from: GraphNode<Id>, to: GraphNode<Id>, predicateTraversable: (state: GraphState<Id, Metadata>) => boolean): {
1124
- from: Id;
1125
- to: Id;
1126
- predicateTraversable: (state: GraphState<Id, Metadata>) => boolean;
1127
- };
1128
- type AsyncGraph<Id extends string, Metadata> = {
1129
- nodes: GraphNode<Id>[];
1130
- edges: AsyncGraphEdge<Id, Metadata>[];
1131
- };
1132
- type AsyncGraphEdge<Id extends string, Metadata> = {
1133
- from: Id;
1134
- to: Id;
1135
- predicateTraversable: (metadata: GraphState<Id, Metadata>) => Promise<boolean>;
1136
- };
1137
- declare function defineAsyncGraph<Id extends string, Metadata>(nodes: GraphNode<Id>[], edges: AsyncGraphEdge<Id, Metadata>[]): {
1138
- nodes: Id[];
1139
- edges: AsyncGraphEdge<Id, Metadata>[];
1140
- };
1141
- declare function defineAsyncGraphEdges<Id extends string, Metadata>(edges: AsyncGraphEdge<Id, Metadata>[]): AsyncGraphEdge<Id, Metadata>[];
1142
- declare function defineAsyncGraphEdge<Id extends string, Metadata>(from: GraphNode<Id>, to: GraphNode<Id>, predicateTraversable: (metadata: GraphState<Id, Metadata>) => Promise<boolean>): {
1143
- from: Id;
1144
- to: Id;
1145
- predicateTraversable: (metadata: GraphState<Id, Metadata>) => Promise<boolean>;
1146
- };
1147
-
1148
- type GeneratorFn<Parameter, Yielded> = (param: Parameter) => Generator<Yielded>;
1149
-
1150
- type GraphFn<Id extends string, Metadata, Returned> = (graph: Graph<Id, Metadata>) => Returned;
1151
- type GraphGeneratorFn<Id extends string, Metadata, Yielded> = GeneratorFn<Graph<Id, Metadata>, Yielded>;
1152
- type GraphNodeFn<Id extends string, Returned> = (node: GraphNode<Id>) => Returned;
1153
- type GraphNodeGeneratorFn<Id extends string, Yielded> = GeneratorFn<GraphNode<Id>, Yielded>;
1154
- type GraphNodeTupleFn<Id extends string, Returned> = (...nodes: [GraphNode<Id>, GraphNode<Id>]) => Returned;
1155
- type GraphNodeTupleGeneratorFn<Id extends string, Yielded> = (...nodes: [GraphNode<Id>, GraphNode<Id>]) => Generator<Yielded>;
1156
- type GraphStateFn<Id extends string, Metadata, Returned> = (state: GraphState<Id, Metadata>) => Returned;
1157
- declare function createToIndegree<Id extends string, Metadata, GraphType extends Graph<Id, Metadata> | AsyncGraph<Id, Metadata>>(graph: GraphType): GraphNodeFn<Id, number>;
1158
- declare function createToOutdegree<Id extends string, Metadata, GraphType extends Graph<Id, Metadata> | AsyncGraph<Id, Metadata>>(graph: GraphType): GraphNodeFn<Id, number>;
1159
- declare function createToIncoming<Id extends string, Metadata, GraphType extends Graph<Id, Metadata> | AsyncGraph<Id, Metadata>>(graph: GraphType): GraphNodeGeneratorFn<Id, GraphType extends AsyncGraph<Id, Metadata> ? AsyncGraphEdge<Id, Metadata> : GraphEdge<Id, Metadata>>;
1160
- declare function createToOutgoing<Id extends string, Metadata, GraphType extends Graph<Id, Metadata> | AsyncGraph<Id, Metadata>>(graph: GraphType): GraphNodeGeneratorFn<Id, GraphType extends AsyncGraph<Id, Metadata> ? AsyncGraphEdge<Id, Metadata> : GraphEdge<Id, Metadata>>;
1161
- declare function createPredicateRoot<Id extends string, Metadata, GraphType extends Graph<Id, Metadata> | AsyncGraph<Id, Metadata>>(graph: GraphType): GraphNodeFn<Id, boolean>;
1162
-
1163
- type AsyncGeneratorFn<Parameter, Yielded> = (param: Parameter) => AsyncGenerator<Yielded>;
1164
-
1165
- type AsyncGraphFn<Id extends string, Metadata, Returned> = (graph: AsyncGraph<Id, Metadata>) => Promise<Returned>;
1166
- type AsyncGraphGeneratorFn<Id extends string, Metadata, Yielded> = GeneratorFn<AsyncGraph<Id, Metadata>, Yielded>;
1167
- type AsyncGraphAsyncGeneratorFn<Id extends string, Metadata, Yielded> = AsyncGeneratorFn<AsyncGraph<Id, Metadata>, Yielded>;
1168
- type GraphNodeAsyncGeneratorFn<Id extends string, Yielded> = AsyncGeneratorFn<GraphNode<Id>, Yielded>;
1169
- type GraphNodeTupleAsyncFn<Id extends string, Returned> = (...nodes: [GraphNode<Id>, GraphNode<Id>]) => Promise<Returned>;
1170
- type GraphNodeTupleAsyncGeneratorFn<Id extends string, Yielded> = (...nodes: [GraphNode<Id>, GraphNode<Id>]) => AsyncGenerator<Yielded>;
1171
- type GraphStateAsyncFn<Id extends string, Metadata, Returned> = (state: GraphState<Id, Metadata>) => Promise<Returned>;
1172
-
1173
- declare function createToLayers$1<Id extends string, Metadata>(options?: {
1174
- createToSteps?: CreateToStepsOptions$2<Id, Metadata>;
1175
- }): GraphFn<Id, Metadata, GraphNode<Id>[][]>;
1176
- declare function createToTree$2<Id extends string, Metadata>(options?: {
1177
- createToSteps?: CreateToStepsOptions$2<Id, Metadata>;
1178
- }): GraphFn<Id, Metadata, GraphTreeNode<Id>[]>;
1179
- declare function createToCommonAncestors$2<Id extends string, Metadata>(directedAcyclic: Graph<Id, Metadata>): GraphNodeTupleGeneratorFn<Id, GraphCommonAncestor<Id>>;
1180
- declare function createPredicateAncestor$2<Id extends string, Metadata>(directedAcyclic: Graph<Id, Metadata>): GraphNodeTupleFn<Id, boolean>;
1181
- declare function createToNodeSteps$2<Id extends string, Metadata>(directedAcyclic: Graph<Id, Metadata>, options?: {
1182
- createToSteps?: CreateToStepsOptions$2<Id, Metadata>;
1183
- }): GraphNodeGeneratorFn<Id, GraphStep<Id, Metadata>>;
1184
- type CreateToStepsOptions$2<Id extends string, Metadata> = {
1185
- root?: GraphNode<Id>;
1186
- toMockMetadata?: (node: GraphNode<Id>, totalConnectionsFollowed: number) => Metadata;
1187
- toUnsetMetadata?: (node: GraphNode<Id>) => Metadata;
1188
- kind?: 'directed acyclic' | 'arborescence';
1189
- };
1190
- declare function createToSteps$2<Id extends string, Metadata>(options?: CreateToStepsOptions$2<Id, Metadata>): GraphGeneratorFn<Id, Metadata, GraphStep<Id, Metadata>>;
1191
- declare function createToPath$2<Id extends string, Metadata>(directedAcyclic: Graph<Id, Metadata>): GraphStateFn<Id, Metadata, GraphNode<Id>[]>;
1192
- declare function createToRoots<Id extends string, Metadata, GraphType extends Graph<Id, Metadata> | AsyncGraph<Id, Metadata> = Graph<Id, Metadata>>(options?: {
1193
- kind?: 'directed acyclic' | 'arborescence';
1194
- }): (GraphType extends AsyncGraph<Id, Metadata> ? AsyncGraphGeneratorFn<Id, Metadata, GraphNode<Id>> : GraphGeneratorFn<Id, Metadata, GraphNode<Id>>);
1195
-
1196
- declare function createToLayers<Id extends string, Metadata>(options?: {
1197
- createToSteps?: CreateToStepsOptions$2<Id, Metadata>;
1198
- }): AsyncGraphFn<Id, Metadata, GraphNode<Id>[][]>;
1199
- declare function createToTree$1<Id extends string, Metadata>(options?: {
1200
- createToSteps?: CreateToStepsOptions$1<Id, Metadata>;
1201
- }): AsyncGraphFn<Id, Metadata, GraphTreeNode<Id>[]>;
1202
- declare function createToCommonAncestors$1<Id extends string, Metadata>(directedAcyclic: AsyncGraph<Id, Metadata>): GraphNodeTupleAsyncGeneratorFn<Id, GraphCommonAncestor<Id>>;
1203
- declare function createPredicateAncestor$1<Id extends string, Metadata>(directedAcyclic: AsyncGraph<Id, Metadata>): GraphNodeTupleAsyncFn<Id, boolean>;
1204
- declare function createToNodeSteps$1<Id extends string, Metadata>(directedAcyclic: AsyncGraph<Id, Metadata>, options?: {
1205
- createToSteps?: CreateToStepsOptions$1<Id, Metadata>;
1206
- }): GraphNodeAsyncGeneratorFn<Id, GraphStep<Id, Metadata>>;
1207
- type CreateToStepsOptions$1<Id extends string, Metadata> = CreateToStepsOptions$2<Id, Metadata>;
1208
- declare function createToSteps$1<Id extends string, Metadata>(options?: CreateToStepsOptions$1<Id, Metadata>): AsyncGraphAsyncGeneratorFn<Id, Metadata, GraphStep<Id, Metadata>>;
1209
- declare function createToPath$1<Id extends string, Metadata>(directedAcyclic: AsyncGraph<Id, Metadata>): GraphStateAsyncFn<Id, Metadata, GraphNode<Id>[]>;
1210
-
1211
- type CreateToStepsOptions<Id extends string> = Expand<Pick<CreateToStepsOptions$2<Id, DecisionTreeMetadata>, 'kind'> & {
1212
- priorityBranch?: boolean;
1213
- }>;
1214
- type DecisionTree<Id extends string> = Graph<Id, DecisionTreeMetadata>;
1215
- type DecisionTreeMetadata = boolean;
1216
- declare function createToTree<Id extends string>(options?: {
1217
- createToSteps?: CreateToStepsOptions<Id>;
1218
- }): GraphFn<Id, boolean, GraphTreeNode<Id>[]>;
1219
- declare function createToCommonAncestors<Id extends string>(...params: Parameters<typeof createToCommonAncestors$2<Id, DecisionTreeMetadata>>): GraphNodeTupleGeneratorFn<Id, GraphCommonAncestor<Id>>;
1220
- declare function createPredicateAncestor<Id extends string>(...params: Parameters<typeof createPredicateAncestor$2<Id, DecisionTreeMetadata>>): GraphNodeTupleFn<Id, boolean>;
1221
- declare function createToNodeSteps<Id extends string>(decisionTree: DecisionTree<Id>, options?: {
1222
- createToSteps?: CreateToStepsOptions<Id>;
1223
- }): GraphNodeGeneratorFn<Id, GraphStep<Id, boolean>>;
1224
- declare function createToSteps<Id extends string>(options?: CreateToStepsOptions<Id>): GraphGeneratorFn<Id, boolean, GraphStep<Id, boolean>>;
1225
- declare function createToPath<Id extends string>(...params: Parameters<typeof createToPath$2<Id, DecisionTreeMetadata>>): GraphStateFn<Id, boolean, Id[]>;
1226
-
1227
- type GraphTreeFn<Id extends string, Returned> = (tree: GraphTreeNode<Id>[]) => Returned;
1228
- declare function createFind<Id extends string>(node: GraphNode<Id>): GraphTreeFn<Id, GraphTreeNode<Id>>;
1229
-
1230
- type ManyFn<Parameter, Returned> = (...params: Parameter[]) => Returned;
1231
-
1232
- declare function createList(): ManyFn<ClassValue, string>;
1233
-
1234
- type ToGraphYielded = {
1235
- node: GraphNode<string>;
1236
- edge: PartialGraphEdge | undefined;
1237
- };
1238
- type PartialGraphEdge = Omit<GraphEdge<string, unknown>, 'predicateTraversable'>;
1239
- type CreateToGraphOptions<TreeNode> = {
1240
- toId?: (node: TreeNode) => string;
1241
- toChildren?: (node: TreeNode) => TreeNode[];
1242
- };
1243
- declare function createToGraph<TreeNode>(options?: CreateToGraphOptions<TreeNode>): GeneratorFn<TreeNode[], ToGraphYielded>;
1244
-
1245
- type KeyboardEventFn<Returned> = (keyboardEvent: KeyboardEvent) => Returned;
1246
- type CreatePredicateKeycomboMatchOptions = {
1247
- toDownKeys?: (alias: string) => KeyStatusKey[];
1248
- toAliases?: (event: KeyboardEvent) => string[];
1249
- };
1250
- declare const createPredicateKeycomboMatch: (keycombo: string, options?: CreatePredicateKeycomboMatchOptions) => KeyboardEventFn<boolean>;
1588
+ declare function createTouchrelease(options?: TouchreleaseOptions): {
1589
+ touchstart: RecognizeableEffect<"touchstart", TouchreleaseMetadata>;
1590
+ touchmove: RecognizeableEffect<"touchmove", TouchreleaseMetadata>;
1591
+ touchcancel: RecognizeableEffect<"touchcancel", TouchreleaseMetadata>;
1592
+ touchend: RecognizeableEffect<"touchend", TouchreleaseMetadata>;
1593
+ };
1594
+ declare class Touchrelease extends Listenable<TouchreleaseType, TouchreleaseMetadata> {
1595
+ constructor(options?: TouchreleaseOptions);
1596
+ get metadata(): TouchreleaseMetadata;
1597
+ }
1251
1598
 
1252
- export { AnimateFrame, AnimateFrameEffect, AnimateOptions, Animateable, AnimateableKeyframe, AnimateableOptions, AnimateableStatus, AssociativeArray, AssociativeArrayEntries, AssociativeArrayOptions, AsyncGraph, AsyncGraphEdge, Broadcastable, BroadcastableOptions, BroadcastableStatus, Compareable, CompareableOptions, CompareableStatus, CompleteOptions, Completeable, CompleteableOptions, CompleteableStatus, Copyable, CopyableOptions, CopyableStatus, CreateToStepsOptions$1 as CreateAsyncDirectedAcyclicToStepsOptions, CreateToStepsOptions as CreateDecisionTreeToStepsOptions, CreateToStepsOptions$2 as CreateDirectedAcyclicToStepsOptions, CreatePredicateKeycomboMatchOptions, CreateFocusableOptions as CreateToFocusableOptions, CreateToGraphOptions, Delayable, DelayableEffect, DelayableOptions, DelayableStatus, Drawable, DrawableOptions, DrawableState, DrawableStatus, Fetchable, FetchableOptions, FetchableStatus, Fullscreenable, FullscreenableGetElement, FullscreenableOptions, FullscreenableStatus, Grantable, GrantableOptions, GrantableStatus, Graph, GraphCommonAncestor, GraphEdge, GraphNode, GraphState, GraphStep, GraphTreeNode, KeychordHook, KeychordHookApi, KeychordMetadata, KeychordOptions, KeychordType, KeypressHook, KeypressHookApi, KeypressMetadata, KeypressOptions, KeypressType, KeyreleaseHook, KeyreleaseHookApi, KeyreleaseMetadata, KeyreleaseOptions, KeyreleaseType, KonamiHook, KonamiHookApi, KonamiMetadata, KonamiOptions, KonamiType, ListenEffect, ListenEffectParam, ListenOptions, Listenable, ListenableActive, ListenableKeycombo, ListenableMousecombo, ListenableOptions, ListenablePointercombo, ListenableStatus, ListenableSupportedEventType, ListenableSupportedType, MousepressHook, MousepressHookApi, MousepressMetadata, MousepressOptions, MousepressType, MousereleaseHook, MousereleaseHookApi, MousereleaseMetadata, MousereleaseOptions, MousereleaseType, Navigateable, NavigateableOptions, NavigateableStatus, Pickable, PickableOptions, PickableStatus, Potentiality, RecognizeOptions, Recognizeable, RecognizeableEffect, RecognizeableOptions, RecognizeableStatus, Resolveable, ResolveableGetPromise, ResolveableOptions, ResolveableStatus, Sanitizeable, SanitizeableOptions, SanitizeableStatus, Searchable, SearchableOptions, SearchableStatus, Shareable, ShareableOptions, ShareableStatus, Storeable, StoreableOptions, StoreableStatus, ToGraphYielded, TouchpressHook, TouchpressHookApi, TouchpressMetadata, TouchpressOptions, TouchpressType, TouchreleaseHook, TouchreleaseHookApi, TouchreleaseMetadata, TouchreleaseOptions, TouchreleaseType, createAssociativeArray, createPredicateAncestor$1 as createAsyncDirectedAcyclicPredicateAncestor, createToCommonAncestors$1 as createAsyncDirectedAcyclicToCommonAncestors, createToLayers as createAsyncDirectedAcyclicToLayers, createToNodeSteps$1 as createAsyncDirectedAcyclicToNodeSteps, createToPath$1 as createAsyncDirectedAcyclicToPath, createToSteps$1 as createAsyncDirectedAcyclicToSteps, createToTree$1 as createAsyncDirectedAcyclicToTree, createClamp, createClip, createClone, createConcat, createPredicateAncestor as createDecisionTreePredicateAncestor, createToCommonAncestors as createDecisionTreeToCommonAncestors, createToNodeSteps as createDecisionTreeToNodeSteps, createToPath as createDecisionTreeToPath, createToSteps as createDecisionTreeToSteps, createToTree as createDecisionTreeToTree, createDetermine, createPredicateAncestor$2 as createDirectedAcyclicPredicateAncestor, createToCommonAncestors$2 as createDirectedAcyclicToCommonAncestors, createToLayers$1 as createDirectedAcyclicToLayers, createToNodeSteps$2 as createDirectedAcyclicToNodeSteps, createToPath$2 as createDirectedAcyclicToPath, createToRoots as createDirectedAcyclicToRoots, createToSteps$2 as createDirectedAcyclicToSteps, createToTree$2 as createDirectedAcyclicToTree, createEntries, createEqual, createEvery, createFilter, createFilterAsync, createFindAsync, createFindIndexAsync, createFocusable, createForEachAsync, createInsert, createKeychord, createKeypress, createKeyrelease, createKeys, createKonami, createList, createMap, createMapAsync, createMousepress, createMouserelease, createPredicateKeycomboMatch, createPredicateRoot, createReduce, createReduceAsync, createRemove, createRename, createReorder, createReplace, createReverse, createSlice, createSlug, createSome, createSort, createSwap, createToGraph, createToIncoming, createToIndegree, createToOutdegree, createToOutgoing, createTouchpress, createTouchrelease, createFind as createTreeFind, createUnique, defineAssociativeArrayEntries, defineAsyncGraph, defineAsyncGraphEdge, defineAsyncGraphEdges, defineGraph, defineGraphEdge, defineGraphEdges, defineGraphNode, defineGraphNodes, easingsNetInBack, easingsNetInCirc, easingsNetInCubic, easingsNetInExpo, easingsNetInOutBack, easingsNetInOutCirc, easingsNetInOutCubic, easingsNetInOutExpo, easingsNetInOutQuad, easingsNetInOutQuint, easingsNetInOutSine, easingsNetInQuad, easingsNetInQuart, easingsNetInQuint, easingsNetInSine, easingsNetOutBack, easingsNetOutCirc, easingsNetOutCubic, easingsNetOutExpo, easingsNetOutQuad, easingsNetOutQuint, easingsNetOutSine, linear, materialAccelerated, materialDecelerated, materialStandard, toD, toFlattenedD, toMessageListenParams, verouEase, verouEaseIn, verouEaseInOut, verouEaseOut };
1599
+ export { AnimateFrame, AnimateFrameEffect, AnimateOptions, Animateable, AnimateableKeyframe, AnimateableOptions, AnimateableStatus, Broadcastable, BroadcastableOptions, BroadcastableStatus, ColorInterpolationMethod, Compareable, CompareableOptions, CompareableStatus, CompleteOptions, Completeable, CompleteableOptions, CompleteableStatus, Copyable, CopyableOptions, CopyableStatus, CreateStepsOptions$1 as CreateDirectedAcyclicStepsOptions, CreateFocusableOptions, CreateGraphOptions, CreateKeycomboMatchOptions, CreateMixOptions, CreatePathConfig, CreateResultsOptions, Delayable, DelayableEffect, DelayableOptions, DelayableStatus, Drawable, DrawableOptions, DrawableStatus, DrawableStroke, Fetchable, FetchableOptions, FetchableStatus, Fullscreenable, FullscreenableGetElement, FullscreenableOptions, FullscreenableStatus, Grantable, GrantableOptions, GrantableStatus, Keychord, KeychordHook, KeychordHookApi, KeychordMetadata, KeychordOptions, KeychordType, Keypress, KeypressHook, KeypressHookApi, KeypressMetadata, KeypressOptions, KeypressType, Keyrelease, KeyreleaseHook, KeyreleaseHookApi, KeyreleaseMetadata, KeyreleaseOptions, KeyreleaseType, Konami, KonamiHook, KonamiHookApi, KonamiMetadata, KonamiOptions, KonamiType, ListenEffect, ListenEffectParam, ListenOptions, Listenable, ListenableActive, ListenableKeycombo, ListenableMousecombo, ListenableOptions, ListenablePointercombo, ListenableStatus, ListenableSupportedEventType, ListenableSupportedType, MixColor, Mousepress, MousepressHook, MousepressHookApi, MousepressMetadata, MousepressOptions, MousepressType, Mouserelease, MousereleaseHook, MousereleaseHookApi, MousereleaseMetadata, MousereleaseOptions, MousereleaseType, Navigateable, NavigateableOptions, NavigateableStatus, Pickable, PickableOptions, PickableStatus, Potentiality, RecognizeOptions, Recognizeable, RecognizeableEffect, RecognizeableOptions, RecognizeableStatus, Resolveable, ResolveableOptions, ResolveableStatus, Shareable, ShareableOptions, ShareableStatus, Storeable, StoreableOptions, StoreableStatus, ToGraphYielded, Touchpress, TouchpressHook, TouchpressHookApi, TouchpressMetadata, TouchpressOptions, TouchpressType, Touchrelease, TouchreleaseHook, TouchreleaseHookApi, TouchreleaseMetadata, TouchreleaseOptions, TouchreleaseType, createClear$1 as createAssociativeArrayClear, createDelete$1 as createAssociativeArrayDelete, createHas$1 as createAssociativeArrayHas, createKeys$1 as createAssociativeArrayKeys, createSet$1 as createAssociativeArraySet, createValue$1 as createAssociativeArrayValue, createValues as createAssociativeArrayValues, createBreadthPathConfig, createChildren, createClamp, createClear, createClip, createClone, createComputedStyle, createConcat, createAncestor$1 as createDecisionTreeAncestor, createCommonAncestors$1 as createDecisionTreeCommonAncestors, createNodeDepthFirstSteps$1 as createDecisionTreeNodeDepthFirstSteps, createPath$1 as createDecisionTreePath, createDepthFirstSteps$1 as createDecisionTreeSteps, createTree$1 as createDecisionTreeTree, createDeepEqual, createDeepMerge, createDelete, createDepthPathConfig, createDetermine, createAncestor$2 as createDirectedAcyclicAncestor, createAncestor as createDirectedAcyclicAsyncAncestor, createCommonAncestors as createDirectedAcyclicAsyncCommonAncestors, createDepthFirstSteps as createDirectedAcyclicAsyncDepthFirstSteps, createLayers as createDirectedAcyclicAsyncLayers, createNodeDepthFirstSteps as createDirectedAcyclicAsyncNodeDepthFirstSteps, createPath as createDirectedAcyclicAsyncPath, createTree as createDirectedAcyclicAsyncTree, createCommonAncestors$2 as createDirectedAcyclicCommonAncestors, createDepthFirstSteps$2 as createDirectedAcyclicDepthFirstSteps, createLayers$1 as createDirectedAcyclicLayers, createNodeDepthFirstSteps$2 as createDirectedAcyclicNodeDepthFirstSteps, createPath$2 as createDirectedAcyclicPath, createRoots as createDirectedAcyclicRoots, createTree$2 as createDirectedAcyclicTree, createEntries, createEqual, createEvery, createFilter, createFilterAsync, createFindAsync, createFindIndexAsync, createFocusable, createForEachAsync, createGraph, createGreater, createGreaterOrEqual, createHas, createIncoming, createIndegree, createInsert, createKeychord, createKeycomboMatch, createKeypress, createKeyrelease, createKeys, createKonami, createLess, createLessOrEqual, createList, createMap, createMapAsync, createMix, createMousepress, createMouserelease, createNumber, createOnlyChild, createOutdegree, createOutgoing, createReduce, createReduceAsync, createRemove, createReorder, createReplace, createResults, createReverse, createRoot, createSanitize, createSet, createShuffle, createSiblings, createSlice, createSlug, createSome, createSort, createSwap, createTerminal, createTotalSiblings, createTouchpress, createTouchrelease, createFind as createTreeFind, createUnique, createValue, easingsNetInBack, easingsNetInCirc, easingsNetInCubic, easingsNetInExpo, easingsNetInOutBack, easingsNetInOutCirc, easingsNetInOutCubic, easingsNetInOutExpo, easingsNetInOutQuad, easingsNetInOutQuint, easingsNetInOutSine, easingsNetInQuad, easingsNetInQuart, easingsNetInQuint, easingsNetInSine, easingsNetOutBack, easingsNetOutCirc, easingsNetOutCubic, easingsNetOutExpo, easingsNetOutQuad, easingsNetOutQuint, easingsNetOutSine, linear, materialAccelerated, materialDecelerated, materialStandard, toD, toFlattenedD, toMessageListenParams, verouEase, verouEaseIn, verouEaseInOut, verouEaseOut };