@proteus-vue/devtools 0.1.1-beta.1 → 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 +186 -34
  2. package/package.json +4 -4
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
@@ -3463,8 +3462,8 @@ ${summary}
3463
3462
  "ui.input": "input",
3464
3463
  "ui.list": "list",
3465
3464
  "ui.nav": "nav",
3466
- "capability.scan-qr": "scan-qr",
3467
- "capability.pick-photo": "pick-photo",
3465
+ "capability.qr-code": "scan-qr",
3466
+ "capability.camera": "pick-photo",
3468
3467
  "capability.location": "location",
3469
3468
  // ★G-32 B1:新增 implemented 语义(与 component-ir SEMANTIC_BACKEND_MAP headless 列同源)
3470
3469
  "layout.inline": "inline",
@@ -3503,6 +3502,7 @@ ${summary}
3503
3502
  "engineering.router-link": "router-link",
3504
3503
  // ★G-32 B5 续二:工程原语动画组件形态(E19/E20)
3505
3504
  "engineering.transition": "transition",
3505
+ "engineering.share-element": "share-element",
3506
3506
  "engineering.animate": "animate",
3507
3507
  // ★能力颗粒度对齐 C2
3508
3508
  "ui.progress": "progress",
@@ -3627,8 +3627,8 @@ ${summary}
3627
3627
  "ui.input": "TextField",
3628
3628
  "ui.list": "ListView",
3629
3629
  "ui.nav": "Navigator",
3630
- "capability.scan-qr": "scanQR",
3631
- "capability.pick-photo": "pickPhoto",
3630
+ "capability.qr-code": "scanQR",
3631
+ "capability.camera": "pickPhoto",
3632
3632
  "capability.location": "getLocation",
3633
3633
  // ★G-32 B1:新增 implemented 语义
3634
3634
  "layout.inline": "InlineSpan",
@@ -3667,6 +3667,8 @@ ${summary}
3667
3667
  "engineering.router-link": "TextButton",
3668
3668
  // ★G-32 B5 续二:工程原语动画组件形态(E19/E20)
3669
3669
  "engineering.transition": "AnimatedOpacity",
3670
+ "engineering.share-element": "Hero",
3671
+ // Flutter Hero 即共享元素
3670
3672
  "engineering.animate": "AnimationController",
3671
3673
  // ★能力颗粒度对齐 C2
3672
3674
  "ui.progress": "LinearProgressIndicator",
@@ -3828,11 +3830,17 @@ ${summary}
3828
3830
  // ★E18 组件形态(p- 前缀产 C-IR)
3829
3831
  "router-link": "engineering.router-link",
3830
3832
  // ★兼容别名(Vue Router 风格 <router-link> 标签;非 catalog 条目——p-view 先例 G-31 B4)
3833
+ "p-share-element": "engineering.share-element",
3834
+ // ★批次 8:页面间共享元素转场(≠ p-transition 页内过渡)
3831
3835
  "p-transition": "engineering.transition",
3832
3836
  "p-animate": "engineering.animate",
3833
3837
  // G-31 能力入口
3834
- "p-scan-qr": "capability.scan-qr",
3835
- "p-pick-photo": "capability.pick-photo",
3838
+ // ★2026-09-18 语义去重:原 capability.scan-qr / capability.pick-photo 是**重复名**——
3839
+ // 两个组件的实现分别调用 useQRCode() / useCamera(),对应真实能力即 C42 capability.qr-code /
3840
+ // C1 capability.camera(其 mpEquiv 与 hook 完全一致)。故**退役重复名、重指向真实能力**,
3841
+ // 并按 E8 双形态在两行补 tag(而非新建语义)。
3842
+ "p-scan-qr": "capability.qr-code",
3843
+ "p-pick-photo": "capability.camera",
3836
3844
  "p-location": "capability.location",
3837
3845
  // ★G-31 B4 现有组件对齐(src/components 实际标签 → L1 语义)
3838
3846
  "p-view": "layout.box",
@@ -3843,7 +3851,9 @@ ${summary}
3843
3851
  "p-safe": "layout.safe",
3844
3852
  "p-sidebar": "layout.sidebar",
3845
3853
  // ★#405 语义登记批:剩余 10 组件全量入图(EXTRA_KIND 文档兑底退役)——
3846
- // 9 个新语义(catalog planned L2:语义层待多端映射)+ p-scroll-view 复用 layout.scroll(p-view 先例)
3854
+ // 9 个新语义(catalog planned L2:语义层待多端映射)+ p-scroll-view 复用 layout.scroll
3855
+ // (★2026-09-18 修正原文「p-view 先例」:显式 multi-tag 别名先例是上一行的 `router-link`
3856
+ // ——同一语义由两个标签提供;本条与 p-view 是并列的别名情形,非「先例」关系)
3847
3857
  "p-aspect": "layout.aspect",
3848
3858
  "p-zone": "layout.zone",
3849
3859
  "p-loading": "ui.loading",
@@ -3896,17 +3906,20 @@ ${summary}
3896
3906
  { id: "L12", kind: "layout", semantic: "layout.masonry", tag: "p-masonry", props: ["colCount", "gap"], mpEquiv: "\u7B2C\u4E09\u65B9\u7011\u5E03\u6D41", tier: "L1", status: "implemented" },
3897
3907
  // ★#405 语义登记批:Fluid 体系剩余组件(语义层待多端映射 → planned L2——G-31.4 不足 3 端降级)
3898
3908
  { id: "L13", kind: "layout", semantic: "layout.aspect", tag: "p-aspect", props: ["ratio", "maxWidth"], mpEquiv: "\u65E0\uFF08\u7EB5\u6A2A\u6BD4\u5BB9\u5668\uFF09", tier: "L2", status: "planned" },
