@luxonis/depthai-pipeline-lib 1.17.1 → 3.0.1-rc.1
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/panda.css +2 -8
- package/dist/src/components/BridgeEdge.d.ts +1 -4
- package/dist/src/components/BridgeEdge.js +2 -3
- package/dist/src/components/GroupNode.js +0 -1
- package/dist/src/components/Node.d.ts +2 -2
- package/dist/src/components/Node.js +4 -4
- package/dist/src/components/PipelineCanvas.js +3 -19
- package/dist/src/components/PipelineLegend.js +5 -5
- package/dist/src/services/pipeline-handles.d.ts +5 -3
- package/dist/src/services/pipeline-state.d.ts +1 -1
- package/dist/src/services/pipeline-state.js +2 -4
- package/dist/src/services/pipeline.d.ts +2 -2
- package/dist/src/services/pipeline.js +9 -22
- package/dist/src/services/utils.d.ts +54 -4
- package/dist/src/services/utils.js +2 -4
- package/dist/src/styled-system/css/css.mjs +1 -1
- package/dist/src/styled-system/helpers.mjs +0 -3
- package/dist/src/styled-system/types/conditions.d.mts +2 -2
- package/dist/src/styled-system/types/style-props.d.mts +2 -1
- package/dist/src/version.d.ts +1 -1
- package/dist/src/version.js +1 -2
- package/package.json +9 -4
package/dist/panda.css
CHANGED
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
box-sizing: border-box;
|
|
20
20
|
border-width: 0px;
|
|
21
21
|
border-style: solid;
|
|
22
|
-
border-color: var(--global-color-border,
|
|
22
|
+
border-color: var(--global-color-border, currentColor);
|
|
23
23
|
}
|
|
24
24
|
|
|
25
25
|
hr {
|
|
@@ -77,16 +77,10 @@
|
|
|
77
77
|
|
|
78
78
|
::placeholder {
|
|
79
79
|
opacity: 1;
|
|
80
|
-
--placeholder-fallback:
|
|
80
|
+
--placeholder-fallback: color-mix(in srgb, currentColor 50%, transparent);
|
|
81
81
|
color: var(--global-color-placeholder, var(--placeholder-fallback));
|
|
82
82
|
}
|
|
83
83
|
|
|
84
|
-
@supports (not (-webkit-appearance: -apple-pay-button)) or (contain-intrinsic-size: 1px) {
|
|
85
|
-
::placeholder {
|
|
86
|
-
--placeholder-fallback: color-mix(in oklab, currentcolor 50%, transparent);
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
|
|
90
84
|
textarea {
|
|
91
85
|
resize: vertical;
|
|
92
86
|
}
|
|
@@ -1,7 +1,4 @@
|
|
|
1
1
|
import { type EdgeProps } from '@xyflow/react';
|
|
2
|
-
type BridgeEdgeProps = EdgeProps
|
|
3
|
-
data: any;
|
|
4
|
-
type: any;
|
|
5
|
-
};
|
|
2
|
+
type BridgeEdgeProps = EdgeProps;
|
|
6
3
|
export declare const BridgeEdge: ({ id, sourceX, sourceY, targetX, targetY, sourcePosition, targetPosition, style, markerStart, markerEnd, interactionWidth, pathOptions, }: BridgeEdgeProps) => import("react/jsx-runtime").JSX.Element;
|
|
7
4
|
export {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { ArrowRightSideIcon, Icon } from '@luxonis/common-fe-components/icons';
|
|
3
|
-
import { BaseEdge, EdgeLabelRenderer, getSmoothStepPath
|
|
3
|
+
import { BaseEdge, EdgeLabelRenderer, getSmoothStepPath } from '@xyflow/react';
|
|
4
4
|
import React from 'react';
|
|
5
5
|
import { css } from '../styled-system/css/css.mjs';
|
|
6
6
|
const bridgeArrowClassName = css({
|
|
@@ -41,8 +41,7 @@ export const BridgeEdge = ({ id, sourceX, sourceY, targetX, targetY, sourcePosit
|
|
|
41
41
|
const nextArrowState = {
|
|
42
42
|
x: (startPoint.x + endPoint.x) / 2,
|
|
43
43
|
y: (startPoint.y + endPoint.y) / 2,
|
|
44
|
-
angle: Math.atan2(endPoint.y - startPoint.y, endPoint.x - startPoint.x) *
|
|
45
|
-
(180 / Math.PI),
|
|
44
|
+
angle: Math.atan2(endPoint.y - startPoint.y, endPoint.x - startPoint.x) * (180 / Math.PI),
|
|
46
45
|
};
|
|
47
46
|
setArrowState((currentArrowState) => {
|
|
48
47
|
const didChange = Math.abs(currentArrowState.x - nextArrowState.x) > 0.5 ||
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { Flex } from '@luxonis/common-fe-components';
|
|
3
3
|
import { css } from '../styled-system/css/index.mjs';
|
|
4
|
-
// eslint-disable-next-line no-warning-comments
|
|
5
4
|
// TODO: Add group node
|
|
6
5
|
export const GroupNode = (props) => {
|
|
7
6
|
const { data: _node } = props;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { NodeProps } from '@xyflow/react';
|
|
2
|
-
import React from 'react';
|
|
3
|
-
import {
|
|
2
|
+
import type React from 'react';
|
|
3
|
+
import type { ParsedNode } from '../services/pipeline.js';
|
|
4
4
|
export type PipelineNodeProps = NodeProps<ParsedNode>;
|
|
5
5
|
export declare const PipelineNode: React.FC<PipelineNodeProps>;
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { Badge, Button, Flex, HelpIcon, Label, SubLabel
|
|
2
|
+
import { Badge, Button, Flex, HelpIcon, Label, SubLabel } from '@luxonis/common-fe-components';
|
|
3
3
|
import { clsx } from '@luxonis/common-fe-components/helpers';
|
|
4
4
|
import { Handle, Position } from '@xyflow/react';
|
|
5
5
|
import { formatTiming } from '../services/pipeline-state.js';
|
|
6
|
-
import { DOCS_BASE_URL, MIN_NODE_WIDTH, NodesWithLinks
|
|
6
|
+
import { DOCS_BASE_URL, MIN_NODE_WIDTH, NodesWithLinks } from '../services/utils.js';
|
|
7
7
|
import { css } from '../styled-system/css/css.mjs';
|
|
8
8
|
const NodeHandles = (props) => {
|
|
9
9
|
const { handles, type } = props;
|
|
10
10
|
return (_jsx(Flex, { full: true, direction: "column", align: type === 'input' ? 'start' : 'end', minWidth: "120px", children: handles.map(({ type: handleType, id, blocking, queueSize, name, maxQueueSize, fps, connected, dotColor, }) => {
|
|
11
11
|
if (!connected) {
|
|
12
|
-
return;
|
|
12
|
+
return null;
|
|
13
13
|
}
|
|
14
14
|
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: css({
|
|
15
15
|
width: 'custom.handle.dot!',
|
|
@@ -95,7 +95,7 @@ export const PipelineNode = (props) => {
|
|
|
95
95
|
}), style: {
|
|
96
96
|
border: 'none',
|
|
97
97
|
background: 'transparent',
|
|
98
|
-
} }), _jsxs(Flex, { gap: "sm", paddingY: "xs", minWidth: `${MIN_NODE_WIDTH}px`, children: [_jsx(NodeHandles, { type: "input", handles: node.handles.input }), node.extras
|
|
98
|
+
} }), _jsxs(Flex, { gap: "sm", paddingY: "xs", minWidth: `${MIN_NODE_WIDTH}px`, 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({
|
|
99
99
|
width: 'custom.handle.dot!',
|
|
100
100
|
height: 'custom.handle.dot!',
|
|
101
101
|
}), style: {
|
|
@@ -11,11 +11,8 @@ const edgeTypes = { generic: BezierEdge, bridge: BridgeEdge };
|
|
|
11
11
|
const PipelineCanvasBody = ({ pipeline, pipelineState: pipelineStateParsed, header, isDebugging = false, ...flexProps }) => {
|
|
12
12
|
const { fitView, setViewport, getViewport } = useReactFlow();
|
|
13
13
|
const autoArrangeRef = React.useRef(true);
|
|
14
|
-
const
|
|
15
|
-
const
|
|
16
|
-
const heightSelector = (state) => state.height;
|
|
17
|
-
const reactFlowWidth = useStore(widthSelector);
|
|
18
|
-
const reactFlowHeight = useStore(heightSelector);
|
|
14
|
+
const reactFlowWidth = useStore((state) => state.width);
|
|
15
|
+
const reactFlowHeight = useStore((state) => state.height);
|
|
19
16
|
const [shouldFitAndResize, setShouldFitAndResize] = React.useState(false);
|
|
20
17
|
const [openLegend, setOpenLegend] = React.useState(false);
|
|
21
18
|
const pipelineState = React.useMemo(() => pipelineStateParsed, [pipelineStateParsed]);
|
|
@@ -36,7 +33,6 @@ const PipelineCanvasBody = ({ pipeline, pipelineState: pipelineStateParsed, head
|
|
|
36
33
|
// biome-ignore lint/correctness/useExhaustiveDependencies: Intended
|
|
37
34
|
React.useEffect(() => {
|
|
38
35
|
void fitView();
|
|
39
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
40
36
|
}, [reactFlowWidth, reactFlowHeight]);
|
|
41
37
|
const [nodes, setNodes, onNodesChange] = useNodesState([]);
|
|
42
38
|
const [edges, setEdges] = useEdgesState([]);
|
|
@@ -57,7 +53,6 @@ const PipelineCanvasBody = ({ pipeline, pipelineState: pipelineStateParsed, head
|
|
|
57
53
|
const updatedNodes = updateNodesOnPipelineStateChange(nodes, pipelineState);
|
|
58
54
|
setNodes([...updatedNodes]);
|
|
59
55
|
}
|
|
60
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
61
56
|
}, [pipelineState]);
|
|
62
57
|
const setViewportAndFit = async (x, y, zoom, nds) => {
|
|
63
58
|
await setViewport({ x, y, zoom });
|
|
@@ -70,18 +65,7 @@ const PipelineCanvasBody = ({ pipeline, pipelineState: pipelineStateParsed, head
|
|
|
70
65
|
void setViewportAndFit(viewport.x, viewport.y, viewport.zoom, nodes);
|
|
71
66
|
setShouldFitAndResize(false);
|
|
72
67
|
}
|
|
73
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
74
68
|
}, [shouldFitAndResize]);
|
|
75
|
-
|
|
76
|
-
moveStartZoomRef.current = viewport.zoom;
|
|
77
|
-
}, []);
|
|
78
|
-
const handleMoveEnd = React.useCallback((_, viewport) => {
|
|
79
|
-
if (moveStartZoomRef.current !== null &&
|
|
80
|
-
Math.abs(viewport.zoom - moveStartZoomRef.current) > 0.001) {
|
|
81
|
-
autoArrangeRef.current = false;
|
|
82
|
-
}
|
|
83
|
-
moveStartZoomRef.current = null;
|
|
84
|
-
}, []);
|
|
85
|
-
return (_jsxs(Flex, { align: "center", justify: "center", full: true, height: "container.xs", rounded: "common", border: "base", ...flexProps, children: [!pipeline && _jsx(Header, { text: "Loading pipeline..." }), pipeline && (_jsxs(ReactFlow, { nodes: nodes, edges: edges, onMoveStart: handleMoveStart, onMoveEnd: handleMoveEnd, onNodeDragStart: () => (autoArrangeRef.current = false), onNodesChange: onNodesChange, fitView: true, nodeTypes: nodeTypes, edgeTypes: edgeTypes, minZoom: 0.4, children: [header && _jsx(Panel, { position: "top-center", children: header }), _jsx(Panel, { position: "top-right", children: _jsxs(Flex, { gap: "xs", flexDirection: "column", children: [_jsx(Button, { onClick: () => setOpenLegend(!openLegend), label: openLegend ? 'Collapse' : 'Legend' }), openLegend && _jsx(PipelineLegend, { isDebugging: isDebugging })] }) })] }))] }));
|
|
69
|
+
return (_jsxs(Flex, { align: "center", justify: "center", full: true, height: "container.xs", rounded: "common", border: "base", ...flexProps, children: [!pipeline && _jsx(Header, { text: "Loading pipeline..." }), pipeline && (_jsxs(ReactFlow, { nodes: nodes, edges: edges, onNodeDragStart: () => (autoArrangeRef.current = false), onNodesChange: onNodesChange, fitView: true, nodeTypes: nodeTypes, edgeTypes: edgeTypes, minZoom: 0.4, children: [header && _jsx(Panel, { position: "top-center", children: header }), _jsx(Panel, { position: "top-right", children: _jsxs(Flex, { gap: "xs", flexDirection: "column", children: [_jsx(Button, { onClick: () => setOpenLegend(!openLegend), label: openLegend ? 'Collapse' : 'Legend' }), openLegend && _jsx(PipelineLegend, { isDebugging: isDebugging })] }) })] }))] }));
|
|
86
70
|
};
|
|
87
71
|
export const PipelineCanvas = (props) => (_jsx(ReactFlowProvider, { children: _jsx(PipelineCanvasBody, { ...props }) }));
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { Badge, Flex, Label, SubLabel } from '@luxonis/common-fe-components';
|
|
3
3
|
import React from 'react';
|
|
4
4
|
import { PACKAGE_VERSION } from '../version.js';
|
|
@@ -174,7 +174,7 @@ const bridgeSection = {
|
|
|
174
174
|
// warning: '#DC6803',
|
|
175
175
|
// error: '#F04438',
|
|
176
176
|
// gray: '#667085',
|
|
177
|
-
function LegendDot({ tone, square = false
|
|
177
|
+
function LegendDot({ tone, square = false }) {
|
|
178
178
|
const color = React.useMemo(() => {
|
|
179
179
|
switch (tone) {
|
|
180
180
|
case 'gray':
|
|
@@ -196,13 +196,13 @@ function LegendDot({ tone, square = false, }) {
|
|
|
196
196
|
flexShrink: 0,
|
|
197
197
|
} }));
|
|
198
198
|
}
|
|
199
|
-
function LegendCell({ left, right
|
|
200
|
-
return (_jsxs(Flex, { gap: "xxs", width: "full", alignItems: "center", children: [_jsxs(Flex, { alignItems: "center", gap: "xxs", width: "full", children: [left.marker, _jsx(SubLabel, { text: `${left.label}` })] }), right ? (_jsxs(Flex, { alignItems: "center", gap: "xxs", width: "full", children: [right.marker, _jsx(SubLabel, { text: `${right.label}` })] })) :
|
|
199
|
+
function LegendCell({ left, right }) {
|
|
200
|
+
return (_jsxs(Flex, { gap: "xxs", width: "full", alignItems: "center", children: [_jsxs(Flex, { alignItems: "center", gap: "xxs", width: "full", children: [left.marker, _jsx(SubLabel, { text: `${left.label}` })] }), right ? (_jsxs(Flex, { alignItems: "center", gap: "xxs", width: "full", children: [right.marker, _jsx(SubLabel, { text: `${right.label}` })] })) : null] }));
|
|
201
201
|
}
|
|
202
202
|
function LegendSection({ title, items }) {
|
|
203
203
|
return (_jsxs(Flex, { direction: "column", gap: "xs", width: "full", children: [_jsx(Label, { text: title, weight: "medium" }), items.map((item) => (_jsx(LegendCell, { left: item[0], right: item[1] }, `${item[0].id}-${item[1]?.id}`)))] }));
|
|
204
204
|
}
|
|
205
|
-
export const PipelineLegend = ({ isDebugging
|
|
205
|
+
export const PipelineLegend = ({ isDebugging }) => {
|
|
206
206
|
const sections = isDebugging
|
|
207
207
|
? [
|
|
208
208
|
...debugSections,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { Edge } from '@xyflow/react';
|
|
2
2
|
import type { ParsedNode, RawPipelineNodeIO } from './pipeline';
|
|
3
|
-
import { PipelineStateDotColor } from './pipeline-state';
|
|
3
|
+
import type { PipelineStateDotColor } from './pipeline-state';
|
|
4
4
|
export type RawPipelineBridge = [number, number];
|
|
5
5
|
export type ParsedHandle = {
|
|
6
6
|
id: number;
|
|
@@ -51,7 +51,6 @@ export declare function filterNodesHandles(nodes: ParsedNode[], edges: Edge[]):
|
|
|
51
51
|
};
|
|
52
52
|
id: string;
|
|
53
53
|
position: import("@xyflow/system").XYPosition;
|
|
54
|
-
type?: string | undefined;
|
|
55
54
|
sourcePosition?: import("@xyflow/system").Position;
|
|
56
55
|
targetPosition?: import("@xyflow/system").Position;
|
|
57
56
|
hidden?: boolean;
|
|
@@ -68,7 +67,7 @@ export declare function filterNodesHandles(nodes: ParsedNode[], edges: Edge[]):
|
|
|
68
67
|
initialHeight?: number;
|
|
69
68
|
parentId?: string;
|
|
70
69
|
zIndex?: number;
|
|
71
|
-
extent?: "parent" | import("@xyflow/system").CoordinateExtent;
|
|
70
|
+
extent?: "parent" | import("@xyflow/system").CoordinateExtent | null;
|
|
72
71
|
expandParent?: boolean;
|
|
73
72
|
ariaLabel?: string;
|
|
74
73
|
origin?: import("@xyflow/system").NodeOrigin;
|
|
@@ -77,8 +76,11 @@ export declare function filterNodesHandles(nodes: ParsedNode[], edges: Edge[]):
|
|
|
77
76
|
width?: number;
|
|
78
77
|
height?: number;
|
|
79
78
|
};
|
|
79
|
+
type?: string | undefined;
|
|
80
80
|
style?: import("react").CSSProperties;
|
|
81
81
|
className?: string;
|
|
82
82
|
resizing?: boolean;
|
|
83
83
|
focusable?: boolean;
|
|
84
|
+
ariaRole?: import("react").AriaRole;
|
|
85
|
+
domAttributes?: Omit<import("react").HTMLAttributes<HTMLDivElement>, "id" | "style" | "className" | "draggable" | "role" | "aria-label" | "defaultValue" | "dangerouslySetInnerHTML" | keyof import("react").DOMAttributes<HTMLDivElement>>;
|
|
84
86
|
}[];
|
|
@@ -28,7 +28,7 @@ type NodeState = 'IDLE' | 'GETTING_INPUTS' | 'PROCESSING' | 'SENDING_OUTPUTS';
|
|
|
28
28
|
export type RawPipelineState = [
|
|
29
29
|
number,
|
|
30
30
|
{
|
|
31
|
-
events:
|
|
31
|
+
events: unknown[];
|
|
32
32
|
inputStates: IOStates;
|
|
33
33
|
inputsGetTiming: TimingWithFps;
|
|
34
34
|
mainLoopTiming: TimingWithFps;
|
|
@@ -25,9 +25,7 @@ function nodeStateToState(state) {
|
|
|
25
25
|
function formatIOStates(values) {
|
|
26
26
|
let returnObj = {};
|
|
27
27
|
for (const [key, value] of Object.entries(values)) {
|
|
28
|
-
const dotColor = isNaN(Number(value.state))
|
|
29
|
-
? 'gray'
|
|
30
|
-
: nodeStateToDotColor(value.state);
|
|
28
|
+
const dotColor = Number.isNaN(Number(value.state)) ? 'gray' : nodeStateToDotColor(value.state);
|
|
31
29
|
returnObj = {
|
|
32
30
|
...returnObj,
|
|
33
31
|
[key]: {
|
|
@@ -43,7 +41,7 @@ export function parsePipelineState(rawPayload) {
|
|
|
43
41
|
const parsedNodeStates = [];
|
|
44
42
|
for (const [nodeId, nodeState] of nodeStates) {
|
|
45
43
|
const parsedState = Number(nodeState?.state);
|
|
46
|
-
const state = isNaN(parsedState)
|
|
44
|
+
const state = Number.isNaN(parsedState)
|
|
47
45
|
? 'IDLE'
|
|
48
46
|
: nodeStateToState(parsedState);
|
|
49
47
|
const currentNode = {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { Edge, Node } from '@xyflow/react';
|
|
2
2
|
import { type ParsedHandle } from './pipeline-handles';
|
|
3
|
-
import { NodeExtras } from './pipeline-state';
|
|
3
|
+
import type { NodeExtras } from './pipeline-state';
|
|
4
4
|
export type RawPipelineNodeIO = [
|
|
5
5
|
[
|
|
6
6
|
string,
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { filterNodesHandles, parseHandles
|
|
1
|
+
import { filterNodesHandles, parseHandles } from './pipeline-handles';
|
|
2
2
|
function addFakeNode(id) {
|
|
3
3
|
return [
|
|
4
|
-
typeof id === 'number' ? id : parseInt(id),
|
|
4
|
+
typeof id === 'number' ? id : parseInt(id, 10),
|
|
5
5
|
{
|
|
6
|
-
id: typeof id === 'number' ? id : parseInt(id),
|
|
6
|
+
id: typeof id === 'number' ? id : parseInt(id, 10),
|
|
7
7
|
name: 'Unknown',
|
|
8
8
|
ioInfo: [
|
|
9
9
|
[
|
|
@@ -29,21 +29,13 @@ export function parsePipeline(rawPayload) {
|
|
|
29
29
|
type: 'generic',
|
|
30
30
|
id: id.toString(),
|
|
31
31
|
position: { x: 0, y: 0 },
|
|
32
|
-
parentId: node.parentId?.toString() === '-1'
|
|
33
|
-
|
|
34
|
-
: node.parentId?.toString(),
|
|
35
|
-
extent: node.parentId?.toString() === '-1' || node.parentId === undefined
|
|
36
|
-
? undefined
|
|
37
|
-
: 'parent',
|
|
32
|
+
parentId: node.parentId?.toString() === '-1' ? undefined : node.parentId?.toString(),
|
|
33
|
+
extent: node.parentId?.toString() === '-1' || node.parentId === undefined ? undefined : 'parent',
|
|
38
34
|
data: {
|
|
39
35
|
id: id.toString(),
|
|
40
36
|
name: node.name,
|
|
41
37
|
handles: parseHandles(node.ioInfo),
|
|
42
|
-
nodeType: node.deviceNode === undefined
|
|
43
|
-
? undefined
|
|
44
|
-
: node.deviceNode
|
|
45
|
-
? 'device'
|
|
46
|
-
: 'host',
|
|
38
|
+
nodeType: node.deviceNode === undefined ? undefined : node.deviceNode ? 'device' : 'host',
|
|
47
39
|
},
|
|
48
40
|
})) ?? [];
|
|
49
41
|
// Check for parent nodes and if there is children with some parent node that doesn't exist the create it as fake node
|
|
@@ -59,8 +51,7 @@ export function parsePipeline(rawPayload) {
|
|
|
59
51
|
})
|
|
60
52
|
.filter((id) => id !== null)),
|
|
61
53
|
];
|
|
62
|
-
const parentNodesArr = parentNodesIdsRaw.map((id) => pipeline.nodes.find(([_, node]) => node.id.toString() === id) ??
|
|
63
|
-
addFakeNode(id));
|
|
54
|
+
const parentNodesArr = parentNodesIdsRaw.map((id) => pipeline.nodes.find(([_, node]) => node.id.toString() === id) ?? addFakeNode(id));
|
|
64
55
|
// Set all parent nodes as group nodes
|
|
65
56
|
const formattedParentNodes = parentNodesArr.map(([id, node]) => ({
|
|
66
57
|
type: 'group',
|
|
@@ -69,9 +60,7 @@ export function parsePipeline(rawPayload) {
|
|
|
69
60
|
parentId: node.parentId?.toString() === '-1' || node.parentId === undefined
|
|
70
61
|
? undefined
|
|
71
62
|
: `${node.parentId?.toString()}-parent`,
|
|
72
|
-
extent: node.parentId?.toString() === '-1' || node.parentId === undefined
|
|
73
|
-
? undefined
|
|
74
|
-
: 'parent',
|
|
63
|
+
extent: node.parentId?.toString() === '-1' || node.parentId === undefined ? undefined : 'parent',
|
|
75
64
|
data: {
|
|
76
65
|
id: id.toString(),
|
|
77
66
|
name: node.name,
|
|
@@ -108,9 +97,7 @@ export function parsePipeline(rawPayload) {
|
|
|
108
97
|
.filter((node) => node !== null && node !== undefined);
|
|
109
98
|
// Non-parent and non-child nodes
|
|
110
99
|
const filteredNodes = nodes
|
|
111
|
-
.filter((node) => childrenNodes.find((childNode) => childNode.id === node.id) !== undefined
|
|
112
|
-
? null
|
|
113
|
-
: node)
|
|
100
|
+
.filter((node) => childrenNodes.find((childNode) => childNode.id === node.id) !== undefined ? null : node)
|
|
114
101
|
.filter((node) => node !== null);
|
|
115
102
|
// After formatting and filtering set the parent nodes ids to match with children parentIds
|
|
116
103
|
const parentNodes = formattedParentNodes.map((node) => ({
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { Edge } from '@xyflow/react';
|
|
2
|
-
import { ParsedNode } from './pipeline';
|
|
3
|
-
import {
|
|
1
|
+
import type { Edge } from '@xyflow/react';
|
|
2
|
+
import type { ParsedNode } from './pipeline';
|
|
3
|
+
import type { ParsedHandle } from './pipeline-handles';
|
|
4
|
+
import type { PipelineState } from './pipeline-state';
|
|
4
5
|
export declare const topoSort: (nodes: ParsedNode[]) => ParsedNode[];
|
|
5
6
|
export declare const DOCS_BASE_URL = "https://docs.luxonis.com/software-v3/depthai/depthai-components/nodes";
|
|
6
7
|
export declare const NodesWithLinks: {
|
|
@@ -31,7 +32,56 @@ export declare const NodesWithLinks: {
|
|
|
31
32
|
export declare const MIN_NODE_WIDTH = 376;
|
|
32
33
|
export declare const MIN_NODE_HEIGHT = 150;
|
|
33
34
|
export declare const getLayoutedElements: (nodes: ParsedNode[], edges: Edge[]) => {
|
|
34
|
-
nodes:
|
|
35
|
+
nodes: {
|
|
36
|
+
position: {
|
|
37
|
+
x: number;
|
|
38
|
+
y: number;
|
|
39
|
+
};
|
|
40
|
+
id: string;
|
|
41
|
+
data: {
|
|
42
|
+
id: string;
|
|
43
|
+
parentId?: string;
|
|
44
|
+
name: string;
|
|
45
|
+
handles: {
|
|
46
|
+
input: ParsedHandle[];
|
|
47
|
+
output: ParsedHandle[];
|
|
48
|
+
};
|
|
49
|
+
nodeType?: "device" | "host";
|
|
50
|
+
extras?: import("./pipeline-state").NodeExtras;
|
|
51
|
+
};
|
|
52
|
+
sourcePosition?: import("@xyflow/system").Position;
|
|
53
|
+
targetPosition?: import("@xyflow/system").Position;
|
|
54
|
+
hidden?: boolean;
|
|
55
|
+
selected?: boolean;
|
|
56
|
+
dragging?: boolean;
|
|
57
|
+
draggable?: boolean;
|
|
58
|
+
selectable?: boolean;
|
|
59
|
+
connectable?: boolean;
|
|
60
|
+
deletable?: boolean;
|
|
61
|
+
dragHandle?: string;
|
|
62
|
+
width?: number;
|
|
63
|
+
height?: number;
|
|
64
|
+
initialWidth?: number;
|
|
65
|
+
initialHeight?: number;
|
|
66
|
+
parentId?: string;
|
|
67
|
+
zIndex?: number;
|
|
68
|
+
extent?: "parent" | import("@xyflow/system").CoordinateExtent | null;
|
|
69
|
+
expandParent?: boolean;
|
|
70
|
+
ariaLabel?: string;
|
|
71
|
+
origin?: import("@xyflow/system").NodeOrigin;
|
|
72
|
+
handles?: import("@xyflow/system").NodeHandle[];
|
|
73
|
+
measured?: {
|
|
74
|
+
width?: number;
|
|
75
|
+
height?: number;
|
|
76
|
+
};
|
|
77
|
+
type?: string | undefined;
|
|
78
|
+
style?: import("react").CSSProperties;
|
|
79
|
+
className?: string;
|
|
80
|
+
resizing?: boolean;
|
|
81
|
+
focusable?: boolean;
|
|
82
|
+
ariaRole?: import("react").AriaRole;
|
|
83
|
+
domAttributes?: Omit<import("react").HTMLAttributes<HTMLDivElement>, "id" | "style" | "className" | "draggable" | "role" | "aria-label" | "defaultValue" | "dangerouslySetInnerHTML" | keyof import("react").DOMAttributes<HTMLDivElement>>;
|
|
84
|
+
}[];
|
|
35
85
|
edges: Edge[];
|
|
36
86
|
};
|
|
37
87
|
export declare const adjustNodes: (nodes: ParsedNode[], edges: Edge[]) => ParsedNode[];
|
|
@@ -118,8 +118,7 @@ export const adjustNodes = (nodes, edges) => {
|
|
|
118
118
|
};
|
|
119
119
|
g.setNode(child.id, { width: size.width, height: size.height });
|
|
120
120
|
}
|
|
121
|
-
const groupEdges = edges.filter((e) => children.some((c) => c.id === e.source) &&
|
|
122
|
-
children.some((c) => c.id === e.target));
|
|
121
|
+
const groupEdges = edges.filter((e) => children.some((c) => c.id === e.source) && children.some((c) => c.id === e.target));
|
|
123
122
|
for (const edge of groupEdges) {
|
|
124
123
|
g.setEdge(edge.source, edge.target);
|
|
125
124
|
}
|
|
@@ -179,8 +178,7 @@ export const adjustNodes = (nodes, edges) => {
|
|
|
179
178
|
};
|
|
180
179
|
graph.setNode(node.id, { width: size.width, height: size.height });
|
|
181
180
|
}
|
|
182
|
-
const rootEdges = edges.filter((e) => rootNodes.some((n) => n.id === e.source) &&
|
|
183
|
-
rootNodes.some((n) => n.id === e.target));
|
|
181
|
+
const rootEdges = edges.filter((e) => rootNodes.some((n) => n.id === e.source) && rootNodes.some((n) => n.id === e.target));
|
|
184
182
|
for (const edge of rootEdges) {
|
|
185
183
|
graph.setEdge(edge.source, edge.target);
|
|
186
184
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { createCss, createMergeCss, hypenateProperty, withoutSpace } from '../helpers.mjs';
|
|
2
2
|
import { sortConditions, finalizeConditions } from './conditions.mjs';
|
|
3
3
|
|
|
4
|
-
const utilities = "aspectRatio:asp,boxDecorationBreak:bx-db,zIndex:z,boxSizing:bx-s,objectPosition:obj-p,objectFit:obj-f,overscrollBehavior:ovs-b,overscrollBehaviorX:ovs-bx,overscrollBehaviorY:ovs-by,position:pos/1,top:top,left:left,inset:inset,insetInline:inset-x/insetX,insetBlock:inset-y/insetY,insetBlockEnd:inset-be,insetBlockStart:inset-bs,insetInlineEnd:inset-e/insetEnd/end,insetInlineStart:inset-s/insetStart/start,right:right,bottom:bottom,float:float,visibility:vis,display:d,hideFrom:hide,hideBelow:show,flexBasis:flex-b,flex:flex,flexDirection:flex-d/flexDir,flexGrow:flex-g,flexShrink:flex-sh,gridTemplateColumns:grid-tc,gridTemplateRows:grid-tr,gridColumn:grid-c,gridRow:grid-r,gridColumnStart:grid-cs,gridColumnEnd:grid-ce,gridAutoFlow:grid-af,gridAutoColumns:grid-ac,gridAutoRows:grid-ar,gap:gap,gridGap:grid-g,gridRowGap:grid-rg,gridColumnGap:grid-cg,rowGap:rg,columnGap:cg,justifyContent:jc,alignContent:ac,alignItems:ai,alignSelf:as,padding:p/1,paddingLeft:pl/1,paddingRight:pr/1,paddingTop:pt/1,paddingBottom:pb/1,paddingBlock:py/1/paddingY,paddingBlockEnd:pbe,paddingBlockStart:pbs,paddingInline:px/paddingX/1,paddingInlineEnd:pe/1/paddingEnd,paddingInlineStart:ps/1/paddingStart,marginLeft:ml/1,marginRight:mr/1,marginTop:mt/1,marginBottom:mb/1,margin:m/1,marginBlock:my/1/marginY,marginBlockEnd:mbe,marginBlockStart:mbs,marginInline:mx/1/marginX,marginInlineEnd:me/1/marginEnd,marginInlineStart:ms/1/marginStart,spaceX:space_x,spaceY:space_y,outlineWidth:ring-w/ringWidth,outlineColor:ring-c/ringColor,outline:ring/1,outlineOffset:ring-o/ringOffset,divideX:dvd-x,divideY:dvd-y,divideColor:dvd-c,divideStyle:dvd-s,width:w/1,inlineSize:w-is,minWidth:min-w/minW,minInlineSize:min-w-is,maxWidth:max-w/maxW,maxInlineSize:max-w-is,height:h/1,blockSize:h-bs,minHeight:min-h/minH,minBlockSize:min-h-bs,maxHeight:max-h/maxH,maxBlockSize:max-b,color:c,fontFamily:ff,fontSize:fs,fontSizeAdjust:fs-a,fontPalette:fp,fontKerning:fk,fontFeatureSettings:ff-s,fontWeight:fw,fontSmoothing:fsmt,fontVariant:fv,fontVariantAlternates:fv-alt,fontVariantCaps:fv-caps,fontVariationSettings:fv-s,fontVariantNumeric:fv-num,letterSpacing:tracking/1,lineHeight:leading/1,textAlign:ta,textDecoration:td,textDecorationColor:td-c,textEmphasisColor:te-c,textDecorationStyle:td-s,textDecorationThickness:td-t,textUnderlineOffset:tu-o,textTransform:tt,textIndent:ti,textShadow:tsh,textShadowColor:tsh-c/textShadowColor,textOverflow:tov,verticalAlign:va,wordBreak:wb,textWrap:tw,truncate:trunc,lineClamp:lc,listStyleType:li-t,listStylePosition:li-pos,listStyleImage:li-img,listStyle:li-s,backgroundPosition:bg-p/bgPosition,backgroundPositionX:bg-p-x/bgPositionX,backgroundPositionY:bg-p-y/bgPositionY,backgroundAttachment:bg-a/bgAttachment,backgroundClip:bg-cp/bgClip,background:bg/1,backgroundColor:bg-c/bgColor,backgroundOrigin:bg-o/bgOrigin,backgroundImage:bg-i/bgImage,backgroundRepeat:bg-r/bgRepeat,backgroundBlendMode:bg-bm/bgBlendMode,backgroundSize:bg-s/bgSize,backgroundGradient:bg-grad/bgGradient,textGradient:txt-grad,gradientFromPosition:grad-from-pos,gradientToPosition:grad-to-pos,gradientFrom:grad-from,gradientTo:grad-to,gradientVia:grad-via,gradientViaPosition:grad-via-pos,borderRadius:bdr/rounded,borderTopLeftRadius:bdr-tl/roundedTopLeft,borderTopRightRadius:bdr-tr/roundedTopRight,borderBottomRightRadius:bdr-br/roundedBottomRight,borderBottomLeftRadius:bdr-bl/roundedBottomLeft,borderTopRadius:bdr-t/roundedTop,borderRightRadius:bdr-r/roundedRight,borderBottomRadius:bdr-b/roundedBottom,borderLeftRadius:bdr-l/roundedLeft,borderStartStartRadius:bdr-ss/roundedStartStart,borderStartEndRadius:bdr-se/roundedStartEnd,borderStartRadius:bdr-s/roundedStart,borderEndStartRadius:bdr-es/roundedEndStart,borderEndEndRadius:bdr-ee/roundedEndEnd,borderEndRadius:bdr-e/roundedEnd,border:bd,borderWidth:bd-w,borderTopWidth:bd-t-w,borderLeftWidth:bd-l-w,borderRightWidth:bd-r-w,borderBottomWidth:bd-b-w,
|
|
4
|
+
const utilities = "aspectRatio:asp,boxDecorationBreak:bx-db,zIndex:z,boxSizing:bx-s,objectPosition:obj-p,objectFit:obj-f,overscrollBehavior:ovs-b,overscrollBehaviorX:ovs-bx,overscrollBehaviorY:ovs-by,position:pos/1,top:top,left:left,inset:inset,insetInline:inset-x/insetX,insetBlock:inset-y/insetY,insetBlockEnd:inset-be,insetBlockStart:inset-bs,insetInlineEnd:inset-e/insetEnd/end,insetInlineStart:inset-s/insetStart/start,right:right,bottom:bottom,float:float,visibility:vis,display:d,hideFrom:hide,hideBelow:show,flexBasis:flex-b,flex:flex,flexDirection:flex-d/flexDir,flexGrow:flex-g,flexShrink:flex-sh,gridTemplateColumns:grid-tc,gridTemplateRows:grid-tr,gridColumn:grid-c,gridRow:grid-r,gridColumnStart:grid-cs,gridColumnEnd:grid-ce,gridAutoFlow:grid-af,gridAutoColumns:grid-ac,gridAutoRows:grid-ar,gap:gap,gridGap:grid-g,gridRowGap:grid-rg,gridColumnGap:grid-cg,rowGap:rg,columnGap:cg,justifyContent:jc,alignContent:ac,alignItems:ai,alignSelf:as,padding:p/1,paddingLeft:pl/1,paddingRight:pr/1,paddingTop:pt/1,paddingBottom:pb/1,paddingBlock:py/1/paddingY,paddingBlockEnd:pbe,paddingBlockStart:pbs,paddingInline:px/paddingX/1,paddingInlineEnd:pe/1/paddingEnd,paddingInlineStart:ps/1/paddingStart,marginLeft:ml/1,marginRight:mr/1,marginTop:mt/1,marginBottom:mb/1,margin:m/1,marginBlock:my/1/marginY,marginBlockEnd:mbe,marginBlockStart:mbs,marginInline:mx/1/marginX,marginInlineEnd:me/1/marginEnd,marginInlineStart:ms/1/marginStart,spaceX:space_x,spaceY:space_y,outlineWidth:ring-w/ringWidth,outlineColor:ring-c/ringColor,outline:ring/1,outlineOffset:ring-o/ringOffset,divideX:dvd-x,divideY:dvd-y,divideColor:dvd-c,divideStyle:dvd-s,width:w/1,inlineSize:w-is,minWidth:min-w/minW,minInlineSize:min-w-is,maxWidth:max-w/maxW,maxInlineSize:max-w-is,height:h/1,blockSize:h-bs,minHeight:min-h/minH,minBlockSize:min-h-bs,maxHeight:max-h/maxH,maxBlockSize:max-b,color:c,fontFamily:ff,fontSize:fs,fontSizeAdjust:fs-a,fontPalette:fp,fontKerning:fk,fontFeatureSettings:ff-s,fontWeight:fw,fontSmoothing:fsmt,fontVariant:fv,fontVariantAlternates:fv-alt,fontVariantCaps:fv-caps,fontVariationSettings:fv-s,fontVariantNumeric:fv-num,letterSpacing:tracking/1,lineHeight:leading/1,textAlign:ta,textDecoration:td,textDecorationColor:td-c,textEmphasisColor:te-c,textDecorationStyle:td-s,textDecorationThickness:td-t,textUnderlineOffset:tu-o,textTransform:tt,textIndent:ti,textShadow:tsh,textShadowColor:tsh-c/textShadowColor,textOverflow:tov,verticalAlign:va,wordBreak:wb,textWrap:tw,truncate:trunc,lineClamp:lc,listStyleType:li-t,listStylePosition:li-pos,listStyleImage:li-img,listStyle:li-s,backgroundPosition:bg-p/bgPosition,backgroundPositionX:bg-p-x/bgPositionX,backgroundPositionY:bg-p-y/bgPositionY,backgroundAttachment:bg-a/bgAttachment,backgroundClip:bg-cp/bgClip,background:bg/1,backgroundColor:bg-c/bgColor,backgroundOrigin:bg-o/bgOrigin,backgroundImage:bg-i/bgImage,backgroundRepeat:bg-r/bgRepeat,backgroundBlendMode:bg-bm/bgBlendMode,backgroundSize:bg-s/bgSize,backgroundGradient:bg-grad/bgGradient,textGradient:txt-grad,gradientFromPosition:grad-from-pos,gradientToPosition:grad-to-pos,gradientFrom:grad-from,gradientTo:grad-to,gradientVia:grad-via,gradientViaPosition:grad-via-pos,borderRadius:bdr/rounded,borderTopLeftRadius:bdr-tl/roundedTopLeft,borderTopRightRadius:bdr-tr/roundedTopRight,borderBottomRightRadius:bdr-br/roundedBottomRight,borderBottomLeftRadius:bdr-bl/roundedBottomLeft,borderTopRadius:bdr-t/roundedTop,borderRightRadius:bdr-r/roundedRight,borderBottomRadius:bdr-b/roundedBottom,borderLeftRadius:bdr-l/roundedLeft,borderStartStartRadius:bdr-ss/roundedStartStart,borderStartEndRadius:bdr-se/roundedStartEnd,borderStartRadius:bdr-s/roundedStart,borderEndStartRadius:bdr-es/roundedEndStart,borderEndEndRadius:bdr-ee/roundedEndEnd,borderEndRadius:bdr-e/roundedEnd,border:bd,borderWidth:bd-w,borderTopWidth:bd-t-w,borderLeftWidth:bd-l-w,borderRightWidth:bd-r-w,borderBottomWidth:bd-b-w,borderColor:bd-c,borderInline:bd-x/borderX,borderInlineWidth:bd-x-w/borderXWidth,borderInlineColor:bd-x-c/borderXColor,borderBlock:bd-y/borderY,borderBlockWidth:bd-y-w/borderYWidth,borderBlockColor:bd-y-c/borderYColor,borderLeft:bd-l,borderLeftColor:bd-l-c,borderInlineStart:bd-s/borderStart,borderInlineStartWidth:bd-s-w/borderStartWidth,borderInlineStartColor:bd-s-c/borderStartColor,borderRight:bd-r,borderRightColor:bd-r-c,borderInlineEnd:bd-e/borderEnd,borderInlineEndWidth:bd-e-w/borderEndWidth,borderInlineEndColor:bd-e-c/borderEndColor,borderTop:bd-t,borderTopColor:bd-t-c,borderBottom:bd-b,borderBottomColor:bd-b-c,borderBlockEnd:bd-be,borderBlockEndColor:bd-be-c,borderBlockStart:bd-bs,borderBlockStartColor:bd-bs-c,opacity:op,boxShadow:bx-sh/shadow,boxShadowColor:bx-sh-c/shadowColor,mixBlendMode:mix-bm,filter:filter,brightness:brightness,contrast:contrast,grayscale:grayscale,hueRotate:hue-rotate,invert:invert,saturate:saturate,sepia:sepia,dropShadow:drop-shadow,blur:blur,backdropFilter:bkdp,backdropBlur:backdrop_blur,backdropBrightness:bkdp-brightness,backdropContrast:bkdp-contrast,backdropGrayscale:bkdp-grayscale,backdropHueRotate:bkdp-hue-rotate,backdropInvert:bkdp-invert,backdropOpacity:bkdp-opacity,backdropSaturate:bkdp-saturate,backdropSepia:bkdp-sepia,borderCollapse:bd-cl,borderSpacing:bd-sp,borderSpacingX:bd-sx,borderSpacingY:bd-sy,tableLayout:tbl,transitionTimingFunction:trs-tmf,transitionDelay:trs-dly,transitionDuration:trs-dur,transitionProperty:trs-prop,transition:trs,animation:anim,animationName:anim-n,animationTimingFunction:anim-tmf,animationDuration:anim-dur,animationDelay:anim-dly,animationPlayState:anim-ps,animationComposition:anim-comp,animationFillMode:anim-fm,animationDirection:anim-dir,animationIterationCount:anim-ic,animationRange:anim-r,animationState:anim-s,animationRangeStart:anim-rs,animationRangeEnd:anim-re,animationTimeline:anim-tl,transformOrigin:trf-o,transformBox:trf-b,transformStyle:trf-s,transform:trf,rotate:rotate,rotateX:rotate-x,rotateY:rotate-y,rotateZ:rotate-z,scale:scale,scaleX:scale-x,scaleY:scale-y,translate:translate,translateX:translate_x/x,translateY:translate_y/y,translateZ:translate-z/z,accentColor:ac-c,caretColor:ca-c,scrollBehavior:scr-bhv,scrollbar:scr-bar,scrollbarColor:scr-bar-c,scrollbarGutter:scr-bar-g,scrollbarWidth:scr-bar-w,scrollMargin:scr-m,scrollMarginLeft:scr-ml,scrollMarginRight:scr-mr,scrollMarginTop:scr-mt,scrollMarginBottom:scr-mb,scrollMarginBlock:scr-my/scrollMarginY,scrollMarginBlockEnd:scr-mbe,scrollMarginBlockStart:scr-mbt,scrollMarginInline:scr-mx/scrollMarginX,scrollMarginInlineEnd:scr-me,scrollMarginInlineStart:scr-ms,scrollPadding:scr-p,scrollPaddingBlock:scr-py/scrollPaddingY,scrollPaddingBlockStart:scr-pbs,scrollPaddingBlockEnd:scr-pbe,scrollPaddingInline:scr-px/scrollPaddingX,scrollPaddingInlineEnd:scr-pe,scrollPaddingInlineStart:scr-ps,scrollPaddingLeft:scr-pl,scrollPaddingRight:scr-pr,scrollPaddingTop:scr-pt,scrollPaddingBottom:scr-pb,scrollSnapAlign:scr-sa,scrollSnapStop:scrs-s,scrollSnapType:scrs-t,scrollSnapStrictness:scrs-strt,scrollSnapMargin:scrs-m,scrollSnapMarginTop:scrs-mt,scrollSnapMarginBottom:scrs-mb,scrollSnapMarginLeft:scrs-ml,scrollSnapMarginRight:scrs-mr,scrollSnapCoordinate:scrs-c,scrollSnapDestination:scrs-d,scrollSnapPointsX:scrs-px,scrollSnapPointsY:scrs-py,scrollSnapTypeX:scrs-tx,scrollSnapTypeY:scrs-ty,scrollTimeline:scrtl,scrollTimelineAxis:scrtl-a,scrollTimelineName:scrtl-n,touchAction:tch-a,userSelect:us,overflow:ov,overflowWrap:ov-wrap,overflowX:ov-x,overflowY:ov-y,overflowAnchor:ov-a,overflowBlock:ov-b,overflowInline:ov-i,overflowClipBox:ovcp-bx,overflowClipMargin:ovcp-m,overscrollBehaviorBlock:ovs-bb,overscrollBehaviorInline:ovs-bi,fill:fill,stroke:stk,strokeWidth:stk-w,strokeDasharray:stk-dsh,strokeDashoffset:stk-do,strokeLinecap:stk-lc,strokeLinejoin:stk-lj,strokeMiterlimit:stk-ml,strokeOpacity:stk-op,srOnly:sr,debug:debug,appearance:ap,backfaceVisibility:bfv,clipPath:cp-path,hyphens:hy,mask:msk,maskImage:msk-i,maskSize:msk-s,textSizeAdjust:txt-adj,container:container,containerName:cq-n,containerType:cq-t,animateIn:animate_in,animateOut:animate_out,fadeIn:animate_fade_in,fadeOut:animate_fade_out,zoomIn:animate_zoom_in,zoomOut:animate_zoom_out,spinIn:animate_spin_in,spinOut:animate_spin_out,slideInFromTop:animate_slide_in_from_top,slideInFromBottom:animate_slide_in_from_bottom,slideInFromLeft:animate_slide_in_from_left,slideInFromRight:animate_slide_in_from_right,slideOutToTop:animate_slide_out_to_top,slideOutToBottom:animate_slide_out_to_bottom,slideOutToLeft:animate_slide_out_to_left,slideOutToRight:animate_slide_out_to_right,backgroundAlpha:background-alpha/bga,gradientFromAlpha:from-alpha,gradientToAlpha:to-alpha,borderAlpha:border_color_alpha/bca,focusRingWidth:focus-ring-width,focusRingColor:focus-ring-color,focusRingOffsetWidth:focus-ring-offset-width,focusRingOffsetColor:focus-ring-offset-color,focusRingInset:focus-ring-inset,textAlpha:text_alpha/ca,textStyle:textStyle,layerStyle:layerStyle"
|
|
5
5
|
|
|
6
6
|
const classNameByProp = new Map()
|
|
7
7
|
const shorthands = new Map()
|
|
@@ -64,14 +64,11 @@ var memo = (fn) => {
|
|
|
64
64
|
};
|
|
65
65
|
|
|
66
66
|
// src/merge-props.ts
|
|
67
|
-
var MERGE_OMIT = /* @__PURE__ */ new Set(["__proto__", "constructor", "prototype"]);
|
|
68
67
|
function mergeProps(...sources) {
|
|
69
68
|
return sources.reduce((prev, obj) => {
|
|
70
69
|
if (!obj)
|
|
71
70
|
return prev;
|
|
72
71
|
Object.keys(obj).forEach((key) => {
|
|
73
|
-
if (MERGE_OMIT.has(key))
|
|
74
|
-
return;
|
|
75
72
|
const prevValue = prev[key];
|
|
76
73
|
const value = obj[key];
|
|
77
74
|
if (isObject(prevValue) && isObject(value)) {
|
|
@@ -106,7 +106,7 @@ export interface Conditions {
|
|
|
106
106
|
"_groupChecked": string
|
|
107
107
|
/** `.group:is([aria-expanded=true], [data-expanded], [data-state="expanded"]) &` */
|
|
108
108
|
"_groupExpanded": string
|
|
109
|
-
/** `.group:
|
|
109
|
+
/** `.group:invalid &` */
|
|
110
110
|
"_groupInvalid": string
|
|
111
111
|
/** `&:is(:indeterminate, [data-indeterminate], [aria-checked=mixed], [data-state="indeterminate"])` */
|
|
112
112
|
"_indeterminate": string
|
|
@@ -146,7 +146,7 @@ export interface Conditions {
|
|
|
146
146
|
"_open": string
|
|
147
147
|
/** `&:is([closed], [data-closed], [data-state="closed"])` */
|
|
148
148
|
"_closed": string
|
|
149
|
-
/**
|
|
149
|
+
/** `&is(:fullscreen, [data-fullscreen])` */
|
|
150
150
|
"_fullscreen": string
|
|
151
151
|
/** `&:is([data-loading], [aria-busy=true])` */
|
|
152
152
|
"_loading": string
|
|
@@ -8,7 +8,8 @@ type AnyString = (string & {})
|
|
|
8
8
|
type CssVars = `var(--${string})`
|
|
9
9
|
type CssVarValue = ConditionalValue<Token | AnyString | (number & {})>
|
|
10
10
|
|
|
11
|
-
type
|
|
11
|
+
type CssVarName = | AnyString
|
|
12
|
+
type CssVarKeys = `--${CssVarName}`
|
|
12
13
|
|
|
13
14
|
export type CssVarProperties = {
|
|
14
15
|
[key in CssVarKeys]?: CssVarValue
|
package/dist/src/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const PACKAGE_VERSION = "
|
|
1
|
+
export declare const PACKAGE_VERSION = "3.0.1-rc.1";
|
package/dist/src/version.js
CHANGED
package/package.json
CHANGED
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@luxonis/depthai-pipeline-lib",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "3.0.1-rc.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
6
|
"main": "./dist/src/index.js",
|
|
7
|
+
"types": "./dist/src/index.d.ts",
|
|
7
8
|
"scripts": {
|
|
8
9
|
"build": "./build.sh",
|
|
10
|
+
"build:win": "powershell -NoProfile -ExecutionPolicy Bypass -File ./build.win.ps1",
|
|
9
11
|
"lint": "biome check .",
|
|
10
12
|
"lint:fix": "biome check . --write",
|
|
11
13
|
"gen:styles": "panda codegen",
|
|
@@ -25,12 +27,11 @@
|
|
|
25
27
|
"react-dom": "^18.3.1 || ^19.0.0"
|
|
26
28
|
},
|
|
27
29
|
"devDependencies": {
|
|
28
|
-
"@biomejs/biome": "2.4.
|
|
30
|
+
"@biomejs/biome": "^2.4.15",
|
|
29
31
|
"@pandacss/dev": "^0.53.0",
|
|
30
32
|
"@types/react": "^18.3.1 || ^19.0.0",
|
|
31
33
|
"@types/react-dom": "^18.3.1 || ^19.0.0",
|
|
32
34
|
"postcss": "^8.4.31",
|
|
33
|
-
"prettier": "^3.2.5",
|
|
34
35
|
"typescript": "^5.2.2"
|
|
35
36
|
},
|
|
36
37
|
"overrides": {
|
|
@@ -41,7 +42,11 @@
|
|
|
41
42
|
"dist/*.css"
|
|
42
43
|
],
|
|
43
44
|
"exports": {
|
|
44
|
-
".":
|
|
45
|
+
".": {
|
|
46
|
+
"types": "./dist/src/index.d.ts",
|
|
47
|
+
"import": "./dist/src/index.js",
|
|
48
|
+
"default": "./dist/src/index.js"
|
|
49
|
+
},
|
|
45
50
|
"./styles": "./dist/index.css"
|
|
46
51
|
},
|
|
47
52
|
"publishConfig": {
|