@opencode/ui 0.0.0-dev-65 → 0.0.0-dev-75
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/package.json +2 -2
- package/src/context/dialog.tsx +4 -1
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-75",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -286,7 +286,7 @@
|
|
|
286
286
|
"dependencies": {
|
|
287
287
|
"@kitlangton/solid-motion": "0.2.2",
|
|
288
288
|
"@kobalte/core": "0.13.13",
|
|
289
|
-
"@opencode/util": "0.0.0-dev-
|
|
289
|
+
"@opencode/util": "0.0.0-dev-75",
|
|
290
290
|
"@pierre/diffs": "1.6.1",
|
|
291
291
|
"@pierre/highlights": "0.2.0",
|
|
292
292
|
"@solid-primitives/event-listener": "2.4.6",
|
package/src/context/dialog.tsx
CHANGED
|
@@ -162,6 +162,9 @@ function init(container: () => HTMLElement | undefined) {
|
|
|
162
162
|
)
|
|
163
163
|
|
|
164
164
|
const zIndex = () => String(50 + layer() * 10)
|
|
165
|
+
// A function, not an inline `&&`: the compiler wraps an inline condition in a memo on every read of the prop, and
|
|
166
|
+
// Kobalte reads it outside any owner, from outside-pointer handlers and while the closing dialog unmounts.
|
|
167
|
+
const modal = () => !container() && top()?.id === id
|
|
165
168
|
let dispose: (() => void) | undefined
|
|
166
169
|
let setClosing: ((closing: boolean) => void) | undefined
|
|
167
170
|
let layerRef: HTMLDivElement | undefined
|
|
@@ -177,7 +180,7 @@ function init(container: () => HTMLElement | undefined) {
|
|
|
177
180
|
|
|
178
181
|
return (
|
|
179
182
|
<Kobalte
|
|
180
|
-
modal={
|
|
183
|
+
modal={modal()}
|
|
181
184
|
open={!closing()}
|
|
182
185
|
onOpenChange={(open: boolean) => {
|
|
183
186
|
if (!open) dismiss(id)
|