3dviewer-sdk 1.0.23 → 1.0.24

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/index.js CHANGED
@@ -1161,6 +1161,14 @@ var LanguageModule = class {
1161
1161
  };
1162
1162
 
1163
1163
  // src/modules/object-properties.module.ts
1164
+ var OBJECT_PROPERTIES_CANCELLED_ERROR = "Object properties request cancelled";
1165
+ var OBJECT_PROPERTIES_TIMEOUT_ERROR = "No object properties";
1166
+ function createObjectPropertiesError(message, errorStatus) {
1167
+ const error = new Error(message);
1168
+ error.name = "ObjectPropertiesError";
1169
+ error.errorStatus = errorStatus;
1170
+ return error;
1171
+ }
1164
1172
  function createRequestId5(prefix) {
1165
1173
  return `${prefix}_${Date.now()}_${Math.random().toString(36).slice(2, 10)}`;
1166
1174
  }
@@ -1189,7 +1197,9 @@ var ObjectPropertiesModule = class {
1189
1197
  if (this.pendingGetCurrent) {
1190
1198
  clearTimeout(this.pendingGetCurrent.timer);
1191
1199
  this.pendingGetCurrent.off();
1192
- this.pendingGetCurrent.reject(new Error("No object properties"));
1200
+ this.pendingGetCurrent.reject(
1201
+ createObjectPropertiesError(OBJECT_PROPERTIES_CANCELLED_ERROR, "CANCELLED")
1202
+ );
1193
1203
  this.pendingGetCurrent = void 0;
1194
1204
  }
1195
1205
  const requestId = createRequestId5("object_properties_current");
@@ -1198,7 +1208,7 @@ var ObjectPropertiesModule = class {
1198
1208
  const timer = setTimeout(() => {
1199
1209
  this.pendingGetCurrent = void 0;
1200
1210
  off();
1201
- reject(new Error("No object properties"));
1211
+ reject(createObjectPropertiesError(OBJECT_PROPERTIES_TIMEOUT_ERROR, "TIMEOUT"));
1202
1212
  }, timeoutMs);
1203
1213
  const off = this.viewer._on("object-properties:changed", (payload2) => {
1204
1214
  if (payload2.requestId !== requestId) return;
package/dist/index.mjs CHANGED
@@ -1135,6 +1135,14 @@ var LanguageModule = class {
1135
1135
  };
1136
1136
 
1137
1137
  // src/modules/object-properties.module.ts
1138
+ var OBJECT_PROPERTIES_CANCELLED_ERROR = "Object properties request cancelled";
1139
+ var OBJECT_PROPERTIES_TIMEOUT_ERROR = "No object properties";
1140
+ function createObjectPropertiesError(message, errorStatus) {
1141
+ const error = new Error(message);
1142
+ error.name = "ObjectPropertiesError";
1143
+ error.errorStatus = errorStatus;
1144
+ return error;
1145
+ }
1138
1146
  function createRequestId5(prefix) {
1139
1147
  return `${prefix}_${Date.now()}_${Math.random().toString(36).slice(2, 10)}`;
1140
1148
  }
@@ -1163,7 +1171,9 @@ var ObjectPropertiesModule = class {
1163
1171
  if (this.pendingGetCurrent) {
1164
1172
  clearTimeout(this.pendingGetCurrent.timer);
1165
1173
  this.pendingGetCurrent.off();
1166
- this.pendingGetCurrent.reject(new Error("No object properties"));
1174
+ this.pendingGetCurrent.reject(
1175
+ createObjectPropertiesError(OBJECT_PROPERTIES_CANCELLED_ERROR, "CANCELLED")
1176
+ );
1167
1177
  this.pendingGetCurrent = void 0;
1168
1178
  }
1169
1179
  const requestId = createRequestId5("object_properties_current");
@@ -1172,7 +1182,7 @@ var ObjectPropertiesModule = class {
1172
1182
  const timer = setTimeout(() => {
1173
1183
  this.pendingGetCurrent = void 0;
1174
1184
  off();
1175
- reject(new Error("No object properties"));
1185
+ reject(createObjectPropertiesError(OBJECT_PROPERTIES_TIMEOUT_ERROR, "TIMEOUT"));
1176
1186
  }, timeoutMs);
1177
1187
  const off = this.viewer._on("object-properties:changed", (payload2) => {
1178
1188
  if (payload2.requestId !== requestId) return;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "3dviewer-sdk",
3
- "version": "1.0.23",
3
+ "version": "1.0.24",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "files": [