cardbuddy 0.6.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.
Files changed (167) hide show
  1. package/README.md +211 -0
  2. package/dist/cli.js +76 -0
  3. package/dist/config.js +63 -0
  4. package/dist/core.js +2 -0
  5. package/dist/preview-editor/assets/apple-touch-icon-BQcES9QK.png +0 -0
  6. package/dist/preview-editor/assets/default-image-wzZYQ86K.png +0 -0
  7. package/dist/preview-editor/assets/favicon-16-Cg6Nrosk.png +0 -0
  8. package/dist/preview-editor/assets/favicon-32-B_1744sp.png +0 -0
  9. package/dist/preview-editor/assets/index-BYB0hngG.js +72 -0
  10. package/dist/preview-editor/assets/index-CpBZEQDy.css +1 -0
  11. package/dist/preview-editor/assets/site-icon-CFMif8z4.png +0 -0
  12. package/dist/preview-editor/assets/svg-symbols-B2exBrAr.svg +118 -0
  13. package/dist/preview-editor/index.html +17 -0
  14. package/dist/server-core/_vendor/finmall-env.mjs +96 -0
  15. package/dist/server-core/assetProxy.js +154 -0
  16. package/dist/server-core/bbox.js +153 -0
  17. package/dist/server-core/browser.js +108 -0
  18. package/dist/server-core/buildDataFromSchema.js +50 -0
  19. package/dist/server-core/cardFiles.js +188 -0
  20. package/dist/server-core/cardHistory.js +156 -0
  21. package/dist/server-core/cardImage.js +85 -0
  22. package/dist/server-core/cardImportMeta.js +139 -0
  23. package/dist/server-core/cardListCache.js +68 -0
  24. package/dist/server-core/cardOpenFolder.js +135 -0
  25. package/dist/server-core/cardSave.js +127 -0
  26. package/dist/server-core/cardSidecar.js +72 -0
  27. package/dist/server-core/cardSync.js +259 -0
  28. package/dist/server-core/cardValidate.js +134 -0
  29. package/dist/server-core/index.js +82 -0
  30. package/dist/server-core/logger.js +241 -0
  31. package/dist/server-core/nodeModels.js +52 -0
  32. package/dist/server-core/renderStatus.js +207 -0
  33. package/dist/server-core/screenshot.js +123 -0
  34. package/dist/server-core/sliceStatic.js +44 -0
  35. package/dist/standalone.js +447 -0
  36. package/dist/vendored/App.vue +2330 -0
  37. package/dist/vendored/api.js +142 -0
  38. package/dist/vendored/assets/apple-touch-icon.png +0 -0
  39. package/dist/vendored/assets/default-image.png +0 -0
  40. package/dist/vendored/assets/favicon-16.png +0 -0
  41. package/dist/vendored/assets/favicon-32.png +0 -0
  42. package/dist/vendored/assets/logo.png +0 -0
  43. package/dist/vendored/assets/site-icon.png +0 -0
  44. package/dist/vendored/assets/svg-symbols.svg +118 -0
  45. package/dist/vendored/assets/svgIcons/icons.svg +54 -0
  46. package/dist/vendored/assets/svgIcons/index.js +39 -0
  47. package/dist/vendored/components/AbsoluteLayout.vue +42 -0
  48. package/dist/vendored/components/AlertCardInstance.vue +58 -0
  49. package/dist/vendored/components/AlertCardLayer.vue +59 -0
  50. package/dist/vendored/components/ApiPayloadTree.vue +168 -0
  51. package/dist/vendored/components/AppToast.vue +37 -0
  52. package/dist/vendored/components/Button.vue +37 -0
  53. package/dist/vendored/components/Canvas.vue +65 -0
  54. package/dist/vendored/components/CardGallery.vue +243 -0
  55. package/dist/vendored/components/CardPreview.vue +72 -0
  56. package/dist/vendored/components/CardSelect.vue +200 -0
  57. package/dist/vendored/components/CheckGroup.vue +131 -0
  58. package/dist/vendored/components/Column.vue +25 -0
  59. package/dist/vendored/components/ComponentPalette.vue +294 -0
  60. package/dist/vendored/components/ConfirmDialog.vue +39 -0
  61. package/dist/vendored/components/CustomPlaceholder.vue +33 -0
  62. package/dist/vendored/components/DatePickerOverlay.vue +345 -0
  63. package/dist/vendored/components/DebugPanel.vue +806 -0
  64. package/dist/vendored/components/DeviceOverlay.vue +70 -0
  65. package/dist/vendored/components/Divider.vue +22 -0
  66. package/dist/vendored/components/Dropdown.vue +191 -0
  67. package/dist/vendored/components/EventEditor.vue +247 -0
  68. package/dist/vendored/components/GridLayout.vue +67 -0
  69. package/dist/vendored/components/HoverGuides.vue +122 -0
  70. package/dist/vendored/components/Icon.vue +34 -0
  71. package/dist/vendored/components/Image.vue +34 -0
  72. package/dist/vendored/components/Input.vue +90 -0
  73. package/dist/vendored/components/JsonTree.vue +516 -0
  74. package/dist/vendored/components/ListLayout.vue +68 -0
  75. package/dist/vendored/components/LogValue.vue +51 -0
  76. package/dist/vendored/components/Map.vue +110 -0
  77. package/dist/vendored/components/MultiColumn.vue +49 -0
  78. package/dist/vendored/components/MultiText.vue +58 -0
  79. package/dist/vendored/components/NodeInspector.vue +295 -0
  80. package/dist/vendored/components/PickerOverlay.vue +131 -0
  81. package/dist/vendored/components/ProgressSlider.vue +167 -0
  82. package/dist/vendored/components/PropControl.vue +241 -0
  83. package/dist/vendored/components/PropTree.vue +128 -0
  84. package/dist/vendored/components/RadioButton.vue +74 -0
  85. package/dist/vendored/components/RemotePreview.vue +171 -0
  86. package/dist/vendored/components/RenderTree.vue +437 -0
  87. package/dist/vendored/components/Root.vue +30 -0
  88. package/dist/vendored/components/Row.vue +25 -0
  89. package/dist/vendored/components/SelectionOverlay.vue +105 -0
  90. package/dist/vendored/components/StructureTree.vue +949 -0
  91. package/dist/vendored/components/SvgCode.vue +19 -0
  92. package/dist/vendored/components/SvgSymbols.vue +30 -0
  93. package/dist/vendored/components/Switch.vue +38 -0
  94. package/dist/vendored/components/Text.vue +32 -0
  95. package/dist/vendored/components/Video.vue +70 -0
  96. package/dist/vendored/components/ViewContainer.vue +52 -0
  97. package/dist/vendored/components/base.js +12 -0
  98. package/dist/vendored/components/icons.js +47 -0
  99. package/dist/vendored/components/index.js +58 -0
  100. package/dist/vendored/components/setters/SetBgPosition.vue +64 -0
  101. package/dist/vendored/components/setters/SetBgSize.vue +90 -0
  102. package/dist/vendored/components/setters/SetCode.vue +90 -0
  103. package/dist/vendored/components/setters/SetColor.vue +244 -0
  104. package/dist/vendored/components/setters/SetCustomSelect.vue +58 -0
  105. package/dist/vendored/components/setters/SetExpr.vue +107 -0
  106. package/dist/vendored/components/setters/SetGradient.vue +125 -0
  107. package/dist/vendored/components/setters/SetGrid9.vue +68 -0
  108. package/dist/vendored/components/setters/SetIconSelect.vue +67 -0
  109. package/dist/vendored/components/setters/SetIfForm.vue +61 -0
  110. package/dist/vendored/components/setters/SetImage.vue +43 -0
  111. package/dist/vendored/components/setters/SetList.vue +139 -0
  112. package/dist/vendored/components/setters/SetNumber.vue +118 -0
  113. package/dist/vendored/components/setters/SetNumberStyle.vue +113 -0
  114. package/dist/vendored/components/setters/SetPadding.vue +77 -0
  115. package/dist/vendored/components/setters/SetSegment.vue +160 -0
  116. package/dist/vendored/components/setters/SetSelect.vue +51 -0
  117. package/dist/vendored/components/setters/SetSwitch.vue +49 -0
  118. package/dist/vendored/components/setters/SetText.vue +52 -0
  119. package/dist/vendored/components/setters/props.js +23 -0
  120. package/dist/vendored/fidelity/baseline-messageOverview.json +87 -0
  121. package/dist/vendored/fidelity/calibration.json +29 -0
  122. package/dist/vendored/fidelity/fidelity-messageOverview-after.html +114 -0
  123. package/dist/vendored/fidelity/fidelity-messageOverview-after.json +272 -0
  124. package/dist/vendored/fidelity/fidelity-messageOverview.html +185 -0
  125. package/dist/vendored/fidelity/fidelity-messageOverview.json +336 -0
  126. package/dist/vendored/fidelity/fidelity-messageOverview_v2.html +262 -0
  127. package/dist/vendored/fidelity/fidelity-messageOverview_v2.json +502 -0
  128. package/dist/vendored/fidelity/fidelity-messageOverview_v3.html +201 -0
  129. package/dist/vendored/fidelity/fidelity-messageOverview_v3.json +417 -0
  130. package/dist/vendored/fidelity/fidelity-messageOverview_visual.html +125 -0
  131. package/dist/vendored/fidelity/fidelity-messageOverview_visual.json +338 -0
  132. package/dist/vendored/index.html +16 -0
  133. package/dist/vendored/main.js +36 -0
  134. package/dist/vendored/meta/action-meta.json +141 -0
  135. package/dist/vendored/meta/component-meta.json +2714 -0
  136. package/dist/vendored/meta/directive-meta.json +40 -0
  137. package/dist/vendored/meta/style-meta.json +1086 -0
  138. package/dist/vendored/runtime/StyleParser.js +179 -0
  139. package/dist/vendored/runtime/adapter.js +166 -0
  140. package/dist/vendored/runtime/alert-card.js +125 -0
  141. package/dist/vendored/runtime/app-toast.js +33 -0
  142. package/dist/vendored/runtime/assets.js +16 -0
  143. package/dist/vendored/runtime/canvas-context.js +141 -0
  144. package/dist/vendored/runtime/card-runtime.js +289 -0
  145. package/dist/vendored/runtime/clipboard-node.js +83 -0
  146. package/dist/vendored/runtime/clipboard.js +29 -0
  147. package/dist/vendored/runtime/evaluate.js +152 -0
  148. package/dist/vendored/runtime/event-model.js +300 -0
  149. package/dist/vendored/runtime/hoverGuide.js +31 -0
  150. package/dist/vendored/runtime/jsapi-mock.js +256 -0
  151. package/dist/vendored/runtime/node-model.js +217 -0
  152. package/dist/vendored/runtime/property.js +364 -0
  153. package/dist/vendored/runtime/selectionOverlay.js +53 -0
  154. package/dist/vendored/runtime/toPreview.js +648 -0
  155. package/dist/vendored/standalone-main.js +36 -0
  156. package/dist/vendored/standalone.html +12 -0
  157. package/dist/vendored/styles/app.css +2565 -0
  158. package/dist/vendored/styles/card-gallery.css +234 -0
  159. package/dist/vendored/styles/card-select.css +281 -0
  160. package/dist/vendored/styles/components.css +383 -0
  161. package/dist/vendored/styles/dropdown.css +337 -0
  162. package/dist/vendored/styles/json-tree.css +308 -0
  163. package/dist/vendored/styles/node-inspector.css +1003 -0
  164. package/dist/vendored/styles/setters.css +962 -0
  165. package/dist/vendored/styles/standalone.css +27 -0
  166. package/dist/vendored/styles/structure-tree.css +320 -0
  167. package/package.json +42 -0
