@luxonis/visualizer-protobuf 2.38.0 → 2.40.0

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 (62) hide show
  1. package/dist/{communicator-BjQGdkEF.js → communicator-Rs8pk0Io.js} +1 -1
  2. package/dist/{deserialization.worker-B4mbcVaD.js → deserialization.worker-BKq1x9xw.js} +16 -2
  3. package/dist/{encoding-BaoHXAPX.js → encoding-D95pQf33.js} +25 -10
  4. package/dist/{index-wJ2ZczEf.js → index--iQfQ_BM.js} +1 -1
  5. package/dist/{index-CVyLuyd1.js → index-9Tyh0kLM.js} +1 -1
  6. package/dist/{index-BXVV46N_.js → index-B6HlbGsq.js} +1 -1
  7. package/dist/{index-B0a8Fcsq.js → index-BF8y50SS.js} +145 -1093
  8. package/dist/{index-BtiKczUb.js → index-BVjYgfIS.js} +1 -1
  9. package/dist/{index-DV2Nx63w.js → index-BXw9XAtq.js} +1 -1
  10. package/dist/{index-B_YpX6mQ.js → index-CGKMb8B_.js} +1 -1
  11. package/dist/{index-Bju8N8aL.js → index-CVcETMbV.js} +1 -1
  12. package/dist/{index-FFoDQ871.js → index-CphhTBOZ.js} +1 -1
  13. package/dist/{index-CfastwMS.js → index-DCAb3slV.js} +1 -1
  14. package/dist/{index-Dss-letG.js → index-DGOR7UPX.js} +1 -1
  15. package/dist/{index-C4J2Ez3Z.js → index-DIvlB71Y.js} +1 -1
  16. package/dist/{index-CW07jSZd.js → index-DKBjhfFf.js} +1 -1
  17. package/dist/{index-BJQvzWXZ.js → index-DMwj27wf.js} +1 -1
  18. package/dist/{index-fCPVXmPm.js → index-DarWKW89.js} +1 -1
  19. package/dist/{index-CHQ8c72c.js → index-MXZP0RG4.js} +1 -1
  20. package/dist/{index-D4iLc9pG.js → index-Zf_aqI9D.js} +1 -1
  21. package/dist/{index-Dzy9H4eN.js → index-ok4WDE4X.js} +2 -2
  22. package/dist/{index-MWcjCcp7.js → index-xjxIYb7x.js} +25 -24
  23. package/dist/index.js +1 -1
  24. package/dist/lib/src/connection/connection.d.ts +2 -2
  25. package/dist/lib/src/connection/connection.d.ts.map +1 -1
  26. package/dist/lib/src/connection/connection.js.map +1 -1
  27. package/dist/lib/src/connection/foxglove-connection.d.ts +2 -2
  28. package/dist/lib/src/connection/foxglove-connection.d.ts.map +1 -1
  29. package/dist/lib/src/connection/foxglove-connection.js.map +1 -1
  30. package/dist/lib/src/messaging/deserialization.worker.d.ts +5 -2
  31. package/dist/lib/src/messaging/deserialization.worker.d.ts.map +1 -1
  32. package/dist/lib/src/messaging/deserialization.worker.js +10 -1
  33. package/dist/lib/src/messaging/deserialization.worker.js.map +1 -1
  34. package/dist/lib/src/messaging/message-handler.d.ts +2 -2
  35. package/dist/lib/src/messaging/message-handler.d.ts.map +1 -1
  36. package/dist/lib/src/messaging/message-handler.js +2 -1
  37. package/dist/lib/src/messaging/message-handler.js.map +1 -1
  38. package/dist/lib/src/protobuf.generated/EncodedFrame.js +1 -1
  39. package/dist/lib/src/protobuf.generated/Event.js +1 -1
  40. package/dist/lib/src/protobuf.generated/IMUData.js +1 -1
  41. package/dist/lib/src/protobuf.generated/ImageAnnotations.js +1 -1
  42. package/dist/lib/src/protobuf.generated/ImgDetections.d.ts +1 -0
  43. package/dist/lib/src/protobuf.generated/ImgDetections.d.ts.map +1 -1
  44. package/dist/lib/src/protobuf.generated/ImgDetections.js +16 -2
  45. package/dist/lib/src/protobuf.generated/ImgDetections.js.map +1 -1
  46. package/dist/lib/src/protobuf.generated/ImgFrame.js +1 -1
  47. package/dist/lib/src/protobuf.generated/PointCloudData.js +1 -1
  48. package/dist/lib/src/protobuf.generated/SpatialImgDetections.js +1 -1
  49. package/dist/lib/src/protobuf.generated/common.js +1 -1
  50. package/dist/lib/src/utils/encoding.js +1 -1
  51. package/dist/lib/src/utils/encoding.js.map +1 -1
  52. package/dist/lib/src/utils/error.d.ts +2 -0
  53. package/dist/lib/src/utils/error.d.ts.map +1 -1
  54. package/dist/lib/src/utils/error.js +3 -0
  55. package/dist/lib/src/utils/error.js.map +1 -1
  56. package/dist/packages/studio-base/src/panels/ThreeDeeRender/renderables/ImageMode/MessageHandler.d.ts +6 -0
  57. package/dist/packages/studio-base/src/panels/ThreeDeeRender/renderables/ImageMode/MessageHandler.d.ts.map +1 -1
  58. package/dist/packages/studio-base/src/panels/ThreeDeeRender/renderables/ImageMode/MessageHandler.js +52 -233
  59. package/dist/packages/studio-base/src/panels/ThreeDeeRender/renderables/ImageMode/MessageHandler.js.map +1 -1
  60. package/dist/{worker-5EVhuR0-.js → worker-BCJnECSn.js} +2 -2
  61. package/dist/{worker-4R8nuLc9.js → worker-ChOPGWcQ.js} +2 -2
  62. package/package.json +1 -1
