@baleada/logic 0.24.19 → 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 +801 -296
- package/lib/index.d.ts +203 -10
- package/lib/index.js +798 -297
- 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;
|
|
@@ -1203,7 +1237,7 @@ declare class Fetchable<ResolveableValue> {
|
|
|
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;
|
|
@@ -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)
|
|
@@ -1598,4 +1791,4 @@ declare class Pointerhover extends Listenable<PointerhoverType, PointerhoverMeta
|
|
|
1598
1791
|
get metadata(): PointerhoverMetadata;
|
|
1599
1792
|
}
|
|
1600
1793
|
|
|
1601
|
-
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, Navigateable, NavigateableOptions, NavigateableStatus, PickOptions, Pickable, PickableOptions, PickableStatus, Pointerhover, PointerhoverHook, PointerhoverHookApi, PointerhoverMetadata, PointerhoverOptions, PointerhoverType, Pointerpress, PointerpressHook, PointerpressHookApi, PointerpressMetadata, PointerpressOptions, PointerpressType, Potentiality, RecognizeOptions, Recognizeable, RecognizeableEffect, RecognizeableEffectConfig, RecognizeableOptions, RecognizeableStatus, RecognizeableStopTarget, Resolveable, ResolveableOptions, ResolveableStatus, Shareable, ShareableOptions, ShareableStatus, Storeable, StoreableOptions, StoreableStatus, ToGraphYielded, 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, 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, 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 };
|
|
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 };
|