one 1.10.0 → 1.10.1
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/devtools/devtools.mjs +14 -1
- package/devtools/source-inspector.mjs +669 -10
- package/dist/cjs/router/interceptRoutes.cjs +15 -1
- package/dist/cjs/router/interceptRoutes.js +14 -1
- package/dist/cjs/router/interceptRoutes.js.map +1 -1
- package/dist/cjs/router/interceptRoutes.native.js +15 -1
- package/dist/cjs/router/interceptRoutes.native.js.map +1 -1
- package/dist/cjs/vite/plugins/devtoolsPlugin.cjs +18 -5
- package/dist/cjs/vite/plugins/devtoolsPlugin.js +13 -4
- package/dist/cjs/vite/plugins/devtoolsPlugin.js.map +2 -2
- package/dist/cjs/vite/plugins/devtoolsPlugin.native.js +20 -6
- package/dist/cjs/vite/plugins/devtoolsPlugin.native.js.map +1 -1
- package/dist/esm/router/interceptRoutes.js +14 -1
- package/dist/esm/router/interceptRoutes.js.map +1 -1
- package/dist/esm/router/interceptRoutes.mjs +15 -1
- package/dist/esm/router/interceptRoutes.mjs.map +1 -1
- package/dist/esm/router/interceptRoutes.native.js +15 -1
- package/dist/esm/router/interceptRoutes.native.js.map +1 -1
- package/dist/esm/vite/plugins/devtoolsPlugin.js +3 -1
- package/dist/esm/vite/plugins/devtoolsPlugin.js.map +1 -1
- package/dist/esm/vite/plugins/devtoolsPlugin.mjs +3 -1
- package/dist/esm/vite/plugins/devtoolsPlugin.mjs.map +1 -1
- package/dist/esm/vite/plugins/devtoolsPlugin.native.js +5 -2
- package/dist/esm/vite/plugins/devtoolsPlugin.native.js.map +1 -1
- package/package.json +9 -9
- package/src/router/interceptRoutes.ts +34 -5
- package/src/vite/plugins/devtoolsPlugin.ts +3 -1
- package/types/router/interceptRoutes.d.ts.map +1 -1
- package/types/vite/plugins/devtoolsPlugin.d.ts.map +1 -1
package/devtools/devtools.mjs
CHANGED
|
@@ -26,6 +26,7 @@
|
|
|
26
26
|
{ id: 'loader', name: 'Loader Timing', type: 'panel', category: 'Panels' },
|
|
27
27
|
{ id: 'errors', name: 'Errors', type: 'panel', category: 'Panels' },
|
|
28
28
|
{ id: 'inspect', name: 'Inspect Source', type: 'tool', category: 'Panels' },
|
|
29
|
+
{ id: 'record', name: 'Record Input', type: 'tool', category: 'Panels' },
|
|
29
30
|
{
|
|
30
31
|
id: 'clear-cookies',
|
|
31
32
|
name: 'Clear Cookies',
|
|
@@ -195,6 +196,7 @@
|
|
|
195
196
|
.panel-header:active { cursor: grabbing; }
|
|
196
197
|
.panel-header svg { width: 18px; height: 18px; }
|
|
197
198
|
.panel-title { font-weight: 500; color: #999; font-size: 12px; flex: 1; }
|
|
199
|
+
.panel-shortcut { font-size: 10px; color: #444; margin-right: 4px; }
|
|
198
200
|
.panel-close { background: none; border: none; color: #666; cursor: pointer; padding: 4px; font-size: 16px; line-height: 1; }
|
|
199
201
|
.panel-close:hover { color: #fff; }
|
|
200
202
|
.tabs { display: flex; background: #1a1a1a; padding: 0 8px; gap: 2px; overflow-x: auto; }
|
|
@@ -374,6 +376,12 @@
|
|
|
374
376
|
return
|
|
375
377
|
}
|
|
376
378
|
|
|
379
|
+
if (item.id === 'record') {
|
|
380
|
+
hideSpotlight()
|
|
381
|
+
window.__oneSourceInspector?.startRecording()
|
|
382
|
+
return
|
|
383
|
+
}
|
|
384
|
+
|
|
377
385
|
const actionFn = itemActions[item.id]
|
|
378
386
|
if (!actionFn) return
|
|
379
387
|
|
|
@@ -457,7 +465,7 @@
|
|
|
457
465
|
panel.innerHTML =
|
|
458
466
|
'<div class="panel-header" id="panel-header">' +
|
|
459
467
|
LOGO_SVG +
|
|
460
|
-
'<span class="panel-title">DevTools</span><button class="panel-close" id="panel-close">\u00d7</button></div><div class="tabs" id="tabs"><button class="tab active" data-tab="seo">SEO</button><button class="tab" data-tab="route">Route</button><button class="tab" data-tab="loader">Loader</button><button class="tab" data-tab="errors">Errors</button></div><div class="content" id="content"></div>'
|
|
468
|
+
'<span class="panel-title">DevTools</span><span class="panel-shortcut">\u2325space</span><button class="panel-close" id="panel-close">\u00d7</button></div><div class="tabs" id="tabs"><button class="tab active" data-tab="seo">SEO</button><button class="tab" data-tab="route">Route</button><button class="tab" data-tab="loader">Loader</button><button class="tab" data-tab="errors">Errors</button></div><div class="content" id="content"></div>'
|
|
461
469
|
|
|
462
470
|
shadow.getElementById('panel-close').addEventListener('click', hidePanel)
|
|
463
471
|
|
|
@@ -571,6 +579,8 @@
|
|
|
571
579
|
|
|
572
580
|
function showSpotlight() {
|
|
573
581
|
if (!host) createHost()
|
|
582
|
+
// close source inspector picker if open
|
|
583
|
+
window.__oneSourceInspector?.closePicker?.()
|
|
574
584
|
const searchInput = shadow.getElementById('spotlight-search')
|
|
575
585
|
searchInput.value = ''
|
|
576
586
|
renderSpotlightItems('')
|
|
@@ -578,6 +588,9 @@
|
|
|
578
588
|
requestAnimationFrame(() => searchInput.focus())
|
|
579
589
|
}
|
|
580
590
|
|
|
591
|
+
// listen for custom event from source inspector
|
|
592
|
+
window.addEventListener('one-open-devtools', showSpotlight)
|
|
593
|
+
|
|
581
594
|
function hideSpotlight() {
|
|
582
595
|
if (spotlightDialog?.open) spotlightDialog.close()
|
|
583
596
|
}
|