@proteus-vue/devtools 0.1.1-beta.3 → 0.1.1-beta.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.
Files changed (2) hide show
  1. package/dist/panel.js +17 -7
  2. package/package.json +3 -3
package/dist/panel.js CHANGED
@@ -656,12 +656,11 @@ var ProteusDevtools = (() => {
656
656
  }
657
657
  };
658
658
  }
659
- var singletonBus = null;
659
+ var TRACE_BUS_GLOBAL_KEY = "__PROTEUS_TRACE_BUS__";
660
660
  function getProteusTraceBus() {
661
- if (singletonBus === null) {
662
- singletonBus = createTraceBus();
663
- }
664
- return singletonBus;
661
+ const g = globalThis;
662
+ if (!g[TRACE_BUS_GLOBAL_KEY]) g[TRACE_BUS_GLOBAL_KEY] = createTraceBus();
663
+ return g[TRACE_BUS_GLOBAL_KEY];
665
664
  }
666
665
 
667
666
  // src/tooltip.ts
@@ -9048,7 +9047,7 @@ ${summary}
9048
9047
  let current = { route: hasBrowserEnv ? location.pathname.replace(/^\//, "") : "" };
9049
9048
  let historyIndex = hasBrowserEnv ? history.state?.proteusIndex ?? 0 : 0;
9050
9049
  const emit = (url, routeType, nav = "forward") => {
9051
- current = { route: url.split("?")[0].replace(/^\//, ""), routeType };
9050
+ current = { route: url.split("?")[0].replace(/^\//, ""), routeType, query: parseQuery(url) };
9052
9051
  listeners.forEach((l) => l(current.route, parseQuery(url), routeType, nav));
9053
9052
  };
9054
9053
  if (hasBrowserEnv) {
@@ -9131,7 +9130,18 @@ ${summary}
9131
9130
  }
9132
9131
  var modeMP = import_meta.env?.MODE === "mp-weixin";
9133
9132
  var isMP = modeMP || detectMPRuntime();
9134
- var adapter = isMP ? createMpAdapter() : createWebAdapter();
9133
+ var ADAPTER_GLOBAL_KEY_WEB = "__PROTEUS_ADAPTER_WEB__";
9134
+ var ADAPTER_GLOBAL_KEY_MP = "__PROTEUS_ADAPTER_MP__";
9135
+ function resolveAdapter() {
9136
+ const g = globalThis;
9137
+ const key = isMP ? ADAPTER_GLOBAL_KEY_MP : ADAPTER_GLOBAL_KEY_WEB;
9138
+ const existing = g[key];
9139
+ if (existing) return existing;
9140
+ const created = isMP ? createMpAdapter() : createWebAdapter();
9141
+ g[key] = created;
9142
+ return created;
9143
+ }
9144
+ var adapter = resolveAdapter();
9135
9145
 
9136
9146
  // ../shared/src/platform/runtime.ts
9137
9147
  function detectRuntime() {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@proteus-vue/devtools",
3
- "version": "0.1.1-beta.3",
3
+ "version": "0.1.1-beta.4",
4
4
  "description": "Proteus DevTools 面板(devtools-plan UI 层):十视图(时间轴/火焰图/状态·时间旅行·值编辑/路由/根因/组件/页面/依赖图/设备/所有权)+ 一键接入 + Vue DevTools 插件(Timeline/Inspectors)+ 开放数据源(WS/CDP 协议)——浏览器端 dev 工具,不随业务产物发布",
5
5
  "type": "module",
6
6
  "license": "Apache-2.0",
@@ -24,8 +24,8 @@
24
24
  "README.md"
25
25
  ],
26
26
  "dependencies": {
27
- "@proteus-vue/capabilities": "0.1.1-beta.3",
28
- "@proteus-vue/devtools-runtime": "0.1.1-beta.0",
27
+ "@proteus-vue/capabilities": "0.1.1-beta.4",
28
+ "@proteus-vue/devtools-runtime": "0.1.1-beta.1",
29
29
  "@proteus-vue/render-backend": "0.1.1-beta.1"
30
30
  },
31
31
  "peerDependencies": {