safari-mcp 2.10.6 → 2.10.7
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/mcp-helpers.js +12 -0
- package/package.json +1 -1
package/mcp-helpers.js
CHANGED
|
@@ -166,6 +166,18 @@ if (window.__mcpVersion !== 6) {
|
|
|
166
166
|
}
|
|
167
167
|
} catch (e) {}
|
|
168
168
|
target.dispatchEvent(new MouseEvent('click', { ...s, buttons: 0 }));
|
|
169
|
+
// Vue v-model / Lit @change / framework-agnostic toggle sync — for checkbox/radio,
|
|
170
|
+
// Vue 3 listens for `change` via v-model; some Vue components subscribe to `input` instead.
|
|
171
|
+
// Native target.click() fires both, but in production-stripped Vue apps (no fiber/proxy
|
|
172
|
+
// visible), the reactivity sometimes misses the events when fired in the same microtask
|
|
173
|
+
// as a synthetic click. Belt-and-suspenders: re-dispatch input+change with composed:true
|
|
174
|
+
// and reset React's _valueTracker so subsequent submits see the new value.
|
|
175
|
+
if (target.tagName === 'INPUT' && (target.type === 'checkbox' || target.type === 'radio')) {
|
|
176
|
+
try { if (target._valueTracker && typeof target._valueTracker.setValue === 'function') target._valueTracker.setValue(''); } catch (_e) {}
|
|
177
|
+
var toggleOpts = { bubbles: true, cancelable: true, composed: true };
|
|
178
|
+
target.dispatchEvent(new Event('input', toggleOpts));
|
|
179
|
+
target.dispatchEvent(new Event('change', toggleOpts));
|
|
180
|
+
}
|
|
169
181
|
if (href && href !== beforeUrl) {
|
|
170
182
|
location.href = href;
|
|
171
183
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "safari-mcp",
|
|
3
|
-
"version": "2.10.
|
|
3
|
+
"version": "2.10.7",
|
|
4
4
|
"mcpName": "io.github.achiya-automation/safari-mcp",
|
|
5
5
|
"description": "Safari browser automation for AI agents — native macOS, zero Chrome overhead. 80 tools via AppleScript + JavaScript.",
|
|
6
6
|
"type": "module",
|