@proteus-vue/component-ir 0.1.0 → 0.1.1-beta.0
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/LICENSE +218 -0
- package/dist/audit.d.ts +22 -0
- package/dist/conformance.d.ts +12 -3
- package/dist/index.d.ts +4 -1
- package/dist/index.js +869 -63
- package/dist/map.d.ts +1 -1
- package/dist/mp-spec-coverage.d.ts +69 -0
- package/dist/primitives.d.ts +1 -1
- package/dist/schema.d.ts +2 -2
- package/package.json +5 -5
package/dist/index.js
CHANGED
|
@@ -17,6 +17,9 @@ var SEMANTIC_ENUM = [
|
|
|
17
17
|
"layout.split",
|
|
18
18
|
"layout.safe",
|
|
19
19
|
"layout.sidebar",
|
|
20
|
+
// ★#405 语义登记批:组件库扩展组件(Fluid S1-S4 + 工程兜底,语义层待 L2 落地——G-31.4 降级 planned)
|
|
21
|
+
"layout.aspect",
|
|
22
|
+
"layout.zone",
|
|
20
23
|
// —— 基础 UI 原语(G-32 ② UI 18 + 既有按钮)——
|
|
21
24
|
"ui.text",
|
|
22
25
|
"ui.heading",
|
|
@@ -41,6 +44,17 @@ var SEMANTIC_ENUM = [
|
|
|
41
44
|
// ★G-31 B4:既有组件对齐(p-list-view/p-nav-bar)
|
|
42
45
|
"ui.list",
|
|
43
46
|
"ui.nav",
|
|
47
|
+
// ★#405 语义登记批:反馈/状态类组件
|
|
48
|
+
"ui.loading",
|
|
49
|
+
"ui.scale",
|
|
50
|
+
"ui.skeleton",
|
|
51
|
+
// ★能力颗粒度对齐 C2:进度条 / 表单标签(对齐小程序 <progress> / <label>)
|
|
52
|
+
"ui.progress",
|
|
53
|
+
"ui.label",
|
|
54
|
+
// ★权威标尺批 H:局部文本选区(对齐小程序 <selection>)
|
|
55
|
+
"ui.selection",
|
|
56
|
+
// ★权威标尺批 I:相机(对齐小程序 <camera>)
|
|
57
|
+
"ui.camera",
|
|
44
58
|
// —— 容器/导航原语(G-32 ③ Shell 10)——
|
|
45
59
|
"shell.page",
|
|
46
60
|
"shell.nav",
|
|
@@ -51,13 +65,27 @@ var SEMANTIC_ENUM = [
|
|
|
51
65
|
"shell.popover",
|
|
52
66
|
"shell.toast",
|
|
53
67
|
"shell.action-sheet",
|
|
68
|
+
// ★#405 语义登记批:弹层/工具栏组件
|
|
69
|
+
"shell.mask",
|
|
70
|
+
"shell.popup",
|
|
71
|
+
"shell.toolbar",
|
|
72
|
+
// ★能力颗粒度对齐 C2:页面容器(对齐小程序 <page-container>)
|
|
73
|
+
"shell.page-container",
|
|
74
|
+
// ★权威标尺批 H:键盘上方工具栏(对齐小程序 <keyboard-accessory>)
|
|
75
|
+
"shell.keyboard-accessory",
|
|
76
|
+
// ★权威标尺批 J:内嵌网页 / 广告位(对齐小程序 <web-view>/<ad>)
|
|
77
|
+
"shell.webview",
|
|
78
|
+
"shell.ad",
|
|
79
|
+
// ★权威标尺批 J:地图(对齐小程序 <map>)
|
|
80
|
+
"ui.map",
|
|
54
81
|
// —— 交互/手势原语(G-32 ④ Gesture——组件形态 2 个;v-gesture: 指令归绑定层不产生 C-IR 节点)——
|
|
55
82
|
"gesture.draggable",
|
|
56
83
|
"gesture.scrollable",
|
|
57
|
-
// —— 工程原语(G-32 ⑥ Engineering——组件形态 3
|
|
84
|
+
// —— 工程原语(G-32 ⑥ Engineering——组件形态 3 个 + ★#405 错误兑底;Hook/路由方法归 API 层不产生 C-IR 节点)——
|
|
58
85
|
"engineering.router-link",
|
|
59
86
|
"engineering.transition",
|
|
60
87
|
"engineering.animate",
|
|
88
|
+
"engineering.error-boundary",
|
|
61
89
|
// —— 能力入口(G-28 组件化:p-* 能力入口组件;useXxx Hook 归 API 层不产生 C-IR 节点)——
|
|
62
90
|
"capability.scan-qr",
|
|
63
91
|
"capability.pick-photo",
|
|
@@ -84,7 +112,7 @@ var TAG_SEMANTIC_MAP = {
|
|
|
84
112
|
"p-inline": "layout.inline",
|
|
85
113
|
"p-stack": "layout.stack",
|
|
86
114
|
"p-grid": "layout.grid",
|
|
87
|
-
|
|
115
|
+
// ★Skyline 线收口:'p-fluid' 移除——layout.fluid 是 v-p-fluid **指令**语义(非标签),登记为标签会让 <p-fluid> 静默不渲染
|
|
88
116
|
"p-adaptive": "layout.adaptive",
|
|
89
117
|
"p-fit": "layout.fit",
|
|
90
118
|
"p-spacer": "layout.spacer",
|
|
@@ -146,7 +174,34 @@ var TAG_SEMANTIC_MAP = {
|
|
|
146
174
|
"p-nav-bar": "ui.nav",
|
|
147
175
|
// ★G-31 B4 Fluid 体系扩展语义(有明确系统原生对应——原则 #10.8)
|
|
148
176
|
"p-safe": "layout.safe",
|
|
149
|
-
"p-sidebar": "layout.sidebar"
|
|
177
|
+
"p-sidebar": "layout.sidebar",
|
|
178
|
+
// ★#405 语义登记批:剩余 10 组件全量入图(EXTRA_KIND 文档兑底退役)——
|
|
179
|
+
// 9 个新语义(catalog planned L2:语义层待多端映射)+ p-scroll-view 复用 layout.scroll(p-view 先例)
|
|
180
|
+
"p-aspect": "layout.aspect",
|
|
181
|
+
"p-zone": "layout.zone",
|
|
182
|
+
"p-loading": "ui.loading",
|
|
183
|
+
"p-scale": "ui.scale",
|
|
184
|
+
"p-skeleton": "ui.skeleton",
|
|
185
|
+
"p-mask": "shell.mask",
|
|
186
|
+
"p-popup": "shell.popup",
|
|
187
|
+
"p-toolbar": "shell.toolbar",
|
|
188
|
+
"p-scroll-view": "layout.scroll",
|
|
189
|
+
// 滚动容器 = p-scroll 角色
|
|
190
|
+
"p-error-boundary": "engineering.error-boundary",
|
|
191
|
+
// E8 原语组件形态(useErrorBoundary API 形态并存)
|
|
192
|
+
// ★能力颗粒度对齐 C2:新增真实组件
|
|
193
|
+
"p-progress": "ui.progress",
|
|
194
|
+
"p-label": "ui.label",
|
|
195
|
+
"p-page-container": "shell.page-container",
|
|
196
|
+
// ★权威标尺批 H:选区 / 键盘工具栏
|
|
197
|
+
"p-selection": "ui.selection",
|
|
198
|
+
"p-keyboard-accessory": "shell.keyboard-accessory",
|
|
199
|
+
// ★权威标尺批 I:相机
|
|
200
|
+
"p-camera": "ui.camera",
|
|
201
|
+
// ★权威标尺批 J:内嵌网页 / 广告位
|
|
202
|
+
"p-webview": "shell.webview",
|
|
203
|
+
"p-ad": "shell.ad",
|
|
204
|
+
"p-map": "ui.map"
|
|
150
205
|
};
|
|
151
206
|
|
|
152
207
|
// src/validate.ts
|
|
@@ -247,7 +302,7 @@ var SEMANTIC_BACKEND_MAP = {
|
|
|
247
302
|
},
|
|
248
303
|
"layout.fluid": {
|
|
249
304
|
"vue-dom": "div.proteus-fluid",
|
|
250
|
-
"native-ios": "
|
|
305
|
+
"native-ios": "UIView.fluid",
|
|
251
306
|
"native-android": "ConstraintLayout",
|
|
252
307
|
"native-harmony": "Flex.fluid",
|
|
253
308
|
skyline: "view.fluid",
|
|
@@ -266,7 +321,7 @@ var SEMANTIC_BACKEND_MAP = {
|
|
|
266
321
|
},
|
|
267
322
|
"layout.fit": {
|
|
268
323
|
"vue-dom": "div.proteus-fit",
|
|
269
|
-
"native-ios": "
|
|
324
|
+
"native-ios": "UIView.fit",
|
|
270
325
|
"native-android": "wrapContent",
|
|
271
326
|
"native-harmony": "fitContent",
|
|
272
327
|
skyline: "view.fit",
|
|
@@ -727,6 +782,105 @@ var SEMANTIC_BACKEND_MAP = {
|
|
|
727
782
|
// Skyline animation CSS
|
|
728
783
|
flutter: "AnimationController",
|
|
729
784
|
headless: "animate"
|
|
785
|
+
},
|
|
786
|
+
// ★能力颗粒度对齐 C2:进度条 / 表单标签 / 页面容器(对齐小程序 <progress>/<label>/<page-container>)
|
|
787
|
+
"ui.progress": {
|
|
788
|
+
"vue-dom": "div.proteus-progress",
|
|
789
|
+
"native-ios": "UIProgressView",
|
|
790
|
+
"native-android": "ProgressBar",
|
|
791
|
+
"native-harmony": "Progress",
|
|
792
|
+
skyline: "progress",
|
|
793
|
+
// 微信原生 <progress>
|
|
794
|
+
flutter: "LinearProgressIndicator",
|
|
795
|
+
headless: "progress"
|
|
796
|
+
},
|
|
797
|
+
"ui.label": {
|
|
798
|
+
"vue-dom": "label",
|
|
799
|
+
"native-ios": "UILabel.label",
|
|
800
|
+
"native-android": "TextView.label",
|
|
801
|
+
"native-harmony": "Text.label",
|
|
802
|
+
skyline: "label",
|
|
803
|
+
// 微信原生 <label>(for 关联控件)
|
|
804
|
+
flutter: "Text.label",
|
|
805
|
+
headless: "label"
|
|
806
|
+
},
|
|
807
|
+
"shell.page-container": {
|
|
808
|
+
"vue-dom": "div.proteus-page-container",
|
|
809
|
+
"native-ios": "UIPresentationController",
|
|
810
|
+
"native-android": "BottomSheetDialog",
|
|
811
|
+
"native-harmony": "bindSheet",
|
|
812
|
+
skyline: "page-container",
|
|
813
|
+
// 微信原生 <page-container>
|
|
814
|
+
flutter: "showModalBottomSheet",
|
|
815
|
+
headless: "page-container"
|
|
816
|
+
},
|
|
817
|
+
// ★权威标尺批 H:局部文本选区 / 键盘上方工具栏(对齐小程序 <selection>/<keyboard-accessory>)
|
|
818
|
+
"ui.selection": {
|
|
819
|
+
"vue-dom": "div.proteus-selection",
|
|
820
|
+
"native-ios": "UITextView.selection",
|
|
821
|
+
"native-android": "TextView.selection",
|
|
822
|
+
"native-harmony": "Text.selection",
|
|
823
|
+
skyline: "selection",
|
|
824
|
+
// 微信原生 <selection>
|
|
825
|
+
flutter: "SelectableText",
|
|
826
|
+
headless: "selection"
|
|
827
|
+
},
|
|
828
|
+
"shell.keyboard-accessory": {
|
|
829
|
+
"vue-dom": "div.proteus-keyboard-accessory",
|
|
830
|
+
"native-ios": "UIInputView",
|
|
831
|
+
"native-android": "InputMethodService.accessory",
|
|
832
|
+
"native-harmony": "KeyboardAccessory",
|
|
833
|
+
skyline: "keyboard-accessory",
|
|
834
|
+
// 微信原生 <keyboard-accessory>
|
|
835
|
+
flutter: "KeyboardAccessoryView",
|
|
836
|
+
headless: "keyboard-accessory"
|
|
837
|
+
},
|
|
838
|
+
// ★权威标尺批 I:相机(对齐小程序 <camera>)
|
|
839
|
+
"ui.camera": {
|
|
840
|
+
"vue-dom": "video.proteus-camera",
|
|
841
|
+
// Web getUserMedia + <video> 预览
|
|
842
|
+
"native-ios": "AVCaptureVideoPreviewLayer",
|
|
843
|
+
"native-android": "CameraX.PreviewView",
|
|
844
|
+
"native-harmony": "XComponent.camera",
|
|
845
|
+
skyline: "camera",
|
|
846
|
+
// 微信原生 <camera>
|
|
847
|
+
flutter: "CameraPreview",
|
|
848
|
+
headless: "camera"
|
|
849
|
+
},
|
|
850
|
+
// ★权威标尺批 J:内嵌网页 / 广告位(对齐小程序 <web-view>/<ad>)
|
|
851
|
+
"shell.webview": {
|
|
852
|
+
"vue-dom": "div.proteus-webview",
|
|
853
|
+
// Web iframe 运行时注入
|
|
854
|
+
"native-ios": "WKWebView",
|
|
855
|
+
"native-android": "WebView",
|
|
856
|
+
"native-harmony": "Web",
|
|
857
|
+
skyline: "web-view",
|
|
858
|
+
// 微信原生 <web-view>
|
|
859
|
+
flutter: "WebView",
|
|
860
|
+
headless: "webview"
|
|
861
|
+
},
|
|
862
|
+
"shell.ad": {
|
|
863
|
+
"vue-dom": "div.proteus-ad",
|
|
864
|
+
// Web 占位容器(无广告联盟标准)
|
|
865
|
+
"native-ios": "UIView.ad",
|
|
866
|
+
"native-android": "View.ad",
|
|
867
|
+
"native-harmony": "AdSlot",
|
|
868
|
+
skyline: "ad",
|
|
869
|
+
// 微信原生 <ad>
|
|
870
|
+
flutter: "AdWidget",
|
|
871
|
+
headless: "ad"
|
|
872
|
+
},
|
|
873
|
+
// ★权威标尺批 J:地图(对齐小程序 <map>)
|
|
874
|
+
"ui.map": {
|
|
875
|
+
"vue-dom": "div.proteus-map",
|
|
876
|
+
// Web 宿主槽位(接入高德/Google/Mapbox)
|
|
877
|
+
"native-ios": "MKMapView",
|
|
878
|
+
"native-android": "MapView",
|
|
879
|
+
"native-harmony": "MapComponent",
|
|
880
|
+
skyline: "map",
|
|
881
|
+
// 微信原生 <map>
|
|
882
|
+
flutter: "GoogleMap",
|
|
883
|
+
headless: "map"
|
|
730
884
|
}
|
|
731
885
|
};
|
|
732
886
|
function mapSemanticToBackend(semantic, backendId) {
|
|
@@ -753,25 +907,29 @@ function toComponentTree(tag, props = {}, children = []) {
|
|
|
753
907
|
|
|
754
908
|
// src/primitives.ts
|
|
755
909
|
var LAYOUT = [
|
|
756
|
-
{ id: "L1", kind: "layout", semantic: "layout.box", tag: "p-box", props: ["aspectRatio", "overflow"], mpEquiv: "<view>", tier: "L1", status: "implemented" },
|
|
910
|
+
{ id: "L1", kind: "layout", semantic: "layout.box", tag: "p-box", props: ["aspectRatio", "overflow", "hoverClass", "hoverStopPropagation", "hoverStartTime", "hoverStayTime"], mpEquiv: "<view>", tier: "L1", status: "implemented" },
|
|
757
911
|
{ id: "L2", kind: "layout", semantic: "layout.inline", tag: "p-inline", props: ["wrap"], mpEquiv: "<text> \u5185\u8054", tier: "L1", status: "implemented" },
|
|
758
912
|
{ id: "L3", kind: "layout", semantic: "layout.stack", tag: "p-stack", props: ["direction", "gap", "align", "wrap", "snap", "loop"], mpEquiv: "flex + scroll-view + swiper", tier: "L1", status: "implemented" },
|
|
759
913
|
{ id: "L4", kind: "layout", semantic: "layout.grid", tag: "p-grid", props: ["minColWidth", "maxCols", "gap", "autoFlow"], mpEquiv: "<view> + CSS Grid", tier: "L1", status: "implemented" },
|
|
760
|
-
|
|
914
|
+
// ★Skyline 线收口:layout.fluid 由 v-p-fluid **指令**承载(非标签)——无 tag,避免 <p-fluid> 幽灵
|
|
915
|
+
{ id: "L5", kind: "layout", semantic: "layout.fluid", props: ["breakpoints", "minItemWidth"], mpEquiv: "\u54CD\u5E94\u5F0F CSS\uFF08v-p-fluid \u6307\u4EE4\uFF09", tier: "L1", status: "implemented" },
|
|
761
916
|
{ id: "L6", kind: "layout", semantic: "layout.adaptive", tag: "p-adaptive", props: ["sheet", "dialog", "popover", "drawer"], mpEquiv: "\u65E0\uFF08\u5BB9\u5668\u5BBD\u5EA6\u8BED\u4E49\u65AD\u70B9\uFF09", tier: "L1", status: "implemented" },
|
|
762
917
|
{ id: "L7", kind: "layout", semantic: "layout.fit", tag: "p-fit", props: ["mode"], mpEquiv: "fit-content", tier: "L1", status: "implemented" },
|
|
763
918
|
{ id: "L8", kind: "layout", semantic: "layout.spacer", tag: "p-spacer", props: ["grow", "shrink"], mpEquiv: "flex:1", tier: "L1", status: "implemented" },
|
|
764
919
|
{ id: "L9", kind: "layout", semantic: "layout.divider", tag: "p-divider", props: ["orientation", "inset"], mpEquiv: "<view> + border", tier: "L1", status: "implemented" },
|
|
765
|
-
{ id: "L10", kind: "layout", semantic: "layout.scroll", tag: "p-scroll", props: ["axis", "paging", "refresh", "indicator"], mpEquiv: "<scroll-view>", tier: "L1", status: "implemented" },
|
|
920
|
+
{ id: "L10", kind: "layout", semantic: "layout.scroll", tag: "p-scroll", props: ["axis", "paging", "refresh", "indicator", "upperThreshold", "lowerThreshold", "scrollIntoView", "scrollWithAnimation", "enableBackToTop", "enablePassive", "refresherEnabled", "refresherTriggered", "enhanced", "bounces", "scrollAnchoring", "padding"], mpEquiv: "<scroll-view>", tier: "L1", status: "implemented" },
|
|
766
921
|
{ id: "L11", kind: "layout", semantic: "layout.virtual-list", tag: "p-virtual-list", props: ["itemSize", "buffer", "direction"], mpEquiv: "<scroll-view> + \u624B\u52A8\u56DE\u6536", tier: "L1", status: "implemented" },
|
|
767
|
-
{ id: "L12", kind: "layout", semantic: "layout.masonry", tag: "p-masonry", props: ["colCount", "gap"], mpEquiv: "\u7B2C\u4E09\u65B9\u7011\u5E03\u6D41", tier: "L1", status: "implemented" }
|
|
922
|
+
{ id: "L12", kind: "layout", semantic: "layout.masonry", tag: "p-masonry", props: ["colCount", "gap"], mpEquiv: "\u7B2C\u4E09\u65B9\u7011\u5E03\u6D41", tier: "L1", status: "implemented" },
|
|
923
|
+
// ★#405 语义登记批:Fluid 体系剩余组件(语义层待多端映射 → planned L2——G-31.4 不足 3 端降级)
|
|
924
|
+
{ 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" },
|
|
925
|
+
{ 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" }
|
|
768
926
|
];
|
|
769
927
|
var UI = [
|
|
770
|
-
{ id: "U1", kind: "ui", semantic: "ui.text", tag: "p-text", props: ["content", "selectable", "truncate", "align"], mpEquiv: "<text>", tier: "L1", status: "implemented" },
|
|
928
|
+
{ 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" },
|
|
771
929
|
{ id: "U2", kind: "ui", semantic: "ui.heading", tag: "p-heading", props: ["level"], mpEquiv: "<h1>-<h6>", tier: "L1", status: "implemented" },
|
|
772
930
|
{ id: "U3", kind: "ui", semantic: "ui.rich-text", tag: "p-rich-text", props: ["source", "schema"], mpEquiv: "<rich-text>", tier: "L1", status: "implemented" },
|
|
773
|
-
{ id: "U4", kind: "ui", semantic: "ui.icon", tag: "p-icon", props: ["name", "size", "color", "spin"], mpEquiv: "<icon>", tier: "L1", status: "implemented" },
|
|
774
|
-
{ id: "U5", kind: "ui", semantic: "ui.image", tag: "p-image", props: ["src", "fit", "placeholder", "lazy"], mpEquiv: "<image>", tier: "L1", status: "implemented" },
|
|
931
|
+
{ id: "U4", kind: "ui", semantic: "ui.icon", tag: "p-icon", props: ["name", "type", "size", "color", "spin"], mpEquiv: "<icon>", tier: "L1", status: "implemented" },
|
|
932
|
+
{ 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" },
|
|
775
933
|
{ id: "U6", kind: "ui", semantic: "ui.avatar", tag: "p-avatar", props: ["src", "shape", "size", "fallback"], mpEquiv: "\u7EC4\u5408", tier: "L1", status: "implemented" },
|
|
776
934
|
{ 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" },
|
|
777
935
|
{ id: "U8", kind: "ui", semantic: "ui.canvas", tag: "p-canvas", props: ["engine", "resolution"], mpEquiv: "<canvas>", tier: "L1", status: "implemented" },
|
|
@@ -783,12 +941,25 @@ var UI = [
|
|
|
783
941
|
{ id: "U14", kind: "ui", semantic: "ui.radio", tag: "p-radio", props: ["value", "group"], mpEquiv: "<radio>", tier: "L1", status: "implemented" },
|
|
784
942
|
{ id: "U15", kind: "ui", semantic: "ui.switch", tag: "p-switch", props: ["checked", "loading"], mpEquiv: "<switch>", tier: "L1", status: "implemented" },
|
|
785
943
|
{ id: "U16", kind: "ui", semantic: "ui.slider", tag: "p-slider", props: ["min", "max", "step", "range"], mpEquiv: "<slider>", tier: "L1", status: "implemented" },
|
|
786
|
-
{ id: "U17", kind: "ui", semantic: "ui.picker", tag: "p-picker", props: ["mode", "start", "end"], mpEquiv: "<picker>", tier: "L1", status: "implemented" },
|
|
787
|
-
{ id: "U18", kind: "ui", semantic: "ui.form", tag: "p-form", props: ["model", "rules", "layout"], mpEquiv: "\u7EC4\u5408", tier: "L1", status: "implemented" }
|
|
944
|
+
{ id: "U17", kind: "ui", semantic: "ui.picker", tag: "p-picker", props: ["mode", "start", "end", "indicatorStyle", "indicatorClass", "maskClass", "maskStyle", "immediateChange"], mpEquiv: "<picker>", tier: "L1", status: "implemented" },
|
|
945
|
+
{ id: "U18", kind: "ui", semantic: "ui.form", tag: "p-form", props: ["model", "rules", "layout"], mpEquiv: "\u7EC4\u5408", tier: "L1", status: "implemented" },
|
|
946
|
+
// ★#405 语义登记批:反馈/状态类组件
|
|
947
|
+
{ id: "U19", kind: "ui", semantic: "ui.loading", tag: "p-loading", props: ["size", "text"], mpEquiv: "wx.showLoading \u90E8\u5206", tier: "L2", status: "planned" },
|
|
948
|
+
{ id: "U20", kind: "ui", semantic: "ui.scale", tag: "p-scale", props: ["level", "density", "baseSize"], mpEquiv: "\u65E0\uFF08\u65E0\u969C\u788D\u6863\u4F4D\uFF09", tier: "L2", status: "planned" },
|
|
949
|
+
{ id: "U21", kind: "ui", semantic: "ui.skeleton", tag: "p-skeleton", props: ["rows", "avatar", "animated"], mpEquiv: "\u65E0", tier: "L2", status: "planned" },
|
|
950
|
+
// ★能力颗粒度对齐 C2:进度条 / 表单标签
|
|
951
|
+
{ id: "U22", kind: "ui", semantic: "ui.progress", tag: "p-progress", props: ["percent", "status", "type", "strokeWidth", "showInfo"], mpEquiv: "<progress>", tier: "L1", status: "implemented" },
|
|
952
|
+
{ id: "U23", kind: "ui", semantic: "ui.label", tag: "p-label", props: ["for", "block"], mpEquiv: "<label>", tier: "L1", status: "implemented" },
|
|
953
|
+
// ★权威标尺批 H:局部文本选区
|
|
954
|
+
{ id: "U24", kind: "ui", semantic: "ui.selection", tag: "p-selection", props: ["disableContextMenu", "selectable"], mpEquiv: "<selection>", tier: "L1", status: "implemented" },
|
|
955
|
+
// ★权威标尺批 I:相机
|
|
956
|
+
{ id: "U25", kind: "ui", semantic: "ui.camera", tag: "p-camera", props: ["devicePosition", "flash", "aspectRatio"], mpEquiv: "<camera>", tier: "L1", status: "implemented" },
|
|
957
|
+
// ★权威标尺批 J:地图
|
|
958
|
+
{ id: "U26", kind: "ui", semantic: "ui.map", tag: "p-map", props: ["latitude", "longitude", "scale", "markers"], mpEquiv: "<map>", tier: "L1", status: "implemented" }
|
|
788
959
|
];
|
|
789
960
|
var SHELL = [
|
|
790
961
|
{ id: "S1", kind: "shell", semantic: "shell.page", tag: "p-page", props: ["title", "statusBar", "pullRefresh"], mpEquiv: "<page>", tier: "L1", status: "implemented" },
|
|
791
|
-
{ id: "S2", kind: "shell", semantic: "shell.nav", tag: "p-nav", props: ["title", "transparent"], mpEquiv: "\u5BFC\u822A\u680F\u914D\u7F6E", tier: "L1", status: "implemented" },
|
|
962
|
+
{ id: "S2", kind: "shell", semantic: "shell.nav", tag: "p-nav", props: ["title", "transparent", "loading", "frontColor", "backgroundColor", "colorAnimationDuration", "colorAnimationTimingFunc"], mpEquiv: "\u5BFC\u822A\u680F\u914D\u7F6E", tier: "L1", status: "implemented" },
|
|
792
963
|
{ id: "S3", kind: "shell", semantic: "shell.tabbar", tag: "p-tabbar", props: ["tabs", "active", "badge"], mpEquiv: "<tabbar>", tier: "L1", status: "implemented" },
|
|
793
964
|
{ id: "S4", kind: "shell", semantic: "shell.segment", tag: "p-segment", props: ["options", "active"], mpEquiv: "<segment>", tier: "L1", status: "implemented" },
|
|
794
965
|
{ id: "S5", kind: "shell", semantic: "shell.drawer", tag: "p-drawer", props: ["side", "width", "overlay"], mpEquiv: "\u7EC4\u5408", tier: "L1", status: "implemented" },
|
|
@@ -796,8 +967,19 @@ var SHELL = [
|
|
|
796
967
|
{ id: "S7", kind: "shell", semantic: "shell.popover", tag: "p-popover", props: ["trigger", "placement"], mpEquiv: "\u7EC4\u5408", tier: "L1", status: "implemented" },
|
|
797
968
|
{ id: "S8", kind: "shell", semantic: "shell.toast", tag: "p-toast", props: ["message", "duration", "type"], mpEquiv: "wx.showToast", tier: "L1", status: "planned" },
|
|
798
969
|
{ id: "S9", kind: "shell", semantic: "shell.action-sheet", tag: "p-action-sheet", props: ["actions", "cancel"], mpEquiv: "wx.showActionSheet", tier: "L1", status: "implemented" },
|
|
799
|
-
{ id: "S10", kind: "shell", semantic: "layout.split", tag: "p-split", props: ["breakpoint", "ratio", "collapse"], mpEquiv: "\u65E0\uFF08\u5206\u680F\u5E03\u5C40\uFF09", tier: "L1", status: "implemented" }
|
|
970
|
+
{ id: "S10", kind: "shell", semantic: "layout.split", tag: "p-split", props: ["breakpoint", "ratio", "collapse"], mpEquiv: "\u65E0\uFF08\u5206\u680F\u5E03\u5C40\uFF09", tier: "L1", status: "implemented" },
|
|
800
971
|
// ★已落地绑定:分栏语义由 layout.split 承载(G-32 文档为 shell.split——机器事实以实现为准)
|
|
972
|
+
// ★#405 语义登记批:弹层/工具栏组件
|
|
973
|
+
{ id: "S11", kind: "shell", semantic: "shell.mask", tag: "p-mask", props: ["visible", "transparent"], mpEquiv: "\u7EC4\u5408\uFF08\u906E\u7F69\u5C42\uFF09", tier: "L2", status: "planned" },
|
|
974
|
+
{ id: "S12", kind: "shell", semantic: "shell.popup", tag: "p-popup", props: ["position", "round", "overlay"], mpEquiv: "\u7EC4\u5408\uFF08\u5F39\u5C42\uFF09", tier: "L2", status: "planned" },
|
|
975
|
+
{ id: "S13", kind: "shell", semantic: "shell.toolbar", tag: "p-toolbar", props: ["items", "itemWidth", "moreWidth"], mpEquiv: "\u65E0\uFF08\u6EA2\u51FA\u6298\u53E0\uFF09", tier: "L2", status: "planned" },
|
|
976
|
+
// ★能力颗粒度对齐 C2:页面容器(对齐小程序 <page-container>)
|
|
977
|
+
{ id: "S14", kind: "shell", semantic: "shell.page-container", tag: "p-page-container", props: ["show", "position", "overlay", "closeOnClickOverlay", "duration", "zIndex", "closeOnSlideDown", "overlayStyle", "customStyle"], mpEquiv: "<page-container>", tier: "L1", status: "implemented" },
|
|
978
|
+
// ★权威标尺批 H:键盘上方工具栏
|
|
979
|
+
{ id: "S15", kind: "shell", semantic: "shell.keyboard-accessory", tag: "p-keyboard-accessory", props: ["visible", "maxHeight", "background"], mpEquiv: "<keyboard-accessory>", tier: "L1", status: "implemented" },
|
|
980
|
+
// ★权威标尺批 J:内嵌网页 / 广告位
|
|
981
|
+
{ id: "S16", kind: "shell", semantic: "shell.webview", tag: "p-webview", props: ["src", "height", "sandbox"], mpEquiv: "<web-view>", tier: "L1", status: "implemented" },
|
|
982
|
+
{ id: "S17", kind: "shell", semantic: "shell.ad", tag: "p-ad", props: ["unitId", "adIntervals", "adType", "height"], mpEquiv: "<ad>", tier: "L1", status: "implemented" }
|
|
801
983
|
];
|
|
802
984
|
var GESTURE = [
|
|
803
985
|
{ id: "G1", kind: "gesture", semantic: "gesture.tap", api: "v-gesture:tap", props: ["count"], mpEquiv: "bindtap", tier: "L1", status: "planned" },
|
|
@@ -869,7 +1051,49 @@ var CAPABILITY = [
|
|
|
869
1051
|
{ id: "C47", kind: "capability", semantic: "capability.mini-program", api: "useMiniProgram()", props: ["MPContext"], mpEquiv: "wx.navigateToMiniProgram", tier: "L1", status: "planned" },
|
|
870
1052
|
{ id: "C48", kind: "capability", semantic: "capability.embedded", api: "useEmbedded()", props: ["HostContext"], mpEquiv: "\u65E0\uFF08\u88AB\u5BBF\u4E3B\u5D4C\u5165\uFF09", tier: "L1", status: "planned" },
|
|
871
1053
|
{ id: "C49", kind: "capability", semantic: "capability.live", api: "useLive()", props: ["LiveRoom"], mpEquiv: "wx...\uFF08\u76F4\u64AD\u7EC4\u4EF6\uFF09", tier: "L1", status: "planned" },
|
|
872
|
-
{ id: "C50", kind: "capability", semantic: "capability.extension", api: "useExtension()", props: ["ExtensionAPI"], mpEquiv: "\u65E0\uFF08\u63D2\u4EF6/\u6269\u5C55\u70B9 G-21\uFF09", tier: "L1", status: "planned" }
|
|
1054
|
+
{ id: "C50", kind: "capability", semantic: "capability.extension", api: "useExtension()", props: ["ExtensionAPI"], mpEquiv: "\u65E0\uFF08\u63D2\u4EF6/\u6269\u5C55\u70B9 G-21\uFF09", tier: "L1", status: "planned" },
|
|
1055
|
+
// ★颗粒度对齐 C(2026-09-11):C51 小程序热更新(wx.getUpdateManager)
|
|
1056
|
+
{ id: "C51", kind: "capability", semantic: "capability.update", api: "useUpdate()", props: ["UpdateManagerAPI"], mpEquiv: "wx.getUpdateManager", tier: "L1", status: "planned" },
|
|
1057
|
+
// ★颗粒度对齐 C3(2026-09-11):相册 / Worker(对齐小程序媒体与多线程 API——纯 Hook,无 C-IR 节点 → planned)
|
|
1058
|
+
{ id: "C52", kind: "capability", semantic: "capability.album", api: "useAlbum()", props: ["AlbumAPI"], mpEquiv: "wx.chooseMedia/saveImageToPhotosAlbum/previewMedia", tier: "L1", status: "planned" },
|
|
1059
|
+
{ id: "C53", kind: "capability", semantic: "capability.worker", api: "useWorker()", props: ["WorkerHandle"], mpEquiv: "wx.createWorker", tier: "L1", status: "planned" },
|
|
1060
|
+
// ★颗粒度对齐 C3 批 2:收货地址 / WiFi / 微信运动(对齐小程序系统 API——纯 Hook → planned)
|
|
1061
|
+
{ id: "C54", kind: "capability", semantic: "capability.address", api: "useAddress()", props: ["ShippingAddress"], mpEquiv: "wx.chooseAddress", tier: "L1", status: "planned" },
|
|
1062
|
+
{ id: "C55", kind: "capability", semantic: "capability.wifi", api: "useWifi()", props: ["WifiAPI"], mpEquiv: "wx.getConnectedWifi/getWifiList/connectWifi", tier: "L1", status: "planned" },
|
|
1063
|
+
{ id: "C56", kind: "capability", semantic: "capability.we-run", api: "useWeRun()", props: ["WeRunData"], mpEquiv: "wx.getWeRunData", tier: "L1", status: "planned" },
|
|
1064
|
+
// ★组件实例 API 对齐(2026-09-12):画布组件实例(wx.createCanvasContext/SelectorQuery node/canvasToTempFilePath/OffscreenCanvas;纯 Hook → planned)
|
|
1065
|
+
{ id: "C57", kind: "capability", semantic: "capability.canvas", api: "useCanvas()", props: ["CanvasController"], mpEquiv: "wx.createCanvasContext/canvasToTempFilePath/createOffscreenCanvas", tier: "L1", status: "planned" },
|
|
1066
|
+
// ★组件实例 API 对齐(2026-09-12):元素查询 / 交叉观察 / 媒体查询(wx SelectorQuery/IntersectionObserver/MediaQueryObserver)
|
|
1067
|
+
{ id: "C58", kind: "capability", semantic: "capability.element-query", api: "useElement()", props: ["ElementQuery"], mpEquiv: "wx.createSelectorQuery", tier: "L1", status: "planned" },
|
|
1068
|
+
{ id: "C59", kind: "capability", semantic: "capability.intersection", api: "useIntersection()", props: ["IntersectionHandle"], mpEquiv: "wx.createIntersectionObserver", tier: "L1", status: "planned" },
|
|
1069
|
+
{ id: "C60", kind: "capability", semantic: "capability.media-query", api: "useMediaQuery()", props: ["MediaQueryObserver"], mpEquiv: "wx.createMediaQueryObserver", tier: "L1", status: "planned" },
|
|
1070
|
+
// ★组件实例 API 对齐(2026-09-12):媒体组件实例 + 广告(wx VideoContext/InnerAudioContext/LivePusherContext + 广告联盟)
|
|
1071
|
+
{ id: "C61", kind: "capability", semantic: "capability.video", api: "useVideo()", props: ["VideoController"], mpEquiv: "wx.createVideoContext", tier: "L1", status: "planned" },
|
|
1072
|
+
{ id: "C62", kind: "capability", semantic: "capability.audio", api: "useAudio()", props: ["AudioController"], mpEquiv: "wx.createInnerAudioContext", tier: "L1", status: "planned" },
|
|
1073
|
+
{ id: "C63", kind: "capability", semantic: "capability.live-pusher", api: "useLivePusher()", props: ["LivePusherController"], mpEquiv: "wx.createLivePusherContext", tier: "L1", status: "planned" },
|
|
1074
|
+
{ id: "C64", kind: "capability", semantic: "capability.ad", api: "useAd()", props: ["AdAPI"], mpEquiv: "wx.createRewardedVideoAd/createInterstitialAd/createBannerAd", tier: "L1", status: "planned" },
|
|
1075
|
+
// ★权威标尺缺口补齐(2026-09-12):隐私协议(wx.getPrivacySetting/openPrivacyContract/requirePrivacyAuthorize——合规刚需)
|
|
1076
|
+
{ id: "C65", kind: "capability", semantic: "capability.privacy", api: "usePrivacy()", props: ["PrivacyAPI"], mpEquiv: "wx.getPrivacySetting/openPrivacyContract/requirePrivacyAuthorize", tier: "L1", status: "planned" },
|
|
1077
|
+
// ★权威标尺缺口补齐批 D(2026-09-12):性能 / 预加载 / 图像编辑(通用能力,无资质门槛)
|
|
1078
|
+
{ id: "C66", kind: "capability", semantic: "capability.performance", api: "usePerformance()", props: ["PerformanceAPI"], mpEquiv: "wx.getPerformance/reportPerformance", tier: "L1", status: "planned" },
|
|
1079
|
+
{ id: "C67", kind: "capability", semantic: "capability.preload", api: "usePreload()", props: ["PreloadAPI"], mpEquiv: "wx.preloadAssets/preloadSkylineView/preloadWebview/preDownloadSubpackage", tier: "L1", status: "planned" },
|
|
1080
|
+
{ id: "C68", kind: "capability", semantic: "capability.image-edit", api: "useImageEdit()", props: ["ImageEditAPI"], mpEquiv: "wx.cropImage/editImage", tier: "L1", status: "planned" },
|
|
1081
|
+
// ★权威标尺缺口补齐批 E(2026-09-12):网络底层 / 媒体高级
|
|
1082
|
+
{ id: "C69", kind: "capability", semantic: "capability.socket", api: "useSocket()", props: ["UDPSocketHandle / TCPSocketHandle"], mpEquiv: "wx.createUDPSocket/createTCPSocket", tier: "L1", status: "planned" },
|
|
1083
|
+
{ id: "C70", kind: "capability", semantic: "capability.media-processing", api: "useMediaProcessing()", props: ["MediaProcessingAPI"], mpEquiv: "wx.createMediaContainer/createVideoDecoder/createMediaAudioPlayer", tier: "L1", status: "planned" },
|
|
1084
|
+
// ★权威标尺缺口补齐批 F(2026-09-12):录屏/缓存/空闲/窗口/导航拦截
|
|
1085
|
+
{ id: "C71", kind: "capability", semantic: "capability.screen-capture", api: "useScreenCapture()", props: ["ScreenCaptureAPI"], mpEquiv: "wx.getScreenRecordingState/onScreenRecordingStateChanged/onUserCaptureScreen/checkIsPictureInPictureActive", tier: "L1", status: "planned" },
|
|
1086
|
+
{ id: "C72", kind: "capability", semantic: "capability.cache-manager", api: "useCacheManager()", props: ["CacheManagerHandle"], mpEquiv: "wx.createCacheManager", tier: "L1", status: "planned" },
|
|
1087
|
+
{ id: "C73", kind: "capability", semantic: "capability.idle", api: "useIdle()", props: ["IdleAPI"], mpEquiv: "wx.requestIdleCallback/cancelIdleCallback", tier: "L1", status: "planned" },
|
|
1088
|
+
{ id: "C74", kind: "capability", semantic: "capability.window", api: "useWindow()", props: ["WindowAPI"], mpEquiv: "wx.setWindowSize", tier: "L1", status: "planned" },
|
|
1089
|
+
{ id: "C75", kind: "capability", semantic: "capability.navigation-guard", api: "useNavigationGuard()", props: ["NavigationGuardAPI"], mpEquiv: "wx.enableAlertBeforeUnload/disableAlertBeforeUnload", tier: "L1", status: "planned" },
|
|
1090
|
+
// ★权威标尺缺口补齐批 G(2026-09-12):AR/XR / iBeacon / 局域网 / 翻译 / 海报 / 设备探测
|
|
1091
|
+
{ id: "C76", kind: "capability", semantic: "capability.ar", api: "useAR()", props: ["ARAPI"], mpEquiv: "wx.createVKSession/isVKSupport", tier: "L1", status: "planned" },
|
|
1092
|
+
{ id: "C77", kind: "capability", semantic: "capability.beacon", api: "useBeacon()", props: ["BeaconAPI"], mpEquiv: "wx.onBeaconServiceChange/onBeaconUpdate", tier: "L1", status: "planned" },
|
|
1093
|
+
{ id: "C78", kind: "capability", semantic: "capability.local-service", api: "useLocalService()", props: ["LocalServiceAPI"], mpEquiv: "wx.onLocalServiceFound/Lost/ResolveFail/DiscoveryStop", tier: "L1", status: "planned" },
|
|
1094
|
+
{ id: "C79", kind: "capability", semantic: "capability.translation", api: "useTranslation()", props: ["TranslationAPI"], mpEquiv: "wx.onUserTriggerTranslation/onUserOffTranslation", tier: "L1", status: "planned" },
|
|
1095
|
+
{ id: "C80", kind: "capability", semantic: "capability.poster", api: "usePoster()", props: ["PosterAPI"], mpEquiv: "wx.onGeneratePoster", tier: "L1", status: "planned" },
|
|
1096
|
+
{ id: "C81", kind: "capability", semantic: "capability.device-capability", api: "useDeviceCapability()", props: ["DeviceCapabilityAPI"], mpEquiv: "wx.checkDeviceSupportHevc", tier: "L1", status: "planned" }
|
|
873
1097
|
];
|
|
874
1098
|
var ENGINEERING = [
|
|
875
1099
|
{ id: "E1", kind: "engineering", semantic: "engineering.state", api: "useState()", mpEquiv: "data", tier: "L1", status: "planned" },
|
|
@@ -879,7 +1103,8 @@ var ENGINEERING = [
|
|
|
879
1103
|
{ id: "E5", kind: "engineering", semantic: "engineering.provide-inject", api: "useProvide()/useInject()", mpEquiv: "\u65E0", tier: "L1", status: "planned" },
|
|
880
1104
|
{ id: "E6", kind: "engineering", semantic: "engineering.lifecycle", api: "useLifecycle()", mpEquiv: "onLoad/onShow/onHide/onUnload", tier: "L1", status: "planned" },
|
|
881
1105
|
{ id: "E7", kind: "engineering", semantic: "engineering.ready", api: "useReady()", mpEquiv: "onReady", tier: "L1", status: "planned" },
|
|
882
|
-
{ id: "E8", kind: "engineering", semantic: "engineering.error-boundary", api: "useErrorBoundary()", mpEquiv: "onError", tier: "L1", status: "planned" },
|
|
1106
|
+
{ id: "E8", kind: "engineering", semantic: "engineering.error-boundary", api: "useErrorBoundary()", tag: "p-error-boundary", mpEquiv: "onError", tier: "L1", status: "planned" },
|
|
1107
|
+
// ★#405:组件形态补登(双形态:Hook + p- 标签)
|
|
883
1108
|
{ id: "E9", kind: "engineering", semantic: "engineering.page-param", api: "usePageParam()", mpEquiv: "onLoad(options)", tier: "L1", status: "planned" },
|
|
884
1109
|
{ id: "E10", kind: "engineering", semantic: "engineering.route", api: "useRoute()", mpEquiv: "getCurrentPages()", tier: "L1", status: "planned" },
|
|
885
1110
|
{ id: "E11", kind: "engineering", semantic: "engineering.router-push", api: "router.push()", mpEquiv: "wx.navigateTo", tier: "L1", status: "planned" },
|
|
@@ -889,7 +1114,7 @@ var ENGINEERING = [
|
|
|
889
1114
|
{ id: "E15", kind: "engineering", semantic: "engineering.router-relaunch", api: "router.reLaunch()", mpEquiv: "wx.reLaunch", tier: "L1", status: "planned" },
|
|
890
1115
|
{ id: "E16", kind: "engineering", semantic: "engineering.router-before-each", api: "router.beforeEach()", mpEquiv: "onLaunch \u624B\u52A8", tier: "L1", status: "planned" },
|
|
891
1116
|
{ id: "E17", kind: "engineering", semantic: "engineering.router-after-each", api: "router.afterEach()", mpEquiv: "\u65E0", tier: "L1", status: "planned" },
|
|
892
|
-
{ id: "E18", kind: "engineering", semantic: "engineering.router-link", tag: "p-router-link", props: ["to", "replace", "switchTab"], mpEquiv: "<navigator>", tier: "L1", status: "implemented" },
|
|
1117
|
+
{ id: "E18", kind: "engineering", semantic: "engineering.router-link", tag: "p-router-link", props: ["to", "replace", "switchTab", "target", "url", "openType", "delta", "appId", "path", "extraData", "version", "shortLink", "hoverClass", "hoverStopPropagation", "hoverStartTime", "hoverStayTime"], mpEquiv: "<navigator>", tier: "L1", status: "implemented" },
|
|
893
1118
|
{ id: "E19", kind: "engineering", semantic: "engineering.transition", tag: "p-transition", props: ["name", "mode"], mpEquiv: "transition CSS", tier: "L1", status: "implemented" },
|
|
894
1119
|
{ id: "E20", kind: "engineering", semantic: "engineering.animate", tag: "p-animate", props: ["keyframes", "duration"], mpEquiv: "animation CSS", tier: "L1", status: "implemented" },
|
|
895
1120
|
{ id: "E21", kind: "engineering", semantic: "engineering.animation", api: "useAnimation()", mpEquiv: "wx.createAnimation", tier: "L1", status: "planned" },
|
|
@@ -919,7 +1144,7 @@ function primitiveByTag(tag) {
|
|
|
919
1144
|
}
|
|
920
1145
|
function checkPrimitiveCatalog() {
|
|
921
1146
|
const errors = [];
|
|
922
|
-
if (PRIMITIVE_CATALOG.length
|
|
1147
|
+
if (PRIMITIVE_CATALOG.length === 0) errors.push("\u6E05\u5355\u4E3A\u7A7A");
|
|
923
1148
|
const ids = new Set(PRIMITIVE_CATALOG.map((p) => p.id));
|
|
924
1149
|
if (ids.size !== PRIMITIVE_CATALOG.length) errors.push("id \u91CD\u590D");
|
|
925
1150
|
const sems = new Set(PRIMITIVE_CATALOG.map((p) => p.semantic));
|
|
@@ -979,10 +1204,10 @@ var MP_COMPONENTS = [
|
|
|
979
1204
|
{ mp: "<swiper-item>", proteus: "layout.stack \u5B50\u9879", status: "ok", group: "component" },
|
|
980
1205
|
{ mp: "<movable-area>", proteus: "gesture.scrollable \u5BB9\u5668", status: "ok", group: "component" },
|
|
981
1206
|
{ mp: "<movable-view>", proteus: "gesture.draggable", status: "ok", group: "component" },
|
|
982
|
-
{ mp: "<cover-view>", proteus: "
|
|
983
|
-
{ mp: "<cover-image>", proteus: "
|
|
1207
|
+
{ mp: "<cover-view>", proteus: "layout.box\uFF08Skyline \u540C\u5C42\u6E32\u67D3\u540E view \u5373\u53EF\u8986\u76D6\u2014\u2014\u5B98\u65B9\u5EFA\u8BAE\u66FF\u4EE3\uFF09", status: "ok", group: "component" },
|
|
1208
|
+
{ mp: "<cover-image>", proteus: "ui.image\uFF08\u540C\u5C42\u6E32\u67D3\u540E image \u5373\u53EF\u8986\u76D6\uFF09", status: "ok", group: "component" },
|
|
984
1209
|
{ mp: "<icon>", proteus: "ui.icon", status: "ok", group: "component" },
|
|
985
|
-
{ mp: "<progress>", proteus: "
|
|
1210
|
+
{ mp: "<progress>", proteus: "ui.progress", status: "ok", group: "component" },
|
|
986
1211
|
{ mp: "<rich-text>", proteus: "ui.rich-text", status: "ok", group: "component" },
|
|
987
1212
|
{ mp: "<button>", proteus: "ui.button", status: "ok", group: "component" },
|
|
988
1213
|
{ mp: "<form>", proteus: "ui.form", status: "ok", group: "component" },
|
|
@@ -994,56 +1219,103 @@ var MP_COMPONENTS = [
|
|
|
994
1219
|
{ mp: "<picker-view>", proteus: "ui.picker mode=wheel", status: "ok", group: "component" },
|
|
995
1220
|
{ mp: "<slider>", proteus: "ui.slider", status: "ok", group: "component" },
|
|
996
1221
|
{ mp: "<switch>", proteus: "ui.switch", status: "ok", group: "component" },
|
|
997
|
-
{ mp: "<label>", proteus: "
|
|
1222
|
+
{ mp: "<label>", proteus: "ui.label", status: "ok", group: "component" },
|
|
998
1223
|
{ mp: "<navigator>", proteus: "engineering.router-link / router.*", status: "ok", group: "component" },
|
|
999
1224
|
{ mp: "<audio>", proteus: "ui.media kind=audio\uFF08\u6D88\u706D\u4E3A\u5C5E\u6027\uFF09", status: "ok", group: "component" },
|
|
1000
1225
|
{ mp: "<video>", proteus: "ui.media kind=video\uFF08\u6D88\u706D\u4E3A\u5C5E\u6027\uFF09", status: "ok", group: "component" },
|
|
1001
|
-
{ mp: "<camera>", proteus: "
|
|
1226
|
+
{ mp: "<camera>", proteus: "ui.camera\uFF08p-camera\uFF09+ useCamera", status: "ok", group: "component" },
|
|
1002
1227
|
{ mp: "<live-player>", proteus: "ui.media kind=live\uFF08\u6D88\u706D\u4E3A\u5C5E\u6027\uFF09", status: "ok", group: "component" },
|
|
1003
1228
|
{ mp: "<live-pusher>", proteus: "ui.media kind=live mode=push", status: "ok", group: "component" },
|
|
1004
1229
|
{ mp: "<canvas>", proteus: "ui.canvas", status: "ok", group: "component" },
|
|
1005
|
-
{ mp: "<map>", proteus: "
|
|
1006
|
-
{ mp: "<web-view>", proteus: "
|
|
1230
|
+
{ mp: "<map>", proteus: "ui.map\uFF08p-map\uFF09+ useMap", status: "ok", group: "component" },
|
|
1231
|
+
{ mp: "<web-view>", proteus: "shell.webview\uFF08p-webview\uFF09+ \u5BBF\u4E3B\u6865", status: "ok", group: "component" },
|
|
1007
1232
|
{ mp: "<editor>", proteus: "ui.rich-text editable", status: "ok", group: "component" },
|
|
1008
|
-
{ mp: "<ad>", proteus: "
|
|
1009
|
-
{ mp: "<official-account>", proteus: "
|
|
1010
|
-
{ mp: "<open-data>", proteus: "
|
|
1011
|
-
{ mp: "<share-element>", proteus: "p-share-element
|
|
1012
|
-
{ mp: "<aria-component>", proteus: "
|
|
1013
|
-
{ mp: "<page-container>", proteus: "
|
|
1014
|
-
{ mp: "<voip-room>", proteus: "
|
|
1015
|
-
{ mp: "<guild-room>", proteus: "
|
|
1233
|
+
{ mp: "<ad>", proteus: "shell.ad\uFF08p-ad\uFF09", status: "ok", group: "component" },
|
|
1234
|
+
{ mp: "<official-account>", proteus: "useMiniProgram\uFF08\u5FAE\u4FE1\u79C1\u6709\uFF09", status: "private", group: "component" },
|
|
1235
|
+
{ mp: "<open-data>", proteus: "useMiniProgram\uFF08\u5FAE\u4FE1\u79C1\u6709\uFF09", status: "private", group: "component" },
|
|
1236
|
+
{ mp: "<share-element>", proteus: "p-share-element\uFF08L2 \u89C4\u5212\uFF09", status: "compat", group: "component", planned: true },
|
|
1237
|
+
{ mp: "<aria-component>", proteus: "aria-* \u5C5E\u6027\uFF08\u5404\u7EC4\u4EF6 ariaLabel\uFF1B\u4E24\u7AEF\u539F\u751F\u652F\u6301\uFF09", status: "ok", group: "component" },
|
|
1238
|
+
{ mp: "<page-container>", proteus: "shell.page-container", status: "ok", group: "component" },
|
|
1239
|
+
{ mp: "<voip-room>", proteus: "useMiniProgram\uFF08\u5FAE\u4FE1 VOIP\uFF09", status: "private", group: "component" },
|
|
1240
|
+
{ mp: "<guild-room>", proteus: "useMiniProgram\uFF08\u5FAE\u4FE1\u6E38\u620F\uFF09", status: "private", group: "component" },
|
|
1241
|
+
// ★2026-09-11 补齐:此前矩阵漏列的真实微信内置组件(Skyline 族为主)——有等价能力标 ok/compat,无则 missing
|
|
1242
|
+
{ mp: "<match-media>", proteus: "p-adaptive / p-zone\uFF08\u5BB9\u5668\u65AD\u70B9\u66FF\u4EE3\uFF09", status: "ok", group: "component" },
|
|
1243
|
+
{ mp: "<navigation-bar>", proteus: "shell.nav\uFF08p-nav-bar \u81EA\u7ED8\uFF09", status: "ok", group: "component" },
|
|
1244
|
+
{ mp: "<keyframe-animation>", proteus: "engineering.animate / engineering.transition", status: "ok", group: "component" },
|
|
1245
|
+
{ mp: "<list-view>", proteus: "layout.virtual-list\uFF08p-list-view \u56DE\u6536\uFF09", status: "ok", group: "component" },
|
|
1246
|
+
{ mp: "<grid-view>", proteus: "layout.grid / layout.virtual-list", status: "ok", group: "component" },
|
|
1247
|
+
{ mp: "<snapshot>", proteus: "ui.canvas\uFF08\u622A\u56FE\u7ECF OffscreenCanvas\uFF09", status: "compat", group: "component" },
|
|
1248
|
+
{ mp: "<page-meta>", proteus: "shell.page\uFF08\u9875\u9762\u914D\u7F6E\u5C5E\u6027\uFF09", status: "compat", group: "component" },
|
|
1249
|
+
{ mp: "<root-portal>", proteus: "engineering.transition\uFF08teleport\u2192root-portal \u7F16\u8BD1\u671F\uFF09", status: "ok", group: "component" },
|
|
1250
|
+
{ mp: "<sticky-header>", proteus: "layout.scroll + sticky\uFF08CSS\uFF09", status: "compat", group: "component" },
|
|
1251
|
+
{ mp: "<sticky-section>", proteus: "layout.scroll + sticky\uFF08CSS\uFF09", status: "compat", group: "component" },
|
|
1252
|
+
{ mp: "<double-tap-gesture>", proteus: "gesture.draggable\uFF08p-draggable \u624B\u52BF\u8BC6\u522B\u5668\uFF09", status: "ok", group: "component" },
|
|
1253
|
+
{ mp: "<functional-page-navigator>", proteus: "\u2014\uFF08\u5FAE\u4FE1\u63D2\u4EF6\u9875\u4E13\u5C5E\uFF0C\u975E\u76EE\u6807\uFF09", status: "private", group: "component" },
|
|
1254
|
+
{ mp: "<open-container>", proteus: "\u2014\uFF08\u5FAE\u4FE1\u5F00\u5C4F\u5BB9\u5668\uFF0C\u79C1\u6709\uFF09", status: "private", group: "component" },
|
|
1255
|
+
// ★权威标尺批 H:局部文本选区 / 键盘上方工具栏(全端真实落地)
|
|
1256
|
+
{ mp: "<selection>", proteus: "ui.selection\uFF08p-selection\uFF09", status: "ok", group: "component" },
|
|
1257
|
+
{ mp: "<keyboard-accessory>", proteus: "shell.keyboard-accessory\uFF08p-keyboard-accessory\uFF09", status: "ok", group: "component" }
|
|
1016
1258
|
];
|
|
1017
1259
|
var MP_API_GROUPS = [
|
|
1018
|
-
{ mp: "wx.request/upload/download/websocket\uFF08\u7F51\u7EDC\uFF09", proteus: "
|
|
1019
|
-
{ mp: "wx.requestPayment", proteus: "
|
|
1020
|
-
{ mp: "wx.chooseImage/chooseMedia/previewImage\uFF08\u5A92\u4F53\uFF09", proteus: "
|
|
1021
|
-
{ mp: "wx.startRecord/RecorderManager\uFF08\u5F55\u97F3\uFF09", proteus: "
|
|
1022
|
-
{ mp: "wx.createVideoContext/CameraContext", proteus: "
|
|
1023
|
-
{ mp: "wx.scanCode", proteus: "
|
|
1024
|
-
{ mp: "wx.saveImageToPhotosAlbum", proteus: "
|
|
1025
|
-
{ mp: "wx.
|
|
1026
|
-
{ mp: "wx.
|
|
1027
|
-
{ mp: "wx.
|
|
1028
|
-
{ mp: "wx.
|
|
1029
|
-
|
|
1030
|
-
{ mp: "wx.
|
|
1031
|
-
{ mp: "wx.
|
|
1032
|
-
{ mp: "wx.
|
|
1033
|
-
{ mp: "wx.
|
|
1034
|
-
{ mp: "wx.
|
|
1260
|
+
{ mp: "wx.request/upload/download/websocket\uFF08\u7F51\u7EDC\uFF09", proteus: "useFetch / useUpload / useDownload / useWebSocket / useSocketTask", status: "ok", group: "api" },
|
|
1261
|
+
{ mp: "wx.requestPayment", proteus: "usePayment", status: "ok", group: "api" },
|
|
1262
|
+
{ mp: "wx.chooseImage/chooseMedia/previewImage\uFF08\u5A92\u4F53\uFF09", proteus: "useAlbum / useCamera + ui.image", status: "ok", group: "api" },
|
|
1263
|
+
{ mp: "wx.startRecord/RecorderManager\uFF08\u5F55\u97F3\uFF09", proteus: "useMicrophone / useRecorder", status: "ok", group: "api" },
|
|
1264
|
+
{ mp: "wx.createVideoContext/CameraContext", proteus: "ui.media + createCameraContext\uFF08ui.canvas \u627F\u63A5\uFF09", status: "ok", group: "api" },
|
|
1265
|
+
{ mp: "wx.scanCode", proteus: "useQRCode / p-scan-qr", status: "ok", group: "api" },
|
|
1266
|
+
{ mp: "wx.saveImageToPhotosAlbum/saveVideoToPhotosAlbum", proteus: "useAlbum\uFF08saveImage/saveVideo\uFF09", status: "ok", group: "api" },
|
|
1267
|
+
{ mp: "wx.createWorker\uFF08\u591A\u7EBF\u7A0B\uFF09", proteus: "useWorker", status: "ok", group: "api" },
|
|
1268
|
+
{ mp: "wx.chooseAddress\uFF08\u6536\u8D27\u5730\u5740\uFF09", proteus: "useAddress", status: "ok", group: "api" },
|
|
1269
|
+
{ mp: "wx.getConnectedWifi/getWifiList/connectWifi\uFF08WiFi\uFF09", proteus: "useWifi", status: "ok", group: "api" },
|
|
1270
|
+
{ mp: "wx.getWeRunData\uFF08\u5FAE\u4FE1\u8FD0\u52A8\uFF09", proteus: "useWeRun", status: "ok", group: "api" },
|
|
1271
|
+
// ★组件实例 API 对齐(2026-09-12):Canvas/查询/媒体组件实例(此前矩阵误标 useElement/useIntersection/useMedia——均为幽灵引用)
|
|
1272
|
+
{ mp: "wx.createCanvasContext / canvasToTempFilePath / createOffscreenCanvas\uFF08Canvas \u7EC4\u4EF6\u5B9E\u4F8B\uFF09", proteus: "useCanvas", status: "ok", group: "api" },
|
|
1273
|
+
{ mp: "wx.createSelectorQuery\uFF08\u5143\u7D20\u51E0\u4F55\u67E5\u8BE2\uFF09", proteus: "useElement", status: "ok", group: "api" },
|
|
1274
|
+
{ mp: "wx.createIntersectionObserver\uFF08\u4EA4\u53C9\u89C2\u5BDF\uFF09", proteus: "useIntersection", status: "ok", group: "api" },
|
|
1275
|
+
{ mp: "wx.createMediaQueryObserver\uFF08\u5A92\u4F53\u67E5\u8BE2\uFF09", proteus: "useMediaQuery", status: "ok", group: "api" },
|
|
1276
|
+
{ mp: "wx.createVideoContext\uFF08\u89C6\u9891\u7EC4\u4EF6\u5B9E\u4F8B\uFF09", proteus: "useVideo", status: "ok", group: "api" },
|
|
1277
|
+
{ mp: "wx.createInnerAudioContext\uFF08\u97F3\u9891\u5B9E\u4F8B\uFF09", proteus: "useAudio", status: "ok", group: "api" },
|
|
1278
|
+
{ mp: "wx.createLivePusherContext\uFF08\u76F4\u64AD\u63A8\u6D41\u5B9E\u4F8B\uFF09", proteus: "useLivePusher", status: "ok", group: "api" },
|
|
1279
|
+
{ mp: "wx.createRewardedVideoAd/createInterstitialAd/createBannerAd\uFF08\u5E7F\u544A\uFF09", proteus: "useAd", status: "ok", group: "api" },
|
|
1280
|
+
{ mp: "wx.getPrivacySetting/openPrivacyContract/requirePrivacyAuthorize\uFF08\u9690\u79C1\u534F\u8BAE\uFF09", proteus: "usePrivacy", status: "ok", group: "api" },
|
|
1281
|
+
{ mp: "wx.getPerformance/reportPerformance\uFF08\u6027\u80FD\uFF09", proteus: "usePerformance", status: "ok", group: "api" },
|
|
1282
|
+
{ mp: "wx.preloadAssets/preloadSkylineView/preloadWebview/preDownloadSubpackage\uFF08\u9884\u52A0\u8F7D\uFF09", proteus: "usePreload", status: "ok", group: "api" },
|
|
1283
|
+
{ mp: "wx.cropImage/editImage\uFF08\u56FE\u50CF\u7F16\u8F91\uFF09", proteus: "useImageEdit", status: "ok", group: "api" },
|
|
1284
|
+
{ mp: "wx.createUDPSocket/createTCPSocket\uFF08\u7F51\u7EDC\u5E95\u5C42 Socket\uFF09", proteus: "useSocket", status: "ok", group: "api" },
|
|
1285
|
+
{ mp: "wx.createMediaContainer/createVideoDecoder/createMediaAudioPlayer\uFF08\u5A92\u4F53\u9AD8\u7EA7\uFF09", proteus: "useMediaProcessing", status: "ok", group: "api" },
|
|
1286
|
+
{ mp: "wx.getScreenRecordingState/onScreenRecordingStateChanged/onUserCaptureScreen/checkIsPictureInPictureActive\uFF08\u5F55\u5C4F/\u622A\u5C4F\uFF09", proteus: "useScreenCapture", status: "ok", group: "api" },
|
|
1287
|
+
{ mp: "wx.createCacheManager\uFF08\u8BF7\u6C42\u7F13\u5B58\u7BA1\u7406\uFF09", proteus: "useCacheManager", status: "ok", group: "api" },
|
|
1288
|
+
{ mp: "wx.requestIdleCallback/cancelIdleCallback\uFF08\u7A7A\u95F2\u8C03\u5EA6\uFF09", proteus: "useIdle", status: "ok", group: "api" },
|
|
1289
|
+
{ mp: "wx.setWindowSize\uFF08PC \u7A97\u53E3\uFF09", proteus: "useWindow", status: "ok", group: "api" },
|
|
1290
|
+
{ mp: "wx.enableAlertBeforeUnload/disableAlertBeforeUnload\uFF08\u5378\u8F7D\u62E6\u622A\uFF09", proteus: "useNavigationGuard", status: "ok", group: "api" },
|
|
1291
|
+
{ mp: "wx.createVKSession/isVKSupport\uFF08AR/XR \u89C6\u89C9\u7B97\u6CD5\uFF09", proteus: "useAR", status: "ok", group: "api" },
|
|
1292
|
+
{ mp: "wx.onBeaconServiceChange/onBeaconUpdate\uFF08iBeacon\uFF09", proteus: "useBeacon", status: "ok", group: "api" },
|
|
1293
|
+
{ mp: "wx.onLocalServiceFound/Lost/ResolveFail/DiscoveryStop\uFF08\u5C40\u57DF\u7F51 mDNS\uFF09", proteus: "useLocalService", status: "ok", group: "api" },
|
|
1294
|
+
{ mp: "wx.onUserTriggerTranslation/onUserOffTranslation\uFF08\u7FFB\u8BD1\uFF09", proteus: "useTranslation", status: "ok", group: "api" },
|
|
1295
|
+
{ mp: "wx.onGeneratePoster\uFF08\u5206\u4EAB\u6D77\u62A5\uFF09", proteus: "usePoster", status: "ok", group: "api" },
|
|
1296
|
+
{ mp: "wx.checkDeviceSupportHevc\uFF08\u8BBE\u5907\u80FD\u529B\u63A2\u6D4B\uFF09", proteus: "useDeviceCapability", status: "ok", group: "api" },
|
|
1297
|
+
{ mp: "wx.getFileSystemManager/*\uFF08\u6587\u4EF6 30+\uFF09", proteus: "useFileSystem", status: "ok", group: "api" },
|
|
1298
|
+
{ mp: "wx.compressFile/unzip", proteus: "useArchive", status: "ok", group: "api" },
|
|
1299
|
+
{ mp: "wx.set/get/remove/clearStorage(+Sync)", proteus: "useStorage", status: "ok", group: "api" },
|
|
1300
|
+
{ mp: "wx.getLocation/chooseLocation/openLocation", proteus: "useLocation / p-location", status: "ok", group: "api" },
|
|
1301
|
+
{ mp: "wx.createMapContext", proteus: "useMap", status: "ok", group: "api" },
|
|
1302
|
+
{ mp: "wx.getSystemInfo\uFF08\u8BBE\u5907/\u5C4F\u5E55/\u7F51\u7EDC/\u7535\u91CF/\u4EAE\u5EA6/\u65B9\u5411/\u9707\u52A8/\u4F20\u611F\u5668/\u526A\u8D34\u677F/\u7535\u8BDD\uFF09", proteus: "useDevice / useScreen / useNetwork / useBattery / useBrightness / useOrientation / useVibrate / useSensor / useClipboard / usePhoneCall", status: "ok", group: "api" },
|
|
1303
|
+
{ mp: "wx.openBluetoothAdapter\uFF08\u84DD\u7259 20+\uFF09", proteus: "useBluetooth", status: "ok", group: "api" },
|
|
1304
|
+
{ mp: "wx.getHCEState\uFF08NFC\uFF09", proteus: "useNFC", status: "ok", group: "api" },
|
|
1305
|
+
{ mp: "wx.checkIsSupportFingerPrint/FaceID", proteus: "useBiometric / useFaceID", status: "ok", group: "api" },
|
|
1306
|
+
{ mp: "wx.showToast/showLoading/showModal/showActionSheet", proteus: "shell.toast + ui.loading + shell.modal + shell.action-sheet", status: "ok", group: "api" },
|
|
1035
1307
|
{ mp: "wx.setNavigationBarTitle/Color", proteus: "shell.nav", status: "ok", group: "api" },
|
|
1036
1308
|
{ mp: "wx.setTabBarItem/Style/hide/show", proteus: "shell.tabbar", status: "ok", group: "api" },
|
|
1037
|
-
{ mp: "wx.pageScrollTo", proteus: "
|
|
1038
|
-
{ mp: "wx.createAnimation", proteus: "engineering.
|
|
1039
|
-
{ mp: "wx.createSelectorQuery/IntersectionObserver", proteus: "
|
|
1040
|
-
{ mp: "wx.navigateTo/redirectTo/navigateBack/switchTab/reLaunch", proteus: "engineering.router-
|
|
1041
|
-
{ mp: "wx.getCurrentPages", proteus: "engineering.
|
|
1042
|
-
{ mp: "App()/Page() \u751F\u547D\u5468\u671F/getApp()", proteus: "
|
|
1043
|
-
{ mp: "wx.shareAppMessage/requestSubscribeMessage", proteus: "
|
|
1044
|
-
{ mp: "wx.login/checkSession/getUserInfo/authorize", proteus: "
|
|
1045
|
-
{ mp: "wx.getUpdateManager", proteus: "
|
|
1046
|
-
{ mp: "wx.requestWeChatPay/navigateToMiniProgram/\u6A21\u677F\u6D88\u606F/\u5BA2\u670D\uFF08\u5FAE\u4FE1\u79C1\u6709\uFF09", proteus: "
|
|
1309
|
+
{ mp: "wx.pageScrollTo", proteus: "layout.scroll\uFF08p-scroll-view\uFF09", status: "ok", group: "api" },
|
|
1310
|
+
{ mp: "wx.createAnimation", proteus: "engineering.animate / engineering.transition", status: "ok", group: "api" },
|
|
1311
|
+
{ mp: "wx.createSelectorQuery/IntersectionObserver", proteus: "engineering.router-link + layout.scroll\uFF08\u5B9E\u6D4B\u80FD\u529B\uFF09", status: "ok", group: "api" },
|
|
1312
|
+
{ mp: "wx.navigateTo/redirectTo/navigateBack/switchTab/reLaunch", proteus: "engineering.router-link + router.* API", status: "ok", group: "api" },
|
|
1313
|
+
{ mp: "wx.getCurrentPages", proteus: "engineering.router-link + shared adapter", status: "ok", group: "api" },
|
|
1314
|
+
{ mp: "App()/Page() \u751F\u547D\u5468\u671F/getApp()", proteus: "useAppLifecycle / usePageLifecycle", status: "ok", group: "api" },
|
|
1315
|
+
{ mp: "wx.shareAppMessage/requestSubscribeMessage", proteus: "useShare / useNotification", status: "ok", group: "api" },
|
|
1316
|
+
{ mp: "wx.login/checkSession/getUserInfo/authorize", proteus: "useLogin / useAuth / usePermission", status: "ok", group: "api" },
|
|
1317
|
+
{ mp: "wx.getUpdateManager", proteus: "useUpdate", status: "ok", group: "api" },
|
|
1318
|
+
{ mp: "wx.requestWeChatPay/navigateToMiniProgram/\u6A21\u677F\u6D88\u606F/\u5BA2\u670D\uFF08\u5FAE\u4FE1\u79C1\u6709\uFF09", proteus: "useMiniProgram", status: "private", group: "api" }
|
|
1047
1319
|
];
|
|
1048
1320
|
var MP_MAPPING_MATRIX = [...MP_COMPONENTS, ...MP_API_GROUPS];
|
|
1049
1321
|
function auditMiniprogramCoverage(matrix = MP_MAPPING_MATRIX) {
|
|
@@ -1052,6 +1324,7 @@ function auditMiniprogramCoverage(matrix = MP_MAPPING_MATRIX) {
|
|
|
1052
1324
|
const ok = matrix.filter((i) => i.status === "ok").length;
|
|
1053
1325
|
const compat = matrix.filter((i) => i.status === "compat").length;
|
|
1054
1326
|
const priv = matrix.filter((i) => i.status === "private").length;
|
|
1327
|
+
const planned = matrix.filter((i) => i.planned === true).length;
|
|
1055
1328
|
const total = matrix.length;
|
|
1056
1329
|
return {
|
|
1057
1330
|
total,
|
|
@@ -1059,11 +1332,40 @@ function auditMiniprogramCoverage(matrix = MP_MAPPING_MATRIX) {
|
|
|
1059
1332
|
compat,
|
|
1060
1333
|
private: priv,
|
|
1061
1334
|
missing: missingItems.length,
|
|
1335
|
+
planned,
|
|
1336
|
+
landed: total - priv - missingItems.length - planned,
|
|
1062
1337
|
percent: total === 0 ? 0 : Math.round((total - missingItems.length) / total * 100),
|
|
1063
1338
|
pass: missingItems.length === 0,
|
|
1064
1339
|
missingItems
|
|
1065
1340
|
};
|
|
1066
1341
|
}
|
|
1342
|
+
function auditMatrixReferences(matrix = MP_MAPPING_MATRIX, knownHooks = /* @__PURE__ */ new Set()) {
|
|
1343
|
+
const issues = [];
|
|
1344
|
+
const tags = new Set(Object.keys(TAG_SEMANTIC_MAP));
|
|
1345
|
+
const semantics = new Set(SEMANTIC_ENUM);
|
|
1346
|
+
let plannedRefs = 0;
|
|
1347
|
+
for (const it of matrix) {
|
|
1348
|
+
if (it.status === "missing") continue;
|
|
1349
|
+
for (const m of it.proteus.matchAll(/\bp-[a-z][\w-]*/g)) {
|
|
1350
|
+
if (tags.has(m[0])) continue;
|
|
1351
|
+
if (it.planned) {
|
|
1352
|
+
plannedRefs++;
|
|
1353
|
+
continue;
|
|
1354
|
+
}
|
|
1355
|
+
issues.push({ mp: it.mp, ref: m[0], kind: "component" });
|
|
1356
|
+
}
|
|
1357
|
+
for (const m of it.proteus.matchAll(/\b(?:layout|ui|shell|gesture|capability|engineering)\.[a-z][\w-]*/g)) {
|
|
1358
|
+
if (semantics.has(m[0])) continue;
|
|
1359
|
+
issues.push({ mp: it.mp, ref: m[0], kind: "semantic" });
|
|
1360
|
+
}
|
|
1361
|
+
if (knownHooks.size) {
|
|
1362
|
+
for (const m of it.proteus.matchAll(/\buse[A-Z]\w*/g)) {
|
|
1363
|
+
if (!knownHooks.has(m[0])) issues.push({ mp: it.mp, ref: m[0], kind: "hook" });
|
|
1364
|
+
}
|
|
1365
|
+
}
|
|
1366
|
+
}
|
|
1367
|
+
return { issues, plannedRefs };
|
|
1368
|
+
}
|
|
1067
1369
|
function auditCatalogConsistency() {
|
|
1068
1370
|
const issues = [];
|
|
1069
1371
|
const enumSet = new Set(SEMANTIC_ENUM);
|
|
@@ -1102,7 +1404,8 @@ function auditCatalogConsistency() {
|
|
|
1102
1404
|
function formatCoverageReport(report) {
|
|
1103
1405
|
const lines = [
|
|
1104
1406
|
`G-32.1 \u5C0F\u7A0B\u5E8F\u80FD\u529B\u8986\u76D6\u5BA1\u8BA1\uFF1A`,
|
|
1105
|
-
` \u603B\u8BA1 ${report.total} \xB7 \u2705
|
|
1407
|
+
` \u603B\u8BA1 ${report.total} \xB7 \u2705 \u6709\u7B49\u4EF7 ${report.total - report.missing}\uFF08L1 \u539F\u8BED ${report.ok} + \u517C\u5BB9\u7B49\u4EF7 ${report.compat - report.planned}\uFF09\xB7 \u2B1B \u79C1\u6709 ${report.private} \xB7 \u274C \u7F3A\u5931 ${report.missing}`,
|
|
1408
|
+
` \u2605\u771F\xB7\u5DF2\u843D\u5730 ${report.landed} \xB7 \u{1F4CB} L2 \u89C4\u5212\u5F85\u843D\u5730 ${report.planned}\uFF08\u8BA1\u4F5C\u8986\u76D6\uFF0C\u975E\u5DF2\u5B9E\u73B0\u2014\u2014\u8BDA\u5B9E\u8FB9\u754C\uFF09`,
|
|
1106
1409
|
` \u8986\u76D6\u7387 ${report.percent}% ${report.pass ? "\u2705 \u8FBE\u6807\uFF080 \u7F3A\u5931\uFF09" : "\u274C \u672A\u8FBE\u6807\uFF08CI \u7EA2\uFF09"}`
|
|
1107
1410
|
];
|
|
1108
1411
|
if (report.missingItems.length) {
|
|
@@ -1111,6 +1414,499 @@ function formatCoverageReport(report) {
|
|
|
1111
1414
|
}
|
|
1112
1415
|
return lines.join("\n");
|
|
1113
1416
|
}
|
|
1417
|
+
|
|
1418
|
+
// src/mp-spec-coverage.ts
|
|
1419
|
+
var SPEC_COVERED = {
|
|
1420
|
+
// 网络(既有 Hook 承接)
|
|
1421
|
+
onSocketOpen: "useSocketTask/useWebSocket",
|
|
1422
|
+
onSocketClose: "useSocketTask/useWebSocket",
|
|
1423
|
+
onSocketError: "useSocketTask/useWebSocket",
|
|
1424
|
+
onSocketMessage: "useSocketTask/useWebSocket",
|
|
1425
|
+
offSocketOpen: "useSocketTask/useWebSocket",
|
|
1426
|
+
offSocketClose: "useSocketTask/useWebSocket",
|
|
1427
|
+
offSocketError: "useSocketTask/useWebSocket",
|
|
1428
|
+
offSocketMessage: "useSocketTask/useWebSocket",
|
|
1429
|
+
// 存储(同步/批量)
|
|
1430
|
+
batchGetStorageSync: "useStorage",
|
|
1431
|
+
batchSetStorageSync: "useStorage",
|
|
1432
|
+
removeStorageSync: "useStorage",
|
|
1433
|
+
// 设备/系统信息(新版拆分)
|
|
1434
|
+
getAccountInfoSync: "useDevice",
|
|
1435
|
+
getAppBaseInfo: "useDevice",
|
|
1436
|
+
getDeviceInfo: "useDevice",
|
|
1437
|
+
getWindowInfo: "useScreen",
|
|
1438
|
+
getSystemSetting: "usePermission",
|
|
1439
|
+
getAppAuthorizeSetting: "usePermission",
|
|
1440
|
+
getBatteryInfoSync: "useBattery",
|
|
1441
|
+
getRendererUserAgent: "useDevice",
|
|
1442
|
+
getSkylineInfo: "useDevice",
|
|
1443
|
+
getSkylineInfoSync: "useDevice",
|
|
1444
|
+
getDeviceBenchmarkInfo: "useDevice",
|
|
1445
|
+
canIUse: "useDevice",
|
|
1446
|
+
getApiCategory: "useDevice",
|
|
1447
|
+
getFuzzyLocation: "useLocation",
|
|
1448
|
+
// 应用/页面生命周期
|
|
1449
|
+
onAppHide: "useAppLifecycle",
|
|
1450
|
+
onAppShow: "useAppLifecycle",
|
|
1451
|
+
offAppHide: "useAppLifecycle",
|
|
1452
|
+
offAppShow: "useAppLifecycle",
|
|
1453
|
+
onMemoryWarning: "useAppLifecycle",
|
|
1454
|
+
offMemoryWarning: "useAppLifecycle",
|
|
1455
|
+
onThemeChange: "useAppLifecycle",
|
|
1456
|
+
offThemeChange: "useAppLifecycle",
|
|
1457
|
+
onUnhandledRejection: "useAppLifecycle",
|
|
1458
|
+
offUnhandledRejection: "useAppLifecycle",
|
|
1459
|
+
onPageNotFound: "usePageLifecycle",
|
|
1460
|
+
offPageNotFound: "usePageLifecycle",
|
|
1461
|
+
onBeforePageLoad: "usePageLifecycle",
|
|
1462
|
+
onAfterPageLoad: "usePageLifecycle",
|
|
1463
|
+
onBeforePageUnload: "usePageLifecycle",
|
|
1464
|
+
onAfterPageUnload: "usePageLifecycle",
|
|
1465
|
+
onLazyLoadError: "usePageLifecycle",
|
|
1466
|
+
offLazyLoadError: "usePageLifecycle",
|
|
1467
|
+
// 位置 / 网络 / 键盘 / WiFi / 蓝牙 / 传感器 事件
|
|
1468
|
+
onLocationChange: "useLocation.watch",
|
|
1469
|
+
offLocationChange: "useLocation.watch",
|
|
1470
|
+
onLocationChangeError: "useLocation.watch",
|
|
1471
|
+
offLocationChangeError: "useLocation.watch",
|
|
1472
|
+
onNetworkStatusChange: "useNetwork",
|
|
1473
|
+
offNetworkStatusChange: "useNetwork",
|
|
1474
|
+
onNetworkWeakChange: "useNetwork",
|
|
1475
|
+
offNetworkWeakChange: "useNetwork",
|
|
1476
|
+
onKeyboardHeightChange: "useKeyboard",
|
|
1477
|
+
offKeyboardHeightChange: "useKeyboard",
|
|
1478
|
+
onKeyDown: "useKeyboard",
|
|
1479
|
+
offKeyDown: "useKeyboard",
|
|
1480
|
+
onKeyUp: "useKeyboard",
|
|
1481
|
+
offKeyUp: "useKeyboard",
|
|
1482
|
+
onWifiConnected: "useWifi",
|
|
1483
|
+
offWifiConnected: "useWifi",
|
|
1484
|
+
onWifiConnectedWithPartialInfo: "useWifi",
|
|
1485
|
+
offWifiConnectedWithPartialInfo: "useWifi",
|
|
1486
|
+
onGetWifiList: "useWifi",
|
|
1487
|
+
offGetWifiList: "useWifi",
|
|
1488
|
+
onBluetoothAdapterStateChange: "useBluetooth",
|
|
1489
|
+
offBluetoothAdapterStateChange: "useBluetooth",
|
|
1490
|
+
onBluetoothDeviceFound: "useBluetooth",
|
|
1491
|
+
offBluetoothDeviceFound: "useBluetooth",
|
|
1492
|
+
onBLEConnectionStateChange: "useBluetooth",
|
|
1493
|
+
offBLEConnectionStateChange: "useBluetooth",
|
|
1494
|
+
onBLECharacteristicValueChange: "useBluetooth",
|
|
1495
|
+
offBLECharacteristicValueChange: "useBluetooth",
|
|
1496
|
+
onBLEMTUChange: "useBluetooth",
|
|
1497
|
+
offBLEMTUChange: "useBluetooth",
|
|
1498
|
+
onBatteryInfoChange: "useBattery",
|
|
1499
|
+
offBatteryInfoChange: "useBattery",
|
|
1500
|
+
onCompassChange: "useSensor",
|
|
1501
|
+
offCompassChange: "useSensor",
|
|
1502
|
+
onAccelerometerChange: "useSensor",
|
|
1503
|
+
offAccelerometerChange: "useSensor",
|
|
1504
|
+
onGyroscopeChange: "useSensor",
|
|
1505
|
+
offGyroscopeChange: "useSensor",
|
|
1506
|
+
onDeviceMotionChange: "useSensor",
|
|
1507
|
+
offDeviceMotionChange: "useSensor",
|
|
1508
|
+
onDeviceOrientationChange: "useOrientation",
|
|
1509
|
+
// 日志 / 埋点 / 通知 / 日历
|
|
1510
|
+
getLogManager: "useLog",
|
|
1511
|
+
getRealtimeLogManager: "useLog",
|
|
1512
|
+
reportAnalytics: "useAnalytics",
|
|
1513
|
+
reportEvent: "useAnalytics",
|
|
1514
|
+
reportMonitor: "useLog",
|
|
1515
|
+
sendSms: "useSMS",
|
|
1516
|
+
addPhoneCalendar: "useCalendarAPI",
|
|
1517
|
+
removePhoneCalendar: "useCalendarAPI",
|
|
1518
|
+
openCustomerServiceChat: "useCustomerService",
|
|
1519
|
+
requestSubscribeDeviceMessage: "useDeviceNotification",
|
|
1520
|
+
// 媒体组件实例(本轮 C4)
|
|
1521
|
+
createVideoContext: "useVideo",
|
|
1522
|
+
createInnerAudioContext: "useAudio",
|
|
1523
|
+
createLivePusherContext: "useLivePusher",
|
|
1524
|
+
createMediaRecorder: "useRecorder",
|
|
1525
|
+
createWebAudioContext: "useAudio",
|
|
1526
|
+
// 画布 / 查询(本轮 C4)
|
|
1527
|
+
createCanvasContext: "useCanvas",
|
|
1528
|
+
createOffscreenCanvas: "useCanvas",
|
|
1529
|
+
createSelectorQuery: "useElement",
|
|
1530
|
+
createIntersectionObserver: "useIntersection",
|
|
1531
|
+
createMediaQueryObserver: "useMediaQuery",
|
|
1532
|
+
// 广告(本轮 C4)
|
|
1533
|
+
createRewardedVideoAd: "useAd",
|
|
1534
|
+
createInterstitialAd: "useAd",
|
|
1535
|
+
createBannerAd: "useAd",
|
|
1536
|
+
// 大文件工具(useFileSystem 承接)
|
|
1537
|
+
arrayBufferToBase64: "useFileSystem",
|
|
1538
|
+
base64ToArrayBuffer: "useFileSystem",
|
|
1539
|
+
createBufferURL: "useFileSystem",
|
|
1540
|
+
revokeBufferURL: "useFileSystem",
|
|
1541
|
+
getFileSystemManager: "useFileSystem",
|
|
1542
|
+
saveFileToDisk: "useFileSystem",
|
|
1543
|
+
// 网络(改名承接)
|
|
1544
|
+
connectSocket: "useWebSocket",
|
|
1545
|
+
uploadFile: "useUpload",
|
|
1546
|
+
downloadFile: "useDownload",
|
|
1547
|
+
// 组件实例(改名承接)
|
|
1548
|
+
createCameraContext: "useCameraContext",
|
|
1549
|
+
createMapContext: "useMap",
|
|
1550
|
+
createWorker: "useWorker",
|
|
1551
|
+
createAnimation: "useAnimation",
|
|
1552
|
+
createLivePlayerContext: "useLive",
|
|
1553
|
+
createNFCAdapter: "useNFC",
|
|
1554
|
+
getNFCAdapter: "useNFC",
|
|
1555
|
+
getRecorderManager: "useRecorder",
|
|
1556
|
+
// 存储(同步/old)
|
|
1557
|
+
clearStorageSync: "useStorage",
|
|
1558
|
+
getStorageInfoSync: "useStorage.info",
|
|
1559
|
+
// 系统信息旧版(new 拆分版承接)
|
|
1560
|
+
getSystemInfoSync: "useDevice",
|
|
1561
|
+
getLaunchOptionsSync: "useMiniProgram",
|
|
1562
|
+
getEnterOptionsSync: "useMiniProgram",
|
|
1563
|
+
// 生命周期事件(旧名承接)
|
|
1564
|
+
onError: "useAppLifecycle",
|
|
1565
|
+
offError: "useAppLifecycle",
|
|
1566
|
+
onWindowResize: "useOrientation",
|
|
1567
|
+
offWindowResize: "useOrientation",
|
|
1568
|
+
onHCEMessage: "useNFC",
|
|
1569
|
+
offHCEMessage: "useNFC",
|
|
1570
|
+
offAfterPageLoad: "usePageLifecycle",
|
|
1571
|
+
offAfterPageUnload: "usePageLifecycle",
|
|
1572
|
+
offBeforePageLoad: "usePageLifecycle",
|
|
1573
|
+
offBeforePageUnload: "usePageLifecycle",
|
|
1574
|
+
// 热更新 / 联系人 / 剪贴板
|
|
1575
|
+
getUpdateManager: "useUpdate",
|
|
1576
|
+
chooseContact: "useContact",
|
|
1577
|
+
getMenuButtonBoundingClientRect: "useElement.boundingClientRect",
|
|
1578
|
+
getLocalIPAddress: "useNetwork",
|
|
1579
|
+
// 隐私协议(C65——合规刚需,2026-09-12 补齐)
|
|
1580
|
+
getPrivacySetting: "usePrivacy",
|
|
1581
|
+
openPrivacyContract: "usePrivacy",
|
|
1582
|
+
requirePrivacyAuthorize: "usePrivacy",
|
|
1583
|
+
onNeedPrivacyAuthorization: "usePrivacy",
|
|
1584
|
+
offNeedPrivacyAuthorization: "usePrivacy",
|
|
1585
|
+
// 性能 / 预加载 / 图像编辑(C66-C68——批 D 补齐,2026-09-12)
|
|
1586
|
+
getPerformance: "usePerformance",
|
|
1587
|
+
reportPerformance: "usePerformance",
|
|
1588
|
+
preloadAssets: "usePreload",
|
|
1589
|
+
preloadSkylineView: "usePreload",
|
|
1590
|
+
preloadWebview: "usePreload",
|
|
1591
|
+
preDownloadSubpackage: "usePreload",
|
|
1592
|
+
cropImage: "useImageEdit",
|
|
1593
|
+
editImage: "useImageEdit",
|
|
1594
|
+
// 网络底层 / 媒体高级(C69-C70——批 E 补齐,2026-09-12)
|
|
1595
|
+
createUDPSocket: "useSocket.udp",
|
|
1596
|
+
createTCPSocket: "useSocket.tcp",
|
|
1597
|
+
createMediaContainer: "useMediaProcessing.container",
|
|
1598
|
+
createVideoDecoder: "useMediaProcessing.videoDecoder",
|
|
1599
|
+
createMediaAudioPlayer: "useMediaProcessing.audioPlayer",
|
|
1600
|
+
// 录屏/缓存/空闲/窗口/导航拦截(C71-C75——批 F 补齐,2026-09-12)
|
|
1601
|
+
getScreenRecordingState: "useScreenCapture",
|
|
1602
|
+
onScreenRecordingStateChanged: "useScreenCapture",
|
|
1603
|
+
offScreenRecordingStateChanged: "useScreenCapture",
|
|
1604
|
+
onUserCaptureScreen: "useScreenCapture",
|
|
1605
|
+
offUserCaptureScreen: "useScreenCapture",
|
|
1606
|
+
checkIsPictureInPictureActive: "useScreenCapture",
|
|
1607
|
+
createCacheManager: "useCacheManager",
|
|
1608
|
+
requestIdleCallback: "useIdle",
|
|
1609
|
+
cancelIdleCallback: "useIdle",
|
|
1610
|
+
setWindowSize: "useWindow",
|
|
1611
|
+
enableAlertBeforeUnload: "useNavigationGuard",
|
|
1612
|
+
disableAlertBeforeUnload: "useNavigationGuard",
|
|
1613
|
+
// AR/XR / iBeacon / 局域网 / 翻译 / 海报 / 设备探测(C76-C81——批 G 补齐,2026-09-12)
|
|
1614
|
+
createVKSession: "useAR",
|
|
1615
|
+
isVKSupport: "useAR",
|
|
1616
|
+
checkDeviceSupportHevc: "useDeviceCapability",
|
|
1617
|
+
onUserTriggerTranslation: "useTranslation",
|
|
1618
|
+
offUserTriggerTranslation: "useTranslation",
|
|
1619
|
+
onUserOffTranslation: "useTranslation",
|
|
1620
|
+
offUserOffTranslation: "useTranslation",
|
|
1621
|
+
onGeneratePoster: "usePoster",
|
|
1622
|
+
offGeneratePoster: "usePoster"
|
|
1623
|
+
};
|
|
1624
|
+
var SPEC_PRIVATE = /* @__PURE__ */ new Set([
|
|
1625
|
+
// 支付 / 交通卡 / 离线支付
|
|
1626
|
+
"addPaymentPassFinish",
|
|
1627
|
+
"addPaymentPassGetCertificateData",
|
|
1628
|
+
"canAddSecureElementPass",
|
|
1629
|
+
"getSecureElementPasses",
|
|
1630
|
+
"removeSecureElementPass",
|
|
1631
|
+
"checkTransitCardSupport",
|
|
1632
|
+
"getTransitCardCPLC",
|
|
1633
|
+
"getTransitCardInfo",
|
|
1634
|
+
"getTransitCardList",
|
|
1635
|
+
"issueTransitCard",
|
|
1636
|
+
"rechargeTransitCard",
|
|
1637
|
+
"deleteTransitCard",
|
|
1638
|
+
"createGlobalPayment",
|
|
1639
|
+
"requestCommonPayment",
|
|
1640
|
+
"requestVirtualPayment",
|
|
1641
|
+
"requestPluginPayment",
|
|
1642
|
+
"requestAppleSubscribeSign",
|
|
1643
|
+
"jumpToOfflinePay",
|
|
1644
|
+
"openHKOfflinePayView",
|
|
1645
|
+
"requestMerchantTransfer",
|
|
1646
|
+
"openInquiriesTopic",
|
|
1647
|
+
"openHKOfflinePayView",
|
|
1648
|
+
// 视频号 / 直播频道
|
|
1649
|
+
"getChannelsLiveInfo",
|
|
1650
|
+
"getChannelsLiveNoticeInfo",
|
|
1651
|
+
"getChannelsShareKey",
|
|
1652
|
+
"openChannelsActivity",
|
|
1653
|
+
"openChannelsEvent",
|
|
1654
|
+
"openChannelsLive",
|
|
1655
|
+
"openChannelsLiveNoticeInfo",
|
|
1656
|
+
"openChannelsUserProfile",
|
|
1657
|
+
"reserveChannelsLive",
|
|
1658
|
+
// VoIP / 客服会话
|
|
1659
|
+
"getDeviceVoIPList",
|
|
1660
|
+
"requestDeviceVoIP",
|
|
1661
|
+
"joinVoIPChat",
|
|
1662
|
+
"setEnable1v1Chat",
|
|
1663
|
+
"join1v1Chat",
|
|
1664
|
+
"enterChatToolMode",
|
|
1665
|
+
"onVoIPChatInterrupted",
|
|
1666
|
+
"offVoIPChatInterrupted",
|
|
1667
|
+
"onVoIPChatMembersChanged",
|
|
1668
|
+
"offVoIPChatMembersChanged",
|
|
1669
|
+
"onVoIPChatSpeakersChanged",
|
|
1670
|
+
"offVoIPChatSpeakersChanged",
|
|
1671
|
+
"onVoIPChatStateChanged",
|
|
1672
|
+
"offVoIPChatStateChanged",
|
|
1673
|
+
"onVoIPVideoMembersChanged",
|
|
1674
|
+
"offVoIPVideoMembersChanged",
|
|
1675
|
+
// 人脸核身 / 类目资质
|
|
1676
|
+
"startFacialRecognitionVerify",
|
|
1677
|
+
"checkIsSupportFacialRecognition",
|
|
1678
|
+
"requestFacialVerify",
|
|
1679
|
+
"faceDetect",
|
|
1680
|
+
"initFaceDetect",
|
|
1681
|
+
"stopFaceDetect",
|
|
1682
|
+
"setVisualEffectOnCapture",
|
|
1683
|
+
// AI 推理(类目)
|
|
1684
|
+
"createInferenceSession",
|
|
1685
|
+
"getInferenceEnvInfo",
|
|
1686
|
+
// 企业 / 员工关系
|
|
1687
|
+
"bindEmployeeRelation",
|
|
1688
|
+
"checkEmployeeRelation",
|
|
1689
|
+
"requestSubscribeEmployeeMessage",
|
|
1690
|
+
"authPrivateMessage",
|
|
1691
|
+
// 插件
|
|
1692
|
+
"pluginLogin",
|
|
1693
|
+
"getPluginUpdateManager",
|
|
1694
|
+
"authorizeForMiniProgram",
|
|
1695
|
+
// 营销 / 门店 / 贴纸 / 公众号
|
|
1696
|
+
"openDesignerProfile",
|
|
1697
|
+
"openOfficialAccountArticle",
|
|
1698
|
+
"openOfficialAccountChat",
|
|
1699
|
+
"openOfficialAccountProfile",
|
|
1700
|
+
"shareToOfficialAccount",
|
|
1701
|
+
"postMessageToReferrerMiniProgram",
|
|
1702
|
+
"postMessageToReferrerPage",
|
|
1703
|
+
"openSingleStickerView",
|
|
1704
|
+
"openStickerIPView",
|
|
1705
|
+
"openStickerSetView",
|
|
1706
|
+
"openStoreCouponDetail",
|
|
1707
|
+
"openStoreOrderDetail",
|
|
1708
|
+
"openVideoEditor",
|
|
1709
|
+
// 加密 / 群入口 / 扩展配置
|
|
1710
|
+
"getUserCryptoManager",
|
|
1711
|
+
"getGroupEnterInfo",
|
|
1712
|
+
"getExtConfigSync",
|
|
1713
|
+
"getCommonConfig",
|
|
1714
|
+
"getExptInfoSync",
|
|
1715
|
+
// 后台音频(旧)/ 小程序互跳 / 路由重写
|
|
1716
|
+
"getBackgroundAudioManager",
|
|
1717
|
+
"onBackgroundAudioPause",
|
|
1718
|
+
"onBackgroundAudioPlay",
|
|
1719
|
+
"onBackgroundAudioStop",
|
|
1720
|
+
"openEmbeddedMiniProgram",
|
|
1721
|
+
"exitMiniProgram",
|
|
1722
|
+
"restartMiniProgram",
|
|
1723
|
+
"rewriteRoute",
|
|
1724
|
+
"onEmbeddedMiniProgramHeightChange",
|
|
1725
|
+
"offEmbeddedMiniProgramHeightChange",
|
|
1726
|
+
"openData",
|
|
1727
|
+
// 小程序归属 / 开屏广告 / XR 系统(微信私有)
|
|
1728
|
+
"checkIsAddedToMyMiniProgram",
|
|
1729
|
+
"getShowSplashAdStatus",
|
|
1730
|
+
"getXrFrameSystem"
|
|
1731
|
+
]);
|
|
1732
|
+
var SPEC_NA = /* @__PURE__ */ new Set([
|
|
1733
|
+
// 废弃路由事件(wx.router 前身)
|
|
1734
|
+
"onAppRoute",
|
|
1735
|
+
"offAppRoute",
|
|
1736
|
+
"onAppRouteDone",
|
|
1737
|
+
"offAppRouteDone",
|
|
1738
|
+
"onBeforeAppRoute",
|
|
1739
|
+
"offBeforeAppRoute",
|
|
1740
|
+
// 废弃音频(→ createWebAudioContext)
|
|
1741
|
+
"createAudioContext",
|
|
1742
|
+
// 构建期动态路径(编译期解析,无运行期 API)
|
|
1743
|
+
"resolve",
|
|
1744
|
+
// 内置字体(宿主排版层)
|
|
1745
|
+
"loadBuiltInFontFace",
|
|
1746
|
+
// 并行状态(试验特性,已废弃)
|
|
1747
|
+
"onParallelStateChange",
|
|
1748
|
+
"offParallelStateChange",
|
|
1749
|
+
// 系统信息旧版(新工程用 getWindowInfo/getDeviceInfo/getAppBaseInfo)
|
|
1750
|
+
"getSystemInfoAsync",
|
|
1751
|
+
// 调度原语(Vue nextTick / 渲染器调度等价,非平台能力)
|
|
1752
|
+
"nextTick"
|
|
1753
|
+
]);
|
|
1754
|
+
var SPEC_PLANNED = {
|
|
1755
|
+
// 网络底层(已由 C69 useSocket 覆盖——见 SPEC_COVERED)
|
|
1756
|
+
// 媒体高级(已由 C70 useMediaProcessing 覆盖——见 SPEC_COVERED)
|
|
1757
|
+
// 图像编辑(已由 C68 useImageEdit 覆盖——见 SPEC_COVERED)
|
|
1758
|
+
// 性能(已由 C66 usePerformance 覆盖——见 SPEC_COVERED)
|
|
1759
|
+
// 录屏 / 画中画(已由 C71 useScreenCapture 覆盖——见 SPEC_COVERED + EVENT_BASE covered)
|
|
1760
|
+
// 预加载 / 分包(已由 C67 usePreload 覆盖——见 SPEC_COVERED)
|
|
1761
|
+
// AR / XR(已由 C76 useAR 覆盖——见 SPEC_COVERED)
|
|
1762
|
+
// 缓存管理 / 窗口 / 卸载拦截(已由 C72/C74/C75 覆盖——见 SPEC_COVERED)
|
|
1763
|
+
// 调度(已由 C73 useIdle 覆盖——见 SPEC_COVERED)
|
|
1764
|
+
// 设备能力探测(已由 C81 useDeviceCapability 覆盖——见 SPEC_COVERED)
|
|
1765
|
+
};
|
|
1766
|
+
var EVENT_BASE = {
|
|
1767
|
+
// 映射既有 Hook(covered)
|
|
1768
|
+
onCopyUrl: { status: "covered", proteus: "useClipboard" },
|
|
1769
|
+
offCopyUrl: { status: "covered", proteus: "useClipboard" },
|
|
1770
|
+
onAudioInterruptionBegin: { status: "covered", proteus: "useBackground" },
|
|
1771
|
+
offAudioInterruptionBegin: { status: "covered", proteus: "useBackground" },
|
|
1772
|
+
onAudioInterruptionEnd: { status: "covered", proteus: "useBackground" },
|
|
1773
|
+
offAudioInterruptionEnd: { status: "covered", proteus: "useBackground" },
|
|
1774
|
+
onBackgroundFetchData: { status: "covered", proteus: "useBackground" },
|
|
1775
|
+
offBackgroundFetchData: { status: "covered", proteus: "useBackground" },
|
|
1776
|
+
onMenuButtonBoundingClientRectWeightChange: { status: "covered", proteus: "useElement" },
|
|
1777
|
+
offMenuButtonBoundingClientRectWeightChange: { status: "covered", proteus: "useElement" },
|
|
1778
|
+
onApiCategoryChange: { status: "covered", proteus: "useDevice" },
|
|
1779
|
+
offApiCategoryChange: { status: "covered", proteus: "useDevice" },
|
|
1780
|
+
onWindowStateChange: { status: "covered", proteus: "useAppLifecycle" },
|
|
1781
|
+
offWindowStateChange: { status: "covered", proteus: "useAppLifecycle" },
|
|
1782
|
+
onBLEPeripheralConnectionStateChanged: { status: "covered", proteus: "useBluetooth" },
|
|
1783
|
+
offBLEPeripheralConnectionStateChanged: { status: "covered", proteus: "useBluetooth" },
|
|
1784
|
+
// 批 G:iBeacon / 局域网 mDNS(covered——C77/C78)
|
|
1785
|
+
onBeaconServiceChange: { status: "covered", proteus: "useBeacon" },
|
|
1786
|
+
offBeaconServiceChange: { status: "covered", proteus: "useBeacon" },
|
|
1787
|
+
onBeaconUpdate: { status: "covered", proteus: "useBeacon" },
|
|
1788
|
+
offBeaconUpdate: { status: "covered", proteus: "useBeacon" },
|
|
1789
|
+
onLocalServiceFound: { status: "covered", proteus: "useLocalService" },
|
|
1790
|
+
offLocalServiceFound: { status: "covered", proteus: "useLocalService" },
|
|
1791
|
+
onLocalServiceLost: { status: "covered", proteus: "useLocalService" },
|
|
1792
|
+
offLocalServiceLost: { status: "covered", proteus: "useLocalService" },
|
|
1793
|
+
onLocalServiceResolveFail: { status: "covered", proteus: "useLocalService" },
|
|
1794
|
+
offLocalServiceResolveFail: { status: "covered", proteus: "useLocalService" },
|
|
1795
|
+
onLocalServiceDiscoveryStop: { status: "covered", proteus: "useLocalService" },
|
|
1796
|
+
offLocalServiceDiscoveryStop: { status: "covered", proteus: "useLocalService" },
|
|
1797
|
+
// 批 G:录屏(covered——C71)/ 翻译(covered——C79)/ 海报(covered——C80)
|
|
1798
|
+
onScreenRecordingStateChanged: { status: "covered", proteus: "useScreenCapture" },
|
|
1799
|
+
offScreenRecordingStateChanged: { status: "covered", proteus: "useScreenCapture" },
|
|
1800
|
+
onUserCaptureScreen: { status: "covered", proteus: "useScreenCapture" },
|
|
1801
|
+
offUserCaptureScreen: { status: "covered", proteus: "useScreenCapture" },
|
|
1802
|
+
onUserTriggerTranslation: { status: "covered", proteus: "useTranslation" },
|
|
1803
|
+
offUserTriggerTranslation: { status: "covered", proteus: "useTranslation" },
|
|
1804
|
+
onUserOffTranslation: { status: "covered", proteus: "useTranslation" },
|
|
1805
|
+
offUserOffTranslation: { status: "covered", proteus: "useTranslation" },
|
|
1806
|
+
onGeneratePoster: { status: "covered", proteus: "usePoster" },
|
|
1807
|
+
offGeneratePoster: { status: "covered", proteus: "usePoster" }
|
|
1808
|
+
};
|
|
1809
|
+
function classifySpecApi(name) {
|
|
1810
|
+
if (name in SPEC_COVERED) return { status: "covered", proteus: SPEC_COVERED[name] };
|
|
1811
|
+
if (SPEC_PRIVATE.has(name)) return { status: "private" };
|
|
1812
|
+
if (SPEC_NA.has(name)) return { status: "na" };
|
|
1813
|
+
if (name in SPEC_PLANNED) return { status: "planned", proteus: SPEC_PLANNED[name] };
|
|
1814
|
+
if (name in EVENT_BASE) return EVENT_BASE[name];
|
|
1815
|
+
return { status: "gap" };
|
|
1816
|
+
}
|
|
1817
|
+
function classifySpecComponent(tag, matrix) {
|
|
1818
|
+
if (tag in SPEC_COMPONENT_OVERRIDE) return SPEC_COMPONENT_OVERRIDE[tag];
|
|
1819
|
+
const row = matrix.find((r) => r.mp === `<${tag}>`);
|
|
1820
|
+
if (!row) return { status: "gap" };
|
|
1821
|
+
if (row.planned) return { status: "planned" };
|
|
1822
|
+
if (row.status === "private") return { status: "private" };
|
|
1823
|
+
if (row.status === "missing") return { status: "gap" };
|
|
1824
|
+
return { status: "covered" };
|
|
1825
|
+
}
|
|
1826
|
+
var SPEC_COMPONENT_OVERRIDE = {
|
|
1827
|
+
// 语义消灭为子项/属性(表单分组、多列选择)
|
|
1828
|
+
"checkbox-group": { status: "na", proteus: "p-checkbox \u5206\u7EC4\uFF08\u6D88\u706D\u4E3A\u5B50\u9879\uFF09" },
|
|
1829
|
+
"radio-group": { status: "na", proteus: "p-radio \u5206\u7EC4\uFF08\u6D88\u706D\u4E3A\u5B50\u9879\uFF09" },
|
|
1830
|
+
"picker-view-column": { status: "na", proteus: "p-picker \u591A\u5217\uFF08\u6D88\u706D\u4E3A\u5C5E\u6027\uFF09" },
|
|
1831
|
+
// Skyline 手势处理器 → 手势原语(gesture.* / v-gesture)
|
|
1832
|
+
"tap-gesture-handler": { status: "covered", proteus: "gesture.tap" },
|
|
1833
|
+
"double-tap-gesture-handler": { status: "covered", proteus: "gesture.draggable\uFF08tap \u8BC6\u522B\uFF09" },
|
|
1834
|
+
"long-press-gesture-handler": { status: "covered", proteus: "gesture.long-press" },
|
|
1835
|
+
"pan-gesture-handler": { status: "covered", proteus: "gesture.pan" },
|
|
1836
|
+
"scale-gesture-handler": { status: "covered", proteus: "gesture.pinch" },
|
|
1837
|
+
"force-press-gesture-handler": { status: "covered", proteus: "gesture.press" },
|
|
1838
|
+
"horizontal-drag-gesture-handler": { status: "covered", proteus: "gesture.draggable" },
|
|
1839
|
+
"vertical-drag-gesture-handler": { status: "covered", proteus: "gesture.draggable" },
|
|
1840
|
+
// Skyline 布局构建器 → 布局语义
|
|
1841
|
+
"grid-builder": { status: "covered", proteus: "layout.grid" },
|
|
1842
|
+
"list-builder": { status: "covered", proteus: "layout.virtual-list" },
|
|
1843
|
+
"nested-scroll-body": { status: "covered", proteus: "layout.scroll\uFF08\u5D4C\u5957\u6EDA\u52A8\uFF09" },
|
|
1844
|
+
"nested-scroll-header": { status: "covered", proteus: "layout.scroll\uFF08\u5D4C\u5957\u6EDA\u52A8\uFF09" },
|
|
1845
|
+
"draggable-sheet": { status: "covered", proteus: "shell.page-container\uFF08\u534A\u5C4F\u53EF\u62D6\uFF09" },
|
|
1846
|
+
// aria-component 是 ARIA 属性文档页(非组件标签)——ARIA 属性两端原生支持(aria-label/aria-role)
|
|
1847
|
+
"aria-component": { status: "na", proteus: "\u2014\uFF08ARIA \u5C5E\u6027\u6587\u6863\u9875\uFF1Baria-* \u4E24\u7AEF\u539F\u751F\u652F\u6301\uFF0C\u7EC4\u4EF6\u5DF2\u5E26 ariaLabel\uFF09" },
|
|
1848
|
+
// Skyline 同层渲染后冗余(官方:建议用 view 替代 cover-view/cover-image)
|
|
1849
|
+
"cover-view": { status: "na", proteus: "\u2014\uFF08\u540C\u5C42\u6E32\u67D3\u540E\u5197\u4F59\uFF0C\u7528 layout.box \u66FF\u4EE3\uFF09" },
|
|
1850
|
+
"cover-image": { status: "na", proteus: "\u2014\uFF08\u540C\u5C42\u6E32\u67D3\u540E\u5197\u4F59\uFF0C\u7528 ui.image \u66FF\u4EE3\uFF09" },
|
|
1851
|
+
// 表单/富文本/文本片段 → 语义承接(★批 H:keyboard-accessory/selection 已全端真实落地)
|
|
1852
|
+
"keyboard-accessory": { status: "covered", proteus: "shell.keyboard-accessory\uFF08p-keyboard-accessory\uFF09" },
|
|
1853
|
+
selection: { status: "covered", proteus: "ui.selection\uFF08p-selection\uFF09" },
|
|
1854
|
+
span: { status: "na", proteus: "ui.text \u5185\u8054\uFF08\u6D88\u706D\u4E3A\u5B50\u5143\u7D20\uFF09" },
|
|
1855
|
+
"editor-portal": { status: "na", proteus: "ui.rich-text \u5185\u8054\uFF08\u6D88\u706D\u4E3A\u5B50\u5143\u7D20\uFF09" },
|
|
1856
|
+
"native-component": { status: "private", proteus: "\uFF08\u5FAE\u4FE1\u539F\u751F\u7EC4\u4EF6\u6269\u5C55\u70B9\uFF0C\u975E\u76EE\u6807\uFF09" },
|
|
1857
|
+
"official-account-publish": { status: "private", proteus: "\uFF08\u5FAE\u4FE1\u516C\u4F17\u53F7\u53D1\u5E03\uFF0C\u79C1\u6709\uFF09" },
|
|
1858
|
+
"open-data-item": { status: "private", proteus: "\uFF08\u5FAE\u4FE1\u5F00\u653E\u6570\u636E\u9879\uFF0C\u79C1\u6709\uFF09" },
|
|
1859
|
+
"open-data-list": { status: "private", proteus: "\uFF08\u5FAE\u4FE1\u5F00\u653E\u6570\u636E\u5217\u8868\uFF0C\u79C1\u6709\uFF09" },
|
|
1860
|
+
// 视频号 / 营销(类目资质)
|
|
1861
|
+
"channel-live": { status: "private", proteus: "\uFF08\u89C6\u9891\u53F7\u76F4\u64AD\uFF0C\u79C1\u6709\uFF09" },
|
|
1862
|
+
"channel-video": { status: "private", proteus: "\uFF08\u89C6\u9891\u53F7\u89C6\u9891\uFF0C\u79C1\u6709\uFF09" },
|
|
1863
|
+
"ad-custom": { status: "private", proteus: "\uFF08\u5FAE\u4FE1\u81EA\u5B9A\u4E49\u5E7F\u544A\uFF0C\u79C1\u6709\uFF09" },
|
|
1864
|
+
reward: { status: "private", proteus: "\uFF08\u5FAE\u4FE1\u6FC0\u52B1\u5956\u52B1\u7EC4\u4EF6\uFF0C\u79C1\u6709\uFF09" },
|
|
1865
|
+
"store-coupon": { status: "private", proteus: "\uFF08\u5FAE\u4FE1\u5C0F\u5E97\u4F18\u60E0\u5238\uFF0C\u79C1\u6709\uFF09" },
|
|
1866
|
+
"store-gift": { status: "private", proteus: "\uFF08\u5FAE\u4FE1\u5C0F\u5E97\u793C\u54C1\uFF0C\u79C1\u6709\uFF09" },
|
|
1867
|
+
"store-home": { status: "private", proteus: "\uFF08\u5FAE\u4FE1\u5C0F\u5E97\u4E3B\u9875\uFF0C\u79C1\u6709\uFF09" },
|
|
1868
|
+
"store-product": { status: "private", proteus: "\uFF08\u5FAE\u4FE1\u5C0F\u5E97\u5546\u54C1\uFF0C\u79C1\u6709\uFF09" }
|
|
1869
|
+
};
|
|
1870
|
+
function auditSpecCoverage(spec, matrix) {
|
|
1871
|
+
const counts = { covered: 0, planned: 0, private: 0, na: 0, gap: 0 };
|
|
1872
|
+
const gaps = [];
|
|
1873
|
+
const plannedItems = [];
|
|
1874
|
+
for (const tag of spec.components) {
|
|
1875
|
+
const c = classifySpecComponent(tag, matrix);
|
|
1876
|
+
counts[c.status]++;
|
|
1877
|
+
if (c.status === "gap") gaps.push({ kind: "component", name: tag });
|
|
1878
|
+
if (c.status === "planned") plannedItems.push({ kind: "component", name: tag, proteus: c.proteus });
|
|
1879
|
+
}
|
|
1880
|
+
for (const api of spec.apis) {
|
|
1881
|
+
const c = classifySpecApi(api);
|
|
1882
|
+
counts[c.status]++;
|
|
1883
|
+
if (c.status === "gap") gaps.push({ kind: "api", name: api });
|
|
1884
|
+
if (c.status === "planned") plannedItems.push({ kind: "api", name: api, proteus: c.proteus });
|
|
1885
|
+
}
|
|
1886
|
+
const total = spec.components.length + spec.apis.length;
|
|
1887
|
+
const actionable = counts.covered + counts.planned;
|
|
1888
|
+
return {
|
|
1889
|
+
total,
|
|
1890
|
+
covered: counts.covered,
|
|
1891
|
+
planned: counts.planned,
|
|
1892
|
+
private: counts.private,
|
|
1893
|
+
na: counts.na,
|
|
1894
|
+
gap: counts.gap,
|
|
1895
|
+
accounted: total - counts.gap,
|
|
1896
|
+
classifiedPercent: total === 0 ? 0 : Math.round((total - counts.gap) / total * 100),
|
|
1897
|
+
actionable,
|
|
1898
|
+
landedPercent: actionable === 0 ? 100 : Math.floor(counts.covered / actionable * 100),
|
|
1899
|
+
// ★floor(永不夸大——99.6% 显示 99 而非 100)
|
|
1900
|
+
gaps,
|
|
1901
|
+
plannedItems
|
|
1902
|
+
};
|
|
1903
|
+
}
|
|
1904
|
+
var SPEC_RATCHET = {
|
|
1905
|
+
coveredMin: 255,
|
|
1906
|
+
// 2026-09-12 基线(spec 382 项:covered 255 / planned 1(share-element,需宿主分享流)/ private 106 / na 20 / gap 0)——含 C65-C81 + 组件批 H/I/J
|
|
1907
|
+
gapMax: 0
|
|
1908
|
+
// 全部官方项必须归类
|
|
1909
|
+
};
|
|
1114
1910
|
export {
|
|
1115
1911
|
COMPONENT_IR_SCHEMA,
|
|
1116
1912
|
DEFAULT_DESIGN_WIDTH,
|
|
@@ -1118,12 +1914,22 @@ export {
|
|
|
1118
1914
|
PRIMITIVE_CATALOG,
|
|
1119
1915
|
SEMANTIC_BACKEND_MAP,
|
|
1120
1916
|
SEMANTIC_ENUM,
|
|
1917
|
+
SPEC_COMPONENT_OVERRIDE,
|
|
1918
|
+
SPEC_COVERED,
|
|
1919
|
+
SPEC_NA,
|
|
1920
|
+
SPEC_PLANNED,
|
|
1921
|
+
SPEC_PRIVATE,
|
|
1922
|
+
SPEC_RATCHET,
|
|
1121
1923
|
TAG_SEMANTIC_MAP,
|
|
1122
1924
|
auditCatalogConsistency,
|
|
1925
|
+
auditMatrixReferences,
|
|
1123
1926
|
auditMiniprogramCoverage,
|
|
1927
|
+
auditSpecCoverage,
|
|
1124
1928
|
checkComponentSnapshot,
|
|
1125
1929
|
checkPrimitiveCatalog,
|
|
1126
1930
|
checkSemanticCoverage,
|
|
1931
|
+
classifySpecApi,
|
|
1932
|
+
classifySpecComponent,
|
|
1127
1933
|
componentPrimitives,
|
|
1128
1934
|
extractSemanticTree,
|
|
1129
1935
|
formatCoverageReport,
|