@carlonicora/nextjs-jsonapi 1.100.0 → 1.100.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/dist/{BlockNoteEditor-QH3NPFYN.mjs → BlockNoteEditor-OBWSYICZ.mjs} +2 -2
- package/dist/{BlockNoteEditor-ZD2AMN72.js → BlockNoteEditor-Z4YI6XFJ.js} +9 -9
- package/dist/{BlockNoteEditor-ZD2AMN72.js.map → BlockNoteEditor-Z4YI6XFJ.js.map} +1 -1
- package/dist/billing/index.js +299 -299
- package/dist/billing/index.mjs +1 -1
- package/dist/{chunk-S34H33HJ.mjs → chunk-J767HTWG.mjs} +22 -4
- package/dist/chunk-J767HTWG.mjs.map +1 -0
- package/dist/{chunk-LIZ5C76W.js → chunk-JQ6O7OEZ.js} +253 -235
- package/dist/chunk-JQ6O7OEZ.js.map +1 -0
- package/dist/client/index.js +2 -2
- package/dist/client/index.mjs +1 -1
- package/dist/components/index.js +2 -2
- package/dist/components/index.mjs +1 -1
- package/dist/contexts/index.js +2 -2
- package/dist/contexts/index.mjs +1 -1
- package/package.json +1 -1
- package/src/hooks/useCustomD3Graph.tsx +27 -3
- package/dist/chunk-LIZ5C76W.js.map +0 -1
- package/dist/chunk-S34H33HJ.mjs.map +0 -1
- /package/dist/{BlockNoteEditor-QH3NPFYN.mjs.map → BlockNoteEditor-OBWSYICZ.mjs.map} +0 -0
package/dist/billing/index.mjs
CHANGED
|
@@ -6586,6 +6586,21 @@ __name(fitLayeredLayoutToAspectRatio, "fitLayeredLayoutToAspectRatio");
|
|
|
6586
6586
|
|
|
6587
6587
|
// src/hooks/useCustomD3Graph.tsx
|
|
6588
6588
|
import { jsx as jsx49 } from "react/jsx-runtime";
|
|
6589
|
+
var TITLE_PX_PER_CHAR_162 = 8;
|
|
6590
|
+
var NAME_PX_PER_CHAR_122 = 6.5;
|
|
6591
|
+
var NAME_PX_PER_CHAR_16_BOLD2 = 8;
|
|
6592
|
+
var SUBTITLE_PX_PER_CHAR_112 = 6;
|
|
6593
|
+
var LABEL_PADDING_PX2 = 16;
|
|
6594
|
+
function estimateLabelWidth2(node) {
|
|
6595
|
+
if (node.subtitle) {
|
|
6596
|
+
const titleWidth = (node.name?.length ?? 0) * TITLE_PX_PER_CHAR_162;
|
|
6597
|
+
const subtitleWidth = node.subtitle.length * SUBTITLE_PX_PER_CHAR_112;
|
|
6598
|
+
return Math.max(titleWidth, subtitleWidth) + LABEL_PADDING_PX2;
|
|
6599
|
+
}
|
|
6600
|
+
const perChar = node.bold ? NAME_PX_PER_CHAR_16_BOLD2 : NAME_PX_PER_CHAR_122;
|
|
6601
|
+
return (node.name?.length ?? 0) * perChar + LABEL_PADDING_PX2;
|
|
6602
|
+
}
|
|
6603
|
+
__name(estimateLabelWidth2, "estimateLabelWidth");
|
|
6589
6604
|
function useCustomD3Graph(nodes, links, onNodeClick, visibleNodeIds, options, loadingNodeIds, containerKey) {
|
|
6590
6605
|
const svgRef = useRef8(null);
|
|
6591
6606
|
const zoomRef = useRef8(null);
|
|
@@ -6872,9 +6887,12 @@ function useCustomD3Graph(nodes, links, onNodeClick, visibleNodeIds, options, lo
|
|
|
6872
6887
|
simulation = d3.forceSimulation(visibleNodes).force(
|
|
6873
6888
|
"link",
|
|
6874
6889
|
d3.forceLink(visibleLinks).id((d) => d.id).distance(nodeRadius * 3).strength(0.1)
|
|
6875
|
-
).force("charge", d3.forceManyBody().strength(-
|
|
6890
|
+
).force("charge", d3.forceManyBody().strength(-2500).distanceMax(800)).force(
|
|
6891
|
+
"collision",
|
|
6892
|
+
d3.forceCollide().radius((d) => Math.max(nodeRadius * 1.1, estimateLabelWidth2(d) / 2 + 8))
|
|
6893
|
+
).force("center", d3.forceCenter(width / 2, height / 2).strength(0.1));
|
|
6876
6894
|
simulation.stop();
|
|
6877
|
-
for (let i = 0; i <
|
|
6895
|
+
for (let i = 0; i < 300; i++) {
|
|
6878
6896
|
simulation.tick();
|
|
6879
6897
|
}
|
|
6880
6898
|
visibleNodes.forEach((node2) => {
|
|
@@ -9475,7 +9493,7 @@ import { useRef as useRef15 } from "react";
|
|
|
9475
9493
|
import dynamic from "next/dynamic";
|
|
9476
9494
|
import React14 from "react";
|
|
9477
9495
|
import { jsx as jsx73 } from "react/jsx-runtime";
|
|
9478
|
-
var BlockNoteEditor = dynamic(() => import("./BlockNoteEditor-
|
|
9496
|
+
var BlockNoteEditor = dynamic(() => import("./BlockNoteEditor-OBWSYICZ.mjs"), {
|
|
9479
9497
|
ssr: false
|
|
9480
9498
|
});
|
|
9481
9499
|
var BlockNoteEditorContainer = React14.memo(/* @__PURE__ */ __name(function EditorContainer(props) {
|
|
@@ -22390,4 +22408,4 @@ export {
|
|
|
22390
22408
|
useOAuthClients,
|
|
22391
22409
|
useOAuthClient
|
|
22392
22410
|
};
|
|
22393
|
-
//# sourceMappingURL=chunk-
|
|
22411
|
+
//# sourceMappingURL=chunk-J767HTWG.mjs.map
|