3899
- { id: "L14", kind: "layout", semantic: "layout.zone", tag: "p-zone", props: ["designWidth"], mpEquiv: "\u65E0\uFF08\u5BB9\u5668\u65AD\u70B9\u5206\u533A\uFF09", tier: "L2", status: "planned" }
3909
+ { id: "L14", kind: "layout", semantic: "layout.zone", tag: "p-zone", props: ["designWidth"], mpEquiv: "\u65E0\uFF08\u5BB9\u5668\u65AD\u70B9\u5206\u533A\uFF09", tier: "L2", status: "planned" },
3910
+ // ★批次 7(2026-09-18)未登记组件补登记:安全区(刘海/折叠屏/降级)+ 侧边导航容器
3911
+ { id: "L15", kind: "layout", semantic: "layout.safe", tag: "p-safe", props: ["area", "fold", "fallback"], mpEquiv: "\u65E0\uFF08\u5B89\u5168\u533A\u8BED\u4E49\u5BB9\u5668\uFF09", tier: "L1", status: "implemented" },
3912
+ { id: "L16", kind: "layout", semantic: "layout.sidebar", tag: "p-sidebar", props: ["minSidebarWidth", "navWidth", "designWidth", "toggleLabel"], mpEquiv: "\u65E0\uFF08\u5BB9\u5668\u65AD\u70B9\u4FA7\u680F\uFF09", tier: "L1", status: "implemented" }
3900
3913
  ];
3901
3914
  var UI = [
3902
3915
  { id: "U1", kind: "ui", semantic: "ui.text", tag: "p-text", props: ["content", "selectable", "truncate", "align", "userSelect", "overflow", "maxLines", "selectOnGesture", "space", "decode"], mpEquiv: "<text>", tier: "L1", status: "implemented" },
3903
3916
  { id: "U2", kind: "ui", semantic: "ui.heading", tag: "p-heading", props: ["level"], mpEquiv: "<h1>-<h6>", tier: "L1", status: "implemented" },
3904
- { id: "U3", kind: "ui", semantic: "ui.rich-text", tag: "p-rich-text", props: ["source", "schema"], mpEquiv: "<rich-text>", tier: "L1", status: "implemented" },
3917
+ { id: "U3", kind: "ui", semantic: "ui.rich-text", tag: "p-rich-text", props: ["nodes", "space", "userSelect", "mode", "source"], mpEquiv: "<rich-text>", tier: "L1", status: "implemented" },
3905
3918
  { id: "U4", kind: "ui", semantic: "ui.icon", tag: "p-icon", props: ["name", "type", "size", "color", "spin"], mpEquiv: "<icon>", tier: "L1", status: "implemented" },
3906
3919
  { id: "U5", kind: "ui", semantic: "ui.image", tag: "p-image", props: ["src", "fit", "placeholder", "lazy", "showMenuByLongpress", "fadeIn", "preload", "webp", "referrerPolicy"], mpEquiv: "<image>", tier: "L1", status: "implemented" },
3907
3920
  { id: "U6", kind: "ui", semantic: "ui.avatar", tag: "p-avatar", props: ["src", "shape", "size", "fallback"], mpEquiv: "\u7EC4\u5408", tier: "L1", status: "implemented" },
3908
- { id: "U7", kind: "ui", semantic: "ui.media", tag: "p-media", props: ["kind", "controls", "autoplay", "poster", "loop", "muted", "pictureInPicture"], mpEquiv: "<video>+<audio>", tier: "L1", status: "implemented" },
3909
- { id: "U8", kind: "ui", semantic: "ui.canvas", tag: "p-canvas", props: ["engine", "resolution"], mpEquiv: "<canvas>", tier: "L1", status: "implemented" },
3921
+ { id: "U7", kind: "ui", semantic: "ui.media", tag: "p-media", props: ["kind", "src", "duration", "controls", "autoplay", "loop", "muted", "initialTime", "poster", "objectFit", "title", "playBtnPosition", "direction", "showProgress", "showFullscreenBtn", "showPlayBtn", "showCenterPlayBtn", "showMuteBtn", "showBottomProgress", "enableProgressGesture", "enablePlayGesture", "pageGesture", "vslideGesture", "vslideGestureInFullscreen", "autoPauseIfNavigate", "autoPauseIfOpenNative", "danmuList", "danmuBtn", "enableDanmu", "pictureInPicture"], mpEquiv: "<video>+<audio>", tier: "L1", status: "implemented" },
3922
+ { id: "U8", kind: "ui", semantic: "ui.canvas", tag: "p-canvas", props: ["engine", "canvasId", "disableScroll", "resolution"], mpEquiv: "<canvas>", tier: "L1", status: "implemented" },
3910
3923
  { id: "U9", kind: "ui", semantic: "ui.svg", tag: "p-svg", props: ["path", "viewbox"], mpEquiv: "\u65E0", tier: "L1", status: "implemented" },
3911
3924
  { id: "U10", kind: "ui", semantic: "ui.input", tag: "p-input", props: ["type", "mask", "validation", "clearable"], mpEquiv: "<input>", tier: "L1", status: "implemented" },
3912
3925
  { id: "U11", kind: "ui", semantic: "ui.textarea", tag: "p-textarea", props: ["autosize", "maxLength", "count"], mpEquiv: "<textarea>", tier: "L1", status: "implemented" },
@@ -3927,9 +3940,16 @@ ${summary}
3927
3940
  // ★权威标尺批 H:局部文本选区
3928
3941
  { id: "U24", kind: "ui", semantic: "ui.selection", tag: "p-selection", props: ["disableContextMenu", "selectable"], mpEquiv: "<selection>", tier: "L1", status: "implemented" },
3929
3942
  // ★权威标尺批 I:相机
3930
- { id: "U25", kind: "ui", semantic: "ui.camera", tag: "p-camera", props: ["devicePosition", "flash", "aspectRatio"], mpEquiv: "<camera>", tier: "L1", status: "implemented" },
3943
+ { id: "U25", kind: "ui", semantic: "ui.camera", tag: "p-camera", props: ["mode", "resolution", "devicePosition", "flash", "frameSize", "aspectRatio"], mpEquiv: "<camera>", tier: "L1", status: "implemented" },
3931
3944
  // ★权威标尺批 J:地图
3932
- { id: "U26", kind: "ui", semantic: "ui.map", tag: "p-map", props: ["latitude", "longitude", "scale", "markers"], mpEquiv: "<map>", tier: "L1", status: "implemented" }
3945
+ { id: "U26", kind: "ui", semantic: "ui.map", tag: "p-map", props: ["latitude", "longitude", "scale", "minScale", "maxScale", "markers", "polyline", "circles", "polygons", "includePoints", "showLocation", "layerStyle", "rotate", "skew", "showCompass", "showScale", "enableZoom", "enableScroll", "enableRotate", "enableSatellite", "enableTraffic", "enablePoi", "enableBuilding", "enableOverlooking", "setting"], mpEquiv: "<map>", tier: "L1", status: "implemented" },
3946
+ // ★批次 7(2026-09-18)未登记组件补登记:这 3 个组件此前**只存在于 TAG_SEMANTIC_MAP**(编译器能解析、
3947
+ // 组件能渲染),但不在 SSOT catalog → C1 不变量(catalog tag ↔ TAG_SEMANTIC_MAP 双向)单向成立、
3948
+ // catalog 查询类 API(primitiveByTag / componentPrimitives)查不到它们。
3949
+ // ★p-button 尤其反讽:它是**端对齐全流程的参考实现**(21/21、SOP v2 范式),却不在语义清单里。
3950
+ { id: "U27", kind: "ui", semantic: "ui.button", tag: "p-button", props: ["disabled", "loading", "throttle", "size", "type", "plain", "formType", "openType", "hoverClass", "theme", "hoverStopPropagation", "hoverStartTime", "hoverStayTime", "lang", "sessionFrom", "sendMessageTitle", "sendMessagePath", "sendMessageImg", "appParameter", "showMessageCard", "phoneNumberNoQuotaToast", "needShowEntrance", "entrancePath"], mpEquiv: "<button>", tier: "L1", status: "implemented" },
3951
+ { id: "U28", kind: "ui", semantic: "ui.list", tag: "p-list-view", props: ["items", "itemHeight", "height", "bufferSize", "virtual", "lazy", "padding"], mpEquiv: "<list-view>\uFF08\u865A\u62DF\u6EDA\u52A8\uFF09", tier: "L1", status: "implemented" },
3952
+ { id: "U29", kind: "ui", semantic: "ui.nav", tag: "p-nav-bar", props: ["title", "back", "fixed", "loading", "frontColor", "backgroundColor", "colorAnimationDuration", "colorAnimationTimingFunc"], mpEquiv: "<navigation-bar>\uFF08\u81EA\u7ED8\uFF09", tier: "L1", status: "implemented" }
3933
3953
  ];
