@tomaszjarosz/react-visualizers 0.4.4 → 0.4.5
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 +9 -9
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +9 -9
- package/dist/index.js.map +1 -1
- package/dist/react-visualizers.css +8 -0
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -6032,7 +6032,7 @@ const HashMapVisualizerComponent = ({
|
|
|
6032
6032
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-center text-indigo-700 font-bold mb-2", children: "index = hashCode(key) % capacity" }),
|
|
6033
6033
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-xs text-gray-500 text-center", children: "Same key → same index (deterministic) • Different keys may collide → chaining" })
|
|
6034
6034
|
] }),
|
|
6035
|
-
|
|
6035
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "mt-3 p-3 bg-white rounded-lg border border-indigo-200 min-h-[80px]", children: stepData.hash !== void 0 && stepData.key ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "text-xs text-center", children: [
|
|
6036
6036
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "font-mono mb-1", children: [
|
|
6037
6037
|
"hashCode(",
|
|
6038
6038
|
/* @__PURE__ */ jsxRuntime.jsxs("span", { className: "text-indigo-600 font-bold", children: [
|
|
@@ -6055,7 +6055,7 @@ const HashMapVisualizerComponent = ({
|
|
|
6055
6055
|
stepData.bucketIndex,
|
|
6056
6056
|
"]"
|
|
6057
6057
|
] })
|
|
6058
|
-
] }) })
|
|
6058
|
+
] }) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-xs text-gray-400 text-center py-4", children: "Ready to hash..." }) })
|
|
6059
6059
|
] }),
|
|
6060
6060
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mb-4", children: [
|
|
6061
6061
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "text-sm font-medium text-gray-700 mb-2", children: [
|
|
@@ -13665,7 +13665,7 @@ const LinkedListVisualizerComponent = ({
|
|
|
13665
13665
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-xs text-gray-500 font-mono ml-2", children: "← tail" })
|
|
13666
13666
|
] }) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: "h-16 flex items-center justify-center text-gray-400 text-sm", children: "Empty list (head = tail = null)" }) })
|
|
13667
13667
|
] }),
|
|
13668
|
-
|
|
13668
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "mb-4 p-3 bg-gray-100 rounded-lg min-h-[44px]", children: nodes.length > 0 ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "text-xs text-gray-600 flex gap-4", children: [
|
|
13669
13669
|
/* @__PURE__ */ jsxRuntime.jsxs("span", { children: [
|
|
13670
13670
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "font-medium", children: "head:" }),
|
|
13671
13671
|
" ",
|
|
@@ -13681,7 +13681,7 @@ const LinkedListVisualizerComponent = ({
|
|
|
13681
13681
|
" ",
|
|
13682
13682
|
nodes.length
|
|
13683
13683
|
] })
|
|
13684
|
-
] }) })
|
|
13684
|
+
] }) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-xs text-gray-400 text-center", children: "head = tail = null, size = 0" }) })
|
|
13685
13685
|
] });
|
|
13686
13686
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
13687
13687
|
BaseVisualizerLayout,
|
|
@@ -14162,7 +14162,7 @@ const LinkedHashMapVisualizerComponent = ({
|
|
|
14162
14162
|
linkedOrder.length > 0 && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mt-2 pt-2 border-t border-orange-200 text-[10px] text-gray-500 text-center", children: "Doubly linked: each entry has prev/next pointers" })
|
|
14163
14163
|
] })
|
|
14164
14164
|
] }),
|
|
14165
|
-
|
|
14165
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "mb-4 p-3 bg-blue-50 rounded-lg min-h-[52px]", children: accessOrder ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "text-xs text-blue-700", children: [
|
|
14166
14166
|
/* @__PURE__ */ jsxRuntime.jsx("strong", { children: "LRU Cache Usage:" }),
|
|
14167
14167
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "mt-1 text-[11px]", children: linkedOrder.length > 0 ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
14168
14168
|
"Least Recently Used: ",
|
|
@@ -14170,7 +14170,7 @@ const LinkedHashMapVisualizerComponent = ({
|
|
|
14170
14170
|
" | Most Recently Used: ",
|
|
14171
14171
|
/* @__PURE__ */ jsxRuntime.jsx("strong", { children: linkedOrder[linkedOrder.length - 1] })
|
|
14172
14172
|
] }) : "Cache empty" })
|
|
14173
|
-
] }) })
|
|
14173
|
+
] }) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-xs text-gray-400 text-center", children: "Insertion order mode (switch to access order for LRU behavior)" }) })
|
|
14174
14174
|
] });
|
|
14175
14175
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
14176
14176
|
BaseVisualizerLayout,
|
|
@@ -16192,7 +16192,7 @@ const PriorityQueueVisualizerComponent = ({ showControls = true, showCode = true
|
|
|
16192
16192
|
] })
|
|
16193
16193
|
] })
|
|
16194
16194
|
] }),
|
|
16195
|
-
|
|
16195
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "mt-3 p-2 bg-white rounded-lg border border-purple-200 min-h-[36px]", children: currentIndex !== void 0 && currentIndex >= 0 ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "text-xs text-gray-600 text-center", children: [
|
|
16196
16196
|
/* @__PURE__ */ jsxRuntime.jsxs("span", { className: "font-semibold text-purple-700", children: [
|
|
16197
16197
|
"Current: i = ",
|
|
16198
16198
|
currentIndex
|
|
@@ -16211,7 +16211,7 @@ const PriorityQueueVisualizerComponent = ({ showControls = true, showCode = true
|
|
|
16211
16211
|
") = ",
|
|
16212
16212
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-purple-600 font-bold", children: 2 * currentIndex + 1 })
|
|
16213
16213
|
] })
|
|
16214
|
-
] }) })
|
|
16214
|
+
] }) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-xs text-gray-400 text-center", children: "Ready for heap operations..." }) })
|
|
16215
16215
|
] }),
|
|
16216
16216
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mb-4", children: [
|
|
16217
16217
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-sm font-medium text-gray-700 mb-2", children: "Binary Heap Structure" }),
|
|
@@ -16659,7 +16659,7 @@ const ConcurrentHashMapVisualizerComponent = ({ showControls = true, showCode =
|
|
|
16659
16659
|
seg.lockOwner
|
|
16660
16660
|
] })
|
|
16661
16661
|
] }),
|
|
16662
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "space-y-1", children: seg.entries.length > 0 ? seg.entries.map((entry, eIdx) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
16662
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "space-y-1 min-h-[60px]", children: seg.entries.length > 0 ? seg.entries.map((entry, eIdx) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
16663
16663
|
"div",
|
|
16664
16664
|
{
|
|
16665
16665
|
className: "flex justify-between px-2 py-1 bg-white rounded text-xs border border-gray-200",
|