@baleada/logic 0.20.9 → 0.20.13
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 +2807 -2723
- package/lib/index.d.ts +59 -2
- package/lib/index.js +2774 -2724
- package/package.json +5 -3
package/lib/index.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { getStroke, StrokeOptions } from 'perfect-freehand';
|
|
1
2
|
import createDOMPurify, { Config } from 'dompurify';
|
|
2
3
|
import { FullOptions, MatchData, Searcher } from 'fast-fuzzy';
|
|
3
4
|
import { Options } from '@sindresorhus/slugify';
|
|
@@ -111,6 +112,36 @@ declare class Animateable {
|
|
|
111
112
|
stop(): this;
|
|
112
113
|
private stopped;
|
|
113
114
|
}
|
|
115
|
+
declare const linear: AnimateableKeyframe['timing'];
|
|
116
|
+
declare const materialStandard: AnimateableKeyframe['timing'];
|
|
117
|
+
declare const materialDecelerated: AnimateableKeyframe['timing'];
|
|
118
|
+
declare const materialAccelerated: AnimateableKeyframe['timing'];
|
|
119
|
+
declare const verouEase: AnimateableKeyframe['timing'];
|
|
120
|
+
declare const verouEaseIn: AnimateableKeyframe['timing'];
|
|
121
|
+
declare const verouEaseOut: AnimateableKeyframe['timing'];
|
|
122
|
+
declare const verouEaseInOut: AnimateableKeyframe['timing'];
|
|
123
|
+
declare const easingsNetInSine: AnimateableKeyframe['timing'];
|
|
124
|
+
declare const easingsNetOutSine: AnimateableKeyframe['timing'];
|
|
125
|
+
declare const easingsNetInOutSine: AnimateableKeyframe['timing'];
|
|
126
|
+
declare const easingsNetInQuad: AnimateableKeyframe['timing'];
|
|
127
|
+
declare const easingsNetOutQuad: AnimateableKeyframe['timing'];
|
|
128
|
+
declare const easingsNetInOutQuad: AnimateableKeyframe['timing'];
|
|
129
|
+
declare const easingsNetInCubic: AnimateableKeyframe['timing'];
|
|
130
|
+
declare const easingsNetOutCubic: AnimateableKeyframe['timing'];
|
|
131
|
+
declare const easingsNetInOutCubic: AnimateableKeyframe['timing'];
|
|
132
|
+
declare const easingsNetInQuart: AnimateableKeyframe['timing'];
|
|
133
|
+
declare const easingsNetInQuint: AnimateableKeyframe['timing'];
|
|
134
|
+
declare const easingsNetOutQuint: AnimateableKeyframe['timing'];
|
|
135
|
+
declare const easingsNetInOutQuint: AnimateableKeyframe['timing'];
|
|
136
|
+
declare const easingsNetInExpo: AnimateableKeyframe['timing'];
|
|
137
|
+
declare const easingsNetOutExpo: AnimateableKeyframe['timing'];
|
|
138
|
+
declare const easingsNetInOutExpo: AnimateableKeyframe['timing'];
|
|
139
|
+
declare const easingsNetInCirc: AnimateableKeyframe['timing'];
|
|
140
|
+
declare const easingsNetOutCirc: AnimateableKeyframe['timing'];
|
|
141
|
+
declare const easingsNetInOutCirc: AnimateableKeyframe['timing'];
|
|
142
|
+
declare const easingsNetInBack: AnimateableKeyframe['timing'];
|
|
143
|
+
declare const easingsNetOutBack: AnimateableKeyframe['timing'];
|
|
144
|
+
declare const easingsNetInOutBack: AnimateableKeyframe['timing'];
|
|
114
145
|
|
|
115
146
|
declare type CompleteableOptions = {
|
|
116
147
|
segment?: {
|
|
@@ -316,7 +347,9 @@ declare type ListenOptions<Type extends ListenableSupportedType> = Type extends
|
|
|
316
347
|
observe?: ResizeObserverOptions;
|
|
317
348
|
} & ObservationListenOptions : Type extends 'idle' ? {
|
|
318
349
|
requestIdleCallback?: IdleRequestOptions;
|
|
319
|
-
} : Type extends ListenableMediaQuery ? {
|
|
350
|
+
} : Type extends ListenableMediaQuery ? {
|
|
351
|
+
instantEffect?: (list: MediaQueryList) => any;
|
|
352
|
+
} : Type extends ListenableClickcombo ? EventListenOptions : Type extends ListenablePointercombo ? EventListenOptions : Type extends ListenableKeycombo ? {
|
|
320
353
|
keyDirection?: 'up' | 'down';
|
|
321
354
|
} & EventListenOptions : Type extends keyof Omit<HTMLElementEventMap, 'resize'> ? EventListenOptions : Type extends keyof Omit<DocumentEventMap, 'resize'> ? EventListenOptions : never;
|
|
322
355
|
declare type ObservationListenOptions = {
|
|
@@ -532,6 +565,30 @@ declare type DocumentEventInitMap = {
|
|
|
532
565
|
"visibilitychange": EventInit;
|
|
533
566
|
};
|
|
534
567
|
|
|
568
|
+
declare type DrawableState = ReturnType<typeof getStroke>;
|
|
569
|
+
declare type DrawableOptions = {
|
|
570
|
+
toD?: (stroke: DrawableState) => string;
|
|
571
|
+
};
|
|
572
|
+
declare type DrawableStatus = 'ready' | 'drawing' | 'drawn';
|
|
573
|
+
declare class Drawable {
|
|
574
|
+
private computedD;
|
|
575
|
+
private toD;
|
|
576
|
+
constructor(stroke: DrawableState, options?: DrawableOptions);
|
|
577
|
+
computedStatus: DrawableStatus;
|
|
578
|
+
private ready;
|
|
579
|
+
get stroke(): number[][];
|
|
580
|
+
set stroke(stroke: number[][]);
|
|
581
|
+
get status(): DrawableStatus;
|
|
582
|
+
get d(): string;
|
|
583
|
+
private computedStroke;
|
|
584
|
+
setStroke(stroke: DrawableState): this;
|
|
585
|
+
draw(points: Parameters<typeof getStroke>[0], options?: StrokeOptions): this;
|
|
586
|
+
private drawing;
|
|
587
|
+
private drawn;
|
|
588
|
+
}
|
|
589
|
+
declare function toD(stroke: number[][]): string;
|
|
590
|
+
declare function toFlattenedD(stroke: number[][]): string;
|
|
591
|
+
|
|
535
592
|
declare type ResolveableOptions = Record<string, never>;
|
|
536
593
|
declare type ResolveableGetPromise<Value> = (...args: any[]) => (Promise<Value> | Promise<Value>[]);
|
|
537
594
|
declare type ResolveableStatus = 'ready' | 'resolving' | 'resolved' | 'errored';
|
|
@@ -806,4 +863,4 @@ declare class Pipeable {
|
|
|
806
863
|
pipeAsync(...fns: ((...args: any[]) => Promise<any>)[]): Promise<any>;
|
|
807
864
|
}
|
|
808
865
|
|
|
809
|
-
export { AnimateFrame, AnimateFrameEffect, AnimateOptions, Animateable, AnimateableKeyframe, AnimateableOptions, AnimateableStatus, ArrayFunction, ArrayFunctionAsync, CompleteOptions, Completeable, CompleteableOptions, CompleteableStatus, Copyable, CopyableOptions, CopyableStatus, Delayable, DelayableEffect, DelayableOptions, DelayableStatus, DispatchOptions, Dispatchable, DispatchableOptions, DispatchableStatus, FetchOptions, FetchOptionsApi, Fetchable, FetchableOptions, FetchableStatus, Fullscreenable, FullscreenableGetElement, FullscreenableOptions, FullscreenableStatus, Grantable, GrantableOptions, GrantableStatus, ListenEffect, ListenEffectParam, ListenOptions, Listenable, ListenableActive, ListenableClickcombo, ListenableKeycombo, ListenableKeycomboItem, ListenableOptions, ListenablePointercombo, ListenableStatus, ListenableSupportedEventType, ListenableSupportedType, MapFunction, Navigateable, NavigateableOptions, NavigateableStatus, NumberFunction, Pipeable, RecognizeOptions, Recognizeable, RecognizeableEffectApi, RecognizeableOptions, RecognizeableStatus, Resolveable, ResolveableGetPromise, ResolveableOptions, ResolveableStatus, Sanitizeable, SanitizeableOptions, SanitizeableStatus, Searchable, SearchableOptions, SearchableStatus, Storeable, StoreableOptions, StoreableStatus, StringFunction, createClamp, createClip, createConcat, createDelete, createFilter, createFilterAsync, createForEachAsync, createInsert, createMap, createMapAsync, createReduce, createReduceAsync, createRename, createReorder, createReplace, createReverse, createSlice, createSlug, createSwap, createUnique, ensureKeycombo, eventMatchesKeycombo };
|
|
866
|
+
export { AnimateFrame, AnimateFrameEffect, AnimateOptions, Animateable, AnimateableKeyframe, AnimateableOptions, AnimateableStatus, ArrayFunction, ArrayFunctionAsync, CompleteOptions, Completeable, CompleteableOptions, CompleteableStatus, Copyable, CopyableOptions, CopyableStatus, Delayable, DelayableEffect, DelayableOptions, DelayableStatus, DispatchOptions, Dispatchable, DispatchableOptions, DispatchableStatus, Drawable, DrawableOptions, DrawableState, DrawableStatus, FetchOptions, FetchOptionsApi, Fetchable, FetchableOptions, FetchableStatus, Fullscreenable, FullscreenableGetElement, FullscreenableOptions, FullscreenableStatus, Grantable, GrantableOptions, GrantableStatus, ListenEffect, ListenEffectParam, ListenOptions, Listenable, ListenableActive, ListenableClickcombo, ListenableKeycombo, ListenableKeycomboItem, ListenableOptions, ListenablePointercombo, ListenableStatus, ListenableSupportedEventType, ListenableSupportedType, MapFunction, Navigateable, NavigateableOptions, NavigateableStatus, NumberFunction, Pipeable, RecognizeOptions, Recognizeable, RecognizeableEffectApi, RecognizeableOptions, RecognizeableStatus, Resolveable, ResolveableGetPromise, ResolveableOptions, ResolveableStatus, Sanitizeable, SanitizeableOptions, SanitizeableStatus, Searchable, SearchableOptions, SearchableStatus, Storeable, StoreableOptions, StoreableStatus, StringFunction, createClamp, createClip, createConcat, createDelete, createFilter, createFilterAsync, createForEachAsync, createInsert, createMap, createMapAsync, createReduce, createReduceAsync, createRename, createReorder, createReplace, createReverse, createSlice, createSlug, createSwap, createUnique, easingsNetInBack, easingsNetInCirc, easingsNetInCubic, easingsNetInExpo, easingsNetInOutBack, easingsNetInOutCirc, easingsNetInOutCubic, easingsNetInOutExpo, easingsNetInOutQuad, easingsNetInOutQuint, easingsNetInOutSine, easingsNetInQuad, easingsNetInQuart, easingsNetInQuint, easingsNetInSine, easingsNetOutBack, easingsNetOutCirc, easingsNetOutCubic, easingsNetOutExpo, easingsNetOutQuad, easingsNetOutQuint, easingsNetOutSine, ensureKeycombo, eventMatchesKeycombo, linear, materialAccelerated, materialDecelerated, materialStandard, toD, toFlattenedD, verouEase, verouEaseIn, verouEaseInOut, verouEaseOut };
|