@tanstack/devtools 0.10.3 → 0.10.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.
package/dist/dev.js
CHANGED
|
@@ -30,7 +30,7 @@ var TanStackDevtoolsCore = class {
|
|
|
30
30
|
const mountTo = el;
|
|
31
31
|
const dispose = render(() => {
|
|
32
32
|
const _self$ = this;
|
|
33
|
-
this.#Component = lazy(() => import('./devtools/
|
|
33
|
+
this.#Component = lazy(() => import('./devtools/PYVV4DLY.js'));
|
|
34
34
|
const Devtools = this.#Component;
|
|
35
35
|
this.#eventBus = new ClientEventBus(this.#eventBusConfig);
|
|
36
36
|
this.#eventBus.start();
|
|
@@ -3714,9 +3714,19 @@ function DevTools() {
|
|
|
3714
3714
|
}
|
|
3715
3715
|
});
|
|
3716
3716
|
createEffect(() => {
|
|
3717
|
+
const isEditableTarget = (element) => {
|
|
3718
|
+
if (!element || !(element instanceof HTMLElement)) return false;
|
|
3719
|
+
if (element.isContentEditable) return true;
|
|
3720
|
+
const tagName = element.tagName;
|
|
3721
|
+
if (tagName === "INPUT" || tagName === "TEXTAREA" || tagName === "SELECT") {
|
|
3722
|
+
return true;
|
|
3723
|
+
}
|
|
3724
|
+
return element.getAttribute("role") === "textbox";
|
|
3725
|
+
};
|
|
3717
3726
|
const permutations = getHotkeyPermutations(settings().openHotkey);
|
|
3718
3727
|
for (const permutation of permutations) {
|
|
3719
3728
|
createShortcut(permutation, () => {
|
|
3729
|
+
if (isEditableTarget(document.activeElement)) return;
|
|
3720
3730
|
toggleOpen();
|
|
3721
3731
|
});
|
|
3722
3732
|
}
|
|
@@ -4300,9 +4300,19 @@ function DevTools() {
|
|
|
4300
4300
|
}
|
|
4301
4301
|
});
|
|
4302
4302
|
createEffect(() => {
|
|
4303
|
+
const isEditableTarget = (element) => {
|
|
4304
|
+
if (!element || !(element instanceof HTMLElement)) return false;
|
|
4305
|
+
if (element.isContentEditable) return true;
|
|
4306
|
+
const tagName = element.tagName;
|
|
4307
|
+
if (tagName === "INPUT" || tagName === "TEXTAREA" || tagName === "SELECT") {
|
|
4308
|
+
return true;
|
|
4309
|
+
}
|
|
4310
|
+
return element.getAttribute("role") === "textbox";
|
|
4311
|
+
};
|
|
4303
4312
|
const permutations = getHotkeyPermutations(settings().openHotkey);
|
|
4304
4313
|
for (const permutation of permutations) {
|
|
4305
4314
|
createShortcut(permutation, () => {
|
|
4315
|
+
if (isEditableTarget(document.activeElement)) return;
|
|
4306
4316
|
toggleOpen();
|
|
4307
4317
|
});
|
|
4308
4318
|
}
|
package/dist/index.js
CHANGED
|
@@ -30,7 +30,7 @@ var TanStackDevtoolsCore = class {
|
|
|
30
30
|
const mountTo = el;
|
|
31
31
|
const dispose = render(() => {
|
|
32
32
|
const _self$ = this;
|
|
33
|
-
this.#Component = lazy(() => import('./devtools/
|
|
33
|
+
this.#Component = lazy(() => import('./devtools/PYVV4DLY.js'));
|
|
34
34
|
const Devtools = this.#Component;
|
|
35
35
|
this.#eventBus = new ClientEventBus(this.#eventBusConfig);
|
|
36
36
|
this.#eventBus.start();
|
package/package.json
CHANGED
package/src/devtools.tsx
CHANGED
|
@@ -165,10 +165,25 @@ export default function DevTools() {
|
|
|
165
165
|
}
|
|
166
166
|
})
|
|
167
167
|
createEffect(() => {
|
|
168
|
+
const isEditableTarget = (element: Element | null) => {
|
|
169
|
+
if (!element || !(element instanceof HTMLElement)) return false
|
|
170
|
+
if (element.isContentEditable) return true
|
|
171
|
+
const tagName = element.tagName
|
|
172
|
+
if (
|
|
173
|
+
tagName === 'INPUT' ||
|
|
174
|
+
tagName === 'TEXTAREA' ||
|
|
175
|
+
tagName === 'SELECT'
|
|
176
|
+
) {
|
|
177
|
+
return true
|
|
178
|
+
}
|
|
179
|
+
return element.getAttribute('role') === 'textbox'
|
|
180
|
+
}
|
|
181
|
+
|
|
168
182
|
const permutations = getHotkeyPermutations(settings().openHotkey)
|
|
169
183
|
|
|
170
184
|
for (const permutation of permutations) {
|
|
171
185
|
createShortcut(permutation, () => {
|
|
186
|
+
if (isEditableTarget(document.activeElement)) return
|
|
172
187
|
toggleOpen()
|
|
173
188
|
})
|
|
174
189
|
}
|