@tomaszjarosz/react-visualizers 0.2.3 → 0.2.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 +20 -20
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +20 -20
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -7276,7 +7276,7 @@ const EnumSetVisualizerComponent = ({
|
|
|
7276
7276
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
7277
7277
|
"div",
|
|
7278
7278
|
{
|
|
7279
|
-
className: `w-14 h-10 flex flex-col items-center justify-center text-xs font-medium rounded transition-
|
|
7279
|
+
className: `w-14 h-10 flex flex-col items-center justify-center text-xs font-medium rounded transition-colors duration-200 ${getBitStyle(idx)}`,
|
|
7280
7280
|
children: [
|
|
7281
7281
|
/* @__PURE__ */ jsxRuntime.jsxs("span", { className: "text-[10px] opacity-80", children: [
|
|
7282
7282
|
"bit ",
|
|
@@ -7342,27 +7342,27 @@ const EnumSetVisualizerComponent = ({
|
|
|
7342
7342
|
bitmask === 0 && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-xs text-gray-400 italic", children: "Empty set" })
|
|
7343
7343
|
] })
|
|
7344
7344
|
] }),
|
|
7345
|
-
/* @__PURE__ */ jsxRuntime.
|
|
7346
|
-
/* @__PURE__ */ jsxRuntime.
|
|
7347
|
-
|
|
7348
|
-
|
|
7349
|
-
|
|
7350
|
-
|
|
7351
|
-
|
|
7352
|
-
|
|
7353
|
-
/* @__PURE__ */ jsxRuntime.jsx("
|
|
7354
|
-
"
|
|
7355
|
-
|
|
7356
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
7357
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-green-600", children: "EnumSet:" }),
|
|
7358
|
-
" O(1) bit operation"
|
|
7345
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mb-4 p-4 bg-gradient-to-r from-green-50 to-lime-50 rounded-xl border-2 border-green-200", children: [
|
|
7346
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "text-sm font-bold text-green-800 mb-3 flex items-center gap-2", children: [
|
|
7347
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-lg", children: "💡" }),
|
|
7348
|
+
" Why EnumSet? Memory Efficiency!"
|
|
7349
|
+
] }),
|
|
7350
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-2 gap-4", children: [
|
|
7351
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "bg-white p-3 rounded-lg border-2 border-green-300", children: [
|
|
7352
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-sm font-bold text-green-700 mb-2", children: "EnumSet" }),
|
|
7353
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-2xl font-bold text-green-600 mb-1", children: "8 bytes" }),
|
|
7354
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-xs text-gray-600", children: "1 long for up to 64 enum values" }),
|
|
7355
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "mt-2 text-xs text-green-600", children: "✓ Single CPU instruction per operation" })
|
|
7359
7356
|
] }),
|
|
7360
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
7361
|
-
/* @__PURE__ */ jsxRuntime.jsx("
|
|
7362
|
-
"
|
|
7357
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "bg-white p-3 rounded-lg border-2 border-gray-300", children: [
|
|
7358
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-sm font-bold text-gray-500 mb-2", children: "HashSet" }),
|
|
7359
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-2xl font-bold text-gray-500 mb-1", children: "~280 bytes" }),
|
|
7360
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-xs text-gray-500", children: "For 7 enum values (~40 bytes each)" }),
|
|
7361
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "mt-2 text-xs text-gray-500", children: "Hash computation + object overhead" })
|
|
7363
7362
|
] })
|
|
7364
|
-
] })
|
|
7365
|
-
|
|
7363
|
+
] }),
|
|
7364
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "mt-3 text-center", children: /* @__PURE__ */ jsxRuntime.jsx("span", { className: "inline-block px-3 py-1 bg-green-100 text-green-800 rounded-full text-sm font-bold", children: "35x smaller memory footprint!" }) })
|
|
7365
|
+
] }),
|
|
7366
7366
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
7367
7367
|
StatusPanel,
|
|
7368
7368
|
{
|