@trops/dash-core 0.1.569 → 0.1.570
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/electron/index.js +24 -0
- package/dist/electron/index.js.map +1 -1
- package/dist/index.esm.js +218 -67
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +217 -65
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -35957,6 +35957,20 @@ function getThemePresets() {
|
|
|
35957
35957
|
return [buildRawTheme("Ocean Depth", "blue", "cyan", "teal", "slate"), buildRawTheme("Sunset Ember", "orange", "rose", "amber", "stone"), buildRawTheme("Forest Canopy", "green", "emerald", "lime", "gray"), buildRawTheme("Arctic Night", "slate", "sky", "indigo", "zinc"), buildRawTheme("Royal Amethyst", "purple", "violet", "fuchsia", "gray"), buildRawTheme("Warm Earth", "stone", "amber", "orange", "neutral"), buildRawTheme("Cyber Pulse", "cyan", "blue", "violet", "slate"), buildRawTheme("Rose Garden", "rose", "pink", "fuchsia", "gray"), buildRawTheme("Golden Hour", "amber", "yellow", "orange", "stone"), buildRawTheme("Midnight Sky", "indigo", "blue", "violet", "slate"), buildRawTheme("Spring Meadow", "emerald", "lime", "green", "gray"), buildRawTheme("Coral Reef", "red", "orange", "pink", "zinc"), buildRawTheme("Nordic Ice", "sky", "cyan", "blue", "slate"), buildRawTheme("Twilight Bloom", "violet", "purple", "pink", "gray"), buildRawTheme("Desert Sand", "amber", "orange", "stone", "neutral")];
|
|
35958
35958
|
}
|
|
35959
35959
|
|
|
35960
|
+
/**
|
|
35961
|
+
* Brand presets — curated hex palettes mirroring well-known
|
|
35962
|
+
* products. Surfaced in the theme picker so users can pick
|
|
35963
|
+
* familiar brand identities in one click. Hex values flow
|
|
35964
|
+
* through the arbitrary-color-themes pipeline (PRD US-006).
|
|
35965
|
+
*
|
|
35966
|
+
* Each preset spans all four channels (primary, secondary,
|
|
35967
|
+
* tertiary, neutral). When applied, every theme token resolves
|
|
35968
|
+
* to a brand-equivalent shade via the cssVars map.
|
|
35969
|
+
*/
|
|
35970
|
+
function getBrandPresets() {
|
|
35971
|
+
return [buildRawTheme("Slack Brand", "#4A154B", "#36C5F0", "#ECB22E", "#BCBEC0"), buildRawTheme("Notion Brand", "#2F3437", "#9B6A8C", "#D4845A", "#C1B5A7"), buildRawTheme("GitHub Brand", "#0D1117", "#58A6FF", "#F0883E", "#21262D"), buildRawTheme("Stripe Brand", "#635BFF", "#00D4FF", "#FFD600", "#525F7F"), buildRawTheme("Linear Brand", "#5E6AD2", "#B07FD0", "#E2A8F5", "#1F2026"), buildRawTheme("Discord Brand", "#5865F2", "#57F287", "#FEE75C", "#36393F"), buildRawTheme("Vercel Brand", "#000000", "#0070F3", "#FF0080", "#888888"), buildRawTheme("Figma Brand", "#F24E1E", "#A259FF", "#1ABCFE", "#2C2C2C")];
|
|
35972
|
+
}
|
|
35973
|
+
|
|
35960
35974
|
// ─── Random Generation ───────────────────────────────────────────────────
|
|
35961
35975
|
|
|
35962
35976
|
function generateRandomTheme() {
|
|
@@ -36853,6 +36867,87 @@ var PreviewColorsPane = function PreviewColorsPane(_ref) {
|
|
|
36853
36867
|
}) : null;
|
|
36854
36868
|
};
|
|
36855
36869
|
|
|
36870
|
+
var AA_RATIO = 4.5;
|
|
36871
|
+
var CustomHexColorPane = function CustomHexColorPane(_ref) {
|
|
36872
|
+
var onApply = _ref.onApply,
|
|
36873
|
+
_ref$label = _ref.label,
|
|
36874
|
+
label = _ref$label === void 0 ? "Custom hex color" : _ref$label;
|
|
36875
|
+
var _useState = React.useState(""),
|
|
36876
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
36877
|
+
input = _useState2[0],
|
|
36878
|
+
setInput = _useState2[1];
|
|
36879
|
+
var _useState3 = React.useState(null),
|
|
36880
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
36881
|
+
error = _useState4[0],
|
|
36882
|
+
setError = _useState4[1];
|
|
36883
|
+
var normalized = React.useMemo(function () {
|
|
36884
|
+
return DashReact.normalizeHex(input);
|
|
36885
|
+
}, [input]);
|
|
36886
|
+
var isValid = !!normalized;
|
|
36887
|
+
|
|
36888
|
+
// Contrast vs. white — the most common "text on a colored fill"
|
|
36889
|
+
// case for primary buttons / active channels. Low contrast means
|
|
36890
|
+
// light text on the picked color will be hard to read.
|
|
36891
|
+
var contrastVsWhite = React.useMemo(function () {
|
|
36892
|
+
return isValid ? DashReact.contrastRatio(normalized, "#ffffff") : null;
|
|
36893
|
+
}, [normalized, isValid]);
|
|
36894
|
+
var contrastVsBlack = React.useMemo(function () {
|
|
36895
|
+
return isValid ? DashReact.contrastRatio(normalized, "#000000") : null;
|
|
36896
|
+
}, [normalized, isValid]);
|
|
36897
|
+
var bestContrast = contrastVsWhite ? Math.max(contrastVsWhite, contrastVsBlack) : null;
|
|
36898
|
+
var warning = bestContrast !== null && bestContrast < AA_RATIO ? "Best contrast ".concat(bestContrast.toFixed(1), ":1 \u2014 below WCAG AA target (4.5:1). Text overlaid on this color may be hard to read.") : null;
|
|
36899
|
+
function handleApply() {
|
|
36900
|
+
if (!normalized) {
|
|
36901
|
+
setError("Invalid hex (try #4A154B)");
|
|
36902
|
+
return;
|
|
36903
|
+
}
|
|
36904
|
+
setError(null);
|
|
36905
|
+
onApply(normalized);
|
|
36906
|
+
setInput("");
|
|
36907
|
+
}
|
|
36908
|
+
function handleKeyDown(e) {
|
|
36909
|
+
if (e.key === "Enter" && isValid) {
|
|
36910
|
+
e.preventDefault();
|
|
36911
|
+
handleApply();
|
|
36912
|
+
}
|
|
36913
|
+
}
|
|
36914
|
+
return /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
36915
|
+
className: "flex flex-col gap-2 p-3 border-t border-gray-700",
|
|
36916
|
+
children: [/*#__PURE__*/jsxRuntime.jsx("span", {
|
|
36917
|
+
className: "text-xs uppercase font-bold tracking-wider text-gray-400",
|
|
36918
|
+
children: label
|
|
36919
|
+
}), /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
36920
|
+
className: "flex flex-row items-center gap-2",
|
|
36921
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(DashReact.InputText, {
|
|
36922
|
+
value: input,
|
|
36923
|
+
onChange: function onChange(value) {
|
|
36924
|
+
var _value$target;
|
|
36925
|
+
// dispatchInputChange unwraps the event to a string
|
|
36926
|
+
setInput(typeof value === "string" ? value : (value === null || value === void 0 || (_value$target = value.target) === null || _value$target === void 0 ? void 0 : _value$target.value) || "");
|
|
36927
|
+
setError(null);
|
|
36928
|
+
},
|
|
36929
|
+
onKeyDown: handleKeyDown,
|
|
36930
|
+
placeholder: "#4A154B"
|
|
36931
|
+
}), /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
36932
|
+
className: "w-10 h-10 rounded flex-shrink-0",
|
|
36933
|
+
style: {
|
|
36934
|
+
backgroundColor: normalized || "transparent",
|
|
36935
|
+
border: "1px solid rgba(255,255,255,0.15)"
|
|
36936
|
+
},
|
|
36937
|
+
"aria-label": "Color preview"
|
|
36938
|
+
}), /*#__PURE__*/jsxRuntime.jsx(DashReact.Button, {
|
|
36939
|
+
title: "Apply",
|
|
36940
|
+
onClick: handleApply,
|
|
36941
|
+
disabled: !isValid
|
|
36942
|
+
})]
|
|
36943
|
+
}), error && /*#__PURE__*/jsxRuntime.jsx(DashReact.Caption2, {
|
|
36944
|
+
text: error
|
|
36945
|
+
}), warning && /*#__PURE__*/jsxRuntime.jsx(DashReact.Caption, {
|
|
36946
|
+
text: warning
|
|
36947
|
+
})]
|
|
36948
|
+
});
|
|
36949
|
+
};
|
|
36950
|
+
|
|
36856
36951
|
var AvailableColorsGridPane = function AvailableColorsGridPane(_ref) {
|
|
36857
36952
|
var _ref$currentColor = _ref.currentColor,
|
|
36858
36953
|
currentColor = _ref$currentColor === void 0 ? null : _ref$currentColor,
|
|
@@ -36926,13 +37021,23 @@ var AvailableColorsGridPane = function AvailableColorsGridPane(_ref) {
|
|
|
36926
37021
|
scrollable: true,
|
|
36927
37022
|
children: [/*#__PURE__*/jsxRuntime.jsx(DashReact.DashPanel.Header, {
|
|
36928
37023
|
title: "AvailableColors"
|
|
36929
|
-
}), /*#__PURE__*/jsxRuntime.
|
|
37024
|
+
}), /*#__PURE__*/jsxRuntime.jsxs(DashReact.DashPanel.Body, {
|
|
36930
37025
|
scrollable: true,
|
|
36931
37026
|
space: true,
|
|
36932
|
-
children: /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
37027
|
+
children: [/*#__PURE__*/jsxRuntime.jsx("div", {
|
|
36933
37028
|
className: "flex flex-col space-y-1",
|
|
36934
37029
|
children: renderAvailableColors()
|
|
36935
|
-
})
|
|
37030
|
+
}), shade !== null && /*#__PURE__*/jsxRuntime.jsx(CustomHexColorPane, {
|
|
37031
|
+
onApply: function onApply(hex) {
|
|
37032
|
+
return handleChooseColor({
|
|
37033
|
+
colorName: hex,
|
|
37034
|
+
colorType: colorType,
|
|
37035
|
+
shade: shade || 500,
|
|
37036
|
+
panelType: "main"
|
|
37037
|
+
});
|
|
37038
|
+
},
|
|
37039
|
+
label: "Custom hex for ".concat(colorType || "channel")
|
|
37040
|
+
})]
|
|
36936
37041
|
}), onCancel && /*#__PURE__*/jsxRuntime.jsx(DashReact.DashPanel.Footer, {
|
|
36937
37042
|
children: /*#__PURE__*/jsxRuntime.jsx(DashReact.Button, {
|
|
36938
37043
|
title: "Cancel",
|
|
@@ -38398,23 +38503,41 @@ var ThemePickerGridPane = function ThemePickerGridPane(_ref) {
|
|
|
38398
38503
|
themeVariant = _useContext.themeVariant;
|
|
38399
38504
|
function renderMenuItem(tk) {
|
|
38400
38505
|
var displayTheme = themes[tk][themeVariant];
|
|
38401
|
-
|
|
38402
|
-
|
|
38506
|
+
// Read inline CSS color values from `cssValue` (v0.1.569+) so
|
|
38507
|
+
// preview swatches render correctly for BOTH named-color and
|
|
38508
|
+
// hex (brand-preset) themes. For hex themes, the className path
|
|
38509
|
+
// resolves to `bg-[var(--secondary-700)]` which depends on the
|
|
38510
|
+
// active theme's CSS variables — those aren't injected for
|
|
38511
|
+
// OTHER themes shown in the picker grid. Inline cssValue
|
|
38512
|
+
// sidesteps that limitation.
|
|
38513
|
+
var cssValue = displayTheme.cssValue || {};
|
|
38514
|
+
var swatches = [{
|
|
38403
38515
|
type: "secondary",
|
|
38404
|
-
|
|
38516
|
+
value: cssValue["bg-secondary-medium"],
|
|
38517
|
+
className: displayTheme["bg-secondary-medium"]
|
|
38405
38518
|
}, {
|
|
38406
|
-
colorName: displayTheme["tertiary"],
|
|
38407
38519
|
type: "tertiary",
|
|
38408
|
-
|
|
38520
|
+
value: cssValue["bg-tertiary-medium"],
|
|
38521
|
+
className: displayTheme["bg-tertiary-medium"]
|
|
38409
38522
|
}, {
|
|
38410
|
-
colorName: displayTheme["neutral"],
|
|
38411
38523
|
type: "neutral",
|
|
38412
|
-
|
|
38524
|
+
value: cssValue["bg-neutral-light"],
|
|
38525
|
+
className: displayTheme["bg-neutral-light"]
|
|
38413
38526
|
}];
|
|
38414
|
-
return
|
|
38527
|
+
return swatches.map(function (swatch) {
|
|
38528
|
+
// Prefer cssValue (works for any theme). Fall back to className
|
|
38529
|
+
// for pre-v0.1.569 themes without a cssValue map.
|
|
38530
|
+
if (swatch.value) {
|
|
38531
|
+
return /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
38532
|
+
className: "rounded h-20 w-full",
|
|
38533
|
+
style: {
|
|
38534
|
+
backgroundColor: swatch.value
|
|
38535
|
+
}
|
|
38536
|
+
}, "theme-grid-".concat(swatch.type));
|
|
38537
|
+
}
|
|
38415
38538
|
return /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
38416
|
-
className: "rounded ".concat(
|
|
38417
|
-
}, "theme-grid-".concat(
|
|
38539
|
+
className: "rounded ".concat(swatch.className, " h-20 w-full")
|
|
38540
|
+
}, "theme-grid-".concat(swatch.type));
|
|
38418
38541
|
});
|
|
38419
38542
|
}
|
|
38420
38543
|
function renderCurrentThemes() {
|
|
@@ -38574,15 +38697,30 @@ var GENERATE_MODES = {
|
|
|
38574
38697
|
|
|
38575
38698
|
// ─── Preset Gallery ──────────────────────────────────────────────────────
|
|
38576
38699
|
|
|
38577
|
-
|
|
38578
|
-
|
|
38579
|
-
|
|
38580
|
-
|
|
38581
|
-
|
|
38582
|
-
var
|
|
38583
|
-
|
|
38584
|
-
return "
|
|
38700
|
+
// Render a swatch for a preset's channel value. Handles both Tailwind
|
|
38701
|
+
// named colors (`"blue"` → `bg-blue-500`) and arbitrary-color-themes
|
|
38702
|
+
// hex values (`"#4A154B"` → inline style). Used by brand presets which
|
|
38703
|
+
// carry hex palettes.
|
|
38704
|
+
var PresetSwatch = function PresetSwatch(_ref) {
|
|
38705
|
+
var color = _ref.color;
|
|
38706
|
+
if (DashReact.isHexColor(color)) {
|
|
38707
|
+
return /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
38708
|
+
className: "h-6 flex-1 rounded",
|
|
38709
|
+
style: {
|
|
38710
|
+
backgroundColor: DashReact.normalizeHex(color) || color
|
|
38711
|
+
}
|
|
38712
|
+
});
|
|
38713
|
+
}
|
|
38714
|
+
return /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
38715
|
+
className: "h-6 flex-1 rounded bg-".concat(color, "-500")
|
|
38585
38716
|
});
|
|
38717
|
+
};
|
|
38718
|
+
var PresetCard = function PresetCard(_ref2) {
|
|
38719
|
+
var preset = _ref2.preset,
|
|
38720
|
+
onSelect = _ref2.onSelect,
|
|
38721
|
+
_ref2$selected = _ref2.selected,
|
|
38722
|
+
selected = _ref2$selected === void 0 ? false : _ref2$selected;
|
|
38723
|
+
var colors = [preset.primary, preset.secondary, preset.tertiary];
|
|
38586
38724
|
return /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
38587
38725
|
className: "flex flex-col gap-2 p-3 rounded-lg cursor-pointer transition-all bg-white/5 hover:bg-white/10 ".concat(selected ? "ring-2 ring-blue-500" : "hover:ring-2 hover:ring-blue-500"),
|
|
38588
38726
|
onClick: function onClick() {
|
|
@@ -38590,9 +38728,9 @@ var PresetCard = function PresetCard(_ref) {
|
|
|
38590
38728
|
},
|
|
38591
38729
|
children: [/*#__PURE__*/jsxRuntime.jsx("div", {
|
|
38592
38730
|
className: "flex flex-row gap-1",
|
|
38593
|
-
children:
|
|
38594
|
-
return /*#__PURE__*/jsxRuntime.jsx(
|
|
38595
|
-
|
|
38731
|
+
children: colors.map(function (c, i) {
|
|
38732
|
+
return /*#__PURE__*/jsxRuntime.jsx(PresetSwatch, {
|
|
38733
|
+
color: c
|
|
38596
38734
|
}, i);
|
|
38597
38735
|
})
|
|
38598
38736
|
}), /*#__PURE__*/jsxRuntime.jsx("span", {
|
|
@@ -38601,13 +38739,14 @@ var PresetCard = function PresetCard(_ref) {
|
|
|
38601
38739
|
})]
|
|
38602
38740
|
});
|
|
38603
38741
|
};
|
|
38604
|
-
var PresetGallery = function PresetGallery(
|
|
38605
|
-
var onSelect =
|
|
38606
|
-
|
|
38607
|
-
selectedPresetId =
|
|
38608
|
-
|
|
38609
|
-
inline =
|
|
38742
|
+
var PresetGallery = function PresetGallery(_ref3) {
|
|
38743
|
+
var onSelect = _ref3.onSelect,
|
|
38744
|
+
_ref3$selectedPresetI = _ref3.selectedPresetId,
|
|
38745
|
+
selectedPresetId = _ref3$selectedPresetI === void 0 ? null : _ref3$selectedPresetI,
|
|
38746
|
+
_ref3$inline = _ref3.inline,
|
|
38747
|
+
inline = _ref3$inline === void 0 ? false : _ref3$inline;
|
|
38610
38748
|
var presets = getThemePresets();
|
|
38749
|
+
var brandPresets = getBrandPresets();
|
|
38611
38750
|
return /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
38612
38751
|
className: inline ? "flex flex-col gap-4" : "flex flex-col gap-4 p-6 overflow-y-auto flex-1 min-h-0",
|
|
38613
38752
|
children: [/*#__PURE__*/jsxRuntime.jsx("span", {
|
|
@@ -38622,16 +38761,28 @@ var PresetGallery = function PresetGallery(_ref2) {
|
|
|
38622
38761
|
selected: selectedPresetId != null && preset.name === selectedPresetId
|
|
38623
38762
|
}, i);
|
|
38624
38763
|
})
|
|
38764
|
+
}), /*#__PURE__*/jsxRuntime.jsx("span", {
|
|
38765
|
+
className: "text-sm font-semibold opacity-50 mt-4",
|
|
38766
|
+
children: "Brand Presets"
|
|
38767
|
+
}), /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
38768
|
+
className: "grid grid-cols-3 gap-3",
|
|
38769
|
+
children: brandPresets.map(function (preset, i) {
|
|
38770
|
+
return /*#__PURE__*/jsxRuntime.jsx(PresetCard, {
|
|
38771
|
+
preset: preset,
|
|
38772
|
+
onSelect: onSelect,
|
|
38773
|
+
selected: selectedPresetId != null && preset.name === selectedPresetId
|
|
38774
|
+
}, "brand-".concat(i));
|
|
38775
|
+
})
|
|
38625
38776
|
})]
|
|
38626
38777
|
});
|
|
38627
38778
|
};
|
|
38628
38779
|
|
|
38629
38780
|
// ─── Color Harmony Picker ────────────────────────────────────────────────
|
|
38630
38781
|
|
|
38631
|
-
var ColorSwatchGrid$1 = function ColorSwatchGrid(
|
|
38632
|
-
var value =
|
|
38633
|
-
onChange =
|
|
38634
|
-
label =
|
|
38782
|
+
var ColorSwatchGrid$1 = function ColorSwatchGrid(_ref4) {
|
|
38783
|
+
var value = _ref4.value,
|
|
38784
|
+
onChange = _ref4.onChange,
|
|
38785
|
+
label = _ref4.label;
|
|
38635
38786
|
return /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
38636
38787
|
className: "flex flex-col gap-2",
|
|
38637
38788
|
children: [/*#__PURE__*/jsxRuntime.jsx("span", {
|
|
@@ -38651,10 +38802,10 @@ var ColorSwatchGrid$1 = function ColorSwatchGrid(_ref3) {
|
|
|
38651
38802
|
})]
|
|
38652
38803
|
});
|
|
38653
38804
|
};
|
|
38654
|
-
var PreviewSwatch = function PreviewSwatch(
|
|
38655
|
-
var color =
|
|
38656
|
-
strategy =
|
|
38657
|
-
customColors =
|
|
38805
|
+
var PreviewSwatch = function PreviewSwatch(_ref5) {
|
|
38806
|
+
var color = _ref5.color,
|
|
38807
|
+
strategy = _ref5.strategy,
|
|
38808
|
+
customColors = _ref5.customColors;
|
|
38658
38809
|
var colors;
|
|
38659
38810
|
if (strategy === "custom" && customColors) {
|
|
38660
38811
|
colors = [customColors.primary, customColors.secondary, customColors.tertiary];
|
|
@@ -38677,10 +38828,10 @@ var PreviewSwatch = function PreviewSwatch(_ref4) {
|
|
|
38677
38828
|
})
|
|
38678
38829
|
});
|
|
38679
38830
|
};
|
|
38680
|
-
var ColorHarmonyPicker = function ColorHarmonyPicker(
|
|
38681
|
-
var onGenerate =
|
|
38682
|
-
|
|
38683
|
-
inline =
|
|
38831
|
+
var ColorHarmonyPicker = function ColorHarmonyPicker(_ref6) {
|
|
38832
|
+
var onGenerate = _ref6.onGenerate,
|
|
38833
|
+
_ref6$inline = _ref6.inline,
|
|
38834
|
+
inline = _ref6$inline === void 0 ? false : _ref6$inline;
|
|
38684
38835
|
var _useState = React.useState("blue"),
|
|
38685
38836
|
_useState2 = _slicedToArray(_useState, 2),
|
|
38686
38837
|
selectedColor = _useState2[0],
|
|
@@ -38774,12 +38925,12 @@ var ColorHarmonyPicker = function ColorHarmonyPicker(_ref5) {
|
|
|
38774
38925
|
|
|
38775
38926
|
// ─── Wizard Components ──────────────────────────────────────────────────
|
|
38776
38927
|
|
|
38777
|
-
var MethodCard = function MethodCard(
|
|
38778
|
-
var icon =
|
|
38779
|
-
title =
|
|
38780
|
-
subtitle =
|
|
38781
|
-
selected =
|
|
38782
|
-
onClick =
|
|
38928
|
+
var MethodCard = function MethodCard(_ref7) {
|
|
38929
|
+
var icon = _ref7.icon,
|
|
38930
|
+
title = _ref7.title,
|
|
38931
|
+
subtitle = _ref7.subtitle,
|
|
38932
|
+
selected = _ref7.selected,
|
|
38933
|
+
onClick = _ref7.onClick;
|
|
38783
38934
|
return /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
38784
38935
|
className: "flex flex-col gap-1.5 p-3 rounded-lg cursor-pointer transition-all bg-white/5 hover:bg-white/10 ".concat(selected ? "ring-2 ring-blue-500 bg-white/10" : "hover:ring-1 hover:ring-white/20"),
|
|
38785
38936
|
onClick: onClick,
|
|
@@ -38798,9 +38949,9 @@ var MethodCard = function MethodCard(_ref6) {
|
|
|
38798
38949
|
})]
|
|
38799
38950
|
});
|
|
38800
38951
|
};
|
|
38801
|
-
var RandomPreview = function RandomPreview(
|
|
38802
|
-
var theme =
|
|
38803
|
-
onRegenerate =
|
|
38952
|
+
var RandomPreview = function RandomPreview(_ref8) {
|
|
38953
|
+
var theme = _ref8.theme,
|
|
38954
|
+
onRegenerate = _ref8.onRegenerate;
|
|
38804
38955
|
var colors = theme ? [theme.primary, theme.secondary, theme.tertiary] : [];
|
|
38805
38956
|
return /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
38806
38957
|
className: "flex flex-col gap-4",
|
|
@@ -38827,20 +38978,20 @@ var RandomPreview = function RandomPreview(_ref7) {
|
|
|
38827
38978
|
})]
|
|
38828
38979
|
});
|
|
38829
38980
|
};
|
|
38830
|
-
var ThemeQuickCreate = function ThemeQuickCreate(
|
|
38831
|
-
var wizardName =
|
|
38832
|
-
setWizardName =
|
|
38833
|
-
wizardMethod =
|
|
38834
|
-
setWizardMethod =
|
|
38835
|
-
wizardTheme =
|
|
38836
|
-
setWizardTheme =
|
|
38837
|
-
onComplete =
|
|
38838
|
-
|
|
38839
|
-
onExtract =
|
|
38840
|
-
|
|
38841
|
-
onMapToTheme =
|
|
38842
|
-
|
|
38843
|
-
initialMethod =
|
|
38981
|
+
var ThemeQuickCreate = function ThemeQuickCreate(_ref9) {
|
|
38982
|
+
var wizardName = _ref9.wizardName,
|
|
38983
|
+
setWizardName = _ref9.setWizardName,
|
|
38984
|
+
wizardMethod = _ref9.wizardMethod,
|
|
38985
|
+
setWizardMethod = _ref9.setWizardMethod,
|
|
38986
|
+
wizardTheme = _ref9.wizardTheme,
|
|
38987
|
+
setWizardTheme = _ref9.setWizardTheme,
|
|
38988
|
+
onComplete = _ref9.onComplete,
|
|
38989
|
+
_ref9$onExtract = _ref9.onExtract,
|
|
38990
|
+
onExtract = _ref9$onExtract === void 0 ? null : _ref9$onExtract,
|
|
38991
|
+
_ref9$onMapToTheme = _ref9.onMapToTheme,
|
|
38992
|
+
onMapToTheme = _ref9$onMapToTheme === void 0 ? null : _ref9$onMapToTheme,
|
|
38993
|
+
_ref9$initialMethod = _ref9.initialMethod,
|
|
38994
|
+
initialMethod = _ref9$initialMethod === void 0 ? null : _ref9$initialMethod;
|
|
38844
38995
|
var canCreate = wizardName.trim().length > 0 && wizardTheme !== null;
|
|
38845
38996
|
var showMethodPicker = initialMethod === null;
|
|
38846
38997
|
React.useEffect(function () {
|
|
@@ -66661,6 +66812,7 @@ exports.generateHarmonyTheme = generateHarmonyTheme;
|
|
|
66661
66812
|
exports.generateRandomTheme = generateRandomTheme;
|
|
66662
66813
|
exports.generateThemeName = generateThemeName;
|
|
66663
66814
|
exports.getBorderStyle = getBorderStyle;
|
|
66815
|
+
exports.getBrandPresets = getBrandPresets;
|
|
66664
66816
|
exports.getChildrenForLayoutItem = getChildrenForLayoutItem;
|
|
66665
66817
|
exports.getComponentInLayout = getComponentInLayout;
|
|
66666
66818
|
exports.getContainerBorderColor = getContainerBorderColor;
|