@knotx/render 0.2.6 → 0.2.8

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
@@ -70,6 +70,9 @@ function BaseEdge({
70
70
  };
71
71
  const markerEndUrl = getMarkerUrl(markerEnd);
72
72
  const markerStartUrl = getMarkerUrl(markerStart);
73
+ const childrenStyle = {
74
+ transform: `translate(${-sourceX}px, ${-sourceY}px)`
75
+ };
73
76
  return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
74
77
  /* @__PURE__ */ jsxRuntime.jsxs(
75
78
  "svg",
@@ -79,6 +82,7 @@ function BaseEdge({
79
82
  position: "absolute",
80
83
  left: 0,
81
84
  top: 0,
85
+ transform: `translate(${sourceX}px, ${sourceY}px)`,
82
86
  overflow: "visible",
83
87
  pointerEvents: "none",
84
88
  stroke: "currentColor"
@@ -175,6 +179,7 @@ function BaseEdge({
175
179
  /* @__PURE__ */ jsxRuntime.jsx(
176
180
  "path",
177
181
  {
182
+ style: childrenStyle,
178
183
  d: pathString,
179
184
  fill: "none",
180
185
  className: core.bem("edge", "path"),
@@ -185,6 +190,7 @@ function BaseEdge({
185
190
  interactionWidth && /* @__PURE__ */ jsxRuntime.jsx(
186
191
  "path",
187
192
  {
193
+ style: childrenStyle,
188
194
  d: pathString,
189
195
  fill: "none",
190
196
  strokeOpacity: 0,
package/dist/index.js CHANGED
@@ -54,6 +54,9 @@ function BaseEdge({
54
54
  };
55
55
  const markerEndUrl = getMarkerUrl(markerEnd);
56
56
  const markerStartUrl = getMarkerUrl(markerStart);
57
+ const childrenStyle = {
58
+ transform: `translate(${-sourceX}px, ${-sourceY}px)`
59
+ };
57
60
  return /* @__PURE__ */ jsxs(Fragment, { children: [
58
61
  /* @__PURE__ */ jsxs(
59
62
  "svg",
@@ -63,6 +66,7 @@ function BaseEdge({
63
66
  position: "absolute",
64
67
  left: 0,
65
68
  top: 0,
69
+ transform: `translate(${sourceX}px, ${sourceY}px)`,
66
70
  overflow: "visible",
67
71
  pointerEvents: "none",
68
72
  stroke: "currentColor"
@@ -159,6 +163,7 @@ function BaseEdge({
159
163
  /* @__PURE__ */ jsx(
160
164
  "path",
161
165
  {
166
+ style: childrenStyle,
162
167
  d: pathString,
163
168
  fill: "none",
164
169
  className: bem("edge", "path"),
@@ -169,6 +174,7 @@ function BaseEdge({
169
174
  interactionWidth && /* @__PURE__ */ jsx(
170
175
  "path",
171
176
  {
177
+ style: childrenStyle,
172
178
  d: pathString,
173
179
  fill: "none",
174
180
  strokeOpacity: 0,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@knotx/render",
3
- "version": "0.2.6",
3
+ "version": "0.2.8",
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.6"
31
+ "@knotx/jsx": "0.2.8"
32
32
  },
33
33
  "dependencies": {
34
34
  "bezier-js": "^6.1.4",
35
- "@knotx/core": "0.2.6"
35
+ "@knotx/core": "0.2.8"
36
36
  },
37
37
  "devDependencies": {
38
38
  "@types/bezier-js": "^4.1.3",
39
- "@knotx/build-config": "0.2.6",
40
- "@knotx/eslint-config": "0.2.6",
41
- "@knotx/jsx": "0.2.6",
42
- "@knotx/typescript-config": "0.2.6"
39
+ "@knotx/build-config": "0.2.8",
40
+ "@knotx/eslint-config": "0.2.8",
41
+ "@knotx/jsx": "0.2.8",
42
+ "@knotx/typescript-config": "0.2.8"
43
43
  },
44
44
  "scripts": {
45
45
  "build": "unbuild",