@tomaszjarosz/react-visualizers 0.4.11 → 0.4.12
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 +7 -7
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +7 -7
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -18497,11 +18497,11 @@ const BTreeVisualizerComponent = ({
|
|
|
18497
18497
|
] })
|
|
18498
18498
|
] }),
|
|
18499
18499
|
/* @__PURE__ */ jsx("div", { className: "mb-4 p-4 bg-gray-50 rounded-lg border border-gray-200 min-h-[150px] flex items-center justify-center", children: nodes.size > 0 ? renderNode(rootId) : /* @__PURE__ */ jsx("span", { className: "text-gray-400", children: "Empty tree" }) }),
|
|
18500
|
-
|
|
18500
|
+
/* @__PURE__ */ jsx("div", { className: "mb-4 p-3 bg-gray-50 rounded-lg border border-gray-200 min-h-[44px]", children: targetKey !== void 0 ? /* @__PURE__ */ jsxs("div", { className: "text-sm", children: [
|
|
18501
18501
|
/* @__PURE__ */ jsx("span", { className: "text-gray-500", children: "Target key: " }),
|
|
18502
18502
|
/* @__PURE__ */ jsx("span", { className: "font-mono font-bold text-emerald-600", children: targetKey })
|
|
18503
|
-
] }) }),
|
|
18504
|
-
|
|
18503
|
+
] }) : /* @__PURE__ */ jsx("div", { className: "text-sm text-gray-400 italic", children: "Target key will appear here..." }) }),
|
|
18504
|
+
/* @__PURE__ */ jsx("div", { className: "mb-4 p-3 bg-purple-50 rounded-lg border border-purple-200 min-h-[76px]", children: splitInfo ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
18505
18505
|
/* @__PURE__ */ jsx("div", { className: "text-sm font-medium text-purple-800 mb-1", children: "Node Split" }),
|
|
18506
18506
|
/* @__PURE__ */ jsxs("div", { className: "text-xs text-purple-700 font-mono", children: [
|
|
18507
18507
|
/* @__PURE__ */ jsxs("div", { children: [
|
|
@@ -18520,7 +18520,7 @@ const BTreeVisualizerComponent = ({
|
|
|
18520
18520
|
"]"
|
|
18521
18521
|
] })
|
|
18522
18522
|
] })
|
|
18523
|
-
] }),
|
|
18523
|
+
] }) : /* @__PURE__ */ jsx("div", { className: "text-sm text-purple-400 italic text-center py-2", children: "Split info will appear here when node overflows..." }) }),
|
|
18524
18524
|
/* @__PURE__ */ jsxs("div", { className: "mb-4 p-2 bg-blue-50 rounded-lg border border-blue-200", children: [
|
|
18525
18525
|
/* @__PURE__ */ jsx("div", { className: "text-xs font-medium text-blue-800 mb-1", children: "Operations" }),
|
|
18526
18526
|
/* @__PURE__ */ jsx("div", { className: "text-xs text-blue-700 font-mono", children: OPERATIONS$4.map((op, i) => /* @__PURE__ */ jsxs("span", { className: "mr-2", children: [
|
|
@@ -20775,13 +20775,13 @@ const ConsistentHashingVisualizerComponent = ({
|
|
|
20775
20775
|
},
|
|
20776
20776
|
server
|
|
20777
20777
|
)) }),
|
|
20778
|
-
|
|
20778
|
+
/* @__PURE__ */ jsx("div", { className: "mb-4 overflow-x-auto min-h-[100px]", children: /* @__PURE__ */ jsxs("table", { className: "w-full text-xs", children: [
|
|
20779
20779
|
/* @__PURE__ */ jsx("thead", { children: /* @__PURE__ */ jsxs("tr", { className: "bg-gray-100", children: [
|
|
20780
20780
|
/* @__PURE__ */ jsx("th", { className: "px-2 py-1 text-left", children: "Key" }),
|
|
20781
20781
|
/* @__PURE__ */ jsx("th", { className: "px-2 py-1 text-left", children: "Hash (°)" }),
|
|
20782
20782
|
/* @__PURE__ */ jsx("th", { className: "px-2 py-1 text-left", children: "Server" })
|
|
20783
20783
|
] }) }),
|
|
20784
|
-
/* @__PURE__ */ jsx("tbody", { children: dataKeys.map((key) => /* @__PURE__ */ jsxs(
|
|
20784
|
+
/* @__PURE__ */ jsx("tbody", { children: dataKeys.length > 0 ? dataKeys.map((key) => /* @__PURE__ */ jsxs(
|
|
20785
20785
|
"tr",
|
|
20786
20786
|
{
|
|
20787
20787
|
className: `
|
|
@@ -20807,7 +20807,7 @@ const ConsistentHashingVisualizerComponent = ({
|
|
|
20807
20807
|
]
|
|
20808
20808
|
},
|
|
20809
20809
|
key.key
|
|
20810
|
-
)) })
|
|
20810
|
+
)) : /* @__PURE__ */ jsx("tr", { children: /* @__PURE__ */ jsx("td", { colSpan: 3, className: "px-2 py-4 text-center text-gray-400 italic", children: "No keys added yet..." }) }) })
|
|
20811
20811
|
] }) })
|
|
20812
20812
|
] });
|
|
20813
20813
|
return /* @__PURE__ */ jsx(
|