@multiplatform.one/node-graph 7.88.4 → 7.88.6
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/cjs/edges/GraphEdge.cjs +27 -2
- package/dist/cjs/edges/GraphEdge.native.js +29 -5
- package/dist/cjs/edges/GraphEdge.native.js.map +1 -1
- package/dist/cjs/edges/edgeStyle.cjs +32 -7
- package/dist/cjs/edges/edgeStyle.native.js +34 -6
- package/dist/cjs/edges/edgeStyle.native.js.map +1 -1
- package/dist/cjs/nodes/GraphNode.cjs +15 -5
- package/dist/cjs/nodes/GraphNode.native.js +15 -5
- package/dist/cjs/nodes/GraphNode.native.js.map +1 -1
- package/dist/cjs/react-flow/flowAdapter.cjs +0 -5
- package/dist/cjs/react-flow/flowAdapter.native.js +0 -5
- package/dist/cjs/react-flow/flowAdapter.native.js.map +1 -1
- package/dist/esm/edges/GraphEdge.mjs +29 -4
- package/dist/esm/edges/GraphEdge.mjs.map +1 -1
- package/dist/esm/edges/GraphEdge.native.js +31 -7
- package/dist/esm/edges/GraphEdge.native.js.map +1 -1
- package/dist/esm/edges/edgeStyle.mjs +30 -8
- package/dist/esm/edges/edgeStyle.mjs.map +1 -1
- package/dist/esm/edges/edgeStyle.native.js +32 -7
- package/dist/esm/edges/edgeStyle.native.js.map +1 -1
- package/dist/esm/nodes/GraphNode.mjs +17 -7
- package/dist/esm/nodes/GraphNode.mjs.map +1 -1
- package/dist/esm/nodes/GraphNode.native.js +17 -7
- package/dist/esm/nodes/GraphNode.native.js.map +1 -1
- package/dist/esm/react-flow/flowAdapter.mjs +0 -5
- package/dist/esm/react-flow/flowAdapter.mjs.map +1 -1
- package/dist/esm/react-flow/flowAdapter.native.js +0 -5
- package/dist/esm/react-flow/flowAdapter.native.js.map +1 -1
- package/dist/jsx/edges/GraphEdge.mjs +29 -4
- package/dist/jsx/edges/GraphEdge.mjs.map +1 -1
- package/dist/jsx/edges/GraphEdge.native.js +29 -5
- package/dist/jsx/edges/GraphEdge.native.js.map +1 -1
- package/dist/jsx/edges/edgeStyle.mjs +30 -8
- package/dist/jsx/edges/edgeStyle.mjs.map +1 -1
- package/dist/jsx/edges/edgeStyle.native.js +34 -6
- package/dist/jsx/edges/edgeStyle.native.js.map +1 -1
- package/dist/jsx/nodes/GraphNode.mjs +17 -7
- package/dist/jsx/nodes/GraphNode.mjs.map +1 -1
- package/dist/jsx/nodes/GraphNode.native.js +15 -5
- package/dist/jsx/nodes/GraphNode.native.js.map +1 -1
- package/dist/jsx/react-flow/flowAdapter.mjs +0 -5
- package/dist/jsx/react-flow/flowAdapter.mjs.map +1 -1
- package/dist/jsx/react-flow/flowAdapter.native.js +0 -5
- package/dist/jsx/react-flow/flowAdapter.native.js.map +1 -1
- package/package.json +7 -7
- package/src/edges/GraphEdge.tsx +37 -6
- package/src/edges/edgeStyle.spec.ts +73 -13
- package/src/edges/edgeStyle.ts +68 -15
- package/src/nodes/GraphNode.tsx +27 -15
- package/src/nodes/arrowheadPlacement.spec.tsx +109 -0
- package/src/react-flow/flowAdapter.ts +4 -7
- package/src/react-flow/useGraphController.spec.tsx +6 -6
- package/types/edges/GraphEdge.d.ts.map +1 -1
- package/types/edges/edgeStyle.d.ts +41 -9
- package/types/edges/edgeStyle.d.ts.map +1 -1
- package/types/nodes/GraphNode.d.ts.map +1 -1
- package/types/react-flow/flowAdapter.d.ts +4 -5
- package/types/react-flow/flowAdapter.d.ts.map +1 -1
|
@@ -118,11 +118,36 @@ function GraphEdgeComponent(props) {
|
|
|
118
118
|
const strokeValue = useStrokeValue(style.stroke);
|
|
119
119
|
const [d, labelX, labelY] = buildEdgePath(style.path, props);
|
|
120
120
|
const label = data.label ?? (typeof props.label === "string" ? props.label : void 0);
|
|
121
|
+
const markerId = `mp-graph-arrow-${(0, import_react.useId)().replace(/[^a-zA-Z0-9_-]/g, "")}`;
|
|
122
|
+
const ownMarker = props.markerEnd === void 0;
|
|
121
123
|
return /* @__PURE__ */(0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, {
|
|
122
|
-
children: [/* @__PURE__ */(0, import_jsx_runtime.jsx)(
|
|
124
|
+
children: [ownMarker ? /* @__PURE__ */(0, import_jsx_runtime.jsx)("defs", {
|
|
125
|
+
children: /* @__PURE__ */(0, import_jsx_runtime.jsx)("marker", {
|
|
126
|
+
id: markerId,
|
|
127
|
+
className: "mp-graph-arrowhead",
|
|
128
|
+
"data-graph-edge-marker": style.marker,
|
|
129
|
+
viewBox: import_edgeStyle.edgeArrowhead.viewBox,
|
|
130
|
+
markerWidth: import_edgeStyle.edgeArrowhead.size,
|
|
131
|
+
markerHeight: import_edgeStyle.edgeArrowhead.size,
|
|
132
|
+
markerUnits: "strokeWidth",
|
|
133
|
+
orient: "auto-start-reverse",
|
|
134
|
+
refX: import_edgeStyle.edgeArrowhead.refX,
|
|
135
|
+
refY: import_edgeStyle.edgeArrowhead.refY,
|
|
136
|
+
children: /* @__PURE__ */(0, import_jsx_runtime.jsx)("polyline", {
|
|
137
|
+
points: import_edgeStyle.edgeArrowhead.points[style.marker],
|
|
138
|
+
strokeLinecap: "round",
|
|
139
|
+
strokeLinejoin: "round",
|
|
140
|
+
style: {
|
|
141
|
+
stroke: `var(--mp-graph-edge-stroke, ${strokeValue})`,
|
|
142
|
+
strokeWidth: 1,
|
|
143
|
+
fill: style.marker === "arrowclosed" ? `var(--mp-graph-edge-stroke, ${strokeValue})` : "none"
|
|
144
|
+
}
|
|
145
|
+
})
|
|
146
|
+
})
|
|
147
|
+
}) : null, /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_xy.BaseEdge, {
|
|
123
148
|
id: props.id,
|
|
124
149
|
path: d,
|
|
125
|
-
markerEnd: props.markerEnd,
|
|
150
|
+
markerEnd: ownMarker ? `url(#${markerId})` : props.markerEnd,
|
|
126
151
|
style: {
|
|
127
152
|
stroke: `var(--mp-graph-edge-stroke, ${strokeValue})`,
|
|
128
153
|
strokeWidth: style.strokeWidth,
|
|
@@ -122,14 +122,38 @@ function GraphEdgeComponent(props) {
|
|
|
122
122
|
var strokeValue = useStrokeValue(style.stroke);
|
|
123
123
|
var [d, labelX, labelY] = buildEdgePath(style.path, props);
|
|
124
124
|
var label = (_data_label = data.label) !== null && _data_label !== void 0 ? _data_label : typeof props.label === "string" ? props.label : void 0;
|
|
125
|
+
var markerId = `mp-graph-arrow-${(0, import_react.useId)().replace(/[^a-zA-Z0-9_-]/g, "")}`;
|
|
126
|
+
var ownMarker = props.markerEnd === void 0;
|
|
125
127
|
return /* @__PURE__ */(0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, {
|
|
126
|
-
children: [/* @__PURE__ */(0, import_jsx_runtime.jsx)(
|
|
128
|
+
children: [ownMarker ? /* @__PURE__ */(0, import_jsx_runtime.jsx)("defs", {
|
|
129
|
+
children: /* @__PURE__ */(0, import_jsx_runtime.jsx)("marker", {
|
|
130
|
+
id: markerId,
|
|
131
|
+
className: "mp-graph-arrowhead",
|
|
132
|
+
"data-graph-edge-marker": style.marker,
|
|
133
|
+
viewBox: import_edgeStyle.edgeArrowhead.viewBox,
|
|
134
|
+
markerWidth: import_edgeStyle.edgeArrowhead.size,
|
|
135
|
+
markerHeight: import_edgeStyle.edgeArrowhead.size,
|
|
136
|
+
markerUnits: "strokeWidth",
|
|
137
|
+
orient: "auto-start-reverse",
|
|
138
|
+
refX: import_edgeStyle.edgeArrowhead.refX,
|
|
139
|
+
refY: import_edgeStyle.edgeArrowhead.refY,
|
|
140
|
+
children: /* @__PURE__ */(0, import_jsx_runtime.jsx)("polyline", {
|
|
141
|
+
points: import_edgeStyle.edgeArrowhead.points[style.marker],
|
|
142
|
+
strokeLinecap: "round",
|
|
143
|
+
strokeLinejoin: "round",
|
|
144
|
+
style: {
|
|
145
|
+
stroke: `var(--mp-graph-edge-stroke, ${strokeValue})`,
|
|
146
|
+
strokeWidth: 1,
|
|
147
|
+
fill: style.marker === "arrowclosed" ? `var(--mp-graph-edge-stroke, ${strokeValue})` : "none"
|
|
148
|
+
}
|
|
149
|
+
})
|
|
150
|
+
})
|
|
151
|
+
}) : null, /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_xy.BaseEdge, {
|
|
127
152
|
id: props.id,
|
|
128
153
|
path: d,
|
|
129
|
-
//
|
|
130
|
-
//
|
|
131
|
-
|
|
132
|
-
markerEnd: props.markerEnd,
|
|
154
|
+
// The head is drawn here, in the edge's own stroke, unless the edge
|
|
155
|
+
// object brought its own React Flow marker (`edgeMarkerEnd`).
|
|
156
|
+
markerEnd: ownMarker ? `url(#${markerId})` : props.markerEnd,
|
|
133
157
|
style: {
|
|
134
158
|
stroke: `var(--mp-graph-edge-stroke, ${strokeValue})`,
|
|
135
159
|
strokeWidth: style.strokeWidth,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["__toCommonJS","mod","__copyProps","__defProp","value","GraphEdge_exports","__export","GraphEdge","GraphEdgeComponent","buildEdgePath","graphEdgeType","graphEdgeTypes","useEdgeKnobs","module","exports","import_jsx_runtime","require","import_theme","import_theme2","import_react","import_tamagui","import_xy","import_edgeStyle","path","geometry","sourceX","sourceY","targetX","targetY","sourcePosition","targetPosition","d","labelX","labelY","getBezierPath","d1","labelX1","labelY1","getStraightPath","d2","labelX2","labelY2","getSmoothStepPath","borderRadius","preset","usePresetContext","knobs","overrides","defaultKnobs","borderWidth","animation","useStrokeValue","stroke","_entry_get","theme","useTheme","entry","themeTokenName","get","call","props","_props_data","_data_kind","_data_label","data","style","resolveEdgeStyle","kind","appearance","strokeValue","label","jsxs","Fragment","children","jsx","
|
|
1
|
+
{"version":3,"names":["__toCommonJS","mod","__copyProps","__defProp","value","GraphEdge_exports","__export","GraphEdge","GraphEdgeComponent","buildEdgePath","graphEdgeType","graphEdgeTypes","useEdgeKnobs","module","exports","import_jsx_runtime","require","import_theme","import_theme2","import_react","import_tamagui","import_xy","import_edgeStyle","path","geometry","sourceX","sourceY","targetX","targetY","sourcePosition","targetPosition","d","labelX","labelY","getBezierPath","d1","labelX1","labelY1","getStraightPath","d2","labelX2","labelY2","getSmoothStepPath","borderRadius","preset","usePresetContext","knobs","overrides","defaultKnobs","borderWidth","animation","useStrokeValue","stroke","_entry_get","theme","useTheme","entry","themeTokenName","get","call","props","_props_data","_data_kind","_data_label","data","style","resolveEdgeStyle","kind","appearance","strokeValue","label","markerId","useId","replace","ownMarker","markerEnd","jsxs","Fragment","children","jsx","id","className","marker","viewBox","edgeArrowhead","markerWidth","size","markerHeight","markerUnits","orient","refX","refY","points","strokeLinecap","strokeLinejoin","strokeWidth","fill","BaseEdge","strokeDasharray"],"sources":["../../../src/edges/GraphEdge.tsx"],"sourcesContent":[null],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,YAAA,GAAAC,GAAA,IAAAC,WAAA,CAAAC,SAAA;EAAAC,KAAA;AAAA,IAAAH,GAAA;AAAA,IAAAI,iBAAA;AAAAC,QAAA,CAAAD,iBAAA;EAAAE,SAAA,EAAAA,CAAA,KAAAA,SAAA;EAAAC,kBAAA,EAAAA,CAAA,KAAAA,kBAAA;EAAAC,aAAA,EAAAA,CAAA,KAAAA,aAAA;EAAAC,aAAA,EAAAA,CAAA,KAAAA,aAAA;EAAAC,cAAA,EAAAA,CAAA,KAAAA,cAAA;EAAAC,YAAA,EAAAA,CAAA,KAAAA;AAAA;AAaAC,MAAA,CAAAC,OAAA,GAAAd,YAAmD,CAAAK,iBAAA;AACnD,IAAAU,kBAA6B,GAAAC,OAAA;AAE7B,IAAAC,YAAA,GAA4BD,OAAA;AAC5B,IAAAE,aAAA,GAAAF,OAA4C;AAC5C,IAAAG,YAMO,GAAAH,OAAA;AAEP,IAAAI,cAAA,GAAAJ,OAAgE;AAwH5D,IAAAK,SAAA,GAAAL,OAAA;AArHG,IAAAM,gBAAM,GAAgBN,OAAA;AAwBtB,IAAAN,aAAS,gBAEd;AAEA,SAAMD,aAAWA,CAAAc,IAAA,EAASC,QAAS;EACnC;IAAAC,OAAQ;IAAMC,OAAA;IAAAC,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|
22
22
|
}), mod);
|
|
23
23
|
var edgeStyle_exports = {};
|
|
24
24
|
__export(edgeStyle_exports, {
|
|
25
|
+
controlEdgeWeight: () => controlEdgeWeight,
|
|
25
26
|
dashAnimation: () => dashAnimation,
|
|
26
27
|
edgeAppearances: () => edgeAppearances,
|
|
28
|
+
edgeArrowhead: () => edgeArrowhead,
|
|
29
|
+
edgeArrowheadLength: () => edgeArrowheadLength,
|
|
27
30
|
edgeMarkerEnd: () => edgeMarkerEnd,
|
|
28
31
|
edgeStrokeWidth: () => edgeStrokeWidth,
|
|
29
32
|
edgeStrokeWidths: () => edgeStrokeWidths,
|
|
@@ -35,34 +38,40 @@ const edgeAppearances = {
|
|
|
35
38
|
flow: {
|
|
36
39
|
path: "smoothstep",
|
|
37
40
|
stroke: "$color9",
|
|
38
|
-
marker: "arrowclosed"
|
|
41
|
+
marker: "arrowclosed",
|
|
42
|
+
weight: "control"
|
|
39
43
|
},
|
|
40
44
|
data: {
|
|
41
45
|
path: "bezier",
|
|
42
46
|
stroke: "$color8",
|
|
43
|
-
marker: "arrow"
|
|
47
|
+
marker: "arrow",
|
|
48
|
+
weight: "value"
|
|
44
49
|
},
|
|
45
50
|
error: {
|
|
46
51
|
path: "smoothstep",
|
|
47
52
|
stroke: "$red9",
|
|
48
53
|
dash: "6 4",
|
|
49
|
-
marker: "arrowclosed"
|
|
54
|
+
marker: "arrowclosed",
|
|
55
|
+
weight: "control"
|
|
50
56
|
},
|
|
51
57
|
conditional: {
|
|
52
58
|
path: "step",
|
|
53
59
|
stroke: "$color8",
|
|
54
60
|
dash: "2 4",
|
|
55
|
-
marker: "arrow"
|
|
61
|
+
marker: "arrow",
|
|
62
|
+
weight: "value"
|
|
56
63
|
}
|
|
57
64
|
};
|
|
65
|
+
const controlEdgeWeight = 1.5;
|
|
58
66
|
const edgeStrokeWidths = {
|
|
59
67
|
none: 1,
|
|
60
68
|
small: 1.5,
|
|
61
69
|
medium: 2,
|
|
62
70
|
large: 3
|
|
63
71
|
};
|
|
64
|
-
function edgeStrokeWidth(borderWidth) {
|
|
65
|
-
|
|
72
|
+
function edgeStrokeWidth(borderWidth, weight = "value") {
|
|
73
|
+
const base = edgeStrokeWidths[borderWidth];
|
|
74
|
+
return weight === "control" ? base * controlEdgeWeight : base;
|
|
66
75
|
}
|
|
67
76
|
const dashAnimation = "mp-graph-dash 0.5s linear infinite";
|
|
68
77
|
function isBuiltin(name) {
|
|
@@ -74,6 +83,22 @@ function edgeMarkerEnd(input) {
|
|
|
74
83
|
type: edgeAppearances[isBuiltin(named) ? named : "flow"].marker
|
|
75
84
|
};
|
|
76
85
|
}
|
|
86
|
+
const edgeArrowhead = {
|
|
87
|
+
viewBox: "-10 -10 20 20",
|
|
88
|
+
size: 12.5,
|
|
89
|
+
refX: 0,
|
|
90
|
+
refY: 0,
|
|
91
|
+
points: {
|
|
92
|
+
arrow: "-5,-4 0,0 -5,4",
|
|
93
|
+
arrowclosed: "-5,-4 0,0 -5,4 -5,-4"
|
|
94
|
+
}
|
|
95
|
+
};
|
|
96
|
+
function edgeArrowheadLength(strokeWidth) {
|
|
97
|
+
const xs = edgeArrowhead.points.arrowclosed.split(" ").map(pair => Number(pair.split(",")[0]));
|
|
98
|
+
const reach = Math.max(...xs) - Math.min(...xs);
|
|
99
|
+
const unitsPerViewBox = Number(edgeArrowhead.viewBox.split(" ")[2]);
|
|
100
|
+
return reach / unitsPerViewBox * edgeArrowhead.size * strokeWidth;
|
|
101
|
+
}
|
|
77
102
|
function themeTokenName(stroke) {
|
|
78
103
|
return stroke.startsWith("$") ? stroke.slice(1) : stroke;
|
|
79
104
|
}
|
|
@@ -83,7 +108,7 @@ function resolveEdgeStyle(input) {
|
|
|
83
108
|
return {
|
|
84
109
|
path: appearance.path,
|
|
85
110
|
stroke: appearance.stroke,
|
|
86
|
-
strokeWidth: edgeStrokeWidth(input.borderWidth),
|
|
111
|
+
strokeWidth: edgeStrokeWidth(input.borderWidth, appearance.weight),
|
|
87
112
|
strokeDasharray: appearance.dash,
|
|
88
113
|
marker: appearance.marker,
|
|
89
114
|
// Stopping the march is not the same as erasing the dashes: the PATTERN is
|
|
@@ -24,8 +24,11 @@ var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
|
24
24
|
}), mod);
|
|
25
25
|
var edgeStyle_exports = {};
|
|
26
26
|
__export(edgeStyle_exports, {
|
|
27
|
+
controlEdgeWeight: () => controlEdgeWeight,
|
|
27
28
|
dashAnimation: () => dashAnimation,
|
|
28
29
|
edgeAppearances: () => edgeAppearances,
|
|
30
|
+
edgeArrowhead: () => edgeArrowhead,
|
|
31
|
+
edgeArrowheadLength: () => edgeArrowheadLength,
|
|
29
32
|
edgeMarkerEnd: () => edgeMarkerEnd,
|
|
30
33
|
edgeStrokeWidth: () => edgeStrokeWidth,
|
|
31
34
|
edgeStrokeWidths: () => edgeStrokeWidths,
|
|
@@ -37,26 +40,31 @@ var edgeAppearances = {
|
|
|
37
40
|
flow: {
|
|
38
41
|
path: "smoothstep",
|
|
39
42
|
stroke: "$color9",
|
|
40
|
-
marker: "arrowclosed"
|
|
43
|
+
marker: "arrowclosed",
|
|
44
|
+
weight: "control"
|
|
41
45
|
},
|
|
42
46
|
data: {
|
|
43
47
|
path: "bezier",
|
|
44
48
|
stroke: "$color8",
|
|
45
|
-
marker: "arrow"
|
|
49
|
+
marker: "arrow",
|
|
50
|
+
weight: "value"
|
|
46
51
|
},
|
|
47
52
|
error: {
|
|
48
53
|
path: "smoothstep",
|
|
49
54
|
stroke: "$red9",
|
|
50
55
|
dash: "6 4",
|
|
51
|
-
marker: "arrowclosed"
|
|
56
|
+
marker: "arrowclosed",
|
|
57
|
+
weight: "control"
|
|
52
58
|
},
|
|
53
59
|
conditional: {
|
|
54
60
|
path: "step",
|
|
55
61
|
stroke: "$color8",
|
|
56
62
|
dash: "2 4",
|
|
57
|
-
marker: "arrow"
|
|
63
|
+
marker: "arrow",
|
|
64
|
+
weight: "value"
|
|
58
65
|
}
|
|
59
66
|
};
|
|
67
|
+
var controlEdgeWeight = 1.5;
|
|
60
68
|
var edgeStrokeWidths = {
|
|
61
69
|
none: 1,
|
|
62
70
|
small: 1.5,
|
|
@@ -64,7 +72,9 @@ var edgeStrokeWidths = {
|
|
|
64
72
|
large: 3
|
|
65
73
|
};
|
|
66
74
|
function edgeStrokeWidth(borderWidth) {
|
|
67
|
-
|
|
75
|
+
var weight = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : "value";
|
|
76
|
+
var base = edgeStrokeWidths[borderWidth];
|
|
77
|
+
return weight === "control" ? base * controlEdgeWeight : base;
|
|
68
78
|
}
|
|
69
79
|
var dashAnimation = "mp-graph-dash 0.5s linear infinite";
|
|
70
80
|
function isBuiltin(name) {
|
|
@@ -77,6 +87,24 @@ function edgeMarkerEnd(input) {
|
|
|
77
87
|
type: edgeAppearances[isBuiltin(named) ? named : "flow"].marker
|
|
78
88
|
};
|
|
79
89
|
}
|
|
90
|
+
var edgeArrowhead = {
|
|
91
|
+
viewBox: "-10 -10 20 20",
|
|
92
|
+
size: 12.5,
|
|
93
|
+
refX: 0,
|
|
94
|
+
refY: 0,
|
|
95
|
+
points: {
|
|
96
|
+
arrow: "-5,-4 0,0 -5,4",
|
|
97
|
+
arrowclosed: "-5,-4 0,0 -5,4 -5,-4"
|
|
98
|
+
}
|
|
99
|
+
};
|
|
100
|
+
function edgeArrowheadLength(strokeWidth) {
|
|
101
|
+
var xs = edgeArrowhead.points.arrowclosed.split(" ").map(function (pair) {
|
|
102
|
+
return Number(pair.split(",")[0]);
|
|
103
|
+
});
|
|
104
|
+
var reach = Math.max(...xs) - Math.min(...xs);
|
|
105
|
+
var unitsPerViewBox = Number(edgeArrowhead.viewBox.split(" ")[2]);
|
|
106
|
+
return reach / unitsPerViewBox * edgeArrowhead.size * strokeWidth;
|
|
107
|
+
}
|
|
80
108
|
function themeTokenName(stroke) {
|
|
81
109
|
return stroke.startsWith("$") ? stroke.slice(1) : stroke;
|
|
82
110
|
}
|
|
@@ -87,7 +115,7 @@ function resolveEdgeStyle(input) {
|
|
|
87
115
|
return {
|
|
88
116
|
path: appearance.path,
|
|
89
117
|
stroke: appearance.stroke,
|
|
90
|
-
strokeWidth: edgeStrokeWidth(input.borderWidth),
|
|
118
|
+
strokeWidth: edgeStrokeWidth(input.borderWidth, appearance.weight),
|
|
91
119
|
strokeDasharray: appearance.dash,
|
|
92
120
|
marker: appearance.marker,
|
|
93
121
|
// Stopping the march is not the same as erasing the dashes: the PATTERN is
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["__toCommonJS","mod","__copyProps","__defProp","value","edgeStyle_exports","__export","dashAnimation","edgeAppearances","edgeMarkerEnd","edgeStrokeWidth","edgeStrokeWidths","resolveEdgeStyle","themeTokenName","module","exports","flow","path","stroke","marker","data","error","dash","conditional","none","small","medium","large","borderWidth","isBuiltin","name","input","_input_appearance","named","appearance","kind"],"sources":["../../../src/edges/edgeStyle.ts"],"sourcesContent":[null],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,YAAA,GAAAC,GAAA,IAAAC,WAAA,CAAAC,SAAA;EAAAC,KAAA;AAAA,IAAAH,GAAA;AAAA,IAAAI,iBAAA;AAAAC,QAAA,CAAAD,iBAAA;EAAAE,aAAA,EAAAA,CAAA,KAAAA,aAAA;EAAAC,eAAA,EAAAA,CAAA,KAAAA,eAAA;EAAAC,aAAA,EAAAA,CAAA,KAAAA,aAAA;EAAAC,eAAA,EAAAA,CAAA,KAAAA,eAAA;EAAAC,gBAAA,EAAAA,CAAA,KAAAA,gBAAA;EAAAC,gBAAA,EAAAA,CAAA,KAAAA,gBAAA;EAAAC,cAAA,EAAAA,CAAA,KAAAA;AAAA;
|
|
1
|
+
{"version":3,"names":["__toCommonJS","mod","__copyProps","__defProp","value","edgeStyle_exports","__export","controlEdgeWeight","dashAnimation","edgeAppearances","edgeArrowhead","edgeArrowheadLength","edgeMarkerEnd","edgeStrokeWidth","edgeStrokeWidths","resolveEdgeStyle","themeTokenName","module","exports","flow","path","stroke","marker","weight","data","error","dash","conditional","none","small","medium","large","borderWidth","arguments","length","base","isBuiltin","name","input","_input_appearance","named","appearance","kind","type","viewBox","size","refX","refY","points","arrow","arrowclosed","strokeWidth","xs","split","map","pair","Number"],"sources":["../../../src/edges/edgeStyle.ts"],"sourcesContent":[null],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,YAAA,GAAAC,GAAA,IAAAC,WAAA,CAAAC,SAAA;EAAAC,KAAA;AAAA,IAAAH,GAAA;AAAA,IAAAI,iBAAA;AAAAC,QAAA,CAAAD,iBAAA;EAAAE,iBAAA,EAAAA,CAAA,KAAAA,iBAAA;EAAAC,aAAA,EAAAA,CAAA,KAAAA,aAAA;EAAAC,eAAA,EAAAA,CAAA,KAAAA,eAAA;EAAAC,aAAA,EAAAA,CAAA,KAAAA,aAAA;EAAAC,mBAAA,EAAAA,CAAA,KAAAA,mBAAA;EAAAC,aAAA,EAAAA,CAAA,KAAAA,aAAA;EAAAC,eAAA,EAAAA,CAAA,KAAAA,eAAA;EAAAC,gBAAA,EAAAA,CAAA,KAAAA,gBAAA;EAAAC,gBAAA,EAAAA,CAAA,KAAAA,gBAAA;EAAAC,cAAA,EAAAA,CAAA,KAAAA;AAAA;AAmCOC,MAAM,CAAAC,OAAA,GAAAlB,YAAqE,CAAAK,iBAAA;AAAA,IAChFI,eAAc;EACdU,IAAA,EAAM;IACNC,IAAA,EAAO;IACLC,MAAM;IACNC,MAAA,EAAQ;IACRC,MAAM;EAAA;EACEC,IACR;IACFJ,IAAA;IACAC,MAAA,WAAe;IACjBC,MAAA;IAOOC,MAAM;EAWN;EACLE,KAAA,EAAM;IACNL,IAAA,EAAO;IACPC,MAAQ;IACRK,IAAA,EAAO;IACTJ,MAAA;IAEOC,MAAS;EACd;EACAI,WAAO;IACTP,IAAA;IAGOC,MAAM;IAEbK,IAAA,EAAS;IACPJ,MAAO,SAAQ;IACjBC,MAAA;EAWO;AAGL;AACA,IAAAhB,iBAAe;AACjB,IAAAO,gBAAA;EAWOc,IAAM;EACXC,KAAA,KAAS;EACTC,MAAM;EACNC,KAAA,EAAM;AAAA;AACA,SACNlB,eAAQA,CAAAmB,WAAA;EAAA,IACNT,MAAO,GAAAU,SAAA,CAAAC,MAAA,QAAAD,SAAA,iBAAAA,SAAA;EAAA,IACPE,IAAA,GAAArB,gBAAa,CAAAkB,WAAA;EACf,OAAAT,MAAA,iBAAAY,IAAA,GAAA5B,iBAAA,GAAA4B,IAAA;AACF;AASO,IAAA3B,aAAS,uCAAiD;AAC/D,SAAM4B,SAAKA,CAAAC,IAAA;EACX,OAAMA,IAAA,IAAQ5B,eAAc;AAC5B;AACA,SAAQG,aAAQA,CAAA0B,KAAA;EAClB,IAAAC,iBAAA;EAgBO,IAAAC,KAAS,IAAAD,iBAAuC,GAAAD,KAAA,CAAAG,UAAA,cAAAF,iBAAA,cAAAA,iBAAA,GAAAD,KAAA,CAAAI,IAAA;EACrD,OAAO;IACTC,IAAA,EAAAlC,eAAA,CAAA2B,SAAA,CAAAI,KAAA,IAAAA,KAAA,WAAAlB;EAYO;AACL;AAGA,IAAAZ,aAAM;EACNkC,OAAO;EAAAC,IACL,MAAM;EAAWC,IACjB;EAAmBC,IACnB;EAAiEC,MACjE;IACAC,KAAA,kBAAmB;IAAAC,WAAA;EAAA;AAAA;AAAA,SAInBvC,mBAAsBA,CAAAwC,WAAS;EACjC,IAAAC,EAAA,GAAA1C,aAAA,CAAAsC,MAAA,CAAAE,WAAA,CAAAG,KAAA,MAAAC,GAAA,WAAAC,IAAA;IACF,OAAAC,MAAA,CAAAD,IAAA,CAAAF,KAAA","ignoreList":[]}
|
|
@@ -30,7 +30,6 @@ var import_react = require("react");
|
|
|
30
30
|
var import_graphKnobs = require("../knobs/graphKnobs.cjs");
|
|
31
31
|
var import_tamagui = require("tamagui");
|
|
32
32
|
var import_xy = require("../react-flow/xy.cjs");
|
|
33
|
-
var import_handleGeometry = require("./handleGeometry.cjs");
|
|
34
33
|
var import_lod = require("./lod.cjs");
|
|
35
34
|
var import_nodeMeasure = require("./nodeMeasure.cjs");
|
|
36
35
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
@@ -72,7 +71,7 @@ function GraphNode({
|
|
|
72
71
|
const portSpacingPx = (0, import_nodeMeasure.portSpacing)({
|
|
73
72
|
coarsePointer
|
|
74
73
|
});
|
|
75
|
-
const
|
|
74
|
+
const framePaddingPx = (0, import_theme.panelPaddingPx)();
|
|
76
75
|
const width = (0, import_nodeMeasure.graphNodeWidth)({
|
|
77
76
|
size,
|
|
78
77
|
measure
|
|
@@ -143,12 +142,23 @@ function GraphNode({
|
|
|
143
142
|
justifyContent: port.side === "right" ? "flex-end" : "flex-start",
|
|
144
143
|
position: "relative",
|
|
145
144
|
overflow: "visible",
|
|
146
|
-
children: [renderPort
|
|
145
|
+
children: [renderPort && (port.side === "top" || port.side === "bottom") ? renderPort(port) : null, renderPort && (port.side === "left" || port.side === "right") ? /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_tamagui.View, {
|
|
146
|
+
"data-graph-node-port-anchor": port.side,
|
|
147
|
+
position: "absolute",
|
|
148
|
+
top: 0,
|
|
149
|
+
bottom: 0,
|
|
150
|
+
width: 0,
|
|
151
|
+
...(port.side === "right" ? {
|
|
152
|
+
right: -framePaddingPx
|
|
153
|
+
} : {
|
|
154
|
+
left: -framePaddingPx
|
|
155
|
+
}),
|
|
156
|
+
overflow: "visible",
|
|
157
|
+
children: renderPort(port)
|
|
158
|
+
}) : null, /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_tamagui.SizableText, {
|
|
147
159
|
...knobProps.body,
|
|
148
160
|
...knobProps.label,
|
|
149
161
|
numberOfLines: 1,
|
|
150
|
-
paddingLeft: port.side === "right" ? 0 : portGutterPx,
|
|
151
|
-
paddingRight: port.side === "right" ? portGutterPx : 0,
|
|
152
162
|
children: port.label ?? port.id
|
|
153
163
|
})]
|
|
154
164
|
}, port.id))
|
|
@@ -33,7 +33,6 @@ var import_react = require("react");
|
|
|
33
33
|
var import_graphKnobs = require("../knobs/graphKnobs.native.js");
|
|
34
34
|
var import_tamagui = require("tamagui");
|
|
35
35
|
var import_xy = require("../react-flow/xy.native.js");
|
|
36
|
-
var import_handleGeometry = require("./handleGeometry.native.js");
|
|
37
36
|
var import_lod = require("./lod.native.js");
|
|
38
37
|
var import_nodeMeasure = require("./nodeMeasure.native.js");
|
|
39
38
|
function usePortInternals(id, ports) {
|
|
@@ -75,7 +74,7 @@ function GraphNode(param) {
|
|
|
75
74
|
var portSpacingPx = (0, import_nodeMeasure.portSpacing)({
|
|
76
75
|
coarsePointer
|
|
77
76
|
});
|
|
78
|
-
var
|
|
77
|
+
var framePaddingPx = (0, import_theme.panelPaddingPx)();
|
|
79
78
|
var width = (0, import_nodeMeasure.graphNodeWidth)({
|
|
80
79
|
size,
|
|
81
80
|
measure
|
|
@@ -178,12 +177,23 @@ function GraphNode(param) {
|
|
|
178
177
|
position: "relative",
|
|
179
178
|
// The row is where the port's painted disc overhangs the frame.
|
|
180
179
|
overflow: "visible",
|
|
181
|
-
children: [renderPort ===
|
|
180
|
+
children: [renderPort && (port.side === "top" || port.side === "bottom") ? renderPort(port) : null, renderPort && (port.side === "left" || port.side === "right") ? /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_tamagui.View, {
|
|
181
|
+
"data-graph-node-port-anchor": port.side,
|
|
182
|
+
position: "absolute",
|
|
183
|
+
top: 0,
|
|
184
|
+
bottom: 0,
|
|
185
|
+
width: 0,
|
|
186
|
+
...(port.side === "right" ? {
|
|
187
|
+
right: -framePaddingPx
|
|
188
|
+
} : {
|
|
189
|
+
left: -framePaddingPx
|
|
190
|
+
}),
|
|
191
|
+
overflow: "visible",
|
|
192
|
+
children: renderPort(port)
|
|
193
|
+
}) : null, /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_tamagui.SizableText, {
|
|
182
194
|
...knobProps.body,
|
|
183
195
|
...knobProps.label,
|
|
184
196
|
numberOfLines: 1,
|
|
185
|
-
paddingLeft: port.side === "right" ? 0 : portGutterPx,
|
|
186
|
-
paddingRight: port.side === "right" ? portGutterPx : 0,
|
|
187
197
|
children: (_port_label = port.label) !== null && _port_label !== void 0 ? _port_label : port.id
|
|
188
198
|
})]
|
|
189
199
|
}, port.id);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["__toCommonJS","mod","__copyProps","__defProp","value","GraphNode_exports","__export","GraphNode","module","exports","import_jsx_runtime","require","import_theme","import_react","import_graphKnobs","import_tamagui","import_xy","
|
|
1
|
+
{"version":3,"names":["__toCommonJS","mod","__copyProps","__defProp","value","GraphNode_exports","__export","GraphNode","module","exports","import_jsx_runtime","require","import_theme","import_react","import_graphKnobs","import_tamagui","import_xy","import_lod","import_nodeMeasure","usePortInternals","id","ports","updateNodeInternals","useUpdateNodeInternals","first","useRef","useEffect","current","param","title","subtitle","intent","selected","dragging","measure","renderMode","coarsePointer","renderPort","children","knobProps","control","useGraphNodeKnobs","size","graphNodeSize","sizeToken","portSpacingPx","portSpacing","framePaddingPx","panelPaddingPx","width","graphNodeWidth","minHeight","graphNodeMinHeight","radiusPx","containerRadiusPx","containerRadius","borderRadius","overview","isOverview","fade","detailOpacity","jsxs","YStack","String","surface","panelPadding","gap","elevationChrome","hoverStyle","hoverKnobProps","pressStyle","pressKnobProps","focusVisibleStyle","focusVisibleKnobProps","position","overflow","opacity","transitionProps","motion","XStack","alignItems","justifyContent","jsx","SizableText","label","numberOfLines","body","length","pointerEvents","map","port","_port_label"],"sources":["../../../src/nodes/GraphNode.tsx"],"sourcesContent":[null],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,YAAA,GAAAC,GAAA,IAAAC,WAAA,CAAAC,SAAA;EAAAC,KAAA;AAAA,IAAAH,GAAA;AAAA,IAAAI,iBAAA;AAAAC,QAAA,CAAAD,iBAAA;EAAAE,SAAA,EAAAA,CAAA,KAAAA;AAAA;AAoBAC,MAAA,CAAAC,OAAA,GAAAT,YAA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CAAAgE,MAAA;MAAA,GAAAxC,SAIT,CAAA2B,GAAA;MAAmCc,UAElC,UAAM;MACLC,cAAC;MAAA3C,QAAA;MAAA;AAEgC;AACC;AACxB;AACG;AAC0C;AAM5C;AAEA;AAER;AAEG;AAEF;MAAC;MAAA,IAAA5B,kBAAA,CAAAwE,GAAA,EAAAnE,cAAA,CAAAoE,WAAA;QAAA,GAAA5C,SACC,CAAA6C,KAAA;QAAkCC,aAClC;QAAS,uBACJ;QAAA/C,QAAA,EACLT;MAAQ,IACDG,QAAA,kBACG,EAAS,EAAAtB,kBACL,CAAAwE,GAAA,EAAAnE,cACV,CAAE+C,MAAM,EAAC;QAAe,0BACnB;MAAA;IAEO,IAEhBhC,QAAA,kBACJ,IAAApB,kBAAA,CAAAwE,GAAA,EAAAnE,cAAC,CAAAoE,WAAA;MAED,GAAA5C,SAAA,CAAA+C,IAAA;MAAA,GAAA/C,SAAA,CAAA6C,KAAA;MAAAC,aAnCU;MAAA;MAqCb;MACH;MAUDT,OAAA,MACC,GAAAjB,IAAA;MAAArB,QAAC,EAAAR;IAAA,YAAAT,KACC,aAAAA,KAAA,UAAyB,aAAAA,KAAA,CAAAkE,MAAA,uBAAA7E,kBAAA,CAAAwE,GAAA,EAAAnE,cAAA,CAAA+C,MAAA;MAAA,uBAChB;MAAAI,GAAA,EACT;MAAmCU,OAElC,EAAAjB,IAAA;MAAA;MACH;MACE;MAAA6B,aAAA,EAAA/B,QAAA;MACNnB,QAAA,EAAAjB,KAAA,CAAAoE,GAAA,WAAAC,IAAA;QAEJ,IAAAC,WAAA","ignoreList":[]}
|
|
@@ -29,7 +29,6 @@ __export(flowAdapter_exports, {
|
|
|
29
29
|
module.exports = __toCommonJS(flowAdapter_exports);
|
|
30
30
|
var import_model = require("../model/index.cjs");
|
|
31
31
|
var import_GraphEdge = require("../edges/GraphEdge.cjs");
|
|
32
|
-
var import_edgeStyle = require("../edges/edgeStyle.cjs");
|
|
33
32
|
var import_nodeMeasure = require("../nodes/nodeMeasure.cjs");
|
|
34
33
|
function toFlowNodes(document, schema, options) {
|
|
35
34
|
return document.nodes.map(node => flowNode(node, schema, options));
|
|
@@ -89,10 +88,6 @@ function flowEdge(edge, schema) {
|
|
|
89
88
|
sourceHandle: edge.source.port,
|
|
90
89
|
target: edge.target.node,
|
|
91
90
|
targetHandle: edge.target.port,
|
|
92
|
-
markerEnd: (0, import_edgeStyle.edgeMarkerEnd)({
|
|
93
|
-
kind: edge.kind,
|
|
94
|
-
appearance
|
|
95
|
-
}),
|
|
96
91
|
data: {
|
|
97
92
|
kind: edge.kind,
|
|
98
93
|
appearance,
|
|
@@ -31,7 +31,6 @@ __export(flowAdapter_exports, {
|
|
|
31
31
|
module.exports = __toCommonJS(flowAdapter_exports);
|
|
32
32
|
var import_model = require("../model/index.native.js");
|
|
33
33
|
var import_GraphEdge = require("../edges/GraphEdge.native.js");
|
|
34
|
-
var import_edgeStyle = require("../edges/edgeStyle.native.js");
|
|
35
34
|
var import_nodeMeasure = require("../nodes/nodeMeasure.native.js");
|
|
36
35
|
function toFlowNodes(document, schema, options) {
|
|
37
36
|
return document.nodes.map(function (node) {
|
|
@@ -96,10 +95,6 @@ function flowEdge(edge, schema) {
|
|
|
96
95
|
sourceHandle: edge.source.port,
|
|
97
96
|
target: edge.target.node,
|
|
98
97
|
targetHandle: edge.target.port,
|
|
99
|
-
markerEnd: (0, import_edgeStyle.edgeMarkerEnd)({
|
|
100
|
-
kind: edge.kind,
|
|
101
|
-
appearance
|
|
102
|
-
}),
|
|
103
98
|
data: {
|
|
104
99
|
kind: edge.kind,
|
|
105
100
|
appearance,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["__toCommonJS","mod","__copyProps","__defProp","value","flowAdapter_exports","__export","preserveFlowState","toFlowEdges","toFlowNodes","module","exports","import_model","require","import_GraphEdge","
|
|
1
|
+
{"version":3,"names":["__toCommonJS","mod","__copyProps","__defProp","value","flowAdapter_exports","__export","preserveFlowState","toFlowEdges","toFlowNodes","module","exports","import_model","require","import_GraphEdge","import_nodeMeasure","document","schema","options","nodes","map","node","flowNode","_node_size","_node_size1","spec","nodeKindSpec","kind","ports","resolvePorts","measured","graphNodeMeasure","size","portSpacingPx","measure","id","type","nodeType","position","initialWidth","width","initialHeight","minHeight","height","parentId","parent","draggable","locked","data","intent","edges","edge","flowEdge","appearance","graphEdgeType","source","sourceHandle","port","target","targetHandle","label","next","previous","length","before","Map"],"sources":["../../../src/react-flow/flowAdapter.ts"],"sourcesContent":[null],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,YAAA,GAAAC,GAAA,IAAAC,WAAA,CAAAC,SAAA;EAAAC,KAAA;AAAA,IAAAH,GAAA;AAAA,IAAAI,mBAAA;AAAAC,QAAA,CAAAD,mBAAA;EAAAE,iBAAA,EAAAA,CAAA,KAAAA,iBAAA;EAAAC,WAAA,EAAAA,CAAA,KAAAA,WAAA;EAAAC,WAAA,EAAAA,CAAA,KAAAA;AAAA;AAyBAC,MAAA,CAAAC,OAAA,GAAAX,YAA2C,CAAAK,mBAAA;AAC3C,IAAAO,YAAA,GAAAC,OAA8B;AAE9B,IAAAC,gBAAA,GAAAD,OAAiC;AA+B1B,IAAAE,kBACL,GAAAF,OACA,iCAE2B;AAC3B,SAAOJ,WAASA,CAAAO,QAAW,EAAAC,MAAA,EAASC,OAAA,EAAS;EAC/C,OAAAF,QAAA,CAAAG,KAAA,CAAAC,GAAA,WAAAC,IAAA;IAEA,OAASC,QACP,CAAAD,IACA,EAAAJ,MACA,EAAAC,OACyB;EACzB;AACA;AACA,SAAMI,SAAAD,IAAA,EAAWJ,MAAA,EAAAC,OAAA;EAAiB,IAChCK,UAAM,EAAQC,WAAA;EAAA,IAAAC,IAAA,OAAAb,YAAA,CAAAc,YAAA,EAAAT,MAAA,EAAAI,IAAA,CAAAM,IAAA;EAAA,IAAAC,KAAA,OAAAhB,YAAA,CAAAiB,YAAA,EAAAZ,MAAA,EAAAI,IAAA;EAAA,IAGdS,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IACNQ,IAAA,GAAQR,MAAK,CAAAiC,KAAO,CAAAC,IAAA,CAAAxB,IAAA;EAAA,IACpB0B,UAAA,GAAc5B,IAAK,SAAO,IAAAA,IAAA,uBAAAA,IAAA,CAAA4B,UAAA;EAAA,OAC1B;IACAlB,EAAA,EAAAgB,IAAA,CAAAhB,EAAA;IACA;IACFC,IAAA,EAAAtB,gBAAA,CAAAwC,aAAA;IACFC,MAAA,EAAAJ,IAAA,CAAAI,MAAA,CAAAlC,IAAA;IASOmC,YAAS,EAAAL,IAAA,CAAAI,MACd,CAAAE,IACA;IAEAC,MAAI,EAAAP,IAAS,CAAAO,MAAA,CAAArC,IAAc;IAC3BsC,YAAM,EAASR,IAAI,CAAAO,MAAI,CAAAD,IAAS;IAChCT,IAAA,EAAO;MACLrB,IAAM,EAAAwB,IAAA,CAAAxB,IAAQ;MACd0B,UAAY;MACZO,KAAO,EAAAT,IAAA,CAAAS;IAAA;EACF;AACa;AACA,SAAArD,kBAAAsD,IAAA,EAAAC,QAAA;EAAA,IAAAA,QAAA,CAAAC,MAAA,eAAAF,IAAA;EAAA,IAAAG,MAAA,OAAAC,GAAA,CAAAH,QAAA,CAAA1C,GAAA,WAAAC,IAAA;IAAA,OAIhB,CACAA,IAAA,CAAAc,EAAA,EACAd,IAAA,CACF;EACF,CAAC;EACH,OAAAwC,IAAA,CAAAzC,GAAA,WAAAC,IAAA","ignoreList":[]}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { usePresetContext, useResolvedKnobs } from "@multiplatform.one/theme";
|
|
2
2
|
import { defaultKnobs } from "@multiplatform.one/theme";
|
|
3
|
-
import { memo } from "react";
|
|
3
|
+
import { memo, useId } from "react";
|
|
4
4
|
import { SizableText, useTheme, View } from "tamagui";
|
|
5
5
|
import { BaseEdge, EdgeLabelRenderer, getBezierPath, getSmoothStepPath, getStraightPath } from "../react-flow/xy.mjs";
|
|
6
|
-
import { resolveEdgeStyle, themeTokenName } from "./edgeStyle.mjs";
|
|
6
|
+
import { edgeArrowhead, resolveEdgeStyle, themeTokenName } from "./edgeStyle.mjs";
|
|
7
7
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
8
8
|
const graphEdgeType = "mpGraphEdge";
|
|
9
9
|
function buildEdgePath(path, geometry) {
|
|
@@ -86,11 +86,36 @@ function GraphEdgeComponent(props) {
|
|
|
86
86
|
const strokeValue = useStrokeValue(style.stroke);
|
|
87
87
|
const [d, labelX, labelY] = buildEdgePath(style.path, props);
|
|
88
88
|
const label = data.label ?? (typeof props.label === "string" ? props.label : void 0);
|
|
89
|
+
const markerId = `mp-graph-arrow-${useId().replace(/[^a-zA-Z0-9_-]/g, "")}`;
|
|
90
|
+
const ownMarker = props.markerEnd === void 0;
|
|
89
91
|
return /* @__PURE__ */jsxs(Fragment, {
|
|
90
|
-
children: [/* @__PURE__ */jsx(
|
|
92
|
+
children: [ownMarker ? /* @__PURE__ */jsx("defs", {
|
|
93
|
+
children: /* @__PURE__ */jsx("marker", {
|
|
94
|
+
id: markerId,
|
|
95
|
+
className: "mp-graph-arrowhead",
|
|
96
|
+
"data-graph-edge-marker": style.marker,
|
|
97
|
+
viewBox: edgeArrowhead.viewBox,
|
|
98
|
+
markerWidth: edgeArrowhead.size,
|
|
99
|
+
markerHeight: edgeArrowhead.size,
|
|
100
|
+
markerUnits: "strokeWidth",
|
|
101
|
+
orient: "auto-start-reverse",
|
|
102
|
+
refX: edgeArrowhead.refX,
|
|
103
|
+
refY: edgeArrowhead.refY,
|
|
104
|
+
children: /* @__PURE__ */jsx("polyline", {
|
|
105
|
+
points: edgeArrowhead.points[style.marker],
|
|
106
|
+
strokeLinecap: "round",
|
|
107
|
+
strokeLinejoin: "round",
|
|
108
|
+
style: {
|
|
109
|
+
stroke: `var(--mp-graph-edge-stroke, ${strokeValue})`,
|
|
110
|
+
strokeWidth: 1,
|
|
111
|
+
fill: style.marker === "arrowclosed" ? `var(--mp-graph-edge-stroke, ${strokeValue})` : "none"
|
|
112
|
+
}
|
|
113
|
+
})
|
|
114
|
+
})
|
|
115
|
+
}) : null, /* @__PURE__ */jsx(BaseEdge, {
|
|
91
116
|
id: props.id,
|
|
92
117
|
path: d,
|
|
93
|
-
markerEnd: props.markerEnd,
|
|
118
|
+
markerEnd: ownMarker ? `url(#${markerId})` : props.markerEnd,
|
|
94
119
|
style: {
|
|
95
120
|
stroke: `var(--mp-graph-edge-stroke, ${strokeValue})`,
|
|
96
121
|
strokeWidth: style.strokeWidth,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["usePresetContext","useResolvedKnobs","defaultKnobs","memo","SizableText","useTheme","View","BaseEdge","EdgeLabelRenderer","getBezierPath","getSmoothStepPath","getStraightPath","resolveEdgeStyle","themeTokenName","Fragment","jsx","jsxs","graphEdgeType","buildEdgePath","path","geometry","sourceX","sourceY","targetX","targetY","sourcePosition","targetPosition","d","labelX","labelY","borderRadius","useEdgeKnobs","preset","knobs","overrides","borderWidth","animation","useStrokeValue","stroke","theme","entry","value","get","GraphEdgeComponent","props","data","style","kind","appearance","strokeValue","label","children","id","
|
|
1
|
+
{"version":3,"names":["usePresetContext","useResolvedKnobs","defaultKnobs","memo","useId","SizableText","useTheme","View","BaseEdge","EdgeLabelRenderer","getBezierPath","getSmoothStepPath","getStraightPath","edgeArrowhead","resolveEdgeStyle","themeTokenName","Fragment","jsx","jsxs","graphEdgeType","buildEdgePath","path","geometry","sourceX","sourceY","targetX","targetY","sourcePosition","targetPosition","d","labelX","labelY","borderRadius","useEdgeKnobs","preset","knobs","overrides","borderWidth","animation","useStrokeValue","stroke","theme","entry","value","get","GraphEdgeComponent","props","data","style","kind","appearance","strokeValue","label","markerId","replace","ownMarker","markerEnd","children","id","className","marker","viewBox","markerWidth","size","markerHeight","markerUnits","orient","refX","refY","points","strokeLinecap","strokeLinejoin","strokeWidth","fill","strokeDasharray","EdgeLabel","x","y","knobProps","component","position","transform","pointerEvents","surface","borderRadiusNested","panelPadding","body","GraphEdge","graphEdgeTypes"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