add preset & rebuild

Signed-off-by: Hadi <[email protected]>
This commit is contained in:
Hadi
2026-09-03 16:45:05 +02:00
parent 6d858380c7
commit 280507f7e0
34 changed files with 110 additions and 81 deletions
+1 -1
View File
@@ -1,7 +1,7 @@
// @bun
import {
theme
} from "./chunk-57mam43k.js";
} from "./chunk-x7m82z3z.js";
// src/components/Modal.tsx
import { createComponent as _$createComponent } from "@opentui/solid";
+1 -1
View File
@@ -1,7 +1,7 @@
// @bun
import {
theme
} from "./chunk-57mam43k.js";
} from "./chunk-x7m82z3z.js";
// src/components/ProgressBar.tsx
import { effect as _$effect } from "@opentui/solid";
+1 -1
View File
@@ -1,7 +1,7 @@
// @bun
import {
theme
} from "./chunk-57mam43k.js";
} from "./chunk-x7m82z3z.js";
import {
dismiss,
notifications
+1 -1
View File
@@ -1,7 +1,7 @@
// @bun
import {
theme
} from "./chunk-57mam43k.js";
} from "./chunk-x7m82z3z.js";
// src/components/Badge.tsx
import { insert as _$insert } from "@opentui/solid";
+1 -1
View File
@@ -1,7 +1,7 @@
// @bun
import {
Modal
} from "./chunk-4j2gzwtd.js";
} from "./chunk-3t6nhsa8.js";
import {
helpOpen,
toggleHelp
+5 -1
View File
@@ -34,7 +34,11 @@ function buildPresets(theme) {
focusedBorderColor: theme.primary,
backgroundColor: theme.background
};
return { select, tabSelect, input, textarea: input, box };
const slider = {
backgroundColor: theme.subtleBg,
foregroundColor: theme.primary
};
return { select, tabSelect, input, textarea: input, box, slider };
}
export { buildPresets };
+1 -1
View File
@@ -1,7 +1,7 @@
// @bun
import {
theme
} from "./chunk-57mam43k.js";
} from "./chunk-x7m82z3z.js";
// src/components/SignalBars.tsx
import { effect as _$effect } from "@opentui/solid";
+1 -1
View File
@@ -1,7 +1,7 @@
// @bun
import {
theme
} from "./chunk-57mam43k.js";
} from "./chunk-x7m82z3z.js";
// src/components/MinSizeGuard.tsx
import { createComponent as _$createComponent } from "@opentui/solid";
+1 -1
View File
@@ -1,7 +1,7 @@
// @bun
import {
theme
} from "./chunk-57mam43k.js";
} from "./chunk-x7m82z3z.js";
// src/components/Tabs.tsx
import { effect as _$effect } from "@opentui/solid";
+1 -1
View File
@@ -2,7 +2,7 @@
import {
presets,
theme
} from "./chunk-57mam43k.js";
} from "./chunk-x7m82z3z.js";
// src/components/Sidebar.tsx
import { use as _$use } from "@opentui/solid";
+2 -2
View File
@@ -1,10 +1,10 @@
// @bun
import {
Badge
} from "./chunk-wasbecqm.js";
} from "./chunk-bscbaa87.js";
import {
theme
} from "./chunk-57mam43k.js";
} from "./chunk-x7m82z3z.js";
// src/components/Toggle.tsx
import { setProp as _$setProp } from "@opentui/solid";
+1 -1
View File
@@ -1,7 +1,7 @@
// @bun
import {
theme
} from "./chunk-57mam43k.js";
} from "./chunk-x7m82z3z.js";
// src/components/HelpBar.tsx
import { createTextNode as _$createTextNode } from "@opentui/solid";
+3 -3
View File
@@ -1,7 +1,4 @@
// @bun
import {
buildPresets
} from "./chunk-ergc99dh.js";
import {
configPath,
readYamlFile
@@ -11,6 +8,9 @@ import {
normalizeColors,
resolveBorderStyle
} from "./chunk-hcq62p48.js";
import {
buildPresets
} from "./chunk-cnhhssmz.js";
// src/index.ts
import { join } from "path";
+1 -1
View File
@@ -1,7 +1,7 @@
// @bun
import {
theme
} from "./chunk-57mam43k.js";
} from "./chunk-x7m82z3z.js";
// src/components/Box.tsx
import { spread as _$spread } from "@opentui/solid";
+3 -3
View File
@@ -1,11 +1,11 @@
// @bun
import {
Badge
} from "../chunk-wasbecqm.js";
import"../chunk-57mam43k.js";
import"../chunk-ergc99dh.js";
} from "../chunk-bscbaa87.js";
import"../chunk-x7m82z3z.js";
import"../chunk-7f8jagy5.js";
import"../chunk-hcq62p48.js";
import"../chunk-cnhhssmz.js";
export {
Badge
};
+3 -3
View File
@@ -1,11 +1,11 @@
// @bun
import {
Box
} from "../chunk-n96bgmbh.js";
import"../chunk-57mam43k.js";
import"../chunk-ergc99dh.js";
} from "../chunk-ynqvwj4d.js";
import"../chunk-x7m82z3z.js";
import"../chunk-7f8jagy5.js";
import"../chunk-hcq62p48.js";
import"../chunk-cnhhssmz.js";
export {
Box
};
+3 -3
View File
@@ -1,11 +1,11 @@
// @bun
import {
HelpBar
} from "../chunk-dv2w3sfk.js";
import"../chunk-57mam43k.js";
import"../chunk-ergc99dh.js";
} from "../chunk-rvq53a2a.js";
import"../chunk-x7m82z3z.js";
import"../chunk-7f8jagy5.js";
import"../chunk-hcq62p48.js";
import"../chunk-cnhhssmz.js";
export {
HelpBar
};
+4 -4
View File
@@ -1,12 +1,12 @@
// @bun
import {
HelpModal
} from "../chunk-2n7bvge9.js";
import"../chunk-4j2gzwtd.js";
import"../chunk-57mam43k.js";
import"../chunk-ergc99dh.js";
} from "../chunk-c7bjgk8c.js";
import"../chunk-3t6nhsa8.js";
import"../chunk-x7m82z3z.js";
import"../chunk-7f8jagy5.js";
import"../chunk-hcq62p48.js";
import"../chunk-cnhhssmz.js";
import"../chunk-cyvpvpws.js";
export {
HelpModal
+3 -3
View File
@@ -1,11 +1,11 @@
// @bun
import {
MinSizeGuard
} from "../chunk-nr74cgcr.js";
import"../chunk-57mam43k.js";
import"../chunk-ergc99dh.js";
} from "../chunk-eta27h3c.js";
import"../chunk-x7m82z3z.js";
import"../chunk-7f8jagy5.js";
import"../chunk-hcq62p48.js";
import"../chunk-cnhhssmz.js";
export {
MinSizeGuard
};
+3 -3
View File
@@ -1,11 +1,11 @@
// @bun
import {
Modal
} from "../chunk-4j2gzwtd.js";
import"../chunk-57mam43k.js";
import"../chunk-ergc99dh.js";
} from "../chunk-3t6nhsa8.js";
import"../chunk-x7m82z3z.js";
import"../chunk-7f8jagy5.js";
import"../chunk-hcq62p48.js";
import"../chunk-cnhhssmz.js";
export {
Modal
};
+3 -3
View File
@@ -1,11 +1,11 @@
// @bun
import {
NotificationHost
} from "../chunk-g7p0f33m.js";
import"../chunk-57mam43k.js";
import"../chunk-ergc99dh.js";
} from "../chunk-b0h95a6q.js";
import"../chunk-x7m82z3z.js";
import"../chunk-7f8jagy5.js";
import"../chunk-hcq62p48.js";
import"../chunk-cnhhssmz.js";
import"../chunk-y6txxzxk.js";
export {
NotificationHost
+3 -3
View File
@@ -1,11 +1,11 @@
// @bun
import {
ProgressBar
} from "../chunk-ae0jkf2z.js";
import"../chunk-57mam43k.js";
import"../chunk-ergc99dh.js";
} from "../chunk-5m64a9kb.js";
import"../chunk-x7m82z3z.js";
import"../chunk-7f8jagy5.js";
import"../chunk-hcq62p48.js";
import"../chunk-cnhhssmz.js";
export {
ProgressBar
};
+3 -3
View File
@@ -1,11 +1,11 @@
// @bun
import {
Sidebar
} from "../chunk-vve1k0ax.js";
import"../chunk-57mam43k.js";
import"../chunk-ergc99dh.js";
} from "../chunk-hj94kpbg.js";
import"../chunk-x7m82z3z.js";
import"../chunk-7f8jagy5.js";
import"../chunk-hcq62p48.js";
import"../chunk-cnhhssmz.js";
export {
Sidebar
};
+3 -3
View File
@@ -1,11 +1,11 @@
// @bun
import {
SignalBars
} from "../chunk-xab9ag99.js";
import"../chunk-57mam43k.js";
import"../chunk-ergc99dh.js";
} from "../chunk-dctn29v0.js";
import"../chunk-x7m82z3z.js";
import"../chunk-7f8jagy5.js";
import"../chunk-hcq62p48.js";
import"../chunk-cnhhssmz.js";
export {
SignalBars
};
+2 -2
View File
@@ -1,10 +1,10 @@
// @bun
import {
theme
} from "../chunk-57mam43k.js";
import"../chunk-ergc99dh.js";
} from "../chunk-x7m82z3z.js";
import"../chunk-7f8jagy5.js";
import"../chunk-hcq62p48.js";
import"../chunk-cnhhssmz.js";
// src/components/Spinner.tsx
import { setProp as _$setProp } from "@opentui/solid";
+3 -3
View File
@@ -2,11 +2,11 @@
import {
Tabs,
stepTabValue
} from "../chunk-jb965p47.js";
import"../chunk-57mam43k.js";
import"../chunk-ergc99dh.js";
} from "../chunk-ev4wvhd2.js";
import"../chunk-x7m82z3z.js";
import"../chunk-7f8jagy5.js";
import"../chunk-hcq62p48.js";
import"../chunk-cnhhssmz.js";
export {
stepTabValue,
Tabs
+4 -4
View File
@@ -1,12 +1,12 @@
// @bun
import {
Toggle
} from "../chunk-j29ydjfr.js";
import"../chunk-wasbecqm.js";
import"../chunk-57mam43k.js";
import"../chunk-ergc99dh.js";
} from "../chunk-mezyz219.js";
import"../chunk-bscbaa87.js";
import"../chunk-x7m82z3z.js";
import"../chunk-7f8jagy5.js";
import"../chunk-hcq62p48.js";
import"../chunk-cnhhssmz.js";
export {
Toggle
};
+5 -5
View File
@@ -1,15 +1,15 @@
// @bun
import {
HelpModal
} from "../chunk-2n7bvge9.js";
import"../chunk-4j2gzwtd.js";
} from "../chunk-c7bjgk8c.js";
import"../chunk-3t6nhsa8.js";
import {
HelpBar
} from "../chunk-dv2w3sfk.js";
import"../chunk-57mam43k.js";
import"../chunk-ergc99dh.js";
} from "../chunk-rvq53a2a.js";
import"../chunk-x7m82z3z.js";
import"../chunk-7f8jagy5.js";
import"../chunk-hcq62p48.js";
import"../chunk-cnhhssmz.js";
import"../chunk-cyvpvpws.js";
export {
HelpModal,
+12 -12
View File
@@ -1,39 +1,39 @@
// @bun
import {
Box
} from "../chunk-n96bgmbh.js";
} from "../chunk-ynqvwj4d.js";
import {
NotificationHost
} from "../chunk-g7p0f33m.js";
} from "../chunk-b0h95a6q.js";
import {
Toggle
} from "../chunk-j29ydjfr.js";
} from "../chunk-mezyz219.js";
import {
MinSizeGuard
} from "../chunk-nr74cgcr.js";
} from "../chunk-eta27h3c.js";
import {
Sidebar
} from "../chunk-vve1k0ax.js";
} from "../chunk-hj94kpbg.js";
import {
Tabs,
stepTabValue
} from "../chunk-jb965p47.js";
} from "../chunk-ev4wvhd2.js";
import {
Modal
} from "../chunk-4j2gzwtd.js";
} from "../chunk-3t6nhsa8.js";
import {
Badge
} from "../chunk-wasbecqm.js";
} from "../chunk-bscbaa87.js";
import {
ProgressBar
} from "../chunk-ae0jkf2z.js";
} from "../chunk-5m64a9kb.js";
import {
SignalBars
} from "../chunk-xab9ag99.js";
import"../chunk-57mam43k.js";
import"../chunk-ergc99dh.js";
} from "../chunk-dctn29v0.js";
import"../chunk-x7m82z3z.js";
import"../chunk-7f8jagy5.js";
import"../chunk-hcq62p48.js";
import"../chunk-cnhhssmz.js";
import"../chunk-y6txxzxk.js";
export {
stepTabValue,
+2 -2
View File
@@ -2,12 +2,12 @@
import {
presets,
theme
} from "./chunk-57mam43k.js";
import"./chunk-ergc99dh.js";
} from "./chunk-x7m82z3z.js";
import {
configPath
} from "./chunk-7f8jagy5.js";
import"./chunk-hcq62p48.js";
import"./chunk-cnhhssmz.js";
export {
theme,
presets,
+1 -1
View File
@@ -1,7 +1,7 @@
// @bun
import {
buildPresets
} from "./chunk-ergc99dh.js";
} from "./chunk-cnhhssmz.js";
export {
buildPresets
};
+4 -2
View File
@@ -2,10 +2,10 @@
import {
presets,
theme
} from "./chunk-57mam43k.js";
import"./chunk-ergc99dh.js";
} from "./chunk-x7m82z3z.js";
import"./chunk-7f8jagy5.js";
import"./chunk-hcq62p48.js";
import"./chunk-cnhhssmz.js";
// src/solid.ts
import { extend } from "@opentui/solid";
@@ -14,6 +14,7 @@ import {
BoxRenderable,
InputRenderable,
SelectRenderable,
SliderRenderable,
TabSelectRenderable,
TextareaRenderable,
TextRenderable
@@ -38,6 +39,7 @@ extend({
tab_select: withThemeDefaults(TabSelectRenderable, presets.tabSelect),
input: withThemeDefaults(InputRenderable, presets.input),
textarea: withThemeDefaults(TextareaRenderable, presets.textarea),
slider: withThemeDefaults(SliderRenderable, presets.slider),
text: withThemeDefaults(TextRenderable, { fg: theme.text }),
ascii_font: withThemeDefaults(ASCIIFontRenderable, { color: theme.primary })
});
+12 -1
View File
@@ -37,12 +37,18 @@ export interface BoxPreset {
backgroundColor: string;
}
export interface SliderPreset {
backgroundColor: string;
foregroundColor: string;
}
export interface Presets {
select: SelectPreset;
tabSelect: TabSelectPreset;
input: InputPreset;
textarea: InputPreset;
box: BoxPreset;
slider: SliderPreset;
}
export function buildPresets(theme: Theme): Presets {
@@ -83,5 +89,10 @@ export function buildPresets(theme: Theme): Presets {
backgroundColor: theme.background,
};
return { select, tabSelect, input, textarea: input, box };
const slider: SliderPreset = {
backgroundColor: theme.subtleBg,
foregroundColor: theme.primary,
};
return { select, tabSelect, input, textarea: input, box, slider };
}
+13 -1
View File
@@ -4,15 +4,26 @@ import {
BoxRenderable,
InputRenderable,
SelectRenderable,
SliderRenderable,
TabSelectRenderable,
TextareaRenderable,
TextRenderable,
} from "@opentui/core";
import { presets, theme } from "./index.ts";
declare module "@opentui/solid" {
interface OpenTUIComponents {
slider: typeof SliderRenderable;
}
}
type AnyCtor = new (...args: any[]) => any;
function withThemeDefaults<T extends AnyCtor>(Ctor: T, defaults: object, after?: (instance: any) => void): T {
function withThemeDefaults<T extends AnyCtor>(
Ctor: T,
defaults: object,
after?: (instance: any) => void,
): T {
class Themed extends Ctor {
constructor(...args: any[]) {
super(...args);
@@ -34,6 +45,7 @@ extend({
tab_select: withThemeDefaults(TabSelectRenderable, presets.tabSelect),
input: withThemeDefaults(InputRenderable, presets.input),
textarea: withThemeDefaults(TextareaRenderable, presets.textarea),
slider: withThemeDefaults(SliderRenderable, presets.slider),
text: withThemeDefaults(TextRenderable, { fg: theme.text }),
ascii_font: withThemeDefaults(ASCIIFontRenderable, { color: theme.primary }),
});