@luxonis/depthai-viewer-common 3.8.1 → 3.8.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.
- package/README.md +104 -11
- package/dist/components/CTASubLabel.d.ts +10 -2
- package/dist/components/CTASubLabel.d.ts.map +1 -1
- package/dist/components/CTASubLabel.js +3 -0
- package/dist/components/CTASubLabel.js.map +1 -1
- package/dist/components/DepthAIContext.d.ts +25 -2
- package/dist/components/DepthAIContext.d.ts.map +1 -1
- package/dist/components/DepthAIContext.js +3 -0
- package/dist/components/DepthAIContext.js.map +1 -1
- package/dist/components/Pipeline.d.ts +19 -2
- package/dist/components/Pipeline.d.ts.map +1 -1
- package/dist/components/Pipeline.js +12 -0
- package/dist/components/Pipeline.js.map +1 -1
- package/dist/components/Resizable.d.ts +20 -0
- package/dist/components/Resizable.d.ts.map +1 -1
- package/dist/components/Resizable.js +8 -0
- package/dist/components/Resizable.js.map +1 -1
- package/dist/components/Streams.d.ts +100 -4
- package/dist/components/Streams.d.ts.map +1 -1
- package/dist/components/Streams.js +78 -17
- package/dist/components/Streams.js.map +1 -1
- package/dist/components/ThemeToggle.d.ts +8 -0
- package/dist/components/ThemeToggle.d.ts.map +1 -1
- package/dist/components/ThemeToggle.js +8 -0
- package/dist/components/ThemeToggle.js.map +1 -1
- package/dist/constants/connection.d.ts +27 -0
- package/dist/constants/connection.d.ts.map +1 -1
- package/dist/constants/connection.js +12 -0
- package/dist/constants/connection.js.map +1 -1
- package/dist/constants/streams.d.ts +9 -0
- package/dist/constants/streams.d.ts.map +1 -1
- package/dist/constants/streams.js +6 -0
- package/dist/constants/streams.js.map +1 -1
- package/dist/constants/url.d.ts +12 -0
- package/dist/constants/url.d.ts.map +1 -1
- package/dist/constants/url.js +12 -0
- package/dist/constants/url.js.map +1 -1
- package/dist/dai-connection/connection.d.ts +189 -2
- package/dist/dai-connection/connection.d.ts.map +1 -1
- package/dist/dai-connection/connection.js +121 -5
- package/dist/dai-connection/connection.js.map +1 -1
- package/dist/dai-connection/decoder.worker.d.ts +21 -0
- package/dist/dai-connection/decoder.worker.d.ts.map +1 -1
- package/dist/dai-connection/decoder.worker.js +6 -0
- package/dist/dai-connection/decoder.worker.js.map +1 -1
- package/dist/hooks/connection.d.ts +206 -0
- package/dist/hooks/connection.d.ts.map +1 -1
- package/dist/hooks/connection.js +22 -0
- package/dist/hooks/connection.js.map +1 -1
- package/dist/hooks/navigation.d.ts +5 -0
- package/dist/hooks/navigation.d.ts.map +1 -1
- package/dist/hooks/navigation.js +5 -0
- package/dist/hooks/navigation.js.map +1 -1
- package/dist/hooks/search.d.ts +12 -0
- package/dist/hooks/search.d.ts.map +1 -1
- package/dist/hooks/search.js +3 -0
- package/dist/hooks/search.js.map +1 -1
- package/dist/hooks/useFullScreen.d.ts +8 -0
- package/dist/hooks/useFullScreen.d.ts.map +1 -1
- package/dist/hooks/useFullScreen.js +8 -0
- package/dist/hooks/useFullScreen.js.map +1 -1
- package/dist/index.css +9 -9
- package/dist/index.d.ts +5 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +5 -2
- package/dist/index.js.map +1 -1
- package/dist/models/device-configuration.d.ts +69 -0
- package/dist/models/device-configuration.d.ts.map +1 -1
- package/dist/models/device-configuration.js +21 -0
- package/dist/models/device-configuration.js.map +1 -1
- package/dist/providers/ConnectionProvider.d.ts +56 -2
- package/dist/providers/ConnectionProvider.d.ts.map +1 -1
- package/dist/providers/ConnectionProvider.js +26 -0
- package/dist/providers/ConnectionProvider.js.map +1 -1
- package/dist/providers/DataProvider.d.ts +129 -0
- package/dist/providers/DataProvider.d.ts.map +1 -1
- package/dist/providers/DataProvider.js +21 -0
- package/dist/providers/DataProvider.js.map +1 -1
- package/dist/providers/ThemeProvider.d.ts +67 -7
- package/dist/providers/ThemeProvider.d.ts.map +1 -1
- package/dist/providers/ThemeProvider.js +39 -2
- package/dist/providers/ThemeProvider.js.map +1 -1
- package/dist/providers/VisualizerRuntimeConfigProvider.d.ts +43 -3
- package/dist/providers/VisualizerRuntimeConfigProvider.d.ts.map +1 -1
- package/dist/providers/VisualizerRuntimeConfigProvider.js +20 -3
- package/dist/providers/VisualizerRuntimeConfigProvider.js.map +1 -1
- package/dist/utils/arrays.d.ts +7 -0
- package/dist/utils/arrays.d.ts.map +1 -1
- package/dist/utils/arrays.js +7 -0
- package/dist/utils/arrays.js.map +1 -1
- package/dist/utils/functions.d.ts +3 -0
- package/dist/utils/functions.d.ts.map +1 -1
- package/dist/utils/functions.js +3 -0
- package/dist/utils/functions.js.map +1 -1
- package/dist/utils/local-storage.d.ts +20 -0
- package/dist/utils/local-storage.d.ts.map +1 -1
- package/dist/utils/local-storage.js +17 -0
- package/dist/utils/local-storage.js.map +1 -1
- package/dist/utils/logger.d.ts +31 -0
- package/dist/utils/logger.d.ts.map +1 -1
- package/dist/utils/logger.js +36 -7
- package/dist/utils/logger.js.map +1 -1
- package/dist/utils/sorting.d.ts +6 -0
- package/dist/utils/sorting.d.ts.map +1 -1
- package/dist/utils/sorting.js +6 -0
- package/dist/utils/sorting.js.map +1 -1
- package/dist/utils/topic.d.ts +6 -0
- package/dist/utils/topic.d.ts.map +1 -1
- package/dist/utils/topic.js +3 -0
- package/dist/utils/topic.js.map +1 -1
- package/dist/utils/units.d.ts +24 -0
- package/dist/utils/units.d.ts.map +1 -1
- package/dist/utils/units.js +24 -0
- package/dist/utils/units.js.map +1 -1
- package/dist/utils/url.d.ts +9 -0
- package/dist/utils/url.d.ts.map +1 -1
- package/dist/utils/url.js +10 -1
- package/dist/utils/url.js.map +1 -1
- package/dist/utils/vite-dev-fix.d.ts +13 -0
- package/dist/utils/vite-dev-fix.d.ts.map +1 -1
- package/dist/utils/vite-dev-fix.js +13 -0
- package/dist/utils/vite-dev-fix.js.map +1 -1
- package/dist/visualizer/components/Panel.js +1 -1
- package/dist/visualizer/components/Panel.js.map +1 -1
- package/dist/visualizer/messaging/decoder-fixtures.d.ts.map +1 -1
- package/dist/visualizer/messaging/decoder-fixtures.js +8 -2
- package/dist/visualizer/messaging/decoder-fixtures.js.map +1 -1
- package/dist/visualizer/messaging/deserialization/detections/constants.d.ts +1 -0
- package/dist/visualizer/messaging/deserialization/detections/constants.d.ts.map +1 -1
- package/dist/visualizer/messaging/deserialization/detections/constants.js +1 -0
- package/dist/visualizer/messaging/deserialization/detections/constants.js.map +1 -1
- package/dist/visualizer/messaging/deserialization/detections/custom.d.ts.map +1 -1
- package/dist/visualizer/messaging/deserialization/detections/custom.js +2 -2
- package/dist/visualizer/messaging/deserialization/detections/custom.js.map +1 -1
- package/dist/visualizer/messaging/deserialization/detections/detection.d.ts.map +1 -1
- package/dist/visualizer/messaging/deserialization/detections/detection.js +2 -2
- package/dist/visualizer/messaging/deserialization/detections/detection.js.map +1 -1
- package/dist/visualizer/messaging/utils.d.ts +1 -0
- package/dist/visualizer/messaging/utils.d.ts.map +1 -1
- package/dist/visualizer/messaging/utils.js +8 -6
- package/dist/visualizer/messaging/utils.js.map +1 -1
- package/dist/visualizer/output.css +18 -18
- package/dist/visualizer/panels/image/ImageCanvasRenderer.d.ts.map +1 -1
- package/dist/visualizer/panels/image/ImageCanvasRenderer.js +4 -1
- package/dist/visualizer/panels/image/ImageCanvasRenderer.js.map +1 -1
- package/dist/visualizer/panels/image/annotation-overlay.d.ts.map +1 -1
- package/dist/visualizer/panels/image/annotation-overlay.js +16 -5
- package/dist/visualizer/panels/image/annotation-overlay.js.map +1 -1
- package/package.json +2 -2
- package/protobuf-gen.sh +60 -3
package/README.md
CHANGED
|
@@ -1,11 +1,104 @@
|
|
|
1
|
-
# DepthAI
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
-
|
|
1
|
+
# DepthAI Viewer Common
|
|
2
|
+
|
|
3
|
+
Shared React components, hooks, providers, connection utilities, and viewer helpers for Luxonis DepthAI frontend applications.
|
|
4
|
+
|
|
5
|
+
## Purpose
|
|
6
|
+
|
|
7
|
+
`@luxonis/depthai-viewer-common` contains reusable UI and connection building blocks used by OAK Viewer, OAK Visualizer, and other frontend applications that need to connect to DepthAI services, render streams, and share viewer state.
|
|
8
|
+
|
|
9
|
+
Use this package when an application needs:
|
|
10
|
+
|
|
11
|
+
- DepthAI connection management through WebSocket or WebRTC.
|
|
12
|
+
- Stream and pipeline UI components.
|
|
13
|
+
- Shared React providers for connection, layout, URL, and unit preferences.
|
|
14
|
+
- Utility functions for URLs, stream sorting, local storage, units, logging, and Vite setup.
|
|
15
|
+
|
|
16
|
+
## Installation
|
|
17
|
+
|
|
18
|
+
```bash
|
|
19
|
+
npm install @luxonis/depthai-viewer-common
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
This package expects the host application to provide compatible React and React DOM versions.
|
|
23
|
+
|
|
24
|
+
## Imports
|
|
25
|
+
|
|
26
|
+
```ts
|
|
27
|
+
import {
|
|
28
|
+
ConnectionProvider,
|
|
29
|
+
DataProvider,
|
|
30
|
+
Streams,
|
|
31
|
+
useCreateConnection,
|
|
32
|
+
} from '@luxonis/depthai-viewer-common';
|
|
33
|
+
import '@luxonis/depthai-viewer-common/styles';
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
The package also exposes visualizer-specific entrypoints for applications that need lower-level visualizer integration:
|
|
37
|
+
|
|
38
|
+
```ts
|
|
39
|
+
import {
|
|
40
|
+
ImagePanel,
|
|
41
|
+
PanelLayout,
|
|
42
|
+
PointCloudPanel,
|
|
43
|
+
VisualizerConnection,
|
|
44
|
+
} from '@luxonis/depthai-viewer-common/visualizer';
|
|
45
|
+
import { viewerViteDevFixPlugin } from '@luxonis/depthai-viewer-common/vite';
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
## Basic Usage
|
|
49
|
+
|
|
50
|
+
```tsx
|
|
51
|
+
import {
|
|
52
|
+
ConnectionProvider,
|
|
53
|
+
DataProvider,
|
|
54
|
+
Streams,
|
|
55
|
+
} from '@luxonis/depthai-viewer-common';
|
|
56
|
+
import '@luxonis/depthai-viewer-common/styles';
|
|
57
|
+
|
|
58
|
+
export function ViewerPage() {
|
|
59
|
+
return (
|
|
60
|
+
<DataProvider
|
|
61
|
+
connectionConfig={{
|
|
62
|
+
type: 'ws',
|
|
63
|
+
wsUrl: 'ws://localhost:8765',
|
|
64
|
+
}}
|
|
65
|
+
>
|
|
66
|
+
<ConnectionProvider activeServices={[]}>
|
|
67
|
+
<Streams />
|
|
68
|
+
</ConnectionProvider>
|
|
69
|
+
</DataProvider>
|
|
70
|
+
);
|
|
71
|
+
}
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
## API Documentation
|
|
75
|
+
|
|
76
|
+
TSDoc comments in `src/` are the source of truth for generated API reference documentation.
|
|
77
|
+
|
|
78
|
+
Generate the TypeDoc JSON API model from the repository root:
|
|
79
|
+
|
|
80
|
+
```bash
|
|
81
|
+
npm run docs:api-json:common
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
The generated JSON is written to:
|
|
85
|
+
|
|
86
|
+
```text
|
|
87
|
+
dist/docs-api/depthai-viewer-common.json
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
This file is an intermediate build artifact for the `docs-content` pipeline. Do not edit it manually.
|
|
91
|
+
|
|
92
|
+
## Development
|
|
93
|
+
|
|
94
|
+
From the repository root:
|
|
95
|
+
|
|
96
|
+
```bash
|
|
97
|
+
npm run build:common
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
On Windows:
|
|
101
|
+
|
|
102
|
+
```bash
|
|
103
|
+
npm run build:common:win
|
|
104
|
+
```
|
|
@@ -1,6 +1,14 @@
|
|
|
1
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Props for the store/documentation call-to-action shown when a connected device exposes no streams.
|
|
3
|
+
*/
|
|
4
|
+
export type CTASubLabelProps = {
|
|
5
|
+
/**
|
|
6
|
+
* Whether the delayed call-to-action may be displayed.
|
|
7
|
+
*/
|
|
2
8
|
shouldDisplayAd: boolean;
|
|
3
9
|
};
|
|
10
|
+
/**
|
|
11
|
+
* Displays a delayed helper label with links to Luxonis purchasing and documentation pages.
|
|
12
|
+
*/
|
|
4
13
|
export declare const CTASubLabel: (props: CTASubLabelProps) => false | import("react/jsx-runtime").JSX.Element;
|
|
5
|
-
export {};
|
|
6
14
|
//# sourceMappingURL=CTASubLabel.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CTASubLabel.d.ts","sourceRoot":"","sources":["../../src/components/CTASubLabel.tsx"],"names":[],"mappings":"AAOA,
|
|
1
|
+
{"version":3,"file":"CTASubLabel.d.ts","sourceRoot":"","sources":["../../src/components/CTASubLabel.tsx"],"names":[],"mappings":"AAOA;;GAEG;AACH,MAAM,MAAM,gBAAgB,GAAG;IAC9B;;OAEG;IACH,eAAe,EAAE,OAAO,CAAC;CACzB,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,WAAW,GAAI,OAAO,gBAAgB,oDAiClD,CAAC"}
|
|
@@ -3,6 +3,9 @@ import { ExternalLink, Flex, SubLabel } from '@luxonis/ui-components';
|
|
|
3
3
|
import React from 'react';
|
|
4
4
|
import { useDaiConnection } from '../providers/ConnectionProvider.js';
|
|
5
5
|
const DISPLAY_LABEL_TIMEOUT = 30_000;
|
|
6
|
+
/**
|
|
7
|
+
* Displays a delayed helper label with links to Luxonis purchasing and documentation pages.
|
|
8
|
+
*/
|
|
6
9
|
export const CTASubLabel = (props) => {
|
|
7
10
|
const { shouldDisplayAd } = props;
|
|
8
11
|
const { connected, topics } = useDaiConnection();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CTASubLabel.js","sourceRoot":"","sources":["../../src/components/CTASubLabel.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,YAAY,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AAEtE,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,gBA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C,0BAA0B,EAAC,MAAM,EAAC,QAAQ,YAC9D,KAAC,QAAQ,IAAC,KAAK,EAAC,MAAM,EAAC,IAAI,EAAC,eAAe,EAAC,SAAS,EAAC,gBAAgB,GAAG,GAC3D,4BAEf,cAAM,kBAAa,GAAG,EACtB,KAAC,YAAY,IAAC,GAAG,QAAC,EAAE,EAAC,wCAAwC,EAAC,MAAM,EAAC,QAAQ,YAC5E,KAAC,QAAQ,IAAC,KAAK,EAAC,MAAM,EAAC,IAAI,EAAC,uBAAuB,EAAC,SAAS,EAAC,gBAAgB,GAAG,GACnE,EAAC,GAAG,yDAEhB,GAEJ,GACI,CACP,CACD,CAAC;AACH,CAAC,CAAC"}
|
|
@@ -3,14 +3,37 @@ import type { DAIService, MessageHandlerVersion } from '../dai-connection/connec
|
|
|
3
3
|
import type { TokenRefreshHandler } from '../hooks/connection.js';
|
|
4
4
|
import { type DataProviderProps } from '../providers/DataProvider.js';
|
|
5
5
|
import type { RuntimeConfig } from '../visualizer/index.js';
|
|
6
|
-
|
|
6
|
+
/**
|
|
7
|
+
* Props for the top-level DepthAI context provider.
|
|
8
|
+
*/
|
|
9
|
+
export type DepthAIEntrypointProps = {
|
|
10
|
+
/**
|
|
11
|
+
* DepthAI service names that should be polled while the connection is alive.
|
|
12
|
+
*/
|
|
7
13
|
activeServices?: DAIService[];
|
|
14
|
+
/**
|
|
15
|
+
* React tree that consumes the connection, data, and visualizer runtime contexts.
|
|
16
|
+
*/
|
|
8
17
|
children?: React.ReactNode;
|
|
18
|
+
/**
|
|
19
|
+
* Enables debug logging for the shared DepthAI connection stack.
|
|
20
|
+
*/
|
|
9
21
|
withDebugLogs?: boolean;
|
|
22
|
+
/**
|
|
23
|
+
* Selects the backend message handling protocol expected by the visualizer connection.
|
|
24
|
+
*/
|
|
10
25
|
messageHandlerVersion?: MessageHandlerVersion;
|
|
26
|
+
/**
|
|
27
|
+
* Controls how refreshed WebRTC tokens are propagated back to the host application.
|
|
28
|
+
*/
|
|
11
29
|
tokenRefresh?: TokenRefreshHandler;
|
|
30
|
+
/**
|
|
31
|
+
* Initial runtime configuration used by visualizer panels and stream decoding.
|
|
32
|
+
*/
|
|
12
33
|
visualizerRuntimeConfig?: Readonly<RuntimeConfig>;
|
|
13
34
|
} & DataProviderProps;
|
|
35
|
+
/**
|
|
36
|
+
* Composes the common DepthAI data, connection, and visualizer runtime providers.
|
|
37
|
+
*/
|
|
14
38
|
export declare function DepthAIContext(props: Readonly<DepthAIEntrypointProps>): import("react/jsx-runtime").JSX.Element;
|
|
15
|
-
export {};
|
|
16
39
|
//# sourceMappingURL=DepthAIContext.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DepthAIContext.d.ts","sourceRoot":"","sources":["../../src/components/DepthAIContext.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,EAAE,UAAU,EAAE,qBAAqB,EAAE,MAAM,iCAAiC,CAAC;AACzF,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAElE,OAAO,EAAgB,KAAK,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;AAEpF,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAE5D,
|
|
1
|
+
{"version":3,"file":"DepthAIContext.d.ts","sourceRoot":"","sources":["../../src/components/DepthAIContext.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,EAAE,UAAU,EAAE,qBAAqB,EAAE,MAAM,iCAAiC,CAAC;AACzF,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAElE,OAAO,EAAgB,KAAK,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;AAEpF,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAE5D;;GAEG;AACH,MAAM,MAAM,sBAAsB,GAAG;IACpC;;OAEG;IACH,cAAc,CAAC,EAAE,UAAU,EAAE,CAAC;IAC9B;;OAEG;IACH,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B;;OAEG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB;;OAEG;IACH,qBAAqB,CAAC,EAAE,qBAAqB,CAAC;IAC9C;;OAEG;IACH,YAAY,CAAC,EAAE,mBAAmB,CAAC;IACnC;;OAEG;IACH,uBAAuB,CAAC,EAAE,QAAQ,CAAC,aAAa,CAAC,CAAC;CAClD,GAAG,iBAAiB,CAAC;AAEtB;;GAEG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,QAAQ,CAAC,sBAAsB,CAAC,2CAyBrE"}
|
|
@@ -2,6 +2,9 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
2
2
|
import { ConnectionProvider } from '../providers/ConnectionProvider.js';
|
|
3
3
|
import { DataProvider } from '../providers/DataProvider.js';
|
|
4
4
|
import { VisualizerRuntimeConfigProvider } from '../providers/VisualizerRuntimeConfigProvider.js';
|
|
5
|
+
/**
|
|
6
|
+
* Composes the common DepthAI data, connection, and visualizer runtime providers.
|
|
7
|
+
*/
|
|
5
8
|
export function DepthAIContext(props) {
|
|
6
9
|
const { activeServices = [], children, withDebugLogs, messageHandlerVersion, connectionConfig, tokenRefresh, visualizerRuntimeConfig, } = props;
|
|
7
10
|
return (_jsx(DataProvider, { connectionConfig: connectionConfig, children: _jsx(VisualizerRuntimeConfigProvider, { initialRuntimeConfig: visualizerRuntimeConfig, children: _jsx(ConnectionProvider, { activeServices: activeServices, withDebugLogs: withDebugLogs, messageHandlerVersion: messageHandlerVersion, tokenRefresh: tokenRefresh, children: children }) }) }));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DepthAIContext.js","sourceRoot":"","sources":["../../src/components/DepthAIContext.tsx"],"names":[],"mappings":";AAGA,OAAO,EAAE,kBAAkB,EAAE,MAAM,oCAAoC,CAAC;AACxE,OAAO,EAAE,YAAY,EAA0B,MAAM,8BAA8B,CAAC;AACpF,OAAO,EAAE,+BAA+B,EAAE,MAAM,iDAAiD,CAAC;
|
|
1
|
+
{"version":3,"file":"DepthAIContext.js","sourceRoot":"","sources":["../../src/components/DepthAIContext.tsx"],"names":[],"mappings":";AAGA,OAAO,EAAE,kBAAkB,EAAE,MAAM,oCAAoC,CAAC;AACxE,OAAO,EAAE,YAAY,EAA0B,MAAM,8BAA8B,CAAC;AACpF,OAAO,EAAE,+BAA+B,EAAE,MAAM,iDAAiD,CAAC;AAiClG;;GAEG;AACH,MAAM,UAAU,cAAc,CAAC,KAAuC;IACrE,MAAM,EACL,cAAc,GAAG,EAAE,EACnB,QAAQ,EACR,aAAa,EACb,qBAAqB,EACrB,gBAAgB,EAChB,YAAY,EACZ,uBAAuB,GACvB,GAAG,KAAK,CAAC;IAEV,OAAO,CACN,KAAC,YAAY,IAAC,gBAAgB,EAAE,gBAAgB,YAC/C,KAAC,+BAA+B,IAAC,oBAAoB,EAAE,uBAAuB,YAC7E,KAAC,kBAAkB,IAClB,cAAc,EAAE,cAAc,EAC9B,aAAa,EAAE,aAAa,EAC5B,qBAAqB,EAAE,qBAAqB,EAC5C,YAAY,EAAE,YAAY,YAEzB,QAAQ,GACW,GACY,GACpB,CACf,CAAC;AACH,CAAC"}
|
|
@@ -1,6 +1,23 @@
|
|
|
1
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Props for the DepthAI pipeline visualization wrapper.
|
|
3
|
+
*/
|
|
4
|
+
export type PipelineProps = {
|
|
5
|
+
/**
|
|
6
|
+
* Shows the pipeline loading state while the parent application swaps pipeline presets.
|
|
7
|
+
*/
|
|
2
8
|
isPipelineSwitching?: boolean;
|
|
3
9
|
};
|
|
10
|
+
/**
|
|
11
|
+
* Renders the current DepthAI pipeline graph and its live node state when pipeline debugging is available.
|
|
12
|
+
*
|
|
13
|
+
* @remarks
|
|
14
|
+
* The component reads pipeline data from {@link ConnectionProvider}. It prefers the
|
|
15
|
+
* default pipeline when available and falls back to the full pipeline.
|
|
16
|
+
*
|
|
17
|
+
* @example
|
|
18
|
+
* ```tsx
|
|
19
|
+
* <Pipeline isPipelineSwitching={isPresetChanging} />
|
|
20
|
+
* ```
|
|
21
|
+
*/
|
|
4
22
|
export declare const Pipeline: (props: PipelineProps) => import("react/jsx-runtime").JSX.Element;
|
|
5
|
-
export {};
|
|
6
23
|
//# sourceMappingURL=Pipeline.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Pipeline.d.ts","sourceRoot":"","sources":["../../src/components/Pipeline.tsx"],"names":[],"mappings":"AAOA,
|
|
1
|
+
{"version":3,"file":"Pipeline.d.ts","sourceRoot":"","sources":["../../src/components/Pipeline.tsx"],"names":[],"mappings":"AAOA;;GAEG;AACH,MAAM,MAAM,aAAa,GAAG;IAC3B;;OAEG;IACH,mBAAmB,CAAC,EAAE,OAAO,CAAC;CAC9B,CAAC;AAEF;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,QAAQ,GAAI,OAAO,aAAa,4CA8E5C,CAAC"}
|
|
@@ -4,6 +4,18 @@ import { Alert, Flex } from '@luxonis/ui-components';
|
|
|
4
4
|
import React from 'react';
|
|
5
5
|
import { useDaiConnection } from '../providers/ConnectionProvider.js';
|
|
6
6
|
const PIPELINE_LOADING_TIMEOUT = 60_000;
|
|
7
|
+
/**
|
|
8
|
+
* Renders the current DepthAI pipeline graph and its live node state when pipeline debugging is available.
|
|
9
|
+
*
|
|
10
|
+
* @remarks
|
|
11
|
+
* The component reads pipeline data from {@link ConnectionProvider}. It prefers the
|
|
12
|
+
* default pipeline when available and falls back to the full pipeline.
|
|
13
|
+
*
|
|
14
|
+
* @example
|
|
15
|
+
* ```tsx
|
|
16
|
+
* <Pipeline isPipelineSwitching={isPresetChanging} />
|
|
17
|
+
* ```
|
|
18
|
+
*/
|
|
7
19
|
export const Pipeline = (props) => {
|
|
8
20
|
const { isPipelineSwitching } = props;
|
|
9
21
|
const { pipeline, isPipelineLoading, setIsPipelineLoading, fullPipeline, pipelineState } = useDaiConnection();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Pipeline.js","sourceRoot":"","sources":["../../src/components/Pipeline.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAC/D,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAC;AACrD,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,gBAAgB,EAAE,MAAM,oCAAoC,CAAC;AAEtE,MAAM,wBAAwB,GAAG,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"Pipeline.js","sourceRoot":"","sources":["../../src/components/Pipeline.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAC/D,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAC;AACrD,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,gBAAgB,EAAE,MAAM,oCAAoC,CAAC;AAEtE,MAAM,wBAAwB,GAAG,MAAM,CAAC;AAYxC;;;;;;;;;;;GAWG;AACH,MAAM,CAAC,MAAM,QAAQ,GAAG,CAAC,KAAoB,EAAE,EAAE;IAChD,MAAM,EAAE,mBAAmB,EAAE,GAAG,KAAK,CAAC;IACtC,MAAM,EAAE,QAAQ,EAAE,iBAAiB,EAAE,oBAAoB,EAAE,YAAY,EAAE,aAAa,EAAE,GACvF,gBAAgB,EAAE,CAAC;IAEpB,KAAK,CAAC,SAAS,CAAC,GAAG,EAAE;QACpB,IAAI,iBAAiB,IAAI,QAAQ,KAAK,SAAS,EAAE,CAAC;YACjD,MAAM,OAAO,GAAG,UAAU,CAAC,GAAG,EAAE;gBAC/B,oBAAoB,CAAC,KAAK,CAAC,CAAC;YAC7B,CAAC,EAAE,wBAAwB,CAAC,CAAC;YAC7B,OAAO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AK,CAAC,SAAS,CAAC,GAAG,EAAE;QACpB,IAAI,uBAAuB,CAAC,OAAO,KAAK,YAAY,EAAE,CAAC;YACtD,OAAO;QACR,CAAC;QAED,uBAAuB,CAAC,OAAO,GAAG,YAAY,CAAC;QAC/C,oBAAoB,CAAC,CAAC,UAAU,EAAE,EAAE,CAAC,UAAU,GAAG,CAAC,CAAC,CAAC;IACtD,CAAC,EAAE,CAAC,YAAY,CAAC,CAAC,CAAC;IAEnB,MAAM,kBAAkB,GAAG,iBAAiB,IAAI,mBAAmB,CAAC;IAEpE,OAAO,CACN,MAAC,IAAI,IAAC,SAAS,EAAC,QAAQ,EAAC,IAAI,QAAC,GAAG,EAAC,IAAI,EAAC,QAAQ,EAAC,UAAU,aACxD,CAAC,aAAa,IAAI,CAClB,KAAC,KAAK,IACL,MAAM,EAAC,SAAS,EAChB,OAAO,EAAC,OAAO,EACf,WAAW,EAAE;;6BAEW,GACvB,CACF,EACD,KAAC,cAAc,IAEd,QAAQ,EAAE,kBAAkB,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,YAAY,EAClD,aAAa,EAAE,kBAAkB,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,iBAAiB,EAC5D,WAAW,EAAE,CAAC,CAAC,aAAa,IAHvB,iBAAiB,CAIrB,IACI,CACP,CAAC;AACH,CAAC,CAAC"}
|
|
@@ -1,10 +1,30 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
export type ResizableItem = {
|
|
3
|
+
/**
|
|
4
|
+
* React content rendered inside one resizable panel.
|
|
5
|
+
*/
|
|
3
6
|
component: React.ReactNode;
|
|
4
7
|
};
|
|
8
|
+
/**
|
|
9
|
+
* Props for a two-dimensional resizable panel layout.
|
|
10
|
+
*/
|
|
5
11
|
export type ResizableLayoutProps = {
|
|
12
|
+
/**
|
|
13
|
+
* Stable autosave id used by react-resizable-panels to persist panel sizes.
|
|
14
|
+
*/
|
|
6
15
|
id?: string | null;
|
|
16
|
+
/**
|
|
17
|
+
* Rows of panel items. Each nested array is rendered as one horizontal panel group.
|
|
18
|
+
*/
|
|
7
19
|
items: ResizableItem[][];
|
|
8
20
|
};
|
|
21
|
+
/**
|
|
22
|
+
* Renders nested vertical and horizontal resize groups for stream and visualization panels.
|
|
23
|
+
*
|
|
24
|
+
* @example
|
|
25
|
+
* ```tsx
|
|
26
|
+
* <ResizableLayout items={[[{ component: <Streams /> }]]} />
|
|
27
|
+
* ```
|
|
28
|
+
*/
|
|
9
29
|
export declare const ResizableLayout: React.FC<ResizableLayoutProps>;
|
|
10
30
|
//# sourceMappingURL=Resizable.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Resizable.d.ts","sourceRoot":"","sources":["../../src/components/Resizable.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,MAAM,MAAM,aAAa,GAAG;IAC3B,SAAS,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B,CAAC;AAEF,MAAM,MAAM,oBAAoB,GAAG;IAClC,EAAE,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACnB,KAAK,EAAE,aAAa,EAAE,EAAE,CAAC;CACzB,CAAC;AAEF,eAAO,MAAM,eAAe,EAAE,KAAK,CAAC,EAAE,CAAC,oBAAoB,CA2C1D,CAAC"}
|
|
1
|
+
{"version":3,"file":"Resizable.d.ts","sourceRoot":"","sources":["../../src/components/Resizable.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,MAAM,MAAM,aAAa,GAAG;IAC3B;;OAEG;IACH,SAAS,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,oBAAoB,GAAG;IAClC;;OAEG;IACH,EAAE,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACnB;;OAEG;IACH,KAAK,EAAE,aAAa,EAAE,EAAE,CAAC;CACzB,CAAC;AAEF;;;;;;;GAOG;AACH,eAAO,MAAM,eAAe,EAAE,KAAK,CAAC,EAAE,CAAC,oBAAoB,CA2C1D,CAAC"}
|
|
@@ -1,6 +1,14 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { Panel, PanelGroup, PanelResizeHandle } from 'react-resizable-panels';
|
|
4
|
+
/**
|
|
5
|
+
* Renders nested vertical and horizontal resize groups for stream and visualization panels.
|
|
6
|
+
*
|
|
7
|
+
* @example
|
|
8
|
+
* ```tsx
|
|
9
|
+
* <ResizableLayout items={[[{ component: <Streams /> }]]} />
|
|
10
|
+
* ```
|
|
11
|
+
*/
|
|
4
12
|
export const ResizableLayout = ({ items, id = 'resizable-layout', }) => {
|
|
5
13
|
const groupStyles = React.useMemo(() => ({
|
|
6
14
|
display: 'flex',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Resizable.js","sourceRoot":"","sources":["../../src/components/Resizable.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,KAAK,EAAE,UAAU,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;
|
|
1
|
+
{"version":3,"file":"Resizable.js","sourceRoot":"","sources":["../../src/components/Resizable.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,KAAK,EAAE,UAAU,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAuB9E;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,eAAe,GAAmC,CAAC,EAC/D,KAAK,EACL,EAAE,GAAG,kBAAkB,GACvB,EAAE,EAAE;IACJ,MAAM,WAAW,GAAwB,KAAK,CAAC,OAAO,CACrD,GAAG,EAAE,CAAC,CAAC;QACN,OAAO,EAAE,MAAM;QACf,GAAG,EAAE,KAAK;KACV,CAAC,EACF,EAAE,CACF,CAAC;IAEF,MAAM,MAAM,GAAG,KAAK,CAAC,OAAO,CAC3B,GAAG,EAAE,CACJ,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,QAAQ,EAAE,EAAE,CAAC,CAC5B,MAAC,KAAK,CAAC,QAAQ,eACd,KAAC,KAAK,IAAC,KAAK,EAAE,QAAQ,YACrB,KAAC,UAAU,IACV,UAAU,EAAE,EAAE,IAAI,GAAG,EAAE,IAAI,QAAQ,EAAE,EACrC,SAAS,EAAC,YAAY,EACtB,KAAK,EAAE,WAAW,YAEjB,GAAG,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,SAAS,EAAE,EAAE,CAAC,CAC7B,MAAC,KAAK,CAAC,QAAQ,eACd,KAAC,KAAK,IAAC,KAAK,EAAE,SAAS,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE,YACjD,IAAI,CAAC,SAAS,GACR,EACP,SAAS,KAAK,GAAG,CAAC,MAAM,GAAG,CAAC,IAAI,KAAC,iBAAiB,KAAG,KAJlC,iBAAiB,QAAQ,SAAS,SAAS,EAAE,CAKjD,CACjB,CAAC,GACU,GACN,EACP,QAAQ,KAAK,KAAK,CAAC,MAAM,GAAG,CAAC,IAAI,KAAC,iBAAiB,KAAG,KAjBnC,iBAAiB,QAAQ,EAAE,CAkB/B,CACjB,CAAC,EACH,CAAC,WAAW,EAAE,EAAE,EAAE,KAAK,CAAC,CACxB,CAAC;IAEF,OAAO,CACN,KAAC,UAAU,IAAC,UAAU,EAAE,EAAE,EAAE,SAAS,EAAC,UAAU,EAAC,KAAK,EAAE,WAAW,YACjE,MAAM,GACK,CACb,CAAC;AACH,CAAC,CAAC"}
|
|
@@ -2,31 +2,127 @@ import { type Topic, type TopicGroup } from '@luxonis/depthai-viewer-common';
|
|
|
2
2
|
import React, { type JSX } from 'react';
|
|
3
3
|
import { type StreamType } from '../constants/streams.js';
|
|
4
4
|
import type { DeviceConfiguration } from '../models/device-configuration.js';
|
|
5
|
-
|
|
5
|
+
/**
|
|
6
|
+
* Click handler invoked from stream panels with optional cursor coordinates inside the rendered frame.
|
|
7
|
+
*/
|
|
8
|
+
export type OnClickHandler = (event: React.MouseEvent, clickOffsetCoords: {
|
|
9
|
+
/**
|
|
10
|
+
* Horizontal click position relative to the rendered stream.
|
|
11
|
+
*/
|
|
6
12
|
offsetX: number;
|
|
13
|
+
/**
|
|
14
|
+
* Vertical click position relative to the rendered stream.
|
|
15
|
+
*/
|
|
7
16
|
offsetY: number;
|
|
8
17
|
} | undefined) => void;
|
|
9
|
-
|
|
18
|
+
/**
|
|
19
|
+
* Props for the DepthAI stream panel collection.
|
|
20
|
+
*/
|
|
21
|
+
export type StreamsProps = {
|
|
22
|
+
/**
|
|
23
|
+
* Target FPS shown by stream panels when performance metrics are enabled.
|
|
24
|
+
*/
|
|
10
25
|
targetFps?: number;
|
|
26
|
+
/**
|
|
27
|
+
* Optional callback used by stream panels to show host application notifications.
|
|
28
|
+
*/
|
|
11
29
|
triggerToast?: () => void;
|
|
30
|
+
/**
|
|
31
|
+
* Device metadata used by host applications to tailor stream controls.
|
|
32
|
+
*/
|
|
12
33
|
deviceOptions?: DeviceConfiguration | null;
|
|
34
|
+
/**
|
|
35
|
+
* Hides per-panel toolbars when the host provides its own controls.
|
|
36
|
+
*/
|
|
13
37
|
hideToolbar?: boolean;
|
|
38
|
+
/**
|
|
39
|
+
* Topics that should be opened automatically once the connection reports available streams.
|
|
40
|
+
*/
|
|
14
41
|
defaultTopics?: string[];
|
|
42
|
+
/**
|
|
43
|
+
* Marks the selected device as disconnected while keeping the connection UI mounted.
|
|
44
|
+
*/
|
|
15
45
|
isDeviceDisconnected?: boolean;
|
|
46
|
+
/**
|
|
47
|
+
* Shows a multi-device empty state when no device is selected.
|
|
48
|
+
*/
|
|
16
49
|
isMultipleNotConnected?: boolean;
|
|
50
|
+
/**
|
|
51
|
+
* Mapping from stream topic names to their visual group labels.
|
|
52
|
+
*/
|
|
17
53
|
topicGroups?: TopicGroup | null;
|
|
54
|
+
/**
|
|
55
|
+
* Tracks whether the point cloud stream was explicitly enabled by the user.
|
|
56
|
+
*/
|
|
18
57
|
isPCExplicitlyClicked?: boolean;
|
|
58
|
+
/**
|
|
59
|
+
* Updates the explicit point cloud selection state.
|
|
60
|
+
*/
|
|
19
61
|
setIsPCExplicitlyClicked?: React.Dispatch<React.SetStateAction<boolean>>;
|
|
62
|
+
/**
|
|
63
|
+
* Additional toolbar actions keyed by stream type.
|
|
64
|
+
*/
|
|
20
65
|
actions?: Record<string, JSX.Element>;
|
|
66
|
+
/**
|
|
67
|
+
* Custom sorting function applied to enabled stream topics before layout.
|
|
68
|
+
*/
|
|
21
69
|
topicSortingFunction?: (a: Topic, b: Topic) => number;
|
|
70
|
+
/**
|
|
71
|
+
* Restricts the visible and toggleable stream topics to this allow-list.
|
|
72
|
+
*/
|
|
22
73
|
allowedTopics?: string[];
|
|
74
|
+
/**
|
|
75
|
+
* Allows the delayed store/documentation call-to-action when no streams are available.
|
|
76
|
+
*/
|
|
23
77
|
shouldDisplayAd?: boolean;
|
|
78
|
+
/**
|
|
79
|
+
* Overrides the column count used by the stream panel layout.
|
|
80
|
+
*/
|
|
24
81
|
numberOfColumns?: number;
|
|
82
|
+
/**
|
|
83
|
+
* Optional overlays rendered above specific stream panels.
|
|
84
|
+
*/
|
|
25
85
|
topicOverlayMap?: Map<StreamType, React.JSX.Element>;
|
|
86
|
+
/**
|
|
87
|
+
* Optional click handlers keyed by topic name.
|
|
88
|
+
*/
|
|
26
89
|
topicOnClickHandlersMap?: Map<string, OnClickHandler>;
|
|
90
|
+
/**
|
|
91
|
+
* Enables Viewer-specific empty states and point cloud behavior.
|
|
92
|
+
*/
|
|
27
93
|
isViewer?: boolean;
|
|
94
|
+
/**
|
|
95
|
+
* Disables zoom interaction in image panels.
|
|
96
|
+
*/
|
|
28
97
|
disableZoom?: boolean;
|
|
98
|
+
/**
|
|
99
|
+
* Keeps the loading state visible until one of the default topic frames arrives.
|
|
100
|
+
*
|
|
101
|
+
* @defaultValue `false`
|
|
102
|
+
*/
|
|
103
|
+
waitForDefaultTopicFrame?: boolean;
|
|
104
|
+
/**
|
|
105
|
+
* Maximum time to wait for the first default topic frame before leaving the loading state.
|
|
106
|
+
*
|
|
107
|
+
* @defaultValue `15000`
|
|
108
|
+
*/
|
|
109
|
+
defaultTopicFrameWaitTimeoutMs?: number;
|
|
110
|
+
/**
|
|
111
|
+
* Custom loading or empty-stream element rendered instead of the default loading state.
|
|
112
|
+
*
|
|
113
|
+
* @remarks
|
|
114
|
+
* This is most useful together with `defaultTopics`; otherwise a host application can render
|
|
115
|
+
* a persistent loading element while no topic is selected.
|
|
116
|
+
*/
|
|
29
117
|
customLoadingElement?: React.JSX.Element;
|
|
30
|
-
}
|
|
31
|
-
|
|
118
|
+
};
|
|
119
|
+
/**
|
|
120
|
+
* Renders available DepthAI image, depth, point cloud, and RGBD streams with selection controls.
|
|
121
|
+
*
|
|
122
|
+
* @example
|
|
123
|
+
* ```tsx
|
|
124
|
+
* <Streams targetFps={30} hideToolbar />
|
|
125
|
+
* ```
|
|
126
|
+
*/
|
|
127
|
+
export declare const Streams: React.FC<StreamsProps>;
|
|
32
128
|
//# sourceMappingURL=Streams.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Streams.d.ts","sourceRoot":"","sources":["../../src/components/Streams.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAmB,KAAK,KAAK,EAAE,KAAK,UAAU,EAAE,MAAM,gCAAgC,CAAC;AAkB9F,OAAO,KAAK,EAAE,EAAE,KAAK,GAAG,EAAkB,MAAM,OAAO,CAAC;AAIxD,OAAO,EAAkB,KAAK,UAAU,EAAe,MAAM,yBAAyB,CAAC;AAGvF,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,mCAAmC,CAAC;
|
|
1
|
+
{"version":3,"file":"Streams.d.ts","sourceRoot":"","sources":["../../src/components/Streams.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAmB,KA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