3934
3954
  var SHELL = [
3935
3955
  { id: "S1", kind: "shell", semantic: "shell.page", tag: "p-page", props: ["title", "statusBar", "pullRefresh"], mpEquiv: "<page>", tier: "L1", status: "implemented" },
@@ -3953,17 +3973,21 @@ ${summary}
3953
3973
  { id: "S15", kind: "shell", semantic: "shell.keyboard-accessory", tag: "p-keyboard-accessory", props: ["visible", "maxHeight", "background"], mpEquiv: "<keyboard-accessory>", tier: "L1", status: "implemented" },
3954
3974
  // ★权威标尺批 J:内嵌网页 / 广告位
3955
3975
  { id: "S16", kind: "shell", semantic: "shell.webview", tag: "p-webview", props: ["src", "height", "sandbox"], mpEquiv: "<web-view>", tier: "L1", status: "implemented" },
3956
- { id: "S17", kind: "shell", semantic: "shell.ad", tag: "p-ad", props: ["unitId", "adIntervals", "adType", "height"], mpEquiv: "<ad>", tier: "L1", status: "implemented" }
3976
+ { id: "S17", kind: "shell", semantic: "shell.ad", tag: "p-ad", props: ["unitId", "adIntervals", "adType", "adTheme", "height"], mpEquiv: "<ad>", tier: "L1", status: "implemented" }
3957
3977
  ];
