@shapediver/viewer.shared.services 3.16.8 → 3.16.9
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/dist/converter/Converter.d.ts +77 -77
- package/dist/converter/Converter.js +424 -424
- package/dist/converter/Converter.js.map +1 -1
- package/dist/dom-event-engine/DomEventEngine.d.ts +56 -56
- package/dist/dom-event-engine/DomEventEngine.js +275 -275
- package/dist/dom-event-engine/DomEventEngine.js.map +1 -1
- package/dist/dom-event-engine/IDomEventListener.d.ts +10 -10
- package/dist/dom-event-engine/IDomEventListener.js +2 -2
- package/dist/event-engine/EventEngine.d.ts +35 -35
- package/dist/event-engine/EventEngine.js +107 -107
- package/dist/event-engine/EventEngine.js.map +1 -1
- package/dist/event-engine/interfaces/ICallback.d.ts +4 -4
- package/dist/event-engine/interfaces/ICallback.js +2 -2
- package/dist/event-engine/interfaces/IListener.d.ts +5 -5
- package/dist/event-engine/interfaces/IListener.js +2 -2
- package/dist/http-client/HttpClient.d.ts +106 -106
- package/dist/http-client/HttpClient.js +375 -375
- package/dist/http-client/HttpClient.js.map +1 -1
- package/dist/http-client/HttpResponse.d.ts +5 -5
- package/dist/http-client/HttpResponse.js +2 -2
- package/dist/index.d.ts +43 -43
- package/dist/index.js +102 -102
- package/dist/input-validator/InputValidator.d.ts +10 -10
- package/dist/input-validator/InputValidator.d.ts.map +1 -1
- package/dist/input-validator/InputValidator.js +169 -169
- package/dist/input-validator/InputValidator.js.map +1 -1
- package/dist/logger/ErrorTypeGuards.d.ts +41 -41
- package/dist/logger/ErrorTypeGuards.js +158 -159
- package/dist/logger/ErrorTypeGuards.js.map +1 -1
- package/dist/logger/Logger.d.ts +63 -63
- package/dist/logger/Logger.js +179 -179
- package/dist/logger/Logger.js.map +1 -1
- package/dist/logger/ShapeDiverBackendErrors.d.ts +14 -14
- package/dist/logger/ShapeDiverBackendErrors.js +28 -28
- package/dist/logger/ShapeDiverError.d.ts +33 -33
- package/dist/logger/ShapeDiverError.js +43 -43
- package/dist/logger/ShapeDiverError.js.map +1 -1
- package/dist/logger/ShapeDiverViewerErrors.d.ts +87 -87
- package/dist/logger/ShapeDiverViewerErrors.d.ts.map +1 -1
- package/dist/logger/ShapeDiverViewerErrors.js +119 -119
- package/dist/logger/ShapeDiverViewerErrors.js.map +1 -1
- package/dist/parameter-utils/ParameterUtils.d.ts +3 -3
- package/dist/parameter-utils/ParameterUtils.d.ts.map +1 -1
- package/dist/parameter-utils/ParameterUtils.js +161 -161
- package/dist/parameter-utils/ParameterUtils.js.map +1 -1
- package/dist/performance-evaluator/PerformanceEvaluator.d.ts +65 -65
- package/dist/performance-evaluator/PerformanceEvaluator.js +125 -125
- package/dist/settings-engine/SettingsEngine.d.ts +43 -43
- package/dist/settings-engine/SettingsEngine.d.ts.map +1 -1
- package/dist/settings-engine/SettingsEngine.js +162 -162
- package/dist/settings-engine/SettingsEngine.js.map +1 -1
- package/dist/settings-engine/defaults/Defaults.d.ts +2 -2
- package/dist/settings-engine/defaults/Defaults.js +102 -102
- package/dist/settings-engine/defaults/FurnitureDefaults.d.ts +2 -2
- package/dist/settings-engine/defaults/FurnitureDefaults.js +158 -158
- package/dist/settings-engine/defaults/HighPerformanceDefaults.d.ts +2 -2
- package/dist/settings-engine/defaults/HighPerformanceDefaults.js +114 -114
- package/dist/settings-engine/defaults/JewelryDefaults.d.ts +2 -2
- package/dist/settings-engine/defaults/JewelryDefaults.js +91 -91
- package/dist/settings-engine/defaults/MedicalDefaults.d.ts +2 -2
- package/dist/settings-engine/defaults/MedicalDefaults.js +102 -102
- package/dist/settings-engine/defaults/TwoDimensionalDefaults.d.ts +2 -2
- package/dist/settings-engine/defaults/TwoDimensionalDefaults.js +83 -83
- package/dist/state-engine/ISessionGlobalAccessObjectDefinition.d.ts +21 -21
- package/dist/state-engine/ISessionGlobalAccessObjectDefinition.js +2 -2
- package/dist/state-engine/IViewportGlobalAccessObjectDefinition.d.ts +33 -33
- package/dist/state-engine/IViewportGlobalAccessObjectDefinition.js +2 -2
- package/dist/state-engine/StateEngine.d.ts +18 -18
- package/dist/state-engine/StateEngine.js +32 -32
- package/dist/state-engine/StatePromise.d.ts +13 -13
- package/dist/state-engine/StatePromise.js +55 -55
- package/dist/system-info/SystemInfo.d.ts +57 -57
- package/dist/system-info/SystemInfo.js +127 -127
- package/dist/system-info/SystemInfo.js.map +1 -1
- package/dist/type-check/TypeChecker.d.ts +6 -6
- package/dist/type-check/TypeChecker.js +19 -19
- package/dist/utilities/ObservableArray.d.ts +25 -25
- package/dist/utilities/ObservableArray.d.ts.map +1 -1
- package/dist/utilities/ObservableArray.js +64 -64
- package/dist/utilities/ObservableArray.js.map +1 -1
- package/dist/utilities/base64.d.ts +2 -2
- package/dist/utilities/base64.d.ts.map +1 -1
- package/dist/utilities/base64.js +21 -21
- package/dist/utilities/base64.js.map +1 -1
- package/dist/utilities/hashCreator.d.ts +7 -7
- package/dist/utilities/hashCreator.d.ts.map +1 -1
- package/dist/utilities/hashCreator.js +29 -29
- package/dist/utilities/hashCreator.js.map +1 -1
- package/dist/utilities/numberCleaner.d.ts +1 -1
- package/dist/utilities/numberCleaner.d.ts.map +1 -1
- package/dist/utilities/numberCleaner.js +8 -8
- package/dist/uuid-generator/UuidGenerator.d.ts +28 -28
- package/dist/uuid-generator/UuidGenerator.js +46 -46
- package/package.json +6 -6
|
@@ -1,30 +1,30 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.hashForArraySampled = void 0;
|
|
4
|
-
/**
|
|
5
|
-
* Creates a FNV-1a hash for a sampled Uint8Array.
|
|
6
|
-
*
|
|
7
|
-
* @param array
|
|
8
|
-
* @returns
|
|
9
|
-
*/
|
|
10
|
-
const hashForArraySampled = (array) => {
|
|
11
|
-
// Hash sample of bytes for speed, include length for uniqueness
|
|
12
|
-
let hash = 2166136261;
|
|
13
|
-
const len = array.length;
|
|
14
|
-
// Hash first 2KB
|
|
15
|
-
const sampleSize = Math.min(2048, len);
|
|
16
|
-
for (let i = 0; i < sampleSize; i++) {
|
|
17
|
-
hash ^= array[i];
|
|
18
|
-
hash = Math.imul(hash, 16777619);
|
|
19
|
-
}
|
|
20
|
-
// Hash last 2KB if array is large enough
|
|
21
|
-
if (len > sampleSize) {
|
|
22
|
-
for (let i = len - sampleSize; i < len; i++) {
|
|
23
|
-
hash ^= array[i];
|
|
24
|
-
hash = Math.imul(hash, 16777619);
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
return hash.toString(16);
|
|
28
|
-
};
|
|
29
|
-
exports.hashForArraySampled = hashForArraySampled;
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.hashForArraySampled = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* Creates a FNV-1a hash for a sampled Uint8Array.
|
|
6
|
+
*
|
|
7
|
+
* @param array
|
|
8
|
+
* @returns
|
|
9
|
+
*/
|
|
10
|
+
const hashForArraySampled = (array) => {
|
|
11
|
+
// Hash sample of bytes for speed, include length for uniqueness
|
|
12
|
+
let hash = 2166136261;
|
|
13
|
+
const len = array.length;
|
|
14
|
+
// Hash first 2KB
|
|
15
|
+
const sampleSize = Math.min(2048, len);
|
|
16
|
+
for (let i = 0; i < sampleSize; i++) {
|
|
17
|
+
hash ^= array[i];
|
|
18
|
+
hash = Math.imul(hash, 16777619);
|
|
19
|
+
}
|
|
20
|
+
// Hash last 2KB if array is large enough
|
|
21
|
+
if (len > sampleSize) {
|
|
22
|
+
for (let i = len - sampleSize; i < len; i++) {
|
|
23
|
+
hash ^= array[i];
|
|
24
|
+
hash = Math.imul(hash, 16777619);
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
return hash.toString(16);
|
|
28
|
+
};
|
|
29
|
+
exports.hashForArraySampled = hashForArraySampled;
|
|
30
30
|
//# sourceMappingURL=hashCreator.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hashCreator.js","sourceRoot":"","sources":["../../src/utilities/hashCreator.ts"],"names":[],"mappings":";;;AAAA;;;;;GAKG;AACI,MAAM,mBAAmB,GAAG,CAAC,KAAiB,EAAE,EAAE;IACxD,gEAAgE;IAChE,IAAI,IAAI,GAAG,UAAU,CAAC;IACtB,MAAM,GAAG,GAAG,KAAK,CAAC,MAAM,CAAC;IAEzB,iBAAiB;IACjB,MAAM,UAAU,GAAG,IAAI,CAAC,GAAG,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC;IACvC,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,UAAU,EAAE,CAAC,EAAE,EAAE;
|
|
1
|
+
{"version":3,"file":"hashCreator.js","sourceRoot":"","sources":["../../src/utilities/hashCreator.ts"],"names":[],"mappings":";;;AAAA;;;;;GAKG;AACI,MAAM,mBAAmB,GAAG,CAAC,KAAiB,EAAE,EAAE;IACxD,gEAAgE;IAChE,IAAI,IAAI,GAAG,UAAU,CAAC;IACtB,MAAM,GAAG,GAAG,KAAK,CAAC,MAAM,CAAC;IAEzB,iBAAiB;IACjB,MAAM,UAAU,GAAG,IAAI,CAAC,GAAG,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC;IACvC,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,UAAU,EAAE,CAAC,EAAE,EAAE,CAAC;QACrC,IAAI,IAAI,KAAK,CAAC,CAAC,CAAC,CAAC;QACjB,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;IAClC,CAAC;IAED,yCAAyC;IACzC,IAAI,GAAG,GAAG,UAAU,EAAE,CAAC;QACtB,KAAK,IAAI,CAAC,GAAG,GAAG,GAAG,UAAU,EAAE,CAAC,GAAG,GAAG,EAAE,CAAC,EAAE,EAAE,CAAC;YAC7C,IAAI,IAAI,KAAK,CAAC,CAAC,CAAC,CAAC;YACjB,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;QAClC,CAAC;IACF,CAAC;IAED,OAAO,IAAI,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC;AAC1B,CAAC,CAAC;AArBW,QAAA,mBAAmB,uBAqB9B"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const numberCleaner: (value: number, decimalPlaces?: number) => number;
|
|
1
|
+
export declare const numberCleaner: (value: number, decimalPlaces?: number) => number;
|
|
2
2
|
//# sourceMappingURL=numberCleaner.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"numberCleaner.d.ts","sourceRoot":"","sources":["../../src/utilities/numberCleaner.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,aAAa,
|
|
1
|
+
{"version":3,"file":"numberCleaner.d.ts","sourceRoot":"","sources":["../../src/utilities/numberCleaner.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,aAAa,GACzB,OAAO,MAAM,EACb,gBAAe,MAAU,KACvB,MAGF,CAAC"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.numberCleaner = void 0;
|
|
4
|
-
const numberCleaner = (value, decimalPlaces = 2) => {
|
|
5
|
-
const roundedThreshold = Math.pow(10, decimalPlaces);
|
|
6
|
-
return Math.round(value * roundedThreshold) / roundedThreshold;
|
|
7
|
-
};
|
|
8
|
-
exports.numberCleaner = numberCleaner;
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.numberCleaner = void 0;
|
|
4
|
+
const numberCleaner = (value, decimalPlaces = 2) => {
|
|
5
|
+
const roundedThreshold = Math.pow(10, decimalPlaces);
|
|
6
|
+
return Math.round(value * roundedThreshold) / roundedThreshold;
|
|
7
|
+
};
|
|
8
|
+
exports.numberCleaner = numberCleaner;
|
|
9
9
|
//# sourceMappingURL=numberCleaner.js.map
|
|
@@ -1,29 +1,29 @@
|
|
|
1
|
-
export declare class UuidGenerator {
|
|
2
|
-
private static _instance;
|
|
3
|
-
static get instance(): UuidGenerator;
|
|
4
|
-
/**
|
|
5
|
-
* Creates a new uuid v4.
|
|
6
|
-
*/
|
|
7
|
-
create(): string;
|
|
8
|
-
/**
|
|
9
|
-
* Parse the uuid to array of bytes
|
|
10
|
-
*
|
|
11
|
-
* @param uuid the uuid to convert
|
|
12
|
-
* @returns ArrayLike collection of 16 values
|
|
13
|
-
*/
|
|
14
|
-
parse(uuid: string): ArrayLike<number>;
|
|
15
|
-
/**
|
|
16
|
-
* Stringify an array of bytes to an uuid
|
|
17
|
-
*
|
|
18
|
-
* @param uuid the array of bytes
|
|
19
|
-
* @returns the converted uuid
|
|
20
|
-
*/
|
|
21
|
-
stringify(uuid: ArrayLike<number>): string;
|
|
22
|
-
/**
|
|
23
|
-
* Checks if the provided string is a valid uuid.
|
|
24
|
-
*
|
|
25
|
-
* @param uuid the uuid to check
|
|
26
|
-
*/
|
|
27
|
-
validate(uuid: string): boolean;
|
|
28
|
-
}
|
|
1
|
+
export declare class UuidGenerator {
|
|
2
|
+
private static _instance;
|
|
3
|
+
static get instance(): UuidGenerator;
|
|
4
|
+
/**
|
|
5
|
+
* Creates a new uuid v4.
|
|
6
|
+
*/
|
|
7
|
+
create(): string;
|
|
8
|
+
/**
|
|
9
|
+
* Parse the uuid to array of bytes
|
|
10
|
+
*
|
|
11
|
+
* @param uuid the uuid to convert
|
|
12
|
+
* @returns ArrayLike collection of 16 values
|
|
13
|
+
*/
|
|
14
|
+
parse(uuid: string): ArrayLike<number>;
|
|
15
|
+
/**
|
|
16
|
+
* Stringify an array of bytes to an uuid
|
|
17
|
+
*
|
|
18
|
+
* @param uuid the array of bytes
|
|
19
|
+
* @returns the converted uuid
|
|
20
|
+
*/
|
|
21
|
+
stringify(uuid: ArrayLike<number>): string;
|
|
22
|
+
/**
|
|
23
|
+
* Checks if the provided string is a valid uuid.
|
|
24
|
+
*
|
|
25
|
+
* @param uuid the uuid to check
|
|
26
|
+
*/
|
|
27
|
+
validate(uuid: string): boolean;
|
|
28
|
+
}
|
|
29
29
|
//# sourceMappingURL=UuidGenerator.d.ts.map
|
|
@@ -1,47 +1,47 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.UuidGenerator = void 0;
|
|
4
|
-
const uuid_1 = require("uuid");
|
|
5
|
-
class UuidGenerator {
|
|
6
|
-
// #endregion Properties (1)
|
|
7
|
-
// #region Public Static Accessors (1)
|
|
8
|
-
static get instance() {
|
|
9
|
-
return this._instance || (this._instance = new this());
|
|
10
|
-
}
|
|
11
|
-
// #endregion Public Static Accessors (1)
|
|
12
|
-
// #region Public Methods (4)
|
|
13
|
-
/**
|
|
14
|
-
* Creates a new uuid v4.
|
|
15
|
-
*/
|
|
16
|
-
create() {
|
|
17
|
-
return (0, uuid_1.v4)();
|
|
18
|
-
}
|
|
19
|
-
/**
|
|
20
|
-
* Parse the uuid to array of bytes
|
|
21
|
-
*
|
|
22
|
-
* @param uuid the uuid to convert
|
|
23
|
-
* @returns ArrayLike collection of 16 values
|
|
24
|
-
*/
|
|
25
|
-
parse(uuid) {
|
|
26
|
-
return (0, uuid_1.parse)(uuid);
|
|
27
|
-
}
|
|
28
|
-
/**
|
|
29
|
-
* Stringify an array of bytes to an uuid
|
|
30
|
-
*
|
|
31
|
-
* @param uuid the array of bytes
|
|
32
|
-
* @returns the converted uuid
|
|
33
|
-
*/
|
|
34
|
-
stringify(uuid) {
|
|
35
|
-
return (0, uuid_1.stringify)(uuid);
|
|
36
|
-
}
|
|
37
|
-
/**
|
|
38
|
-
* Checks if the provided string is a valid uuid.
|
|
39
|
-
*
|
|
40
|
-
* @param uuid the uuid to check
|
|
41
|
-
*/
|
|
42
|
-
validate(uuid) {
|
|
43
|
-
return (0, uuid_1.validate)(uuid);
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
exports.UuidGenerator = UuidGenerator;
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.UuidGenerator = void 0;
|
|
4
|
+
const uuid_1 = require("uuid");
|
|
5
|
+
class UuidGenerator {
|
|
6
|
+
// #endregion Properties (1)
|
|
7
|
+
// #region Public Static Accessors (1)
|
|
8
|
+
static get instance() {
|
|
9
|
+
return this._instance || (this._instance = new this());
|
|
10
|
+
}
|
|
11
|
+
// #endregion Public Static Accessors (1)
|
|
12
|
+
// #region Public Methods (4)
|
|
13
|
+
/**
|
|
14
|
+
* Creates a new uuid v4.
|
|
15
|
+
*/
|
|
16
|
+
create() {
|
|
17
|
+
return (0, uuid_1.v4)();
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Parse the uuid to array of bytes
|
|
21
|
+
*
|
|
22
|
+
* @param uuid the uuid to convert
|
|
23
|
+
* @returns ArrayLike collection of 16 values
|
|
24
|
+
*/
|
|
25
|
+
parse(uuid) {
|
|
26
|
+
return (0, uuid_1.parse)(uuid);
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Stringify an array of bytes to an uuid
|
|
30
|
+
*
|
|
31
|
+
* @param uuid the array of bytes
|
|
32
|
+
* @returns the converted uuid
|
|
33
|
+
*/
|
|
34
|
+
stringify(uuid) {
|
|
35
|
+
return (0, uuid_1.stringify)(uuid);
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Checks if the provided string is a valid uuid.
|
|
39
|
+
*
|
|
40
|
+
* @param uuid the uuid to check
|
|
41
|
+
*/
|
|
42
|
+
validate(uuid) {
|
|
43
|
+
return (0, uuid_1.validate)(uuid);
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
exports.UuidGenerator = UuidGenerator;
|
|
47
47
|
//# sourceMappingURL=UuidGenerator.js.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@shapediver/viewer.shared.services",
|
|
3
|
-
"version": "3.16.
|
|
3
|
+
"version": "3.16.9",
|
|
4
4
|
"description": "",
|
|
5
5
|
"keywords": [],
|
|
6
6
|
"author": "Michael Oppitz <michael@shapediver.com>",
|
|
@@ -41,15 +41,15 @@
|
|
|
41
41
|
"@ctrl/tinycolor": "3.6.1",
|
|
42
42
|
"@shapediver/sdk.geometry-api-sdk-v2": "3.4.0",
|
|
43
43
|
"@shapediver/viewer.settings": "1.2.5",
|
|
44
|
-
"@shapediver/viewer.shared.build-data": "3.16.
|
|
45
|
-
"@shapediver/viewer.shared.types": "3.16.
|
|
44
|
+
"@shapediver/viewer.shared.build-data": "3.16.9",
|
|
45
|
+
"@shapediver/viewer.shared.types": "3.16.9",
|
|
46
46
|
"@types/ua-parser-js": "0.7.39",
|
|
47
47
|
"@types/uuid": "9.0.8",
|
|
48
|
-
"axios": "1.15.
|
|
48
|
+
"axios": "1.15.2",
|
|
49
49
|
"dompurify": "3.3.1",
|
|
50
|
-
"gl-matrix": "3.
|
|
50
|
+
"gl-matrix": "3.4.4",
|
|
51
51
|
"ua-parser-js": "0.7.41",
|
|
52
52
|
"uuid": "9.0.1"
|
|
53
53
|
},
|
|
54
|
-
"gitHead": "
|
|
54
|
+
"gitHead": "a0c09ebab3b0b75f36130a56d9ed81436846e3c7"
|
|
55
55
|
}
|