@3dsource/utils 1.0.8 → 1.0.10
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/eslint.config.js +37 -0
- package/ng-package.json +7 -0
- package/package.json +5 -14
- package/{lib/color/CMYKtoRGB.d.ts → src/lib/color/CMYKtoRGB.ts} +11 -1
- package/src/lib/color/HEXtoRGB.ts +9 -0
- package/src/lib/color/HSVtoRGB.ts +82 -0
- package/{lib/color/RGBtoCMYK.d.ts → src/lib/color/RGBtoCMYK.ts} +31 -1
- package/src/lib/color/RGBtoHEX.ts +17 -0
- package/src/lib/color/RGBtoHSV.ts +53 -0
- package/src/lib/color/hsv.ts +14 -0
- package/src/lib/color/max.ts +18 -0
- package/src/lib/color/min.ts +18 -0
- package/src/lib/color/overlay.ts +25 -0
- package/{lib/color/rgb.d.ts → src/lib/color/rgb.ts} +3 -1
- package/src/lib/color/sub.ts +18 -0
- package/src/lib/color/subtract.ts +27 -0
- package/src/lib/color/sum.ts +19 -0
- package/{lib/color/toRGB.d.ts → src/lib/color/toRGB.ts} +7 -1
- package/src/lib/color/toRGBA.ts +8 -0
- package/src/lib/constants/color-codes.constant.ts +9 -0
- package/src/lib/csv/CSV2Array.ts +66 -0
- package/src/lib/csv/CSV2Records.ts +56 -0
- package/src/lib/csv/ObjectToCSV.ts +21 -0
- package/src/lib/dev/dev3d.ts +1 -0
- package/src/lib/dev/logger.ts +94 -0
- package/src/lib/dev/timeToString.ts +16 -0
- package/src/lib/filenaming/cleanupFileName.ts +18 -0
- package/src/lib/filenaming/makePath.ts +5 -0
- package/src/lib/filenaming/normalizePath.ts +9 -0
- package/src/lib/geom/expandOverRectangle.ts +17 -0
- package/src/lib/geom/fitIntoRectangle.ts +43 -0
- package/{lib/geom/interfaces/area.interface.d.ts → src/lib/geom/interfaces/area.interface.ts} +2 -1
- package/{lib/geom/interfaces/rect.interface.d.ts → src/lib/geom/interfaces/rect.interface.ts} +2 -2
- package/src/lib/geom/interfaces/size.interface.ts +4 -0
- package/src/lib/geom/interfaces//321/201oords.interface.ts +4 -0
- package/src/lib/helpers/BatchLoader.ts +243 -0
- package/src/lib/helpers/KeyboardNumericCode.ts +118 -0
- package/src/lib/helpers/debounce.ts +10 -0
- package/src/lib/helpers/generate-uuid.ts +5 -0
- package/{lib/helpers/index.d.ts → src/lib/helpers/index.ts} +2 -0
- package/src/lib/helpers/save-to-local-drive.ts +31 -0
- package/src/lib/helpers/serialize.ts +11 -0
- package/src/lib/helpers/short-hash.ts +20 -0
- package/src/lib/helpers/signal.ts +46 -0
- package/src/lib/helpers/sleep.ts +3 -0
- package/src/lib/helpers/trimLastSlashFromUrl.ts +9 -0
- package/src/lib/image/SaveImage.ts +65 -0
- package/src/lib/image/getCanvasCached.ts +16 -0
- package/src/lib/image/getSnapshot.ts +99 -0
- package/src/lib/image/loadImage.ts +13 -0
- package/src/lib/interfaces/image-output.ts +8 -0
- package/{lib/interfaces/load-args-tmp.interface.d.ts → src/lib/interfaces/load-args-tmp.interface.ts} +2 -1
- package/src/lib/interfaces/load-args.interface.ts +15 -0
- package/{lib/math/baseSortedIndex.d.ts → src/lib/math/baseSortedIndex.ts} +19 -1
- package/{lib/math/calculateMedian.d.ts → src/lib/math/calculateMedian.ts} +17 -1
- package/{lib/math/circularIndex.d.ts → src/lib/math/circularIndex.ts} +5 -1
- package/src/lib/math/clampf.ts +14 -0
- package/src/lib/math/degrees.ts +7 -0
- package/{lib/math/floatCompare.d.ts → src/lib/math/floatCompare.ts} +30 -3
- package/{lib/math/inverseLerp.d.ts → src/lib/math/inverseLerp.ts} +22 -1
- package/src/lib/math/lerp.ts +12 -0
- package/{lib/mutex/Mutex.d.ts → src/lib/mutex/Mutex.ts} +15 -8
- package/{lib/mutex/Semaphore.d.ts → src/lib/mutex/Semaphore.ts} +27 -7
- package/src/lib/mutex/TaskRunner.ts +26 -0
- package/src/lib/predicates/operators.ts +75 -0
- package/{lib/predicates/textForSearch.d.ts → src/lib/predicates/textForSearch.ts} +17 -1
- package/{lib/predicates/where.d.ts → src/lib/predicates/where.ts} +32 -2
- package/src/lib/rxjs/leadingTrailingDebounceTime.ts +86 -0
- package/{lib/rxjs/smoothTransition.d.ts → src/lib/rxjs/smoothTransition.ts} +19 -1
- package/src/lib/rxjs/tapLog.ts +13 -0
- package/src/lib/strings/pad.ts +18 -0
- package/tsconfig.lib.json +13 -0
- package/tsconfig.lib.prod.json +11 -0
- package/fesm2022/3dsource-utils.mjs +0 -1881
- package/fesm2022/3dsource-utils.mjs.map +0 -1
- package/index.d.ts +0 -5
- package/lib/color/HEXtoRGB.d.ts +0 -5
- package/lib/color/HSVtoRGB.d.ts +0 -21
- package/lib/color/RGBtoHEX.d.ts +0 -1
- package/lib/color/RGBtoHSV.d.ts +0 -19
- package/lib/color/hsv.d.ts +0 -1
- package/lib/color/max.d.ts +0 -1
- package/lib/color/min.d.ts +0 -1
- package/lib/color/overlay.d.ts +0 -1
- package/lib/color/sub.d.ts +0 -1
- package/lib/color/subtract.d.ts +0 -1
- package/lib/color/sum.d.ts +0 -1
- package/lib/color/toRGBA.d.ts +0 -1
- package/lib/constants/color-codes.constant.d.ts +0 -9
- package/lib/csv/CSV2Array.d.ts +0 -1
- package/lib/csv/CSV2Records.d.ts +0 -1
- package/lib/csv/ObjectToCSV.d.ts +0 -1
- package/lib/dev/dev3d.d.ts +0 -1
- package/lib/dev/logger.d.ts +0 -11
- package/lib/dev/timeToString.d.ts +0 -5
- package/lib/filenaming/cleanupFileName.d.ts +0 -1
- package/lib/filenaming/makePath.d.ts +0 -1
- package/lib/filenaming/normalizePath.d.ts +0 -1
- package/lib/geom/expandOverRectangle.d.ts +0 -2
- package/lib/geom/fitIntoRectangle.d.ts +0 -2
- package/lib/geom/interfaces/size.interface.d.ts +0 -4
- package/lib/geom/interfaces//321/201oords.interface.d.ts +0 -4
- package/lib/helpers/BatchLoader.d.ts +0 -47
- package/lib/helpers/KeyboardNumericCode.d.ts +0 -103
- package/lib/helpers/debounce.d.ts +0 -1
- package/lib/helpers/save-to-local-drive.d.ts +0 -1
- package/lib/helpers/serialize.d.ts +0 -1
- package/lib/helpers/signal.d.ts +0 -23
- package/lib/helpers/sleep.d.ts +0 -1
- package/lib/helpers/trimLastSlashFromUrl.d.ts +0 -1
- package/lib/image/SaveImage.d.ts +0 -18
- package/lib/image/getCanvasCached.d.ts +0 -4
- package/lib/image/getSnapshot.d.ts +0 -2
- package/lib/image/loadImage.d.ts +0 -1
- package/lib/interfaces/image-output.d.ts +0 -7
- package/lib/interfaces/load-args.interface.d.ts +0 -15
- package/lib/math/clampf.d.ts +0 -8
- package/lib/math/degrees.d.ts +0 -2
- package/lib/math/lerp.d.ts +0 -7
- package/lib/mutex/TaskRunner.d.ts +0 -5
- package/lib/predicates/operators.d.ts +0 -32
- package/lib/rxjs/leadingTrailingDebounceTime.d.ts +0 -15
- package/lib/rxjs/tapLog.d.ts +0 -2
- package/lib/strings/pad.d.ts +0 -8
- /package/{lib/color/index.d.ts → src/lib/color/index.ts} +0 -0
- /package/{lib/constants/index.d.ts → src/lib/constants/index.ts} +0 -0
- /package/{lib/csv/index.d.ts → src/lib/csv/index.ts} +0 -0
- /package/{lib/dev/index.d.ts → src/lib/dev/index.ts} +0 -0
- /package/{lib/filenaming/index.d.ts → src/lib/filenaming/index.ts} +0 -0
- /package/{lib/geom/index.d.ts → src/lib/geom/index.ts} +0 -0
- /package/{lib/geom/interfaces/index.d.ts → src/lib/geom/interfaces/index.ts} +0 -0
- /package/{lib/image/index.d.ts → src/lib/image/index.ts} +0 -0
- /package/{lib/interfaces/index.d.ts → src/lib/interfaces/index.ts} +0 -0
- /package/{lib/math/index.d.ts → src/lib/math/index.ts} +0 -0
- /package/{lib/mutex/index.d.ts → src/lib/mutex/index.ts} +0 -0
- /package/{lib/predicates/index.d.ts → src/lib/predicates/index.ts} +0 -0
- /package/{lib/rxjs/index.d.ts → src/lib/rxjs/index.ts} +0 -0
- /package/{lib/strings/index.d.ts → src/lib/strings/index.ts} +0 -0
- /package/{public-api.d.ts → src/public-api.ts} +0 -0
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function trimLastSlashFromUrl(baseUrl: string): string | null | undefined;
|
package/lib/image/SaveImage.d.ts
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import type { ImageOutputValues } from '../interfaces';
|
|
2
|
-
/**
|
|
3
|
-
* USE DownloadImage instead!
|
|
4
|
-
* @deprecated use DownloadImage instead!
|
|
5
|
-
* @param imageSource
|
|
6
|
-
* @param name
|
|
7
|
-
* @param width
|
|
8
|
-
* @param format
|
|
9
|
-
*/
|
|
10
|
-
declare function SaveImage(imageSource: HTMLImageElement | HTMLCanvasElement | HTMLVideoElement | ImageBitmap | string, name: string, width?: number, format?: string | ImageOutputValues): any;
|
|
11
|
-
/**
|
|
12
|
-
* @param imageSource
|
|
13
|
-
* @param string name
|
|
14
|
-
* @param number width
|
|
15
|
-
* @param string format
|
|
16
|
-
*/
|
|
17
|
-
declare const DownloadImage: typeof SaveImage;
|
|
18
|
-
export { SaveImage, DownloadImage };
|
package/lib/image/loadImage.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function loadImage(url: string): Promise<HTMLImageElement>;
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
export interface LoadArgs {
|
|
2
|
-
order: number;
|
|
3
|
-
extra: any;
|
|
4
|
-
item?: HTMLImageElement;
|
|
5
|
-
useXhr?: boolean;
|
|
6
|
-
path: string;
|
|
7
|
-
onLoadEnd: (data: LoadArgs) => void;
|
|
8
|
-
onLoadStart: (data: ProgressEvent) => void;
|
|
9
|
-
onProgress: (data: ProgressEvent) => void;
|
|
10
|
-
id?: string;
|
|
11
|
-
img?: HTMLImageElement;
|
|
12
|
-
error?: boolean;
|
|
13
|
-
fallBack?: string;
|
|
14
|
-
resolutionId: number | string | null;
|
|
15
|
-
}
|
package/lib/math/clampf.d.ts
DELETED
package/lib/math/degrees.d.ts
DELETED
package/lib/math/lerp.d.ts
DELETED
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
type TruthyTypesOf<T> = T extends false | '' | 0 | null | undefined ? never : T;
|
|
2
|
-
type FalsyTypesOf<T> = T extends false | '' | 0 | null | undefined ? T : never;
|
|
3
|
-
type EmptyTypesOf<T> = T extends undefined | null | object | '' ? T : never;
|
|
4
|
-
type NonEmptyTypesOf<T> = T extends undefined | null | object | '' ? never : T;
|
|
5
|
-
/**
|
|
6
|
-
* The Boolean object represents a truth value: true or false.
|
|
7
|
-
* @param value
|
|
8
|
-
* @constructor
|
|
9
|
-
* Returns:boolean
|
|
10
|
-
*/
|
|
11
|
-
export declare const Truthy: <T>(value: T) => value is TruthyTypesOf<T>;
|
|
12
|
-
/**
|
|
13
|
-
* The Boolean object represents an INVERSE truth value: true or false.
|
|
14
|
-
* @param value
|
|
15
|
-
* @constructor
|
|
16
|
-
* Returns:boolean
|
|
17
|
-
*/
|
|
18
|
-
export declare const Falsy: <T>(value: T) => value is FalsyTypesOf<T>;
|
|
19
|
-
/**
|
|
20
|
-
* Checks if a value is empty.
|
|
21
|
-
*
|
|
22
|
-
* @param {any} value - The value to check.
|
|
23
|
-
* @return {boolean} Returns true if the value is empty, otherwise false.
|
|
24
|
-
*/
|
|
25
|
-
export declare const IsEmpty: <T>(value: T) => value is EmptyTypesOf<T>;
|
|
26
|
-
export declare const NotEmpty: <T>(value: T) => value is NonEmptyTypesOf<T>;
|
|
27
|
-
export declare const isDefined: <T>(arg: T | null | undefined) => arg is T;
|
|
28
|
-
export declare const isNotDefined: <T>(arg: T | null | undefined) => arg is null | undefined;
|
|
29
|
-
export declare const isJSON: (str: string) => boolean;
|
|
30
|
-
export declare const isEmpty: (value: any) => boolean;
|
|
31
|
-
export declare function isAllValuesTruthy<T extends string, K>(value: Record<T, K>): boolean;
|
|
32
|
-
export {};
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import type { SchedulerLike } from 'rxjs';
|
|
2
|
-
import { Observable } from 'rxjs';
|
|
3
|
-
/**
|
|
4
|
-
* Emits the most recent value emitted by the source Observable after a
|
|
5
|
-
* specified time span has passed without another source emission.
|
|
6
|
-
*
|
|
7
|
-
* This is a combination of `debounceTime` and `auditTime` operators.
|
|
8
|
-
*
|
|
9
|
-
* The leading value is emitted immediately, and trailing values are debounced.
|
|
10
|
-
*
|
|
11
|
-
* @param dueTime The time to wait before emitting the last value.
|
|
12
|
-
* @param scheduler The scheduler to use for the timeout.
|
|
13
|
-
* @returns A function that returns an Observable that mirrors the source Observable, but applies the specified debouncing.
|
|
14
|
-
*/
|
|
15
|
-
export declare function leadingTrailingDebounceTime<T>(dueTime: number, scheduler?: SchedulerLike): (source: Observable<T>) => Observable<T>;
|
package/lib/rxjs/tapLog.d.ts
DELETED
package/lib/strings/pad.d.ts
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Adds required number of symbols before input
|
|
3
|
-
* @param input input string
|
|
4
|
-
* @param size amount of total symbols
|
|
5
|
-
* @param symbol filler
|
|
6
|
-
* @returns string
|
|
7
|
-
*/
|
|
8
|
-
export declare function pad(input: number | string, size: number, symbol?: string): string;
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|