@tomaszjarosz/react-visualizers 0.4.10 → 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 +12 -12
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +12 -12
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -4438,7 +4438,7 @@ const DPVisualizerComponent = ({
|
|
|
4438
4438
|
] })
|
|
4439
4439
|
] })
|
|
4440
4440
|
] }),
|
|
4441
|
-
|
|
4441
|
+
/* @__PURE__ */ jsx("div", { className: "mt-4 p-3 bg-white rounded-lg border-2 border-purple-300 min-h-[76px]", children: currentI > 0 && currentW > 0 ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
4442
4442
|
/* @__PURE__ */ jsxs("div", { className: "text-sm font-semibold text-purple-800 mb-2", children: [
|
|
4443
4443
|
"Current: dp[",
|
|
4444
4444
|
currentI,
|
|
@@ -4460,7 +4460,7 @@ const DPVisualizerComponent = ({
|
|
|
4460
4460
|
] }),
|
|
4461
4461
|
decision && /* @__PURE__ */ jsx("div", { className: `px-3 py-1 rounded-full font-bold ${decision === "take" ? "bg-green-100 text-green-700" : "bg-yellow-100 text-yellow-700"}`, children: decision === "take" ? "✓ TAKE" : "✗ SKIP" })
|
|
4462
4462
|
] })
|
|
4463
|
-
] })
|
|
4463
|
+
] }) : /* @__PURE__ */ jsx("div", { className: "text-sm text-purple-400 italic text-center py-2", children: "Current cell calculation will appear here..." }) })
|
|
4464
4464
|
] }),
|
|
4465
4465
|
/* @__PURE__ */ jsxs("div", { className: "flex gap-6", children: [
|
|
4466
4466
|
/* @__PURE__ */ jsxs("div", { className: "w-40", children: [
|
|
@@ -18025,7 +18025,7 @@ const BloomFilterVisualizerComponent = ({
|
|
|
18025
18025
|
"]"
|
|
18026
18026
|
] }, idx)) })
|
|
18027
18027
|
] }),
|
|
18028
|
-
|
|
18028
|
+
/* @__PURE__ */ jsx("div", { className: "mb-4 p-3 bg-gray-50 rounded-lg border border-gray-200 min-h-[44px]", children: stepData.element ? /* @__PURE__ */ jsxs("div", { className: "text-sm", children: [
|
|
18029
18029
|
/* @__PURE__ */ jsx("span", { className: "text-gray-500", children: "Element: " }),
|
|
18030
18030
|
/* @__PURE__ */ jsxs("span", { className: "font-mono font-bold text-purple-600", children: [
|
|
18031
18031
|
'"',
|
|
@@ -18040,8 +18040,8 @@ const BloomFilterVisualizerComponent = ({
|
|
|
18040
18040
|
] }),
|
|
18041
18041
|
/* @__PURE__ */ jsx("span", { className: "font-mono font-bold text-pink-600", children: stepData.hashIndex })
|
|
18042
18042
|
] })
|
|
18043
|
-
] }) }),
|
|
18044
|
-
|
|
18043
|
+
] }) : /* @__PURE__ */ jsx("div", { className: "text-sm text-gray-400 italic", children: "Current operation will appear here..." }) }),
|
|
18044
|
+
/* @__PURE__ */ jsxs("div", { className: "mb-4 p-3 bg-indigo-50 rounded-lg border border-indigo-200 min-h-[76px]", children: [
|
|
18045
18045
|
/* @__PURE__ */ jsxs("div", { className: "text-xs font-medium text-indigo-800 mb-2", children: [
|
|
18046
18046
|
"Hash Functions (k=",
|
|
18047
18047
|
NUM_HASH_FUNCTIONS,
|
|
@@ -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(
|