@baleada/logic 0.24.18 → 0.24.20
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.
- package/lib/index.cjs +854 -640
- package/lib/index.d.ts +239 -123
- package/lib/index.js +847 -631
- package/package.json +15 -13
package/lib/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
+
import * as perfect_freehand from 'perfect-freehand';
|
|
1
2
|
import { getStroke, StrokeOptions } from 'perfect-freehand';
|
|
2
|
-
import * as ky_distribution_types_ky from 'ky/distribution/types/ky';
|
|
3
3
|
import ky, { Options as Options$1 } from 'ky';
|
|
4
4
|
import { ClassValue } from 'clsx';
|
|
5
5
|
import { FullOptions, sortKind, MatchData } from 'fast-fuzzy';
|
|
@@ -122,6 +122,7 @@ declare function createClear$1<Key extends any, Value extends any>(): Associativ
|
|
|
122
122
|
declare function createDelete$1<Key extends any>(key: Key, options?: WithPredicateKey<Key>): AssociativeArrayEffect<Key, any>;
|
|
123
123
|
|
|
124
124
|
type AssociativeArray<Key, Value> = [Key, Value][];
|
|
125
|
+
declare function defineAssociativeArray<Key, Value>(associativeArray: AssociativeArray<Key, Value>): AssociativeArray<Key, Value>;
|
|
125
126
|
|
|
126
127
|
type KeyStatusCode = string;
|
|
127
128
|
|
|
@@ -145,6 +146,14 @@ type KeyboardEventDescriptor = {
|
|
|
145
146
|
metaKey?: boolean;
|
|
146
147
|
};
|
|
147
148
|
|
|
149
|
+
declare function fromKeyboardEventDescriptorToAliases(descriptor: KeyboardEventDescriptor): string[];
|
|
150
|
+
|
|
151
|
+
declare function fromCodeToAliases(code: KeyStatusCode): string[];
|
|
152
|
+
|
|
153
|
+
declare function fromAliasToCode(alias: string): KeyStatusCode;
|
|
154
|
+
|
|
155
|
+
declare function fromShorthandAliasToLonghandAlias(shorthand: string): string;
|
|
156
|
+
|
|
148
157
|
type Direction = 'up' | 'upRight' | 'right' | 'downRight' | 'down' | 'downLeft' | 'left' | 'upLeft' | 'none';
|
|
149
158
|
|
|
150
159
|
type HookApi<Type extends ListenableSupportedType, Metadata extends Record<any, any>> = {
|
|
@@ -244,6 +253,18 @@ type GraphTreeNode<Id extends string> = {
|
|
|
244
253
|
children: GraphTreeNode<Id>[];
|
|
245
254
|
};
|
|
246
255
|
type GraphTree<Id extends string> = GraphTreeNode<Id>[];
|
|
256
|
+
declare function defineGraph<Id extends string, StateValue>(nodes: GraphNode<Id>[], edges: GraphEdge<Id, StateValue>[]): {
|
|
257
|
+
nodes: Id[];
|
|
258
|
+
edges: GraphEdge<Id, StateValue>[];
|
|
259
|
+
};
|
|
260
|
+
declare function defineGraphNodes<Id extends string>(nodes: GraphNode<Id>[]): Id[];
|
|
261
|
+
declare function defineGraphEdges<Id extends string, StateValue>(edges: GraphEdge<Id, StateValue>[]): GraphEdge<Id, StateValue>[];
|
|
262
|
+
declare function defineGraphNode<Id extends string>(node: GraphNode<Id>): Id;
|
|
263
|
+
declare function defineGraphEdge<Id extends string, StateValue>(from: GraphNode<Id>, to: GraphNode<Id>, predicateShouldTraverse: (state: GraphState<Id, StateValue>) => boolean): {
|
|
264
|
+
from: Id;
|
|
265
|
+
to: Id;
|
|
266
|
+
predicateShouldTraverse: (state: GraphState<Id, StateValue>) => boolean;
|
|
267
|
+
};
|
|
247
268
|
type GraphAsync<Id extends string, StateValue> = {
|
|
248
269
|
nodes: GraphNode<Id>[];
|
|
249
270
|
edges: GraphAsyncEdge<Id, StateValue>[];
|
|
@@ -253,6 +274,16 @@ type GraphAsyncEdge<Id extends string, StateValue> = {
|
|
|
253
274
|
to: Id;
|
|
254
275
|
predicateShouldTraverse: (state: GraphState<Id, StateValue>) => Promise<boolean>;
|
|
255
276
|
};
|
|
277
|
+
declare function defineGraphAsync<Id extends string, StateValue>(nodes: GraphNode<Id>[], edges: GraphAsyncEdge<Id, StateValue>[]): {
|
|
278
|
+
nodes: Id[];
|
|
279
|
+
edges: GraphAsyncEdge<Id, StateValue>[];
|
|
280
|
+
};
|
|
281
|
+
declare function defineGraphAsyncEdges<Id extends string, StateValue>(edges: GraphAsyncEdge<Id, StateValue>[]): GraphAsyncEdge<Id, StateValue>[];
|
|
282
|
+
declare function defineGraphAsyncEdge<Id extends string, StateValue>(from: GraphNode<Id>, to: GraphNode<Id>, predicateShouldTraverse: (state: GraphState<Id, StateValue>) => Promise<boolean>): {
|
|
283
|
+
from: Id;
|
|
284
|
+
to: Id;
|
|
285
|
+
predicateShouldTraverse: (state: GraphState<Id, StateValue>) => Promise<boolean>;
|
|
286
|
+
};
|
|
256
287
|
|
|
257
288
|
type RecognizeableOptions<Type extends ListenableSupportedType, Metadata extends Record<any, any>> = {
|
|
258
289
|
maxSequenceLength?: true | number;
|
|
@@ -313,7 +344,8 @@ declare class Recognizeable<Type extends ListenableSupportedType, Metadata exten
|
|
|
313
344
|
private toType;
|
|
314
345
|
}
|
|
315
346
|
|
|
316
|
-
type ListenableSupportedType = 'recognizeable' | 'intersect' | 'mutate' | 'resize' | 'idle' | 'message' | 'messageerror' | ListenableMediaQuery | keyof Omit<HTMLElementEventMap, 'resize'> | keyof Omit<DocumentEventMap, 'resize'
|
|
347
|
+
type ListenableSupportedType = 'recognizeable' | 'intersect' | 'mutate' | 'resize' | 'idle' | 'message' | 'messageerror' | ListenableMediaQuery | keyof Omit<HTMLElementEventMap, 'resize'> | keyof Omit<DocumentEventMap, 'resize'> | keyof IDBEventMap;
|
|
348
|
+
type IDBEventMap = IDBRequestEventMap & IDBTransactionEventMap & IDBOpenDBRequestEventMap & IDBDatabaseEventMap;
|
|
317
349
|
type ListenableMediaQuery = `(${string})`;
|
|
318
350
|
type ListenableMousecombo = `${string}+${ListenableLeftClick | ListenableRightClick}`;
|
|
319
351
|
type ListenableLeftClick = 'click' | 'dblclick' | `mouse${string}`;
|
|
@@ -325,8 +357,8 @@ type ListenableSupportedEventType = keyof Omit<HTMLElementEventMap, 'resize'> |
|
|
|
325
357
|
type ListenableOptions<Type extends ListenableSupportedType, RecognizeableMetadata extends Record<any, any> = Record<any, any>> = {
|
|
326
358
|
recognizeable?: RecognizeableOptions<Type, RecognizeableMetadata>;
|
|
327
359
|
};
|
|
328
|
-
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;
|
|
329
|
-
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;
|
|
360
|
+
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 : Type extends keyof IDBEventMap ? (event: ListenEffectParam<Type>) => any : never;
|
|
361
|
+
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] : Type extends keyof IDBEventMap ? IDBEventMap[Type] : never;
|
|
330
362
|
type ListenOptions<Type extends ListenableSupportedType> = Type extends 'intersect' ? {
|
|
331
363
|
observer?: IntersectionObserverInit;
|
|
332
364
|
} & ObservationListenOptions : Type extends 'mutate' ? {
|
|
@@ -339,17 +371,18 @@ type ListenOptions<Type extends ListenableSupportedType> = Type extends 'interse
|
|
|
339
371
|
target?: BroadcastChannel;
|
|
340
372
|
} : Type extends ListenableMediaQuery ? {
|
|
341
373
|
instantEffect?: (list: MediaQueryList) => any;
|
|
342
|
-
} : Type extends keyof Omit<HTMLElementEventMap, 'resize'> ? EventListenOptions : Type extends keyof Omit<DocumentEventMap, 'resize'> ? EventListenOptions : never;
|
|
374
|
+
} : Type extends keyof Omit<HTMLElementEventMap, 'resize'> ? EventListenOptions : Type extends keyof Omit<DocumentEventMap, 'resize'> ? EventListenOptions : Type extends keyof IDBEventMap ? EventListenOptions : never;
|
|
343
375
|
type ObservationListenOptions = {
|
|
344
376
|
target?: Element;
|
|
345
377
|
};
|
|
346
378
|
type EventListenOptions = {
|
|
347
|
-
target?: Element | Document | (Window & typeof globalThis);
|
|
379
|
+
target?: Element | Document | (Window & typeof globalThis) | IDB;
|
|
348
380
|
addEventListener?: AddEventListenerOptions;
|
|
349
381
|
useCapture?: boolean;
|
|
350
382
|
except?: string[];
|
|
351
383
|
only?: string[];
|
|
352
384
|
};
|
|
385
|
+
type IDB = (IDBRequest | IDBOpenDBRequest | IDBTransaction | IDBDatabase);
|
|
353
386
|
type ListenableActive<Type extends ListenableSupportedType, RecognizeableMetadata extends Record<any, any> = Record<any, any>> = Type extends 'intersect' ? {
|
|
354
387
|
target: Element;
|
|
355
388
|
id: IntersectionObserver;
|
|
@@ -796,6 +829,7 @@ type AnimateableKeyframe<Value extends string | number | any[]> = {
|
|
|
796
829
|
timing?: AnimateableTiming;
|
|
797
830
|
};
|
|
798
831
|
type AnimateableValue<Value extends string | number | any[]> = Value extends `${string} ${number}%` ? never : (Value | number | any[]);
|
|
832
|
+
declare function defineAnimateableKeyframes<Value extends string | number | any[]>(keyframes: AnimateableKeyframe<Value>[]): AnimateableKeyframe<Value>[];
|
|
799
833
|
type AnimateableOptions = {
|
|
800
834
|
duration?: number;
|
|
801
835
|
timing?: AnimateableTiming;
|
|
@@ -1141,8 +1175,8 @@ declare class Drawable {
|
|
|
1141
1175
|
constructor(stroke: DrawableStroke, options?: DrawableOptions);
|
|
1142
1176
|
computedStatus: DrawableStatus;
|
|
1143
1177
|
private ready;
|
|
1144
|
-
get stroke():
|
|
1145
|
-
set stroke(stroke:
|
|
1178
|
+
get stroke(): perfect_freehand.Vec2[];
|
|
1179
|
+
set stroke(stroke: perfect_freehand.Vec2[]);
|
|
1146
1180
|
get status(): DrawableStatus;
|
|
1147
1181
|
get d(): string;
|
|
1148
1182
|
private computedStroke;
|
|
@@ -1190,7 +1224,7 @@ type FetchMethodOptions = Omit<FetchOptions, 'method'>;
|
|
|
1190
1224
|
/**
|
|
1191
1225
|
* [Docs](https://baleada.dev/docs/logic/classes/fetchable)
|
|
1192
1226
|
*/
|
|
1193
|
-
declare class Fetchable {
|
|
1227
|
+
declare class Fetchable<ResolveableValue> {
|
|
1194
1228
|
private computedArrayBuffer;
|
|
1195
1229
|
private computedBlob;
|
|
1196
1230
|
private computedFormData;
|
|
@@ -1203,7 +1237,7 @@ declare class Fetchable {
|
|
|
1203
1237
|
set resource(resource: string);
|
|
1204
1238
|
get status(): FetchableStatus;
|
|
1205
1239
|
private computedKy;
|
|
1206
|
-
get ky():
|
|
1240
|
+
get ky(): ky.KyInstance;
|
|
1207
1241
|
private computedAbortController;
|
|
1208
1242
|
get abortController(): AbortController;
|
|
1209
1243
|
private computedRetryCount;
|
|
@@ -1213,7 +1247,7 @@ declare class Fetchable {
|
|
|
1213
1247
|
get arrayBuffer(): Resolveable<ArrayBuffer>;
|
|
1214
1248
|
get blob(): Resolveable<Blob>;
|
|
1215
1249
|
get formData(): Resolveable<FormData>;
|
|
1216
|
-
get json(): Resolveable<
|
|
1250
|
+
get json(): Resolveable<ResolveableValue>;
|
|
1217
1251
|
get text(): Resolveable<string>;
|
|
1218
1252
|
private computedResource;
|
|
1219
1253
|
setResource(resource: string): this;
|
|
@@ -1327,6 +1361,111 @@ declare class Navigateable<Item> {
|
|
|
1327
1361
|
private lasted;
|
|
1328
1362
|
}
|
|
1329
1363
|
|
|
1364
|
+
type OperateableOptions = Record<never, never>;
|
|
1365
|
+
type OperateableStatus = ('ready' | 'operating' | 'operated' | 'errored');
|
|
1366
|
+
type OperationAdd<StoredObject extends Record<any, any> = Record<any, any>> = {
|
|
1367
|
+
operation: 'add';
|
|
1368
|
+
value: StoredObject;
|
|
1369
|
+
key?: IDBValidKey;
|
|
1370
|
+
};
|
|
1371
|
+
type OperationPut<StoredObject extends Record<any, any> = Record<any, any>> = {
|
|
1372
|
+
operation: 'put';
|
|
1373
|
+
value: StoredObject;
|
|
1374
|
+
key?: IDBValidKey;
|
|
1375
|
+
};
|
|
1376
|
+
type OperationGet<StoredObject extends Record<any, any> = Record<any, any>> = {
|
|
1377
|
+
operation: 'get';
|
|
1378
|
+
query: IDBValidKey | IDBKeyRange;
|
|
1379
|
+
effect?: (result: StoredObject) => void;
|
|
1380
|
+
};
|
|
1381
|
+
type OperationGetKey = {
|
|
1382
|
+
operation: 'getKey';
|
|
1383
|
+
query: IDBValidKey | IDBKeyRange;
|
|
1384
|
+
effect?: (result: IDBValidKey | undefined) => void;
|
|
1385
|
+
};
|
|
1386
|
+
type OperationGetAll<StoredObject extends Record<any, any> = Record<any, any>> = {
|
|
1387
|
+
operation: 'getAll';
|
|
1388
|
+
query?: IDBValidKey | IDBKeyRange | null;
|
|
1389
|
+
count?: number;
|
|
1390
|
+
effect?: (result: StoredObject) => void;
|
|
1391
|
+
};
|
|
1392
|
+
type OperationGetAllKeys = {
|
|
1393
|
+
operation: 'getAllKeys';
|
|
1394
|
+
query?: IDBValidKey | IDBKeyRange | null;
|
|
1395
|
+
count?: number;
|
|
1396
|
+
effect?: (result: IDBValidKey[]) => void;
|
|
1397
|
+
};
|
|
1398
|
+
type OperationGetAllRecords<StoredObject extends Record<any, any> = Record<any, any>> = {
|
|
1399
|
+
operation: 'getAllRecords';
|
|
1400
|
+
query?: IDBValidKey | IDBKeyRange | null;
|
|
1401
|
+
count?: number;
|
|
1402
|
+
effect?: (result: StoredObject) => void;
|
|
1403
|
+
};
|
|
1404
|
+
type OperationDelete = {
|
|
1405
|
+
operation: 'delete';
|
|
1406
|
+
query: IDBValidKey | IDBKeyRange;
|
|
1407
|
+
};
|
|
1408
|
+
type OperationClear = {
|
|
1409
|
+
operation: 'clear';
|
|
1410
|
+
};
|
|
1411
|
+
type OperationCount = {
|
|
1412
|
+
operation: 'count';
|
|
1413
|
+
query?: IDBValidKey | IDBKeyRange;
|
|
1414
|
+
effect?: (result: number) => void;
|
|
1415
|
+
};
|
|
1416
|
+
type OperationOpenCursor<StoredObject extends Record<any, any> = Record<any, any>> = {
|
|
1417
|
+
operation: 'openCursor';
|
|
1418
|
+
query?: IDBValidKey | IDBKeyRange | null;
|
|
1419
|
+
direction?: IDBCursorDirection;
|
|
1420
|
+
effect?: (cursor: DefinedIDBCursorWithValue<StoredObject> | null) => void;
|
|
1421
|
+
};
|
|
1422
|
+
type DefinedIDBCursorWithValue<StoredObject extends Record<any, any> = Record<any, any>> = (Omit<IDBCursorWithValue, 'value'> & {
|
|
1423
|
+
value: StoredObject;
|
|
1424
|
+
});
|
|
1425
|
+
type OperationOpenKeyCursor = {
|
|
1426
|
+
operation: 'openKeyCursor';
|
|
1427
|
+
query?: IDBValidKey | IDBKeyRange | null;
|
|
1428
|
+
direction?: IDBCursorDirection;
|
|
1429
|
+
effect?: (cursor: IDBCursor | null) => void;
|
|
1430
|
+
};
|
|
1431
|
+
type OperationDescriptor<StoredObject extends Record<any, any> = Record<any, any>, O extends Operation = Operation> = O extends 'add' ? OperationAdd<StoredObject> : O extends 'put' ? OperationPut<StoredObject> : O extends 'get' ? OperationGet<StoredObject> : O extends 'getKey' ? OperationGetKey : O extends 'getAll' ? OperationGetAll<StoredObject> : O extends 'getAllKeys' ? OperationGetAllKeys : O extends 'getAllRecords' ? OperationGetAllRecords<StoredObject> : O extends 'delete' ? OperationDelete : O extends 'clear' ? OperationClear : O extends 'count' ? OperationCount : O extends 'openCursor' ? OperationOpenCursor<StoredObject> : O extends 'openKeyCursor' ? OperationOpenKeyCursor : never;
|
|
1432
|
+
type Operation = ('add' | 'put' | 'get' | 'getKey' | 'getAll' | 'getAllKeys' | 'getAllRecords' | 'delete' | 'clear' | 'count' | 'openCursor' | 'openKeyCursor');
|
|
1433
|
+
type DefinedIDBObjectStore<StoredObject extends Record<any, any>> = (Omit<IDBObjectStore, 'get'> & {
|
|
1434
|
+
get(query: IDBValidKey | IDBKeyRange): IDBRequest<StoredObject>;
|
|
1435
|
+
});
|
|
1436
|
+
declare function createDefineObjectStore<StoredObjectsByStoreName extends Record<string, any>>(): <StoreName extends keyof StoredObjectsByStoreName>(transaction: IDBTransaction, storeName: StoreName) => DefinedIDBObjectStore<StoredObjectsByStoreName[StoreName]>;
|
|
1437
|
+
declare class Operateable<StoredObject extends Record<any, any>> {
|
|
1438
|
+
constructor(objectStore: DefinedIDBObjectStore<StoredObject>, options?: OperateableOptions);
|
|
1439
|
+
private listenables;
|
|
1440
|
+
private ready;
|
|
1441
|
+
private computedObjectStore;
|
|
1442
|
+
get objectStore(): DefinedIDBObjectStore<StoredObject>;
|
|
1443
|
+
set objectStore(objectStore: DefinedIDBObjectStore<StoredObject>);
|
|
1444
|
+
private computedStatus;
|
|
1445
|
+
get status(): OperateableStatus;
|
|
1446
|
+
private computedError;
|
|
1447
|
+
get error(): Error;
|
|
1448
|
+
setObjectStore(objectStore: DefinedIDBObjectStore<StoredObject>): this;
|
|
1449
|
+
operate(descriptors: OperationDescriptor<StoredObject, Operation>[]): this;
|
|
1450
|
+
private operating;
|
|
1451
|
+
private operated;
|
|
1452
|
+
private errored;
|
|
1453
|
+
add(descriptor: Omit<OperationDescriptor<StoredObject, 'add'>, 'operation'>): this;
|
|
1454
|
+
put(descriptor: Omit<OperationDescriptor<StoredObject, 'put'>, 'operation'>): this;
|
|
1455
|
+
get(descriptor: Omit<OperationDescriptor<StoredObject, 'get'>, 'operation'>): this;
|
|
1456
|
+
getKey(descriptor: Omit<OperationDescriptor<StoredObject, 'getKey'>, 'operation'>): this;
|
|
1457
|
+
getAll(descriptor: Omit<OperationDescriptor<StoredObject, 'getAll'>, 'operation'>): this;
|
|
1458
|
+
getAllKeys(descriptor: Omit<OperationDescriptor<StoredObject, 'getAllKeys'>, 'operation'>): this;
|
|
1459
|
+
getAllRecords(descriptor: Omit<OperationDescriptor<StoredObject, 'getAllRecords'>, 'operation'>): this;
|
|
1460
|
+
delete(descriptor: Omit<OperationDescriptor<StoredObject, 'delete'>, 'operation'>): this;
|
|
1461
|
+
clear(descriptor: Omit<OperationDescriptor<StoredObject, 'clear'>, 'operation'>): this;
|
|
1462
|
+
count(descriptor: Omit<OperationDescriptor<StoredObject, 'count'>, 'operation'>): this;
|
|
1463
|
+
openCursor(descriptor: Omit<OperationDescriptor<StoredObject, 'openCursor'>, 'operation'>): this;
|
|
1464
|
+
openKeyCursor(descriptor: Omit<OperationDescriptor<StoredObject, 'openKeyCursor'>, 'operation'>): this;
|
|
1465
|
+
stop(): this;
|
|
1466
|
+
private stopListenables;
|
|
1467
|
+
}
|
|
1468
|
+
|
|
1330
1469
|
type PickableOptions = {
|
|
1331
1470
|
initialPicks?: number | number[];
|
|
1332
1471
|
};
|
|
@@ -1429,6 +1568,60 @@ declare class Storeable<String extends string> {
|
|
|
1429
1568
|
removeStatus(): this;
|
|
1430
1569
|
}
|
|
1431
1570
|
|
|
1571
|
+
type TransactableOptions = Record<never, never>;
|
|
1572
|
+
type TransactableStatus = ('constructing' | 'ready' | 'opening' | 'opened' | 'openblocked' | 'openerrored' | 'upgradeneeded' | 'closing' | 'closed' | 'transacting' | 'transacted' | 'transacterrored' | 'transactaborted' | 'deleting' | 'deleteerrored' | 'deleted');
|
|
1573
|
+
type TransactEffect = (transaction: IDBTransaction) => any;
|
|
1574
|
+
type OpenOptions = {
|
|
1575
|
+
version?: number;
|
|
1576
|
+
upgradeEffect?: (db: IDBDatabase) => void;
|
|
1577
|
+
};
|
|
1578
|
+
type TransactOptions = ({
|
|
1579
|
+
effect?: TransactEffect;
|
|
1580
|
+
storeNames?: Parameters<IDBDatabase['transaction']>[0];
|
|
1581
|
+
mode?: Parameters<IDBDatabase['transaction']>[1];
|
|
1582
|
+
} & IDBTransactionOptions);
|
|
1583
|
+
declare class Transactable {
|
|
1584
|
+
constructor(name: string, options?: TransactableOptions);
|
|
1585
|
+
private constructing;
|
|
1586
|
+
private computedStatus;
|
|
1587
|
+
private listenables;
|
|
1588
|
+
private ready;
|
|
1589
|
+
get name(): string;
|
|
1590
|
+
set name(name: string);
|
|
1591
|
+
private computedDb;
|
|
1592
|
+
get db(): IDBDatabase;
|
|
1593
|
+
private computedError;
|
|
1594
|
+
get error(): Error;
|
|
1595
|
+
get status(): TransactableStatus;
|
|
1596
|
+
private computedName;
|
|
1597
|
+
setName(name: string): this;
|
|
1598
|
+
open(options?: OpenOptions): this;
|
|
1599
|
+
private requestOpen;
|
|
1600
|
+
private opening;
|
|
1601
|
+
private opened;
|
|
1602
|
+
private openblocked;
|
|
1603
|
+
private openerrored;
|
|
1604
|
+
private upgradeneeded;
|
|
1605
|
+
transact(effect: TransactEffect, options?: TransactOptions): this;
|
|
1606
|
+
private transacted;
|
|
1607
|
+
private transacterrored;
|
|
1608
|
+
private transactaborted;
|
|
1609
|
+
private transacting;
|
|
1610
|
+
readonly(effect: TransactEffect, options?: Omit<TransactOptions, 'mode'>): this;
|
|
1611
|
+
readwrite(effect: TransactEffect, options?: Omit<TransactOptions, 'mode'>): this;
|
|
1612
|
+
versionchange(effect: TransactEffect, options?: Omit<TransactOptions, 'mode'>): this;
|
|
1613
|
+
close(): this;
|
|
1614
|
+
private closing;
|
|
1615
|
+
private closed;
|
|
1616
|
+
delete(): this;
|
|
1617
|
+
private requestDelete;
|
|
1618
|
+
private deleting;
|
|
1619
|
+
private deleteerrored;
|
|
1620
|
+
private deleted;
|
|
1621
|
+
stop(): this;
|
|
1622
|
+
private stopListenables;
|
|
1623
|
+
}
|
|
1624
|
+
|
|
1432
1625
|
type ArrayAsyncEffect<Item> = (array: Item[]) => Promise<Item[]>;
|
|
1433
1626
|
/**
|
|
1434
1627
|
* [Docs](https://baleada.dev/docs/logic/links/for-each-async)
|
|
@@ -1546,133 +1739,56 @@ declare class Konami extends Listenable<KonamiType, KonamiMetadata> {
|
|
|
1546
1739
|
get metadata(): KeychordMetadata;
|
|
1547
1740
|
}
|
|
1548
1741
|
|
|
1549
|
-
type
|
|
1550
|
-
type
|
|
1551
|
-
type
|
|
1552
|
-
minDuration?: number;
|
|
1553
|
-
minDistance?: number;
|
|
1554
|
-
onDown?: MousepressHook;
|
|
1555
|
-
onMove?: MousepressHook;
|
|
1556
|
-
onOut?: MousepressHook;
|
|
1557
|
-
onUp?: MousepressHook;
|
|
1558
|
-
};
|
|
1559
|
-
type MousepressHook = (api: MousepressHookApi) => any;
|
|
1560
|
-
type MousepressHookApi = HookApi<MousepressType, MousepressMetadata>;
|
|
1561
|
-
/**
|
|
1562
|
-
* [Docs](https://baleada.dev/docs/logic/factories/mousepress)
|
|
1563
|
-
*/
|
|
1564
|
-
declare function createMousepress(options?: MousepressOptions): {
|
|
1565
|
-
mousedown: {
|
|
1566
|
-
effect: RecognizeableEffect<"mousedown", MousepressMetadata>;
|
|
1567
|
-
stop: (target: RecognizeableStopTarget<MousepressType>) => void;
|
|
1568
|
-
};
|
|
1569
|
-
mouseout: RecognizeableEffect<"mouseout", MousepressMetadata>;
|
|
1570
|
-
mouseup: RecognizeableEffect<"mouseup", MousepressMetadata>;
|
|
1571
|
-
};
|
|
1572
|
-
declare class Mousepress extends Listenable<MousepressType, MousepressMetadata> {
|
|
1573
|
-
constructor(options?: MousepressOptions);
|
|
1574
|
-
get metadata(): MousepressMetadata;
|
|
1575
|
-
}
|
|
1576
|
-
|
|
1577
|
-
type MousereleaseType = 'mousedown' | 'mouseout' | 'mouseup';
|
|
1578
|
-
type MousereleaseMetadata = PointerStartMetadata & PointerMoveMetadata & PointerTimeMetadata;
|
|
1579
|
-
type MousereleaseOptions = {
|
|
1742
|
+
type PointerpressType = 'pointerdown' | 'pointerout' | 'pointerup';
|
|
1743
|
+
type PointerpressMetadata = PointerStartMetadata & PointerMoveMetadata & PointerTimeMetadata;
|
|
1744
|
+
type PointerpressOptions = {
|
|
1580
1745
|
minDuration?: number;
|
|
1581
1746
|
minDistance?: number;
|
|
1582
|
-
|
|
1583
|
-
|
|
1584
|
-
|
|
1585
|
-
|
|
1586
|
-
onUp?: MousereleaseHook;
|
|
1747
|
+
onDown?: PointerpressHook;
|
|
1748
|
+
onMove?: PointerpressHook;
|
|
1749
|
+
onOut?: PointerpressHook;
|
|
1750
|
+
onUp?: PointerpressHook;
|
|
1587
1751
|
};
|
|
1588
|
-
type
|
|
1589
|
-
type
|
|
1752
|
+
type PointerpressHook = (api: PointerpressHookApi) => any;
|
|
1753
|
+
type PointerpressHookApi = HookApi<PointerpressType, PointerpressMetadata>;
|
|
1590
1754
|
/**
|
|
1591
|
-
* [Docs](https://baleada.dev/docs/logic/factories/
|
|
1755
|
+
* [Docs](https://baleada.dev/docs/logic/factories/pointerpress)
|
|
1592
1756
|
*/
|
|
1593
|
-
declare function
|
|
1594
|
-
|
|
1595
|
-
effect: RecognizeableEffect<"
|
|
1596
|
-
stop: (target: RecognizeableStopTarget<
|
|
1757
|
+
declare function createPointerpress(options?: PointerpressOptions): {
|
|
1758
|
+
pointerdown: {
|
|
1759
|
+
effect: RecognizeableEffect<"pointerdown", PointerpressMetadata>;
|
|
1760
|
+
stop: (target: RecognizeableStopTarget<PointerpressType>) => void;
|
|
1597
1761
|
};
|
|
1598
|
-
|
|
1599
|
-
|
|
1762
|
+
pointerout: RecognizeableEffect<"pointerout", PointerpressMetadata>;
|
|
1763
|
+
pointerup: RecognizeableEffect<"pointerup", PointerpressMetadata>;
|
|
1600
1764
|
};
|
|
1601
|
-
declare class
|
|
1602
|
-
constructor(options?:
|
|
1603
|
-
get metadata():
|
|
1604
|
-
}
|
|
1605
|
-
|
|
1606
|
-
type TouchpressType = 'touchstart' | 'touchmove' | 'touchcancel' | 'touchend';
|
|
1607
|
-
type TouchpressMetadata = PointerStartMetadata & PointerMoveMetadata & PointerTimeMetadata;
|
|
1608
|
-
type TouchpressOptions = {
|
|
1609
|
-
minDuration?: number;
|
|
1610
|
-
minDistance?: number;
|
|
1611
|
-
onStart?: TouchpressHook;
|
|
1612
|
-
onMove?: TouchpressHook;
|
|
1613
|
-
onCancel?: TouchpressHook;
|
|
1614
|
-
onEnd?: TouchpressHook;
|
|
1615
|
-
};
|
|
1616
|
-
type TouchpressHook = (api: TouchpressHookApi) => any;
|
|
1617
|
-
type TouchpressHookApi = HookApi<TouchpressType, TouchpressMetadata>;
|
|
1618
|
-
declare function createTouchpress(options?: TouchpressOptions): {
|
|
1619
|
-
touchstart: RecognizeableEffect<"touchstart", TouchpressMetadata>;
|
|
1620
|
-
touchmove: RecognizeableEffect<"touchmove", TouchpressMetadata>;
|
|
1621
|
-
touchcancel: RecognizeableEffect<"touchcancel", TouchpressMetadata>;
|
|
1622
|
-
touchend: RecognizeableEffect<"touchend", TouchpressMetadata>;
|
|
1623
|
-
};
|
|
1624
|
-
declare class Touchpress extends Listenable<TouchpressType, TouchpressMetadata> {
|
|
1625
|
-
constructor(options?: TouchpressOptions);
|
|
1626
|
-
get metadata(): TouchpressMetadata;
|
|
1627
|
-
}
|
|
1628
|
-
|
|
1629
|
-
type TouchreleaseType = 'touchstart' | 'touchmove' | 'touchcancel' | 'touchend';
|
|
1630
|
-
type TouchreleaseMetadata = PointerStartMetadata & PointerMoveMetadata & PointerTimeMetadata;
|
|
1631
|
-
type TouchreleaseOptions = {
|
|
1632
|
-
minDuration?: number;
|
|
1633
|
-
minDistance?: number;
|
|
1634
|
-
minVelocity?: number;
|
|
1635
|
-
onStart?: TouchreleaseHook;
|
|
1636
|
-
onMove?: TouchreleaseHook;
|
|
1637
|
-
onCancel?: TouchreleaseHook;
|
|
1638
|
-
onEnd?: TouchreleaseHook;
|
|
1639
|
-
};
|
|
1640
|
-
type TouchreleaseHook = (api: TouchreleaseHookApi) => any;
|
|
1641
|
-
type TouchreleaseHookApi = HookApi<TouchreleaseType, TouchreleaseMetadata>;
|
|
1642
|
-
declare function createTouchrelease(options?: TouchreleaseOptions): {
|
|
1643
|
-
touchstart: RecognizeableEffect<"touchstart", TouchreleaseMetadata>;
|
|
1644
|
-
touchmove: RecognizeableEffect<"touchmove", TouchreleaseMetadata>;
|
|
1645
|
-
touchcancel: RecognizeableEffect<"touchcancel", TouchreleaseMetadata>;
|
|
1646
|
-
touchend: RecognizeableEffect<"touchend", TouchreleaseMetadata>;
|
|
1647
|
-
};
|
|
1648
|
-
declare class Touchrelease extends Listenable<TouchreleaseType, TouchreleaseMetadata> {
|
|
1649
|
-
constructor(options?: TouchreleaseOptions);
|
|
1650
|
-
get metadata(): TouchreleaseMetadata;
|
|
1765
|
+
declare class Pointerpress extends Listenable<PointerpressType, PointerpressMetadata> {
|
|
1766
|
+
constructor(options?: PointerpressOptions);
|
|
1767
|
+
get metadata(): PointerpressMetadata;
|
|
1651
1768
|
}
|
|
1652
1769
|
|
|
1653
|
-
type
|
|
1654
|
-
type
|
|
1655
|
-
type
|
|
1770
|
+
type PointerhoverType = 'pointerover' | 'pointerout';
|
|
1771
|
+
type PointerhoverMetadata = (PointerStartMetadata & PointerMoveMetadata & PointerTimeMetadata);
|
|
1772
|
+
type PointerhoverOptions = {
|
|
1656
1773
|
minDuration?: number;
|
|
1657
|
-
onOver?:
|
|
1658
|
-
onOut?:
|
|
1774
|
+
onOver?: PointerhoverHook;
|
|
1775
|
+
onOut?: PointerhoverHook;
|
|
1659
1776
|
};
|
|
1660
|
-
type
|
|
1661
|
-
type
|
|
1777
|
+
type PointerhoverHook = (api: PointerhoverHookApi) => any;
|
|
1778
|
+
type PointerhoverHookApi = HookApi<PointerhoverType, PointerhoverMetadata>;
|
|
1662
1779
|
/**
|
|
1663
|
-
* [Docs](https://baleada.dev/docs/logic/factories/
|
|
1780
|
+
* [Docs](https://baleada.dev/docs/logic/factories/pointerhover)
|
|
1664
1781
|
*/
|
|
1665
|
-
declare function
|
|
1666
|
-
|
|
1667
|
-
effect: RecognizeableEffect<"
|
|
1782
|
+
declare function createPointerhover(options?: PointerhoverOptions): {
|
|
1783
|
+
pointerover: {
|
|
1784
|
+
effect: RecognizeableEffect<"pointerover", PointerhoverMetadata>;
|
|
1668
1785
|
stop: () => void;
|
|
1669
1786
|
};
|
|
1670
|
-
|
|
1671
|
-
touchstart: RecognizeableEffect<"touchstart", HoverMetadata>;
|
|
1787
|
+
pointerout: RecognizeableEffect<"pointerout", PointerhoverMetadata>;
|
|
1672
1788
|
};
|
|
1673
|
-
declare class
|
|
1674
|
-
constructor(options?:
|
|
1675
|
-
get metadata():
|
|
1789
|
+
declare class Pointerhover extends Listenable<PointerhoverType, PointerhoverMetadata> {
|
|
1790
|
+
constructor(options?: PointerhoverOptions);
|
|
1791
|
+
get metadata(): PointerhoverMetadata;
|
|
1676
1792
|
}
|
|
1677
1793
|
|
|
1678
|
-
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,
|
|
1794
|
+
export { type AnimateFrame, type AnimateFrameEffect, type AnimateOptions, Animateable, type AnimateableKeyframe, type AnimateableOptions, type AnimateableStatus, type AssociativeArray, Broadcastable, type BroadcastableOptions, type BroadcastableStatus, type ColorInterpolationMethod, Compareable, type CompareableOptions, type CompareableStatus, type CompleteOptions, Completeable, type CompleteableOptions, type CompleteableStatus, Copyable, type CopyableOptions, type CopyableStatus, type CreateStepsOptions$1 as CreateDirectedAcyclicStepsOptions, type CreateFocusableOptions, type CreateGraphOptions, type CreateKeycomboMatchOptions, type CreateMixOptions, type CreatePathConfig, type CreateResultsOptions, type DefinedIDBObjectStore, Delayable, type DelayableEffect, type DelayableOptions, type DelayableStatus, Drawable, type DrawableOptions, type DrawableStatus, type DrawableStroke, Fetchable, type FetchableOptions, type FetchableStatus, Fullscreenable, type FullscreenableGetElement, type FullscreenableOptions, type FullscreenableStatus, Grantable, type GrantableOptions, type GrantableStatus, type Graph, type GraphAsync, type GraphAsyncEdge, type GraphCommonAncestor, type GraphEdge, type GraphNode, type GraphPath, type GraphState, type GraphStep, type GraphTree, type GraphTreeNode, type KeyboardEventDescriptor, Keychord, type KeychordHook, type KeychordHookApi, type KeychordMetadata, type KeychordOptions, type KeychordType, Keypress, type KeypressHook, type KeypressHookApi, type KeypressMetadata, type KeypressOptions, type KeypressType, Keyrelease, type KeyreleaseHook, type KeyreleaseHookApi, type KeyreleaseMetadata, type KeyreleaseOptions, type KeyreleaseType, Konami, type KonamiHook, type KonamiHookApi, type KonamiMetadata, type KonamiOptions, type KonamiType, type ListenEffect, type ListenEffectParam, type ListenOptions, Listenable, type ListenableActive, type ListenableKeycombo, type ListenableMousecombo, type ListenableOptions, type ListenablePointercombo, type ListenableStatus, type ListenableSupportedEventType, type ListenableSupportedType, type MixColor, Navigateable, type NavigateableOptions, type NavigateableStatus, type OpenOptions, Operateable, type OperateableOptions, type OperateableStatus, type OperationDescriptor, type PickOptions, Pickable, type PickableOptions, type PickableStatus, Pointerhover, type PointerhoverHook, type PointerhoverHookApi, type PointerhoverMetadata, type PointerhoverOptions, type PointerhoverType, Pointerpress, type PointerpressHook, type PointerpressHookApi, type PointerpressMetadata, type PointerpressOptions, type PointerpressType, type Potentiality, type RecognizeOptions, Recognizeable, type RecognizeableEffect, type RecognizeableEffectConfig, type RecognizeableOptions, type RecognizeableStatus, type RecognizeableStopTarget, Resolveable, type ResolveableOptions, type ResolveableStatus, Shareable, type ShareableOptions, type ShareableStatus, Storeable, type StoreableOptions, type StoreableStatus, type ToGraphYielded, type TransactEffect, type TransactOptions, Transactable, type TransactableOptions, type TransactableStatus, createFormat$2 as createArrayFormat, 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, createFormat$1 as createDateFormat, 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, createDefineObjectStore, 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, createNumber, createFormat as createNumberFormat, createOmit, createOnlyChild, createOutdegree, createOutgoing, createPick, createPointerhover, createPointerpress, createReduce, createReduceAsync, createRemove, createReorder, createReplace, createResults, createReverse, createRoot, createSanitize, createSet, createShuffle, createSiblings, createSlice, createSlug, createSome, createSort, createSwap, createTerminal, createTotalSiblings, createFind as createTreeFind, createTry, createTryAsync, createUnique, createValue, defineAnimateableKeyframes, defineAssociativeArray, defineGraph, defineGraphAsync, defineGraphAsyncEdge, defineGraphAsyncEdges, 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, fromAliasToCode, fromCodeToAliases, fromKeyboardEventDescriptorToAliases, fromShorthandAliasToLonghandAlias, linear, materialAccelerated, materialDecelerated, materialStandard, toD, toFlattenedD, toMessageListenParams, verouEase, verouEaseIn, verouEaseInOut, verouEaseOut };
|