@bemedev/mind-flow 1.3.0 → 1.4.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/lib/server.cjs.js CHANGED
@@ -995,14 +995,14 @@ var DragBounds = () => {
995
995
  };
996
996
  //#endregion
997
997
  //#region src/ui/components/EdgeComponent.tsx
998
- var _tmpl$$10 = [
998
+ var _tmpl$$7 = [
999
999
  "<path",
1000
1000
  " class=\"",
1001
1001
  "\" style=\"",
1002
1002
  "\"",
1003
1003
  "></path>"
1004
1004
  ];
1005
- var _tmpl$2$5 = [
1005
+ var _tmpl$2$4 = [
1006
1006
  "<g",
1007
1007
  " cursor=\"pointer\" transform=\"",
1008
1008
  "\" style=\"",
@@ -1067,19 +1067,19 @@ var EdgeComponent = (props) => {
1067
1067
  get when() {
1068
1068
  return vector();
1069
1069
  },
1070
- children: (v) => [(0, solid_js_web.ssr)(_tmpl$$10, (0, solid_js_web.ssrHydrationKey)(), `relative cursor-pointer fill-transparent ${!!props.isNew ? "stroke-[rgba(168,168,168,0.4)] stroke-3 z-200" : ""} ${selected() && !props.isNew ? "stroke-[rgba(168,168,168,1)] stroke-4 z-100" : ""} ${!selected() && !props.isNew ? "stroke-[rgba(168,168,168,0.8)] stroke-3" : ""}`, (0, solid_js_web.ssrStyleProperty)("pointer-events:", props.isNew ? "none" : "all"), (0, solid_js_web.ssrAttribute)("d", (0, solid_js_web.escape)(draw(v()), true), false)), (0, solid_js_web.createComponent)(solid_js.Show, {
1070
+ children: (v) => [(0, solid_js_web.ssr)(_tmpl$$7, (0, solid_js_web.ssrHydrationKey)(), `relative cursor-pointer fill-transparent ${!!props.isNew ? "stroke-[rgba(168,168,168,0.4)] stroke-3 z-200" : ""} ${selected() && !props.isNew ? "stroke-[rgba(168,168,168,1)] stroke-4 z-100" : ""} ${!selected() && !props.isNew ? "stroke-[rgba(168,168,168,0.8)] stroke-3" : ""}`, (0, solid_js_web.ssrStyleProperty)("pointer-events:", props.isNew ? "none" : "all"), (0, solid_js_web.ssrAttribute)("d", (0, solid_js_web.escape)(draw(v()), true), false)), (0, solid_js_web.createComponent)(solid_js.Show, {
1071
1071
  get when() {
1072
1072
  return selected();
1073
1073
  },
1074
1074
  get children() {
1075
- return (0, solid_js_web.ssr)(_tmpl$2$5, (0, solid_js_web.ssrHydrationKey)(), `translate(${(0, solid_js_web.escape)(middlePoint().x, true)}, ${(0, solid_js_web.escape)(middlePoint().y, true)})`, (0, solid_js_web.ssrStyleProperty)("pointer-events:", "all") + (0, solid_js_web.ssrStyleProperty)(";z-index:", "30"));
1075
+ return (0, solid_js_web.ssr)(_tmpl$2$4, (0, solid_js_web.ssrHydrationKey)(), `translate(${(0, solid_js_web.escape)(middlePoint().x, true)}, ${(0, solid_js_web.escape)(middlePoint().y, true)})`, (0, solid_js_web.ssrStyleProperty)("pointer-events:", "all") + (0, solid_js_web.ssrStyleProperty)(";z-index:", "30"));
1076
1076
  }
1077
1077
  })]
1078
1078
  });
1079
1079
  };
1080
1080
  //#endregion
1081
1081
  //#region src/ui/components/EdgesBoard.tsx
1082
- var _tmpl$$9 = [
1082
+ var _tmpl$$6 = [
1083
1083
  "<svg",
1084
1084
  " class=\"pointer-events-none h-full w-full overflow-visible\"><!--$-->",
1085
1085
  "<!--/--><!--$-->",
@@ -1100,7 +1100,7 @@ var EdgesBoard = () => {
1100
1100
  selector: ({ context }) => Object.keys(context.edgesPositions ?? {}),
1101
1101
  equals: (prev, next) => prev.length === next.length
1102
1102
  });
1103
- return (0, solid_js_web.ssr)(_tmpl$$9, (0, solid_js_web.ssrHydrationKey)(), (0, solid_js_web.escape)((0, solid_js_web.createComponent)(solid_js.Show, {
1103
+ return (0, solid_js_web.ssr)(_tmpl$$6, (0, solid_js_web.ssrHydrationKey)(), (0, solid_js_web.escape)((0, solid_js_web.createComponent)(solid_js.Show, {
1104
1104
  get when() {
1105
1105
  return hasNewEdge();
1106
1106
  },
@@ -1119,12 +1119,12 @@ var EdgesBoard = () => {
1119
1119
  };
1120
1120
  //#endregion
1121
1121
  //#region src/ui/components/NodeComponent.tsx
1122
- var _tmpl$$8 = [
1122
+ var _tmpl$$5 = [
1123
1123
  "<svg",
1124
1124
  " class=\"cursor-pointer overflow-visible rounded-full bg-green-500 p-0.5 text-center font-bold hover:bg-green-600\" style=\"",
1125
1125
  "\" viewBox=\"0 0 1024 1024\" preserveAspectRatio=\"xMaxYMax\" xmlns=\"http://www.w3.org/2000/svg\" fill=\"white\"><g id=\"background\"><path d=\"M467.40667,277.66696c-0.05948,-14.53055 5.75527,-22.95613 -8.62044,-20.90487c-112.55699,16.0607 -222.1609,112.14558 -245.06161,239.85765c-46.52056,259.43466 231.33083,443.06705 449.51209,316.97506c117.31668,-67.80002 160.95215,-190.43324 151.34416,-288.29849c-5.92276,-60.32819 -27.80273,-107.95668 -53.44246,-144.25469l59.39269,-42.05363c111.72214,156.309 73.11535,351.55635 -25.06953,459.45565c-184.18877,202.4124 -470.46624,145.52064 -592.95027,-32.92123c-156.18269,-227.53604 -27.15324,-543.64371 261.18883,-582.44416c5.0579,-0.68061 3.56556,-7.04079 3.56442,-8.58985c-0.05594,-76.3354 -0.11021,-76.7687 1.10909,-77.24589c2.06886,-0.80969 151.41433,118.4561 151.92482,118.95524c4.65592,4.55233 -0.99548,7.829 -29.07828,30.50907c-120.49369,97.31245 -120.4977,98.55675 -123.0691,97.87586c-0.43639,-0.11555 -0.80698,-0.31322 -0.74442,-66.91571Z\"></path><path d=\"M316.61562,611.03414c0.11517,-90.16257 -0.25516,-99.92912 0.64739,-101.78856c1.56486,-3.22393 131.99102,0.91032 134.6959,-1.89763c2.21336,-2.2977 -0.59362,-129.97807 1.1376,-132.37034c0.7253,-1.00225 11.10552,-0.99175 12.07474,-0.99077c104.50336,0.10564 104.90098,-0.37811 105.967,0.85765c1.56461,1.81373 0.25596,114.18436 0.67852,129.81412c0.1322,4.88975 3.22386,3.28152 99.72028,3.4563c33.0841,0.05992 36.14259,-1.40368 36.21852,4.50462c0.11713,9.11348 1.41954,110.45369 -0.40274,113.92715c-1.81106,3.45208 -130.39967,-0.42618 -134.48289,1.62075c-2.29035,1.14816 -0.36989,101.12392 -1.11542,130.51904c-0.09548,3.76459 -2.13506,3.20617 -47.84854,3.17365c-69.30253,-0.0493 -69.31099,-0.25627 -69.65762,-0.42191c-3.77927,-1.80595 0.16287,-129.33555 -2.24266,-132.58994c-1.79931,-2.43424 -124.06108,-0.29118 -132.80252,-0.97392c-3.81102,-0.29766 -2.58229,-14.8847 -2.58758,-16.8402Z\"></path></g></svg>"
1126
1126
  ];
1127
- var _tmpl$2$4 = [
1127
+ var _tmpl$2$3 = [
1128
1128
  "<div",
1129
1129
  " class=\"",
1130
1130
  "\" style=\"",
@@ -1134,17 +1134,15 @@ var _tmpl$2$4 = [
1134
1134
  "\"><path d=\"M12 4c-4.419 0-8 3.582-8 8s3.581 8 8 8 8-3.582 8-8-3.581-8-8-8zm3.707 10.293a.999.999 0 11-1.414 1.414L12 13.414l-2.293 2.293a.997.997 0 01-1.414 0 .999.999 0 010-1.414L10.586 12 8.293 9.707a.999.999 0 111.414-1.414L12 10.586l2.293-2.293a.999.999 0 111.414 1.414L13.414 12l2.293 2.293z\"></path></svg><!--$-->",
1135
1135
  "<!--/--><svg class=\"flex cursor-pointer items-center justify-center rounded-lg bg-blue-500 p-0.5 text-center font-bold text-white hover:bg-blue-600\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\" style=\"",
1136
1136
  "\"><path d=\"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z\"></path></svg></div><div>",
1137
- "</div><div id=\"inputs\" data-handle-type=\"input\"",
1138
- " class=\"pointer-events-none absolute top-0 z-10 flex cursor-default flex-col\" style=\"",
1137
+ "</div><div id=\"inputs\" class=\"pointer-events-none absolute top-0 z-10 flex cursor-default flex-col\" style=\"",
1139
1138
  "\"><div data-handle-type=\"input\"",
1140
- " class=\"cursor-default rounded-full bg-[#e38b29] shadow-md transition-transform\" style=\"",
1141
- "\"></div></div><div id=\"outputs\" data-handle-type=\"output\"",
1142
- " style=\"",
1139
+ " class=\"cursor-default rounded-full bg-[#e38b29] shadow-md transition-transform duration-150 ease-in-out hover:scale-150\" style=\"",
1140
+ "\"></div></div><div id=\"outputs\" style=\"",
1143
1141
  "\" class=\"pointer-events-none absolute top-0 z-10 flex flex-col\"><div data-handle-type=\"output\"",
1144
- " class=\"cursor-crosshair rounded-full bg-[#e38b29] shadow-md transition-transform\" style=\"",
1142
+ " class=\"cursor-crosshair rounded-full bg-[#e38b29] shadow-md transition-transform duration-150 ease-in-out hover:scale-150\" style=\"",
1145
1143
  "\"></div></div></div>"
1146
1144
  ];
1147
- var _tmpl$3$2 = [
1145
+ var _tmpl$3$1 = [
1148
1146
  "<div",
1149
1147
  " class=\"p-3 select-none\"><!--$-->",
1150
1148
  "<!--/--><!--$-->",
@@ -1201,19 +1199,19 @@ var NodeComponent = (props) => {
1201
1199
  if (!edges) return false;
1202
1200
  return edges.some(({ to }) => to === props.id);
1203
1201
  } });
1204
- return (0, solid_js_web.ssr)(_tmpl$2$4, (0, solid_js_web.ssrHydrationKey)(), `flex flex-col absolute cursor-grab bg-white rounded-md shadow-md select-none transition-[border,box-shadow] duration-200 ease-in-out hover:shadow-lg draggable ${selected() ? "border border-[#e38c29] z-100" : ""} ${!selected() ? "border border-[#e6d4be] z-1" : ""} group min-w-48`, (0, solid_js_web.ssrStyleProperty)("top:", `${(0, solid_js_web.escape)(node().y, true)}px`) + (0, solid_js_web.ssrStyleProperty)(";left:", `${(0, solid_js_web.escape)(node().x, true)}px`), (0, solid_js_web.ssrAttribute)("id", (0, solid_js_web.escape)(props.id, true), false), `pointer-events-none absolute flex items-center justify-end -top-7.5 right-0 transition-all duration-200 ease-in-out space-x-2 ${selected() ? "w-full opacity-100" : ""} ${!selected() ? "w-0 -right-3 opacity-0 overflow-hidden" : ""}`, (0, solid_js_web.ssrStyleProperty)("overflow:", "visible") + (0, solid_js_web.ssrStyleProperty)(";pointer-events:", "all") + (0, solid_js_web.ssrStyleProperty)(";width:", `${(0, solid_js_web.escape)(12, true) * 2}px`) + (0, solid_js_web.ssrStyleProperty)(";height:", `${(0, solid_js_web.escape)(12, true) * 2}px`), (0, solid_js_web.escape)((0, solid_js_web.createComponent)(solid_js.Show, {
1202
+ return (0, solid_js_web.ssr)(_tmpl$2$3, (0, solid_js_web.ssrHydrationKey)(), `flex flex-col absolute cursor-grab bg-white rounded-md shadow-md select-none transition-[border,box-shadow] duration-200 ease-in-out hover:shadow-lg draggable ${selected() ? "border border-[#e38c29] z-100" : ""} ${!selected() ? "border border-[#e6d4be] z-1" : ""} group min-w-48`, (0, solid_js_web.ssrStyleProperty)("top:", `${(0, solid_js_web.escape)(node().y, true)}px`) + (0, solid_js_web.ssrStyleProperty)(";left:", `${(0, solid_js_web.escape)(node().x, true)}px`), (0, solid_js_web.ssrAttribute)("id", (0, solid_js_web.escape)(props.id, true), false), `pointer-events-none absolute flex items-center justify-end -top-7.5 right-0 transition-all duration-200 ease-in-out space-x-2 ${selected() ? "w-full opacity-100" : ""} ${!selected() ? "w-0 -right-3 opacity-0 overflow-hidden" : ""}`, (0, solid_js_web.ssrStyleProperty)("overflow:", "visible") + (0, solid_js_web.ssrStyleProperty)(";pointer-events:", "all") + (0, solid_js_web.ssrStyleProperty)(";width:", `${(0, solid_js_web.escape)(12, true) * 2}px`) + (0, solid_js_web.ssrStyleProperty)(";height:", `${(0, solid_js_web.escape)(12, true) * 2}px`), (0, solid_js_web.escape)((0, solid_js_web.createComponent)(solid_js.Show, {
1205
1203
  get when() {
1206
1204
  return hasParent();
1207
1205
  },
1208
1206
  get children() {
1209
- return (0, solid_js_web.ssr)(_tmpl$$8, (0, solid_js_web.ssrHydrationKey)(), (0, solid_js_web.ssrStyleProperty)("pointer-events:", "all") + (0, solid_js_web.ssrStyleProperty)(";fill-rule:", "evenodd") + (0, solid_js_web.ssrStyleProperty)(";clip-rule:", "evenodd") + (0, solid_js_web.ssrStyleProperty)(";stroke-linejoin:", "round") + (0, solid_js_web.ssrStyleProperty)(";stroke-miterlimit:", "2") + (0, solid_js_web.ssrStyleProperty)(";width:", `${(0, solid_js_web.escape)(12, true) * 2}px`) + (0, solid_js_web.ssrStyleProperty)(";height:", `${(0, solid_js_web.escape)(12, true) * 2}px`));
1207
+ return (0, solid_js_web.ssr)(_tmpl$$5, (0, solid_js_web.ssrHydrationKey)(), (0, solid_js_web.ssrStyleProperty)("pointer-events:", "all") + (0, solid_js_web.ssrStyleProperty)(";fill-rule:", "evenodd") + (0, solid_js_web.ssrStyleProperty)(";clip-rule:", "evenodd") + (0, solid_js_web.ssrStyleProperty)(";stroke-linejoin:", "round") + (0, solid_js_web.ssrStyleProperty)(";stroke-miterlimit:", "2") + (0, solid_js_web.ssrStyleProperty)(";width:", `${(0, solid_js_web.escape)(12, true) * 2}px`) + (0, solid_js_web.ssrStyleProperty)(";height:", `${(0, solid_js_web.escape)(12, true) * 2}px`));
1210
1208
  }
1211
1209
  })), (0, solid_js_web.ssrStyleProperty)("pointer-events:", "all") + (0, solid_js_web.ssrStyleProperty)(";width:", `${(0, solid_js_web.escape)(12, true) * 2}px`) + (0, solid_js_web.ssrStyleProperty)(";height:", `${(0, solid_js_web.escape)(12, true) * 2}px`), (0, solid_js_web.escape)((0, solid_js_web.createComponent)(solid_js.Show, {
1212
1210
  get when() {
1213
1211
  return props.children;
1214
1212
  },
1215
1213
  get fallback() {
1216
- return (0, solid_js_web.ssr)(_tmpl$3$2, (0, solid_js_web.ssrHydrationKey)(), (0, solid_js_web.escape)((0, solid_js_web.createComponent)(solid_js.Show, {
1214
+ return (0, solid_js_web.ssr)(_tmpl$3$1, (0, solid_js_web.ssrHydrationKey)(), (0, solid_js_web.escape)((0, solid_js_web.createComponent)(solid_js.Show, {
1217
1215
  get when() {
1218
1216
  return node().data.label;
1219
1217
  },
@@ -1244,26 +1242,57 @@ var NodeComponent = (props) => {
1244
1242
  return props.children;
1245
1243
  } }, () => node().data));
1246
1244
  }
1247
- })), (0, solid_js_web.ssrAttribute)("data-node-id", (0, solid_js_web.escape)(props.id, true), false), (0, solid_js_web.ssrStyleProperty)("left:", `-${(0, solid_js_web.escape)(18, true)}px`), (0, solid_js_web.ssrAttribute)("data-node-id", (0, solid_js_web.escape)(props.id, true), false), (0, solid_js_web.ssrStyleProperty)("width:", `${(0, solid_js_web.escape)(12, true)}px`) + (0, solid_js_web.ssrStyleProperty)(";height:", `${(0, solid_js_web.escape)(12, true)}px`) + (0, solid_js_web.ssrStyleProperty)(";margin-top:", `${(0, solid_js_web.escape)(12, true)}px`) + (0, solid_js_web.ssrStyleProperty)(";pointer-events:", "all"), (0, solid_js_web.ssrAttribute)("data-node-id", (0, solid_js_web.escape)(props.id, true), false), (0, solid_js_web.ssrStyleProperty)("right:", `-${(0, solid_js_web.escape)(18, true)}px`), (0, solid_js_web.ssrAttribute)("data-node-id", (0, solid_js_web.escape)(props.id, true), false), (0, solid_js_web.ssrStyleProperty)("width:", `${(0, solid_js_web.escape)(12, true)}px`) + (0, solid_js_web.ssrStyleProperty)(";height:", `${(0, solid_js_web.escape)(12, true)}px`) + (0, solid_js_web.ssrStyleProperty)(";margin-top:", `${(0, solid_js_web.escape)(12, true)}px`) + (0, solid_js_web.ssrStyleProperty)(";pointer-events:", "all"));
1245
+ })), (0, solid_js_web.ssrStyleProperty)("left:", `-${(0, solid_js_web.escape)(18, true)}px`), (0, solid_js_web.ssrAttribute)("data-node-id", (0, solid_js_web.escape)(props.id, true), false), (0, solid_js_web.ssrStyleProperty)("width:", `${(0, solid_js_web.escape)(12, true)}px`) + (0, solid_js_web.ssrStyleProperty)(";height:", `${(0, solid_js_web.escape)(12, true)}px`) + (0, solid_js_web.ssrStyleProperty)(";margin-top:", `${(0, solid_js_web.escape)(12, true)}px`) + (0, solid_js_web.ssrStyleProperty)(";pointer-events:", "all"), (0, solid_js_web.ssrStyleProperty)("right:", `-${(0, solid_js_web.escape)(18, true)}px`), (0, solid_js_web.ssrAttribute)("data-node-id", (0, solid_js_web.escape)(props.id, true), false), (0, solid_js_web.ssrStyleProperty)("width:", `${(0, solid_js_web.escape)(12, true)}px`) + (0, solid_js_web.ssrStyleProperty)(";height:", `${(0, solid_js_web.escape)(12, true)}px`) + (0, solid_js_web.ssrStyleProperty)(";margin-top:", `${(0, solid_js_web.escape)(12, true)}px`) + (0, solid_js_web.ssrStyleProperty)(";pointer-events:", "all"));
1248
1246
  };
1249
1247
  //#endregion
1248
+ //#region src/ui/utils.ts
1249
+ /**
1250
+ * Merges conditional CSS class names using `clsx` and resolves Tailwind CSS class
1251
+ * conflicts with `twMerge`.
1252
+ *
1253
+ * @param inputs - Variable list of class values, objects, or arrays.
1254
+ *
1255
+ * @returns The resolved single class name string.
1256
+ */
1257
+ function cn(...inputs) {
1258
+ return (0, tailwind_merge.twMerge)((0, clsx.clsx)(inputs));
1259
+ }
1260
+ //#endregion
1250
1261
  //#region src/ui/components/Panels.tsx
1251
- var _tmpl$$7 = [
1252
- "<div",
1253
- " class=\"absolute top-4 left-4 z-50\">",
1254
- "</div>"
1255
- ];
1256
- var _tmpl$2$3 = [
1262
+ var _tmpl$$4 = [
1257
1263
  "<div",
1258
- " class=\"absolute top-4 right-4 z-50\">",
1264
+ " class=\"",
1265
+ "\">",
1259
1266
  "</div>"
1260
1267
  ];
1261
- var _tmpl$3$1 = [
1268
+ var _tmpl$2$2 = [
1262
1269
  "<div",
1263
- " class=\"absolute bottom-4 left-4 z-50\">",
1264
- "</div>"
1270
+ " class=\"pointer-events-none absolute inset-0\"><!--$-->",
1271
+ "<!--/--><!--$-->",
1272
+ "<!--/--><!--$-->",
1273
+ "<!--/--></div>"
1265
1274
  ];
1266
1275
  /**
1276
+ * Overlay slot component rendering an optional panel component with z-index
1277
+ * positioning.
1278
+ *
1279
+ * @param props - Panel properties of type {@linkcode PanelProps}.
1280
+ *
1281
+ * @returns The rendered panel container element or fallback.
1282
+ *
1283
+ * @see {@linkcode cn}
1284
+ */
1285
+ var Panel = (props) => {
1286
+ const exists = (0, _bemedev_app_bemedev.isDefined)(props.children);
1287
+ return (0, solid_js_web.createComponent)(solid_js.Show, {
1288
+ get when() {
1289
+ return props.children;
1290
+ },
1291
+ keyed: true,
1292
+ children: (Children) => (0, solid_js_web.ssr)(_tmpl$$4, (0, solid_js_web.ssrHydrationKey)(), `${(0, solid_js_web.escape)(cn(props.class) || "", true)} ${exists ? "z-50" : ""}`, (0, solid_js_web.escape)((0, solid_js_web.createComponent)(Children, {})))
1293
+ });
1294
+ };
1295
+ /**
1267
1296
  * Overlay container rendering custom panel slots positioned around the flowchart
1268
1297
  * canvas.
1269
1298
  *
@@ -1272,33 +1301,26 @@ var _tmpl$3$1 = [
1272
1301
  * @returns Rendered overlay panels JSX elements.
1273
1302
  */
1274
1303
  var Panels = (props) => {
1275
- return [
1276
- (0, solid_js_web.createComponent)(solid_js.Show, {
1277
- get when() {
1278
- return props.topLeft;
1279
- },
1280
- keyed: true,
1281
- children: (Panel) => (0, solid_js_web.ssr)(_tmpl$$7, (0, solid_js_web.ssrHydrationKey)(), (0, solid_js_web.escape)((0, solid_js_web.createComponent)(Panel, {})))
1282
- }),
1283
- (0, solid_js_web.createComponent)(solid_js.Show, {
1284
- get when() {
1285
- return props.topRight;
1286
- },
1287
- keyed: true,
1288
- children: (Panel) => (0, solid_js_web.ssr)(_tmpl$2$3, (0, solid_js_web.ssrHydrationKey)(), (0, solid_js_web.escape)((0, solid_js_web.createComponent)(Panel, {})))
1289
- }),
1290
- (0, solid_js_web.createComponent)(solid_js.Show, {
1291
- get when() {
1292
- return props.bottomLeft;
1293
- },
1294
- keyed: true,
1295
- children: (Panel) => (0, solid_js_web.ssr)(_tmpl$3$1, (0, solid_js_web.ssrHydrationKey)(), (0, solid_js_web.escape)((0, solid_js_web.createComponent)(Panel, {})))
1296
- })
1297
- ];
1304
+ return (0, solid_js_web.ssr)(_tmpl$2$2, (0, solid_js_web.ssrHydrationKey)(), (0, solid_js_web.escape)((0, solid_js_web.createComponent)(Panel, {
1305
+ get children() {
1306
+ return props.topLeft;
1307
+ },
1308
+ "class": "absolute top-4 left-4"
1309
+ })), (0, solid_js_web.escape)((0, solid_js_web.createComponent)(Panel, {
1310
+ get children() {
1311
+ return props.topRight;
1312
+ },
1313
+ "class": "absolute top-4 right-4"
1314
+ })), (0, solid_js_web.escape)((0, solid_js_web.createComponent)(Panel, {
1315
+ get children() {
1316
+ return props.bottomLeft;
1317
+ },
1318
+ "class": "absolute bottom-4 left-4"
1319
+ })));
1298
1320
  };
1299
1321
  //#endregion
1300
1322
  //#region src/ui/components/NodesBoard.tsx
1301
- var _tmpl$$6 = [
1323
+ var _tmpl$$3 = [
1302
1324
  "<div",
1303
1325
  " class=\"relative h-full w-full overflow-auto\"><!--$-->",
1304
1326
  "<!--/--><div class=\"",
@@ -1309,7 +1331,7 @@ var _tmpl$$6 = [
1309
1331
  "<!--/--><!--$-->",
1310
1332
  "<!--/--></div></div></div>"
1311
1333
  ];
1312
- var _tmpl$2$2 = [
1334
+ var _tmpl$2$1 = [
1313
1335
  "<div",
1314
1336
  " class=\"absolute right-4 bottom-4 z-50 flex items-center gap-2 rounded-xl border border-gray-200 bg-white/90 p-2 shadow-lg backdrop-blur-md\"><button type=\"button\" class=\"flex size-9 cursor-pointer items-center justify-center rounded-lg bg-gray-100 text-lg font-bold text-gray-700 shadow-sm transition-all duration-150 hover:bg-gray-200 active:scale-95\" title=\"Zoom out\" aria-label=\"Zoom out\">-</button><button type=\"button\" class=\"h-9 cursor-pointer rounded-lg px-2 text-xs font-semibold text-gray-700 transition-colors hover:bg-gray-100\" title=\"Reset zoom\" aria-label=\"Reset zoom\"><!--$-->",
1315
1337
  "<!--/-->%</button><button type=\"button\" class=\"flex size-9 cursor-pointer items-center justify-center rounded-lg bg-gray-100 text-lg font-bold text-gray-700 shadow-sm transition-all duration-150 hover:bg-gray-200 active:scale-95\" title=\"Zoom in\" aria-label=\"Zoom in\">+</button><div class=\"h-5 w-px bg-gray-300\"></div><button type=\"button\" class=\"flex size-9 cursor-pointer items-center justify-center rounded-lg bg-blue-600 text-white shadow transition-all duration-150 hover:bg-blue-700 active:scale-95\" title=\"Add parent node\" aria-label=\"Add parent node\"><svg class=\"size-5\" viewBox=\"0 0 24 24\" fill=\"currentColor\"><path d=\"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z\"></path></svg></button></div>"
@@ -1456,7 +1478,7 @@ var NodesBoard = (props) => {
1456
1478
  },
1457
1479
  get children() {
1458
1480
  return [
1459
- (0, solid_js_web.ssr)(_tmpl$$6, (0, solid_js_web.ssrHydrationKey)(), (0, solid_js_web.escape)((0, solid_js_web.createComponent)(_thisbeyond_solid_dnd.DragDropSensors, {})), `relative cursor-crosshair overflow-hidden ${isPanning() ? "cursor-grabbing" : ""}`, (0, solid_js_web.ssrStyleProperty)("height:", (0, solid_js_web.escape)(cHeight(), true)) + (0, solid_js_web.ssrStyleProperty)(";width:", (0, solid_js_web.escape)(cWidth(), true)), (0, solid_js_web.ssrStyleProperty)("scale:", (0, solid_js_web.escape)(zoom(), true)) + (0, solid_js_web.ssrStyleProperty)(";transform-origin:", "top left"), (0, solid_js_web.escape)((0, solid_js_web.createComponent)(DragBounds, {})), (0, solid_js_web.escape)((0, solid_js_web.createComponent)(EdgesBoard, {})), (0, solid_js_web.escape)((0, solid_js_web.createComponent)(solid_js.For, {
1481
+ (0, solid_js_web.ssr)(_tmpl$$3, (0, solid_js_web.ssrHydrationKey)(), (0, solid_js_web.escape)((0, solid_js_web.createComponent)(_thisbeyond_solid_dnd.DragDropSensors, {})), `relative cursor-crosshair overflow-hidden ${isPanning() ? "cursor-grabbing" : ""}`, (0, solid_js_web.ssrStyleProperty)("height:", (0, solid_js_web.escape)(cHeight(), true)) + (0, solid_js_web.ssrStyleProperty)(";width:", (0, solid_js_web.escape)(cWidth(), true)), (0, solid_js_web.ssrStyleProperty)("scale:", (0, solid_js_web.escape)(zoom(), true)) + (0, solid_js_web.ssrStyleProperty)(";transform-origin:", "top left"), (0, solid_js_web.escape)((0, solid_js_web.createComponent)(DragBounds, {})), (0, solid_js_web.escape)((0, solid_js_web.createComponent)(EdgesBoard, {})), (0, solid_js_web.escape)((0, solid_js_web.createComponent)(solid_js.For, {
1460
1482
  get each() {
1461
1483
  return nodeIds();
1462
1484
  },
@@ -1468,7 +1490,7 @@ var NodesBoard = (props) => {
1468
1490
  })
1469
1491
  }))),
1470
1492
  (0, solid_js_web.createComponent)(Panels, (0, solid_js_web.mergeProps)(() => props.panels)),
1471
- (0, solid_js_web.ssr)(_tmpl$2$2, (0, solid_js_web.ssrHydrationKey)(), (0, solid_js_web.escape)(Math.round(zoom() * 100))),
1493
+ (0, solid_js_web.ssr)(_tmpl$2$1, (0, solid_js_web.ssrHydrationKey)(), (0, solid_js_web.escape)(Math.round(zoom() * 100))),
1472
1494
  (0, solid_js_web.createComponent)(solid_js.Show, {
1473
1495
  get when() {
1474
1496
  return !selectedId();
@@ -1483,7 +1505,7 @@ var NodesBoard = (props) => {
1483
1505
  };
1484
1506
  //#endregion
1485
1507
  //#region src/ui/components/FlowChart.tsx
1486
- var _tmpl$$5 = [
1508
+ var _tmpl$$2 = [
1487
1509
  "<div",
1488
1510
  " class=\"relative h-full w-full\"><div class=\"h-full w-full\" style=\"",
1489
1511
  "\">",
@@ -1507,7 +1529,7 @@ var FlowChart = (props) => {
1507
1529
  const primaryNodes = props.config?.nodes ?? DEFAULT_NODES;
1508
1530
  const primaryEdges = props.config?.edges;
1509
1531
  const service = useFlow();
1510
- const hasNewEdge = (0, _bemedev_app_solidjs.createState)(service, { selector: (s) => !!s.context.newEdge });
1532
+ const fromSignal = (0, _bemedev_app_solidjs.createState)(service, { selector: (s) => s.context.newEdge?.from });
1511
1533
  (0, solid_js.onCleanup)(service.pause);
1512
1534
  (0, solid_js.onMount)(() => {
1513
1535
  service.resume();
@@ -1520,39 +1542,59 @@ var FlowChart = (props) => {
1520
1542
  }
1521
1543
  });
1522
1544
  });
1523
- (0, solid_js.createEffect)(() => {
1524
- if (!hasNewEdge()) return;
1525
- const handlePointerMove = (e) => {
1526
- service.send({
1527
- type: "MOVE_NEW_EDGE",
1528
- payload: {
1529
- x: e.clientX,
1530
- y: e.clientY
1531
- }
1532
- });
1533
- };
1534
- const handlePointerUp = (e) => {
1535
- const from = service.state.context.newEdge?.from;
1536
- if (from) {
1537
- const targetId = (document.elementFromPoint(e.clientX, e.clientY)?.closest("[data-handle-type=\"input\"]"))?.getAttribute("data-node-id");
1538
- if (targetId && targetId !== from) service.send({
1539
- type: "ADD_EDGE",
1540
- payload: {
1541
- from,
1542
- to: targetId
1543
- }
1544
- });
1545
+ let added = false;
1546
+ let activeHandle = null;
1547
+ const clearActiveHandle = () => {
1548
+ if (activeHandle) {
1549
+ activeHandle.classList.remove("scale-150");
1550
+ activeHandle = null;
1551
+ added = false;
1552
+ }
1553
+ };
1554
+ const handlePointerMove = (e) => {
1555
+ service.send({
1556
+ type: "MOVE_NEW_EDGE",
1557
+ payload: {
1558
+ x: e.clientX,
1559
+ y: e.clientY
1545
1560
  }
1546
- service.send("CLEAR_NEW_EDGE");
1547
- };
1561
+ });
1562
+ const inputHandle = document.elementsFromPoint(e.clientX, e.clientY).map((el) => el.closest(".rounded-full[data-handle-type=\"input\"]")).find((handle) => Boolean(handle && handle.id !== "inputs"));
1563
+ if (activeHandle && activeHandle !== inputHandle) clearActiveHandle();
1564
+ if (inputHandle) {
1565
+ if (activeHandle !== inputHandle) {
1566
+ inputHandle.classList.add("scale-150");
1567
+ activeHandle = inputHandle;
1568
+ added = true;
1569
+ }
1570
+ }
1571
+ };
1572
+ const createHandlePointerUp = (from) => (e) => {
1573
+ const inputHandle = document.elementsFromPoint(e.clientX, e.clientY).map((el) => el.closest(".rounded-full[data-handle-type=\"input\"]")).find((handle) => Boolean(handle && handle.id !== "inputs"));
1574
+ const to = inputHandle?.getAttribute("data-node-id");
1575
+ if (inputHandle && to) service.send({
1576
+ type: "ADD_EDGE",
1577
+ payload: {
1578
+ from,
1579
+ to
1580
+ }
1581
+ });
1582
+ clearActiveHandle();
1583
+ service.send("CLEAR_NEW_EDGE");
1584
+ };
1585
+ (0, solid_js.createEffect)(() => {
1586
+ const from = fromSignal();
1587
+ if (!from || added) return;
1588
+ const handlePointerUp = createHandlePointerUp(from);
1548
1589
  window.addEventListener("pointermove", handlePointerMove);
1549
1590
  window.addEventListener("pointerup", handlePointerUp);
1550
1591
  (0, solid_js.onCleanup)(() => {
1592
+ clearActiveHandle();
1551
1593
  window.removeEventListener("pointermove", handlePointerMove);
1552
1594
  window.removeEventListener("pointerup", handlePointerUp);
1553
1595
  });
1554
1596
  });
1555
- return (0, solid_js_web.ssr)(_tmpl$$5, (0, solid_js_web.ssrHydrationKey)(), (0, solid_js_web.ssrStyleProperty)("cursor:", hasNewEdge() ? "inherit" : "crosshair"), (0, solid_js_web.escape)((0, solid_js_web.createComponent)(NodesBoard, {
1597
+ return (0, solid_js_web.ssr)(_tmpl$$2, (0, solid_js_web.ssrHydrationKey)(), (0, solid_js_web.ssrStyleProperty)("cursor:", fromSignal() ? "inherit" : "crosshair"), (0, solid_js_web.escape)((0, solid_js_web.createComponent)(NodesBoard, {
1556
1598
  get panels() {
1557
1599
  return props.panels;
1558
1600
  },
@@ -1562,207 +1604,6 @@ var FlowChart = (props) => {
1562
1604
  })));
1563
1605
  };
1564
1606
  //#endregion
1565
- //#region src/ui/utils.ts
1566
- /**
1567
- * Merges conditional CSS class names using `clsx` and resolves Tailwind CSS class
1568
- * conflicts with `twMerge`.
1569
- *
1570
- * @param inputs - Variable list of class values, objects, or arrays.
1571
- *
1572
- * @returns The resolved single class name string.
1573
- */
1574
- function cn(...inputs) {
1575
- return (0, tailwind_merge.twMerge)((0, clsx.clsx)(inputs));
1576
- }
1577
- //#endregion
1578
- //#region src/ui/globals/helpers/espace.ts
1579
- /**
1580
- * Returns a zero-width space if string is empty, preserving layout flow.
1581
- *
1582
- * @param newText - The input text string.
1583
- *
1584
- * @returns The input text or zero-width visible space placeholder.
1585
- */
1586
- var espace = (newText) => {
1587
- if (newText === "") return "​";
1588
- return newText;
1589
- };
1590
- //#endregion
1591
- //#region src/ui/globals/signals/createTyping.ts
1592
- /**
1593
- * Creates a reactive typewriter effect signal with oscillatory typing delay and
1594
- * optional rewind.
1595
- *
1596
- * @param props - Configuration properties of type {@linkcode Props}.
1597
- *
1598
- * @returns An object containing the current text signal, type trigger, and text
1599
- * setter.
1600
- */
1601
- var createTyping = ({ content, min, ...props }) => {
1602
- const rewind = props.rewind ?? false;
1603
- const rewindDelay = props.rewindDelay ?? 500;
1604
- const OSCILLATION = Math.min(min / 10 + content.length / 10, 10);
1605
- const [text, setText] = (0, solid_js.createSignal)("​");
1606
- let timeoutId;
1607
- let index = 0;
1608
- let isTyping = true;
1609
- const max = min + OSCILLATION;
1610
- let interval = min;
1611
- let intervalDirection = 1;
1612
- const type = () => {
1613
- if (isTyping) {
1614
- if (index < content.length) {
1615
- setText((prev) => prev + content[index]);
1616
- index++;
1617
- timeoutId = setTimeout(type, interval);
1618
- } else if (rewind) {
1619
- isTyping = false;
1620
- intervalDirection = 1;
1621
- timeoutId = setTimeout(type, rewindDelay);
1622
- }
1623
- } else if (index > 0) {
1624
- index--;
1625
- setText(espace(content.substring(0, index)));
1626
- timeoutId = setTimeout(type, interval);
1627
- } else {
1628
- isTyping = true;
1629
- intervalDirection = 1;
1630
- timeoutId = setTimeout(type, rewindDelay);
1631
- }
1632
- interval += intervalDirection;
1633
- if (interval >= max) intervalDirection = -1;
1634
- else if (interval <= min) intervalDirection = 1;
1635
- };
1636
- (0, solid_js.onCleanup)(() => {
1637
- if (timeoutId !== void 0) clearTimeout(timeoutId);
1638
- });
1639
- return {
1640
- text,
1641
- type,
1642
- setText
1643
- };
1644
- };
1645
- //#endregion
1646
- //#region src/ui/globals/components/atoms/TypingText.tsx
1647
- var _tmpl$$4 = [
1648
- "<div",
1649
- ">",
1650
- "</div>"
1651
- ];
1652
- /**
1653
- * Renders animated text with a typewriter keystroke animation effect.
1654
- *
1655
- * @param props - Component configuration properties of type {@linkcode Props}.
1656
- *
1657
- * @returns Rendered animated typing text JSX container.
1658
- */
1659
- var TypingText = (props) => {
1660
- const min = props.interval ?? 62;
1661
- const rewind = props.rewind ?? false;
1662
- const rewindDelay = props.rewindDelay ?? 500;
1663
- const content = props.children;
1664
- const disabled = (0, solid_js.createMemo)(() => props.disabled ? props.disabled() : false, false);
1665
- const { text, type, setText } = createTyping({
1666
- content,
1667
- min,
1668
- rewind,
1669
- rewindDelay
1670
- });
1671
- (0, solid_js.createEffect)((0, solid_js.on)(disabled, () => setText("​")));
1672
- (0, solid_js.createEffect)(() => {
1673
- if (disabled()) setText(content);
1674
- else type();
1675
- });
1676
- return (0, solid_js_web.ssr)(_tmpl$$4, (0, solid_js_web.ssrHydrationKey)() + (0, solid_js_web.ssrAttribute)("class", (0, solid_js_web.escape)(props.class, true), false), (0, solid_js_web.escape)(text()));
1677
- };
1678
- //#endregion
1679
- //#region src/ui/globals/components/molecules/FadingDots.tsx
1680
- var _tmpl$$3 = [
1681
- "<div",
1682
- " class=\"mt-4 flex items-center justify-center space-x-4\">",
1683
- "</div>"
1684
- ];
1685
- /**
1686
- * Loading animation component displaying animated pulsing dots.
1687
- *
1688
- * @param props - Fading dots configuration properties.
1689
- * @param props.count - The number of dots to display.
1690
- * @param props.duration - Animation duration in milliseconds. Defaults to 500.
1691
- * @param props.innerProps - Additional properties and CSS styles applied to dot
1692
- * elements.
1693
- *
1694
- * @returns Rendered animated dots container JSX element.
1695
- */
1696
- var FadingDots = ({ count: length, innerProps = {}, duration = 500 }) => {
1697
- const [local, rest] = (0, solid_js.splitProps)(innerProps, ["class", "style"]);
1698
- return (0, solid_js_web.ssr)(_tmpl$$3, (0, solid_js_web.ssrHydrationKey)(), (0, solid_js_web.escape)(Array.from({ length }, (_, i) => (0, solid_js_web.ssrElement)("span", (0, solid_js_web.mergeProps)({
1699
- get ["class"]() {
1700
- return cn("rounded-full animate-out direction-alternate repeat-infinite fade-out-5 size-4 bg-gray-600", local.class);
1701
- },
1702
- get style() {
1703
- return {
1704
- ...local.style,
1705
- "animation-duration": `${duration}ms`,
1706
- "animation-delay": `${duration / i}ms`
1707
- };
1708
- },
1709
- "aria-hidden": "true"
1710
- }, rest), void 0, true))));
1711
- };
1712
- //#endregion
1713
- //#region src/ui/globals/components/organisms/LoadingFallback.tsx
1714
- var _tmpl$$2 = [
1715
- "<div",
1716
- " role=\"status\" aria-live=\"polite\" aria-label=\"Chargement en cours\"><div class=\"relative\"><div",
1717
- " aria-hidden=\"true\"></div><div",
1718
- " aria-hidden=\"true\"></div></div><div class=\"text-center\"",
1719
- "><!--$-->",
1720
- "<!--/--><!--$-->",
1721
- "<!--/--></div></div>"
1722
- ];
1723
- /**
1724
- * Fallback loading screen component displaying an animated spinner and typewriter
1725
- * text.
1726
- *
1727
- * @example
1728
- * ```tsx
1729
- * <Show when={data()} fallback={<LoadingFallback />}>
1730
- * <DataComponent data={data()!} />
1731
- * </Show>;
1732
- * ```;
1733
- *
1734
- * @param props - Loading fallback properties of type
1735
- * {@linkcode LoadingFallbackProps}.
1736
- *
1737
- * @returns Rendered full-screen loading fallback JSX element.
1738
- */
1739
- var LoadingFallback = (props) => {
1740
- const message = props.message ?? "Chargement en cours...";
1741
- const spinnerSizes = {
1742
- sm: "w-8 h-8",
1743
- md: "w-12 h-12",
1744
- lg: "w-16 h-16",
1745
- xl: "w-24 h-24"
1746
- };
1747
- const size = props.size ?? "lg";
1748
- return (0, solid_js_web.ssr)(_tmpl$$2, (0, solid_js_web.ssrHydrationKey)() + (0, solid_js_web.ssrAttribute)("class", (0, solid_js_web.escape)(cn("flex flex-col items-center justify-center gap-6", "h-screen w-screen overflow-hidden p-4", props.class), true), false), (0, solid_js_web.ssrAttribute)("class", (0, solid_js_web.escape)(cn(spinnerSizes[size], "rounded-full border-4 border-[#4B9CAD]/20", "animate-spin", "border-t-[#4B9CAD]"), true), false), (0, solid_js_web.ssrAttribute)("class", (0, solid_js_web.escape)(cn("absolute inset-2", "rounded-full border-4 border-transparent", "border-b-[#4B9CAD]/40", "animate-spin", "animation-duration-[1.5s]", "direction-[reverse]"), true), false), (0, solid_js_web.ssrAttribute)("aria-label", (0, solid_js_web.escape)(message, true), false), (0, solid_js_web.escape)((0, solid_js_web.createComponent)(TypingText, {
1749
- "class": "text-lg font-medium text-gray-700 md:text-xl dark:text-gray-300",
1750
- get interval() {
1751
- return props.interval ?? 80;
1752
- },
1753
- get rewind() {
1754
- return props.rewind ?? true;
1755
- },
1756
- get rewindDelay() {
1757
- return props.rewindDelay ?? 2e3;
1758
- },
1759
- children: message
1760
- })), (0, solid_js_web.escape)((0, solid_js_web.createComponent)(FadingDots, {
1761
- count: 5,
1762
- innerProps: { class: "bg-[#3d8091]" }
1763
- })));
1764
- };
1765
- //#endregion
1766
1607
  //#region src/ui/Flow.tsx
1767
1608
  var _tmpl$$1 = [
1768
1609
  "<div",
@@ -1770,47 +1611,24 @@ var _tmpl$$1 = [
1770
1611
  "\" class=\"relative flex h-full w-full rounded-lg border-2 border-gray-600 bg-white bg-size-[30px_30px]\">",
1771
1612
  "</div>"
1772
1613
  ];
1773
- var _tmpl$2$1 = [
1774
- "<div",
1775
- " class=\"relative flex flex-1 items-center justify-center\">",
1776
- "</div>"
1777
- ];
1778
1614
  /**
1779
1615
  * Root Flow component wrapping the {@linkcode FlowChart} inside the flow context
1780
1616
  * provider.
1781
1617
  *
1782
- * @template | {@linkcode NodeData} `D` - Custom node data dictionary type extending
1783
- * {@linkcode NodeData}.
1618
+ * @template | Type {@linkcode NodeData} `D` - Custom node data dictionary type
1619
+ * extending type {@linkcode NodeData}.
1784
1620
  *
1785
1621
  * @param props - Flow chart configuration and callbacks of type
1786
1622
  * {@linkcode FlowProps}.
1787
1623
  *
1788
1624
  * @returns The rendered Solid component.
1789
1625
  *
1790
- * @see {@linkcode Provider}, {@linkcode FlowChart}
1626
+ * @see {@linkcode Provider}
1791
1627
  */
1792
1628
  var Flow = (props) => {
1793
- const [isMounted, setIsMounted] = (0, solid_js.createSignal)(false);
1794
- (0, solid_js.onMount)(() => setTimeout(() => setIsMounted(true), props.delay));
1795
- return (0, solid_js_web.ssr)(_tmpl$$1, (0, solid_js_web.ssrHydrationKey)(), (0, solid_js_web.ssrStyleProperty)("background-image:", "radial-gradient(circle, #b8b8b8bf 1px, rgba(0, 0, 0, 0) 1px)"), (0, solid_js_web.escape)((0, solid_js_web.createComponent)(solid_js.Show, {
1796
- get when() {
1797
- return isMounted();
1798
- },
1799
- keyed: true,
1800
- get fallback() {
1801
- return (0, solid_js_web.ssr)(_tmpl$2$1, (0, solid_js_web.ssrHydrationKey)(), (0, solid_js_web.escape)((0, solid_js_web.createComponent)(LoadingFallback, {
1802
- message: "Chart is loading...",
1803
- interval: 35,
1804
- rewind: true,
1805
- rewindDelay: 1e3
1806
- })));
1807
- },
1808
- get children() {
1809
- return (0, solid_js_web.createComponent)(Provider, { get children() {
1810
- return (0, solid_js_web.createComponent)(FlowChart, props);
1811
- } });
1812
- }
1813
- })));
1629
+ return (0, solid_js_web.ssr)(_tmpl$$1, (0, solid_js_web.ssrHydrationKey)(), (0, solid_js_web.ssrStyleProperty)("background-image:", "radial-gradient(circle, #b8b8b8bf 1px, rgba(0, 0, 0, 0) 1px)"), (0, solid_js_web.escape)((0, solid_js_web.createComponent)(Provider, { get children() {
1630
+ return (0, solid_js_web.createComponent)(FlowChart, props);
1631
+ } })));
1814
1632
  };
1815
1633
  //#endregion
1816
1634
  //#region src/ui/globals/directives/clickOutside.ts
@@ -2046,7 +1864,11 @@ var EditPanel = (props) => {
2046
1864
  get when() {
2047
1865
  return hooks.editing();
2048
1866
  },
2049
- children: (node) => (0, solid_js_web.ssr)(_tmpl$, (0, solid_js_web.ssrHydrationKey)(), `${(0, solid_js_web.escape)(cn(`w-80 cursor-default rounded-2xl border border-gray-200 bg-white/95 p-4 shadow-xl backdrop-blur-md transition-all ${props.class ?? ""}`) || "", true)} ${(0, solid_js_web.escape)((0, solid_js_web.ssrClassList)(classList()) || "", true)}`, (0, solid_js_web.ssrStyle)(props.style), (0, solid_js_web.escape)((0, solid_js_web.createComponent)(solid_js.Show, {
1867
+ children: (node) => (0, solid_js_web.ssr)(_tmpl$, (0, solid_js_web.ssrHydrationKey)(), `${(0, solid_js_web.escape)(cn(`w-80 cursor-default rounded-2xl border border-gray-200 bg-white/95 p-4 shadow-xl backdrop-blur-md transition-all ${props.class ?? ""}`) || "", true)} ${(0, solid_js_web.escape)((0, solid_js_web.ssrClassList)({
1868
+ ...classList(),
1869
+ "pointer-events-none! -z-10": !hooks.editing(),
1870
+ "pointer-events-all! z-50": !!hooks.editing()
1871
+ }) || "", true)}`, (0, solid_js_web.ssrStyle)(props.style), (0, solid_js_web.escape)((0, solid_js_web.createComponent)(solid_js.Show, {
2050
1872
  get when() {
2051
1873
  return props.header;
2052
1874
  },