@@ -0,0 +1,160 @@
1
+ <!--
2
+ 分段选择设置器 —— 合并编辑器中五个"单选一组"的控件:
3
+
4
+ TabSelect 文字分段(选项来自 itemOption.iParamList)
5
+ FontStyle 正体 / 斜体
6
+ TextDecorationStyle 无 / 下划线 / 删除线
7
+ JustifyContentStyle 主轴对齐(随 flexDirection 变向,图标旋转 90°)
8
+ AlignItemsStyle 交叉轴对齐(同上)
9
+
10
+ 编辑器里它们是五个独立组件,但交互完全一致(点选 → input + change),
11
+ 差异只在「选项从哪来 / 图标怎么画」,因此这里用同一个组件按 kind 分派,
12
+ 避免五份重复模板。图标用内联 SVG 现画,不引外部图片资源。
13
+ -->
14
+ <template>
15
+ <div class="st-seg">
16
+ <div
17
+ v-for="(o, i) in items"
18
+ :key="o.key + '_' + i"
19
+ class="st-seg__item"
20
+ :class="{ 'st-seg__item--on': String(o.key) === String(current) }"
21
+ :title="o.title || o.value"
22
+ @click="pick(o)"
23
+ >
24
+ <svg
25
+ v-if="o.icon"
26
+ class="st-seg__icon"
27
+ viewBox="0 0 16 16"
28
+ :style="rotate ? 'transform:rotate(90deg)' : ''"
29
+ >
30
+ <!-- 容器外框 -->
31
+ <rect
32
+ v-if="o.icon.frame"
33
+ x="1" y="2.6" width="14" height="10.8" rx="1.4"
34
+ fill="none" stroke="currentColor" stroke-width="1" opacity="0.35"
35
+ />
36
+ <!-- 内容条 -->
37
+ <rect
38
+ v-for="(r, ri) in o.icon.rects || []"
39
+ :key="'r' + ri"
40
+ :x="r[0]" :y="r[1]" :width="r[2]" :height="r[3]"
41
+ rx="0.6" fill="currentColor" stroke="none"
42
+ />
43
+ <!-- 辅助线(基线 / 下划线 / 删除线) -->
44
+ <line
45
+ v-for="(l, li) in o.icon.lines || []"
46
+ :key="'l' + li"
47
+ :x1="l[0]" :y1="l[1]" :x2="l[2]" :y2="l[3]"
48
+ stroke="currentColor" stroke-width="1.1"
49
+ />
50
+ <!-- 字形(FontStyle / TextDecorationStyle) -->
51
+ <text
52
+ v-if="o.icon.text"
53
+ x="8" y="12" text-anchor="middle"
54
+ font-size="11" font-weight="600" fill="currentColor" stroke="none"
55
+ :font-style="o.icon.italic ? 'italic' : 'normal'"
56
+ >{{ o.icon.text }}</text>
57
+ </svg>
58
+ <span v-else>{{ o.value }}</span>
59
+ </div>
60
+ </div>
61
+ </template>
62
+
63
+ <script>
64
+ import { setterProps, setterEmits } from './props.js'
65
+
66
+ /** 主轴对齐:两根竖条(w=3.2 h=6.4,居中于 y=4.8)在横向的摆位 */
67
+ const JUSTIFY = [
68
+ { key: 'flex-start', name: '起始对齐', bars: [2.6, 6.2] },
69
+ { key: 'center', name: '居中', bars: [4.6, 8.2] },
70
+ { key: 'flex-end', name: '末端对齐', bars: [6.6, 10.2] },
71
+ { key: 'space-between', name: '两端对齐', bars: [2.6, 10.2] },
72
+ { key: 'space-around', name: '等距间隔', bars: [3.6, 9.2] },
73
+ ]
74
+
75
+ /** 交叉轴对齐:两根竖条(高度不同)在纵向的摆位 [y, h] */
76
+ const ALIGN = [
77
+ { key: 'flex-start', name: '起始对齐', a: [3.6, 6.4], b: [3.6, 4.4] },
78
+ { key: 'center', name: '居中', a: [4.8, 6.4], b: [5.8, 4.4] },
79
+ { key: 'flex-end', name: '末端对齐', a: [6, 6.4], b: [8, 4.4] },
80
+ { key: 'baseline', name: '基线对齐', a: [4, 5.6], b: [6, 3.6], baseline: 9.6 },
81
+ { key: 'stretch', name: '拉伸', a: [3.6, 9.4], b: [3.6, 9.4] },
82
+ ]
83
+
84
+ const FONT_STYLE = [
85
+ { key: 'normal', value: '正体', title: 'font-style: normal', icon: { text: 'A' } },
86
+ { key: 'italic', value: '斜体', title: 'font-style: italic', icon: { text: 'A', italic: true } },
87
+ ]
88
+
89
+ const TEXT_DECORATION = [
90
+ { key: 'none', value: '无', title: 'text-decoration: none', icon: { text: 'A' } },
91
+ {
92
+ key: 'underline',
93
+ value: '下划线',
94
+ title: 'text-decoration: underline',
95
+ icon: { text: 'A', lines: [[3.5, 14, 12.5, 14]] },
96
+ },
97
+ {
98
+ key: 'line-through',
99
+ value: '删除线',
100
+ title: 'text-decoration: line-through',
101
+ icon: { text: 'A', lines: [[3, 8.6, 13, 8.6]] },
102
+ },
103
+ ]
104
+
105
+ export default {
106
+ name: 'SetSegment',
107
+ props: { ...setterProps, kind: { type: String, default: 'TabSelect' } },
108
+ emits: setterEmits,
109
+ computed: {
110
+ current() {
111
+ return this.value === undefined || this.value === null ? '' : this.value
112
+ },
113
+ /** 竖排布局时对齐图标转 90°(与编辑器 lep_rotate 一致) */
114
+ flexDirection() {
115
+ return this.options.flexDirection || this.watches.flexDirection || 'row'
116
+ },
117
+ rotate() {
118
+ return (
119
+ (this.kind === 'JustifyContentStyle' || this.kind === 'AlignItemsStyle') &&
120
+ this.flexDirection === 'column'
121
+ )
122
+ },
123
+ items() {
124
+ if (this.kind === 'JustifyContentStyle') {
125
+ return JUSTIFY.map((o) => ({
126
+ key: o.key,
127
+ value: o.name,
128
+ title: `justify-content: ${o.key}`,
129
+ icon: { frame: true, rects: o.bars.map((x) => [x, 4.8, 3.2, 6.4]) },
130
+ }))
131
+ }
132
+ if (this.kind === 'AlignItemsStyle') {
133
+ return ALIGN.map((o) => ({
134
+ key: o.key,
135
+ value: o.name,
136
+ title: `align-items: ${o.key}`,
137
+ icon: {
138
+ frame: true,
139
+ rects: [
140
+ [4.2, o.a[0], 3.2, o.a[1]],
141
+ [8.6, o.b[0], 3.2, o.b[1]],
142
+ ],
143
+ lines: o.baseline ? [[1.6, o.baseline, 14.4, o.baseline]] : undefined,
144
+ },
145
+ }))
146
+ }
147
+ if (this.kind === 'FontStyle') return FONT_STYLE
148
+ if (this.kind === 'TextDecorationStyle') return TEXT_DECORATION
149
+ return this.options.iParamList || []
150
+ },
151
+ },
152
+ methods: {
153
+ pick(o) {
154
+ if (this.disabled) return
155
+ this.$emit('input', o.key)
156
+ this.$emit('change')
157
+ },
158
+ },
159
+ }
160
+ </script>
@@ -0,0 +1,51 @@
1
+ <!--
2
+ 下拉选择设置器:对应编辑器 common/Select。
3
+ 选项来源 itemOption.iParamList = [{key, value}]。
4
+ 可清空(对应编辑器的 clearable):选中值后触发器右侧出现 ✕ 清除按钮,
5
+ 空值态由 Dropdown 的 placeholder 在触发器上显示,不再把占位文案当选项注入。
6
+ 统一使用 Dropdown 组件(支持尺寸),替换原生 <select>。
7
+ -->
8
+ <template>
9
+ <Dropdown
10
+ :value="current"
11
+ :options="optionList"
12
+ :placeholder="placeholder"
13
+ clearable
14
+ size="sm"
15
+ block
16
+ :disabled="disabled"
17
+ @input="onChange"
18
+ />
19
+ </template>
20
+
21
+ <script>
22
+ import { setterProps, setterEmits } from './props.js'
23
+
24
+ export default {
25
+ name: 'SetSelect',
26
+ props: setterProps,
27
+ emits: setterEmits,
28
+ computed: {
29
+ list() {
30
+ return this.options.iParamList || this.options.iTypeList || []
31
+ },
32
+ placeholder() {
33
+ return this.options.placeholder || '请选择'
34
+ },
35
+ optionList() {
36
+ // 不把占位文案当作可选项注入;空值态由 Dropdown 的 placeholder 在触发器上显示,
37
+ // 弹层内只列出真实选项(避免「请选择/待选择」作为一条选项出现)。
38
+ return this.list.map((o) => ({ key: String(o.key), value: o.value }))
39
+ },
40
+ current() {
41
+ return this.value === undefined || this.value === null ? '' : String(this.value)
42
+ },
43
+ },
44
+ methods: {
45
+ onChange(v) {
46
+ this.$emit('input', v)
47
+ this.$emit('change')
48
+ },
49
+ },
50
+ }
51
+ </script>
@@ -0,0 +1,49 @@
1
+ <!--
2
+ 开关设置器:对应编辑器 common/Switcher 与 forms/BooleanForm。
3
+
4
+ 关键点(照搬编辑器语义):Switcher 的开/关值默认是**字符串** '1' / '0',
5
+ BooleanForm 只是把 activeValue/inactiveValue 换成布尔 true/false 的 Switcher。
6
+ 写成 boolean 会导致 DSL 里 isBorder 变成 true,线上解析不到,故必须保留原类型。
7
+ -->
8
+ <template>
9
+ <div class="st-switch" :class="{ 'st-switch--on': on }" @click="toggle">
10
+ <span class="st-switch__track"><span class="st-switch__knob" /></span>
11
+ <span class="st-switch__text">{{ on ? activeText : inactiveText }}</span>
12
+ </div>
13
+ </template>
14
+
15
+ <script>
16
+ import { setterProps, setterEmits } from './props.js'
17
+
18
+ export default {
19
+ name: 'SetSwitch',
20
+ props: { ...setterProps, boolean: { type: Boolean, default: false } },
21
+ emits: setterEmits,
22
+ computed: {
23
+ activeValue() {
24
+ if (this.options.activeValue !== undefined) return this.options.activeValue
25
+ return this.boolean ? true : '1'
26
+ },
27
+ inactiveValue() {
28
+ if (this.options.inactiveValue !== undefined) return this.options.inactiveValue
29
+ return this.boolean ? false : '0'
30
+ },
31
+ on() {
32
+ return this.value === this.activeValue
33
+ },
34
+ activeText() {
35
+ return this.options.activeText || '开'
36
+ },
37
+ inactiveText() {
38
+ return this.options.inactiveText || '关'
39
+ },
40
+ },
41
+ methods: {
42
+ toggle() {
43
+ if (this.disabled) return
44
+ this.$emit('input', this.on ? this.inactiveValue : this.activeValue)
45
+ this.$emit('change')
46
+ },
47
+ },
48
+ }
49
+ </script>
@@ -0,0 +1,52 @@
1
+ <!--
2
+ 文本输入设置器:对应编辑器 common/Input 与 common/Textarea。
3
+ itemType 为 Input / Textarea / 空(无类型时的默认文本框)时使用。
4
+ -->
5
+ <template>
6
+ <textarea
7
+ v-if="multiline"
8
+ class="st-textarea"
9
+ :rows="rows"
10
+ :placeholder="options.placeholder || ''"
11
+ :disabled="disabled"
12
+ :value="text"
13
+ @input="onInput($event.target.value)"
14
+ @change="$emit('change')"
15
+ />
16
+ <input
17
+ v-else
18
+ class="ni-input"
19
+ type="text"
20
+ :placeholder="options.placeholder || ''"
21
+ :disabled="disabled"
22
+ :value="text"
23
+ @input="onInput($event.target.value)"
24
+ @change="$emit('change')"
25
+ />
26
+ </template>
27
+
28
+ <script>
29
+ import { setterProps, setterEmits } from './props.js'
30
+
31
+ export default {
32
+ name: 'SetText',
33
+ props: { ...setterProps, multiline: { type: Boolean, default: false } },
34
+ emits: setterEmits,
35
+ computed: {
36
+ text() {
37
+ return this.value === undefined || this.value === null ? '' : String(this.value)
38
+ },
39
+ rows() {
40
+ // itemOption.autosize = {minRows, maxRows}
41
+ const a = this.options.autosize
42
+ if (a && typeof a === 'object' && a.minRows) return a.minRows
43
+ return 4
44
+ },
45
+ },
46
+ methods: {
47
+ onInput(v) {
48
+ this.$emit('input', v)
49
+ },
50
+ },
51
+ }
52
+ </script>
@@ -0,0 +1,23 @@
1
+ /**
2
+ * 设置器统一 props / emits。
3
+ * 与编辑器 `base/properties/components/props.js` 一一对应,便于逐个组件对照移植。
4
+ *
5
+ * value 当前值(Property.itemValue)
6
+ * options itemOption
7
+ * watches 同级属性值快照,供 itemWatch 联动(如 flexDirection 决定对齐图标方向)
8
+ * itemInfo Property 实例本身(少数控件需要读 itemDefaultValue / itemKey)
9
+ * disabled 禁用
10
+ *
11
+ * 事件:input(新值) → 由 PropRow 写回 Property;change() → 触发预览刷新。
12
+ */
13
+ export const setterProps = {
14
+ value: { default: '' },
15
+ options: { type: Object, default: () => ({}) },
16
+ watches: { type: Object, default: () => ({}) },
17
+ itemInfo: { type: Object, default: () => ({}) },
18
+ disabled: { type: Boolean, default: false },
19
+ };
20
+
21
+ export const setterEmits = ['input', 'change'];
22
+
23
+ export default setterProps;
@@ -0,0 +1,87 @@
1
+ {
2
+ "cardId": "messageOverview",
3
+ "tolerance": 2,
4
+ "createdAt": "2026-08-19T09:30:08.138Z",
5
+ "rows": [
6
+ {
7
+ "cid": "comp_0110",
8
+ "className": "Text",
9
+ "expectText": "重点摘要",
10
+ "dxL": -1,
11
+ "dyL": -1.5,
12
+ "dw": 0,
13
+ "dh": -1,
14
+ "tol": 4
15
+ },
16
+ {
17
+ "cid": "comp_0111",
18
+ "className": "Text",
19
+ "expectText": "按强重要、待关注、时间倒序展示,不超过3条",
20
+ "dxL": -1,
21
+ "dyL": 1.5,
22
+ "dw": -42.9,
23
+ "dh": 0,
24
+ "tol": 45
25
+ },
26
+ {
27
+ "cid": "comp_0103",
28
+ "className": "Text",
29
+ "expectText": "条未读消息",
30
+ "dxL": -3.2,
31
+ "dyL": -6.5,
32
+ "dw": 0,
33
+ "dh": -1,
34
+ "tol": 9
35
+ },
36
+ {
37
+ "cid": "comp_0102",
38
+ "className": "Text",
39
+ "expectText": "12",
40
+ "dxL": 1,
41
+ "dyL": -8.5,
42
+ "dw": 0.8,
43
+ "dh": 0,
44
+ "tol": 11
45
+ },
46
+ {
47
+ "cid": "comp_0101",
48
+ "className": "Text",
49
+ "expectText": "动账 5 · 转账 2 · 站内 1 · 其他 4",
50
+ "dxL": -45,
51
+ "dyL": 3.5,
52
+ "dw": 27.1,
53
+ "dh": 10,
54
+ "tol": 47
55
+ },
56
+ {
57
+ "cid": "comp_0107",
58
+ "className": "Row",
59
+ "expectText": "查看全部",
60
+ "dxL": 35,
61
+ "dyL": -12.5,
62
+ "dw": 16,
63
+ "dh": 2,
64
+ "tol": 37
65
+ },
66
+ {
67
+ "cid": "comp_0114",
68
+ "className": "Text",
69
+ "expectText": "今日有一笔支出动账",
70
+ "dxL": 22.7,
71
+ "dyL": 3.5,
72
+ "dw": 0,
73
+ "dh": -1,
74
+ "tol": 25
75
+ },
76
+ {
77
+ "cid": "comp_0115",
78
+ "className": "Text",
79
+ "expectText": "金额1,280.00元,建议核对资金变动。",
80
+ "dxL": 22.7,
81
+ "dyL": 2.5,
82
+ "dw": -32.7,
83
+ "dh": 0,
84
+ "tol": 35
85
+ }
86
+ ]
87
+ }
@@ -0,0 +1,29 @@
1
+ {
2
+ "updatedAt": "2026-08-19T10:17:34.471Z",
3
+ "cards": [
4
+ "messageOverview",
5
+ "messageOverview_v2",
6
+ "messageOverview_v3",
7
+ "messageOverview_visual"
8
+ ],
9
+ "classes": {
10
+ "Text": {
11
+ "cards": 8,
12
+ "samples": 47,
13
+ "dxL": null,
14
+ "dyL": null,
15
+ "dw": null,
16
+ "dh": null,
17
+ "maxAbs": 61.1
18
+ },
19
+ "Row": {
20
+ "cards": 1,
21
+ "samples": 6,
22
+ "dxL": null,
23
+ "dyL": null,
24
+ "dw": null,
25
+ "dh": null,
26
+ "maxAbs": 285
27
+ }
28
+ }
29
+ }
@@ -0,0 +1,114 @@
1
+ <!DOCTYPE html>
2
+ <html lang="zh-CN"><head><meta charset="utf-8"><title>UI 还原度对拍 · messageOverview-after</title>
3
+ <style>
4
+ body{font-family:-apple-system,"PingFang SC","Microsoft YaHei",sans-serif;margin:0;background:#f5f6f8;color:#1f2329}
5
+ .wrap{max-width:1080px;margin:0 auto;padding:24px 20px 60px}
6
+ h1{font-size:20px;margin:0 0 4px}
7
+ .sub{color:#666;font-size:12px;margin-bottom:18px}
8
+ .cards{display:flex;gap:12px;flex-wrap:wrap;margin-bottom:20px}
9
+ .card{flex:1;min-width:150px;background:#fff;border:1px solid #e5e6eb;border-radius:8px;padding:14px 16px}
10
+ .card .num{font-size:26px;font-weight:700}
11
+ .card .lbl{font-size:12px;color:#666;margin-top:2px}
12
+ table{border-collapse:collapse;width:100%;background:#fff;font-size:13px;border:1px solid #e5e6eb;border-radius:8px;overflow:hidden}
13
+ th,td{padding:7px 10px;border-bottom:1px solid #f0f1f3;text-align:left;white-space:nowrap}
14
+ th{background:#fafbfc;color:#333;font-weight:600}
15
+ tr:last-child td{border-bottom:none}
16
+ .sec{margin-top:22px;font-size:15px;font-weight:600}
17
+ .tips{background:#fff;border:1px solid #e5e6eb;border-radius:8px;padding:12px 16px 12px 34px;font-size:13px;line-height:1.8}
18
+ .muted{color:#999}
19
+ </style></head><body><div class="wrap">
20
+ <h1>UI 还原度对拍报告 · messageOverview-after</h1>
21
+ <div class="sub">spec: UI/01、泛化消息-有未读消息-没有待办/spec.json · 阈值 ±2px · 2026/8/19 17:30:19 · 生成:fidelity_report.mjs</div>
22
+ <div class="cards">
23
+ <div class="card"><div class="num">6</div><div class="lbl">已匹配元素</div></div>
24
+ <div class="card"><div class="num" style="color:#c62828">5</div><div class="lbl">超差(&gt;4px)</div></div>
25
+ <div class="card"><div class="num" style="color:#b26a00">0</div><div class="lbl">偏差(&gt;2px)</div></div>
26
+ <div class="card"><div class="num">7</div><div class="lbl">未匹配(设计稿)</div></div>
27
+ <div class="card"><div class="num">-30.0</div><div class="lbl">公共偏移 Δx</div></div>
28
+ <div class="card"><div class="num">-301.5</div><div class="lbl">公共偏移 Δy</div></div>
29
+ <div class="card"><div class="num" style="color:#888">7</div><div class="lbl">chrome 裁剪(不参与对拍)</div></div>
30
+ </div>
31
+ <div class="sec">归因建议</div>
32
+ <ul class="tips"><li>整卡水平偏移 -30.0px(公共偏移已扣除,不影响逐元素评估;若渲染卡含外层留白/容器 padding 请检查根容器)</li>
33
+ <li>整卡垂直偏移 -301.5px(通常来自设计稿含状态栏/导航而渲染卡仅卡片主体;若渲染卡内确有同类元素整体偏移,请检查根容器 padding)</li>
34
+ <li>单元素离群:「条未读消息」(Text)偏离同类中位 6.5px → 检查该元素自身 align/padding/fontSize</li>
35
+ <li>单元素离群:「12」(Text)偏离同类中位 8.5px → 检查该元素自身 align/padding/fontSize</li>
36
+ <li>单元素离群:「动账 5 · 转账 2 · 站内」(Text)偏离同类中位 44.0px → 检查该元素自身 align/padding/fontSize</li>
37
+ <li>单元素离群:「今日有一笔支出动账」(Text)偏离同类中位 23.7px → 检查该元素自身 align/padding/fontSize</li></ul>
38
+ <div class="sec">逐元素差异(局部 Δ = 已扣除公共偏移)</div>
39
+ <table>
40
+ <tr><th>状态</th><th>文本/元素</th><th>组件类</th><th>匹配</th><th>期望 rect</th><th>实际 rect</th><th>Δx</th><th>Δy</th><th>Δw</th><th>Δh</th></tr>
41
+ <tr style="background:#fdecea">
42
+ <td style="color:#c62828;font-weight:600">超差</td>
43
+ <td title="按强重要、待关注、时间倒序展示,不超过3条">按强重要、待关注、时间倒序展示,不超过3条</td>
44
+ <td>Text</td>
45
+ <td title="通过 text">文本</td>
46
+ <td style="color:#666">32, 420 · 311×18</td>
47
+ <td style="color:#666">2, 120 · 268.1×18</td>
48
+ <td style="color:#666">0.0</td>
49
+ <td style="color:#666">+1.5</td>
50
+ <td style="color:#c62828">-42.9</td>
51
+ <td style="color:#666">0.0</td>
52
+ </tr>
53
+ <tr style="background:#fdecea">
54
+ <td style="color:#c62828;font-weight:600">超差</td>
55
+ <td title="条未读消息">条未读消息</td>
56
+ <td>Text</td>
57
+ <td title="通过 text">文本</td>
58
+ <td style="color:#666">74, 328 · 75×22</td>
59
+ <td style="color:#666">41.8, 20 · 75×21</td>
60
+ <td style="color:#c62828">-2.2</td>
61
+ <td style="color:#c62828">-6.5</td>
62
+ <td style="color:#666">0.0</td>
63
+ <td style="color:#666">-1.0</td>
64
+ </tr>
65
+ <tr style="background:#fdecea">
66
+ <td style="color:#c62828;font-weight:600">超差</td>
67
+ <td title="12">12</td>
68
+ <td>Text</td>
69
+ <td title="通过 text">文本</td>
70
+ <td style="color:#666">32, 314 · 31×42</td>
71
+ <td style="color:#666">4, 4 · 31.8×42</td>
72
+ <td style="color:#666">+2.0</td>
73
+ <td style="color:#c62828">-8.5</td>
74
+ <td style="color:#666">+0.8</td>
75
+ <td style="color:#666">0.0</td>
76
+ </tr>
77
+ <tr style="background:#fdecea">
78
+ <td style="color:#c62828;font-weight:600">超差</td>
79
+ <td title="动账 5 · 转账 2 · 站内 1 · 其他 4">动账 5 · 转账 2 · 站内 1 · 其他 </td>
80
+ <td>Text</td>
81
+ <td title="通过 text-far">几何</td>
82
+ <td style="color:#666">74, 352 · 196×18</td>
83
+ <td style="color:#666">0, 54 · 223.1×28</td>
84
+ <td style="color:#c62828">-44.0</td>
85
+ <td style="color:#c62828">+3.5</td>
86
+ <td style="color:#c62828">+27.1</td>
87
+ <td style="color:#c62828">+10.0</td>
88
+ </tr>
89
+ <tr style="background:#fdecea">
90
+ <td style="color:#c62828;font-weight:600">超差</td>
91
+ <td title="今日有一笔支出动账">今日有一笔支出动账</td>
92
+ <td>Text</td>
93
+ <td title="通过 text">文本</td>
94
+ <td style="color:#666">58, 464 · 135×22</td>
95
+ <td style="color:#666">51.7, 166 · 135×21</td>
96
+ <td style="color:#c62828">+23.7</td>
97
+ <td style="color:#c62828">+3.5</td>
98
+ <td style="color:#666">0.0</td>
99
+ <td style="color:#666">-1.0</td>
100
+ </tr>
101
+ <tr style="background:#e7f6ec">
102
+ <td style="color:#0a7a2f;font-weight:600">OK</td>
103
+ <td title="重点摘要">重点摘要</td>
104
+ <td>Text</td>
105
+ <td title="通过 text">文本</td>
106
+ <td style="color:#666">32, 396 · 60×22</td>
107
+ <td style="color:#666">2, 93 · 60×21</td>
108
+ <td style="color:#666">0.0</td>
109
+ <td style="color:#666">-1.5</td>
110
+ <td style="color:#666">0.0</td>
111
+ <td style="color:#666">-1.0</td>
112
+ </tr>
113
+ </table>
114
+ </div></body></html>