@trops/dash-core 0.1.569 → 0.1.571
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 +273 -65
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +272 -63
- 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,133 @@ 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
|
+
|
|
36951
|
+
var CategorizedColorGrid = function CategorizedColorGrid(_ref) {
|
|
36952
|
+
var onSelect = _ref.onSelect,
|
|
36953
|
+
_ref$selectedHex = _ref.selectedHex,
|
|
36954
|
+
selectedHex = _ref$selectedHex === void 0 ? null : _ref$selectedHex;
|
|
36955
|
+
var families = DashReact.getColorFamilies();
|
|
36956
|
+
var _useState = React.useState(families[0]),
|
|
36957
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
36958
|
+
activeFamily = _useState2[0],
|
|
36959
|
+
setActiveFamily = _useState2[1];
|
|
36960
|
+
var colors = DashReact.getCuratedColorGrid(activeFamily);
|
|
36961
|
+
return /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
36962
|
+
className: "flex flex-col gap-3 p-3",
|
|
36963
|
+
children: [/*#__PURE__*/jsxRuntime.jsx("div", {
|
|
36964
|
+
className: "flex flex-row gap-2 flex-wrap",
|
|
36965
|
+
children: families.map(function (family) {
|
|
36966
|
+
var isActive = activeFamily === family;
|
|
36967
|
+
return /*#__PURE__*/jsxRuntime.jsx("button", {
|
|
36968
|
+
type: "button",
|
|
36969
|
+
onClick: function onClick() {
|
|
36970
|
+
return setActiveFamily(family);
|
|
36971
|
+
},
|
|
36972
|
+
className: "px-3 py-1 rounded-full text-xs font-medium transition-colors ".concat(isActive ? "bg-blue-600 text-white" : "bg-gray-700 text-gray-300 hover:bg-gray-600"),
|
|
36973
|
+
children: family
|
|
36974
|
+
}, family);
|
|
36975
|
+
})
|
|
36976
|
+
}), /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
36977
|
+
className: "grid grid-cols-6 gap-1",
|
|
36978
|
+
children: colors.map(function (hex) {
|
|
36979
|
+
var isSelected = selectedHex && hex.toLowerCase() === selectedHex.toLowerCase();
|
|
36980
|
+
return /*#__PURE__*/jsxRuntime.jsx("button", {
|
|
36981
|
+
type: "button",
|
|
36982
|
+
onClick: function onClick() {
|
|
36983
|
+
return onSelect(hex);
|
|
36984
|
+
},
|
|
36985
|
+
title: hex,
|
|
36986
|
+
className: "aspect-square rounded transition-transform hover:scale-110 focus:scale-110 focus:outline-none ".concat(isSelected ? "ring-2 ring-white scale-110" : ""),
|
|
36987
|
+
style: {
|
|
36988
|
+
backgroundColor: hex
|
|
36989
|
+
},
|
|
36990
|
+
"aria-label": "Select color ".concat(hex)
|
|
36991
|
+
}, hex);
|
|
36992
|
+
})
|
|
36993
|
+
})]
|
|
36994
|
+
});
|
|
36995
|
+
};
|
|
36996
|
+
|
|
36856
36997
|
var AvailableColorsGridPane = function AvailableColorsGridPane(_ref) {
|
|
36857
36998
|
var _ref$currentColor = _ref.currentColor,
|
|
36858
36999
|
currentColor = _ref$currentColor === void 0 ? null : _ref$currentColor,
|
|
@@ -36929,7 +37070,28 @@ var AvailableColorsGridPane = function AvailableColorsGridPane(_ref) {
|
|
|
36929
37070
|
}), /*#__PURE__*/jsxRuntime.jsx(DashReact.DashPanel.Body, {
|
|
36930
37071
|
scrollable: true,
|
|
36931
37072
|
space: true,
|
|
36932
|
-
children: /*#__PURE__*/jsxRuntime.
|
|
37073
|
+
children: shade !== null ? /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
37074
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(CategorizedColorGrid, {
|
|
37075
|
+
onSelect: function onSelect(hex) {
|
|
37076
|
+
return handleChooseColor({
|
|
37077
|
+
colorName: hex,
|
|
37078
|
+
colorType: colorType,
|
|
37079
|
+
shade: shade || 500,
|
|
37080
|
+
panelType: "main"
|
|
37081
|
+
});
|
|
37082
|
+
}
|
|
37083
|
+
}), /*#__PURE__*/jsxRuntime.jsx(CustomHexColorPane, {
|
|
37084
|
+
onApply: function onApply(hex) {
|
|
37085
|
+
return handleChooseColor({
|
|
37086
|
+
colorName: hex,
|
|
37087
|
+
colorType: colorType,
|
|
37088
|
+
shade: shade || 500,
|
|
37089
|
+
panelType: "main"
|
|
37090
|
+
});
|
|
37091
|
+
},
|
|
37092
|
+
label: "Custom hex for ".concat(colorType || "channel")
|
|
37093
|
+
})]
|
|
37094
|
+
}) : /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
36933
37095
|
className: "flex flex-col space-y-1",
|
|
36934
37096
|
children: renderAvailableColors()
|
|
36935
37097
|
})
|
|
@@ -38398,23 +38560,41 @@ var ThemePickerGridPane = function ThemePickerGridPane(_ref) {
|
|
|
38398
38560
|
themeVariant = _useContext.themeVariant;
|
|
38399
38561
|
function renderMenuItem(tk) {
|
|
38400
38562
|
var displayTheme = themes[tk][themeVariant];
|
|
38401
|
-
|
|
38402
|
-
|
|
38563
|
+
// Read inline CSS color values from `cssValue` (v0.1.569+) so
|
|
38564
|
+
// preview swatches render correctly for BOTH named-color and
|
|
38565
|
+
// hex (brand-preset) themes. For hex themes, the className path
|
|
38566
|
+
// resolves to `bg-[var(--secondary-700)]` which depends on the
|
|
38567
|
+
// active theme's CSS variables — those aren't injected for
|
|
38568
|
+
// OTHER themes shown in the picker grid. Inline cssValue
|
|
38569
|
+
// sidesteps that limitation.
|
|
38570
|
+
var cssValue = displayTheme.cssValue || {};
|
|
38571
|
+
var swatches = [{
|
|
38403
38572
|
type: "secondary",
|
|
38404
|
-
|
|
38573
|
+
value: cssValue["bg-secondary-medium"],
|
|
38574
|
+
className: displayTheme["bg-secondary-medium"]
|
|
38405
38575
|
}, {
|
|
38406
|
-
colorName: displayTheme["tertiary"],
|
|
38407
38576
|
type: "tertiary",
|
|
38408
|
-
|
|
38577
|
+
value: cssValue["bg-tertiary-medium"],
|
|
38578
|
+
className: displayTheme["bg-tertiary-medium"]
|
|
38409
38579
|
}, {
|
|
38410
|
-
colorName: displayTheme["neutral"],
|
|
38411
38580
|
type: "neutral",
|
|
38412
|
-
|
|
38581
|
+
value: cssValue["bg-neutral-light"],
|
|
38582
|
+
className: displayTheme["bg-neutral-light"]
|
|
38413
38583
|
}];
|
|
38414
|
-
return
|
|
38584
|
+
return swatches.map(function (swatch) {
|
|
38585
|
+
// Prefer cssValue (works for any theme). Fall back to className
|
|
38586
|
+
// for pre-v0.1.569 themes without a cssValue map.
|
|
38587
|
+
if (swatch.value) {
|
|
38588
|
+
return /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
38589
|
+
className: "rounded h-20 w-full",
|
|
38590
|
+
style: {
|
|
38591
|
+
backgroundColor: swatch.value
|
|
38592
|
+
}
|
|
38593
|
+
}, "theme-grid-".concat(swatch.type));
|
|
38594
|
+
}
|
|
38415
38595
|
return /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
38416
|
-
className: "rounded ".concat(
|
|
38417
|
-
}, "theme-grid-".concat(
|
|
38596
|
+
className: "rounded ".concat(swatch.className, " h-20 w-full")
|
|
38597
|
+
}, "theme-grid-".concat(swatch.type));
|
|
38418
38598
|
});
|
|
38419
38599
|
}
|
|
38420
38600
|
function renderCurrentThemes() {
|
|
@@ -38574,15 +38754,30 @@ var GENERATE_MODES = {
|
|
|
38574
38754
|
|
|
38575
38755
|
// ─── Preset Gallery ──────────────────────────────────────────────────────
|
|
38576
38756
|
|
|
38577
|
-
|
|
38578
|
-
|
|
38579
|
-
|
|
38580
|
-
|
|
38581
|
-
|
|
38582
|
-
var
|
|
38583
|
-
|
|
38584
|
-
return "
|
|
38757
|
+
// Render a swatch for a preset's channel value. Handles both Tailwind
|
|
38758
|
+
// named colors (`"blue"` → `bg-blue-500`) and arbitrary-color-themes
|
|
38759
|
+
// hex values (`"#4A154B"` → inline style). Used by brand presets which
|
|
38760
|
+
// carry hex palettes.
|
|
38761
|
+
var PresetSwatch = function PresetSwatch(_ref) {
|
|
38762
|
+
var color = _ref.color;
|
|
38763
|
+
if (DashReact.isHexColor(color)) {
|
|
38764
|
+
return /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
38765
|
+
className: "h-6 flex-1 rounded",
|
|
38766
|
+
style: {
|
|
38767
|
+
backgroundColor: DashReact.normalizeHex(color) || color
|
|
38768
|
+
}
|
|
38769
|
+
});
|
|
38770
|
+
}
|
|
38771
|
+
return /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
38772
|
+
className: "h-6 flex-1 rounded bg-".concat(color, "-500")
|
|
38585
38773
|
});
|
|
38774
|
+
};
|
|
38775
|
+
var PresetCard = function PresetCard(_ref2) {
|
|
38776
|
+
var preset = _ref2.preset,
|
|
38777
|
+
onSelect = _ref2.onSelect,
|
|
38778
|
+
_ref2$selected = _ref2.selected,
|
|
38779
|
+
selected = _ref2$selected === void 0 ? false : _ref2$selected;
|
|
38780
|
+
var colors = [preset.primary, preset.secondary, preset.tertiary];
|
|
38586
38781
|
return /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
38587
38782
|
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
38783
|
onClick: function onClick() {
|
|
@@ -38590,9 +38785,9 @@ var PresetCard = function PresetCard(_ref) {
|
|
|
38590
38785
|
},
|
|
38591
38786
|
children: [/*#__PURE__*/jsxRuntime.jsx("div", {
|
|
38592
38787
|
className: "flex flex-row gap-1",
|
|
38593
|
-
children:
|
|
38594
|
-
return /*#__PURE__*/jsxRuntime.jsx(
|
|
38595
|
-
|
|
38788
|
+
children: colors.map(function (c, i) {
|
|
38789
|
+
return /*#__PURE__*/jsxRuntime.jsx(PresetSwatch, {
|
|
38790
|
+
color: c
|
|
38596
38791
|
}, i);
|
|
38597
38792
|
})
|
|
38598
38793
|
}), /*#__PURE__*/jsxRuntime.jsx("span", {
|
|
@@ -38601,13 +38796,14 @@ var PresetCard = function PresetCard(_ref) {
|
|
|
38601
38796
|
})]
|
|
38602
38797
|
});
|
|
38603
38798
|
};
|
|
38604
|
-
var PresetGallery = function PresetGallery(
|
|
38605
|
-
var onSelect =
|
|
38606
|
-
|
|
38607
|
-
selectedPresetId =
|
|
38608
|
-
|
|
38609
|
-
inline =
|
|
38799
|
+
var PresetGallery = function PresetGallery(_ref3) {
|
|
38800
|
+
var onSelect = _ref3.onSelect,
|
|
38801
|
+
_ref3$selectedPresetI = _ref3.selectedPresetId,
|
|
38802
|
+
selectedPresetId = _ref3$selectedPresetI === void 0 ? null : _ref3$selectedPresetI,
|
|
38803
|
+
_ref3$inline = _ref3.inline,
|
|
38804
|
+
inline = _ref3$inline === void 0 ? false : _ref3$inline;
|
|
38610
38805
|
var presets = getThemePresets();
|
|
38806
|
+
var brandPresets = getBrandPresets();
|
|
38611
38807
|
return /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
38612
38808
|
className: inline ? "flex flex-col gap-4" : "flex flex-col gap-4 p-6 overflow-y-auto flex-1 min-h-0",
|
|
38613
38809
|
children: [/*#__PURE__*/jsxRuntime.jsx("span", {
|
|
@@ -38622,16 +38818,28 @@ var PresetGallery = function PresetGallery(_ref2) {
|
|
|
38622
38818
|
selected: selectedPresetId != null && preset.name === selectedPresetId
|
|
38623
38819
|
}, i);
|
|
38624
38820
|
})
|
|
38821
|
+
}), /*#__PURE__*/jsxRuntime.jsx("span", {
|
|
38822
|
+
className: "text-sm font-semibold opacity-50 mt-4",
|
|
38823
|
+
children: "Brand Presets"
|
|
38824
|
+
}), /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
38825
|
+
className: "grid grid-cols-3 gap-3",
|
|
38826
|
+
children: brandPresets.map(function (preset, i) {
|
|
38827
|
+
return /*#__PURE__*/jsxRuntime.jsx(PresetCard, {
|
|
38828
|
+
preset: preset,
|
|
38829
|
+
onSelect: onSelect,
|
|
38830
|
+
selected: selectedPresetId != null && preset.name === selectedPresetId
|
|
38831
|
+
}, "brand-".concat(i));
|
|
38832
|
+
})
|
|
38625
38833
|
})]
|
|
38626
38834
|
});
|
|
38627
38835
|
};
|
|
38628
38836
|
|
|
38629
38837
|
// ─── Color Harmony Picker ────────────────────────────────────────────────
|
|
38630
38838
|
|
|
38631
|
-
var ColorSwatchGrid$1 = function ColorSwatchGrid(
|
|
38632
|
-
var value =
|
|
38633
|
-
onChange =
|
|
38634
|
-
label =
|
|
38839
|
+
var ColorSwatchGrid$1 = function ColorSwatchGrid(_ref4) {
|
|
38840
|
+
var value = _ref4.value,
|
|
38841
|
+
onChange = _ref4.onChange,
|
|
38842
|
+
label = _ref4.label;
|
|
38635
38843
|
return /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
38636
38844
|
className: "flex flex-col gap-2",
|
|
38637
38845
|
children: [/*#__PURE__*/jsxRuntime.jsx("span", {
|
|
@@ -38651,10 +38859,10 @@ var ColorSwatchGrid$1 = function ColorSwatchGrid(_ref3) {
|
|
|
38651
38859
|
})]
|
|
38652
38860
|
});
|
|
38653
38861
|
};
|
|
38654
|
-
var PreviewSwatch = function PreviewSwatch(
|
|
38655
|
-
var color =
|
|
38656
|
-
strategy =
|
|
38657
|
-
customColors =
|
|
38862
|
+
var PreviewSwatch = function PreviewSwatch(_ref5) {
|
|
38863
|
+
var color = _ref5.color,
|
|
38864
|
+
strategy = _ref5.strategy,
|
|
38865
|
+
customColors = _ref5.customColors;
|
|
38658
38866
|
var colors;
|
|
38659
38867
|
if (strategy === "custom" && customColors) {
|
|
38660
38868
|
colors = [customColors.primary, customColors.secondary, customColors.tertiary];
|
|
@@ -38677,10 +38885,10 @@ var PreviewSwatch = function PreviewSwatch(_ref4) {
|
|
|
38677
38885
|
})
|
|
38678
38886
|
});
|
|
38679
38887
|
};
|
|
38680
|
-
var ColorHarmonyPicker = function ColorHarmonyPicker(
|
|
38681
|
-
var onGenerate =
|
|
38682
|
-
|
|
38683
|
-
inline =
|
|
38888
|
+
var ColorHarmonyPicker = function ColorHarmonyPicker(_ref6) {
|
|
38889
|
+
var onGenerate = _ref6.onGenerate,
|
|
38890
|
+
_ref6$inline = _ref6.inline,
|
|
38891
|
+
inline = _ref6$inline === void 0 ? false : _ref6$inline;
|
|
38684
38892
|
var _useState = React.useState("blue"),
|
|
38685
38893
|
_useState2 = _slicedToArray(_useState, 2),
|
|
38686
38894
|
selectedColor = _useState2[0],
|
|
@@ -38774,12 +38982,12 @@ var ColorHarmonyPicker = function ColorHarmonyPicker(_ref5) {
|
|
|
38774
38982
|
|
|
38775
38983
|
// ─── Wizard Components ──────────────────────────────────────────────────
|
|
38776
38984
|
|
|
38777
|
-
var MethodCard = function MethodCard(
|
|
38778
|
-
var icon =
|
|
38779
|
-
title =
|
|
38780
|
-
subtitle =
|
|
38781
|
-
selected =
|
|
38782
|
-
onClick =
|
|
38985
|
+
var MethodCard = function MethodCard(_ref7) {
|
|
38986
|
+
var icon = _ref7.icon,
|
|
38987
|
+
title = _ref7.title,
|
|
38988
|
+
subtitle = _ref7.subtitle,
|
|
38989
|
+
selected = _ref7.selected,
|
|
38990
|
+
onClick = _ref7.onClick;
|
|
38783
38991
|
return /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
38784
38992
|
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
38993
|
onClick: onClick,
|
|
@@ -38798,9 +39006,9 @@ var MethodCard = function MethodCard(_ref6) {
|
|
|
38798
39006
|
})]
|
|
38799
39007
|
});
|
|
38800
39008
|
};
|
|
38801
|
-
var RandomPreview = function RandomPreview(
|
|
38802
|
-
var theme =
|
|
38803
|
-
onRegenerate =
|
|
39009
|
+
var RandomPreview = function RandomPreview(_ref8) {
|
|
39010
|
+
var theme = _ref8.theme,
|
|
39011
|
+
onRegenerate = _ref8.onRegenerate;
|
|
38804
39012
|
var colors = theme ? [theme.primary, theme.secondary, theme.tertiary] : [];
|
|
38805
39013
|
return /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
38806
39014
|
className: "flex flex-col gap-4",
|
|
@@ -38827,20 +39035,20 @@ var RandomPreview = function RandomPreview(_ref7) {
|
|
|
38827
39035
|
})]
|
|
38828
39036
|
});
|
|
38829
39037
|
};
|
|
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 =
|
|
39038
|
+
var ThemeQuickCreate = function ThemeQuickCreate(_ref9) {
|
|
39039
|
+
var wizardName = _ref9.wizardName,
|
|
39040
|
+
setWizardName = _ref9.setWizardName,
|
|
39041
|
+
wizardMethod = _ref9.wizardMethod,
|
|
39042
|
+
setWizardMethod = _ref9.setWizardMethod,
|
|
39043
|
+
wizardTheme = _ref9.wizardTheme,
|
|
39044
|
+
setWizardTheme = _ref9.setWizardTheme,
|
|
39045
|
+
onComplete = _ref9.onComplete,
|
|
39046
|
+
_ref9$onExtract = _ref9.onExtract,
|
|
39047
|
+
onExtract = _ref9$onExtract === void 0 ? null : _ref9$onExtract,
|
|
39048
|
+
_ref9$onMapToTheme = _ref9.onMapToTheme,
|
|
39049
|
+
onMapToTheme = _ref9$onMapToTheme === void 0 ? null : _ref9$onMapToTheme,
|
|
39050
|
+
_ref9$initialMethod = _ref9.initialMethod,
|
|
39051
|
+
initialMethod = _ref9$initialMethod === void 0 ? null : _ref9$initialMethod;
|
|
38844
39052
|
var canCreate = wizardName.trim().length > 0 && wizardTheme !== null;
|
|
38845
39053
|
var showMethodPicker = initialMethod === null;
|
|
38846
39054
|
React.useEffect(function () {
|
|
@@ -66661,6 +66869,7 @@ exports.generateHarmonyTheme = generateHarmonyTheme;
|
|
|
66661
66869
|
exports.generateRandomTheme = generateRandomTheme;
|
|
66662
66870
|
exports.generateThemeName = generateThemeName;
|
|
66663
66871
|
exports.getBorderStyle = getBorderStyle;
|
|
66872
|
+
exports.getBrandPresets = getBrandPresets;
|
|
66664
66873
|
exports.getChildrenForLayoutItem = getChildrenForLayoutItem;
|
|
66665
66874
|
exports.getComponentInLayout = getComponentInLayout;
|
|
66666
66875
|
exports.getContainerBorderColor = getContainerBorderColor;
|