@@ -1,4 +1,4 @@
1
- import { p as protobufsBySchema, r as recordToDataView } from './encoding-BaoHXAPX.js';
1
+ import { p as protobufsBySchema, r as recordToDataView } from './encoding-D95pQf33.js';
2
2
 
3
3
  // This Source Code Form is subject to the terms of the Mozilla Public
4
4
  // License, v2.0. If a copy of the MPL was not distributed with this
@@ -1,7 +1,7 @@
1
1
  import { e as expose } from './comlink-DHMAu6X7.js';
2
2
  import { t as typescript } from './useMessageReducer-jNx5e6JW.js';
3
3
  import { e as estimateObjectSize, d as dist } from './tslib.es6-C73eoP_E.js';
4
- import { T as Type, P as PointsAnnotationType, p as protobufsBySchema, i as isCapableOfEncodedStream, a as Profile } from './encoding-BaoHXAPX.js';
4
+ import { T as Type, P as PointsAnnotationType, p as protobufsBySchema, i as isCapableOfEncodedStream, a as Profile } from './encoding-D95pQf33.js';
5
5
  import 'react';
6
6
  import './_commonjsHelpers-E-ZsRS8r.js';
7
7
  import 'zustand';
@@ -1058,15 +1058,24 @@ async function deserializeMJPEGFrame({
1058
1058
  }
1059
1059
 
1060
1060
  class EncodedStreamNotSupportedError extends Error {
1061
+ name = "EncodedStreamNotSupportedError";
1062
+ errorType = "EncodedStreamNotSupportedError";
1061
1063
  constructor(topicName) {
1062
1064
  super("Encoded stream not supported on this platform");
1063
1065
  this.topicName = topicName;
1066
+ Object.setPrototypeOf(this, EncodedStreamNotSupportedError.prototype);
1064
1067
  }
1065
1068
  }
1066
1069
 
1067
1070
  // This Source Code Form is subject to the terms of the Mozilla Public
1068
1071
  // License, v2.0. If a copy of the MPL was not distributed with this
1069
1072
  // file, You can obtain one at http://mozilla.org/MPL/2.0/
1073
+ function errorInstanceToErrorCode(error) {
1074
+ if (error instanceof EncodedStreamNotSupportedError) {
1075
+ return "EncodedStreamNotSupported";
1076
+ }
1077
+ return "Error";
1078
+ }
1070
1079
  const topicDecoders = new Map();
1071
1080
  const topicSizes = new Map();
1072
1081
  let callback;
@@ -1082,7 +1091,10 @@ function handleMessageToDecode({
1082
1091
  // TODO: Enable this log once we fix topic unsubscription not working
1083
1092
  // console.error("An error occurred during DAI message decoding.", error);
1084
1093
 
1085
- errorCallback?.(error);
1094
+ // Type information about an error gets lost during transfer from worker to main thread
1095
+ // This means that we have to remap the errors based on type here to an 'error enum'
1096
+ // Which can then be parsed on the main thread
1097
+ errorCallback?.(errorInstanceToErrorCode(error), topic, {});
1086
1098
  };
1087
1099
  const protobufSchema = protobufsBySchema[schema];
1088
1100
  if (!protobufSchema) {
@@ -1250,3 +1262,5 @@ expose({
1250
1262
  initCallback,
1251
1263
  handleMessageToDecode
1252
1264
  });
1265
+
1266
+ export { errorInstanceToErrorCode };
@@ -1469,7 +1469,7 @@ Long.fromBytesBE = function fromBytesBE(bytes, unsigned) {
1469
1469
  // Code generated by protoc-gen-ts_proto. DO NOT EDIT.
1470
1470
  // versions:
1471
1471
  // protoc-gen-ts_proto v1.181.1
1472
- // protoc v5.29.2
1472
+ // protoc v4.25.1
1473
1473
  // source: common.proto
1474
1474
 
1475
1475
  let CameraModel = /*#__PURE__*/function (CameraModel) {
@@ -2167,7 +2167,7 @@ function isSet$6(value) {
2167
2167
  // Code generated by protoc-gen-ts_proto. DO NOT EDIT.
2168
2168
  // versions:
2169
2169
  // protoc-gen-ts_proto v1.181.1
2170
- // protoc v5.29.2
2170
+ // protoc v4.25.1
2171
2171
  // source: EncodedFrame.proto
2172
2172
 
2173
2173
  const protobufPackage$5 = "dai.proto.encoded_frame";
@@ -2574,7 +2574,7 @@ const protobufName$5 = "EncodedFrame";
2574
2574
  // Code generated by protoc-gen-ts_proto. DO NOT EDIT.
2575
2575
  // versions:
2576
2576
  // protoc-gen-ts_proto v1.181.1
2577
- // protoc v5.29.2
2577
+ // protoc v4.25.1
2578
2578
  // source: ImageAnnotations.proto
2579
2579
 
2580
2580
  const protobufPackage$4 = "dai.proto.image_annotations";
@@ -3188,7 +3188,7 @@ const protobufName$4 = "ImageAnnotations";
3188
3188
  // Code generated by protoc-gen-ts_proto. DO NOT EDIT.
3189
3189
  // versions:
3190
3190
  // protoc-gen-ts_proto v1.181.1
3191
- // protoc v5.29.2
3191
+ // protoc v4.25.1
3192
3192
  // source: ImgDetections.proto
3193
3193
 
3194
3194
  const protobufPackage$3 = "dai.proto.img_detections";
@@ -3313,7 +3313,8 @@ function createBaseImgDetection() {
3313
3313
  xmin: 0,
3314
3314
  ymin: 0,
3315
3315
  xmax: 0,
3316
- ymax: 0
3316
+ ymax: 0,
3317
+ name: ""
3317
3318
  };
3318
3319
  }
3319
3320
  const ImgDetection = {
@@ -3336,6 +3337,9 @@ const ImgDetection = {
3336
3337
  if (message.ymax !== 0) {
3337
3338
  writer.uint32(53).float(message.ymax);
3338
3339
  }
3340
+ if (message.name !== "") {
3341
+ writer.uint32(58).string(message.name);
3342
+ }
3339
3343
  return writer;
3340
3344
  },
3341
3345
  decode(input, length) {
@@ -3381,6 +3385,12 @@ const ImgDetection = {
3381
3385
  }
3382
3386
  message.ymax = reader.float();
3383
3387
  continue;
3388
+ case 7:
3389
+ if (tag !== 58) {
3390
+ break;
3391
+ }
3392
+ message.name = reader.string();
3393
+ continue;
3384
3394
  }
3385
3395
  if ((tag & 7) === 4 || tag === 0) {
3386
3396
  break;
@@ -3396,7 +3406,8 @@ const ImgDetection = {
3396
3406
  xmin: isSet$3(object.xmin) ? globalThis.Number(object.xmin) : 0,
3397
3407
  ymin: isSet$3(object.ymin) ? globalThis.Number(object.ymin) : 0,
3398
3408
  xmax: isSet$3(object.xmax) ? globalThis.Number(object.xmax) : 0,
3399
- ymax: isSet$3(object.ymax) ? globalThis.Number(object.ymax) : 0
3409
+ ymax: isSet$3(object.ymax) ? globalThis.Number(object.ymax) : 0,
3410
+ name: isSet$3(object.name) ? globalThis.String(object.name) : ""
3400
3411
  };
3401
3412
  },
3402
3413
  toJSON(message) {
@@ -3419,6 +3430,9 @@ const ImgDetection = {
3419
3430
  if (message.ymax !== 0) {
3420
3431
  obj.ymax = message.ymax;
3421
3432
  }
3433
+ if (message.name !== "") {
3434
+ obj.name = message.name;
3435
+ }
3422
3436
  return obj;
3423
3437
  },
3424
3438
  create(base) {
@@ -3432,6 +3446,7 @@ const ImgDetection = {
3432
3446
  message.ymin = object.ymin ?? 0;
3433
3447
  message.xmax = object.xmax ?? 0;
3434
3448
  message.ymax = object.ymax ?? 0;
3449
+ message.name = object.name ?? "";
3435
3450
  return message;
3436
3451
  }
3437
3452
  };
@@ -3456,7 +3471,7 @@ const protobufName$3 = "ImgDetections";
3456
3471
  // Code generated by protoc-gen-ts_proto. DO NOT EDIT.
3457
3472
  // versions:
3458
3473
  // protoc-gen-ts_proto v1.181.1
3459
- // protoc v5.29.2
3474
+ // protoc v4.25.1
3460
3475
  // source: ImgFrame.proto
3461
3476
 
3462
3477
  const protobufPackage$2 = "dai.proto.img_frame";
@@ -4090,7 +4105,7 @@ const protobufName$2 = "ImgFrame";
4090
4105
  // Code generated by protoc-gen-ts_proto. DO NOT EDIT.
4091
4106
  // versions:
4092
4107
  // protoc-gen-ts_proto v1.181.1
4093
- // protoc v5.29.2
4108
+ // protoc v4.25.1
4094
4109
  // source: PointCloudData.proto
4095
4110
 
4096
4111
  const protobufPackage$1 = "dai.proto.point_cloud_data";
@@ -4402,7 +4417,7 @@ const protobufName$1 = "PointCloudData";
4402
4417
  // Code generated by protoc-gen-ts_proto. DO NOT EDIT.
4403
4418
  // versions:
4404
4419
  // protoc-gen-ts_proto v1.181.1
4405
- // protoc v5.29.2
4420
+ // protoc v4.25.1
4406
4421
  // source: SpatialImgDetections.proto
4407
4422
 
4408
4423
  const protobufPackage = "dai.proto.spatial_img_detections";
@@ -5075,7 +5090,7 @@ const protobufsBySchema = Object.fromEntries(Object.entries(protobufs).map(([typ
5075
5090
 
5076
5091
  // Function decides if the current browser is capable of working with encoded streams
5077
5092
  function isCapableOfEncodedStream() {
5078
- return !!navigator?.userAgent?.includes('Chrome');
5093
+ return !!navigator?.userAgent?.includes("Chrome");
5079
5094
  }
5080
5095
  function recordToDataView(record) {
5081
5096
  const text = JSON.stringify(record);
@@ -1,4 +1,4 @@
1
- import { O as styleTags, Q as tags, X as LRParser, T as LRLanguage, K as indentNodeProp, M as continuedIndent, N as foldNodeProp, a2 as foldInside, U as LanguageSupport } from './index-MWcjCcp7.js';
1
+ import { O as styleTags, Q as tags, X as LRParser, T as LRLanguage, K as indentNodeProp, M as continuedIndent, N as foldNodeProp, a2 as foldInside, U as LanguageSupport } from './index-xjxIYb7x.js';
2
2
  import './tslib.es6-C73eoP_E.js';
3
3
  import 'react';
4
4
  import 'react-mosaic-component';
@@ -1,4 +1,4 @@
1
- import { V as ExternalTokenizer, a3 as ContextTracker, O as styleTags, Q as tags, X as LRParser, $ as syntaxTree, Y as ifNotIn, T as LRLanguage, K as indentNodeProp, a1 as delimitedIndent, N as foldNodeProp, a2 as foldInside, U as LanguageSupport, a6 as IterMode, Z as completeFromList, a7 as NodeWeakMap, a5 as snippetCompletion } from './index-MWcjCcp7.js';
1
+ import { V as ExternalTokenizer, a3 as ContextTracker, O as styleTags, Q as tags, X as LRParser, $ as syntaxTree, Y as ifNotIn, T as LRLanguage, K as indentNodeProp, a1 as delimitedIndent, N as foldNodeProp, a2 as foldInside, U as LanguageSupport, a6 as IterMode, Z as completeFromList, a7 as NodeWeakMap, a5 as snippetCompletion } from './index-xjxIYb7x.js';
2
2
  import './tslib.es6-C73eoP_E.js';
3
3
  import 'react';
4
4
  import 'react-mosaic-component';
@@ -1,4 +1,4 @@
1
- import { O as styleTags, Q as tags, X as LRParser, T as LRLanguage, K as indentNodeProp, M as continuedIndent, a0 as flatIndent, a1 as delimitedIndent, N as foldNodeProp, a2 as foldInside, U as LanguageSupport } from './index-MWcjCcp7.js';
1
+ import { O as styleTags, Q as tags, X as LRParser, T as LRLanguage, K as indentNodeProp, M as continuedIndent, a0 as flatIndent, a1 as delimitedIndent, N as foldNodeProp, a2 as foldInside, U as LanguageSupport } from './index-xjxIYb7x.js';
2
2
  import './tslib.es6-C73eoP_E.js';
3
3
  import 'react';
4
4
  import 'react-mosaic-component';