@trops/dash-core 0.1.111 → 0.1.113

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
@@ -1916,11 +1916,7 @@ var themes = {
1916
1916
  dark: {
1917
1917
  "bg-primary-very-dark": "bg-black" // override test
1918
1918
  },
1919
- light: {
1920
- "bg-primary-very-light": "bg-white",
1921
- // override test
1922
- "bg-primary-very-dark": "bg-gray-600" // override test
1923
- }
1919
+ light: {}
1924
1920
  },
1925
1921
  "theme-2": {
1926
1922
  name: "Default 2",
@@ -1933,11 +1929,7 @@ var themes = {
1933
1929
  dark: {
1934
1930
  "bg-primary-very-dark": "bg-black" // override test
1935
1931
  },
1936
- light: {
1937
- "bg-primary-very-light": "bg-white",
1938
- // override test
1939
- "bg-primary-very-dark": "bg-gray-600" // override test
1940
- }
1932
+ light: {}
1941
1933
  }
1942
1934
  };
1943
1935
  var ThemeWrapper = function ThemeWrapper(_ref) {
@@ -21660,8 +21652,8 @@ var ThemeModel = function ThemeModel() {
21660
21652
  "very-light": 100,
21661
21653
  light: 200,
21662
21654
  medium: 300,
21663
- dark: 400,
21664
- "very-dark": 500
21655
+ dark: 200,
21656
+ "very-dark": 100
21665
21657
  },
21666
21658
  dark: {
21667
21659
  "very-light": 500,
@@ -21757,8 +21749,14 @@ var ThemeModel = function ThemeModel() {
21757
21749
  });
21758
21750
  }
21759
21751
  if (overrideLight !== null) {
21752
+ // Strip stale light overrides from pre-fix saved themes.
21753
+ // These were band-aids for the old linear shade mapping and
21754
+ // conflict with the corrected light variant (100-300 range).
21755
+ var staleKeys = ["bg-primary-very-light", "bg-primary-very-dark"];
21760
21756
  Object.keys(overrideLight).forEach(function (key) {
21761
- theme["light"][key] = overrideLight[key];
21757
+ if (!staleKeys.includes(key)) {
21758
+ theme["light"][key] = overrideLight[key];
21759
+ }
21762
21760
  });
21763
21761
  }
21764
21762
 
@@ -35802,12 +35800,6 @@ var ThemesSection = function ThemesSection(_ref) {
35802
35800
  saveAndSelectTheme(key, preset);
35803
35801
  setGenerateMode(GENERATE_MODES.NONE);
35804
35802
  }
35805
- function handleCreateFromRandom() {
35806
- if (!dashApi || !appId) return;
35807
- var theme = generateRandomTheme();
35808
- var key = theme.id;
35809
- saveAndSelectTheme(key, theme);
35810
- }
35811
35803
  function handleCreateFromHarmony(theme) {
35812
35804
  if (!dashApi || !appId) return;
35813
35805
  var key = theme.id;
@@ -35891,43 +35883,6 @@ var ThemesSection = function ThemesSection(_ref) {
35891
35883
  className: "text-xs opacity-50",
35892
35884
  children: themeVariant === "dark" ? "Dark" : "Light"
35893
35885
  })]
35894
- }), dashApi && appId && /*#__PURE__*/jsxRuntime.jsxs("div", {
35895
- className: "flex flex-col gap-1 px-2 py-3 border-b ".concat(rowStyles.borderColor || ""),
35896
- children: [/*#__PURE__*/jsxRuntime.jsx("span", {
35897
- className: "text-[10px] font-semibold opacity-30 uppercase tracking-wider px-2 pb-1",
35898
- children: "Generate"
35899
- }), /*#__PURE__*/jsxRuntime.jsx(DashReact.Sidebar.Item, {
35900
- icon: /*#__PURE__*/jsxRuntime.jsx(DashReact.FontAwesomeIcon, {
35901
- icon: "swatchbook",
35902
- className: "h-3 w-3"
35903
- }),
35904
- active: generateMode === GENERATE_MODES.PRESETS,
35905
- onClick: function onClick() {
35906
- setGenerateMode(GENERATE_MODES.PRESETS);
35907
- setSelectedThemeKey(null);
35908
- },
35909
- className: generateMode === GENERATE_MODES.PRESETS ? "bg-white/10 opacity-100" : "",
35910
- children: "From Presets"
35911
- }), /*#__PURE__*/jsxRuntime.jsx(DashReact.Sidebar.Item, {
35912
- icon: /*#__PURE__*/jsxRuntime.jsx(DashReact.FontAwesomeIcon, {
35913
- icon: "shuffle",
35914
- className: "h-3 w-3"
35915
- }),
35916
- onClick: handleCreateFromRandom,
35917
- children: "Random"
35918
- }), /*#__PURE__*/jsxRuntime.jsx(DashReact.Sidebar.Item, {
35919
- icon: /*#__PURE__*/jsxRuntime.jsx(DashReact.FontAwesomeIcon, {
35920
- icon: "droplet",
35921
- className: "h-3 w-3"
35922
- }),
35923
- active: generateMode === GENERATE_MODES.COLOR,
35924
- onClick: function onClick() {
35925
- setGenerateMode(GENERATE_MODES.COLOR);
35926
- setSelectedThemeKey(null);
35927
- },
35928
- className: generateMode === GENERATE_MODES.COLOR ? "bg-white/10 opacity-100" : "",
35929
- children: "From Color"
35930
- })]
35931
35886
  }), /*#__PURE__*/jsxRuntime.jsxs(DashReact.Sidebar.Content, {
35932
35887
  children: [themeEntries.map(function (_ref4) {
35933
35888
  var _ref5 = _slicedToArray(_ref4, 2),