@knotx/render 0.2.12 → 0.2.14

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.cjs CHANGED
@@ -71,7 +71,8 @@ function BaseEdge({
71
71
  const markerEndUrl = getMarkerUrl(markerEnd);
72
72
  const markerStartUrl = getMarkerUrl(markerStart);
73
73
  const childrenStyle = {
74
- transform: `translate(${-sourceX}px, ${-sourceY}px)`
74
+ transform: `translate(${-sourceX}px, ${-sourceY}px)`,
75
+ pointerEvents: "stroke"
75
76
  };
76
77
  return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
77
78
  /* @__PURE__ */ jsxRuntime.jsxs(
@@ -88,8 +89,10 @@ function BaseEdge({
88
89
  stroke: "currentColor"
89
90
  }, style)
90
91
  }, edge ? {
92
+ "data-edge-id": edge.id,
91
93
  "data-edge-source": edge.source,
92
- "data-edge-target": edge.target
94
+ "data-edge-target": edge.target,
95
+ "data-edge-position": `${sourceX},${sourceY},${targetX},${targetY}`
93
96
  } : {}), {
94
97
  children: [
95
98
  Boolean(markerEnd || markerStart) && /* @__PURE__ */ jsxRuntime.jsxs("defs", { children: [
package/dist/index.js CHANGED
@@ -55,7 +55,8 @@ function BaseEdge({
55
55
  const markerEndUrl = getMarkerUrl(markerEnd);
56
56
  const markerStartUrl = getMarkerUrl(markerStart);
57
57
  const childrenStyle = {
58
- transform: `translate(${-sourceX}px, ${-sourceY}px)`
58
+ transform: `translate(${-sourceX}px, ${-sourceY}px)`,
59
+ pointerEvents: "stroke"
59
60
  };
60
61
  return /* @__PURE__ */ jsxs(Fragment, { children: [
61
62
  /* @__PURE__ */ jsxs(
@@ -72,8 +73,10 @@ function BaseEdge({
72
73
  stroke: "currentColor"
73
74
  }, style)
74
75
  }, edge ? {
76
+ "data-edge-id": edge.id,
75
77
  "data-edge-source": edge.source,
76
- "data-edge-target": edge.target
78
+ "data-edge-target": edge.target,
79
+ "data-edge-position": `${sourceX},${sourceY},${targetX},${targetY}`
77
80
  } : {}), {
78
81
  children: [
79
82
  Boolean(markerEnd || markerStart) && /* @__PURE__ */ jsxs("defs", { children: [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@knotx/render",
3
- "version": "0.2.12",
3
+ "version": "0.2.14",
4
4
  "description": "Render for Knotx",
5
5
  "author": "boenfu",
6
6
  "license": "MIT",
@@ -28,18 +28,18 @@
28
28
  "dist"
29
29
  ],
30
30
  "peerDependencies": {
31
- "@knotx/jsx": "0.2.11"
31
+ "@knotx/jsx": "0.2.13"
32
32
  },
33
33
  "dependencies": {
34
34
  "bezier-js": "^6.1.4",
35
- "@knotx/core": "0.2.12"
35
+ "@knotx/core": "0.2.14"
36
36
  },
37
37
  "devDependencies": {
38
38
  "@types/bezier-js": "^4.1.3",
39
- "@knotx/build-config": "0.2.11",
40
- "@knotx/eslint-config": "0.2.11",
41
- "@knotx/jsx": "0.2.11",
42
- "@knotx/typescript-config": "0.2.11"
39
+ "@knotx/build-config": "0.2.13",
40
+ "@knotx/eslint-config": "0.2.13",
41
+ "@knotx/jsx": "0.2.13",
42
+ "@knotx/typescript-config": "0.2.13"
43
43
  },
44
44
  "scripts": {
45
45
  "build": "unbuild",