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 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
- - **Filtering** by status (all / mounted / unmounted / leaks only) and free-text search
140
- across composable name, source file, ref key names, and ref values
141
- - **Inline ref chip preview** — up to three reactive values shown on the card without
142
- expanding, with distinct styling for `ref`, `computed`, and `reactive` types
143
- - **Global state badges** — keys shared across instances are highlighted in amber with
144
- a `global` badge and an explanatory banner when expanded
145
- - **Change history** — a scrollable log of the last 50 value mutations with key, new
146
- value, and relative timestamp
147
- - **Lifecycle summary** — shows whether `onMounted`/`onUnmounted` were registered and
148
- whether watchers and intervals were properly cleaned up
149
- - **Reverse lookup** — clicking any ref key opens a panel listing every other composable
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
@@ -4,7 +4,7 @@
4
4
  "compatibility": {
5
5
  "nuxt": "^3.0.0 || ^4.0.0"
6
6
  },
7
- "version": "0.1.25",
7
+ "version": "0.1.26",
8
8
  "builder": {
9
9
  "@nuxt/module-builder": "1.0.2",
10
10
  "unbuild": "3.6.1"
@@ -52,7 +52,11 @@ export default defineNuxtPlugin(() => {
52
52
  }
53
53
  if (type === "observatory:clear-composables") {
54
54
  if (composableRegistry) {
55
- composableRegistry.clear();
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);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nuxt-devtools-observatory",
3
- "version": "0.1.25",
3
+ "version": "0.1.26",
4
4
  "description": "Nuxt DevTools: useFetch Dashboard, provide/inject Graph, Composable Tracker, Render Heatmap",
5
5
  "license": "MIT",
6
6
  "repository": {