@opencode/ui 0.0.0-dev-1293 → 0.0.0-dev-1295
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/i18n/en.d.ts
CHANGED
|
@@ -178,6 +178,9 @@ declare const source: {
|
|
|
178
178
|
"ui.timeline.activity.stoppedSubagents.other": string;
|
|
179
179
|
"ui.timeline.event.started": string;
|
|
180
180
|
"ui.timeline.event.finished": string;
|
|
181
|
+
"ui.timeline.subagent.name": string;
|
|
182
|
+
"ui.timeline.subagent.updated": string;
|
|
183
|
+
"ui.timeline.subagent.completed": string;
|
|
181
184
|
"ui.timeline.event.stopped": string;
|
|
182
185
|
"ui.timeline.event.subagents.one": string;
|
|
183
186
|
"ui.timeline.event.subagents.other": string;
|
|
@@ -2,12 +2,19 @@ import { Content } from "@kobalte/core/dialog";
|
|
|
2
2
|
import { type ComponentProps, type JSXElement, type ParentProps } from "solid-js";
|
|
3
3
|
import "./dialog.css";
|
|
4
4
|
export interface DialogProps extends ParentProps {
|
|
5
|
+
/**
|
|
6
|
+
* normal: 480px wide, for confirmations and small forms. large: 880×600, for palettes, pickers and lists.
|
|
7
|
+
* x-large: 1040×680, for long documents and settings-like panels. Each clamps to the window.
|
|
8
|
+
*/
|
|
5
9
|
size?: "normal" | "large" | "x-large";
|
|
10
|
+
/** Height follows the content, up to the size's height. Large sizes grow down from a fixed top edge. */
|
|
11
|
+
fit?: boolean;
|
|
12
|
+
/** Fit within the preset's height and keep its top edge as content changes. */
|
|
13
|
+
anchored?: boolean;
|
|
6
14
|
variant?: "default" | "settings";
|
|
7
15
|
class?: ComponentProps<"div">["class"];
|
|
8
16
|
containerClass?: ComponentProps<"div">["class"];
|
|
9
17
|
classList?: ComponentProps<"div">["classList"];
|
|
10
|
-
fit?: boolean;
|
|
11
18
|
onCloseAutoFocus?: ComponentProps<typeof Content>["onCloseAutoFocus"];
|
|
12
19
|
preventBackdropDismiss?: boolean;
|
|
13
20
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@opencode/ui",
|
|
3
|
-
"version": "0.0.0-dev-
|
|
3
|
+
"version": "0.0.0-dev-1295",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -309,7 +309,7 @@
|
|
|
309
309
|
"dependencies": {
|
|
310
310
|
"@kitlangton/solid-motion": "0.2.2",
|
|
311
311
|
"@kobalte/core": "0.13.13",
|
|
312
|
-
"@opencode/util": "0.0.0-dev-
|
|
312
|
+
"@opencode/util": "0.0.0-dev-1295",
|
|
313
313
|
"@pierre/diffs": "1.6.1",
|
|
314
314
|
"@pierre/highlights": "0.2.0",
|
|
315
315
|
"@solid-primitives/event-listener": "2.4.6",
|
package/src/i18n/en.ts
CHANGED
|
@@ -190,6 +190,9 @@ const source = {
|
|
|
190
190
|
"ui.timeline.activity.stoppedSubagents.other": "stopped {{count}} subagents",
|
|
191
191
|
"ui.timeline.event.started": "Started",
|
|
192
192
|
"ui.timeline.event.finished": "Finished",
|
|
193
|
+
"ui.timeline.subagent.name": "{{name}} Agent",
|
|
194
|
+
"ui.timeline.subagent.updated": "Updated",
|
|
195
|
+
"ui.timeline.subagent.completed": "Completed",
|
|
193
196
|
"ui.timeline.event.stopped": "Stopped",
|
|
194
197
|
"ui.timeline.event.subagents.one": "{{count}} subagent",
|
|
195
198
|
"ui.timeline.event.subagents.other": "{{count}} subagents",
|
|
@@ -20,8 +20,10 @@
|
|
|
20
20
|
display: flex;
|
|
21
21
|
flex-direction: column;
|
|
22
22
|
align-items: flex-start;
|
|
23
|
-
width: 480px;
|
|
24
|
-
height: 368px;
|
|
23
|
+
width: min(calc(100vw - 32px), 480px);
|
|
24
|
+
--dialog-height: min(calc(100vh - 32px), 368px);
|
|
25
|
+
height: var(--dialog-height);
|
|
26
|
+
max-height: calc(100vh - 32px);
|
|
25
27
|
background: var(--v2-background-bg-layer-01);
|
|
26
28
|
box-shadow: var(--v2-elevation-overlay);
|
|
27
29
|
border-radius: 6px;
|
|
@@ -158,23 +160,32 @@
|
|
|
158
160
|
}
|
|
159
161
|
}
|
|
160
162
|
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
height: auto;
|
|
163
|
+
&:is([data-anchored], [data-size="large"], [data-size="x-large"]) {
|
|
164
|
+
align-items: flex-start;
|
|
164
165
|
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
166
|
+
[data-slot="dialog-container"] {
|
|
167
|
+
max-height: var(--dialog-height);
|
|
168
|
+
margin-top: calc((100vh - var(--dialog-height)) / 2);
|
|
168
169
|
}
|
|
169
170
|
}
|
|
170
171
|
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
172
|
+
&:is([data-size="large"], [data-size="x-large"]) [data-slot="dialog-container"] {
|
|
173
|
+
--dialog-height: min(calc(100vh - 96px), 600px);
|
|
174
|
+
width: min(calc(100vw - 32px), 880px);
|
|
175
|
+
background: var(--v2-background-bg-base);
|
|
176
|
+
border-radius: 12px;
|
|
174
177
|
}
|
|
175
178
|
|
|
176
179
|
&[data-size="x-large"] [data-slot="dialog-container"] {
|
|
177
|
-
|
|
178
|
-
|
|
180
|
+
--dialog-height: min(calc(100vh - 96px), 680px);
|
|
181
|
+
width: min(calc(100vw - 32px), 1040px);
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
&[data-fit] [data-slot="dialog-container"] {
|
|
185
|
+
height: auto;
|
|
186
|
+
|
|
187
|
+
[data-slot="dialog-content"] {
|
|
188
|
+
min-height: 0;
|
|
189
|
+
}
|
|
179
190
|
}
|
|
180
191
|
}
|
|
@@ -20,12 +20,19 @@ const TEXT_FIELD = [
|
|
|
20
20
|
].join(", ")
|
|
21
21
|
|
|
22
22
|
export interface DialogProps extends ParentProps {
|
|
23
|
+
/**
|
|
24
|
+
* normal: 480px wide, for confirmations and small forms. large: 880×600, for palettes, pickers and lists.
|
|
25
|
+
* x-large: 1040×680, for long documents and settings-like panels. Each clamps to the window.
|
|
26
|
+
*/
|
|
23
27
|
size?: "normal" | "large" | "x-large"
|
|
28
|
+
/** Height follows the content, up to the size's height. Large sizes grow down from a fixed top edge. */
|
|
29
|
+
fit?: boolean
|
|
30
|
+
/** Fit within the preset's height and keep its top edge as content changes. */
|
|
31
|
+
anchored?: boolean
|
|
24
32
|
variant?: "default" | "settings"
|
|
25
33
|
class?: ComponentProps<"div">["class"]
|
|
26
34
|
containerClass?: ComponentProps<"div">["class"]
|
|
27
35
|
classList?: ComponentProps<"div">["classList"]
|
|
28
|
-
fit?: boolean
|
|
29
36
|
onCloseAutoFocus?: ComponentProps<typeof Content>["onCloseAutoFocus"]
|
|
30
37
|
preventBackdropDismiss?: boolean
|
|
31
38
|
}
|
|
@@ -108,6 +115,7 @@ export function Dialog(props: DialogProps) {
|
|
|
108
115
|
"containerClass",
|
|
109
116
|
"classList",
|
|
110
117
|
"fit",
|
|
118
|
+
"anchored",
|
|
111
119
|
"children",
|
|
112
120
|
"onCloseAutoFocus",
|
|
113
121
|
"preventBackdropDismiss",
|
|
@@ -123,6 +131,7 @@ export function Dialog(props: DialogProps) {
|
|
|
123
131
|
data-component="dialog-v2"
|
|
124
132
|
data-variant={local.variant === "settings" ? "settings" : undefined}
|
|
125
133
|
data-fit={local.fit ? true : undefined}
|
|
134
|
+
data-anchored={local.anchored ? true : undefined}
|
|
126
135
|
data-size={local.size || "normal"}
|
|
127
136
|
>
|
|
128
137
|
<div data-slot="dialog-container" class={local.containerClass}>
|