From 080ed34fe4d92efe63a4e74e5d6086bb9bc89993 Mon Sep 17 00:00:00 2001 From: Hadi <112569860+anotherhadi@users.noreply.github.com> Date: Thu, 3 Sep 2026 20:46:48 +0200 Subject: [PATCH] edit width & rebuild Signed-off-by: Hadi <112569860+anotherhadi@users.noreply.github.com> --- dist/{chunk-8j8kdeb4.js => chunk-7q3vke56.js} | 4 +++- dist/{chunk-ggv00s7t.js => chunk-j3tzsq9q.js} | 2 +- dist/components/HelpModal.js | 4 ++-- dist/components/Modal.js | 2 +- dist/components/help.js | 4 ++-- dist/components/index.js | 2 +- src/components/Modal.tsx | 4 +++- 7 files changed, 13 insertions(+), 9 deletions(-) rename dist/{chunk-8j8kdeb4.js => chunk-7q3vke56.js} (90%) rename dist/{chunk-ggv00s7t.js => chunk-j3tzsq9q.js} (98%) diff --git a/dist/chunk-8j8kdeb4.js b/dist/chunk-7q3vke56.js similarity index 90% rename from dist/chunk-8j8kdeb4.js rename to dist/chunk-7q3vke56.js index 6380720..21843df 100644 --- a/dist/chunk-8j8kdeb4.js +++ b/dist/chunk-7q3vke56.js @@ -18,6 +18,8 @@ function Modal(props) { const screenCap = () => Math.max(5, dimensions().height - 4); const maxPanelHeight = () => Math.min(props.maxHeight ?? screenCap(), screenCap()); const maxContentHeight = () => Math.max(1, maxPanelHeight() - 4); + const maxPanelWidth = () => Math.max(10, dimensions().width - 4); + const panelWidth = () => Math.min(props.width ?? 50, maxPanelWidth()); return _$createComponent(Portal, { get children() { return _$createComponent(Show, { @@ -64,7 +66,7 @@ function Modal(props) { } })); _$effect((_p$) => { - var _v$ = dimensions().width, _v$2 = dimensions().height, _v$3 = props.backdropColor ?? RGBA.fromInts(0, 0, 0, 150), _v$4 = theme.mouse ? props.onDismiss : undefined, _v$5 = props.width ?? 50, _v$6 = maxPanelHeight(), _v$7 = theme.borderStyle, _v$8 = props.accentColor ?? theme.primary, _v$9 = props.backgroundColor ?? theme.background, _v$0 = theme.mouse ? (event) => event.stopPropagation() : undefined; + var _v$ = dimensions().width, _v$2 = dimensions().height, _v$3 = props.backdropColor ?? RGBA.fromInts(0, 0, 0, 150), _v$4 = theme.mouse ? props.onDismiss : undefined, _v$5 = panelWidth(), _v$6 = maxPanelHeight(), _v$7 = theme.borderStyle, _v$8 = props.accentColor ?? theme.primary, _v$9 = props.backgroundColor ?? theme.background, _v$0 = theme.mouse ? (event) => event.stopPropagation() : undefined; _v$ !== _p$.e && (_p$.e = _$setProp(_el$, "width", _v$, _p$.e)); _v$2 !== _p$.t && (_p$.t = _$setProp(_el$, "height", _v$2, _p$.t)); _v$3 !== _p$.a && (_p$.a = _$setProp(_el$, "backgroundColor", _v$3, _p$.a)); diff --git a/dist/chunk-ggv00s7t.js b/dist/chunk-j3tzsq9q.js similarity index 98% rename from dist/chunk-ggv00s7t.js rename to dist/chunk-j3tzsq9q.js index 4a2be58..823b27f 100644 --- a/dist/chunk-ggv00s7t.js +++ b/dist/chunk-j3tzsq9q.js @@ -1,7 +1,7 @@ // @bun import { Modal -} from "./chunk-8j8kdeb4.js"; +} from "./chunk-7q3vke56.js"; import { helpOpen, toggleHelp diff --git a/dist/components/HelpModal.js b/dist/components/HelpModal.js index 7e08133..4a8beff 100644 --- a/dist/components/HelpModal.js +++ b/dist/components/HelpModal.js @@ -1,8 +1,8 @@ // @bun import { HelpModal -} from "../chunk-ggv00s7t.js"; -import"../chunk-8j8kdeb4.js"; +} from "../chunk-j3tzsq9q.js"; +import"../chunk-7q3vke56.js"; import"../chunk-9cbm4zqz.js"; import"../chunk-hcq62p48.js"; import"../chunk-cnhhssmz.js"; diff --git a/dist/components/Modal.js b/dist/components/Modal.js index 4c5027c..9328f94 100644 --- a/dist/components/Modal.js +++ b/dist/components/Modal.js @@ -1,7 +1,7 @@ // @bun import { Modal -} from "../chunk-8j8kdeb4.js"; +} from "../chunk-7q3vke56.js"; import"../chunk-9cbm4zqz.js"; import"../chunk-hcq62p48.js"; import"../chunk-cnhhssmz.js"; diff --git a/dist/components/help.js b/dist/components/help.js index 74e2994..549d696 100644 --- a/dist/components/help.js +++ b/dist/components/help.js @@ -1,8 +1,8 @@ // @bun import { HelpModal -} from "../chunk-ggv00s7t.js"; -import"../chunk-8j8kdeb4.js"; +} from "../chunk-j3tzsq9q.js"; +import"../chunk-7q3vke56.js"; import { HelpBar } from "../chunk-mj1hhxzy.js"; diff --git a/dist/components/index.js b/dist/components/index.js index 1f057be..40b09b9 100644 --- a/dist/components/index.js +++ b/dist/components/index.js @@ -17,7 +17,7 @@ import { } from "../chunk-gc6m7gbw.js"; import { Modal -} from "../chunk-8j8kdeb4.js"; +} from "../chunk-7q3vke56.js"; import { Badge } from "../chunk-5my64v78.js"; diff --git a/src/components/Modal.tsx b/src/components/Modal.tsx index 86481c9..6ad0f28 100644 --- a/src/components/Modal.tsx +++ b/src/components/Modal.tsx @@ -19,6 +19,8 @@ export function Modal(props: ModalProps) { const screenCap = () => Math.max(5, dimensions().height - 4); const maxPanelHeight = () => Math.min(props.maxHeight ?? screenCap(), screenCap()); const maxContentHeight = () => Math.max(1, maxPanelHeight() - 4); + const maxPanelWidth = () => Math.max(10, dimensions().width - 4); + const panelWidth = () => Math.min(props.width ?? 50, maxPanelWidth()); return ( @@ -36,7 +38,7 @@ export function Modal(props: ModalProps) { onMouseDown={theme.mouse ? props.onDismiss : undefined} >