@opencode/ui 0.0.0-dev-1280 → 0.0.0-dev-1284
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.
|
@@ -42,6 +42,8 @@ export interface ToastAction {
|
|
|
42
42
|
onClick: "dismiss" | (() => void);
|
|
43
43
|
}
|
|
44
44
|
export interface ToastOptions {
|
|
45
|
+
/** Called when the user closes or swipes away the toast. */
|
|
46
|
+
onDismiss?: () => void;
|
|
45
47
|
title?: string;
|
|
46
48
|
description?: string;
|
|
47
49
|
/** An element, or a render function the toast calls under its own owner, for icons created from imperative code. */
|
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-1284",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -294,7 +294,7 @@
|
|
|
294
294
|
"generate:v2-oc2": "bun run script/build-oc2-v2-overrides.ts"
|
|
295
295
|
},
|
|
296
296
|
"devDependencies": {
|
|
297
|
-
"@hona/strobe": "0.
|
|
297
|
+
"@hona/strobe": "0.34.0",
|
|
298
298
|
"@solidjs/meta": "0.29.4",
|
|
299
299
|
"@tsconfig/node22": "22.0.2",
|
|
300
300
|
"@types/bun": "1.4.3",
|
|
@@ -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-1284",
|
|
313
313
|
"@pierre/diffs": "1.6.1",
|
|
314
314
|
"@pierre/highlights": "0.2.0",
|
|
315
315
|
"@solid-primitives/event-listener": "2.4.6",
|
|
@@ -183,6 +183,8 @@ export interface ToastAction {
|
|
|
183
183
|
}
|
|
184
184
|
|
|
185
185
|
export interface ToastOptions {
|
|
186
|
+
/** Called when the user closes or swipes away the toast. */
|
|
187
|
+
onDismiss?: () => void
|
|
186
188
|
title?: string
|
|
187
189
|
description?: string
|
|
188
190
|
/** An element, or a render function the toast calls under its own owner, for icons created from imperative code. */
|
|
@@ -254,7 +256,11 @@ function publishToast(id: number, options: ToastOptions) {
|
|
|
254
256
|
className: `toast-v2 toast-v2--${options.variant ?? "default"}`,
|
|
255
257
|
testId: `toast-v2-${id}`,
|
|
256
258
|
unstyled: true,
|
|
257
|
-
onDismiss:
|
|
259
|
+
onDismiss: () => {
|
|
260
|
+
const current = selectToastOptions(registry, id)
|
|
261
|
+
release()
|
|
262
|
+
current?.onDismiss?.()
|
|
263
|
+
},
|
|
258
264
|
onAutoClose: release,
|
|
259
265
|
})
|
|
260
266
|
}
|