Thomas G. Lopes commited on
Commit
df26524
·
1 Parent(s): a74f54e

fix outside click handling

Browse files
package.json CHANGED
@@ -53,7 +53,7 @@
53
  "highlight.js": "^11.10.0",
54
  "jiti": "^2.4.2",
55
  "jsdom": "^26.0.0",
56
- "melt": "^0.40.2",
57
  "openai": "^4.90.0",
58
  "playwright": "^1.52.0",
59
  "postcss": "^8.4.38",
 
53
  "highlight.js": "^11.10.0",
54
  "jiti": "^2.4.2",
55
  "jsdom": "^26.0.0",
56
+ "melt": "^0.41.0",
57
  "openai": "^4.90.0",
58
  "playwright": "^1.52.0",
59
  "postcss": "^8.4.38",
pnpm-lock.yaml CHANGED
@@ -139,8 +139,8 @@ importers:
139
  specifier: ^26.0.0
140
  version: 26.1.0
141
  melt:
142
- specifier: ^0.40.2
143
- version: 0.40.2(@floating-ui/dom@1.6.13)(svelte@5.38.7)
144
  openai:
145
  specifier: ^4.90.0
146
  version: 4.90.0(ws@8.18.2)(zod@3.25.76)
@@ -2287,8 +2287,8 @@ packages:
2287
  resolution: {integrity: sha512-aisnrDP4GNe06UcKFnV5bfMNPBUw4jsLGaWwWfnH3v02GnBuXX2MCVn5RbrWo0j3pczUilYblq7fQ7Nw2t5XKw==}
2288
  engines: {node: '>= 0.8'}
2289
 
2290
- melt@0.40.2:
2291
- resolution: {integrity: sha512-lmf17KdERiDZ4Fefx4B/nrvMptG8QqUexMuRlaxT9AlbX7zbjaqPfJz31ekRvkcw6pgYOuYmQPmhY6jlUDVqSw==}
2292
  peerDependencies:
2293
  '@floating-ui/dom': ^1.6.0
2294
  svelte: ^5.30.1
@@ -5409,7 +5409,7 @@ snapshots:
5409
 
5410
  media-typer@1.1.0: {}
5411
 
5412
- melt@0.40.2(@floating-ui/dom@1.6.13)(svelte@5.38.7):
5413
  dependencies:
5414
  '@floating-ui/dom': 1.6.13
5415
  dequal: 2.0.3
 
139
  specifier: ^26.0.0
140
  version: 26.1.0
141
  melt:
142
+ specifier: ^0.41.0
143
+ version: 0.41.0(@floating-ui/dom@1.6.13)(svelte@5.38.7)
144
  openai:
145
  specifier: ^4.90.0
146
  version: 4.90.0(ws@8.18.2)(zod@3.25.76)
 
2287
  resolution: {integrity: sha512-aisnrDP4GNe06UcKFnV5bfMNPBUw4jsLGaWwWfnH3v02GnBuXX2MCVn5RbrWo0j3pczUilYblq7fQ7Nw2t5XKw==}
2288
  engines: {node: '>= 0.8'}
2289
 
2290
+ melt@0.41.0:
2291
+ resolution: {integrity: sha512-WRnW09FVudTF53yvUKLxmjev03uvC1jf0PBNZVQn1GDMhSNVh4aG69S0pAXvOl0kNtMks1OqVinQY4hP/68ZVQ==}
2292
  peerDependencies:
2293
  '@floating-ui/dom': ^1.6.0
2294
  svelte: ^5.30.1
 
5409
 
5410
  media-typer@1.1.0: {}
5411
 
5412
+ melt@0.41.0(@floating-ui/dom@1.6.13)(svelte@5.38.7):
5413
  dependencies:
5414
  '@floating-ui/dom': 1.6.13
5415
  dequal: 2.0.3
src/lib/components/inference-playground/model-selector-modal.svelte CHANGED
@@ -91,6 +91,7 @@
91
  const isCustom = typia.createIs<CustomModel>();
92
 
93
  const combobox = new Combobox<string | undefined>({
 
94
  onOpenChange(o) {
95
  if (!o) onClose?.();
96
  },
@@ -134,6 +135,7 @@
134
  : null;
135
  },
136
  });
 
137
  $effect(() => {
138
  untrack(() => combobox.highlight(conversation.model.id));
139
  // Workaround while this component does not use a <dialog />
@@ -160,7 +162,7 @@
160
  bind:value={query}
161
  {@attach autofocus()}
162
  />
163
- <Tooltip openDelay={100}>
164
  {#snippet trigger(tooltip)}
165
  <button
166
  class="ml-2 grid size-8 place-items-center rounded-md transition-colors {showVisionOnly
@@ -170,6 +172,7 @@
170
  {...tooltip.trigger}
171
  onclick={e => {
172
  e.stopPropagation();
 
173
  showVisionOnly = !showVisionOnly;
174
  }}
175
  >
 
91
  const isCustom = typia.createIs<CustomModel>();
92
 
93
  const combobox = new Combobox<string | undefined>({
94
+ closeOnOutsideClick: false,
95
  onOpenChange(o) {
96
  if (!o) onClose?.();
97
  },
 
135
  : null;
136
  },
137
  });
138
+
139
  $effect(() => {
140
  untrack(() => combobox.highlight(conversation.model.id));
141
  // Workaround while this component does not use a <dialog />
 
162
  bind:value={query}
163
  {@attach autofocus()}
164
  />
165
+ <Tooltip openDelay={1000}>
166
  {#snippet trigger(tooltip)}
167
  <button
168
  class="ml-2 grid size-8 place-items-center rounded-md transition-colors {showVisionOnly
 
172
  {...tooltip.trigger}
173
  onclick={e => {
174
  e.stopPropagation();
175
+ e.preventDefault();
176
  showVisionOnly = !showVisionOnly;
177
  }}
178
  >