@luxonis/visualizer-protobuf 2.1.1 → 2.2.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.
- package/dist/apps/depthai-visualizer/src/components/Panel.d.ts.map +1 -1
- package/dist/apps/depthai-visualizer/src/components/Panel.js +13 -4
- package/dist/apps/depthai-visualizer/src/components/Panel.js.map +1 -1
- package/dist/apps/depthai-visualizer/src/components/PanelToolbar.d.ts.map +1 -1
- package/dist/apps/depthai-visualizer/src/components/PanelToolbar.js +3 -2
- package/dist/apps/depthai-visualizer/src/components/PanelToolbar.js.map +1 -1
- package/dist/apps/depthai-visualizer/src/connection/adapter.d.ts +6 -0
- package/dist/apps/depthai-visualizer/src/connection/adapter.d.ts.map +1 -1
- package/dist/apps/depthai-visualizer/src/connection/adapter.js +6 -0
- package/dist/apps/depthai-visualizer/src/connection/adapter.js.map +1 -1
- package/dist/apps/depthai-visualizer/src/connection/communicator.d.ts +12 -2
- package/dist/apps/depthai-visualizer/src/connection/communicator.d.ts.map +1 -1
- package/dist/apps/depthai-visualizer/src/connection/communicator.js +14 -22
- package/dist/apps/depthai-visualizer/src/connection/communicator.js.map +1 -1
- package/dist/apps/depthai-visualizer/src/connection/connection.d.ts +6 -0
- package/dist/apps/depthai-visualizer/src/connection/connection.d.ts.map +1 -1
- package/dist/apps/depthai-visualizer/src/connection/connection.js +7 -1
- package/dist/apps/depthai-visualizer/src/connection/connection.js.map +1 -1
- package/dist/apps/depthai-visualizer/src/connection/webrtc/bridge.d.ts.map +1 -1
- package/dist/apps/depthai-visualizer/src/connection/webrtc/bridge.js +82 -31
- package/dist/apps/depthai-visualizer/src/connection/webrtc/bridge.js.map +1 -1
- package/dist/apps/depthai-visualizer/src/connection/webrtc/worker-utils.d.ts +38 -3
- package/dist/apps/depthai-visualizer/src/connection/webrtc/worker-utils.d.ts.map +1 -1
- package/dist/apps/depthai-visualizer/src/connection/webrtc/worker-utils.js +54 -8
- package/dist/apps/depthai-visualizer/src/connection/webrtc/worker-utils.js.map +1 -1
- package/dist/apps/depthai-visualizer/src/connection/webrtc/worker.js +15 -0
- package/dist/apps/depthai-visualizer/src/connection/webrtc/worker.js.map +1 -1
- package/dist/apps/depthai-visualizer/src/connection/ws/worker-utils.d.ts +2 -1
- package/dist/apps/depthai-visualizer/src/connection/ws/worker-utils.d.ts.map +1 -1
- package/dist/apps/depthai-visualizer/src/connection/ws/worker-utils.js +28 -3
- package/dist/apps/depthai-visualizer/src/connection/ws/worker-utils.js.map +1 -1
- package/dist/apps/depthai-visualizer/src/utils/artificial-worker.d.ts +3 -0
- package/dist/apps/depthai-visualizer/src/utils/artificial-worker.d.ts.map +1 -1
- package/dist/apps/depthai-visualizer/src/utils/artificial-worker.js +10 -0
- package/dist/apps/depthai-visualizer/src/utils/artificial-worker.js.map +1 -1
- package/dist/{communicator-ZAqNuwq6.js → communicator-DKKKAI0H.js} +19 -29
- package/dist/{index-DakMDXW9.js → index-1yvlF6NH.js} +3 -3
- package/dist/{index-CKhCc5vm.js → index-B3F-eA-i.js} +187 -80
- package/dist/{index-QYS2yYV7.js → index-B4j3EVf8.js} +3 -3
- package/dist/{index-fkPdppby.js → index-BZjzIIuE.js} +3 -3
- package/dist/{index-DszVVt5Z.js → index-BsdqQ862.js} +3 -3
- package/dist/{index-r3QAVuN1.js → index-C6m30paN.js} +3 -3
- package/dist/{index-yfE-EHjv.js → index-CE1LH59a.js} +3 -3
- package/dist/{index-FWvVjhSv.js → index-Cmp_Tjng.js} +4 -4
- package/dist/{index-BEeIqwPz.js → index-Cqzhj8jS.js} +3 -3
- package/dist/{index-Bk2FsKKi.js → index-D0g7yNKD.js} +3 -3
- package/dist/{index-TgQ8-Lib.js → index-D7I7neMi.js} +3 -3
- package/dist/{index-Djz0avqZ.js → index-D_AhdZqi.js} +3 -3
- package/dist/{index-BNmANBei.js → index-Dai0K-_7.js} +3 -3
- package/dist/{index-DvdDp1CU.js → index-DbIgJEn4.js} +3 -3
- package/dist/{index-nxmrq-HQ.js → index-DkDTcHOl.js} +3 -3
- package/dist/{index-lPEkwJ-1.js → index-DleEaqya.js} +3 -3
- package/dist/{index-Cv9FekAD.js → index-FdS8KlrP.js} +3 -3
- package/dist/{index-2U-xZM02.js → index-MOg_zBJW.js} +3 -3
- package/dist/{index-sbw9t8iK.js → index-SZgAiOi4.js} +3 -3
- package/dist/index.js +3 -3
- package/dist/{worker-ByVSTHSI.js → worker-CMZIJlQN.js} +66 -9
- package/dist/{worker-DlZ2xp8p.js → worker-DtDgSl3T.js} +2 -2
- package/dist/{worker-utils-BNThsbdN.js → worker-utils-BuUq1bP1.js} +29 -4
- package/package.json +2 -2
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { aI as EditorView, aJ as EditorSelection, as as LRLanguage, aq as styleTags, ar as tags, an as indentNodeProp, aA as delimitedIndent, ap as foldNodeProp, at as LanguageSupport, av as LRParser, ay as syntaxTree, aK as html, aL as parseMixed, au as ExternalTokenizer } from './index-
|
|
2
|
-
import './worker-utils-
|
|
1
|
+
import { aI as EditorView, aJ as EditorSelection, as as LRLanguage, aq as styleTags, ar as tags, an as indentNodeProp, aA as delimitedIndent, ap as foldNodeProp, at as LanguageSupport, av as LRParser, ay as syntaxTree, aK as html, aL as parseMixed, au as ExternalTokenizer } from './index-B3F-eA-i.js';
|
|
2
|
+
import './worker-utils-BuUq1bP1.js';
|
|
3
3
|
import 'hydrated-ws';
|
|
4
4
|
import 'ms';
|
|
5
|
-
import './communicator-
|
|
5
|
+
import './communicator-DKKKAI0H.js';
|
|
6
6
|
import 'protobufjs/minimal';
|
|
7
7
|
import 'react';
|
|
8
8
|
import 'zustand';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { aq as styleTags, ar as tags, aN as javascriptLanguage, as as LRLanguage, at as LanguageSupport, av as LRParser, aK as html, aL as parseMixed, au as ExternalTokenizer } from './index-
|
|
2
|
-
import './worker-utils-
|
|
1
|
+
import { aq as styleTags, ar as tags, aN as javascriptLanguage, as as LRLanguage, at as LanguageSupport, av as LRParser, aK as html, aL as parseMixed, au as ExternalTokenizer } from './index-B3F-eA-i.js';
|
|
2
|
+
import './worker-utils-BuUq1bP1.js';
|
|
3
3
|
import 'hydrated-ws';
|
|
4
4
|
import 'ms';
|
|
5
|
-
import './communicator-
|
|
5
|
+
import './communicator-DKKKAI0H.js';
|
|
6
6
|
import 'protobufjs/minimal';
|
|
7
7
|
import 'react';
|
|
8
8
|
import 'zustand';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { au as ExternalTokenizer, aq as styleTags, ar as tags, av as LRParser, as as LRLanguage, an as indentNodeProp, ao as continuedIndent, aA as delimitedIndent, ap as foldNodeProp, aB as foldInside, aK as html, at as LanguageSupport, aL as parseMixed } from './index-
|
|
2
|
-
import './worker-utils-
|
|
1
|
+
import { au as ExternalTokenizer, aq as styleTags, ar as tags, av as LRParser, as as LRLanguage, an as indentNodeProp, ao as continuedIndent, aA as delimitedIndent, ap as foldNodeProp, aB as foldInside, aK as html, at as LanguageSupport, aL as parseMixed } from './index-B3F-eA-i.js';
|
|
2
|
+
import './worker-utils-BuUq1bP1.js';
|
|
3
3
|
import 'hydrated-ws';
|
|
4
4
|
import 'ms';
|
|
5
|
-
import './communicator-
|
|
5
|
+
import './communicator-DKKKAI0H.js';
|
|
6
6
|
import 'protobufjs/minimal';
|
|
7
7
|
import 'react';
|
|
8
8
|
import 'zustand';
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { ImagePanel } from './index-
|
|
1
|
+
import { ImagePanel } from './index-BZjzIIuE.js';
|
|
2
2
|
import 'react';
|
|
3
3
|
import 'react-dom';
|
|
4
|
-
import './index-
|
|
5
|
-
import './worker-utils-
|
|
4
|
+
import './index-B3F-eA-i.js';
|
|
5
|
+
import './worker-utils-BuUq1bP1.js';
|
|
6
6
|
import 'hydrated-ws';
|
|
7
7
|
import 'ms';
|
|
8
|
-
import './communicator-
|
|
8
|
+
import './communicator-DKKKAI0H.js';
|
|
9
9
|
import 'protobufjs/minimal';
|
|
10
10
|
import 'zustand';
|
|
11
11
|
import 'react-mosaic-component';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { aC as ContextTracker, au as ExternalTokenizer, aq as styleTags, ar as tags, av as LRParser, as as LRLanguage, an as indentNodeProp, aA as delimitedIndent, ap as foldNodeProp, aB as foldInside, at as LanguageSupport, aL as parseMixed } from './index-
|
|
2
|
-
import './worker-utils-
|
|
1
|
+
import { aC as ContextTracker, au as ExternalTokenizer, aq as styleTags, ar as tags, av as LRParser, as as LRLanguage, an as indentNodeProp, aA as delimitedIndent, ap as foldNodeProp, aB as foldInside, at as LanguageSupport, aL as parseMixed } from './index-B3F-eA-i.js';
|
|
2
|
+
import './worker-utils-BuUq1bP1.js';
|
|
3
3
|
import 'hydrated-ws';
|
|
4
4
|
import 'ms';
|
|
5
|
-
import './communicator-
|
|
5
|
+
import './communicator-DKKKAI0H.js';
|
|
6
6
|
import 'protobufjs/minimal';
|
|
7
7
|
import 'react';
|
|
8
8
|
import 'zustand';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { au as ExternalTokenizer, aq as styleTags, ar as tags, av as LRParser, as as LRLanguage, an as indentNodeProp, ao as continuedIndent, ap as foldNodeProp, aB as foldInside, at as LanguageSupport } from './index-
|
|
2
|
-
import './worker-utils-
|
|
1
|
+
import { au as ExternalTokenizer, aq as styleTags, ar as tags, av as LRParser, as as LRLanguage, an as indentNodeProp, ao as continuedIndent, ap as foldNodeProp, aB as foldInside, at as LanguageSupport } from './index-B3F-eA-i.js';
|
|
2
|
+
import './worker-utils-BuUq1bP1.js';
|
|
3
3
|
import 'hydrated-ws';
|
|
4
4
|
import 'ms';
|
|
5
|
-
import './communicator-
|
|
5
|
+
import './communicator-DKKKAI0H.js';
|
|
6
6
|
import 'protobufjs/minimal';
|
|
7
7
|
import 'react';
|
|
8
8
|
import 'zustand';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { au as ExternalTokenizer, aC as ContextTracker, aq as styleTags, ar as tags, av as LRParser, as as LRLanguage, ap as foldNodeProp, aB as foldInside, an as indentNodeProp, ao as continuedIndent, aH as defineCSSCompletionSource, at as LanguageSupport } from './index-
|
|
2
|
-
import './worker-utils-
|
|
1
|
+
import { au as ExternalTokenizer, aC as ContextTracker, aq as styleTags, ar as tags, av as LRParser, as as LRLanguage, ap as foldNodeProp, aB as foldInside, an as indentNodeProp, ao as continuedIndent, aH as defineCSSCompletionSource, at as LanguageSupport } from './index-B3F-eA-i.js';
|
|
2
|
+
import './worker-utils-BuUq1bP1.js';
|
|
3
3
|
import 'hydrated-ws';
|
|
4
4
|
import 'ms';
|
|
5
|
-
import './communicator-
|
|
5
|
+
import './communicator-DKKKAI0H.js';
|
|
6
6
|
import 'protobufjs/minimal';
|
|
7
7
|
import 'react';
|
|
8
8
|
import 'zustand';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { an as indentNodeProp, ao as continuedIndent, ap as foldNodeProp, aq as styleTags, ar as tags, as as LRLanguage, at as LanguageSupport, au as ExternalTokenizer, av as LRParser, aw as ifNotIn, ax as completeFromList, ay as syntaxTree } from './index-
|
|
2
|
-
import './worker-utils-
|
|
1
|
+
import { an as indentNodeProp, ao as continuedIndent, ap as foldNodeProp, aq as styleTags, ar as tags, as as LRLanguage, at as LanguageSupport, au as ExternalTokenizer, av as LRParser, aw as ifNotIn, ax as completeFromList, ay as syntaxTree } from './index-B3F-eA-i.js';
|
|
2
|
+
import './worker-utils-BuUq1bP1.js';
|
|
3
3
|
import 'hydrated-ws';
|
|
4
4
|
import 'ms';
|
|
5
|
-
import './communicator-
|
|
5
|
+
import './communicator-DKKKAI0H.js';
|
|
6
6
|
import 'protobufjs/minimal';
|
|
7
7
|
import 'react';
|
|
8
8
|
import 'zustand';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { aC as ContextTracker, au as ExternalTokenizer, aq as styleTags, ar as tags, av as LRParser, as as LRLanguage, an as indentNodeProp, ap as foldNodeProp, aM as bracketMatchingHandle, at as LanguageSupport, aI as EditorView, ay as syntaxTree, aJ as EditorSelection } from './index-
|
|
2
|
-
import './worker-utils-
|
|
1
|
+
import { aC as ContextTracker, au as ExternalTokenizer, aq as styleTags, ar as tags, av as LRParser, as as LRLanguage, an as indentNodeProp, ap as foldNodeProp, aM as bracketMatchingHandle, at as LanguageSupport, aI as EditorView, ay as syntaxTree, aJ as EditorSelection } from './index-B3F-eA-i.js';
|
|
2
|
+
import './worker-utils-BuUq1bP1.js';
|
|
3
3
|
import 'hydrated-ws';
|
|
4
4
|
import 'ms';
|
|
5
|
-
import './communicator-
|
|
5
|
+
import './communicator-DKKKAI0H.js';
|
|
6
6
|
import 'protobufjs/minimal';
|
|
7
7
|
import 'react';
|
|
8
8
|
import 'zustand';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { as as LRLanguage, an as indentNodeProp, aA as delimitedIndent, ap as foldNodeProp, aB as foldInside, aq as styleTags, ar as tags, at as LanguageSupport, av as LRParser } from './index-
|
|
2
|
-
import './worker-utils-
|
|
1
|
+
import { as as LRLanguage, an as indentNodeProp, aA as delimitedIndent, ap as foldNodeProp, aB as foldInside, aq as styleTags, ar as tags, at as LanguageSupport, av as LRParser } from './index-B3F-eA-i.js';
|
|
2
|
+
import './worker-utils-BuUq1bP1.js';
|
|
3
3
|
import 'hydrated-ws';
|
|
4
4
|
import 'ms';
|
|
5
|
-
import './communicator-
|
|
5
|
+
import './communicator-DKKKAI0H.js';
|
|
6
6
|
import 'protobufjs/minimal';
|
|
7
7
|
import 'react';
|
|
8
8
|
import 'zustand';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { au as ExternalTokenizer, aq as styleTags, ar as tags, av as LRParser, as as LRLanguage, an as indentNodeProp, ao as continuedIndent, az as flatIndent, aA as delimitedIndent, ap as foldNodeProp, aB as foldInside, at as LanguageSupport } from './index-
|
|
2
|
-
import './worker-utils-
|
|
1
|
+
import { au as ExternalTokenizer, aq as styleTags, ar as tags, av as LRParser, as as LRLanguage, an as indentNodeProp, ao as continuedIndent, az as flatIndent, aA as delimitedIndent, ap as foldNodeProp, aB as foldInside, at as LanguageSupport } from './index-B3F-eA-i.js';
|
|
2
|
+
import './worker-utils-BuUq1bP1.js';
|
|
3
3
|
import 'hydrated-ws';
|
|
4
4
|
import 'ms';
|
|
5
|
-
import './communicator-
|
|
5
|
+
import './communicator-DKKKAI0H.js';
|
|
6
6
|
import 'protobufjs/minimal';
|
|
7
7
|
import 'react';
|
|
8
8
|
import 'zustand';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { aq as styleTags, ar as tags, as as LRLanguage, at as LanguageSupport, av as LRParser, aD as LocalTokenGroup, aK as html, aL as parseMixed, aN as javascriptLanguage } from './index-
|
|
2
|
-
import './worker-utils-
|
|
1
|
+
import { aq as styleTags, ar as tags, as as LRLanguage, at as LanguageSupport, av as LRParser, aD as LocalTokenGroup, aK as html, aL as parseMixed, aN as javascriptLanguage } from './index-B3F-eA-i.js';
|
|
2
|
+
import './worker-utils-BuUq1bP1.js';
|
|
3
3
|
import 'hydrated-ws';
|
|
4
4
|
import 'ms';
|
|
5
|
-
import './communicator-
|
|
5
|
+
import './communicator-DKKKAI0H.js';
|
|
6
6
|
import 'protobufjs/minimal';
|
|
7
7
|
import 'react';
|
|
8
8
|
import 'zustand';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { aq as styleTags, ar as tags, av as LRParser, as as LRLanguage, an as indentNodeProp, ao as continuedIndent, ap as foldNodeProp, aB as foldInside, at as LanguageSupport } from './index-
|
|
2
|
-
import './worker-utils-
|
|
1
|
+
import { aq as styleTags, ar as tags, av as LRParser, as as LRLanguage, an as indentNodeProp, ao as continuedIndent, ap as foldNodeProp, aB as foldInside, at as LanguageSupport } from './index-B3F-eA-i.js';
|
|
2
|
+
import './worker-utils-BuUq1bP1.js';
|
|
3
3
|
import 'hydrated-ws';
|
|
4
4
|
import 'ms';
|
|
5
|
-
import './communicator-
|
|
5
|
+
import './communicator-DKKKAI0H.js';
|
|
6
6
|
import 'protobufjs/minimal';
|
|
7
7
|
import 'react';
|
|
8
8
|
import 'zustand';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { aq as styleTags, ar as tags, as as LRLanguage, an as indentNodeProp, ao as continuedIndent, ap as foldNodeProp, aB as foldInside, aH as defineCSSCompletionSource, at as LanguageSupport, av as LRParser, au as ExternalTokenizer } from './index-
|
|
2
|
-
import './worker-utils-
|
|
1
|
+
import { aq as styleTags, ar as tags, as as LRLanguage, an as indentNodeProp, ao as continuedIndent, ap as foldNodeProp, aB as foldInside, aH as defineCSSCompletionSource, at as LanguageSupport, av as LRParser, au as ExternalTokenizer } from './index-B3F-eA-i.js';
|
|
2
|
+
import './worker-utils-BuUq1bP1.js';
|
|
3
3
|
import 'hydrated-ws';
|
|
4
4
|
import 'ms';
|
|
5
|
-
import './communicator-
|
|
5
|
+
import './communicator-DKKKAI0H.js';
|
|
6
6
|
import 'protobufjs/minimal';
|
|
7
7
|
import 'react';
|
|
8
8
|
import 'zustand';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { au as ExternalTokenizer, aC as ContextTracker, aq as styleTags, ar as tags, av as LRParser, ay as syntaxTree, aw as ifNotIn, as as LRLanguage, an as indentNodeProp, aA as delimitedIndent, ap as foldNodeProp, aB as foldInside, at as LanguageSupport, aF as IterMode, ax as completeFromList, aG as NodeWeakMap, aE as snippetCompletion } from './index-
|
|
2
|
-
import './worker-utils-
|
|
1
|
+
import { au as ExternalTokenizer, aC as ContextTracker, aq as styleTags, ar as tags, av as LRParser, ay as syntaxTree, aw as ifNotIn, as as LRLanguage, an as indentNodeProp, aA as delimitedIndent, ap as foldNodeProp, aB as foldInside, at as LanguageSupport, aF as IterMode, ax as completeFromList, aG as NodeWeakMap, aE as snippetCompletion } from './index-B3F-eA-i.js';
|
|
2
|
+
import './worker-utils-BuUq1bP1.js';
|
|
3
3
|
import 'hydrated-ws';
|
|
4
4
|
import 'ms';
|
|
5
|
-
import './communicator-
|
|
5
|
+
import './communicator-DKKKAI0H.js';
|
|
6
6
|
import 'protobufjs/minimal';
|
|
7
7
|
import 'react';
|
|
8
8
|
import 'zustand';
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export { aR as ImagePanel, aQ as PanelLayout, aS as PointCloudPanel, aO as VisualizerConnection, aP as VisualizerContext } from './index-
|
|
2
|
-
export { b as createWsWorkerMessageListener } from './worker-utils-
|
|
3
|
-
import './communicator-
|
|
1
|
+
export { aR as ImagePanel, aQ as PanelLayout, aS as PointCloudPanel, aO as VisualizerConnection, aP as VisualizerContext } from './index-B3F-eA-i.js';
|
|
2
|
+
export { b as createWsWorkerMessageListener } from './worker-utils-BuUq1bP1.js';
|
|
3
|
+
import './communicator-DKKKAI0H.js';
|
|
4
4
|
import 'protobufjs/minimal';
|
|
5
5
|
import 'react';
|
|
6
6
|
import 'zustand';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { F as FoxgloveCommunicator, r as recordToDataView } from './communicator-
|
|
1
|
+
import { F as FoxgloveCommunicator, r as recordToDataView } from './communicator-DKKKAI0H.js';
|
|
2
2
|
import 'protobufjs/minimal';
|
|
3
3
|
|
|
4
4
|
// This Source Code Form is subject to the terms of the Mozilla Public
|
|
@@ -9,6 +9,7 @@ class WebRtcHandler extends FoxgloveCommunicator {
|
|
|
9
9
|
#subscriptionId = 0;
|
|
10
10
|
#messageReady = false;
|
|
11
11
|
#systemReady = false;
|
|
12
|
+
#subscriptions = new Map();
|
|
12
13
|
isReady() {
|
|
13
14
|
return this.#messageReady && this.#systemReady;
|
|
14
15
|
}
|
|
@@ -18,22 +19,55 @@ class WebRtcHandler extends FoxgloveCommunicator {
|
|
|
18
19
|
sendWithTransfer(message, transfer) {
|
|
19
20
|
self.postMessage(message, transfer);
|
|
20
21
|
}
|
|
21
|
-
|
|
22
|
-
|
|
22
|
+
#rawSubscribe(channelIds) {
|
|
23
|
+
const subscriptions = channelIds.map(channelId => ({
|
|
24
|
+
id: ++this.#subscriptionId,
|
|
25
|
+
channelId
|
|
26
|
+
}));
|
|
23
27
|
self.postMessage({
|
|
24
28
|
type: 'send',
|
|
25
29
|
data: {
|
|
26
30
|
channel: 'system',
|
|
27
31
|
data: recordToDataView({
|
|
28
32
|
op: 'subscribe',
|
|
29
|
-
subscriptions
|
|
30
|
-
id: this.#subscriptionId,
|
|
31
|
-
channelId: channel
|
|
32
|
-
}]
|
|
33
|
+
subscriptions
|
|
33
34
|
})
|
|
34
35
|
}
|
|
35
36
|
});
|
|
36
|
-
return
|
|
37
|
+
return subscriptions;
|
|
38
|
+
}
|
|
39
|
+
subscribe(topics) {
|
|
40
|
+
const channelIds = this.getPublicChannels().filter(publicChannel => topics.includes(publicChannel.topic)).map(channel => channel.id);
|
|
41
|
+
const subscriptions = this.#rawSubscribe(channelIds);
|
|
42
|
+
for (const subscription of subscriptions) {
|
|
43
|
+
const channel = this.getPublicChannels().find(publicChannel => publicChannel.id === subscription.channelId);
|
|
44
|
+
if (channel) {
|
|
45
|
+
this.#subscriptions.set(subscription.id, {
|
|
46
|
+
topic: channel.topic,
|
|
47
|
+
schema: channel.schemaName,
|
|
48
|
+
kind: channel.kind
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
#rawUnsubscribe(subscriptionIds) {
|
|
54
|
+
self.postMessage({
|
|
55
|
+
type: 'send',
|
|
56
|
+
data: {
|
|
57
|
+
channel: 'system',
|
|
58
|
+
data: recordToDataView({
|
|
59
|
+
op: 'unsubscribe',
|
|
60
|
+
subscriptionIds
|
|
61
|
+
})
|
|
62
|
+
}
|
|
63
|
+
});
|
|
64
|
+
}
|
|
65
|
+
unsubscribe(topics) {
|
|
66
|
+
const subscriptionIds = [...this.#subscriptions.entries()].filter(([_id, data]) => topics.includes(data.topic)).map(subscription => subscription[0]);
|
|
67
|
+
this.#rawUnsubscribe(subscriptionIds);
|
|
68
|
+
for (const subscriptionId of subscriptionIds) {
|
|
69
|
+
this.#subscriptions.delete(subscriptionId);
|
|
70
|
+
}
|
|
37
71
|
}
|
|
38
72
|
sendServiceCallRequest(request) {
|
|
39
73
|
self.postMessage({
|
|
@@ -44,6 +78,12 @@ class WebRtcHandler extends FoxgloveCommunicator {
|
|
|
44
78
|
}
|
|
45
79
|
});
|
|
46
80
|
}
|
|
81
|
+
handleRawSend(data) {
|
|
82
|
+
self.postMessage({
|
|
83
|
+
type: 'send',
|
|
84
|
+
data
|
|
85
|
+
});
|
|
86
|
+
}
|
|
47
87
|
handleConnection(data) {
|
|
48
88
|
if (!data.channel || data.channel === 'message') {
|
|
49
89
|
this.#messageReady = data.ready;
|
|
@@ -53,7 +93,13 @@ class WebRtcHandler extends FoxgloveCommunicator {
|
|
|
53
93
|
}
|
|
54
94
|
}
|
|
55
95
|
handleGeneric(message) {
|
|
56
|
-
this.
|
|
96
|
+
const subscription = this.#subscriptions.get(message.subscriptionId);
|
|
97
|
+
if (subscription) {
|
|
98
|
+
this.handleGenericMessage(subscription.topic, subscription.schema, message.data);
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
handleServiceCall(message) {
|
|
102
|
+
this.callService(message);
|
|
57
103
|
}
|
|
58
104
|
handleSystem(message) {
|
|
59
105
|
switch (message.op) {
|
|
@@ -96,6 +142,17 @@ self.addEventListener("message", event => {
|
|
|
96
142
|
handler.handleGeneric(event.data.data.message);
|
|
97
143
|
} else if (event.data.kind === 'systemMessage') {
|
|
98
144
|
handler.handleSystem(event.data.data.message);
|
|
145
|
+
} else if (event.data.kind === 'serviceCall') {
|
|
146
|
+
handler.handleServiceCall(event.data.data.message);
|
|
147
|
+
} else if (event.data.kind === 'rawSend') {
|
|
148
|
+
handler.handleRawSend({
|
|
149
|
+
channel: event.data.data.message.channel,
|
|
150
|
+
data: event.data.data.message.message
|
|
151
|
+
});
|
|
152
|
+
} else if (event.data.kind === 'subscribe') {
|
|
153
|
+
handler.subscribe(event.data.data.message.topics);
|
|
154
|
+
} else if (event.data.kind === 'unsubscribe') {
|
|
155
|
+
handler.unsubscribe(event.data.data.message.topics);
|
|
99
156
|
} else {
|
|
100
157
|
handler.handleConnection(event.data.data);
|
|
101
158
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { b as createWsWorkerMessageListener } from './worker-utils-
|
|
1
|
+
import { b as createWsWorkerMessageListener } from './worker-utils-BuUq1bP1.js';
|
|
2
2
|
import 'hydrated-ws';
|
|
3
3
|
import 'ms';
|
|
4
|
-
import './communicator-
|
|
4
|
+
import './communicator-DKKKAI0H.js';
|
|
5
5
|
import 'protobufjs/minimal';
|
|
6
6
|
|
|
7
7
|
// This Source Code Form is subject to the terms of the Mozilla Public
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Waterfall } from 'hydrated-ws';
|
|
2
2
|
import require$$0 from 'ms';
|
|
3
|
-
import { F as FoxgloveCommunicator } from './communicator-
|
|
3
|
+
import { F as FoxgloveCommunicator } from './communicator-DKKKAI0H.js';
|
|
4
4
|
|
|
5
5
|
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
|
|
6
6
|
|
|
@@ -1208,6 +1208,7 @@ new TextEncoder();
|
|
|
1208
1208
|
class WsWorker extends FoxgloveCommunicator {
|
|
1209
1209
|
#ws;
|
|
1210
1210
|
#client;
|
|
1211
|
+
#subscriptions = new Map();
|
|
1211
1212
|
#createWs(url, onReconnect) {
|
|
1212
1213
|
this.#ws = new Waterfall(url, FoxgloveClient.SUPPORTED_SUBPROTOCOL, {
|
|
1213
1214
|
connectionTimeout: 2000,
|
|
@@ -1246,7 +1247,10 @@ class WsWorker extends FoxgloveCommunicator {
|
|
|
1246
1247
|
subscriptionId,
|
|
1247
1248
|
data
|
|
1248
1249
|
}) => {
|
|
1249
|
-
this.
|
|
1250
|
+
const subscription = this.#subscriptions.get(subscriptionId);
|
|
1251
|
+
if (subscription) {
|
|
1252
|
+
this.handleGenericMessage(subscription.topic, subscription.schema, data);
|
|
1253
|
+
}
|
|
1250
1254
|
});
|
|
1251
1255
|
}
|
|
1252
1256
|
#handleMessages() {
|
|
@@ -1262,8 +1266,23 @@ class WsWorker extends FoxgloveCommunicator {
|
|
|
1262
1266
|
sendServiceCallRequest(request) {
|
|
1263
1267
|
this.#client.sendServiceCallRequest(request);
|
|
1264
1268
|
}
|
|
1265
|
-
subscribe(
|
|
1266
|
-
|
|
1269
|
+
subscribe(topics) {
|
|
1270
|
+
const channels = this.getPublicChannels().filter(publicChannel => topics.includes(publicChannel.topic));
|
|
1271
|
+
for (const channel of channels) {
|
|
1272
|
+
const subscription = this.#client.subscribe(channel.id);
|
|
1273
|
+
this.#subscriptions.set(subscription, {
|
|
1274
|
+
topic: channel.topic,
|
|
1275
|
+
schema: channel.schemaName,
|
|
1276
|
+
kind: channel.kind
|
|
1277
|
+
});
|
|
1278
|
+
}
|
|
1279
|
+
}
|
|
1280
|
+
unsubscribe(topics) {
|
|
1281
|
+
const subscriptionIds = [...this.#subscriptions.entries()].filter(([_id, data]) => topics.includes(data.topic)).map(subscription => subscription[0]);
|
|
1282
|
+
for (const subscriptionId of subscriptionIds) {
|
|
1283
|
+
this.#subscriptions.delete(subscriptionId);
|
|
1284
|
+
this.#client.unsubscribe(subscriptionId);
|
|
1285
|
+
}
|
|
1267
1286
|
}
|
|
1268
1287
|
constructor(wsUrl, send, sendWithTransfer) {
|
|
1269
1288
|
super();
|
|
@@ -1325,6 +1344,12 @@ function createWsWorkerMessageListener(send, sendWithTransfer) {
|
|
|
1325
1344
|
case "call_service":
|
|
1326
1345
|
wsWorker?.callService(data);
|
|
1327
1346
|
break;
|
|
1347
|
+
case 'subscribe':
|
|
1348
|
+
wsWorker?.subscribe(data);
|
|
1349
|
+
break;
|
|
1350
|
+
case 'unsubscribe':
|
|
1351
|
+
wsWorker?.unsubscribe(data);
|
|
1352
|
+
break;
|
|
1328
1353
|
}
|
|
1329
1354
|
};
|
|
1330
1355
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@luxonis/visualizer-protobuf",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.2.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "RobotHub Visualizer Library",
|
|
6
6
|
"author": "Luxonis Corp",
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
"@emotion/react": "11.11.3",
|
|
17
17
|
"@emotion/styled": "11.11.0",
|
|
18
18
|
"@luxonis/common-fe-components": "1.9.5",
|
|
19
|
-
"@luxonis/remote-connection": "2.
|
|
19
|
+
"@luxonis/remote-connection": "2.1.0",
|
|
20
20
|
"@mui/icons-material": "5.15.5",
|
|
21
21
|
"@mui/material": "5.15.6",
|
|
22
22
|
"color": "^4.2.3",
|