nuxt-devtools-observatory 0.1.25 → 0.1.26
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/README.md +13 -16
- package/dist/module.json +1 -1
- package/dist/runtime/plugin.js +5 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -24,6 +24,7 @@ You can configure all observability features and limits from your consuming proj
|
|
|
24
24
|
- `composableTracker` (boolean) — Enable composable tracker
|
|
25
25
|
- `renderHeatmap` (boolean) — Enable render heatmap
|
|
26
26
|
- `transitionTracker` (boolean) — Enable transition tracker
|
|
27
|
+
- `composableNavigationMode` (string, 'route' | 'session') — Composable tracker mode: 'route' clears entries on page navigation (default), 'session' persists entries across navigation for historical inspection
|
|
27
28
|
- `heatmapThresholdCount` (number) — Highlight components with N+ renders in heatmap
|
|
28
29
|
- `heatmapThresholdTime` (number) — Highlight components with render time above this (ms)
|
|
29
30
|
- `heatmapHideInternals` (boolean) — Hide node_modules and internal components in the render heatmap for a cleaner view
|
|
@@ -48,6 +49,7 @@ export default defineNuxtConfig({
|
|
|
48
49
|
composableTracker: true, // Enable composable tracker
|
|
49
50
|
renderHeatmap: true, // Enable render heatmap
|
|
50
51
|
transitionTracker: true, // Enable transition tracker
|
|
52
|
+
composableNavigationMode: 'route', // 'route' clears entries on navigation (default), 'session' persists across navigation
|
|
51
53
|
heatmapThresholdCount: 5, // Highlight components with 5+ renders
|
|
52
54
|
heatmapThresholdTime: 1600, // Highlight components with render time above this (ms)
|
|
53
55
|
heatmapHideInternals: true, // Hide node_modules and internal components in the render heatmap
|
|
@@ -136,22 +138,17 @@ wraps them with a tracking shim (`__trackComposable`) that:
|
|
|
136
138
|
|
|
137
139
|
The panel provides:
|
|
138
140
|
|
|
139
|
-
- **
|
|
140
|
-
|
|
141
|
-
- **
|
|
142
|
-
|
|
143
|
-
- **
|
|
144
|
-
|
|
145
|
-
- **Change history** — a scrollable log of the last 50 value mutations with key, new
|
|
146
|
-
|
|
147
|
-
- **
|
|
148
|
-
|
|
149
|
-
- **
|
|
150
|
-
instance that exposes a key with the same name, with its composable name, file, and route
|
|
151
|
-
- **Inline value editing** — writable `ref` values have an `edit` button; clicking opens
|
|
152
|
-
a JSON textarea that applies the new value directly to the live ref in the running app
|
|
153
|
-
- **Jump to editor** — an `open ↗` button in the context section opens the composable's
|
|
154
|
-
source file in the configured editor
|
|
141
|
+
- **Navigation mode toggle** — switch between 'route' mode (clears entries on navigation) and 'session' mode (persists entries across pages). In session mode, a "clear session" button appears to manually reset the history
|
|
142
|
+
- **Filtering** by status (all / mounted / unmounted / leaks only) and free-text search across composable name, source file, ref key names, and ref values
|
|
143
|
+
- **Recency-first ordering** — newest entries appear first, with layout-level composables pinned to the top (layout composables persist across page navigation)
|
|
144
|
+
- **Inline ref chip preview** — up to three reactive values shown on the card without expanding, with distinct styling for `ref`, `computed`, and `reactive` types
|
|
145
|
+
- **Collapsible ref values** — long objects and arrays automatically collapse with a chevron toggle to expand them inline in the detail view with full pretty-printed JSON
|
|
146
|
+
- **Global state badges** — keys shared across instances are highlighted in amber with a `global` badge and an explanatory banner when expanded
|
|
147
|
+
- **Change history** — a scrollable log of the last 50 value mutations with key, new value, and relative timestamp
|
|
148
|
+
- **Lifecycle summary** — shows whether `onMounted`/`onUnmounted` were registered and whether watchers and intervals were properly cleaned up
|
|
149
|
+
- **Reverse lookup** — clicking any ref key opens a panel listing every other composable instance that exposes a key with the same name, with its composable name, file, and route
|
|
150
|
+
- **Inline value editing** — writable `ref` values have an `edit` button; clicking opens a JSON textarea that applies the new value directly to the live ref in the running app
|
|
151
|
+
- **Jump to editor** — an `open ↗` button in the context section opens the composable's source file in the configured editor
|
|
155
152
|
|
|
156
153
|
**Known gaps:**
|
|
157
154
|
|
package/dist/module.json
CHANGED
package/dist/runtime/plugin.js
CHANGED
|
@@ -52,7 +52,11 @@ export default defineNuxtPlugin(() => {
|
|
|
52
52
|
}
|
|
53
53
|
if (type === "observatory:clear-composables") {
|
|
54
54
|
if (composableRegistry) {
|
|
55
|
-
|
|
55
|
+
if (composableNavigationMode === "session") {
|
|
56
|
+
composableRegistry.clearNonLayout();
|
|
57
|
+
} else {
|
|
58
|
+
composableRegistry.clear();
|
|
59
|
+
}
|
|
56
60
|
}
|
|
57
61
|
const source = event.source;
|
|
58
62
|
source?.postMessage({ type: "observatory:snapshot", data: buildSnapshot() }, event.origin);
|