@proteus-vue/devtools 0.1.0 → 0.1.1-beta.1
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/panel.js +448 -100
- package/package.json +7 -7
package/LICENSE
ADDED
|
@@ -0,0 +1,218 @@
|
|
|
1
|
+
Proteus(普罗透斯)Vue 跨端编译框架
|
|
2
|
+
Copyright (c) 2026 Proteus Contributors
|
|
3
|
+
|
|
4
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
you may not use this file except in compliance with the License.
|
|
6
|
+
You may obtain a copy of the License at
|
|
7
|
+
|
|
8
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
|
|
10
|
+
Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
See the License for the specific language governing permissions and
|
|
14
|
+
limitations under the License.
|
|
15
|
+
|
|
16
|
+
═══════════════════════════════════════════════════════════════════════════════
|
|
17
|
+
|
|
18
|
+
Apache License
|
|
19
|
+
Version 2.0, January 2004
|
|
20
|
+
http://www.apache.org/licenses/
|
|
21
|
+
|
|
22
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
23
|
+
|
|
24
|
+
1. Definitions.
|
|
25
|
+
|
|
26
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
27
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
28
|
+
|
|
29
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
30
|
+
the copyright owner that is granting the License.
|
|
31
|
+
|
|
32
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
33
|
+
other entities that control, are controlled by, or are under common
|
|
34
|
+
control with that entity. For the purposes of this definition,
|
|
35
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
36
|
+
direction or management of such entity, whether by contract or
|
|
37
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
38
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
39
|
+
|
|
40
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
41
|
+
exercising permissions granted by this License.
|
|
42
|
+
|
|
43
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
44
|
+
including but not limited to software source code, documentation
|
|
45
|
+
source, and configuration files.
|
|
46
|
+
|
|
47
|
+
"Object" form shall mean any form resulting from mechanical
|
|
48
|
+
transformation or translation of a Source form, including but
|
|
49
|
+
not limited to compiled object code, generated documentation,
|
|
50
|
+
and conversions to other media types.
|
|
51
|
+
|
|
52
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
53
|
+
Object form, made available under the License, as indicated by a
|
|
54
|
+
copyright notice that is included in or attached to the work
|
|
55
|
+
(an example is provided in the Appendix below).
|
|
56
|
+
|
|
57
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
58
|
+
form, that is based on (or derived from) the Work and for which the
|
|
59
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
60
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
61
|
+
of this License, Derivative Works shall not include works that remain
|
|
62
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
63
|
+
the Work and Derivative Works thereof.
|
|
64
|
+
|
|
65
|
+
"Contribution" shall mean any work of authorship, including
|
|
66
|
+
the original version of the Work and any modifications or additions
|
|
67
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
68
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
69
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
70
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
71
|
+
means any form of electronic, verbal, or written communication sent
|
|
72
|
+
to the Licensor or its representatives, including but not limited to
|
|
73
|
+
communication on electronic mailing lists, source code control systems,
|
|
74
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
75
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
76
|
+
excluding communication that is conspicuously marked or otherwise
|
|
77
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
78
|
+
|
|
79
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
80
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
81
|
+
subsequently incorporated within the Work.
|
|
82
|
+
|
|
83
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
84
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
85
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
86
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
87
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
88
|
+
Work and such Derivative Works in Source or Object form.
|
|
89
|
+
|
|
90
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
91
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
92
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
93
|
+
(except as stated in this section) patent license to make, have made,
|
|
94
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
95
|
+
where such license applies only to those patent claims licensable
|
|
96
|
+
by such Contributor that are necessarily infringed by their
|
|
97
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
98
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
99
|
+
institute patent litigation against any entity (including a
|
|
100
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
101
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
102
|
+
or contributory patent infringement, then any patent licenses
|
|
103
|
+
granted to You under this License for that Work shall terminate
|
|
104
|
+
as of the date such litigation is filed.
|
|
105
|
+
|
|
106
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
107
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
108
|
+
modifications, and in Source or Object form, provided that You
|
|
109
|
+
meet the following conditions:
|
|
110
|
+
|
|
111
|
+
(a) You must give any other recipients of the Work or
|
|
112
|
+
Derivative Works a copy of this License; and
|
|
113
|
+
|
|
114
|
+
(b) You must cause any modified files to carry prominent notices
|
|
115
|
+
stating that You changed the files; and
|
|
116
|
+
|
|
117
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
118
|
+
that You distribute, all copyright, patent, trademark, and
|
|
119
|
+
attribution notices from the Source form of the Work,
|
|
120
|
+
excluding those notices that do not pertain to any part of
|
|
121
|
+
the Derivative Works; and
|
|
122
|
+
|
|
123
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
124
|
+
distribution, then any Derivative Works that You distribute must
|
|
125
|
+
include a readable copy of the attribution notices contained
|
|
126
|
+
within such NOTICE file, excluding those notices that do not
|
|
127
|
+
pertain to any part of the Derivative Works, in at least one
|
|
128
|
+
of the following places: within a NOTICE text file distributed
|
|
129
|
+
as part of the Derivative Works; within the Source form or
|
|
130
|
+
documentation, if provided along with the Derivative Works; or,
|
|
131
|
+
within a display generated by the Derivative Works, if and
|
|
132
|
+
wherever such third-party notices normally appear. The contents
|
|
133
|
+
of the NOTICE file are for informational purposes only and
|
|
134
|
+
do not modify the License. You may add Your own attribution
|
|
135
|
+
notices within Derivative Works that You distribute, alongside
|
|
136
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
137
|
+
that such additional attribution notices cannot be construed
|
|
138
|
+
as modifying the License.
|
|
139
|
+
|
|
140
|
+
You may add Your own copyright statement to Your modifications and
|
|
141
|
+
may provide additional or different license terms and conditions
|
|
142
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
143
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
144
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
145
|
+
the conditions stated in this License.
|
|
146
|
+
|
|
147
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
148
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
149
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
150
|
+
this License, without any additional terms or conditions.
|
|
151
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
152
|
+
the terms of any separate license agreement you may have executed
|
|
153
|
+
with Licensor regarding such Contributions.
|
|
154
|
+
|
|
155
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
156
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
157
|
+
except as required for reasonable and customary use in describing the
|
|
158
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
159
|
+
|
|
160
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
161
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
162
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
163
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
164
|
+
implied, including, without limitation, any warranties or conditions
|
|
165
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
166
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
167
|
+
appropriateness of using or redistributing the Work and assume any
|
|
168
|
+
risks associated with Your exercise of permissions under this License.
|
|
169
|
+
|
|
170
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
171
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
172
|
+
unless required by applicable law (such as deliberate and grossly
|
|
173
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
174
|
+
liable to You for damages, including any direct, indirect, special,
|
|
175
|
+
incidental, or consequential damages of any character arising as a
|
|
176
|
+
result of this License or out of the use or inability to use the
|
|
177
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
178
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
179
|
+
other commercial damages or losses), even if such Contributor
|
|
180
|
+
has been advised of the possibility of such damages.
|
|
181
|
+
|
|
182
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
183
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
184
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
185
|
+
or other liability obligations and/or rights consistent with this
|
|
186
|
+
License. However, in accepting such obligations, You may act only
|
|
187
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
188
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
189
|
+
defend, and hold each Contributor harmless for any liability
|
|
190
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
191
|
+
of your accepting any such warranty or additional liability.
|
|
192
|
+
|
|
193
|
+
END OF TERMS AND CONDITIONS
|
|
194
|
+
|
|
195
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
196
|
+
|
|
197
|
+
To apply the Apache License to your work, attach the following
|
|
198
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
199
|
+
replaced with your own identifying information. (Don't include
|
|
200
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
201
|
+
comment syntax for the file format. We also recommend that a
|
|
202
|
+
file or class name and description of purpose be included on the
|
|
203
|
+
same "printed page" as the copyright notice for easier
|
|
204
|
+
identification within third-party archives.
|
|
205
|
+
|
|
206
|
+
Copyright [yyyy] [name of copyright owner]
|
|
207
|
+
|
|
208
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
209
|
+
you may not use this file except in compliance with the License.
|
|
210
|
+
You may obtain a copy of the License at
|
|
211
|
+
|
|
212
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
213
|
+
|
|
214
|
+
Unless required by applicable law or agreed to in writing, software
|
|
215
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
216
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
217
|
+
See the License for the specific language governing permissions and
|
|
218
|
+
limitations under the License.
|
package/dist/panel.js
CHANGED
|
@@ -2640,9 +2640,9 @@ var ProteusDevtools = (() => {
|
|
|
2640
2640
|
fgControls.appendChild(recBtn);
|
|
2641
2641
|
function restoreAt(index) {
|
|
2642
2642
|
const out = [];
|
|
2643
|
-
for (const [id,
|
|
2643
|
+
for (const [id, history2] of storePatchHistory) {
|
|
2644
2644
|
let state = null;
|
|
2645
|
-
for (const h of
|
|
2645
|
+
for (const h of history2) {
|
|
2646
2646
|
if (h.stepIndex <= index) state = h.state;
|
|
2647
2647
|
else break;
|
|
2648
2648
|
}
|
|
@@ -3437,7 +3437,7 @@ ${summary}
|
|
|
3437
3437
|
};
|
|
3438
3438
|
}
|
|
3439
3439
|
|
|
3440
|
-
// ../render-backend/
|
|
3440
|
+
// ../render-backend/src/headless.ts
|
|
3441
3441
|
function toPlainTree(root) {
|
|
3442
3442
|
return {
|
|
3443
3443
|
id: root.id,
|
|
@@ -3503,7 +3503,17 @@ ${summary}
|
|
|
3503
3503
|
"engineering.router-link": "router-link",
|
|
3504
3504
|
// ★G-32 B5 续二:工程原语动画组件形态(E19/E20)
|
|
3505
3505
|
"engineering.transition": "transition",
|
|
3506
|
-
"engineering.animate": "animate"
|
|
3506
|
+
"engineering.animate": "animate",
|
|
3507
|
+
// ★能力颗粒度对齐 C2
|
|
3508
|
+
"ui.progress": "progress",
|
|
3509
|
+
"ui.label": "label",
|
|
3510
|
+
"shell.page-container": "page-container",
|
|
3511
|
+
"ui.selection": "selection",
|
|
3512
|
+
"shell.keyboard-accessory": "keyboard-accessory",
|
|
3513
|
+
"ui.camera": "camera",
|
|
3514
|
+
"shell.webview": "webview",
|
|
3515
|
+
"shell.ad": "ad",
|
|
3516
|
+
"ui.map": "map"
|
|
3507
3517
|
};
|
|
3508
3518
|
var HEADLESS_CAPABILITIES = {
|
|
3509
3519
|
layout: "none",
|
|
@@ -3582,6 +3592,8 @@ ${summary}
|
|
|
3582
3592
|
}
|
|
3583
3593
|
};
|
|
3584
3594
|
}
|
|
3595
|
+
|
|
3596
|
+
// ../render-backend/src/flutter.ts
|
|
3585
3597
|
var WIDGET_MAP = {
|
|
3586
3598
|
view: "Container",
|
|
3587
3599
|
text: "Text",
|
|
@@ -3655,7 +3667,17 @@ ${summary}
|
|
|
3655
3667
|
"engineering.router-link": "TextButton",
|
|
3656
3668
|
// ★G-32 B5 续二:工程原语动画组件形态(E19/E20)
|
|
3657
3669
|
"engineering.transition": "AnimatedOpacity",
|
|
3658
|
-
"engineering.animate": "AnimationController"
|
|
3670
|
+
"engineering.animate": "AnimationController",
|
|
3671
|
+
// ★能力颗粒度对齐 C2
|
|
3672
|
+
"ui.progress": "LinearProgressIndicator",
|
|
3673
|
+
"ui.label": "Text.label",
|
|
3674
|
+
"shell.page-container": "showModalBottomSheet",
|
|
3675
|
+
"ui.selection": "SelectableText",
|
|
3676
|
+
"shell.keyboard-accessory": "KeyboardAccessoryView",
|
|
3677
|
+
"ui.camera": "CameraPreview",
|
|
3678
|
+
"shell.webview": "WebView",
|
|
3679
|
+
"shell.ad": "AdWidget",
|
|
3680
|
+
"ui.map": "GoogleMap"
|
|
3659
3681
|
};
|
|
3660
3682
|
function mapWidgetType(type) {
|
|
3661
3683
|
return WIDGET_MAP[type] ?? type;
|
|
@@ -3749,13 +3771,15 @@ ${summary}
|
|
|
3749
3771
|
}
|
|
3750
3772
|
};
|
|
3751
3773
|
}
|
|
3774
|
+
|
|
3775
|
+
// ../component-ir/src/schema.ts
|
|
3752
3776
|
var TAG_SEMANTIC_MAP = {
|
|
3753
3777
|
// G-32 ① 布局原语(12)
|
|
3754
3778
|
"p-box": "layout.box",
|
|
3755
3779
|
"p-inline": "layout.inline",
|
|
3756
3780
|
"p-stack": "layout.stack",
|
|
3757
3781
|
"p-grid": "layout.grid",
|
|
3758
|
-
|
|
3782
|
+
// ★Skyline 线收口:'p-fluid' 移除——layout.fluid 是 v-p-fluid **指令**语义(非标签),登记为标签会让 <p-fluid> 静默不渲染
|
|
3759
3783
|
"p-adaptive": "layout.adaptive",
|
|
3760
3784
|
"p-fit": "layout.fit",
|
|
3761
3785
|
"p-spacer": "layout.spacer",
|
|
@@ -3817,34 +3841,69 @@ ${summary}
|
|
|
3817
3841
|
"p-nav-bar": "ui.nav",
|
|
3818
3842
|
// ★G-31 B4 Fluid 体系扩展语义(有明确系统原生对应——原则 #10.8)
|
|
3819
3843
|
"p-safe": "layout.safe",
|
|
3820
|
-
"p-sidebar": "layout.sidebar"
|
|
3844
|
+
"p-sidebar": "layout.sidebar",
|
|
3845
|
+
// ★#405 语义登记批:剩余 10 组件全量入图(EXTRA_KIND 文档兑底退役)——
|
|
3846
|
+
// 9 个新语义(catalog planned L2:语义层待多端映射)+ p-scroll-view 复用 layout.scroll(p-view 先例)
|
|
3847
|
+
"p-aspect": "layout.aspect",
|
|
3848
|
+
"p-zone": "layout.zone",
|
|
3849
|
+
"p-loading": "ui.loading",
|
|
3850
|
+
"p-scale": "ui.scale",
|
|
3851
|
+
"p-skeleton": "ui.skeleton",
|
|
3852
|
+
"p-mask": "shell.mask",
|
|
3853
|
+
"p-popup": "shell.popup",
|
|
3854
|
+
"p-toolbar": "shell.toolbar",
|
|
3855
|
+
"p-scroll-view": "layout.scroll",
|
|
3856
|
+
// 滚动容器 = p-scroll 角色
|
|
3857
|
+
"p-error-boundary": "engineering.error-boundary",
|
|
3858
|
+
// E8 原语组件形态(useErrorBoundary API 形态并存)
|
|
3859
|
+
// ★能力颗粒度对齐 C2:新增真实组件
|
|
3860
|
+
"p-progress": "ui.progress",
|
|
3861
|
+
"p-label": "ui.label",
|
|
3862
|
+
"p-page-container": "shell.page-container",
|
|
3863
|
+
// ★权威标尺批 H:选区 / 键盘工具栏
|
|
3864
|
+
"p-selection": "ui.selection",
|
|
3865
|
+
"p-keyboard-accessory": "shell.keyboard-accessory",
|
|
3866
|
+
// ★权威标尺批 I:相机
|
|
3867
|
+
"p-camera": "ui.camera",
|
|
3868
|
+
// ★权威标尺批 J:内嵌网页 / 广告位
|
|
3869
|
+
"p-webview": "shell.webview",
|
|
3870
|
+
"p-ad": "shell.ad",
|
|
3871
|
+
"p-map": "ui.map"
|
|
3821
3872
|
};
|
|
3873
|
+
|
|
3874
|
+
// ../component-ir/src/to-ir.ts
|
|
3822
3875
|
function toComponentIR(tag, props = {}, children = []) {
|
|
3823
3876
|
if (!tag.startsWith("p-")) return null;
|
|
3824
3877
|
const semantic = TAG_SEMANTIC_MAP[tag];
|
|
3825
3878
|
if (!semantic) return null;
|
|
3826
3879
|
return { tag, semantic, props: { ...props }, children };
|
|
3827
3880
|
}
|
|
3881
|
+
|
|
3882
|
+
// ../component-ir/src/primitives.ts
|
|
3828
3883
|
var LAYOUT = [
|
|
3829
|
-
{ id: "L1", kind: "layout", semantic: "layout.box", tag: "p-box", props: ["aspectRatio", "overflow"], mpEquiv: "<view>", tier: "L1", status: "implemented" },
|
|
3884
|
+
{ id: "L1", kind: "layout", semantic: "layout.box", tag: "p-box", props: ["aspectRatio", "overflow", "hoverClass", "hoverStopPropagation", "hoverStartTime", "hoverStayTime"], mpEquiv: "<view>", tier: "L1", status: "implemented" },
|
|
3830
3885
|
{ id: "L2", kind: "layout", semantic: "layout.inline", tag: "p-inline", props: ["wrap"], mpEquiv: "<text> \u5185\u8054", tier: "L1", status: "implemented" },
|
|
3831
3886
|
{ 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" },
|
|
3832
3887
|
{ id: "L4", kind: "layout", semantic: "layout.grid", tag: "p-grid", props: ["minColWidth", "maxCols", "gap", "autoFlow"], mpEquiv: "<view> + CSS Grid", tier: "L1", status: "implemented" },
|
|
3833
|
-
|
|
3888
|
+
// ★Skyline 线收口:layout.fluid 由 v-p-fluid **指令**承载(非标签)——无 tag,避免 <p-fluid> 幽灵
|
|
3889
|
+
{ 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" },
|
|
3834
3890
|
{ 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" },
|
|
3835
3891
|
{ id: "L7", kind: "layout", semantic: "layout.fit", tag: "p-fit", props: ["mode"], mpEquiv: "fit-content", tier: "L1", status: "implemented" },
|
|
3836
3892
|
{ id: "L8", kind: "layout", semantic: "layout.spacer", tag: "p-spacer", props: ["grow", "shrink"], mpEquiv: "flex:1", tier: "L1", status: "implemented" },
|
|
3837
3893
|
{ id: "L9", kind: "layout", semantic: "layout.divider", tag: "p-divider", props: ["orientation", "inset"], mpEquiv: "<view> + border", tier: "L1", status: "implemented" },
|
|
3838
|
-
{ id: "L10", kind: "layout", semantic: "layout.scroll", tag: "p-scroll", props: ["axis", "paging", "refresh", "indicator"], mpEquiv: "<scroll-view>", tier: "L1", status: "implemented" },
|
|
3894
|
+
{ 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" },
|
|
3839
3895
|
{ 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" },
|
|
3840
|
-
{ id: "L12", kind: "layout", semantic: "layout.masonry", tag: "p-masonry", props: ["colCount", "gap"], mpEquiv: "\u7B2C\u4E09\u65B9\u7011\u5E03\u6D41", tier: "L1", status: "implemented" }
|
|
3896
|
+
{ 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
|
+
// ★#405 语义登记批:Fluid 体系剩余组件(语义层待多端映射 → planned L2——G-31.4 不足 3 端降级)
|
|
3898
|
+
{ 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" }
|
|
3841
3900
|
];
|
|
3842
3901
|
var UI = [
|
|
3843
|
-
{ id: "U1", kind: "ui", semantic: "ui.text", tag: "p-text", props: ["content", "selectable", "truncate", "align"], mpEquiv: "<text>", tier: "L1", status: "implemented" },
|
|
3902
|
+
{ 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" },
|
|
3844
3903
|
{ id: "U2", kind: "ui", semantic: "ui.heading", tag: "p-heading", props: ["level"], mpEquiv: "<h1>-<h6>", tier: "L1", status: "implemented" },
|
|
3845
3904
|
{ id: "U3", kind: "ui", semantic: "ui.rich-text", tag: "p-rich-text", props: ["source", "schema"], mpEquiv: "<rich-text>", tier: "L1", status: "implemented" },
|
|
3846
|
-
{ id: "U4", kind: "ui", semantic: "ui.icon", tag: "p-icon", props: ["name", "size", "color", "spin"], mpEquiv: "<icon>", tier: "L1", status: "implemented" },
|
|
3847
|
-
{ id: "U5", kind: "ui", semantic: "ui.image", tag: "p-image", props: ["src", "fit", "placeholder", "lazy"], mpEquiv: "<image>", tier: "L1", status: "implemented" },
|
|
3905
|
+
{ id: "U4", kind: "ui", semantic: "ui.icon", tag: "p-icon", props: ["name", "type", "size", "color", "spin"], mpEquiv: "<icon>", tier: "L1", status: "implemented" },
|
|
3906
|
+
{ 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" },
|
|
3848
3907
|
{ id: "U6", kind: "ui", semantic: "ui.avatar", tag: "p-avatar", props: ["src", "shape", "size", "fallback"], mpEquiv: "\u7EC4\u5408", tier: "L1", status: "implemented" },
|
|
3849
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" },
|
|
3850
3909
|
{ id: "U8", kind: "ui", semantic: "ui.canvas", tag: "p-canvas", props: ["engine", "resolution"], mpEquiv: "<canvas>", tier: "L1", status: "implemented" },
|
|
@@ -3856,12 +3915,25 @@ ${summary}
|
|
|
3856
3915
|
{ id: "U14", kind: "ui", semantic: "ui.radio", tag: "p-radio", props: ["value", "group"], mpEquiv: "<radio>", tier: "L1", status: "implemented" },
|
|
3857
3916
|
{ id: "U15", kind: "ui", semantic: "ui.switch", tag: "p-switch", props: ["checked", "loading"], mpEquiv: "<switch>", tier: "L1", status: "implemented" },
|
|
3858
3917
|
{ id: "U16", kind: "ui", semantic: "ui.slider", tag: "p-slider", props: ["min", "max", "step", "range"], mpEquiv: "<slider>", tier: "L1", status: "implemented" },
|
|
3859
|
-
{ id: "U17", kind: "ui", semantic: "ui.picker", tag: "p-picker", props: ["mode", "start", "end"], mpEquiv: "<picker>", tier: "L1", status: "implemented" },
|
|
3860
|
-
{ id: "U18", kind: "ui", semantic: "ui.form", tag: "p-form", props: ["model", "rules", "layout"], mpEquiv: "\u7EC4\u5408", tier: "L1", status: "implemented" }
|
|
3918
|
+
{ 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" },
|
|
3919
|
+
{ id: "U18", kind: "ui", semantic: "ui.form", tag: "p-form", props: ["model", "rules", "layout"], mpEquiv: "\u7EC4\u5408", tier: "L1", status: "implemented" },
|
|
3920
|
+
// ★#405 语义登记批:反馈/状态类组件
|
|
3921
|
+
{ id: "U19", kind: "ui", semantic: "ui.loading", tag: "p-loading", props: ["size", "text"], mpEquiv: "wx.showLoading \u90E8\u5206", tier: "L2", status: "planned" },
|
|
3922
|
+
{ 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" },
|
|
3923
|
+
{ id: "U21", kind: "ui", semantic: "ui.skeleton", tag: "p-skeleton", props: ["rows", "avatar", "animated"], mpEquiv: "\u65E0", tier: "L2", status: "planned" },
|
|
3924
|
+
// ★能力颗粒度对齐 C2:进度条 / 表单标签
|
|
3925
|
+
{ id: "U22", kind: "ui", semantic: "ui.progress", tag: "p-progress", props: ["percent", "status", "type", "strokeWidth", "showInfo"], mpEquiv: "<progress>", tier: "L1", status: "implemented" },
|
|
3926
|
+
{ id: "U23", kind: "ui", semantic: "ui.label", tag: "p-label", props: ["for", "block"], mpEquiv: "<label>", tier: "L1", status: "implemented" },
|
|
3927
|
+
// ★权威标尺批 H:局部文本选区
|
|
3928
|
+
{ id: "U24", kind: "ui", semantic: "ui.selection", tag: "p-selection", props: ["disableContextMenu", "selectable"], mpEquiv: "<selection>", tier: "L1", status: "implemented" },
|
|
3929
|
+
// ★权威标尺批 I:相机
|
|
3930
|
+
{ id: "U25", kind: "ui", semantic: "ui.camera", tag: "p-camera", props: ["devicePosition", "flash", "aspectRatio"], mpEquiv: "<camera>", tier: "L1", status: "implemented" },
|
|
3931
|
+
// ★权威标尺批 J:地图
|
|
3932
|
+
{ id: "U26", kind: "ui", semantic: "ui.map", tag: "p-map", props: ["latitude", "longitude", "scale", "markers"], mpEquiv: "<map>", tier: "L1", status: "implemented" }
|
|
3861
3933
|
];
|
|
3862
3934
|
var SHELL = [
|
|
3863
3935
|
{ id: "S1", kind: "shell", semantic: "shell.page", tag: "p-page", props: ["title", "statusBar", "pullRefresh"], mpEquiv: "<page>", tier: "L1", status: "implemented" },
|
|
3864
|
-
{ id: "S2", kind: "shell", semantic: "shell.nav", tag: "p-nav", props: ["title", "transparent"], mpEquiv: "\u5BFC\u822A\u680F\u914D\u7F6E", tier: "L1", status: "implemented" },
|
|
3936
|
+
{ 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" },
|
|
3865
3937
|
{ id: "S3", kind: "shell", semantic: "shell.tabbar", tag: "p-tabbar", props: ["tabs", "active", "badge"], mpEquiv: "<tabbar>", tier: "L1", status: "implemented" },
|
|
3866
3938
|
{ id: "S4", kind: "shell", semantic: "shell.segment", tag: "p-segment", props: ["options", "active"], mpEquiv: "<segment>", tier: "L1", status: "implemented" },
|
|
3867
3939
|
{ id: "S5", kind: "shell", semantic: "shell.drawer", tag: "p-drawer", props: ["side", "width", "overlay"], mpEquiv: "\u7EC4\u5408", tier: "L1", status: "implemented" },
|
|
@@ -3869,8 +3941,19 @@ ${summary}
|
|
|
3869
3941
|
{ id: "S7", kind: "shell", semantic: "shell.popover", tag: "p-popover", props: ["trigger", "placement"], mpEquiv: "\u7EC4\u5408", tier: "L1", status: "implemented" },
|
|
3870
3942
|
{ id: "S8", kind: "shell", semantic: "shell.toast", tag: "p-toast", props: ["message", "duration", "type"], mpEquiv: "wx.showToast", tier: "L1", status: "planned" },
|
|
3871
3943
|
{ id: "S9", kind: "shell", semantic: "shell.action-sheet", tag: "p-action-sheet", props: ["actions", "cancel"], mpEquiv: "wx.showActionSheet", tier: "L1", status: "implemented" },
|
|
3872
|
-
{ 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" }
|
|
3944
|
+
{ 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" },
|
|
3873
3945
|
// ★已落地绑定:分栏语义由 layout.split 承载(G-32 文档为 shell.split——机器事实以实现为准)
|
|
3946
|
+
// ★#405 语义登记批:弹层/工具栏组件
|
|
3947
|
+
{ 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" },
|
|
3948
|
+
{ 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" },
|
|
3949
|
+
{ 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" },
|
|
3950
|
+
// ★能力颗粒度对齐 C2:页面容器(对齐小程序 <page-container>)
|
|
3951
|
+
{ 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" },
|
|
3952
|
+
// ★权威标尺批 H:键盘上方工具栏
|
|
3953
|
+
{ id: "S15", kind: "shell", semantic: "shell.keyboard-accessory", tag: "p-keyboard-accessory", props: ["visible", "maxHeight", "background"], mpEquiv: "<keyboard-accessory>", tier: "L1", status: "implemented" },
|
|
3954
|
+
// ★权威标尺批 J:内嵌网页 / 广告位
|
|
3955
|
+
{ 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" }
|
|
3874
3957
|
];
|
|
3875
3958
|
var GESTURE = [
|
|
3876
3959
|
{ id: "G1", kind: "gesture", semantic: "gesture.tap", api: "v-gesture:tap", props: ["count"], mpEquiv: "bindtap", tier: "L1", status: "planned" },
|
|
@@ -3942,7 +4025,49 @@ ${summary}
|
|
|
3942
4025
|
{ id: "C47", kind: "capability", semantic: "capability.mini-program", api: "useMiniProgram()", props: ["MPContext"], mpEquiv: "wx.navigateToMiniProgram", tier: "L1", status: "planned" },
|
|
3943
4026
|
{ id: "C48", kind: "capability", semantic: "capability.embedded", api: "useEmbedded()", props: ["HostContext"], mpEquiv: "\u65E0\uFF08\u88AB\u5BBF\u4E3B\u5D4C\u5165\uFF09", tier: "L1", status: "planned" },
|
|
3944
4027
|
{ id: "C49", kind: "capability", semantic: "capability.live", api: "useLive()", props: ["LiveRoom"], mpEquiv: "wx...\uFF08\u76F4\u64AD\u7EC4\u4EF6\uFF09", tier: "L1", status: "planned" },
|
|
3945
|
-
{ 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" }
|
|
4028
|
+
{ 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" },
|
|
4029
|
+
// ★颗粒度对齐 C(2026-09-11):C51 小程序热更新(wx.getUpdateManager)
|
|
4030
|
+
{ id: "C51", kind: "capability", semantic: "capability.update", api: "useUpdate()", props: ["UpdateManagerAPI"], mpEquiv: "wx.getUpdateManager", tier: "L1", status: "planned" },
|
|
4031
|
+
// ★颗粒度对齐 C3(2026-09-11):相册 / Worker(对齐小程序媒体与多线程 API——纯 Hook,无 C-IR 节点 → planned)
|
|
4032
|
+
{ id: "C52", kind: "capability", semantic: "capability.album", api: "useAlbum()", props: ["AlbumAPI"], mpEquiv: "wx.chooseMedia/saveImageToPhotosAlbum/previewMedia", tier: "L1", status: "planned" },
|
|
4033
|
+
{ id: "C53", kind: "capability", semantic: "capability.worker", api: "useWorker()", props: ["WorkerHandle"], mpEquiv: "wx.createWorker", tier: "L1", status: "planned" },
|
|
4034
|
+
// ★颗粒度对齐 C3 批 2:收货地址 / WiFi / 微信运动(对齐小程序系统 API——纯 Hook → planned)
|
|
4035
|
+
{ id: "C54", kind: "capability", semantic: "capability.address", api: "useAddress()", props: ["ShippingAddress"], mpEquiv: "wx.chooseAddress", tier: "L1", status: "planned" },
|
|
4036
|
+
{ id: "C55", kind: "capability", semantic: "capability.wifi", api: "useWifi()", props: ["WifiAPI"], mpEquiv: "wx.getConnectedWifi/getWifiList/connectWifi", tier: "L1", status: "planned" },
|
|
4037
|
+
{ id: "C56", kind: "capability", semantic: "capability.we-run", api: "useWeRun()", props: ["WeRunData"], mpEquiv: "wx.getWeRunData", tier: "L1", status: "planned" },
|
|
4038
|
+
// ★组件实例 API 对齐(2026-09-12):画布组件实例(wx.createCanvasContext/SelectorQuery node/canvasToTempFilePath/OffscreenCanvas;纯 Hook → planned)
|
|
4039
|
+
{ id: "C57", kind: "capability", semantic: "capability.canvas", api: "useCanvas()", props: ["CanvasController"], mpEquiv: "wx.createCanvasContext/canvasToTempFilePath/createOffscreenCanvas", tier: "L1", status: "planned" },
|
|
4040
|
+
// ★组件实例 API 对齐(2026-09-12):元素查询 / 交叉观察 / 媒体查询(wx SelectorQuery/IntersectionObserver/MediaQueryObserver)
|
|
4041
|
+
{ id: "C58", kind: "capability", semantic: "capability.element-query", api: "useElement()", props: ["ElementQuery"], mpEquiv: "wx.createSelectorQuery", tier: "L1", status: "planned" },
|
|
4042
|
+
{ id: "C59", kind: "capability", semantic: "capability.intersection", api: "useIntersection()", props: ["IntersectionHandle"], mpEquiv: "wx.createIntersectionObserver", tier: "L1", status: "planned" },
|
|
4043
|
+
{ id: "C60", kind: "capability", semantic: "capability.media-query", api: "useMediaQuery()", props: ["MediaQueryObserver"], mpEquiv: "wx.createMediaQueryObserver", tier: "L1", status: "planned" },
|
|
4044
|
+
// ★组件实例 API 对齐(2026-09-12):媒体组件实例 + 广告(wx VideoContext/InnerAudioContext/LivePusherContext + 广告联盟)
|
|
4045
|
+
{ id: "C61", kind: "capability", semantic: "capability.video", api: "useVideo()", props: ["VideoController"], mpEquiv: "wx.createVideoContext", tier: "L1", status: "planned" },
|
|
4046
|
+
{ id: "C62", kind: "capability", semantic: "capability.audio", api: "useAudio()", props: ["AudioController"], mpEquiv: "wx.createInnerAudioContext", tier: "L1", status: "planned" },
|
|
4047
|
+
{ id: "C63", kind: "capability", semantic: "capability.live-pusher", api: "useLivePusher()", props: ["LivePusherController"], mpEquiv: "wx.createLivePusherContext", tier: "L1", status: "planned" },
|
|
4048
|
+
{ id: "C64", kind: "capability", semantic: "capability.ad", api: "useAd()", props: ["AdAPI"], mpEquiv: "wx.createRewardedVideoAd/createInterstitialAd/createBannerAd", tier: "L1", status: "planned" },
|
|
4049
|
+
// ★权威标尺缺口补齐(2026-09-12):隐私协议(wx.getPrivacySetting/openPrivacyContract/requirePrivacyAuthorize——合规刚需)
|
|
4050
|
+
{ id: "C65", kind: "capability", semantic: "capability.privacy", api: "usePrivacy()", props: ["PrivacyAPI"], mpEquiv: "wx.getPrivacySetting/openPrivacyContract/requirePrivacyAuthorize", tier: "L1", status: "planned" },
|
|
4051
|
+
// ★权威标尺缺口补齐批 D(2026-09-12):性能 / 预加载 / 图像编辑(通用能力,无资质门槛)
|
|
4052
|
+
{ id: "C66", kind: "capability", semantic: "capability.performance", api: "usePerformance()", props: ["PerformanceAPI"], mpEquiv: "wx.getPerformance/reportPerformance", tier: "L1", status: "planned" },
|
|
4053
|
+
{ id: "C67", kind: "capability", semantic: "capability.preload", api: "usePreload()", props: ["PreloadAPI"], mpEquiv: "wx.preloadAssets/preloadSkylineView/preloadWebview/preDownloadSubpackage", tier: "L1", status: "planned" },
|
|
4054
|
+
{ id: "C68", kind: "capability", semantic: "capability.image-edit", api: "useImageEdit()", props: ["ImageEditAPI"], mpEquiv: "wx.cropImage/editImage", tier: "L1", status: "planned" },
|
|
4055
|
+
// ★权威标尺缺口补齐批 E(2026-09-12):网络底层 / 媒体高级
|
|
4056
|
+
{ id: "C69", kind: "capability", semantic: "capability.socket", api: "useSocket()", props: ["UDPSocketHandle / TCPSocketHandle"], mpEquiv: "wx.createUDPSocket/createTCPSocket", tier: "L1", status: "planned" },
|
|
4057
|
+
{ id: "C70", kind: "capability", semantic: "capability.media-processing", api: "useMediaProcessing()", props: ["MediaProcessingAPI"], mpEquiv: "wx.createMediaContainer/createVideoDecoder/createMediaAudioPlayer", tier: "L1", status: "planned" },
|
|
4058
|
+
// ★权威标尺缺口补齐批 F(2026-09-12):录屏/缓存/空闲/窗口/导航拦截
|
|
4059
|
+
{ id: "C71", kind: "capability", semantic: "capability.screen-capture", api: "useScreenCapture()", props: ["ScreenCaptureAPI"], mpEquiv: "wx.getScreenRecordingState/onScreenRecordingStateChanged/onUserCaptureScreen/checkIsPictureInPictureActive", tier: "L1", status: "planned" },
|
|
4060
|
+
{ id: "C72", kind: "capability", semantic: "capability.cache-manager", api: "useCacheManager()", props: ["CacheManagerHandle"], mpEquiv: "wx.createCacheManager", tier: "L1", status: "planned" },
|
|
4061
|
+
{ id: "C73", kind: "capability", semantic: "capability.idle", api: "useIdle()", props: ["IdleAPI"], mpEquiv: "wx.requestIdleCallback/cancelIdleCallback", tier: "L1", status: "planned" },
|
|
4062
|
+
{ id: "C74", kind: "capability", semantic: "capability.window", api: "useWindow()", props: ["WindowAPI"], mpEquiv: "wx.setWindowSize", tier: "L1", status: "planned" },
|
|
4063
|
+
{ id: "C75", kind: "capability", semantic: "capability.navigation-guard", api: "useNavigationGuard()", props: ["NavigationGuardAPI"], mpEquiv: "wx.enableAlertBeforeUnload/disableAlertBeforeUnload", tier: "L1", status: "planned" },
|
|
4064
|
+
// ★权威标尺缺口补齐批 G(2026-09-12):AR/XR / iBeacon / 局域网 / 翻译 / 海报 / 设备探测
|
|
4065
|
+
{ id: "C76", kind: "capability", semantic: "capability.ar", api: "useAR()", props: ["ARAPI"], mpEquiv: "wx.createVKSession/isVKSupport", tier: "L1", status: "planned" },
|
|
4066
|
+
{ id: "C77", kind: "capability", semantic: "capability.beacon", api: "useBeacon()", props: ["BeaconAPI"], mpEquiv: "wx.onBeaconServiceChange/onBeaconUpdate", tier: "L1", status: "planned" },
|
|
4067
|
+
{ id: "C78", kind: "capability", semantic: "capability.local-service", api: "useLocalService()", props: ["LocalServiceAPI"], mpEquiv: "wx.onLocalServiceFound/Lost/ResolveFail/DiscoveryStop", tier: "L1", status: "planned" },
|
|
4068
|
+
{ id: "C79", kind: "capability", semantic: "capability.translation", api: "useTranslation()", props: ["TranslationAPI"], mpEquiv: "wx.onUserTriggerTranslation/onUserOffTranslation", tier: "L1", status: "planned" },
|
|
4069
|
+
{ id: "C80", kind: "capability", semantic: "capability.poster", api: "usePoster()", props: ["PosterAPI"], mpEquiv: "wx.onGeneratePoster", tier: "L1", status: "planned" },
|
|
4070
|
+
{ id: "C81", kind: "capability", semantic: "capability.device-capability", api: "useDeviceCapability()", props: ["DeviceCapabilityAPI"], mpEquiv: "wx.checkDeviceSupportHevc", tier: "L1", status: "planned" }
|
|
3946
4071
|
];
|
|
3947
4072
|
var ENGINEERING = [
|
|
3948
4073
|
{ id: "E1", kind: "engineering", semantic: "engineering.state", api: "useState()", mpEquiv: "data", tier: "L1", status: "planned" },
|
|
@@ -3952,7 +4077,8 @@ ${summary}
|
|
|
3952
4077
|
{ id: "E5", kind: "engineering", semantic: "engineering.provide-inject", api: "useProvide()/useInject()", mpEquiv: "\u65E0", tier: "L1", status: "planned" },
|
|
3953
4078
|
{ id: "E6", kind: "engineering", semantic: "engineering.lifecycle", api: "useLifecycle()", mpEquiv: "onLoad/onShow/onHide/onUnload", tier: "L1", status: "planned" },
|
|
3954
4079
|
{ id: "E7", kind: "engineering", semantic: "engineering.ready", api: "useReady()", mpEquiv: "onReady", tier: "L1", status: "planned" },
|
|
3955
|
-
{ id: "E8", kind: "engineering", semantic: "engineering.error-boundary", api: "useErrorBoundary()", mpEquiv: "onError", tier: "L1", status: "planned" },
|
|
4080
|
+
{ id: "E8", kind: "engineering", semantic: "engineering.error-boundary", api: "useErrorBoundary()", tag: "p-error-boundary", mpEquiv: "onError", tier: "L1", status: "planned" },
|
|
4081
|
+
// ★#405:组件形态补登(双形态:Hook + p- 标签)
|
|
3956
4082
|
{ id: "E9", kind: "engineering", semantic: "engineering.page-param", api: "usePageParam()", mpEquiv: "onLoad(options)", tier: "L1", status: "planned" },
|
|
3957
4083
|
{ id: "E10", kind: "engineering", semantic: "engineering.route", api: "useRoute()", mpEquiv: "getCurrentPages()", tier: "L1", status: "planned" },
|
|
3958
4084
|
{ id: "E11", kind: "engineering", semantic: "engineering.router-push", api: "router.push()", mpEquiv: "wx.navigateTo", tier: "L1", status: "planned" },
|
|
@@ -3962,7 +4088,7 @@ ${summary}
|
|
|
3962
4088
|
{ id: "E15", kind: "engineering", semantic: "engineering.router-relaunch", api: "router.reLaunch()", mpEquiv: "wx.reLaunch", tier: "L1", status: "planned" },
|
|
3963
4089
|
{ id: "E16", kind: "engineering", semantic: "engineering.router-before-each", api: "router.beforeEach()", mpEquiv: "onLaunch \u624B\u52A8", tier: "L1", status: "planned" },
|
|
3964
4090
|
{ id: "E17", kind: "engineering", semantic: "engineering.router-after-each", api: "router.afterEach()", mpEquiv: "\u65E0", tier: "L1", status: "planned" },
|
|
3965
|
-
{ id: "E18", kind: "engineering", semantic: "engineering.router-link", tag: "p-router-link", props: ["to", "replace", "switchTab"], mpEquiv: "<navigator>", tier: "L1", status: "implemented" },
|
|
4091
|
+
{ 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" },
|
|
3966
4092
|
{ id: "E19", kind: "engineering", semantic: "engineering.transition", tag: "p-transition", props: ["name", "mode"], mpEquiv: "transition CSS", tier: "L1", status: "implemented" },
|
|
3967
4093
|
{ id: "E20", kind: "engineering", semantic: "engineering.animate", tag: "p-animate", props: ["keyframes", "duration"], mpEquiv: "animation CSS", tier: "L1", status: "implemented" },
|
|
3968
4094
|
{ id: "E21", kind: "engineering", semantic: "engineering.animation", api: "useAnimation()", mpEquiv: "wx.createAnimation", tier: "L1", status: "planned" },
|
|
@@ -3975,6 +4101,8 @@ ${summary}
|
|
|
3975
4101
|
{ id: "E28", kind: "engineering", semantic: "engineering.define-capability", api: "defineCapability()", mpEquiv: "\u65E0", tier: "L1", status: "planned" }
|
|
3976
4102
|
];
|
|
3977
4103
|
var PRIMITIVE_CATALOG = [...LAYOUT, ...UI, ...SHELL, ...GESTURE, ...CAPABILITY, ...ENGINEERING];
|
|
4104
|
+
|
|
4105
|
+
// ../component-ir/src/audit.ts
|
|
3978
4106
|
var MP_COMPONENTS = [
|
|
3979
4107
|
{ mp: "<view>", proteus: "layout.box / layout.stack", status: "ok", group: "component" },
|
|
3980
4108
|
{ mp: "<text>", proteus: "ui.text / ui.heading", status: "ok", group: "component" },
|
|
@@ -3984,10 +4112,10 @@ ${summary}
|
|
|
3984
4112
|
{ mp: "<swiper-item>", proteus: "layout.stack \u5B50\u9879", status: "ok", group: "component" },
|
|
3985
4113
|
{ mp: "<movable-area>", proteus: "gesture.scrollable \u5BB9\u5668", status: "ok", group: "component" },
|
|
3986
4114
|
{ mp: "<movable-view>", proteus: "gesture.draggable", status: "ok", group: "component" },
|
|
3987
|
-
{ mp: "<cover-view>", proteus: "
|
|
3988
|
-
{ mp: "<cover-image>", proteus: "
|
|
4115
|
+
{ 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" },
|
|
4116
|
+
{ mp: "<cover-image>", proteus: "ui.image\uFF08\u540C\u5C42\u6E32\u67D3\u540E image \u5373\u53EF\u8986\u76D6\uFF09", status: "ok", group: "component" },
|
|
3989
4117
|
{ mp: "<icon>", proteus: "ui.icon", status: "ok", group: "component" },
|
|
3990
|
-
{ mp: "<progress>", proteus: "
|
|
4118
|
+
{ mp: "<progress>", proteus: "ui.progress", status: "ok", group: "component" },
|
|
3991
4119
|
{ mp: "<rich-text>", proteus: "ui.rich-text", status: "ok", group: "component" },
|
|
3992
4120
|
{ mp: "<button>", proteus: "ui.button", status: "ok", group: "component" },
|
|
3993
4121
|
{ mp: "<form>", proteus: "ui.form", status: "ok", group: "component" },
|
|
@@ -3999,58 +4127,107 @@ ${summary}
|
|
|
3999
4127
|
{ mp: "<picker-view>", proteus: "ui.picker mode=wheel", status: "ok", group: "component" },
|
|
4000
4128
|
{ mp: "<slider>", proteus: "ui.slider", status: "ok", group: "component" },
|
|
4001
4129
|
{ mp: "<switch>", proteus: "ui.switch", status: "ok", group: "component" },
|
|
4002
|
-
{ mp: "<label>", proteus: "
|
|
4130
|
+
{ mp: "<label>", proteus: "ui.label", status: "ok", group: "component" },
|
|
4003
4131
|
{ mp: "<navigator>", proteus: "engineering.router-link / router.*", status: "ok", group: "component" },
|
|
4004
4132
|
{ mp: "<audio>", proteus: "ui.media kind=audio\uFF08\u6D88\u706D\u4E3A\u5C5E\u6027\uFF09", status: "ok", group: "component" },
|
|
4005
4133
|
{ mp: "<video>", proteus: "ui.media kind=video\uFF08\u6D88\u706D\u4E3A\u5C5E\u6027\uFF09", status: "ok", group: "component" },
|
|
4006
|
-
{ mp: "<camera>", proteus: "
|
|
4134
|
+
{ mp: "<camera>", proteus: "ui.camera\uFF08p-camera\uFF09+ useCamera", status: "ok", group: "component" },
|
|
4007
4135
|
{ mp: "<live-player>", proteus: "ui.media kind=live\uFF08\u6D88\u706D\u4E3A\u5C5E\u6027\uFF09", status: "ok", group: "component" },
|
|
4008
4136
|
{ mp: "<live-pusher>", proteus: "ui.media kind=live mode=push", status: "ok", group: "component" },
|
|
4009
4137
|
{ mp: "<canvas>", proteus: "ui.canvas", status: "ok", group: "component" },
|
|
4010
|
-
{ mp: "<map>", proteus: "
|
|
4011
|
-
{ mp: "<web-view>", proteus: "
|
|
4138
|
+
{ mp: "<map>", proteus: "ui.map\uFF08p-map\uFF09+ useMap", status: "ok", group: "component" },
|
|
4139
|
+
{ mp: "<web-view>", proteus: "shell.webview\uFF08p-webview\uFF09+ \u5BBF\u4E3B\u6865", status: "ok", group: "component" },
|
|
4012
4140
|
{ mp: "<editor>", proteus: "ui.rich-text editable", status: "ok", group: "component" },
|
|
4013
|
-
{ mp: "<ad>", proteus: "
|
|
4014
|
-
{ mp: "<official-account>", proteus: "
|
|
4015
|
-
{ mp: "<open-data>", proteus: "
|
|
4016
|
-
{ mp: "<share-element>", proteus: "p-share-element
|
|
4017
|
-
{ mp: "<aria-component>", proteus: "
|
|
4018
|
-
{ mp: "<page-container>", proteus: "
|
|
4019
|
-
{ mp: "<voip-room>", proteus: "
|
|
4020
|
-
{ mp: "<guild-room>", proteus: "
|
|
4141
|
+
{ mp: "<ad>", proteus: "shell.ad\uFF08p-ad\uFF09", status: "ok", group: "component" },
|
|
4142
|
+
{ mp: "<official-account>", proteus: "useMiniProgram\uFF08\u5FAE\u4FE1\u79C1\u6709\uFF09", status: "private", group: "component" },
|
|
4143
|
+
{ 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 },
|
|
4145
|
+
{ 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
|
+
{ mp: "<page-container>", proteus: "shell.page-container", status: "ok", group: "component" },
|
|
4147
|
+
{ mp: "<voip-room>", proteus: "useMiniProgram\uFF08\u5FAE\u4FE1 VOIP\uFF09", status: "private", group: "component" },
|
|
4148
|
+
{ mp: "<guild-room>", proteus: "useMiniProgram\uFF08\u5FAE\u4FE1\u6E38\u620F\uFF09", status: "private", group: "component" },
|
|
4149
|
+
// ★2026-09-11 补齐:此前矩阵漏列的真实微信内置组件(Skyline 族为主)——有等价能力标 ok/compat,无则 missing
|
|
4150
|
+
{ mp: "<match-media>", proteus: "p-adaptive / p-zone\uFF08\u5BB9\u5668\u65AD\u70B9\u66FF\u4EE3\uFF09", status: "ok", group: "component" },
|
|
4151
|
+
{ mp: "<navigation-bar>", proteus: "shell.nav\uFF08p-nav-bar \u81EA\u7ED8\uFF09", status: "ok", group: "component" },
|
|
4152
|
+
{ mp: "<keyframe-animation>", proteus: "engineering.animate / engineering.transition", status: "ok", group: "component" },
|
|
4153
|
+
{ mp: "<list-view>", proteus: "layout.virtual-list\uFF08p-list-view \u56DE\u6536\uFF09", status: "ok", group: "component" },
|
|
4154
|
+
{ mp: "<grid-view>", proteus: "layout.grid / layout.virtual-list", status: "ok", group: "component" },
|
|
4155
|
+
{ mp: "<snapshot>", proteus: "ui.canvas\uFF08\u622A\u56FE\u7ECF OffscreenCanvas\uFF09", status: "compat", group: "component" },
|
|
4156
|
+
{ mp: "<page-meta>", proteus: "shell.page\uFF08\u9875\u9762\u914D\u7F6E\u5C5E\u6027\uFF09", status: "compat", group: "component" },
|
|
4157
|
+
{ mp: "<root-portal>", proteus: "engineering.transition\uFF08teleport\u2192root-portal \u7F16\u8BD1\u671F\uFF09", status: "ok", group: "component" },
|
|
4158
|
+
{ mp: "<sticky-header>", proteus: "layout.scroll + sticky\uFF08CSS\uFF09", status: "compat", group: "component" },
|
|
4159
|
+
{ mp: "<sticky-section>", proteus: "layout.scroll + sticky\uFF08CSS\uFF09", status: "compat", group: "component" },
|
|
4160
|
+
{ mp: "<double-tap-gesture>", proteus: "gesture.draggable\uFF08p-draggable \u624B\u52BF\u8BC6\u522B\u5668\uFF09", status: "ok", group: "component" },
|
|
4161
|
+
{ mp: "<functional-page-navigator>", proteus: "\u2014\uFF08\u5FAE\u4FE1\u63D2\u4EF6\u9875\u4E13\u5C5E\uFF0C\u975E\u76EE\u6807\uFF09", status: "private", group: "component" },
|
|
4162
|
+
{ mp: "<open-container>", proteus: "\u2014\uFF08\u5FAE\u4FE1\u5F00\u5C4F\u5BB9\u5668\uFF0C\u79C1\u6709\uFF09", status: "private", group: "component" },
|
|
4163
|
+
// ★权威标尺批 H:局部文本选区 / 键盘上方工具栏(全端真实落地)
|
|
4164
|
+
{ mp: "<selection>", proteus: "ui.selection\uFF08p-selection\uFF09", status: "ok", group: "component" },
|
|
4165
|
+
{ mp: "<keyboard-accessory>", proteus: "shell.keyboard-accessory\uFF08p-keyboard-accessory\uFF09", status: "ok", group: "component" }
|
|
4021
4166
|
];
|
|
4022
4167
|
var MP_API_GROUPS = [
|
|
4023
|
-
{ mp: "wx.request/upload/download/websocket\uFF08\u7F51\u7EDC\uFF09", proteus: "
|
|
4024
|
-
{ mp: "wx.requestPayment", proteus: "
|
|
4025
|
-
{ mp: "wx.chooseImage/chooseMedia/previewImage\uFF08\u5A92\u4F53\uFF09", proteus: "
|
|
4026
|
-
{ mp: "wx.startRecord/RecorderManager\uFF08\u5F55\u97F3\uFF09", proteus: "
|
|
4027
|
-
{ mp: "wx.createVideoContext/CameraContext", proteus: "
|
|
4028
|
-
{ mp: "wx.scanCode", proteus: "
|
|
4029
|
-
{ mp: "wx.saveImageToPhotosAlbum", proteus: "
|
|
4030
|
-
{ mp: "wx.
|
|
4031
|
-
{ mp: "wx.
|
|
4032
|
-
{ mp: "wx.
|
|
4033
|
-
{ mp: "wx.
|
|
4034
|
-
|
|
4035
|
-
{ mp: "wx.
|
|
4036
|
-
{ mp: "wx.
|
|
4037
|
-
{ mp: "wx.
|
|
4038
|
-
{ mp: "wx.
|
|
4039
|
-
{ mp: "wx.
|
|
4168
|
+
{ mp: "wx.request/upload/download/websocket\uFF08\u7F51\u7EDC\uFF09", proteus: "useFetch / useUpload / useDownload / useWebSocket / useSocketTask", status: "ok", group: "api" },
|
|
4169
|
+
{ mp: "wx.requestPayment", proteus: "usePayment", status: "ok", group: "api" },
|
|
4170
|
+
{ mp: "wx.chooseImage/chooseMedia/previewImage\uFF08\u5A92\u4F53\uFF09", proteus: "useAlbum / useCamera + ui.image", status: "ok", group: "api" },
|
|
4171
|
+
{ mp: "wx.startRecord/RecorderManager\uFF08\u5F55\u97F3\uFF09", proteus: "useMicrophone / useRecorder", status: "ok", group: "api" },
|
|
4172
|
+
{ mp: "wx.createVideoContext/CameraContext", proteus: "ui.media + createCameraContext\uFF08ui.canvas \u627F\u63A5\uFF09", status: "ok", group: "api" },
|
|
4173
|
+
{ mp: "wx.scanCode", proteus: "useQRCode / p-scan-qr", status: "ok", group: "api" },
|
|
4174
|
+
{ mp: "wx.saveImageToPhotosAlbum/saveVideoToPhotosAlbum", proteus: "useAlbum\uFF08saveImage/saveVideo\uFF09", status: "ok", group: "api" },
|
|
4175
|
+
{ mp: "wx.createWorker\uFF08\u591A\u7EBF\u7A0B\uFF09", proteus: "useWorker", status: "ok", group: "api" },
|
|
4176
|
+
{ mp: "wx.chooseAddress\uFF08\u6536\u8D27\u5730\u5740\uFF09", proteus: "useAddress", status: "ok", group: "api" },
|
|
4177
|
+
{ mp: "wx.getConnectedWifi/getWifiList/connectWifi\uFF08WiFi\uFF09", proteus: "useWifi", status: "ok", group: "api" },
|
|
4178
|
+
{ mp: "wx.getWeRunData\uFF08\u5FAE\u4FE1\u8FD0\u52A8\uFF09", proteus: "useWeRun", status: "ok", group: "api" },
|
|
4179
|
+
// ★组件实例 API 对齐(2026-09-12):Canvas/查询/媒体组件实例(此前矩阵误标 useElement/useIntersection/useMedia——均为幽灵引用)
|
|
4180
|
+
{ mp: "wx.createCanvasContext / canvasToTempFilePath / createOffscreenCanvas\uFF08Canvas \u7EC4\u4EF6\u5B9E\u4F8B\uFF09", proteus: "useCanvas", status: "ok", group: "api" },
|
|
4181
|
+
{ mp: "wx.createSelectorQuery\uFF08\u5143\u7D20\u51E0\u4F55\u67E5\u8BE2\uFF09", proteus: "useElement", status: "ok", group: "api" },
|
|
4182
|
+
{ mp: "wx.createIntersectionObserver\uFF08\u4EA4\u53C9\u89C2\u5BDF\uFF09", proteus: "useIntersection", status: "ok", group: "api" },
|
|
4183
|
+
{ mp: "wx.createMediaQueryObserver\uFF08\u5A92\u4F53\u67E5\u8BE2\uFF09", proteus: "useMediaQuery", status: "ok", group: "api" },
|
|
4184
|
+
{ mp: "wx.createVideoContext\uFF08\u89C6\u9891\u7EC4\u4EF6\u5B9E\u4F8B\uFF09", proteus: "useVideo", status: "ok", group: "api" },
|
|
4185
|
+
{ mp: "wx.createInnerAudioContext\uFF08\u97F3\u9891\u5B9E\u4F8B\uFF09", proteus: "useAudio", status: "ok", group: "api" },
|
|
4186
|
+
{ mp: "wx.createLivePusherContext\uFF08\u76F4\u64AD\u63A8\u6D41\u5B9E\u4F8B\uFF09", proteus: "useLivePusher", status: "ok", group: "api" },
|
|
4187
|
+
{ mp: "wx.createRewardedVideoAd/createInterstitialAd/createBannerAd\uFF08\u5E7F\u544A\uFF09", proteus: "useAd", status: "ok", group: "api" },
|
|
4188
|
+
{ mp: "wx.getPrivacySetting/openPrivacyContract/requirePrivacyAuthorize\uFF08\u9690\u79C1\u534F\u8BAE\uFF09", proteus: "usePrivacy", status: "ok", group: "api" },
|
|
4189
|
+
{ mp: "wx.getPerformance/reportPerformance\uFF08\u6027\u80FD\uFF09", proteus: "usePerformance", status: "ok", group: "api" },
|
|
4190
|
+
{ mp: "wx.preloadAssets/preloadSkylineView/preloadWebview/preDownloadSubpackage\uFF08\u9884\u52A0\u8F7D\uFF09", proteus: "usePreload", status: "ok", group: "api" },
|
|
4191
|
+
{ mp: "wx.cropImage/editImage\uFF08\u56FE\u50CF\u7F16\u8F91\uFF09", proteus: "useImageEdit", status: "ok", group: "api" },
|
|
4192
|
+
{ mp: "wx.createUDPSocket/createTCPSocket\uFF08\u7F51\u7EDC\u5E95\u5C42 Socket\uFF09", proteus: "useSocket", status: "ok", group: "api" },
|
|
4193
|
+
{ mp: "wx.createMediaContainer/createVideoDecoder/createMediaAudioPlayer\uFF08\u5A92\u4F53\u9AD8\u7EA7\uFF09", proteus: "useMediaProcessing", status: "ok", group: "api" },
|
|
4194
|
+
{ mp: "wx.getScreenRecordingState/onScreenRecordingStateChanged/onUserCaptureScreen/checkIsPictureInPictureActive\uFF08\u5F55\u5C4F/\u622A\u5C4F\uFF09", proteus: "useScreenCapture", status: "ok", group: "api" },
|
|
4195
|
+
{ mp: "wx.createCacheManager\uFF08\u8BF7\u6C42\u7F13\u5B58\u7BA1\u7406\uFF09", proteus: "useCacheManager", status: "ok", group: "api" },
|
|
4196
|
+
{ mp: "wx.requestIdleCallback/cancelIdleCallback\uFF08\u7A7A\u95F2\u8C03\u5EA6\uFF09", proteus: "useIdle", status: "ok", group: "api" },
|
|
4197
|
+
{ mp: "wx.setWindowSize\uFF08PC \u7A97\u53E3\uFF09", proteus: "useWindow", status: "ok", group: "api" },
|
|
4198
|
+
{ mp: "wx.enableAlertBeforeUnload/disableAlertBeforeUnload\uFF08\u5378\u8F7D\u62E6\u622A\uFF09", proteus: "useNavigationGuard", status: "ok", group: "api" },
|
|
4199
|
+
{ mp: "wx.createVKSession/isVKSupport\uFF08AR/XR \u89C6\u89C9\u7B97\u6CD5\uFF09", proteus: "useAR", status: "ok", group: "api" },
|
|
4200
|
+
{ mp: "wx.onBeaconServiceChange/onBeaconUpdate\uFF08iBeacon\uFF09", proteus: "useBeacon", status: "ok", group: "api" },
|
|
4201
|
+
{ mp: "wx.onLocalServiceFound/Lost/ResolveFail/DiscoveryStop\uFF08\u5C40\u57DF\u7F51 mDNS\uFF09", proteus: "useLocalService", status: "ok", group: "api" },
|
|
4202
|
+
{ mp: "wx.onUserTriggerTranslation/onUserOffTranslation\uFF08\u7FFB\u8BD1\uFF09", proteus: "useTranslation", status: "ok", group: "api" },
|
|
4203
|
+
{ mp: "wx.onGeneratePoster\uFF08\u5206\u4EAB\u6D77\u62A5\uFF09", proteus: "usePoster", status: "ok", group: "api" },
|
|
4204
|
+
{ mp: "wx.checkDeviceSupportHevc\uFF08\u8BBE\u5907\u80FD\u529B\u63A2\u6D4B\uFF09", proteus: "useDeviceCapability", status: "ok", group: "api" },
|
|
4205
|
+
{ mp: "wx.getFileSystemManager/*\uFF08\u6587\u4EF6 30+\uFF09", proteus: "useFileSystem", status: "ok", group: "api" },
|
|
4206
|
+
{ mp: "wx.compressFile/unzip", proteus: "useArchive", status: "ok", group: "api" },
|
|
4207
|
+
{ mp: "wx.set/get/remove/clearStorage(+Sync)", proteus: "useStorage", status: "ok", group: "api" },
|
|
4208
|
+
{ mp: "wx.getLocation/chooseLocation/openLocation", proteus: "useLocation / p-location", status: "ok", group: "api" },
|
|
4209
|
+
{ mp: "wx.createMapContext", proteus: "useMap", status: "ok", group: "api" },
|
|
4210
|
+
{ 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" },
|
|
4211
|
+
{ mp: "wx.openBluetoothAdapter\uFF08\u84DD\u7259 20+\uFF09", proteus: "useBluetooth", status: "ok", group: "api" },
|
|
4212
|
+
{ mp: "wx.getHCEState\uFF08NFC\uFF09", proteus: "useNFC", status: "ok", group: "api" },
|
|
4213
|
+
{ mp: "wx.checkIsSupportFingerPrint/FaceID", proteus: "useBiometric / useFaceID", status: "ok", group: "api" },
|
|
4214
|
+
{ mp: "wx.showToast/showLoading/showModal/showActionSheet", proteus: "shell.toast + ui.loading + shell.modal + shell.action-sheet", status: "ok", group: "api" },
|
|
4040
4215
|
{ mp: "wx.setNavigationBarTitle/Color", proteus: "shell.nav", status: "ok", group: "api" },
|
|
4041
4216
|
{ mp: "wx.setTabBarItem/Style/hide/show", proteus: "shell.tabbar", status: "ok", group: "api" },
|
|
4042
|
-
{ mp: "wx.pageScrollTo", proteus: "
|
|
4043
|
-
{ mp: "wx.createAnimation", proteus: "engineering.
|
|
4044
|
-
{ mp: "wx.createSelectorQuery/IntersectionObserver", proteus: "
|
|
4045
|
-
{ mp: "wx.navigateTo/redirectTo/navigateBack/switchTab/reLaunch", proteus: "engineering.router-
|
|
4046
|
-
{ mp: "wx.getCurrentPages", proteus: "engineering.
|
|
4047
|
-
{ mp: "App()/Page() \u751F\u547D\u5468\u671F/getApp()", proteus: "
|
|
4048
|
-
{ mp: "wx.shareAppMessage/requestSubscribeMessage", proteus: "
|
|
4049
|
-
{ mp: "wx.login/checkSession/getUserInfo/authorize", proteus: "
|
|
4050
|
-
{ mp: "wx.getUpdateManager", proteus: "
|
|
4051
|
-
{ mp: "wx.requestWeChatPay/navigateToMiniProgram/\u6A21\u677F\u6D88\u606F/\u5BA2\u670D\uFF08\u5FAE\u4FE1\u79C1\u6709\uFF09", proteus: "
|
|
4217
|
+
{ mp: "wx.pageScrollTo", proteus: "layout.scroll\uFF08p-scroll-view\uFF09", status: "ok", group: "api" },
|
|
4218
|
+
{ mp: "wx.createAnimation", proteus: "engineering.animate / engineering.transition", status: "ok", group: "api" },
|
|
4219
|
+
{ mp: "wx.createSelectorQuery/IntersectionObserver", proteus: "engineering.router-link + layout.scroll\uFF08\u5B9E\u6D4B\u80FD\u529B\uFF09", status: "ok", group: "api" },
|
|
4220
|
+
{ mp: "wx.navigateTo/redirectTo/navigateBack/switchTab/reLaunch", proteus: "engineering.router-link + router.* API", status: "ok", group: "api" },
|
|
4221
|
+
{ mp: "wx.getCurrentPages", proteus: "engineering.router-link + shared adapter", status: "ok", group: "api" },
|
|
4222
|
+
{ mp: "App()/Page() \u751F\u547D\u5468\u671F/getApp()", proteus: "useAppLifecycle / usePageLifecycle", status: "ok", group: "api" },
|
|
4223
|
+
{ mp: "wx.shareAppMessage/requestSubscribeMessage", proteus: "useShare / useNotification", status: "ok", group: "api" },
|
|
4224
|
+
{ mp: "wx.login/checkSession/getUserInfo/authorize", proteus: "useLogin / useAuth / usePermission", status: "ok", group: "api" },
|
|
4225
|
+
{ mp: "wx.getUpdateManager", proteus: "useUpdate", status: "ok", group: "api" },
|
|
4226
|
+
{ mp: "wx.requestWeChatPay/navigateToMiniProgram/\u6A21\u677F\u6D88\u606F/\u5BA2\u670D\uFF08\u5FAE\u4FE1\u79C1\u6709\uFF09", proteus: "useMiniProgram", status: "private", group: "api" }
|
|
4052
4227
|
];
|
|
4053
4228
|
var MP_MAPPING_MATRIX = [...MP_COMPONENTS, ...MP_API_GROUPS];
|
|
4229
|
+
|
|
4230
|
+
// ../render-backend/src/dispatcher.ts
|
|
4054
4231
|
var DispatcherError = class extends Error {
|
|
4055
4232
|
constructor(code, detail) {
|
|
4056
4233
|
super(`unknown primitive tag: ${detail.type}\uFF08\u987B\u5728 G-32 \u539F\u8BED\u8868\u5185\uFF0C\u7F16\u8BD1\u671F\u62E6\u622A\uFF1B\u8FD0\u884C\u671F\u515C\u5E95\uFF09`);
|
|
@@ -4068,6 +4245,8 @@ ${summary}
|
|
|
4068
4245
|
}
|
|
4069
4246
|
return root;
|
|
4070
4247
|
}
|
|
4248
|
+
|
|
4249
|
+
// ../render-backend/src/host-conformance.ts
|
|
4071
4250
|
function createHostRuntimeStub() {
|
|
4072
4251
|
const rt = {
|
|
4073
4252
|
id: "terminal",
|
|
@@ -4276,11 +4455,15 @@ ${summary}
|
|
|
4276
4455
|
r.destroy();
|
|
4277
4456
|
assert(r.state === "destroyed", "destroy \u540E\u72B6\u6001\u5E94\u4E3A destroyed");
|
|
4278
4457
|
});
|
|
4458
|
+
|
|
4459
|
+
// ../render-backend/src/container-spi.ts
|
|
4279
4460
|
var DEFAULT_STACK_POLICY = {
|
|
4280
4461
|
maxDepth: 10,
|
|
4281
4462
|
overflowStrategy: "destroy-oldest",
|
|
4282
4463
|
keepAlive: { maxCount: 3, memoryBudgetBytes: 64 * 1024 * 1024 }
|
|
4283
4464
|
};
|
|
4465
|
+
|
|
4466
|
+
// ../render-backend/src/ownership.ts
|
|
4284
4467
|
var OwnershipGraph = class {
|
|
4285
4468
|
constructor(opts = {}) {
|
|
4286
4469
|
this.nodes = /* @__PURE__ */ new Map();
|
|
@@ -4379,6 +4562,8 @@ ${summary}
|
|
|
4379
4562
|
if (!singletonGraph) singletonGraph = new OwnershipGraph();
|
|
4380
4563
|
return singletonGraph;
|
|
4381
4564
|
}
|
|
4565
|
+
|
|
4566
|
+
// ../render-backend/src/container-conformance.ts
|
|
4382
4567
|
var FORK_SIGNATURES = [
|
|
4383
4568
|
/packages\/core\/src\//,
|
|
4384
4569
|
// 框架源码副本
|
|
@@ -4609,6 +4794,8 @@ ${summary}
|
|
|
4609
4794
|
const hits = scanRepoForFork({ "host/vendor/core.js": "import x from '@proteus/core/internal/diff';" });
|
|
4610
4795
|
assert2(hits.length > 0, "fork \u4ED3\u5E93\u5E94\u88AB\u68C0\u51FA");
|
|
4611
4796
|
});
|
|
4797
|
+
|
|
4798
|
+
// ../render-backend/src/superapp-container.ts
|
|
4612
4799
|
var DEFAULT_SUPERAPP_POLICY = {
|
|
4613
4800
|
maxDepth: 10,
|
|
4614
4801
|
overflowStrategy: "destroy-oldest",
|
|
@@ -4617,6 +4804,8 @@ ${summary}
|
|
|
4617
4804
|
crash: { isolationLevel: 2, autoRestart: true, maxRestartCount: 3 },
|
|
4618
4805
|
security: { requireSignature: true, capabilityWhitelist: ["camera", "location", "storage"] }
|
|
4619
4806
|
};
|
|
4807
|
+
|
|
4808
|
+
// ../render-backend/src/ownership-observability.ts
|
|
4620
4809
|
function createOwnershipHistory(graph, opts = {}) {
|
|
4621
4810
|
const limit = opts.limit ?? 2e3;
|
|
4622
4811
|
let records = [];
|
|
@@ -4644,7 +4833,7 @@ ${summary}
|
|
|
4644
4833
|
push({ ts: m.ts, kind: k === "borrows" ? "borrow" : k, from: m.edge.from, to: m.edge.to });
|
|
4645
4834
|
}
|
|
4646
4835
|
});
|
|
4647
|
-
const
|
|
4836
|
+
const history2 = {
|
|
4648
4837
|
get records() {
|
|
4649
4838
|
return records;
|
|
4650
4839
|
},
|
|
@@ -4666,7 +4855,7 @@ ${summary}
|
|
|
4666
4855
|
records = [];
|
|
4667
4856
|
}
|
|
4668
4857
|
};
|
|
4669
|
-
return
|
|
4858
|
+
return history2;
|
|
4670
4859
|
}
|
|
4671
4860
|
function createOwnershipCounters(graph) {
|
|
4672
4861
|
let alive = 0;
|
|
@@ -4757,10 +4946,10 @@ ${summary}
|
|
|
4757
4946
|
}
|
|
4758
4947
|
return { aliveNodes: stats.alive, totalNodes: stats.total, orphans, leaks, longBorrows, crossPageRefs };
|
|
4759
4948
|
}
|
|
4760
|
-
function buildOwnershipTimeline(
|
|
4949
|
+
function buildOwnershipTimeline(history2, graph) {
|
|
4761
4950
|
const events = [];
|
|
4762
4951
|
const allocById = /* @__PURE__ */ new Map();
|
|
4763
|
-
for (const rec of
|
|
4952
|
+
for (const rec of history2.records) {
|
|
4764
4953
|
if (rec.kind === "alloc" && rec.id) {
|
|
4765
4954
|
allocById.set(rec.id, rec);
|
|
4766
4955
|
events.push(rec);
|
|
@@ -4781,7 +4970,7 @@ ${summary}
|
|
|
4781
4970
|
function createOwnershipTracer(options = {}) {
|
|
4782
4971
|
const graph = options.graph ?? getProteusOwnershipGraph();
|
|
4783
4972
|
const counters = createOwnershipCounters(graph);
|
|
4784
|
-
const
|
|
4973
|
+
const history2 = options.history ?? createOwnershipHistory(graph);
|
|
4785
4974
|
let disposed = false;
|
|
4786
4975
|
function collect() {
|
|
4787
4976
|
if (disposed) {
|
|
@@ -4794,10 +4983,10 @@ ${summary}
|
|
|
4794
4983
|
}
|
|
4795
4984
|
const diagnosis = diagnoseOwnershipIssues(graph);
|
|
4796
4985
|
const seenAllocIds = /* @__PURE__ */ new Set();
|
|
4797
|
-
for (const r of
|
|
4986
|
+
for (const r of history2.records) {
|
|
4798
4987
|
if (r.kind === "alloc" && r.id) seenAllocIds.add(r.id);
|
|
4799
4988
|
}
|
|
4800
|
-
const merged = [...
|
|
4989
|
+
const merged = [...history2.records];
|
|
4801
4990
|
for (const n of graph.nodes.values()) {
|
|
4802
4991
|
if (!seenAllocIds.has(n.id)) {
|
|
4803
4992
|
merged.push({ ts: n.createdAt, kind: "alloc", id: n.id, owner: n.owner, type: n.type, byteSize: n.byteSize, sourceLocation: n.sourceLocation });
|
|
@@ -4842,7 +5031,7 @@ ${summary}
|
|
|
4842
5031
|
collect,
|
|
4843
5032
|
dispose() {
|
|
4844
5033
|
disposed = true;
|
|
4845
|
-
|
|
5034
|
+
history2.dispose();
|
|
4846
5035
|
}
|
|
4847
5036
|
};
|
|
4848
5037
|
}
|
|
@@ -4920,7 +5109,7 @@ ${summary}
|
|
|
4920
5109
|
};
|
|
4921
5110
|
}
|
|
4922
5111
|
|
|
4923
|
-
// ../../node_modules/@vue/devtools-shared/dist/index.js
|
|
5112
|
+
// ../../node_modules/.pnpm/@vue+devtools-shared@8.2.1/node_modules/@vue/devtools-shared/dist/index.js
|
|
4924
5113
|
var __create = Object.create;
|
|
4925
5114
|
var __defProp2 = Object.defineProperty;
|
|
4926
5115
|
var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
|
|
@@ -5101,7 +5290,7 @@ ${summary}
|
|
|
5101
5290
|
}
|
|
5102
5291
|
var deepClone = (0, import_rfdc.default)({ circles: true });
|
|
5103
5292
|
|
|
5104
|
-
// ../../node_modules/perfect-debounce/dist/index.mjs
|
|
5293
|
+
// ../../node_modules/.pnpm/perfect-debounce@2.1.0/node_modules/perfect-debounce/dist/index.mjs
|
|
5105
5294
|
var DEBOUNCE_DEFAULTS = { trailing: true };
|
|
5106
5295
|
function debounce(fn, wait = 25, options = {}) {
|
|
5107
5296
|
options = {
|
|
@@ -5170,7 +5359,7 @@ ${summary}
|
|
|
5170
5359
|
return await fn.apply(_this, args);
|
|
5171
5360
|
}
|
|
5172
5361
|
|
|
5173
|
-
// ../../node_modules/hookable/dist/index.mjs
|
|
5362
|
+
// ../../node_modules/.pnpm/hookable@5.5.3/node_modules/hookable/dist/index.mjs
|
|
5174
5363
|
function flatHooks(configHooks, hooks2 = {}, parentName) {
|
|
5175
5364
|
for (const key in configHooks) {
|
|
5176
5365
|
const subHook = configHooks[key];
|
|
@@ -5375,7 +5564,7 @@ ${summary}
|
|
|
5375
5564
|
return new Hookable();
|
|
5376
5565
|
}
|
|
5377
5566
|
|
|
5378
|
-
// ../../node_modules/@vue/devtools-kit/dist/index.js
|
|
5567
|
+
// ../../node_modules/.pnpm/@vue+devtools-kit@8.2.1/node_modules/@vue/devtools-kit/dist/index.js
|
|
5379
5568
|
var __create2 = Object.create;
|
|
5380
5569
|
var __defProp3 = Object.defineProperty;
|
|
5381
5570
|
var __getOwnPropDesc3 = Object.getOwnPropertyDescriptor;
|
|
@@ -8652,6 +8841,166 @@ ${summary}
|
|
|
8652
8841
|
target.__VUE_DEVTOOLS_KIT_BROADCAST_RPC_SERVER__ ??= null;
|
|
8653
8842
|
var MAX_SERIALIZED_SIZE = 2 * 1024 * 1024;
|
|
8654
8843
|
|
|
8844
|
+
// ../shared/src/platform/mp-adapter.ts
|
|
8845
|
+
function norm(p) {
|
|
8846
|
+
return { route: p.route || p.__route__ || "", setData: p.setData?.bind(p) };
|
|
8847
|
+
}
|
|
8848
|
+
function normalizeRect(rect) {
|
|
8849
|
+
if (!rect || typeof rect.left !== "number" || typeof rect.top !== "number") return null;
|
|
8850
|
+
return {
|
|
8851
|
+
top: rect.top,
|
|
8852
|
+
left: rect.left,
|
|
8853
|
+
right: typeof rect.right === "number" ? rect.right : rect.left,
|
|
8854
|
+
bottom: typeof rect.bottom === "number" ? rect.bottom : rect.top,
|
|
8855
|
+
width: typeof rect.width === "number" ? rect.width : rect.right - rect.left,
|
|
8856
|
+
height: typeof rect.height === "number" ? rect.height : rect.bottom - rect.top
|
|
8857
|
+
};
|
|
8858
|
+
}
|
|
8859
|
+
function createMpAdapter() {
|
|
8860
|
+
return {
|
|
8861
|
+
isMP: true,
|
|
8862
|
+
getCurrentPages: () => {
|
|
8863
|
+
if (typeof wx === "undefined" || typeof getCurrentPages !== "function") return [];
|
|
8864
|
+
return getCurrentPages().map(norm);
|
|
8865
|
+
},
|
|
8866
|
+
navigateTo: (opts) => new Promise((resolve) => {
|
|
8867
|
+
wx.navigateTo({ url: opts.url, success: () => resolve(), fail: () => resolve() });
|
|
8868
|
+
}),
|
|
8869
|
+
redirectTo: (opts) => new Promise((resolve) => {
|
|
8870
|
+
wx.redirectTo({ url: opts.url, success: () => resolve(), fail: () => resolve() });
|
|
8871
|
+
}),
|
|
8872
|
+
reLaunch: (opts) => new Promise((resolve) => {
|
|
8873
|
+
wx.reLaunch({ url: opts.url, success: () => resolve(), fail: () => resolve() });
|
|
8874
|
+
}),
|
|
8875
|
+
switchTab: (opts) => new Promise((resolve) => {
|
|
8876
|
+
wx.switchTab({ url: opts.url, success: () => resolve(), fail: () => resolve() });
|
|
8877
|
+
}),
|
|
8878
|
+
navigateBack: ({ delta }) => {
|
|
8879
|
+
wx.navigateBack({ delta });
|
|
8880
|
+
},
|
|
8881
|
+
measureRect: (selector, scope) => (
|
|
8882
|
+
// ★平台层许可直接碰 wx.*(no-platform-api 审计 allow: platforms/**/packages/api/**);组件经此 L2 抽象消费
|
|
8883
|
+
new Promise((resolve) => {
|
|
8884
|
+
if (typeof wx === "undefined" || typeof wx.createSelectorQuery !== "function") return resolve(null);
|
|
8885
|
+
const scopeQ = scope;
|
|
8886
|
+
const inQuery = scopeQ && typeof scopeQ.createSelectorQuery === "function" ? scopeQ.createSelectorQuery() : wx.createSelectorQuery();
|
|
8887
|
+
inQuery.select(selector).boundingClientRect((rect) => resolve(normalizeRect(rect))).exec();
|
|
8888
|
+
})
|
|
8889
|
+
)
|
|
8890
|
+
};
|
|
8891
|
+
}
|
|
8892
|
+
|
|
8893
|
+
// ../shared/src/platform/web-adapter.ts
|
|
8894
|
+
function parseQuery(url) {
|
|
8895
|
+
const q = url.split("?")[1] || "";
|
|
8896
|
+
const out = {};
|
|
8897
|
+
for (const seg of q.split("&").filter(Boolean)) {
|
|
8898
|
+
const [k, v] = seg.split("=");
|
|
8899
|
+
if (k) out[decodeURIComponent(k)] = decodeURIComponent(v || "");
|
|
8900
|
+
}
|
|
8901
|
+
return out;
|
|
8902
|
+
}
|
|
8903
|
+
function createWebAdapter() {
|
|
8904
|
+
const listeners = [];
|
|
8905
|
+
const hasBrowserEnv = typeof location !== "undefined" && typeof history !== "undefined";
|
|
8906
|
+
let current = { route: hasBrowserEnv ? location.pathname.replace(/^\//, "") : "" };
|
|
8907
|
+
let historyIndex = hasBrowserEnv ? history.state?.proteusIndex ?? 0 : 0;
|
|
8908
|
+
const emit = (url, routeType, nav = "forward") => {
|
|
8909
|
+
current = { route: url.split("?")[0].replace(/^\//, ""), routeType };
|
|
8910
|
+
listeners.forEach((l) => l(current.route, parseQuery(url), routeType, nav));
|
|
8911
|
+
};
|
|
8912
|
+
if (hasBrowserEnv) {
|
|
8913
|
+
window.addEventListener("popstate", (e) => {
|
|
8914
|
+
const stateIndex = e.state?.proteusIndex;
|
|
8915
|
+
let nav = "forward";
|
|
8916
|
+
if (typeof stateIndex === "number") {
|
|
8917
|
+
nav = stateIndex < historyIndex ? "back" : "forward";
|
|
8918
|
+
historyIndex = stateIndex;
|
|
8919
|
+
}
|
|
8920
|
+
emit(location.pathname + location.search, void 0, nav);
|
|
8921
|
+
});
|
|
8922
|
+
document.addEventListener("click", (e) => {
|
|
8923
|
+
if (e.defaultPrevented || e.button !== 0 || e.metaKey || e.ctrlKey || e.shiftKey || e.altKey) return;
|
|
8924
|
+
const target2 = e.target;
|
|
8925
|
+
const anchor = target2?.closest?.("a[href]");
|
|
8926
|
+
if (!anchor) return;
|
|
8927
|
+
const href = anchor.getAttribute("href") || "";
|
|
8928
|
+
if (anchor.target === "_blank" || !href.startsWith("/")) return;
|
|
8929
|
+
e.preventDefault();
|
|
8930
|
+
const routeType = anchor.getAttribute("route-type") || void 0;
|
|
8931
|
+
historyIndex += 1;
|
|
8932
|
+
history.pushState({ proteusIndex: historyIndex }, "", href);
|
|
8933
|
+
emit(href, routeType, "forward");
|
|
8934
|
+
});
|
|
8935
|
+
}
|
|
8936
|
+
return {
|
|
8937
|
+
isMP: false,
|
|
8938
|
+
getCurrentPages: () => [current],
|
|
8939
|
+
navigateTo: async ({ url, routeType }) => {
|
|
8940
|
+
historyIndex += 1;
|
|
8941
|
+
history.pushState({ proteusIndex: historyIndex }, "", url);
|
|
8942
|
+
emit(url, routeType, "forward");
|
|
8943
|
+
},
|
|
8944
|
+
redirectTo: async ({ url }) => {
|
|
8945
|
+
history.replaceState({ proteusIndex: historyIndex }, "", url);
|
|
8946
|
+
emit(url, void 0, "replace");
|
|
8947
|
+
},
|
|
8948
|
+
reLaunch: async ({ url }) => {
|
|
8949
|
+
history.replaceState({ proteusIndex: historyIndex }, "", url);
|
|
8950
|
+
emit(url, void 0, "reLaunch");
|
|
8951
|
+
},
|
|
8952
|
+
switchTab: async ({ url }) => {
|
|
8953
|
+
history.replaceState({ proteusIndex: historyIndex }, "", url);
|
|
8954
|
+
emit(url, void 0, "switchTab");
|
|
8955
|
+
},
|
|
8956
|
+
navigateBack: ({ delta }) => {
|
|
8957
|
+
history.go(-delta);
|
|
8958
|
+
},
|
|
8959
|
+
measureRect: (selector, scope) => new Promise((resolve) => {
|
|
8960
|
+
if (typeof document === "undefined" || typeof document.querySelector !== "function") return resolve(null);
|
|
8961
|
+
const root = scope && typeof scope.querySelector === "function" ? scope : document;
|
|
8962
|
+
const el = root.querySelector(selector);
|
|
8963
|
+
if (!el || typeof el.getBoundingClientRect !== "function") return resolve(null);
|
|
8964
|
+
const r = el.getBoundingClientRect();
|
|
8965
|
+
resolve({
|
|
8966
|
+
top: r.top,
|
|
8967
|
+
left: r.left,
|
|
8968
|
+
right: r.right,
|
|
8969
|
+
bottom: r.bottom,
|
|
8970
|
+
width: r.width,
|
|
8971
|
+
height: r.height
|
|
8972
|
+
});
|
|
8973
|
+
}),
|
|
8974
|
+
onPageLoad: (cb) => {
|
|
8975
|
+
listeners.push(cb);
|
|
8976
|
+
}
|
|
8977
|
+
};
|
|
8978
|
+
}
|
|
8979
|
+
|
|
8980
|
+
// ../shared/src/platform/index.ts
|
|
8981
|
+
var import_meta = {};
|
|
8982
|
+
function detectMPRuntime() {
|
|
8983
|
+
if (typeof window !== "undefined") return false;
|
|
8984
|
+
try {
|
|
8985
|
+
return typeof wx !== "undefined" && (typeof wx.getSystemInfoSync === "function" || typeof wx.getWindowInfo === "function");
|
|
8986
|
+
} catch (e) {
|
|
8987
|
+
return false;
|
|
8988
|
+
}
|
|
8989
|
+
}
|
|
8990
|
+
var modeMP = import_meta.env?.MODE === "mp-weixin";
|
|
8991
|
+
var isMP = modeMP || detectMPRuntime();
|
|
8992
|
+
var adapter = isMP ? createMpAdapter() : createWebAdapter();
|
|
8993
|
+
|
|
8994
|
+
// ../shared/src/platform/runtime.ts
|
|
8995
|
+
function detectRuntime() {
|
|
8996
|
+
if (typeof window !== "undefined") return "web";
|
|
8997
|
+
try {
|
|
8998
|
+
if (typeof wx !== "undefined" && wx) return "mp";
|
|
8999
|
+
} catch {
|
|
9000
|
+
}
|
|
9001
|
+
return "web";
|
|
9002
|
+
}
|
|
9003
|
+
|
|
8655
9004
|
// ../capabilities/src/adapter.ts
|
|
8656
9005
|
var CapabilityRegistry = class {
|
|
8657
9006
|
constructor() {
|
|
@@ -8703,20 +9052,20 @@ ${summary}
|
|
|
8703
9052
|
return this.requireds.get(capability) ?? false;
|
|
8704
9053
|
}
|
|
8705
9054
|
/** 注册 adapter(同 capability+platform 重复 → 报错,编译期约束 §7;按 priority 降序排序) */
|
|
8706
|
-
register(
|
|
8707
|
-
const list = this.adapters.get(
|
|
8708
|
-
if (list.some((a) => a.platform ===
|
|
8709
|
-
throw new Error(`[proteus-capabilities] \u80FD\u529B "${
|
|
9055
|
+
register(adapter2) {
|
|
9056
|
+
const list = this.adapters.get(adapter2.capability) ?? [];
|
|
9057
|
+
if (list.some((a) => a.platform === adapter2.platform)) {
|
|
9058
|
+
throw new Error(`[proteus-capabilities] \u80FD\u529B "${adapter2.capability}" \u7684 "${adapter2.platform}" \u5E73\u53F0\u91CD\u590D\u6CE8\u518C adapter\uFF08\u7F16\u8BD1\u671F\u7EA6\u675F\uFF1A\u540C capability+platform \u552F\u4E00\uFF09`);
|
|
8710
9059
|
}
|
|
8711
|
-
list.push(
|
|
9060
|
+
list.push(adapter2);
|
|
8712
9061
|
list.sort((a, b) => (b.priority ?? 0) - (a.priority ?? 0));
|
|
8713
|
-
this.adapters.set(
|
|
9062
|
+
this.adapters.set(adapter2.capability, list);
|
|
8714
9063
|
}
|
|
8715
9064
|
/** 批量注册(幂等语义:已存在同 id+platform 则跳过——scan 场景) */
|
|
8716
|
-
registerIdempotent(
|
|
8717
|
-
const list = this.adapters.get(
|
|
8718
|
-
if (list.some((a) => a.platform ===
|
|
8719
|
-
this.register(
|
|
9065
|
+
registerIdempotent(adapter2) {
|
|
9066
|
+
const list = this.adapters.get(adapter2.capability) ?? [];
|
|
9067
|
+
if (list.some((a) => a.platform === adapter2.platform)) return;
|
|
9068
|
+
this.register(adapter2);
|
|
8720
9069
|
}
|
|
8721
9070
|
/** 能力是否已注册任何 adapter */
|
|
8722
9071
|
has(capability) {
|
|
@@ -8735,10 +9084,10 @@ ${summary}
|
|
|
8735
9084
|
async resolve(id, platform = detectPlatform()) {
|
|
8736
9085
|
const list = this.adapters.get(id) ?? [];
|
|
8737
9086
|
const candidates = platform ? list.filter((a) => a.platform === platform) : list;
|
|
8738
|
-
for (const
|
|
9087
|
+
for (const adapter2 of candidates) {
|
|
8739
9088
|
try {
|
|
8740
|
-
if (await
|
|
8741
|
-
return this.wrap(
|
|
9089
|
+
if (await adapter2.isSupported()) {
|
|
9090
|
+
return this.wrap(adapter2, platform);
|
|
8742
9091
|
}
|
|
8743
9092
|
} catch {
|
|
8744
9093
|
}
|
|
@@ -8756,10 +9105,10 @@ ${summary}
|
|
|
8756
9105
|
/** 同步解析(isSupported 为同步时可用;异步探测的 adapter 返回 undefined) */
|
|
8757
9106
|
resolveSync(id, platform = detectPlatform()) {
|
|
8758
9107
|
const list = this.adapters.get(id) ?? [];
|
|
8759
|
-
for (const
|
|
9108
|
+
for (const adapter2 of list.filter((a) => a.platform === platform)) {
|
|
8760
9109
|
try {
|
|
8761
|
-
const supported =
|
|
8762
|
-
if (typeof supported === "boolean" && supported) return this.wrap(
|
|
9110
|
+
const supported = adapter2.isSupported();
|
|
9111
|
+
if (typeof supported === "boolean" && supported) return this.wrap(adapter2, platform);
|
|
8763
9112
|
} catch {
|
|
8764
9113
|
}
|
|
8765
9114
|
}
|
|
@@ -8773,23 +9122,23 @@ ${summary}
|
|
|
8773
9122
|
this.emitDetect(id, platform, false);
|
|
8774
9123
|
return void 0;
|
|
8775
9124
|
}
|
|
8776
|
-
wrap(
|
|
8777
|
-
const api =
|
|
9125
|
+
wrap(adapter2, platform) {
|
|
9126
|
+
const api = adapter2.create();
|
|
8778
9127
|
const cap2 = {
|
|
8779
|
-
meta: { id:
|
|
9128
|
+
meta: { id: adapter2.capability, tier: 2, name: adapter2.capability },
|
|
8780
9129
|
api,
|
|
8781
|
-
isSupported: () =>
|
|
9130
|
+
isSupported: () => adapter2.isSupported()
|
|
8782
9131
|
};
|
|
8783
|
-
const fb = this.fallbacks.get(
|
|
9132
|
+
const fb = this.fallbacks.get(adapter2.capability);
|
|
8784
9133
|
let fallbackId;
|
|
8785
|
-
if (fb && fb !==
|
|
9134
|
+
if (fb && fb !== adapter2.capability) {
|
|
8786
9135
|
const fbCap = this.resolveSync(fb, platform);
|
|
8787
9136
|
if (fbCap) {
|
|
8788
9137
|
cap2.fallback = fbCap;
|
|
8789
9138
|
fallbackId = fb;
|
|
8790
9139
|
}
|
|
8791
9140
|
}
|
|
8792
|
-
this.emitDetect(
|
|
9141
|
+
this.emitDetect(adapter2.capability, platform, true, fallbackId);
|
|
8793
9142
|
return cap2;
|
|
8794
9143
|
}
|
|
8795
9144
|
/** 已注册的(capability, platform)集合(审计/DevTools) */
|
|
@@ -8814,8 +9163,7 @@ ${summary}
|
|
|
8814
9163
|
}
|
|
8815
9164
|
};
|
|
8816
9165
|
function detectPlatform() {
|
|
8817
|
-
|
|
8818
|
-
return typeof wxGlobal !== "undefined" ? "skyline" : "web";
|
|
9166
|
+
return detectRuntime() === "mp" ? "skyline" : "web";
|
|
8819
9167
|
}
|
|
8820
9168
|
|
|
8821
9169
|
// ../capabilities/src/index.ts
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@proteus-vue/devtools",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1-beta.1",
|
|
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",
|
|
@@ -23,13 +23,10 @@
|
|
|
23
23
|
"style.css",
|
|
24
24
|
"README.md"
|
|
25
25
|
],
|
|
26
|
-
"scripts": {
|
|
27
|
-
"build": "tsc -p tsconfig.build.json --emitDeclarationOnly && esbuild src/index.ts --bundle --format=esm --platform=browser --outfile=dist/index.js --external:@proteus-vue/capabilities --external:@proteus-vue/devtools-runtime --external:@proteus-vue/render-backend --external:@vue/devtools-api && esbuild src/index.ts --bundle --format=iife --global-name=ProteusDevtools --platform=browser --outfile=dist/panel.js"
|
|
28
|
-
},
|
|
29
26
|
"dependencies": {
|
|
30
|
-
"@proteus-vue/capabilities": "0.1.
|
|
27
|
+
"@proteus-vue/capabilities": "0.1.1-beta.1",
|
|
31
28
|
"@proteus-vue/devtools-runtime": "0.1.0",
|
|
32
|
-
"@proteus-vue/render-backend": "0.1.0"
|
|
29
|
+
"@proteus-vue/render-backend": "0.1.1-beta.0"
|
|
33
30
|
},
|
|
34
31
|
"peerDependencies": {
|
|
35
32
|
"@vue/devtools-api": "^8.0.0"
|
|
@@ -39,5 +36,8 @@
|
|
|
39
36
|
"@vue/devtools-api": "^8.0.0",
|
|
40
37
|
"pinia": "^4.0.0",
|
|
41
38
|
"vue": "^3.4.0"
|
|
39
|
+
},
|
|
40
|
+
"scripts": {
|
|
41
|
+
"build": "tsc -p tsconfig.build.json --emitDeclarationOnly && esbuild src/index.ts --bundle --format=esm --platform=browser --outfile=dist/index.js --external:@proteus-vue/capabilities --external:@proteus-vue/devtools-runtime --external:@proteus-vue/render-backend --external:@vue/devtools-api && esbuild src/index.ts --bundle --format=iife --global-name=ProteusDevtools --platform=browser --outfile=dist/panel.js"
|
|
42
42
|
}
|
|
43
|
-
}
|
|
43
|
+
}
|