@carlonicora/nextjs-jsonapi 1.93.0 → 1.94.0

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.
@@ -6688,7 +6688,7 @@ function useCustomD3Graph(nodes, links, onNodeClick, visibleNodeIds, loadingNode
6688
6688
  }
6689
6689
  });
6690
6690
  const link = graphGroup.append("g").attr("stroke", "#999").attr("stroke-opacity", 0.6).selectAll("line").data(visibleLinks).join("line").attr("x1", (d) => d.source.x || 0).attr("y1", (d) => d.source.y || 0).attr("x2", (d) => d.target.x || 0).attr("y2", (d) => d.target.y || 0).attr("stroke-width", 1.5);
6691
- const node = graphGroup.append("g").selectAll("g").data(visibleNodes).join("g").attr("class", "node-group").attr("cursor", "pointer").attr("transform", (d) => `translate(${d.x || 0}, ${d.y || 0})`).call(
6691
+ const node = graphGroup.append("g").selectAll("g").data(visibleNodes).join("g").attr("class", "node-group").attr("data-id", (d) => d.id).attr("cursor", "pointer").attr("transform", (d) => `translate(${d.x || 0}, ${d.y || 0})`).call(
6692
6692
  d3.drag().subject(function(d) {
6693
6693
  return d;
6694
6694
  }).on("start", function(event, d) {
@@ -6749,7 +6749,15 @@ function useCustomD3Graph(nodes, links, onNodeClick, visibleNodeIds, loadingNode
6749
6749
  onNodeClick(d.id);
6750
6750
  });
6751
6751
  node.each(function(d) {
6752
- if (d.icon) {
6752
+ if (d.imageUrl) {
6753
+ const clipId = `clip-${d.id}`;
6754
+ const defs = d3.select(this).append("defs");
6755
+ defs.append("clipPath").attr("id", clipId).append("circle").attr("r", nodeRadius);
6756
+ d3.select(this).append("image").attr("href", d.imageUrl).attr("x", -nodeRadius).attr("y", -nodeRadius).attr("width", nodeRadius * 2).attr("height", nodeRadius * 2).attr("preserveAspectRatio", "xMidYMid slice").attr("clip-path", `url(#${clipId})`).style("pointer-events", "all").on("click", (event) => {
6757
+ event.stopPropagation();
6758
+ onNodeClick(d.id);
6759
+ });
6760
+ } else if (d.icon) {
6753
6761
  const Icon = d.icon;
6754
6762
  const iconSvg = renderToStaticMarkup(/* @__PURE__ */ jsx49(Icon, { size: nodeRadius / 2, color: "white" }));
6755
6763
  const _iconGroup = d3.select(this).append("g").html(iconSvg).attr("transform", `translate(${-nodeRadius / 4}, ${-nodeRadius / 4})`).style("pointer-events", "all").on("click", (event) => {
@@ -6777,7 +6785,7 @@ function useCustomD3Graph(nodes, links, onNodeClick, visibleNodeIds, loadingNode
6777
6785
  textElement.append("tspan").attr("x", 0).attr("dy", index === 0 ? `${startY}em` : `${lineHeight}em`).text(word);
6778
6786
  });
6779
6787
  } else {
6780
- textElement.attr("dy", -nodeRadius - 5).attr("fill", "currentColor").text(d.name);
6788
+ textElement.attr("dy", -nodeRadius - 5).attr("fill", "currentColor").attr("font-size", d.bold ? 16 : 12).attr("font-weight", d.bold ? 700 : null).text(d.name);
6781
6789
  }
6782
6790
  });
6783
6791
  return () => {
@@ -9214,7 +9222,7 @@ import { useRef as useRef15 } from "react";
9214
9222
  import dynamic from "next/dynamic";
9215
9223
  import React14 from "react";
9216
9224
  import { jsx as jsx73 } from "react/jsx-runtime";
9217
- var BlockNoteEditor = dynamic(() => import("./BlockNoteEditor-R2QZFXBW.mjs"), {
9225
+ var BlockNoteEditor = dynamic(() => import("./BlockNoteEditor-S62X5HSE.mjs"), {
9218
9226
  ssr: false
9219
9227
  });
9220
9228
  var BlockNoteEditorContainer = React14.memo(/* @__PURE__ */ __name(function EditorContainer(props) {
@@ -21977,4 +21985,4 @@ export {
21977
21985
  useOAuthClients,
21978
21986
  useOAuthClient
21979
21987
  };
21980
- //# sourceMappingURL=chunk-FELMRARS.mjs.map
21988
+ //# sourceMappingURL=chunk-PNQDUCEN.mjs.map