comate-ui-inspector 0.1.5-alpha.6 → 0.1.5

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.
@@ -141,7 +141,13 @@
141
141
  } else {
142
142
  val = String(el.value == null ? '' : el.value).slice(0, 100);
143
143
  }
144
- emit('change', {selector: cssPath(el), tag: el.nodeName.toLowerCase(), type: type || undefined, value: val, ts: Date.now()});
144
+ emit('change', {
145
+ selector: cssPath(el),
146
+ tag: el.nodeName.toLowerCase(),
147
+ type: type || undefined,
148
+ value: val,
149
+ ts: Date.now(),
150
+ });
145
151
  }
146
152
 
147
153
  function onSubmit(e) {
@@ -93,9 +93,11 @@
93
93
  renumber();
94
94
  selected.forEach(function (item, i) {
95
95
  var info = item.info || {};
96
- var files = (info.componentChain || []).map(function (c) {
97
- return c && c.file;
98
- }).filter(Boolean);
96
+ var files = (info.componentChain || [])
97
+ .map(function (c) {
98
+ return c && c.file;
99
+ })
100
+ .filter(Boolean);
99
101
  var row = document.createElement('div');
100
102
  row.style.cssText =
101
103
  'display:flex;align-items:flex-start;gap:6px;padding:6px 0;border-top:1px solid #2a2a2a;';
@@ -105,7 +105,10 @@ function describeRecording(meta, evs) {
105
105
  } else if (ev.kind === 'scroll') {
106
106
  lines.push({ts: it.ts, text: `滚动 ${it.selector} → (${it.x}, ${it.y})`});
107
107
  } else if (ev.kind === 'change') {
108
- lines.push({ts: it.ts, text: `输入/变更 <${it.tag}> @ ${it.selector} = ${JSON.stringify(String(it.value ?? '').slice(0, 60))}`});
108
+ lines.push({
109
+ ts: it.ts,
110
+ text: `输入/变更 <${it.tag}> @ ${it.selector} = ${JSON.stringify(String(it.value ?? '').slice(0, 60))}`,
111
+ });
109
112
  } else if (ev.kind === 'submit') {
110
113
  lines.push({ts: it.ts, text: `提交表单 @ ${it.selector}`});
111
114
  } else if (ev.kind === 'keydown') {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "comate-ui-inspector",
3
- "version": "0.1.5-alpha.6",
3
+ "version": "0.1.5",
4
4
  "description": "按住 Alt 点选页面元素,把「元素 + Vue 组件源码路径」交给 Comate 定位源码修改。浏览器扩展 + Native Messaging host + MCP + hook。",
5
5
  "type": "module",
6
6
  "license": "MIT",