@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.esm.js CHANGED
@@ -1897,11 +1897,7 @@ var themes = {
1897
1897
  dark: {
1898
1898
  "bg-primary-very-dark": "bg-black" // override test
1899
1899
  },
1900
- light: {
1901
- "bg-primary-very-light": "bg-white",
1902
- // override test
1903
- "bg-primary-very-dark": "bg-gray-600" // override test
1904
- }
1900
+ light: {}
1905
1901
  },
1906
1902
  "theme-2": {
1907
1903
  name: "Default 2",
@@ -1914,11 +1910,7 @@ var themes = {
1914
1910
  dark: {
1915
1911
  "bg-primary-very-dark": "bg-black" // override test
1916
1912
  },
1917
- light: {
1918
- "bg-primary-very-light": "bg-white",
1919
- // override test
1920
- "bg-primary-very-dark": "bg-gray-600" // override test
1921
- }
1913
+ light: {}
1922
1914
  }
1923
1915
  };
1924
1916
  var ThemeWrapper = function ThemeWrapper(_ref) {
@@ -21641,8 +21633,8 @@ var ThemeModel = function ThemeModel() {
21641
21633
  "very-light": 100,
21642
21634
  light: 200,
21643
21635
  medium: 300,
21644
- dark: 400,
21645
- "very-dark": 500
21636
+ dark: 200,
21637
+ "very-dark": 100
21646
21638
  },
21647
21639
  dark: {
21648
21640
  "very-light": 500,
@@ -21738,8 +21730,14 @@ var ThemeModel = function ThemeModel() {
21738
21730
  });
21739
21731
  }
21740
21732
  if (overrideLight !== null) {
21733
+ // Strip stale light overrides from pre-fix saved themes.
21734
+ // These were band-aids for the old linear shade mapping and
21735
+ // conflict with the corrected light variant (100-300 range).
21736
+ var staleKeys = ["bg-primary-very-light", "bg-primary-very-dark"];
21741
21737
  Object.keys(overrideLight).forEach(function (key) {
21742
- theme["light"][key] = overrideLight[key];
21738
+ if (!staleKeys.includes(key)) {
21739
+ theme["light"][key] = overrideLight[key];
21740
+ }
21743
21741
  });
21744
21742
  }
21745
21743
 
@@ -35783,12 +35781,6 @@ var ThemesSection = function ThemesSection(_ref) {
35783
35781
  saveAndSelectTheme(key, preset);
35784
35782
  setGenerateMode(GENERATE_MODES.NONE);
35785
35783
  }
35786
- function handleCreateFromRandom() {
35787
- if (!dashApi || !appId) return;
35788
- var theme = generateRandomTheme();
35789
- var key = theme.id;
35790
- saveAndSelectTheme(key, theme);
35791
- }
35792
35784
  function handleCreateFromHarmony(theme) {
35793
35785
  if (!dashApi || !appId) return;
35794
35786
  var key = theme.id;
@@ -35872,43 +35864,6 @@ var ThemesSection = function ThemesSection(_ref) {
35872
35864
  className: "text-xs opacity-50",
35873
35865
  children: themeVariant === "dark" ? "Dark" : "Light"
35874
35866
  })]
35875
- }), dashApi && appId && /*#__PURE__*/jsxs("div", {
35876
- className: "flex flex-col gap-1 px-2 py-3 border-b ".concat(rowStyles.borderColor || ""),
35877
- children: [/*#__PURE__*/jsx("span", {
35878
- className: "text-[10px] font-semibold opacity-30 uppercase tracking-wider px-2 pb-1",
35879
- children: "Generate"
35880
- }), /*#__PURE__*/jsx(Sidebar.Item, {
35881
- icon: /*#__PURE__*/jsx(FontAwesomeIcon, {
35882
- icon: "swatchbook",
35883
- className: "h-3 w-3"
35884
- }),
35885
- active: generateMode === GENERATE_MODES.PRESETS,
35886
- onClick: function onClick() {
35887
- setGenerateMode(GENERATE_MODES.PRESETS);
35888
- setSelectedThemeKey(null);
35889
- },
35890
- className: generateMode === GENERATE_MODES.PRESETS ? "bg-white/10 opacity-100" : "",
35891
- children: "From Presets"
35892
- }), /*#__PURE__*/jsx(Sidebar.Item, {
35893
- icon: /*#__PURE__*/jsx(FontAwesomeIcon, {
35894
- icon: "shuffle",
35895
- className: "h-3 w-3"
35896
- }),
35897
- onClick: handleCreateFromRandom,
35898
- children: "Random"
35899
- }), /*#__PURE__*/jsx(Sidebar.Item, {
35900
- icon: /*#__PURE__*/jsx(FontAwesomeIcon, {
35901
- icon: "droplet",
35902
- className: "h-3 w-3"
35903
- }),
35904
- active: generateMode === GENERATE_MODES.COLOR,
35905
- onClick: function onClick() {
35906
- setGenerateMode(GENERATE_MODES.COLOR);
35907
- setSelectedThemeKey(null);
35908
- },
35909
- className: generateMode === GENERATE_MODES.COLOR ? "bg-white/10 opacity-100" : "",
35910
- children: "From Color"
35911
- })]
35912
35867
  }), /*#__PURE__*/jsxs(Sidebar.Content, {
35913
35868
  children: [themeEntries.map(function (_ref4) {
35914
35869
  var _ref5 = _slicedToArray(_ref4, 2),