@vcp-dev/site-edit-engine 0.8.1 → 0.8.2

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.
@@ -7,8 +7,33 @@ export interface SiteEditThemeStyleScanOptions {
7
7
  rejectPrivateTokens?: boolean;
8
8
  rejectTailwindPalette?: boolean;
9
9
  }
10
+ /**
11
+ * 一处硬编码主题色命中的完整坐标。
12
+ *
13
+ * `hardCodedSurfaceHits` 只给去重后的类名,修复方拿到「你用了 bg-white」却不知道
14
+ * 在哪一行——真实事故里模型因此三轮都在改文件里没有违规的那一段,命中原地未动、
15
+ * 三次诊断字字相同,最终 chrome 落确定性回退。这里保留每一处的行号与整行片段,
16
+ * 让诊断能点名到元素。
17
+ */
18
+ export interface SiteEditThemeSurfaceOccurrence {
19
+ /** 命中的基础类名,例如 `bg-white`(不含变体前缀与透明度后缀)。 */
20
+ token: string;
21
+ /** 变体前缀,例如 `hover:` / `md:hover:`;无前缀时为空串。 */
22
+ variant: string;
23
+ /** 透明度后缀数值(`bg-white/10` ⇒ 10);无后缀时为 null。 */
24
+ alpha: number | null;
25
+ /** 1-based 行号。 */
26
+ line: number;
27
+ /** 该行去掉首尾空白后的片段,过长时截断。 */
28
+ snippet: string;
29
+ }
10
30
  export interface SiteEditThemeStyleViolations {
11
31
  hardCodedSurfaceHits: string[];
32
+ /**
33
+ * 与 `hardCodedSurfaceHits` 同源、逐处展开的坐标。前者保持去重字符串数组不变,
34
+ * 因为 `workspace-validation` 与 static-prefab 物化都在消费它。
35
+ */
36
+ hardCodedSurfaceOccurrences: SiteEditThemeSurfaceOccurrence[];
12
37
  rawColorHits: string[];
13
38
  privateTokenHits: string[];
14
39
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vcp-dev/site-edit-engine",
3
- "version": "0.8.1",
3
+ "version": "0.8.2",
4
4
  "type": "module",
5
5
  "license": "UNLICENSED",
6
6
  "repository": {
@@ -60,7 +60,7 @@
60
60
  "@babel/parser": "^7.29.3",
61
61
  "@babel/traverse": "^7.29.0",
62
62
  "@babel/types": "^7.29.0",
63
- "@vcp-dev/contracts": "0.8.1",
63
+ "@vcp-dev/contracts": "0.8.2",
64
64
  "yaml": "^2.9.0"
65
65
  },
66
66
  "devDependencies": {