sv5ui-plus 5.0.3 → 5.0.4

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.
@@ -31,16 +31,23 @@ export function show(options = {}) {
31
31
  currentInputValue = options.inputValue ?? "";
32
32
  pending = {
33
33
  options,
34
- resolve
34
+ resolve,
35
+ settled: false
35
36
  };
36
37
  open = true;
37
38
  });
38
39
  }
39
40
  function settle(result) {
40
41
  const current = pending;
41
- pending = null;
42
- open = false;
43
- current?.resolve(result);
42
+ if (!current || current.settled) return;
43
+ current.settled = true;
44
+ current.resolve(result);
45
+ // ถอด dialog หลัง pointer/click จบ — กัน derived_inert จาก bits-ui ที่ยังอ่าน derived
46
+ queueMicrotask(() => {
47
+ if (pending !== current) return;
48
+ pending = null;
49
+ open = false;
50
+ });
44
51
  }
45
52
  function handleConfirm() {
46
53
  pending?.options.onConfirm?.(currentInputValue);
@@ -51,7 +58,7 @@ function handleCancel() {
51
58
  settle(false);
52
59
  }
53
60
  function handleOpenChange(value) {
54
- if (!value && pending) {
61
+ if (!value && pending && !pending.settled) {
55
62
  handleCancel();
56
63
  return;
57
64
  }
@@ -71,7 +78,7 @@ const contentProps = $derived.by(() => {
71
78
  <Dialog.Root bind:open onOpenChange={handleOpenChange}>
72
79
  <Dialog.Portal>
73
80
  <Dialog.Overlay
74
- class="fixed inset-0 z-50 bg-[var(--scrim-bg,rgba(0,0,0,0.3))] backdrop-blur-sm"
81
+ class="fixed inset-0 z-50 bg-(--scrim-bg,rgba(0,0,0,0.3)) backdrop-blur-sm"
75
82
  />
76
83
  {#if pending}
77
84
  <Dialog.Content
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "version": 1,
3
3
  "packageName": "sv5ui-plus",
4
- "packageVersion": "5.0.3",
5
- "generatedAt": "2026-08-16T11:23:34.196Z",
4
+ "packageVersion": "5.0.4",
5
+ "generatedAt": "2026-08-20T08:57:41.119Z",
6
6
  "slugs": {
7
7
  "components": [],
8
8
  "hooks": [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sv5ui-plus",
3
- "version": "5.0.3",
3
+ "version": "5.0.4",
4
4
  "description": "Community companion components and hooks for SV5UI and Svelte 5",
5
5
  "packageManager": "bun@1.3.14",
6
6
  "author": "asphum",
@@ -120,24 +120,24 @@
120
120
  }
121
121
  },
122
122
  "devDependencies": {
123
- "@biomejs/biome": "2.5.8",
123
+ "@biomejs/biome": "2.5.9",
124
124
  "@inlang/paraglide-js": "^2.24.1",
125
125
  "@sveltejs/adapter-vercel": "^6.3.4",
126
- "@sveltejs/kit": "^2.70.2",
126
+ "@sveltejs/kit": "^2.70.3",
127
127
  "@sveltejs/package": "^2.5.8",
128
128
  "@sveltejs/vite-plugin-svelte": "^7.3.0",
129
129
  "@tailwindcss/vite": "^4.3.3",
130
130
  "@types/node": "^26.2.0",
131
- "@vitest/browser-playwright": "^4.1.10",
131
+ "@vitest/browser-playwright": "^4.1.11",
132
132
  "playwright": "^1.62.1",
133
- "publint": "^0.3.23",
133
+ "publint": "^0.3.24",
134
134
  "sv5ui": "^2.5.0",
135
135
  "svelte": "^5.56.9",
136
136
  "svelte-check": "^4.7.6",
137
137
  "tailwindcss": "^4.3.3",
138
138
  "typescript": "6.0.3",
139
- "vite": "^8.2.1",
140
- "vitest": "^4.1.10",
139
+ "vite": "^8.2.2",
140
+ "vitest": "^4.1.11",
141
141
  "vitest-browser-svelte": "^3.0.0"
142
142
  },
143
143
  "keywords": [
@@ -163,8 +163,8 @@
163
163
  "@dnd-kit/svelte": "^0.5.0",
164
164
  "@internationalized/date": "^3.12.3",
165
165
  "@modelcontextprotocol/sdk": "^1.30.0",
166
- "apexcharts": "^6.8.0",
167
- "bits-ui": "^2.18.1",
166
+ "apexcharts": "^6.10.0",
167
+ "bits-ui": "^2.19.0",
168
168
  "shiki": "^4.4.3",
169
169
  "tailwind-merge": "^3.6.0",
170
170
  "tailwind-variants": "^3.3.1",