@trops/dash-core 0.1.632 → 0.1.634
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 +60 -35
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +60 -35
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1145,7 +1145,17 @@ var ElectronDashboardApi = /*#__PURE__*/function () {
|
|
|
1145
1145
|
this.events = apiEvents;
|
|
1146
1146
|
}
|
|
1147
1147
|
}
|
|
1148
|
+
/**
|
|
1149
|
+
* The Bot Factory IPC namespace (window.mainApi.bots), consumed by
|
|
1150
|
+
* Settings → Bots (BotsSection). Exposed as a pass-through so the settings UI
|
|
1151
|
+
* can reach `dashApi.bots.*` the same way it reaches other domains.
|
|
1152
|
+
*/
|
|
1148
1153
|
return _createClass(ElectronDashboardApi, [{
|
|
1154
|
+
key: "bots",
|
|
1155
|
+
get: function get() {
|
|
1156
|
+
return this.api ? this.api.bots : undefined;
|
|
1157
|
+
}
|
|
1158
|
+
}, {
|
|
1149
1159
|
key: "chooseFile",
|
|
1150
1160
|
value: function chooseFile() {
|
|
1151
1161
|
var _this = this;
|
|
@@ -38672,14 +38682,17 @@ var ThemeQuickCreate = function ThemeQuickCreate(_ref11) {
|
|
|
38672
38682
|
}
|
|
38673
38683
|
return /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
38674
38684
|
className: "flex flex-col gap-4 p-6 flex-1 min-h-0 overflow-hidden",
|
|
38675
|
-
children: [/*#__PURE__*/jsxRuntime.jsx(
|
|
38676
|
-
|
|
38677
|
-
|
|
38678
|
-
|
|
38679
|
-
|
|
38680
|
-
|
|
38685
|
+
children: [/*#__PURE__*/jsxRuntime.jsx("div", {
|
|
38686
|
+
className: "shrink-0",
|
|
38687
|
+
children: /*#__PURE__*/jsxRuntime.jsx(DashReact.InputText, {
|
|
38688
|
+
value: wizardName,
|
|
38689
|
+
onChange: function onChange(val) {
|
|
38690
|
+
return setWizardName(val);
|
|
38691
|
+
},
|
|
38692
|
+
placeholder: "Theme name..."
|
|
38693
|
+
})
|
|
38681
38694
|
}), showMethodPicker && /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
38682
|
-
className: "flex flex-col gap-2",
|
|
38695
|
+
className: "flex flex-col gap-2 shrink-0",
|
|
38683
38696
|
children: [/*#__PURE__*/jsxRuntime.jsx("span", {
|
|
38684
38697
|
className: "text-sm font-semibold opacity-50",
|
|
38685
38698
|
children: "Generation Method"
|
|
@@ -38719,33 +38732,39 @@ var ThemeQuickCreate = function ThemeQuickCreate(_ref11) {
|
|
|
38719
38732
|
}
|
|
38720
38733
|
})]
|
|
38721
38734
|
})]
|
|
38722
|
-
}),
|
|
38723
|
-
|
|
38724
|
-
|
|
38725
|
-
|
|
38726
|
-
|
|
38727
|
-
|
|
38728
|
-
|
|
38729
|
-
|
|
38730
|
-
|
|
38731
|
-
|
|
38732
|
-
|
|
38733
|
-
|
|
38734
|
-
|
|
38735
|
-
|
|
38736
|
-
|
|
38737
|
-
|
|
38738
|
-
|
|
38739
|
-
|
|
38740
|
-
|
|
38741
|
-
|
|
38742
|
-
|
|
38743
|
-
|
|
38744
|
-
|
|
38745
|
-
|
|
38746
|
-
|
|
38747
|
-
|
|
38748
|
-
|
|
38735
|
+
}), /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
38736
|
+
className: "flex-1 min-h-0 overflow-y-auto",
|
|
38737
|
+
children: [wizardMethod === "presets" && /*#__PURE__*/jsxRuntime.jsx(PresetGallery, {
|
|
38738
|
+
onSelect: function onSelect(preset) {
|
|
38739
|
+
return setWizardTheme(preset);
|
|
38740
|
+
},
|
|
38741
|
+
selectedPresetId: wizardTheme === null || wizardTheme === void 0 ? void 0 : wizardTheme.name,
|
|
38742
|
+
inline: true
|
|
38743
|
+
}), wizardMethod === "random" && /*#__PURE__*/jsxRuntime.jsx(RandomPreview, {
|
|
38744
|
+
onCommit: function onCommit(theme) {
|
|
38745
|
+
return setWizardTheme(theme);
|
|
38746
|
+
}
|
|
38747
|
+
}), wizardMethod === "color" && /*#__PURE__*/jsxRuntime.jsx(ColorHarmonyPicker, {
|
|
38748
|
+
onGenerate: function onGenerate(theme) {
|
|
38749
|
+
return setWizardTheme(theme);
|
|
38750
|
+
},
|
|
38751
|
+
inline: true
|
|
38752
|
+
}), wizardMethod === "from-url" && onExtract && /*#__PURE__*/jsxRuntime.jsx(DashReact.ThemeFromUrlPane, {
|
|
38753
|
+
onExtract: onExtract,
|
|
38754
|
+
onMapToTheme: onMapToTheme,
|
|
38755
|
+
onGenerate: function onGenerate(theme) {
|
|
38756
|
+
return setWizardTheme(theme);
|
|
38757
|
+
},
|
|
38758
|
+
inline: true
|
|
38759
|
+
})]
|
|
38760
|
+
}), /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
38761
|
+
className: "shrink-0",
|
|
38762
|
+
children: /*#__PURE__*/jsxRuntime.jsx(DashReact.Button2, {
|
|
38763
|
+
title: "Create Theme",
|
|
38764
|
+
onClick: onComplete,
|
|
38765
|
+
disabled: !canCreate,
|
|
38766
|
+
block: true
|
|
38767
|
+
})
|
|
38749
38768
|
})]
|
|
38750
38769
|
});
|
|
38751
38770
|
};
|
|
@@ -39606,6 +39625,10 @@ var ThemeManagerModal = function ThemeManagerModal(_ref) {
|
|
|
39606
39625
|
_useState10 = _slicedToArray(_useState1, 2),
|
|
39607
39626
|
isChoosingMode = _useState10[0],
|
|
39608
39627
|
setIsChoosingMode = _useState10[1];
|
|
39628
|
+
// `startInCreate` should auto-open the chooser ONCE per modal open. Without
|
|
39629
|
+
// this guard the effect re-fires after a theme is created (themes change →
|
|
39630
|
+
// isCreating flips false) and bounces the user back to the chooser.
|
|
39631
|
+
var startInCreateHandledRef = React.useRef(false);
|
|
39609
39632
|
var _useState11 = React.useState(false),
|
|
39610
39633
|
_useState12 = _slicedToArray(_useState11, 2),
|
|
39611
39634
|
isSearching = _useState12[0],
|
|
@@ -39642,6 +39665,7 @@ var ThemeManagerModal = function ThemeManagerModal(_ref) {
|
|
|
39642
39665
|
setIsChoosingMode(false);
|
|
39643
39666
|
setIsSearching(false);
|
|
39644
39667
|
setSelectedMethod(null);
|
|
39668
|
+
startInCreateHandledRef.current = false;
|
|
39645
39669
|
} else {
|
|
39646
39670
|
if (themeKeySelected === null && themes) {
|
|
39647
39671
|
var themeKeyTemp = settings && "theme" in settings ? settings["theme"] in themes ? settings["theme"] : Object.keys(themes)[0] : Object.keys(themes)[0];
|
|
@@ -39656,7 +39680,8 @@ var ThemeManagerModal = function ThemeManagerModal(_ref) {
|
|
|
39656
39680
|
return rawThemes[themeKeyTemp];
|
|
39657
39681
|
});
|
|
39658
39682
|
}
|
|
39659
|
-
if (startInCreate && !isChoosingMode && !isCreating) {
|
|
39683
|
+
if (startInCreate && !startInCreateHandledRef.current && !isChoosingMode && !isCreating) {
|
|
39684
|
+
startInCreateHandledRef.current = true;
|
|
39660
39685
|
setIsChoosingMode(true);
|
|
39661
39686
|
setIsCreating(false);
|
|
39662
39687
|
setIsSearching(false);
|