@thumbmarkjs/thumbmarkjs 1.1.0-rc.1 → 1.1.0-rc.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (38) hide show
  1. package/dist/thumbmark.cjs.js +1 -1
  2. package/dist/thumbmark.cjs.js.map +1 -1
  3. package/dist/thumbmark.esm.d.ts +1 -1
  4. package/dist/thumbmark.esm.js +1 -1
  5. package/dist/thumbmark.esm.js.map +1 -1
  6. package/dist/thumbmark.umd.js +1 -1
  7. package/dist/thumbmark.umd.js.map +1 -1
  8. package/package.json +1 -1
  9. package/src/factory.ts +1 -1
  10. package/src/functions/index.ts +6 -1
  11. package/src/utils/sort.ts +23 -0
  12. package/dist/types/components/audio/index.d.ts +0 -2
  13. package/dist/types/components/canvas/index.d.ts +0 -3
  14. package/dist/types/components/fonts/index.d.ts +0 -4
  15. package/dist/types/components/hardware/index.d.ts +0 -2
  16. package/dist/types/components/locales/index.d.ts +0 -2
  17. package/dist/types/components/math/index.d.ts +0 -2
  18. package/dist/types/components/permissions/index.d.ts +0 -3
  19. package/dist/types/components/plugins/index.d.ts +0 -2
  20. package/dist/types/components/screen/index.d.ts +0 -2
  21. package/dist/types/components/system/browser.d.ts +0 -7
  22. package/dist/types/components/system/index.d.ts +0 -2
  23. package/dist/types/components/webgl/index.d.ts +0 -2
  24. package/dist/types/factory.d.ts +0 -51
  25. package/dist/types/functions/filterComponents.d.ts +0 -11
  26. package/dist/types/functions/index.d.ts +0 -87
  27. package/dist/types/functions/legacy_functions.d.ts +0 -27
  28. package/dist/types/index.d.ts +0 -7
  29. package/dist/types/options.d.ts +0 -28
  30. package/dist/types/thumbmark.d.ts +0 -26
  31. package/dist/types/utils/commonPixels.d.ts +0 -1
  32. package/dist/types/utils/ephemeralIFrame.d.ts +0 -4
  33. package/dist/types/utils/getMostFrequent.d.ts +0 -5
  34. package/dist/types/utils/hash.d.ts +0 -5
  35. package/dist/types/utils/imageDataToDataURL.d.ts +0 -1
  36. package/dist/types/utils/log.d.ts +0 -8
  37. package/dist/types/utils/raceAll.d.ts +0 -9
  38. package/dist/types/utils/version.d.ts +0 -4
@@ -1,26 +0,0 @@
1
- import { optionsInterface } from "./options";
2
- import { componentInterface } from "./factory";
3
- /**
4
- * A client for generating thumbmarks with a persistent configuration.
5
- */
6
- export declare class Thumbmark {
7
- private options;
8
- /**
9
- * Creates a new Thumbmarker client instance.
10
- * @param options - Default configuration options for this instance.
11
- */
12
- constructor(options?: optionsInterface);
13
- /**
14
- * Generates a thumbmark using the instance's configuration.
15
- * @param overrideOptions - Options to override for this specific call.
16
- * @returns The thumbmark result.
17
- */
18
- get(overrideOptions?: optionsInterface): Promise<any>;
19
- getVersion(): string;
20
- /**
21
- * Register a custom component to be included in the fingerprint.
22
- * @param key - The component name
23
- * @param fn - The component function
24
- */
25
- includeComponent(key: string, fn: (options?: optionsInterface) => Promise<componentInterface | null>): void;
26
- }
@@ -1 +0,0 @@
1
- export declare function getCommonPixels(images: ImageData[], width: number, height: number): ImageData;
@@ -1,4 +0,0 @@
1
- export declare function ephemeralIFrame(callback: ({ iframe }: {
2
- iframe: Document;
3
- }) => void): Promise<any>;
4
- export declare function wait<T = void>(durationMs: number, resolveWith?: T): Promise<T>;
@@ -1,5 +0,0 @@
1
- export declare function mostFrequentValuesInArrayOfDictionaries(arr: {
2
- [key: string]: any;
3
- }[], keys: string[]): {
4
- [key: string]: any;
5
- };
@@ -1,5 +0,0 @@
1
- /**
2
- * This code is taken from https://github.com/LinusU/murmur-128/blob/master/index.js
3
- * But instead of dependencies to encode-utf8 and fmix, I've implemented them here.
4
- */
5
- export declare function hash(key: ArrayBuffer | string, seed?: number): string;
@@ -1 +0,0 @@
1
- export declare function imageDataToDataURL(imageData: ImageData): string;
@@ -1,8 +0,0 @@
1
- import { componentInterface } from '../factory';
2
- import { optionsInterface } from '../options';
3
- /**
4
- * Logs thumbmark data to remote logging endpoint (only once per session)
5
- * You can disable this by setting options.logging to false.
6
- * @internal
7
- */
8
- export declare function logThumbmarkData(thisHash: string, thumbmarkData: componentInterface, options: optionsInterface): Promise<void>;
@@ -1,9 +0,0 @@
1
- type DelayedPromise<T> = Promise<T>;
2
- export declare function delay<T>(t: number, val: T): DelayedPromise<T>;
3
- export interface RaceResult<T> {
4
- value: T;
5
- elapsed?: number;
6
- }
7
- export declare function raceAllPerformance<T>(promises: Promise<T>[], timeoutTime: number, timeoutVal: T): Promise<RaceResult<T>[]>;
8
- export declare function raceAll<T>(promises: Promise<T>[], timeoutTime: number, timeoutVal: T): Promise<(T | undefined)[]>;
9
- export {};
@@ -1,4 +0,0 @@
1
- /**
2
- * Returns the current package version
3
- */
4
- export declare function getVersion(): string;