3958
3978
  var GESTURE = [
3959
- { id: "G1", kind: "gesture", semantic: "gesture.tap", api: "v-gesture:tap", props: ["count"], mpEquiv: "bindtap", tier: "L1", status: "planned" },
3960
- { id: "G2", kind: "gesture", semantic: "gesture.longpress", api: "v-gesture:longpress", props: ["duration", "onEnd"], mpEquiv: "bindlongpress", tier: "L1", status: "planned" },
3961
- { id: "G3", kind: "gesture", semantic: "gesture.swipe", api: "v-gesture:swipe", props: ["direction", "threshold"], mpEquiv: "bindswipe", tier: "L1", status: "planned" },
3962
- { id: "G4", kind: "gesture", semantic: "gesture.pan", api: "v-gesture:pan", props: ["axis", "bounds"], mpEquiv: "bindtouchmove", tier: "L1", status: "planned" },
3963
- { id: "G5", kind: "gesture", semantic: "gesture.pinch", api: "v-gesture:pinch", props: ["scale", "onChange"], mpEquiv: "touchstart/move \u7EC4\u5408", tier: "L1", status: "planned" },
3964
- { id: "G6", kind: "gesture", semantic: "gesture.rotate", api: "v-gesture:rotate", props: ["angle"], mpEquiv: "\u7EC4\u5408", tier: "L1", status: "planned" },
3965
- { id: "G7", kind: "gesture", semantic: "gesture.press", api: "v-gesture:press", props: ["force"], mpEquiv: "3D Touch", tier: "L1", status: "planned" },
3966
- { id: "G8", kind: "gesture", semantic: "gesture.draggable", tag: "p-draggable", props: ["ghost", "snapToGrid", "onDrop"], mpEquiv: "movable-view", tier: "L1", status: "implemented" },
3979
+ // ★2026-09-18:G1/G2 planned implemented——`v-gesture:tap|longpress` 已双端落地
3980
+ // (编译器新增 `directive/v-gesture` 规则:MP 映射 bindtap/bindlongpress;Web Pointer 识别器)。
3981
+ // ★G3–G7 **保持 planned**:MP 端无事件对等(官方用 worklet 手势处理器<组件>,框架未生成),
3982
+ // mpEquiv 已改为**如实描述**(原值 bindswipe/bindtouchmove/组合/3D Touch 多为不准确表述)。
3983
+ { id: "G1", kind: "gesture", semantic: "gesture.tap", api: "v-gesture:tap", props: ["count"], mpEquiv: "bindtap\uFF08\u539F\u751F\u4E8B\u4EF6\u2014\u2014\u7F16\u8BD1\u5668\u76F4\u6620\u5C04\uFF09", tier: "L1", status: "implemented" },
3984
+ { id: "G2", kind: "gesture", semantic: "gesture.longpress", api: "v-gesture:longpress", props: ["duration", "onEnd"], mpEquiv: "bindlongpress\uFF08\u539F\u751F\u4E8B\u4EF6\u2014\u2014\u7F16\u8BD1\u5668\u76F4\u6620\u5C04\uFF09", tier: "L1", status: "implemented" },
3985
+ { id: "G3", kind: "gesture", semantic: "gesture.swipe", api: "v-gesture:swipe", props: ["direction", "threshold"], mpEquiv: "\u65E0\u539F\u751F\u4E8B\u4EF6\u2014\u2014\u9700 @touchstart/@touchend \u81EA\u884C\u5224\u5B9A\u65B9\u5411", tier: "L1", status: "planned" },
3986
+ { id: "G4", kind: "gesture", semantic: "gesture.pan", api: "v-gesture:pan", props: ["axis", "bounds"], mpEquiv: "\u65E0\u539F\u751F\u4E8B\u4EF6\u2014\u2014\u5B98\u65B9 <pan-gesture-handler>\uFF08worklet\uFF09\u6216 touch \u65CF\u81EA\u884C\u5224\u5B9A", tier: "L1", status: "planned" },
3987
+ { id: "G5", kind: "gesture", semantic: "gesture.pinch", api: "v-gesture:pinch", props: ["scale", "onChange"], mpEquiv: "\u65E0\u539F\u751F\u4E8B\u4EF6\u2014\u2014\u5B98\u65B9 <scale-gesture-handler>\uFF08worklet\uFF09", tier: "L1", status: "planned" },
3988
+ { id: "G6", kind: "gesture", semantic: "gesture.rotate", api: "v-gesture:rotate", props: ["angle"], mpEquiv: "\u65E0\u539F\u751F\u4E8B\u4EF6\uFF08MP \u65E0 rotate \u624B\u52BF\u5904\u7406\u5668\uFF09", tier: "L1", status: "planned" },
3989
+ { id: "G7", kind: "gesture", semantic: "gesture.press", api: "v-gesture:press", props: ["force"], mpEquiv: "\u65E0\u539F\u751F\u4E8B\u4EF6\u2014\u2014\u5B98\u65B9 <force-press-gesture-handler>\uFF08worklet\uFF0C\u9700 3D Touch \u8BBE\u5907\uFF09", tier: "L1", status: "planned" },
3990
+ { id: "G8", kind: "gesture", semantic: "gesture.draggable", tag: "p-draggable", props: ["direction", "inertia", "outOfBounds", "x", "y", "damping", "friction", "disabled", "scaleEnabled", "scaleMin", "scaleMax", "scaleValue", "animation", "scaleArea", "ghost", "snapToGrid", "onDrop"], mpEquiv: "movable-view", tier: "L1", status: "implemented" },
3967
3991
  { id: "G9", kind: "gesture", semantic: "gesture.scrollable", tag: "p-scrollable", props: ["bounce", "refresh", "loadMore"], mpEquiv: "<scroll-view>", tier: "L1", status: "implemented" },
3968
3992
  { id: "G10", kind: "gesture", semantic: "gesture.use-gesture", api: "useGesture()", props: ["recognizers", "simultaneous"], mpEquiv: "\u65E0", tier: "L1", status: "planned" }
3969
3993
  ];
@@ -3972,9 +3996,10 @@ ${summary}
3972
3996
  }
3973
3997
  var CAPABILITY = [
3974
3998
  // 7.1 设备/硬件(15)
3975
- cap("C1", "camera", "useCamera()", "wx.createCameraContext", "Result<Media>"),
3999
+ // ★2026-09-18 双形态(E8 先例):能力入口组件 p-pick-photo 即 useCamera() 的声明式入口
4000
+ { id: "C1", kind: "capability", semantic: "capability.camera", api: "useCamera()", tag: "p-pick-photo", props: ["Result<Media>"], mpEquiv: "wx.createCameraContext", tier: "L1", status: "implemented" },
3976
4001
  cap("C2", "microphone", "useMicrophone()", "RecorderManager", "Result<AudioBuffer>"),
3977
- { id: "C3", kind: "capability", semantic: "capability.location", api: "useLocation()", props: ["Result<Coords>"], mpEquiv: "wx.getLocation", tier: "L1", status: "implemented" },
4002
+ { id: "C3", kind: "capability", semantic: "capability.location", api: "useLocation()", tag: "p-location", props: ["Result<Coords>"], mpEquiv: "wx.getLocation", tier: "L1", status: "implemented" },
3978
4003
  cap("C4", "map", "useMap()", "wx.createMapContext", "MapController"),
3979
4004
  cap("C5", "sensor", "useSensor()", "onAccelerometer/onCompass/onGyroscope", "SensorStream"),
3980
4005
  cap("C6", "vibrate", "useVibrate()", "wx.vibrateShort/Long", "void"),
@@ -4016,7 +4041,8 @@ ${summary}
4016
4041
  cap("C39", "face-id", "useFaceID()", "\u7EC4\u5408", "Result<boolean>"),
4017
4042
  cap("C40", "payment", "usePayment()", "wx.requestPayment", "Result<PayResult>"),
4018
4043
  cap("C41", "login", "useLogin()", "wx.login", "Result<Token>"),
4019
- cap("C42", "qr-code", "useQRCode()", "wx.scanCode + canvas", "Result<string>"),
4044
+ // ★2026-09-18 双形态(E8 先例):能力入口组件 p-scan-qr useQRCode() 的声明式入口
4045
+ { id: "C42", kind: "capability", semantic: "capability.qr-code", api: "useQRCode()", tag: "p-scan-qr", props: ["Result<string>"], mpEquiv: "wx.scanCode + canvas", tier: "L1", status: "implemented" },
4020
4046
  cap("C43", "file-system", "useFileSystem()", "wx.getFileSystemManager", "FSAdapter"),
4021
4047
  cap("C44", "archive", "useArchive()", "wx.compressFile", "Result<void>"),
4022
4048
  cap("C45", "shortcut", "useShortcut()", "wx.addToDesktop", "Result<void>"),
@@ -4098,7 +4124,18 @@ ${summary}
4098
4124
  { id: "E25", kind: "engineering", semantic: "engineering.inspector", api: "useInspector()", mpEquiv: "\u65E0", tier: "L1", status: "planned" },
4099
4125
  { id: "E26", kind: "engineering", semantic: "engineering.performance", api: "usePerformance()", mpEquiv: "wx.reportPerformance", tier: "L1", status: "planned" },
4100
4126
  { id: "E27", kind: "engineering", semantic: "engineering.define-component", api: "defineComponent()", mpEquiv: "Component()", tier: "L1", status: "planned" },
4101
- { id: "E28", kind: "engineering", semantic: "engineering.define-capability", api: "defineCapability()", mpEquiv: "\u65E0", tier: "L1", status: "planned" }
4127
+ { id: "E28", kind: "engineering", semantic: "engineering.define-capability", api: "defineCapability()", mpEquiv: "\u65E0", tier: "L1", status: "planned" },
4128
+ // ★批次 8(2026-09-18):共享元素转场(官方 <share-element> 对齐)——能力由宿主提供,框架只声明语义
4129
+ { id: "E29", kind: "engineering", semantic: "engineering.share-element", tag: "p-share-element", props: ["shuttleKey", "animate", "duration", "easingFunction", "transitionOnGesture", "shuttleOnPush", "shuttleOnPop", "rectTweenType"], mpEquiv: "<share-element>\uFF08\u5BBF\u4E3B\u8DE8\u9875\u98DE\u884C\u52A8\u753B\uFF09", tier: "L1", status: "implemented" },
4130
+ // ★E30(2026-09-19):WebMCP 接入——把**能力面**暴露为浏览器内 agent 可调用工具。
4131
+ // 规范面:`document.modelContext.registerTool(...)`(★非 navigator)+ signal 注销(规范无 unregisterTool);
4132
+ // 灵感来自 VueUse v15 `useWebMCP`(document 命名空间 / signal 注销 / 方法可调用探测 / 三元组返回)。
4133
+ // 框架差异化:能力面统一 `CapResult<T>` 契约(G-32.4)→ 能力可**自动**派生为工具、响应归一不必逐个手写。
4134
+ // ★状态口径(与 E1-E28 / C15 / C26 等同款,非本轮新引入):hook 形态原语无**渲染后端映射**,
4135
+ // 故按 catalog 既有约定记 `planned`——该字段反映「已在 SEMANTIC_BACKEND_MAP 登记 ≥3 端」,
4136
+ // 不等于「代码未实现」(本原语已实现于 `packages/api/src/mcp.ts`)。
4137
+ // `mpEquiv: 无`:WebMCP 是浏览器侧 agent 通道,小程序无 `document.modelContext` → 如实降级(isSupported=false)。
4138
+ { id: "E30", kind: "engineering", semantic: "engineering.mcp", api: "useMCP()", props: ["tools", "capabilities", "prefix"], mpEquiv: "\u65E0\uFF08\u6D4F\u89C8\u5668\u4FA7 agent \u901A\u9053\uFF1BMP \u7AEF isSupported=false \u8BDA\u5B9E\u964D\u7EA7\uFF09", tier: "L1", status: "planned" }
4102
4139
  ];
4103
4140
  var PRIMITIVE_CATALOG = [...LAYOUT, ...UI, ...SHELL, ...GESTURE, ...CAPABILITY, ...ENGINEERING];
4104
4141
 
@@ -4141,7 +4178,7 @@ ${summary}
4141
4178
  { mp: "<ad>", proteus: "shell.ad\uFF08p-ad\uFF09", status: "ok", group: "component" },
4142
4179
  { mp: "<official-account>", proteus: "useMiniProgram\uFF08\u5FAE\u4FE1\u79C1\u6709\uFF09", status: "private", group: "component" },
4143
4180
  { mp: "<open-data>", proteus: "useMiniProgram\uFF08\u5FAE\u4FE1\u79C1\u6709\uFF09", status: "private", group: "component" },
4144
- { mp: "<share-element>", proteus: "p-share-element\uFF08L2 \u89C4\u5212\uFF09", status: "compat", group: "component", planned: true },
4181
+ { mp: "<share-element>", proteus: "engineering.share-element\uFF08p-share-element\uFF09", status: "ok", group: "component" },
4145
4182
  { mp: "<aria-component>", proteus: "aria-* \u5C5E\u6027\uFF08\u5404\u7EC4\u4EF6 ariaLabel\uFF1B\u4E24\u7AEF\u539F\u751F\u652F\u6301\uFF09", status: "ok", group: "component" },
4146
4183
  { mp: "<page-container>", proteus: "shell.page-container", status: "ok", group: "component" },
4147
4184
  { mp: "<voip-room>", proteus: "useMiniProgram\uFF08\u5FAE\u4FE1 VOIP\uFF09", status: "private", group: "component" },
@@ -4227,6 +4264,110 @@ ${summary}
4227
4264
  ];
4228
4265
  var MP_MAPPING_MATRIX = [...MP_COMPONENTS, ...MP_API_GROUPS];
4229
4266
 
4267
+ // ../component-ir/src/degradation.ts
4268
+ var PRIVATE_WEB_FALLBACK = {
4269
+ openType: "Web \u89E6\u53D1\u540C\u540D\u4E8B\u4EF6\uFF08\u5982 @contact\uFF09+ console \u63D0\u793A\u81EA\u5B9A\u4E49\u5BF9\u5E94\u4EA4\u4E92\uFF08\u53C2\u8003 Web p-button open-type\uFF09",
4270
+ appId: "Web \u65E0\u8DE8\u5E94\u7528\u8DF3\u8F6C\u80FD\u529B\uFF0C\u4EC5\u56DE\u663E\u53C2\u6570\u5E76\u63D0\u793A",
4271
+ shortLink: "Web \u65E0\u77ED\u94FE\u8DF3\u8F6C\u80FD\u529B\uFF0C\u4EC5\u56DE\u663E\u53C2\u6570\u5E76\u63D0\u793A",
4272
+ unitId: "Web \u65E0\u5BBF\u4E3B\u5E7F\u544A\u4F4D\uFF0C\u6E32\u67D3\u5360\u4F4D\u5E76\u63D0\u793A\uFF08\u4E0D\u9759\u9ED8\uFF09",
4273
+ adType: "Web \u65E0\u5BBF\u4E3B\u5E7F\u544A\u7C7B\u578B\uFF0C\u5FFD\u7565\u5E76\u63D0\u793A",
4274
+ adTheme: "Web \u65E0\u5BBF\u4E3B\u5E7F\u544A\u4E3B\u9898\uFF0C\u5FFD\u7565\u5E76\u63D0\u793A",
4275
+ adIntervals: "Web \u65E0\u5BBF\u4E3B\u5E7F\u544A\u81EA\u52A8\u5237\u65B0\uFF0C\u5FFD\u7565\u5E76\u63D0\u793A"
4276
+ };
4277
+ var STYLE_WEB_FALLBACK = {
4278
+ hoverClass: "\u6620\u5C04 CSS :active/:hover \u7C7B\uFF08\u6846\u67B6\u9ED8\u8BA4\u7C7B\u6052\u5728\uFF0C\u81EA\u5B9A\u4E49\u7C7B\u4F5C\u9644\u52A0\u2014\u2014T3\uFF09",
4279
+ hoverStartTime: "Web \u7528 CSS transition-delay \u8FD1\u4F3C\u6309\u538B\u8D77\u59CB\u5EF6\u65F6",
4280
+ hoverStayTime: "Web \u7528 CSS transition-duration \u8FD1\u4F3C\u6309\u538B\u505C\u7559\u65F6\u957F",
4281
+ hoverStopPropagation: "Web \u7528 CSS pointer-events \u963B\u65AD\u5B50\u7EA7\u53CD\u9988\u8FD1\u4F3C"
4282
+ };
4283
+ var MP_HOST_WEB_FALLBACK = {
4284
+ alwaysEmbed: "Web \u65E0\u540C\u5C42/\u975E\u540C\u5C42\u5207\u6362\u6982\u5FF5\uFF08input \u59CB\u7EC8\u5728\u6587\u6863\u6D41\uFF09\uFF0C\u5FFD\u7565\u5E76\u63D0\u793A",
4285
+ confirmHold: "Web \u65E0\u6CD5\u63A7\u5236\u8F6F\u952E\u76D8\u6536\u8D77\u65F6\u673A\uFF08\u7531\u6D4F\u89C8\u5668/\u7CFB\u7EDF\u51B3\u5B9A\uFF09\uFF0C\u5FFD\u7565\u5E76\u63D0\u793A",
4286
+ adjustPosition: "Web \u7531\u6D4F\u89C8\u5668\u81EA\u8EAB\u5904\u7406\u952E\u76D8\u5F39\u8D77\u65F6\u7684\u89C6\u53E3\u6EDA\u52A8\uFF0C\u5FFD\u7565\u5E76\u63D0\u793A",
4287
+ holdKeyboard: "Web \u65E0\u6CD5\u5728\u5931\u7126\u70B9\u51FB\u65F6\u4FDD\u6301\u952E\u76D8\uFF08\u6D4F\u89C8\u5668\u884C\u4E3A\uFF09\uFF0C\u5FFD\u7565\u5E76\u63D0\u793A",
4288
+ cursorColor: "Web \u8FD1\u4F3C\uFF1ACSS caret-color\uFF08\u5F53\u524D\u672A\u63A5\u7EBF\uFF0C\u5FFD\u7565\u5E76\u63D0\u793A\uFF09",
4289
+ selectionStart: "Web \u8FD1\u4F3C\uFF1AsetSelectionRange\uFF08\u5F53\u524D\u672A\u63A5\u7EBF\uFF0C\u5FFD\u7565\u5E76\u63D0\u793A\uFF09",
4290
+ selectionEnd: "Web \u8FD1\u4F3C\uFF1AsetSelectionRange\uFF08\u5F53\u524D\u672A\u63A5\u7EBF\uFF0C\u5FFD\u7565\u5E76\u63D0\u793A\uFF09",
4291
+ placeholderClass: "Web \u65E0\u300C\u5360\u4F4D\u7B26\u4E13\u7528\u7C7B\u540D\u300D\u901A\u9053\uFF08::placeholder \u4E0D\u53EF\u627F\u63A5\u4EFB\u610F\u7C7B\uFF09\uFF0C\u5FFD\u7565\u5E76\u63D0\u793A",
4292
+ safePasswordCertPath: "Web \u65E0\u5C0F\u7A0B\u5E8F\u5B89\u5168\u952E\u76D8\uFF08\u5BBF\u4E3B\u7EA7\u52A0\u5BC6\u952E\u76D8\uFF09\uFF0C\u5FFD\u7565\u5E76\u63D0\u793A",
4293
+ safePasswordLength: "Web \u65E0\u5C0F\u7A0B\u5E8F\u5B89\u5168\u952E\u76D8\uFF0C\u5FFD\u7565\u5E76\u63D0\u793A",
4294
+ safePasswordTimeStamp: "Web \u65E0\u5C0F\u7A0B\u5E8F\u5B89\u5168\u952E\u76D8\uFF0C\u5FFD\u7565\u5E76\u63D0\u793A",
4295
+ safePasswordNonce: "Web \u65E0\u5C0F\u7A0B\u5E8F\u5B89\u5168\u952E\u76D8\uFF0C\u5FFD\u7565\u5E76\u63D0\u793A",
4296
+ safePasswordSalt: "Web \u65E0\u5C0F\u7A0B\u5E8F\u5B89\u5168\u952E\u76D8\uFF0C\u5FFD\u7565\u5E76\u63D0\u793A",
4297
+ safePasswordCustomHash: "Web \u65E0\u5C0F\u7A0B\u5E8F\u5B89\u5168\u952E\u76D8\uFF0C\u5FFD\u7565\u5E76\u63D0\u793A",
4298
+ reportSubmit: "formId \u662F\u5C0F\u7A0B\u5E8F\u6A21\u677F\u6D88\u606F\u5BBF\u4E3B\u80FD\u529B\uFF0CWeb \u65E0\u5BF9\u5E94 \u2192 \u5FFD\u7565\u5E76\u63D0\u793A",
4299
+ reportSubmitTimeout: "formId \u662F\u5C0F\u7A0B\u5E8F\u6A21\u677F\u6D88\u606F\u5BBF\u4E3B\u80FD\u529B\uFF0CWeb \u65E0\u5BF9\u5E94 \u2192 \u5FFD\u7565\u5E76\u63D0\u793A"
4300
+ };
4301
+ var HOST_TAGS = {
4302
+ "p-map": "Web \u6A21\u62DF\u5C42\u6E32\u67D3\u9759\u6001\u5360\u4F4D\u5BB9\u5668\uFF0C\u5FFD\u7565\u8BE5\u5730\u56FE\u663E\u793A\u53C2\u6570\u5E76\u63D0\u793A",
4303
+ "p-media": "Web \u7528\u539F\u751F <video>\uFF0C\u5FFD\u7565\u8BE5\u64AD\u653E\u5668\u5916\u89C2/\u4E13\u6709\u53C2\u6570\u5E76\u63D0\u793A",
4304
+ "p-camera": "Web \u65E0\u6444\u50CF\u5934\u5BBF\u4E3B\uFF0C\u5FFD\u7565\u8BE5\u91C7\u96C6\u53C2\u6570\u5E76\u63D0\u793A\uFF08\u53EF\u9000\u5316 getUserMedia \u65F6\u53E6\u884C\u5B9E\u73B0\uFF09",
4305
+ "p-ad": "Web \u65E0\u5BBF\u4E3B\u5E7F\u544A\uFF0C\u5FFD\u7565\u8BE5\u5E7F\u544A\u53C2\u6570\u5E76\u63D0\u793A",
4306
+ "p-canvas": "Web \u7528 HTMLCanvasElement\uFF0C\u5FFD\u7565\u8BE5\u5C0F\u7A0B\u5E8F\u6E32\u67D3\u4E0A\u4E0B\u6587\u4E13\u6709\u53C2\u6570\u5E76\u63D0\u793A",
4307
+ "p-webview": "Web \u7528 <iframe>\uFF0C\u5FFD\u7565\u8BE5\u5C0F\u7A0B\u5E8F web-view \u4E13\u6709\u53C2\u6570\u5E76\u63D0\u793A"
4308
+ };
4309
+ var WEB_EXTENSION_MP_FALLBACK = {
4310
+ density: "\u5C0F\u7A0B\u5E8F\u65E0 DPI \u5BC6\u5EA6\u6982\u5FF5\uFF0C\u5FFD\u7565\u5E76\u63D0\u793A\uFF08rpx \u5DF2\u6309\u8BBE\u8BA1\u7A3F\u5BBD\u5EA6\u6362\u7B97\uFF09",
4311
+ designWidth: "\u5C0F\u7A0B\u5E8F\u7528 rpx \u57FA\u51C6\uFF08750\uFF09\uFF0C\u8BE5 Web \u4E13\u7528\u57FA\u51C6\u5FFD\u7565\u5E76\u63D0\u793A",
4312
+ searchable: "\u5C0F\u7A0B\u5E8F\u65E0\u5185\u5EFA\u641C\u7D22\u8BED\u4E49\uFF0C\u5FFD\u7565\u5E76\u63D0\u793A\uFF08\u7531\u4E1A\u52A1\u4FA7\u81EA\u7ED8\uFF09"
4313
+ };
4314
+ var TAG_PROP_MP_FALLBACK = {
4315
+ "p-stack": {
4316
+ snap: "\u5C0F\u7A0B\u5E8F view \u4E0D\u6EDA\u52A8\uFF08Skyline \u65E0 CSS overflow \u6EDA\u52A8\uFF0CS14 \u5B9E\u6D4B\uFF09\u2192 \u5438\u9644\u65E0\u8F7D\u4F53\uFF0C\u964D\u7EA7\u4E3A\u666E\u901A\u6392\u5217 + \u53EF\u89C2\u5BDF\u63D0\u793A\uFF1B\u9700\u7FFB\u9875\u8BF7\u7528 p-scroll-view \u7684 paging-enabled",
4317
+ loop: "\u56DE\u73AF\u4F9D\u8D56\u5438\u9644\u5BB9\u5668\uFF0C\u800C\u5C0F\u7A0B\u5E8F view \u4E0D\u6EDA\u52A8\uFF08S14\uFF09\u2192 \u4E00\u5E76\u964D\u7EA7\u4E3A\u666E\u901A\u6392\u5217 + \u53EF\u89C2\u5BDF\u63D0\u793A"
4318
+ }
4319
+ };
4320
+ var RULE_REGISTERED_PROPS = [
4321
+ ...Object.keys(PRIVATE_WEB_FALLBACK),
4322
+ ...Object.keys(STYLE_WEB_FALLBACK),
4323
+ ...Object.keys(WEB_EXTENSION_MP_FALLBACK),
4324
+ ...Object.keys(MP_HOST_WEB_FALLBACK),
4325
+ ...Object.values(TAG_PROP_MP_FALLBACK).flatMap((m) => Object.keys(m))
4326
+ ];
4327
+ var HOST_FALLBACK_TAGS = Object.keys(HOST_TAGS);
4328
+ function degradeProp(tag, prop) {
4329
+ const style = STYLE_WEB_FALLBACK[prop];
4330
+ if (style) return { mp: "supported", web: "fallback", behavior: style };
4331
+ const priv = PRIVATE_WEB_FALLBACK[prop];
4332
+ if (priv) return { mp: "supported", web: "fallback", behavior: priv };
4333
+ const mpHost = MP_HOST_WEB_FALLBACK[prop];
4334
+ if (mpHost) return { mp: "supported", web: "fallback", behavior: mpHost };
4335
+ if (tag && HOST_TAGS[tag]) {
4336
+ return { mp: "supported", web: "fallback", behavior: HOST_TAGS[tag] };
4337
+ }
4338
+ const tagProp = tag ? TAG_PROP_MP_FALLBACK[tag] : void 0;
4339
+ const tagPropBehavior = tagProp ? tagProp[prop] : void 0;
4340
+ if (tagPropBehavior) return { mp: "fallback", web: "supported", behavior: tagPropBehavior };
4341
+ const webExt = WEB_EXTENSION_MP_FALLBACK[prop];
4342
+ if (webExt) return { mp: "fallback", web: "supported", behavior: webExt };
4343
+ return { mp: "supported", web: "supported" };
4344
+ }
4345
+ function degradationOf(prim) {
4346
+ const out = {};
4347
+ for (const p of prim.props ?? []) out[p] = degradeProp(prim.tag, p);
4348
+ return out;
4349
+ }
4350
+ var DEGRADATION_TABLE = (() => {
4351
+ const out = {};
4352
+ for (const prim of PRIMITIVE_CATALOG) {
4353
+ if (!prim.tag) continue;
4354
+ out[prim.tag] = degradationOf(prim);
4355
+ }
4356
+ return out;
4357
+ })();
4358
+ var MP_UNSUPPORTED_PROPS = (() => {
4359
+ const kebab = (s) => s.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase();
4360
+ const out = {};
4361
+ for (const [tag, table] of Object.entries(DEGRADATION_TABLE)) {
4362
+ const set = /* @__PURE__ */ new Set();
4363
+ for (const [prop, entry] of Object.entries(table)) {
4364
+ if (entry.mp === "unsupported") set.add(kebab(prop));
4365
+ }
4366
+ if (set.size) out[tag] = set;
4367
+ }
4368
+ return out;
4369
+ })();
4370
+
4230
4371
  // ../render-backend/src/dispatcher.ts
