@trops/dash-core 0.1.566 → 0.1.568

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.js CHANGED
@@ -28866,11 +28866,6 @@ var WorkspaceModel = function WorkspaceModel(workspaceItem) {
28866
28866
  return sanitizeWorkspaceObject(workspace);
28867
28867
  };
28868
28868
 
28869
- /**
28870
- * ThemeModel
28871
- *
28872
- */
28873
-
28874
28869
  /**
28875
28870
  * getNextLevel
28876
28871
  * Need to generate the levels for tailwind
@@ -28883,6 +28878,32 @@ function getNextLevel(currentLevel) {
28883
28878
  function invert(shade) {
28884
28879
  return 900 - parseInt(shade, 10);
28885
28880
  }
28881
+
28882
+ /**
28883
+ * Build a tailwind class string for the given prefix + type + numeric
28884
+ * shade. Routes to the arbitrary-value syntax (`bg-[var(--type-shade)]`)
28885
+ * when the channel's value is a hex.
28886
+ *
28887
+ * @param {"bg"|"text"|"border"} prefix
28888
+ * @param {string} type channel name (primary | secondary | …)
28889
+ * @param {number} shade tailwind shade (100..950)
28890
+ * @param {string} channelValue either a tailwind color name or a hex
28891
+ * @param {boolean} hover emit a `hover:` variant
28892
+ */
28893
+ function classFor(prefix, type, shade, channelValue) {
28894
+ var hover = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : false;
28895
+ var h = hover ? "hover:" : "";
28896
+ if (DashReact.isHexColor(channelValue)) {
28897
+ return "".concat(h).concat(prefix, "-[var(--").concat(type, "-").concat(shade, ")]");
28898
+ }
28899
+ return "".concat(h).concat(prefix, "-").concat(channelValue, "-").concat(shade);
28900
+ }
28901
+ function gradientFor(direction, type, fromShade, viaShade, toShade, channelValue) {
28902
+ if (DashReact.isHexColor(channelValue)) {
28903
+ return "bg-gradient-to-".concat(direction, " from-[var(--").concat(type, "-").concat(fromShade, ")] via-[var(--").concat(type, "-").concat(viaShade, ")] to-[var(--").concat(type, "-").concat(toShade, ")]");
28904
+ }
28905
+ return "bg-gradient-to-".concat(direction, " from-").concat(channelValue, "-").concat(fromShade, " via-").concat(channelValue, "-").concat(viaShade, " to-").concat(channelValue, "-").concat(toShade);
28906
+ }
28886
28907
  var ThemeModel = function ThemeModel() {
28887
28908
  var themeItem = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
28888
28909
  try {
@@ -28934,80 +28955,53 @@ var ThemeModel = function ThemeModel() {
28934
28955
  // iterate over each color type "primary, secondary, tertiary ..."
28935
28956
  // and generate the colors necessary (shades) based on tailwind
28936
28957
  DashReact.colorTypes.forEach(function (type) {
28958
+ var channelValue = theme[type];
28937
28959
  Object.keys(variants).forEach(function (variant) {
28938
28960
  if (variant in theme === false) {
28939
28961
  theme[variant] = {};
28940
28962
  }
28941
28963
  Object.keys(variants[variant]).forEach(function (shade) {
28942
- theme[variant]["bg-".concat(type, "-").concat(shade)] = "bg-".concat(theme[type], "-").concat(variants[variant][shade]);
28943
- theme[variant]["hover-bg-".concat(type, "-").concat(shade)] = "hover:bg-".concat(theme[type], "-").concat(getNextLevel(variants[variant][shade]));
28944
- theme[variant]["hover-border-".concat(type, "-").concat(shade)] = "hover:border-".concat(theme[type], "-").concat(getNextLevel(variants[variant][shade]));
28945
- theme[variant]["border-".concat(type, "-").concat(shade)] = "border-".concat(theme[type], "-").concat(variants[variant][shade]);
28964
+ var numShade = variants[variant][shade];
28965
+ var hoverShade = getNextLevel(numShade);
28966
+ var textShade = invert(numShade);
28967
+ theme[variant]["bg-".concat(type, "-").concat(shade)] = classFor("bg", type, numShade, channelValue);
28968
+ theme[variant]["hover-bg-".concat(type, "-").concat(shade)] = classFor("bg", type, hoverShade, channelValue, true);
28969
+ theme[variant]["hover-border-".concat(type, "-").concat(shade)] = classFor("border", type, hoverShade, channelValue, true);
28970
+ theme[variant]["border-".concat(type, "-").concat(shade)] = classFor("border", type, numShade, channelValue);
28946
28971
  // we should be "flipping" these so dark text on light and light on dark...
28947
- theme[variant]["text-".concat(type, "-").concat(shade)] = "text-".concat(theme[type], "-").concat(invert(variants[variant][shade]));
28948
- theme[variant]["hover-text-".concat(type, "-").concat(shade)] = "hover:text-".concat(theme[type], "-").concat(invert(variants[variant][shade]));
28972
+ theme[variant]["text-".concat(type, "-").concat(shade)] = classFor("text", type, textShade, channelValue);
28973
+ theme[variant]["hover-text-".concat(type, "-").concat(shade)] = classFor("text", type, textShade, channelValue, true);
28949
28974
  });
28950
28975
  });
28951
28976
  });
28952
28977
 
28953
- // lets try gradients
28954
-
28955
- // Primary
28956
-
28957
- theme["dark"]["bg-primary-gradient-right"] = "bg-gradient-to-r from-".concat(theme.primary, "-").concat(variants["dark"]["medium"], " via-").concat(theme.primary, "-").concat(variants["dark"]["medium"], " to-").concat(theme.primary, "-").concat(variants["dark"]["dark"]);
28958
- theme["dark"]["bg-primary-gradient-bottom"] = "bg-gradient-to-b from-".concat(theme.primary, "-").concat(variants["dark"]["medium"], " via-").concat(theme.primary, "-").concat(variants["dark"]["medium"], " to-").concat(theme.primary, "-").concat(variants["dark"]["dark"]);
28959
- theme["dark"]["bg-primary-gradient-bottom-right"] = "bg-gradient-to-br from-".concat(theme.primary, "-").concat(variants["dark"]["medium"], " via-").concat(theme.primary, "-").concat(variants["dark"]["medium"], " to-").concat(theme.primary, "-").concat(variants["dark"]["dark"]);
28960
- theme["dark"]["bg-primary-gradient-bottom-left"] = "bg-gradient-to-bl from-".concat(theme.primary, "-").concat(variants["dark"]["medium"], " via-").concat(theme.primary, "-").concat(variants["dark"]["medium"], " to-").concat(theme.primary, "-").concat(variants["dark"]["dark"]);
28961
- theme["dark"]["bg-primary-gradient-left"] = "bg-gradient-to-l from-".concat(theme.primary, "-").concat(variants["dark"]["medium"], " via-").concat(theme.primary, "-").concat(variants["dark"]["medium"], " to-").concat(theme.primary, "-").concat(variants["dark"]["dark"]);
28962
- theme["dark"]["bg-primary-gradient-top"] = "bg-gradient-to-t from-".concat(theme.primary, "-").concat(variants["dark"]["medium"], " via-").concat(theme.primary, "-").concat(variants["dark"]["medium"], " to-").concat(theme.primary, "-").concat(variants["dark"]["dark"]);
28963
- theme["dark"]["bg-primary-gradient-top-right"] = "bg-gradient-to-tr from-".concat(theme.primary, "-").concat(variants["dark"]["medium"], " via-").concat(theme.primary, "-").concat(variants["dark"]["medium"], " to-").concat(theme.primary, "-").concat(variants["dark"]["dark"]);
28964
- theme["dark"]["bg-primary-gradient-top-left"] = "bg-gradient-to-tl from-".concat(theme.primary, "-").concat(variants["dark"]["medium"], " via-").concat(theme.primary, "-").concat(variants["dark"]["medium"], " to-").concat(theme.primary, "-").concat(variants["dark"]["dark"]);
28965
- theme["light"]["bg-primary-gradient-right"] = "bg-gradient-to-r from-".concat(theme.primary, "-").concat(variants["light"]["medium"], " via-").concat(theme.primary, "-").concat(variants["light"]["medium"], " to-").concat(theme.primary, "-").concat(variants["light"]["dark"]);
28966
- theme["light"]["bg-primary-gradient-bottom"] = "bg-gradient-to-b from-".concat(theme.primary, "-").concat(variants["light"]["medium"], " via-").concat(theme.primary, "-").concat(variants["light"]["medium"], " to-").concat(theme.primary, "-").concat(variants["light"]["dark"]);
28967
- theme["light"]["bg-primary-gradient-left"] = "bg-gradient-to-l from-".concat(theme.primary, "-").concat(variants["light"]["medium"], " via-").concat(theme.primary, "-").concat(variants["light"]["medium"], " to-").concat(theme.primary, "-").concat(variants["light"]["dark"]);
28968
- theme["light"]["bg-primary-gradient-top"] = "bg-gradient-to-t from-".concat(theme.primary, "-").concat(variants["light"]["medium"], " via-").concat(theme.primary, "-").concat(variants["light"]["medium"], " to-").concat(theme.primary, "-").concat(variants["light"]["dark"]);
28969
- theme["light"]["bg-primary-gradient-top-right"] = "bg-gradient-to-tr from-".concat(theme.primary, "-").concat(variants["light"]["medium"], " via-").concat(theme.primary, "-").concat(variants["light"]["medium"], " to-").concat(theme.primary, "-").concat(variants["light"]["dark"]);
28970
- theme["light"]["bg-primary-gradient-bottom-right"] = "bg-gradient-to-br from-".concat(theme.primary, "-").concat(variants["light"]["medium"], " via-").concat(theme.primary, "-").concat(variants["light"]["medium"], " to-").concat(theme.primary, "-").concat(variants["light"]["dark"]);
28971
- theme["light"]["bg-primary-gradient-top-left"] = "bg-gradient-to-tl from-".concat(theme.primary, "-").concat(variants["light"]["medium"], " via-").concat(theme.primary, "-").concat(variants["light"]["medium"], " to-").concat(theme.primary, "-").concat(variants["light"]["dark"]);
28972
- theme["light"]["bg-primary-gradient-bottom-left"] = "bg-gradient-to-bl from-".concat(theme.primary, "-").concat(variants["light"]["medium"], " via-").concat(theme.primary, "-").concat(variants["light"]["medium"], " to-").concat(theme.primary, "-").concat(variants["light"]["dark"]);
28973
-
28974
- // Secondary
28975
-
28976
- theme["dark"]["bg-secondary-gradient-right"] = "bg-gradient-to-r from-".concat(theme.secondary, "-").concat(variants["dark"]["medium"], " via-").concat(theme.secondary, "-").concat(variants["dark"]["medium"], " to-").concat(theme.secondary, "-").concat(variants["dark"]["dark"]);
28977
- theme["dark"]["bg-secondary-gradient-bottom"] = "bg-gradient-to-b from-".concat(theme.secondary, "-").concat(variants["dark"]["medium"], " via-").concat(theme.secondary, "-").concat(variants["dark"]["medium"], " to-").concat(theme.secondary, "-").concat(variants["dark"]["dark"]);
28978
- theme["dark"]["bg-secondary-gradient-bottom-right"] = "bg-gradient-to-br from-".concat(theme.secondary, "-").concat(variants["dark"]["medium"], " via-").concat(theme.secondary, "-").concat(variants["dark"]["medium"], " to-").concat(theme.secondary, "-").concat(variants["dark"]["dark"]);
28979
- theme["dark"]["bg-secondary-gradient-bottom-left"] = "bg-gradient-to-bl from-".concat(theme.secondary, "-").concat(variants["dark"]["medium"], " via-").concat(theme.secondary, "-").concat(variants["dark"]["medium"], " to-").concat(theme.secondary, "-").concat(variants["dark"]["dark"]);
28980
- theme["dark"]["bg-secondary-gradient-left"] = "bg-gradient-to-l from-".concat(theme.secondary, "-").concat(variants["dark"]["medium"], " via-").concat(theme.secondary, "-").concat(variants["dark"]["medium"], " to-").concat(theme.secondary, "-").concat(variants["dark"]["dark"]);
28981
- theme["dark"]["bg-secondary-gradient-top"] = "bg-gradient-to-t from-".concat(theme.secondary, "-").concat(variants["dark"]["medium"], " via-").concat(theme.secondary, "-").concat(variants["dark"]["medium"], " to-").concat(theme.secondary, "-").concat(variants["dark"]["dark"]);
28982
- theme["dark"]["bg-secondary-gradient-top-right"] = "bg-gradient-to-tr from-".concat(theme.secondary, "-").concat(variants["dark"]["medium"], " via-").concat(theme.secondary, "-").concat(variants["dark"]["medium"], " to-").concat(theme.secondary, "-").concat(variants["dark"]["dark"]);
28983
- theme["dark"]["bg-secondary-gradient-top-left"] = "bg-gradient-to-tl from-".concat(theme.secondary, "-").concat(variants["dark"]["medium"], " via-").concat(theme.secondary, "-").concat(variants["dark"]["medium"], " to-").concat(theme.secondary, "-").concat(variants["dark"]["dark"]);
28984
- theme["light"]["bg-secondary-gradient-right"] = "bg-gradient-to-r from-".concat(theme.secondary, "-").concat(variants["light"]["medium"], " via-").concat(theme.secondary, "-").concat(variants["light"]["medium"], " to-").concat(theme.secondary, "-").concat(variants["light"]["dark"]);
28985
- theme["light"]["bg-secondary-gradient-bottom"] = "bg-gradient-to-b from-".concat(theme.secondary, "-").concat(variants["light"]["medium"], " via-").concat(theme.secondary, "-").concat(variants["light"]["medium"], " to-").concat(theme.secondary, "-").concat(variants["light"]["dark"]);
28986
- theme["light"]["bg-secondary-gradient-left"] = "bg-gradient-to-l from-".concat(theme.secondary, "-").concat(variants["light"]["medium"], " via-").concat(theme.secondary, "-").concat(variants["light"]["medium"], " to-").concat(theme.secondary, "-").concat(variants["light"]["dark"]);
28987
- theme["light"]["bg-secondary-gradient-top"] = "bg-gradient-to-t from-".concat(theme.secondary, "-").concat(variants["light"]["medium"], " via-").concat(theme.secondary, "-").concat(variants["light"]["medium"], " to-").concat(theme.secondary, "-").concat(variants["light"]["dark"]);
28988
- theme["light"]["bg-secondary-gradient-top-right"] = "bg-gradient-to-tr from-".concat(theme.secondary, "-").concat(variants["light"]["medium"], " via-").concat(theme.secondary, "-").concat(variants["light"]["medium"], " to-").concat(theme.secondary, "-").concat(variants["light"]["dark"]);
28989
- theme["light"]["bg-secondary-gradient-bottom-right"] = "bg-gradient-to-br from-".concat(theme.secondary, "-").concat(variants["light"]["medium"], " via-").concat(theme.secondary, "-").concat(variants["light"]["medium"], " to-").concat(theme.secondary, "-").concat(variants["light"]["dark"]);
28990
- theme["light"]["bg-secondary-gradient-top-left"] = "bg-gradient-to-tl from-".concat(theme.secondary, "-").concat(variants["light"]["medium"], " via-").concat(theme.secondary, "-").concat(variants["light"]["medium"], " to-").concat(theme.secondary, "-").concat(variants["light"]["dark"]);
28991
- theme["light"]["bg-secondary-gradient-bottom-left"] = "bg-gradient-to-bl from-".concat(theme.secondary, "-").concat(variants["light"]["medium"], " via-").concat(theme.secondary, "-").concat(variants["light"]["medium"], " to-").concat(theme.secondary, "-").concat(variants["light"]["dark"]);
28992
-
28993
- // Tertiary
28994
-
28995
- theme["dark"]["bg-tertiary-gradient-right"] = "bg-gradient-to-r from-".concat(theme.tertiary, "-").concat(variants["dark"]["medium"], " via-").concat(theme.tertiary, "-").concat(variants["dark"]["medium"], " to-").concat(theme.tertiary, "-").concat(variants["dark"]["dark"]);
28996
- theme["dark"]["bg-tertiary-gradient-bottom"] = "bg-gradient-to-b from-".concat(theme.tertiary, "-").concat(variants["dark"]["medium"], " via-").concat(theme.tertiary, "-").concat(variants["dark"]["medium"], " to-").concat(theme.tertiary, "-").concat(variants["dark"]["dark"]);
28997
- theme["dark"]["bg-tertiary-gradient-bottom-right"] = "bg-gradient-to-br from-".concat(theme.tertiary, "-").concat(variants["dark"]["medium"], " via-").concat(theme.tertiary, "-").concat(variants["dark"]["medium"], " to-").concat(theme.tertiary, "-").concat(variants["dark"]["dark"]);
28998
- theme["dark"]["bg-tertiary-gradient-bottom-left"] = "bg-gradient-to-bl from-".concat(theme.tertiary, "-").concat(variants["dark"]["medium"], " via-").concat(theme.tertiary, "-").concat(variants["dark"]["medium"], " to-").concat(theme.tertiary, "-").concat(variants["dark"]["dark"]);
28999
- theme["dark"]["bg-tertiary-gradient-left"] = "bg-gradient-to-l from-".concat(theme.tertiary, "-").concat(variants["dark"]["medium"], " via-").concat(theme.tertiary, "-").concat(variants["dark"]["medium"], " to-").concat(theme.tertiary, "-").concat(variants["dark"]["dark"]);
29000
- theme["dark"]["bg-tertiary-gradient-top"] = "bg-gradient-to-t from-".concat(theme.tertiary, "-").concat(variants["dark"]["medium"], " via-").concat(theme.tertiary, "-").concat(variants["dark"]["medium"], " to-").concat(theme.tertiary, "-").concat(variants["dark"]["dark"]);
29001
- theme["dark"]["bg-tertiary-gradient-top-right"] = "bg-gradient-to-tr from-".concat(theme.tertiary, "-").concat(variants["dark"]["medium"], " via-").concat(theme.tertiary, "-").concat(variants["dark"]["medium"], " to-").concat(theme.tertiary, "-").concat(variants["dark"]["dark"]);
29002
- theme["dark"]["bg-tertiary-gradient-top-left"] = "bg-gradient-to-tl from-".concat(theme.tertiary, "-").concat(variants["dark"]["medium"], " via-").concat(theme.tertiary, "-").concat(variants["dark"]["medium"], " to-").concat(theme.tertiary, "-").concat(variants["dark"]["dark"]);
29003
- theme["light"]["bg-tertiary-gradient-right"] = "bg-gradient-to-r from-".concat(theme.tertiary, "-").concat(variants["light"]["medium"], " via-").concat(theme.tertiary, "-").concat(variants["light"]["medium"], " to-").concat(theme.tertiary, "-").concat(variants["light"]["dark"]);
29004
- theme["light"]["bg-tertiary-gradient-bottom"] = "bg-gradient-to-b from-".concat(theme.tertiary, "-").concat(variants["light"]["medium"], " via-").concat(theme.tertiary, "-").concat(variants["light"]["medium"], " to-").concat(theme.tertiary, "-").concat(variants["light"]["dark"]);
29005
- theme["light"]["bg-tertiary-gradient-left"] = "bg-gradient-to-l from-".concat(theme.tertiary, "-").concat(variants["light"]["medium"], " via-").concat(theme.tertiary, "-").concat(variants["light"]["medium"], " to-").concat(theme.tertiary, "-").concat(variants["light"]["dark"]);
29006
- theme["light"]["bg-tertiary-gradient-top"] = "bg-gradient-to-t from-".concat(theme.tertiary, "-").concat(variants["light"]["medium"], " via-").concat(theme.tertiary, "-").concat(variants["light"]["medium"], " to-").concat(theme.tertiary, "-").concat(variants["light"]["dark"]);
29007
- theme["light"]["bg-tertiary-gradient-top-right"] = "bg-gradient-to-tr from-".concat(theme.tertiary, "-").concat(variants["light"]["medium"], " via-").concat(theme.tertiary, "-").concat(variants["light"]["medium"], " to-").concat(theme.tertiary, "-").concat(variants["light"]["dark"]);
29008
- theme["light"]["bg-tertiary-gradient-bottom-right"] = "bg-gradient-to-br from-".concat(theme.tertiary, "-").concat(variants["light"]["medium"], " via-").concat(theme.tertiary, "-").concat(variants["light"]["medium"], " to-").concat(theme.tertiary, "-").concat(variants["light"]["dark"]);
29009
- theme["light"]["bg-tertiary-gradient-top-left"] = "bg-gradient-to-tl from-".concat(theme.tertiary, "-").concat(variants["light"]["medium"], " via-").concat(theme.tertiary, "-").concat(variants["light"]["medium"], " to-").concat(theme.tertiary, "-").concat(variants["light"]["dark"]);
29010
- theme["light"]["bg-tertiary-gradient-bottom-left"] = "bg-gradient-to-bl from-".concat(theme.tertiary, "-").concat(variants["light"]["medium"], " via-").concat(theme.tertiary, "-").concat(variants["light"]["medium"], " to-").concat(theme.tertiary, "-").concat(variants["light"]["dark"]);
28978
+ // Gradients — primary/secondary/tertiary, 8 directions × 2 variants.
28979
+ // Each gradient goes from the variant's medium shade via medium to dark.
28980
+ // For hex channels, the gradient stops use `from-[var(--type-shade)]` etc.
28981
+ var gradientDirs = {
28982
+ right: "r",
28983
+ bottom: "b",
28984
+ "bottom-right": "br",
28985
+ "bottom-left": "bl",
28986
+ left: "l",
28987
+ top: "t",
28988
+ "top-right": "tr",
28989
+ "top-left": "tl"
28990
+ };
28991
+ ["primary", "secondary", "tertiary"].forEach(function (type) {
28992
+ var channelValue = theme[type];
28993
+ Object.keys(variants).forEach(function (variant) {
28994
+ var fromShade = variants[variant]["medium"];
28995
+ var viaShade = variants[variant]["medium"];
28996
+ var toShade = variants[variant]["dark"];
28997
+ Object.entries(gradientDirs).forEach(function (_ref) {
28998
+ var _ref2 = _slicedToArray(_ref, 2),
28999
+ suffix = _ref2[0],
29000
+ dirCode = _ref2[1];
29001
+ theme[variant]["bg-".concat(type, "-gradient-").concat(suffix)] = gradientFor(dirCode, type, fromShade, viaShade, toShade, channelValue);
29002
+ });
29003
+ });
29004
+ });
29011
29005
 
29012
29006
  // now for the overrides!
29013
29007
  if (overrideDark !== null) {
@@ -29041,10 +29035,39 @@ var ThemeModel = function ThemeModel() {
29041
29035
  // Added outside the variant loop to avoid generating invalid text/border
29042
29036
  // classes (invert(950) would be negative).
29043
29037
  DashReact.colorTypes.forEach(function (type) {
29044
- theme["dark"]["bg-".concat(type, "-darkest")] = "bg-".concat(theme[type], "-950");
29045
- theme["light"]["bg-".concat(type, "-darkest")] = "bg-".concat(theme[type], "-50");
29038
+ var channelValue = theme[type];
29039
+ theme["dark"]["bg-".concat(type, "-darkest")] = classFor("bg", type, 950, channelValue);
29040
+ theme["light"]["bg-".concat(type, "-darkest")] = classFor("bg", type, 50, channelValue);
29046
29041
  });
29047
29042
 
29043
+ // Accumulate CSS custom properties for any hex-color channels.
29044
+ // ThemePreviewProvider reads `currentTheme.cssVars` and writes
29045
+ // these to `document.documentElement.style` on theme activation
29046
+ // (PRD `arbitrary-color-themes.md` FR-003).
29047
+ var cssVarsAll = {};
29048
+ var hasAnyHex = false;
29049
+ DashReact.colorTypes.forEach(function (type) {
29050
+ var channelValue = theme[type];
29051
+ if (DashReact.isHexColor(channelValue)) {
29052
+ hasAnyHex = true;
29053
+ var shades = DashReact.deriveShades(channelValue);
29054
+ if (shades) {
29055
+ for (var _i = 0, _Object$entries = Object.entries(shades); _i < _Object$entries.length; _i++) {
29056
+ var _Object$entries$_i = _slicedToArray(_Object$entries[_i], 2),
29057
+ shade = _Object$entries$_i[0],
29058
+ hex = _Object$entries$_i[1];
29059
+ cssVarsAll["--".concat(type, "-").concat(shade)] = hex;
29060
+ }
29061
+ }
29062
+ }
29063
+ });
29064
+ if (hasAnyHex) {
29065
+ // Attach to both variants so whichever is active on theme switch
29066
+ // delivers the same CSS variable set to :root.
29067
+ theme["dark"].cssVars = cssVarsAll;
29068
+ theme["light"].cssVars = cssVarsAll;
29069
+ }
29070
+
29048
29071
  // transparent colors
29049
29072
  theme["dark"]["bg-none"] = "bg-transparent";
29050
29073
  theme["dark"]["border-none"] = "border-transparent";
@@ -60015,10 +60038,7 @@ function ListenersTab(_ref0) {
60015
60038
  className: "flex flex-col gap-3 h-full min-h-0",
60016
60039
  children: /*#__PURE__*/jsxRuntime.jsxs("div", {
60017
60040
  className: "flex flex-row gap-3 flex-1 min-h-0",
60018
- children: [/*#__PURE__*/jsxRuntime.jsxs(DashReact.Card2, {
60019
- padding: "",
60020
- shadow: "",
60021
- rounded: "rounded-lg",
60041
+ children: [/*#__PURE__*/jsxRuntime.jsxs("div", {
60022
60042
  className: "w-56 flex-shrink-0 overflow-hidden flex flex-col",
60023
60043
  children: [/*#__PURE__*/jsxRuntime.jsx("div", {
60024
60044
  className: "px-3 py-2 text-xs font-semibold opacity-50 uppercase tracking-wider",
@@ -60063,10 +60083,7 @@ function ListenersTab(_ref0) {
60063
60083
  onAdd: onAdd,
60064
60084
  onRemove: onRemove
60065
60085
  })]
60066
- }) : /*#__PURE__*/jsxRuntime.jsx(DashReact.Card2, {
60067
- padding: "",
60068
- shadow: "",
60069
- rounded: "rounded-lg",
60086
+ }) : /*#__PURE__*/jsxRuntime.jsx("div", {
60070
60087
  className: "flex-1 min-w-0 flex items-center justify-center text-sm opacity-60",
60071
60088
  children: "Pick a widget on the left to wire its handlers."
60072
60089
  })]
@@ -60101,45 +60118,47 @@ function HandlersColumn(_ref10) {
60101
60118
  }
60102
60119
  return m;
60103
60120
  }, [myWiring]);
60104
- return /*#__PURE__*/jsxRuntime.jsxs(DashReact.Card2, {
60105
- padding: "",
60106
- shadow: "",
60107
- rounded: "rounded-lg",
60108
- className: "w-56 flex-shrink-0 overflow-hidden flex flex-col",
60109
- children: [/*#__PURE__*/jsxRuntime.jsx("div", {
60110
- className: "px-3 py-2 text-xs font-semibold opacity-50 uppercase tracking-wider",
60111
- children: "Event Handlers"
60112
- }), /*#__PURE__*/jsxRuntime.jsx(DashReact.Divider, {}), /*#__PURE__*/jsxRuntime.jsx("div", {
60113
- className: "overflow-y-auto flex-1",
60114
- children: receiver.eventHandlers.length === 0 ? /*#__PURE__*/jsxRuntime.jsx("div", {
60115
- className: "text-xs opacity-50 text-center py-6 px-3",
60116
- children: "This widget declares no event handlers."
60117
- }) : receiver.eventHandlers.map(function (h) {
60118
- var isActive = h === selectedHandler;
60119
- var count = countsByHandler.get(h) || 0;
60120
- return /*#__PURE__*/jsxRuntime.jsxs("button", {
60121
- type: "button",
60122
- onClick: function onClick() {
60123
- return onSelectHandler(h);
60124
- },
60125
- className: "w-full text-left px-3 py-2 text-sm flex items-center justify-between gap-2 border-l-2 ".concat(isActive ? "bg-indigo-900/30 border-indigo-400" : "border-transparent hover:bg-white/5"),
60126
- children: [/*#__PURE__*/jsxRuntime.jsxs("span", {
60127
- className: "flex items-center gap-2 min-w-0",
60128
- children: [/*#__PURE__*/jsxRuntime.jsx(DashReact.FontAwesomeIcon, {
60129
- icon: "bolt",
60130
- className: "h-3 w-3 opacity-60 flex-shrink-0"
60131
- }), /*#__PURE__*/jsxRuntime.jsx("code", {
60132
- className: "truncate",
60133
- children: h
60121
+ return (
60122
+ /*#__PURE__*/
60123
+ // Plain <div> wrapper — Card2 reads as washed-out against the
60124
+ // modal's dark chrome. See ListenersTab + ProvidersTab fix.
60125
+ jsxRuntime.jsxs("div", {
60126
+ className: "w-56 flex-shrink-0 overflow-hidden flex flex-col",
60127
+ children: [/*#__PURE__*/jsxRuntime.jsx("div", {
60128
+ className: "px-3 py-2 text-xs font-semibold opacity-50 uppercase tracking-wider",
60129
+ children: "Event Handlers"
60130
+ }), /*#__PURE__*/jsxRuntime.jsx(DashReact.Divider, {}), /*#__PURE__*/jsxRuntime.jsx("div", {
60131
+ className: "overflow-y-auto flex-1",
60132
+ children: receiver.eventHandlers.length === 0 ? /*#__PURE__*/jsxRuntime.jsx("div", {
60133
+ className: "text-xs opacity-50 text-center py-6 px-3",
60134
+ children: "This widget declares no event handlers."
60135
+ }) : receiver.eventHandlers.map(function (h) {
60136
+ var isActive = h === selectedHandler;
60137
+ var count = countsByHandler.get(h) || 0;
60138
+ return /*#__PURE__*/jsxRuntime.jsxs("button", {
60139
+ type: "button",
60140
+ onClick: function onClick() {
60141
+ return onSelectHandler(h);
60142
+ },
60143
+ className: "w-full text-left px-3 py-2 text-sm flex items-center justify-between gap-2 border-l-2 ".concat(isActive ? "bg-indigo-900/30 border-indigo-400" : "border-transparent hover:bg-white/5"),
60144
+ children: [/*#__PURE__*/jsxRuntime.jsxs("span", {
60145
+ className: "flex items-center gap-2 min-w-0",
60146
+ children: [/*#__PURE__*/jsxRuntime.jsx(DashReact.FontAwesomeIcon, {
60147
+ icon: "bolt",
60148
+ className: "h-3 w-3 opacity-60 flex-shrink-0"
60149
+ }), /*#__PURE__*/jsxRuntime.jsx("code", {
60150
+ className: "truncate",
60151
+ children: h
60152
+ })]
60153
+ }), /*#__PURE__*/jsxRuntime.jsx("span", {
60154
+ className: "text-xs opacity-60 flex-shrink-0",
60155
+ children: count
60134
60156
  })]
60135
- }), /*#__PURE__*/jsxRuntime.jsx("span", {
60136
- className: "text-xs opacity-60 flex-shrink-0",
60137
- children: count
60138
- })]
60139
- }, h);
60140
- })
60141
- })]
60142
- });
60157
+ }, h);
60158
+ })
60159
+ })]
60160
+ })
60161
+ );
60143
60162
  }
60144
60163
 
60145
60164
  /**
@@ -60190,10 +60209,7 @@ function EventsColumn(_ref11) {
60190
60209
  return w.isOrphan;
60191
60210
  });
60192
60211
  if (!handlerName) {
60193
- return /*#__PURE__*/jsxRuntime.jsx(DashReact.Card2, {
60194
- padding: "",
60195
- shadow: "",
60196
- rounded: "rounded-lg",
60212
+ return /*#__PURE__*/jsxRuntime.jsx("div", {
60197
60213
  className: "flex-1 min-w-0 flex items-center justify-center text-sm opacity-60",
60198
60214
  children: "Select a handler to view available events."
60199
60215
  });
@@ -60222,63 +60238,64 @@ function EventsColumn(_ref11) {
60222
60238
  var emittersForList = emitters.filter(function (e) {
60223
60239
  return !(e.component === receiver.component && String(e.itemId) === String(receiver.itemId));
60224
60240
  });
60225
- return /*#__PURE__*/jsxRuntime.jsxs(DashReact.Card2, {
60226
- padding: "",
60227
- shadow: "",
60228
- rounded: "rounded-lg",
60229
- className: "flex-1 min-w-0 overflow-hidden flex flex-col",
60230
- children: [/*#__PURE__*/jsxRuntime.jsxs("div", {
60231
- className: "flex-shrink-0 px-4 py-2 text-xs opacity-60",
60232
- children: ["Check an event to fire ", /*#__PURE__*/jsxRuntime.jsx("code", {
60233
- className: "text-xs",
60234
- children: handlerName
60235
- }), " on", " ", /*#__PURE__*/jsxRuntime.jsx("span", {
60236
- className: "font-medium",
60237
- children: receiver.label
60238
- }), "."]
60239
- }), /*#__PURE__*/jsxRuntime.jsx(DashReact.Divider, {}), /*#__PURE__*/jsxRuntime.jsx("div", {
60240
- className: "flex-1 overflow-y-auto p-4 space-y-5",
60241
- children: emittersForList.length === 0 ? /*#__PURE__*/jsxRuntime.jsx("div", {
60242
- className: "text-sm opacity-60",
60243
- children: "No other widgets in this dashboard emit events."
60244
- }) : emittersForList.map(function (e) {
60245
- return /*#__PURE__*/jsxRuntime.jsxs("div", {
60246
- className: "space-y-1",
60247
- children: [/*#__PURE__*/jsxRuntime.jsxs("div", {
60248
- className: "flex flex-col gap-0.5 mb-1",
60249
- children: [/*#__PURE__*/jsxRuntime.jsx("div", {
60250
- className: "text-sm font-semibold",
60251
- children: e.label
60252
- }), (e.widgetRef || e.component) && /*#__PURE__*/jsxRuntime.jsx(DashReact.Caption, {
60253
- block: true,
60254
- className: "font-mono truncate",
60255
- children: (e.widgetRef || e.component) + (e.itemId != null ? "[".concat(e.itemId, "]") : "")
60256
- })]
60257
- }), e.events.map(function (eventName) {
60258
- var key = "".concat(e.component, "|").concat(e.itemId, "|").concat(eventName);
60259
- var selected = wiredKeys.has(key);
60260
- return /*#__PURE__*/jsxRuntime.jsxs("label", {
60261
- className: "flex items-center gap-3 px-3 py-1.5 rounded-md cursor-pointer text-sm ".concat(selected ? "opacity-100" : "opacity-70 hover:opacity-100"),
60262
- children: [/*#__PURE__*/jsxRuntime.jsx(DashReact.FontAwesomeIcon, {
60263
- icon: selected ? "square-check" : "square",
60264
- className: "h-4 w-4 flex-shrink-0",
60265
- onClick: function onClick(ev) {
60266
- ev.preventDefault();
60267
- toggle({
60268
- sourceComponent: e.component,
60269
- sourceItemId: e.itemId,
60270
- eventName: eventName
60271
- });
60272
- }
60273
- }), /*#__PURE__*/jsxRuntime.jsx("span", {
60274
- children: eventName
60241
+ return (
60242
+ /*#__PURE__*/
60243
+ // Plain <div> — Card2's washed-out fill clashes with the modal chrome.
60244
+ jsxRuntime.jsxs("div", {
60245
+ className: "flex-1 min-w-0 overflow-hidden flex flex-col",
60246
+ children: [/*#__PURE__*/jsxRuntime.jsxs("div", {
60247
+ className: "flex-shrink-0 px-4 py-2 text-xs opacity-60",
60248
+ children: ["Check an event to fire ", /*#__PURE__*/jsxRuntime.jsx("code", {
60249
+ className: "text-xs",
60250
+ children: handlerName
60251
+ }), " on", " ", /*#__PURE__*/jsxRuntime.jsx("span", {
60252
+ className: "font-medium",
60253
+ children: receiver.label
60254
+ }), "."]
60255
+ }), /*#__PURE__*/jsxRuntime.jsx(DashReact.Divider, {}), /*#__PURE__*/jsxRuntime.jsx("div", {
60256
+ className: "flex-1 overflow-y-auto p-4 space-y-5",
60257
+ children: emittersForList.length === 0 ? /*#__PURE__*/jsxRuntime.jsx("div", {
60258
+ className: "text-sm opacity-60",
60259
+ children: "No other widgets in this dashboard emit events."
60260
+ }) : emittersForList.map(function (e) {
60261
+ return /*#__PURE__*/jsxRuntime.jsxs("div", {
60262
+ className: "space-y-1",
60263
+ children: [/*#__PURE__*/jsxRuntime.jsxs("div", {
60264
+ className: "flex flex-col gap-0.5 mb-1",
60265
+ children: [/*#__PURE__*/jsxRuntime.jsx("div", {
60266
+ className: "text-sm font-semibold",
60267
+ children: e.label
60268
+ }), (e.widgetRef || e.component) && /*#__PURE__*/jsxRuntime.jsx(DashReact.Caption, {
60269
+ block: true,
60270
+ className: "font-mono truncate",
60271
+ children: (e.widgetRef || e.component) + (e.itemId != null ? "[".concat(e.itemId, "]") : "")
60275
60272
  })]
60276
- }, key);
60277
- })]
60278
- }, e.key || "".concat(e.component, "|").concat(e.itemId));
60279
- })
60280
- })]
60281
- });
60273
+ }), e.events.map(function (eventName) {
60274
+ var key = "".concat(e.component, "|").concat(e.itemId, "|").concat(eventName);
60275
+ var selected = wiredKeys.has(key);
60276
+ return /*#__PURE__*/jsxRuntime.jsxs("label", {
60277
+ className: "flex items-center gap-3 px-3 py-1.5 rounded-md cursor-pointer text-sm ".concat(selected ? "opacity-100" : "opacity-70 hover:opacity-100"),
60278
+ children: [/*#__PURE__*/jsxRuntime.jsx(DashReact.FontAwesomeIcon, {
60279
+ icon: selected ? "square-check" : "square",
60280
+ className: "h-4 w-4 flex-shrink-0",
60281
+ onClick: function onClick(ev) {
60282
+ ev.preventDefault();
60283
+ toggle({
60284
+ sourceComponent: e.component,
60285
+ sourceItemId: e.itemId,
60286
+ eventName: eventName
60287
+ });
60288
+ }
60289
+ }), /*#__PURE__*/jsxRuntime.jsx("span", {
60290
+ children: eventName
60291
+ })]
60292
+ }, key);
60293
+ })]
60294
+ }, e.key || "".concat(e.component, "|").concat(e.itemId));
60295
+ })
60296
+ })]
60297
+ })
60298
+ );
60282
60299
  }
60283
60300
 
60284
60301
  function ownKeys$9(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }