@tomaszjarosz/react-visualizers 0.1.2 → 0.1.4
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 +5 -5
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +5 -5
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -312,7 +312,7 @@ const CodePanel = ({
|
|
|
312
312
|
/* @__PURE__ */ jsx("div", { children: code.map((line, idx) => /* @__PURE__ */ jsxs(
|
|
313
313
|
"div",
|
|
314
314
|
{
|
|
315
|
-
className: `px-0.5 rounded transition-
|
|
315
|
+
className: `px-0.5 rounded transition-colors whitespace-pre ${idx === activeLine ? "bg-yellow-500/30 text-yellow-200 border-l border-yellow-400" : "text-gray-400 border-l border-transparent"}`,
|
|
316
316
|
children: [
|
|
317
317
|
/* @__PURE__ */ jsx("span", { className: "text-gray-600 mr-1 select-none text-[9px]", children: idx + 1 }),
|
|
318
318
|
line || " "
|
|
@@ -320,9 +320,9 @@ const CodePanel = ({
|
|
|
320
320
|
},
|
|
321
321
|
idx
|
|
322
322
|
)) }),
|
|
323
|
-
|
|
323
|
+
/* @__PURE__ */ jsxs("div", { className: "mt-1 pt-1 border-t border-gray-700 min-h-[36px]", children: [
|
|
324
324
|
/* @__PURE__ */ jsx("div", { className: "text-[8px] text-gray-500 uppercase tracking-wide mb-0.5", children: "Vars" }),
|
|
325
|
-
/* @__PURE__ */ jsx("div", { className: "flex flex-wrap gap-0.5", children: Object.entries(variables).map(([key, value]) => /* @__PURE__ */ jsxs(
|
|
325
|
+
/* @__PURE__ */ jsx("div", { className: "flex flex-wrap gap-0.5", children: variables && Object.keys(variables).length > 0 ? Object.entries(variables).map(([key, value]) => /* @__PURE__ */ jsxs(
|
|
326
326
|
"span",
|
|
327
327
|
{
|
|
328
328
|
className: "px-0.5 bg-gray-800 rounded text-[9px] text-gray-300",
|
|
@@ -333,7 +333,7 @@ const CodePanel = ({
|
|
|
333
333
|
]
|
|
334
334
|
},
|
|
335
335
|
key
|
|
336
|
-
)) })
|
|
336
|
+
)) : /* @__PURE__ */ jsx("span", { className: "text-[9px] text-gray-600", children: "—" }) })
|
|
337
337
|
] })
|
|
338
338
|
] });
|
|
339
339
|
const HelpPanel = () => /* @__PURE__ */ jsxs("div", { className: "bg-gray-100 rounded-lg p-2 text-[10px]", children: [
|
|
@@ -4808,7 +4808,7 @@ const HashTableVisualizerComponent = ({
|
|
|
4808
4808
|
] })
|
|
4809
4809
|
] }) }) }),
|
|
4810
4810
|
/* @__PURE__ */ jsx("div", { className: "p-4", children: /* @__PURE__ */ jsxs("div", { className: `flex gap-4 ${showCode ? "flex-col lg:flex-row" : ""}`, children: [
|
|
4811
|
-
/* @__PURE__ */ jsxs(VisualizationArea, { minHeight: 350, children: [
|
|
4811
|
+
/* @__PURE__ */ jsxs(VisualizationArea, { minHeight: 350, className: "flex-1 min-w-0", children: [
|
|
4812
4812
|
/* @__PURE__ */ jsxs("div", { className: "mb-4", children: [
|
|
4813
4813
|
/* @__PURE__ */ jsx("div", { className: "text-sm font-medium text-gray-700 mb-2", children: "Keys to insert:" }),
|
|
4814
4814
|
/* @__PURE__ */ jsx("div", { className: "flex flex-wrap gap-2", children: keys.map((k, idx) => {
|