4231
4372
  var DispatcherError = class extends Error {
4232
4373
  constructor(code, detail) {
@@ -8906,7 +9047,7 @@ ${summary}
8906
9047
  let current = { route: hasBrowserEnv ? location.pathname.replace(/^\//, "") : "" };
8907
9048
  let historyIndex = hasBrowserEnv ? history.state?.proteusIndex ?? 0 : 0;
8908
9049
  const emit = (url, routeType, nav = "forward") => {
8909
- current = { route: url.split("?")[0].replace(/^\//, ""), routeType };
9050
+ current = { route: url.split("?")[0].replace(/^\//, ""), routeType, query: parseQuery(url) };
8910
9051
  listeners.forEach((l) => l(current.route, parseQuery(url), routeType, nav));
8911
9052
  };
8912
9053
  if (hasBrowserEnv) {
@@ -8989,7 +9130,18 @@ ${summary}
8989
9130
  }
8990
9131
  var modeMP = import_meta.env?.MODE === "mp-weixin";
8991
9132
  var isMP = modeMP || detectMPRuntime();
8992
- 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();
8993
9145
 
8994
9146
  // ../shared/src/platform/runtime.ts
8995
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.1",
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,9 +24,9 @@
24
24
  "README.md"
25
25
  ],
26
26
  "dependencies": {
27
- "@proteus-vue/capabilities": "0.1.1-beta.1",
28
- "@proteus-vue/devtools-runtime": "0.1.0",
29
- "@proteus-vue/render-backend": "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
+ "@proteus-vue/render-backend": "0.1.1-beta.1"
30
30
  },
31
31
  "peerDependencies": {
32
32
  "@vue/devtools-api": "^8.0.0"