@luxonis/depthai-pipeline-lib 3.4.0-rc.2 → 3.5.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/index.css +1696 -2
- package/dist/src/components/BridgeEdge.js +3 -13
- package/dist/src/components/Node.js +18 -65
- package/dist/src/components/PipelineCanvas.js +1 -2
- package/dist/src/components/PipelineLegend.d.ts +1 -1
- package/dist/src/components/PipelineLegend.js +10 -24
- package/dist/src/version.d.ts +1 -1
- package/dist/src/version.js +1 -1
- package/package.json +3 -5
- package/dist/panda.css +0 -1342
- package/dist/src/styled-system/css/conditions.mjs +0 -36
- package/dist/src/styled-system/css/css.d.mts +0 -22
- package/dist/src/styled-system/css/css.mjs +0 -45
- package/dist/src/styled-system/css/cva.d.mts +0 -6
- package/dist/src/styled-system/css/cva.mjs +0 -87
- package/dist/src/styled-system/css/cx.d.mts +0 -5
- package/dist/src/styled-system/css/cx.mjs +0 -15
- package/dist/src/styled-system/css/index.d.mts +0 -5
- package/dist/src/styled-system/css/index.mjs +0 -4
- package/dist/src/styled-system/css/sva.d.mts +0 -4
- package/dist/src/styled-system/css/sva.mjs +0 -41
- package/dist/src/styled-system/helpers.mjs +0 -327
- package/dist/src/styled-system/patterns/aspect-ratio.d.mts +0 -21
- package/dist/src/styled-system/patterns/aspect-ratio.mjs +0 -38
- package/dist/src/styled-system/patterns/bleed.d.mts +0 -22
- package/dist/src/styled-system/patterns/bleed.mjs +0 -24
- package/dist/src/styled-system/patterns/box.d.mts +0 -21
- package/dist/src/styled-system/patterns/box.mjs +0 -15
- package/dist/src/styled-system/patterns/center.d.mts +0 -21
- package/dist/src/styled-system/patterns/center.mjs +0 -21
- package/dist/src/styled-system/patterns/circle.d.mts +0 -21
- package/dist/src/styled-system/patterns/circle.mjs +0 -25
- package/dist/src/styled-system/patterns/container.d.mts +0 -21
- package/dist/src/styled-system/patterns/container.mjs +0 -21
- package/dist/src/styled-system/patterns/cq.d.mts +0 -22
- package/dist/src/styled-system/patterns/cq.mjs +0 -21
- package/dist/src/styled-system/patterns/divider.d.mts +0 -23
- package/dist/src/styled-system/patterns/divider.mjs +0 -25
- package/dist/src/styled-system/patterns/flex.d.mts +0 -27
- package/dist/src/styled-system/patterns/flex.mjs +0 -26
- package/dist/src/styled-system/patterns/float.d.mts +0 -24
- package/dist/src/styled-system/patterns/float.mjs +0 -52
- package/dist/src/styled-system/patterns/grid-item.d.mts +0 -26
- package/dist/src/styled-system/patterns/grid-item.mjs +0 -25
- package/dist/src/styled-system/patterns/grid.d.mts +0 -25
- package/dist/src/styled-system/patterns/grid.mjs +0 -27
- package/dist/src/styled-system/patterns/hstack.d.mts +0 -22
- package/dist/src/styled-system/patterns/hstack.mjs +0 -24
- package/dist/src/styled-system/patterns/index.d.mts +0 -21
- package/dist/src/styled-system/patterns/index.mjs +0 -20
- package/dist/src/styled-system/patterns/link-overlay.d.mts +0 -21
- package/dist/src/styled-system/patterns/link-overlay.mjs +0 -24
- package/dist/src/styled-system/patterns/spacer.d.mts +0 -21
- package/dist/src/styled-system/patterns/spacer.mjs +0 -21
- package/dist/src/styled-system/patterns/square.d.mts +0 -21
- package/dist/src/styled-system/patterns/square.mjs +0 -24
- package/dist/src/styled-system/patterns/stack.d.mts +0 -24
- package/dist/src/styled-system/patterns/stack.mjs +0 -24
- package/dist/src/styled-system/patterns/visually-hidden.d.mts +0 -21
- package/dist/src/styled-system/patterns/visually-hidden.mjs +0 -18
- package/dist/src/styled-system/patterns/vstack.d.mts +0 -22
- package/dist/src/styled-system/patterns/vstack.mjs +0 -24
- package/dist/src/styled-system/patterns/wrap.d.mts +0 -25
- package/dist/src/styled-system/patterns/wrap.mjs +0 -25
- package/dist/src/styled-system/recipes/accordion.d.mts +0 -32
- package/dist/src/styled-system/recipes/accordion.mjs +0 -48
- package/dist/src/styled-system/recipes/alert-description.d.mts +0 -32
- package/dist/src/styled-system/recipes/alert-description.mjs +0 -24
- package/dist/src/styled-system/recipes/alert-dialog.d.mts +0 -32
- package/dist/src/styled-system/recipes/alert-dialog.mjs +0 -72
- package/dist/src/styled-system/recipes/alert-title.d.mts +0 -32
- package/dist/src/styled-system/recipes/alert-title.mjs +0 -24
- package/dist/src/styled-system/recipes/alert.d.mts +0 -35
- package/dist/src/styled-system/recipes/alert.mjs +0 -31
- package/dist/src/styled-system/recipes/avatar.d.mts +0 -32
- package/dist/src/styled-system/recipes/avatar.mjs +0 -40
- package/dist/src/styled-system/recipes/badge.d.mts +0 -35
- package/dist/src/styled-system/recipes/badge.mjs +0 -33
- package/dist/src/styled-system/recipes/blockquote.d.mts +0 -32
- package/dist/src/styled-system/recipes/blockquote.mjs +0 -24
- package/dist/src/styled-system/recipes/button.d.mts +0 -39
- package/dist/src/styled-system/recipes/button.mjs +0 -42
- package/dist/src/styled-system/recipes/calendar.d.mts +0 -32
- package/dist/src/styled-system/recipes/calendar.mjs +0 -120
- package/dist/src/styled-system/recipes/card-content.d.mts +0 -32
- package/dist/src/styled-system/recipes/card-content.mjs +0 -24
- package/dist/src/styled-system/recipes/card-description.d.mts +0 -32
- package/dist/src/styled-system/recipes/card-description.mjs +0 -24
- package/dist/src/styled-system/recipes/card-footer.d.mts +0 -32
- package/dist/src/styled-system/recipes/card-footer.mjs +0 -24
- package/dist/src/styled-system/recipes/card-header.d.mts +0 -32
- package/dist/src/styled-system/recipes/card-header.mjs +0 -24
- package/dist/src/styled-system/recipes/card-title.d.mts +0 -32
- package/dist/src/styled-system/recipes/card-title.mjs +0 -24
- package/dist/src/styled-system/recipes/card.d.mts +0 -32
- package/dist/src/styled-system/recipes/card.mjs +0 -24
- package/dist/src/styled-system/recipes/checkbox.d.mts +0 -32
- package/dist/src/styled-system/recipes/checkbox.mjs +0 -36
- package/dist/src/styled-system/recipes/collapsible.d.mts +0 -32
- package/dist/src/styled-system/recipes/collapsible.mjs +0 -40
- package/dist/src/styled-system/recipes/command-dialog.d.mts +0 -32
- package/dist/src/styled-system/recipes/command-dialog.mjs +0 -36
- package/dist/src/styled-system/recipes/command.d.mts +0 -32
- package/dist/src/styled-system/recipes/command.mjs +0 -68
- package/dist/src/styled-system/recipes/context-menu.d.mts +0 -35
- package/dist/src/styled-system/recipes/context-menu.mjs +0 -100
- package/dist/src/styled-system/recipes/create-recipe.mjs +0 -82
- package/dist/src/styled-system/recipes/dialog.d.mts +0 -32
- package/dist/src/styled-system/recipes/dialog.mjs +0 -68
- package/dist/src/styled-system/recipes/dropdown-menu.d.mts +0 -32
- package/dist/src/styled-system/recipes/dropdown-menu.mjs +0 -92
- package/dist/src/styled-system/recipes/form-control.d.mts +0 -32
- package/dist/src/styled-system/recipes/form-control.mjs +0 -24
- package/dist/src/styled-system/recipes/form-description.d.mts +0 -32
- package/dist/src/styled-system/recipes/form-description.mjs +0 -24
- package/dist/src/styled-system/recipes/form-item.d.mts +0 -32
- package/dist/src/styled-system/recipes/form-item.mjs +0 -24
- package/dist/src/styled-system/recipes/form-label.d.mts +0 -32
- package/dist/src/styled-system/recipes/form-label.mjs +0 -24
- package/dist/src/styled-system/recipes/form-message.d.mts +0 -32
- package/dist/src/styled-system/recipes/form-message.mjs +0 -24
- package/dist/src/styled-system/recipes/h1.d.mts +0 -32
- package/dist/src/styled-system/recipes/h1.mjs +0 -24
- package/dist/src/styled-system/recipes/h2.d.mts +0 -32
- package/dist/src/styled-system/recipes/h2.mjs +0 -24
- package/dist/src/styled-system/recipes/h3.d.mts +0 -32
- package/dist/src/styled-system/recipes/h3.mjs +0 -24
- package/dist/src/styled-system/recipes/h4.d.mts +0 -32
- package/dist/src/styled-system/recipes/h4.mjs +0 -24
- package/dist/src/styled-system/recipes/hover-card.d.mts +0 -32
- package/dist/src/styled-system/recipes/hover-card.mjs +0 -40
- package/dist/src/styled-system/recipes/icon.d.mts +0 -51
- package/dist/src/styled-system/recipes/icon.mjs +0 -54
- package/dist/src/styled-system/recipes/index.d.mts +0 -74
- package/dist/src/styled-system/recipes/index.mjs +0 -73
- package/dist/src/styled-system/recipes/inline-code.d.mts +0 -32
- package/dist/src/styled-system/recipes/inline-code.mjs +0 -24
- package/dist/src/styled-system/recipes/input.d.mts +0 -32
- package/dist/src/styled-system/recipes/input.mjs +0 -24
- package/dist/src/styled-system/recipes/label.d.mts +0 -32
- package/dist/src/styled-system/recipes/label.mjs +0 -24
- package/dist/src/styled-system/recipes/large.d.mts +0 -32
- package/dist/src/styled-system/recipes/large.mjs +0 -24
- package/dist/src/styled-system/recipes/lead.d.mts +0 -32
- package/dist/src/styled-system/recipes/lead.mjs +0 -24
- package/dist/src/styled-system/recipes/link.d.mts +0 -32
- package/dist/src/styled-system/recipes/link.mjs +0 -24
- package/dist/src/styled-system/recipes/list.d.mts +0 -32
- package/dist/src/styled-system/recipes/list.mjs +0 -24
- package/dist/src/styled-system/recipes/menubar.d.mts +0 -32
- package/dist/src/styled-system/recipes/menubar.mjs +0 -96
- package/dist/src/styled-system/recipes/muted.d.mts +0 -32
- package/dist/src/styled-system/recipes/muted.mjs +0 -24
- package/dist/src/styled-system/recipes/navigation-menu.d.mts +0 -32
- package/dist/src/styled-system/recipes/navigation-menu.mjs +0 -64
- package/dist/src/styled-system/recipes/p.d.mts +0 -32
- package/dist/src/styled-system/recipes/p.mjs +0 -24
- package/dist/src/styled-system/recipes/popover.d.mts +0 -32
- package/dist/src/styled-system/recipes/popover.mjs +0 -44
- package/dist/src/styled-system/recipes/progress.d.mts +0 -32
- package/dist/src/styled-system/recipes/progress.mjs +0 -36
- package/dist/src/styled-system/recipes/radio-group.d.mts +0 -32
- package/dist/src/styled-system/recipes/radio-group.mjs +0 -44
- package/dist/src/styled-system/recipes/scroll-area.d.mts +0 -32
- package/dist/src/styled-system/recipes/scroll-area.mjs +0 -48
- package/dist/src/styled-system/recipes/select.d.mts +0 -32
- package/dist/src/styled-system/recipes/select.mjs +0 -68
- package/dist/src/styled-system/recipes/separator.d.mts +0 -35
- package/dist/src/styled-system/recipes/separator.mjs +0 -31
- package/dist/src/styled-system/recipes/sheet.d.mts +0 -35
- package/dist/src/styled-system/recipes/sheet.mjs +0 -83
- package/dist/src/styled-system/recipes/skeleton.d.mts +0 -32
- package/dist/src/styled-system/recipes/skeleton.mjs +0 -24
- package/dist/src/styled-system/recipes/slider.d.mts +0 -32
- package/dist/src/styled-system/recipes/slider.mjs +0 -44
- package/dist/src/styled-system/recipes/small.d.mts +0 -32
- package/dist/src/styled-system/recipes/small.mjs +0 -24
- package/dist/src/styled-system/recipes/switch-recipe.d.mts +0 -32
- package/dist/src/styled-system/recipes/switch-recipe.mjs +0 -36
- package/dist/src/styled-system/recipes/table-body.d.mts +0 -32
- package/dist/src/styled-system/recipes/table-body.mjs +0 -24
- package/dist/src/styled-system/recipes/table-caption.d.mts +0 -32
- package/dist/src/styled-system/recipes/table-caption.mjs +0 -24
- package/dist/src/styled-system/recipes/table-cell.d.mts +0 -32
- package/dist/src/styled-system/recipes/table-cell.mjs +0 -24
- package/dist/src/styled-system/recipes/table-container.d.mts +0 -32
- package/dist/src/styled-system/recipes/table-container.mjs +0 -24
- package/dist/src/styled-system/recipes/table-footer.d.mts +0 -32
- package/dist/src/styled-system/recipes/table-footer.mjs +0 -24
- package/dist/src/styled-system/recipes/table-head.d.mts +0 -32
- package/dist/src/styled-system/recipes/table-head.mjs +0 -24
- package/dist/src/styled-system/recipes/table-header.d.mts +0 -32
- package/dist/src/styled-system/recipes/table-header.mjs +0 -24
- package/dist/src/styled-system/recipes/table-row.d.mts +0 -32
- package/dist/src/styled-system/recipes/table-row.mjs +0 -24
- package/dist/src/styled-system/recipes/table.d.mts +0 -32
- package/dist/src/styled-system/recipes/table.mjs +0 -24
- package/dist/src/styled-system/recipes/tabs.d.mts +0 -32
- package/dist/src/styled-system/recipes/tabs.mjs +0 -44
- package/dist/src/styled-system/recipes/textarea.d.mts +0 -32
- package/dist/src/styled-system/recipes/textarea.mjs +0 -24
- package/dist/src/styled-system/recipes/toast-viewport.d.mts +0 -32
- package/dist/src/styled-system/recipes/toast-viewport.mjs +0 -24
- package/dist/src/styled-system/recipes/toast.d.mts +0 -35
- package/dist/src/styled-system/recipes/toast.mjs +0 -61
- package/dist/src/styled-system/recipes/toggle.d.mts +0 -39
- package/dist/src/styled-system/recipes/toggle.mjs +0 -37
- package/dist/src/styled-system/recipes/tooltip.d.mts +0 -32
- package/dist/src/styled-system/recipes/tooltip.mjs +0 -40
- package/dist/src/styled-system/recipes/typography-table-container.d.mts +0 -32
- package/dist/src/styled-system/recipes/typography-table-container.mjs +0 -24
- package/dist/src/styled-system/recipes/typography-table.d.mts +0 -32
- package/dist/src/styled-system/recipes/typography-table.mjs +0 -24
- package/dist/src/styled-system/tokens/index.d.mts +0 -9
- package/dist/src/styled-system/tokens/index.mjs +0 -2732
- package/dist/src/styled-system/tokens/tokens.d.mts +0 -63
- package/dist/src/styled-system/types/composition.d.mts +0 -164
- package/dist/src/styled-system/types/conditions.d.mts +0 -322
- package/dist/src/styled-system/types/csstype.d.mts +0 -21298
- package/dist/src/styled-system/types/global.d.mts +0 -20
- package/dist/src/styled-system/types/index.d.mts +0 -7
- package/dist/src/styled-system/types/parts.d.mts +0 -8
- package/dist/src/styled-system/types/pattern.d.mts +0 -78
- package/dist/src/styled-system/types/prop-type.d.mts +0 -264
- package/dist/src/styled-system/types/recipe.d.mts +0 -181
- package/dist/src/styled-system/types/selectors.d.mts +0 -59
- package/dist/src/styled-system/types/static-css.d.mts +0 -56
- package/dist/src/styled-system/types/style-props.d.mts +0 -7549
- package/dist/src/styled-system/types/system-types.d.mts +0 -193
|
@@ -1,16 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
2
|
+
import { ChevronRightIcon, Icon } from '@luxonis/ui-components';
|
|
3
3
|
import { BaseEdge, EdgeLabelRenderer, getSmoothStepPath } from '@xyflow/react';
|
|
4
4
|
import React from 'react';
|
|
5
|
-
import { css } from '../styled-system/css/css.mjs';
|
|
6
|
-
const bridgeArrowClassName = css({
|
|
7
|
-
width: '16px',
|
|
8
|
-
height: '16px',
|
|
9
|
-
display: 'flex',
|
|
10
|
-
alignItems: 'center',
|
|
11
|
-
justifyContent: 'center',
|
|
12
|
-
pointerEvents: 'none',
|
|
13
|
-
});
|
|
14
5
|
export const BridgeEdge = ({ id, sourceX, sourceY, targetX, targetY, sourcePosition, targetPosition, style, markerStart, markerEnd, interactionWidth, pathOptions, }) => {
|
|
15
6
|
const pathRef = React.useRef(null);
|
|
16
7
|
const [path, labelX, labelY] = getSmoothStepPath({
|
|
@@ -50,8 +41,7 @@ export const BridgeEdge = ({ id, sourceX, sourceY, targetX, targetY, sourcePosit
|
|
|
50
41
|
return didChange ? nextArrowState : currentArrowState;
|
|
51
42
|
});
|
|
52
43
|
});
|
|
53
|
-
return (_jsxs(_Fragment, { children: [_jsx("path", { ref: pathRef, d: path, fill: "none", stroke: "transparent" }), _jsx(BaseEdge, { id: id, path: path, style: style, markerStart: markerStart, markerEnd: markerEnd, interactionWidth: interactionWidth }), _jsx(EdgeLabelRenderer, { children: _jsx("div", { className:
|
|
54
|
-
position: 'absolute',
|
|
44
|
+
return (_jsxs(_Fragment, { children: [_jsx("path", { ref: pathRef, d: path, fill: "none", stroke: "transparent" }), _jsx(BaseEdge, { id: id, path: path, style: style, markerStart: markerStart, markerEnd: markerEnd, interactionWidth: interactionWidth }), _jsx(EdgeLabelRenderer, { children: _jsx("div", { className: "pointer-events-none absolute flex h-4 w-4 items-center justify-center", style: {
|
|
55
45
|
transform: `translate(-50%, -50%) translate(${arrowState.x}px, ${arrowState.y}px) rotate(${arrowState.angle}deg)`,
|
|
56
|
-
}, children: _jsx(Icon, { icon:
|
|
46
|
+
}, children: _jsx(Icon, { icon: ChevronRightIcon, size: "sm", color: "gray", pointerEvents: "none" }) }) })] }));
|
|
57
47
|
};
|
|
@@ -1,51 +1,32 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { Badge, Button, HelpIcon, Label, SubLabel } from '@luxonis/
|
|
3
|
-
import { clsx } from '@luxonis/common-fe-components/helpers';
|
|
4
|
-
import { Flex } from '@luxonis/ui-components';
|
|
2
|
+
import { Badge, Button, Flex, HelpIcon, Label, SubLabel } from '@luxonis/ui-components';
|
|
5
3
|
import { Handle, Position } from '@xyflow/react';
|
|
6
4
|
import { formatTiming } from '../services/pipeline-state.js';
|
|
7
|
-
import { DOCS_BASE_URL,
|
|
8
|
-
|
|
5
|
+
import { DOCS_BASE_URL, NodesWithLinks } from '../services/utils.js';
|
|
6
|
+
const handleColorClassName = (dotColor) => {
|
|
7
|
+
switch (dotColor) {
|
|
8
|
+
case 'green':
|
|
9
|
+
return '!bg-[var(--lux-success)]';
|
|
10
|
+
case 'red':
|
|
11
|
+
return '!bg-[var(--lux-error)]';
|
|
12
|
+
case 'yellow':
|
|
13
|
+
return '!bg-[var(--lux-warning)]';
|
|
14
|
+
default:
|
|
15
|
+
return '!bg-[var(--lux-gray)]';
|
|
16
|
+
}
|
|
17
|
+
};
|
|
9
18
|
const NodeHandles = (props) => {
|
|
10
19
|
const { handles, type } = props;
|
|
11
20
|
return (_jsx(Flex, { full: true, direction: "column", align: type === 'input' ? 'start' : 'end', className: 'min-w-[120px]', children: handles.map(({ type: handleType, id, blocking, queueSize, name, maxQueueSize, fps, connected, dotColor, }) => {
|
|
12
21
|
if (!connected) {
|
|
13
22
|
return null;
|
|
14
23
|
}
|
|
15
|
-
return (_jsxs(Flex, { position: "relative", align: "end", direction: handleType === 'input' ? 'row' : 'row-reverse', children: [_jsx(Handle, { type: handleType === 'input' ? 'target' : 'source', position: handleType === 'input' ? Position.Left : Position.Right, id: name, isConnectable: false, className:
|
|
16
|
-
width: 'custom.handle.dot!',
|
|
17
|
-
height: 'custom.handle.dot!',
|
|
18
|
-
backgroundColor: dotColor === 'gray'
|
|
19
|
-
? 'dark.gray!'
|
|
20
|
-
: dotColor === 'green'
|
|
21
|
-
? 'dark.success!'
|
|
22
|
-
: dotColor === 'red'
|
|
23
|
-
? 'dark.error!'
|
|
24
|
-
: dotColor === 'yellow'
|
|
25
|
-
? 'dark.warning!'
|
|
26
|
-
: 'dark.success!',
|
|
27
|
-
border: 'none!',
|
|
28
|
-
borderRadius: blocking ? '0% !important' : '100% !important',
|
|
29
|
-
}), style: {
|
|
30
|
-
background: dotColor === 'gray'
|
|
31
|
-
? 'dark.gray!'
|
|
32
|
-
: dotColor === 'green'
|
|
33
|
-
? 'dark.success!'
|
|
34
|
-
: dotColor === 'red'
|
|
35
|
-
? 'dark.error!'
|
|
36
|
-
: dotColor === 'yellow'
|
|
37
|
-
? 'dark.warning!'
|
|
38
|
-
: 'dark.gray!',
|
|
39
|
-
} }), _jsx(NodeHandlesSubLabel, { type: type, name: name, queueSize: queueSize, maxQueueSize: maxQueueSize, fps: fps })] }, id));
|
|
24
|
+
return (_jsxs(Flex, { position: "relative", align: "end", direction: handleType === 'input' ? 'row' : 'row-reverse', children: [_jsx(Handle, { type: handleType === 'input' ? 'target' : 'source', position: handleType === 'input' ? Position.Left : Position.Right, id: name, isConnectable: false, className: `!h-2 !w-2 !border-0 ${blocking ? '!rounded-none' : '!rounded-full'} ${handleColorClassName(dotColor)}` }), _jsx(NodeHandlesSubLabel, { type: type, name: name, queueSize: queueSize, maxQueueSize: maxQueueSize, fps: fps })] }, id));
|
|
40
25
|
}) }));
|
|
41
26
|
};
|
|
42
27
|
const NodeHandlesSubLabel = (props) => {
|
|
43
28
|
const { type, name, queueSize, maxQueueSize, fps } = props;
|
|
44
|
-
return (_jsx(SubLabel, { className:
|
|
45
|
-
...(type === 'input' //
|
|
46
|
-
? { marginLeft: 'xs' }
|
|
47
|
-
: { marginRight: 'xs' }),
|
|
48
|
-
}), text: type === 'input'
|
|
29
|
+
return (_jsx(SubLabel, { className: type === 'input' ? 'ml-2' : 'mr-2', text: type === 'input'
|
|
49
30
|
? `[${fps ? `${fps.toFixed(1)} | ` : ''}${`${maxQueueSize ?? 0}/${queueSize}`}] ${name}`
|
|
50
31
|
: `${fps ? `[${fps.toFixed(1)}]` : ''} ${name}`, break: "none" }));
|
|
51
32
|
};
|
|
@@ -58,37 +39,9 @@ export const PipelineNode = (props) => {
|
|
|
58
39
|
const link = NodesWithLinks.hasOwnProperty(node.name)
|
|
59
40
|
? `${DOCS_BASE_URL}/${NodesWithLinks[node.name]}`
|
|
60
41
|
: DOCS_BASE_URL;
|
|
61
|
-
return (_jsxs(Flex, { direction: "column", className: "min-w-[120px] border border-border rounded-sm bg-background hover:[&_.node-help-icon]:text-foreground", children: [_jsxs(Flex, { align: "center", justify: "between", gap: "xs", className: "w-full bg-muted rounded-t-sm", children: [_jsx("span", { className:
|
|
62
|
-
width: '20px',
|
|
63
|
-
height: '20px',
|
|
64
|
-
display: 'flex',
|
|
65
|
-
alignItems: 'center',
|
|
66
|
-
}), children: (node.nodeType === 'device' || node.nodeType === 'host') && (_jsx(Badge, { label: node.nodeType === 'device' ? 'D' : 'H', variant: node.nodeType === 'device' ? 'active' : 'cyan', style: {
|
|
67
|
-
padding: '0px',
|
|
68
|
-
display: 'flex',
|
|
69
|
-
justifyContent: 'center',
|
|
70
|
-
alignItems: 'center',
|
|
71
|
-
width: '20px',
|
|
72
|
-
height: '20px',
|
|
73
|
-
}, tooltip: node.nodeType === 'device' ? 'Device Node' : 'Host Node', cursor: "help" })) }), _jsx(Label, { text: node.id
|
|
42
|
+
return (_jsxs(Flex, { direction: "column", className: "min-w-[120px] border border-border rounded-sm bg-background hover:[&_.node-help-icon]:text-foreground", children: [_jsxs(Flex, { align: "center", justify: "between", gap: "xs", className: "w-full bg-muted rounded-t-sm", children: [_jsx("span", { className: "flex h-5 w-5 items-center", children: (node.nodeType === 'device' || node.nodeType === 'host') && (_jsx(Badge, { label: node.nodeType === 'device' ? 'D' : 'H', variant: node.nodeType === 'device' ? 'light' : 'filled', intent: "active", className: "flex h-5 w-5 cursor-help items-center justify-center p-0", tooltip: node.nodeType === 'device' ? 'Device Node' : 'Host Node' })) }), _jsx(Label, { text: node.id
|
|
74
43
|
? `${node.name} (${node.id}) ${node.extras?.stateInfo ? `(${node.extras.stateInfo.letter})` : ''}`
|
|
75
44
|
: node.extras?.stateInfo
|
|
76
45
|
? `${node.name} (${node.extras.stateInfo.letter})`
|
|
77
|
-
: node.name, color: "unset" }), _jsx(Button, { variant: "ghost",
|
|
78
|
-
width: 'auto',
|
|
79
|
-
height: 'auto',
|
|
80
|
-
right: 'xs',
|
|
81
|
-
})) })] }), _jsx(Handle, { type: "target", position: Position.Top, id: "top", isConnectable: false, className: css({
|
|
82
|
-
width: 'custom.handle.dot!',
|
|
83
|
-
height: 'custom.handle.dot!',
|
|
84
|
-
}), style: {
|
|
85
|
-
border: 'none',
|
|
86
|
-
background: 'transparent',
|
|
87
|
-
} }), _jsxs(Flex, { gap: "sm", className: `min-w-[${MIN_NODE_WIDTH}px] py-2`, children: [_jsx(NodeHandles, { type: "input", handles: node.handles.input }), node.extras?.gpstTimings && _jsx(GPSTTimings, { ...node.extras.gpstTimings }), _jsx(NodeHandles, { type: "output", handles: node.handles.output })] }), _jsx(Handle, { type: "source", position: Position.Bottom, id: "bottom", isConnectable: false, className: css({
|
|
88
|
-
width: 'custom.handle.dot!',
|
|
89
|
-
height: 'custom.handle.dot!',
|
|
90
|
-
}), style: {
|
|
91
|
-
border: 'none',
|
|
92
|
-
background: 'transparent',
|
|
93
|
-
} })] }));
|
|
46
|
+
: node.name, color: "unset" }), _jsx(Button, { variant: "ghost", intent: "white", icon: HelpIcon, onClick: () => window.open(link, '_blank'), className: "node-help-icon ml-auto h-auto w-auto" })] }), _jsx(Handle, { type: "target", position: Position.Top, id: "top", isConnectable: false, className: "!h-2 !w-2 !rounded-full !border-0 !bg-transparent" }), _jsxs(Flex, { gap: "sm", className: "min-w-[376px] py-2", children: [_jsx(NodeHandles, { type: "input", handles: node.handles.input }), node.extras?.gpstTimings && _jsx(GPSTTimings, { ...node.extras.gpstTimings }), _jsx(NodeHandles, { type: "output", handles: node.handles.output })] }), _jsx(Handle, { type: "source", position: Position.Bottom, id: "bottom", isConnectable: false, className: "!h-2 !w-2 !rounded-full !border-0 !bg-transparent" })] }));
|
|
94
47
|
};
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { Button, Header } from '@luxonis/
|
|
3
|
-
import { Flex } from '@luxonis/ui-components';
|
|
2
|
+
import { Button, Flex, Header } from '@luxonis/ui-components';
|
|
4
3
|
import { BezierEdge, Panel, ReactFlow, ReactFlowProvider, useEdgesState, useNodesState, useReactFlow, useStore, } from '@xyflow/react';
|
|
5
4
|
import React from 'react';
|
|
6
5
|
import { adjustNodes, getLayoutedElements, updateNodesOnPipelineStateChange, } from '../services/utils.js';
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { Badge, Label, SubLabel } from '@luxonis/
|
|
3
|
-
import { Flex } from '@luxonis/ui-components';
|
|
4
|
-
import React from 'react';
|
|
2
|
+
import { Badge, Flex, Label, SubLabel } from '@luxonis/ui-components';
|
|
5
3
|
import { PACKAGE_VERSION } from '../version.js';
|
|
6
4
|
const debugSections = [
|
|
7
5
|
{
|
|
@@ -11,12 +9,12 @@ const debugSections = [
|
|
|
11
9
|
0: {
|
|
12
10
|
id: 'device-node',
|
|
13
11
|
label: 'Device Node',
|
|
14
|
-
marker:
|
|
12
|
+
marker: _jsx(Badge, { label: "D", variant: "light", intent: "active", className: "px-[5px] py-0" }),
|
|
15
13
|
},
|
|
16
14
|
1: {
|
|
17
15
|
id: 'host-node',
|
|
18
16
|
label: 'Host Node',
|
|
19
|
-
marker:
|
|
17
|
+
marker: _jsx(Badge, { label: "H", variant: "filled", intent: "active", className: "px-[5px] py-0" }),
|
|
20
18
|
},
|
|
21
19
|
},
|
|
22
20
|
],
|
|
@@ -170,32 +168,20 @@ const bridgeSection = {
|
|
|
170
168
|
},
|
|
171
169
|
],
|
|
172
170
|
};
|
|
173
|
-
// NOTE: Colors from hub repo
|
|
174
|
-
// success: '#12B76A',
|
|
175
|
-
// warning: '#DC6803',
|
|
176
|
-
// error: '#F04438',
|
|
177
|
-
// gray: '#667085',
|
|
178
171
|
function LegendDot({ tone, square = false }) {
|
|
179
|
-
const
|
|
172
|
+
const className = (() => {
|
|
180
173
|
switch (tone) {
|
|
181
174
|
case 'gray':
|
|
182
|
-
return '#667085';
|
|
175
|
+
return 'bg-[#667085]';
|
|
183
176
|
case 'green':
|
|
184
|
-
return '#12B76A';
|
|
177
|
+
return 'bg-[#12B76A]';
|
|
185
178
|
case 'yellow':
|
|
186
|
-
return '#DC6803';
|
|
179
|
+
return 'bg-[#DC6803]';
|
|
187
180
|
case 'red':
|
|
188
|
-
return '#F04438';
|
|
181
|
+
return 'bg-[#F04438]';
|
|
189
182
|
}
|
|
190
|
-
}
|
|
191
|
-
return (_jsx("div", {
|
|
192
|
-
width: '8px',
|
|
193
|
-
height: '8px',
|
|
194
|
-
backgroundColor: color,
|
|
195
|
-
border: 'none',
|
|
196
|
-
borderRadius: square ? undefined : '100%',
|
|
197
|
-
flexShrink: 0,
|
|
198
|
-
} }));
|
|
183
|
+
})();
|
|
184
|
+
return (_jsx("div", { className: `h-2 w-2 shrink-0 border-0 ${square ? 'rounded-none' : 'rounded-full'} ${className}` }));
|
|
199
185
|
}
|
|
200
186
|
function LegendCell({ left, right }) {
|
|
201
187
|
return (_jsxs(Flex, { gap: "xs", align: "center", className: "w-full", children: [_jsxs(Flex, { align: "center", gap: "xs", className: "w-full", children: [left.marker, _jsx(SubLabel, { text: `${left.label}` })] }), right ? (_jsxs(Flex, { align: "center", gap: "xs", className: "w-full", children: [right.marker, _jsx(SubLabel, { text: `${right.label}` })] })) : null] }));
|
package/dist/src/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const PACKAGE_VERSION = "3.
|
|
1
|
+
export declare const PACKAGE_VERSION = "3.5.0";
|
package/dist/src/version.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// Do not edit it manually.
|
|
2
|
-
export const PACKAGE_VERSION = '3.
|
|
2
|
+
export const PACKAGE_VERSION = '3.5.0';
|
package/package.json
CHANGED
|
@@ -1,22 +1,21 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@luxonis/depthai-pipeline-lib",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.5.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
6
|
"main": "./dist/src/index.js",
|
|
7
7
|
"types": "./dist/src/index.d.ts",
|
|
8
8
|
"scripts": {
|
|
9
|
+
"tailwind": "tailwindcss -i ./src/index.css -o ./dist/index.css",
|
|
9
10
|
"build": "./build.sh",
|
|
10
11
|
"build:win": "powershell -NoProfile -ExecutionPolicy Bypass -File ./build.win.ps1",
|
|
11
12
|
"lint": "biome check .",
|
|
12
13
|
"lint:fix": "biome check . --write",
|
|
13
|
-
"gen:styles": "panda codegen",
|
|
14
14
|
"prepublishOnly": "npm run build"
|
|
15
15
|
},
|
|
16
16
|
"dependencies": {
|
|
17
17
|
"@dagrejs/dagre": "^1.1.3",
|
|
18
|
-
"@luxonis/
|
|
19
|
-
"@luxonis/ui-components": "1.0.3",
|
|
18
|
+
"@luxonis/ui-components": "^1.3.0",
|
|
20
19
|
"@xyflow/react": "^12.0.4",
|
|
21
20
|
"postcss-import": "^16.1.0",
|
|
22
21
|
"postcss-nested": "^6.2.0",
|
|
@@ -29,7 +28,6 @@
|
|
|
29
28
|
},
|
|
30
29
|
"devDependencies": {
|
|
31
30
|
"@biomejs/biome": "^2.4.15",
|
|
32
|
-
"@pandacss/dev": "^0.53.0",
|
|
33
31
|
"@types/react": "^18.3.1 || ^19.0.0",
|
|
34
32
|
"@types/react-dom": "^18.3.1 || ^19.0.0",
|
|
35
33
|
"postcss": "^8.4.31",
|