@vcp-dev/site-edit-engine 0.4.9 → 0.6.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.
@@ -0,0 +1,10 @@
1
+ /**
2
+ * 边界种类 —— 标记节点所处的语义边界。
3
+ *
4
+ * - component-boundary: 组件调用边界
5
+ * - repeat-region: .map() / repeat 区域
6
+ * - conditional-region: 条件渲染区域
7
+ * - fragment-region: Fragment 包裹
8
+ * - opaque-region: 不透明 / 外部组件
9
+ */
10
+ export type BoundaryKind = "component-boundary" | "repeat-region" | "conditional-region" | "fragment-region" | "opaque-region";
@@ -0,0 +1,47 @@
1
+ /**
2
+ * 节点能力快照 —— 描述该节点支持的操作及约束。
3
+ *
4
+ * 重要:canMove = true 意味着支持 reorder / reparent / cross-file move,
5
+ * 不能被收窄为 "只能同级上下移动"。
6
+ * canInsertChild = true 意味着支持 native-tag 和 component-call 插入,
7
+ * 不能被收窄为 "只能插入 button"。
8
+ */
9
+ export interface NodeCapabilitySnapshot {
10
+ key: string;
11
+ canUpdateText: boolean;
12
+ canInsertChild: boolean;
13
+ canMove: boolean;
14
+ canRemove: boolean;
15
+ editModes?: {
16
+ updateText?: CapabilityModeView;
17
+ insertChild?: CapabilityModeView;
18
+ move?: CapabilityModeView;
19
+ remove?: CapabilityModeView;
20
+ };
21
+ constraints: CapabilityConstraint[];
22
+ }
23
+ export interface CapabilityModeView {
24
+ mode: "direct" | "proxy" | "upstream" | "readonly" | "unsupported";
25
+ reasonCode?: string;
26
+ }
27
+ /**
28
+ * 能力约束 —— 描述为什么某个操作受限。
29
+ */
30
+ export interface CapabilityConstraint {
31
+ kind: ConstraintKind;
32
+ message: string;
33
+ }
34
+ /**
35
+ * 约束种类枚举。
36
+ *
37
+ * 每个 kind 对应一种语义限制:
38
+ * - component-boundary: 跨组件边界操作需要特殊处理
39
+ * - repeat-region: repeat/map 区域内的限制
40
+ * - conditional-region: 条件渲染区域限制
41
+ * - opaque-region: 不透明组件内部不可编辑
42
+ * - void-element: 自闭合元素不能有子节点
43
+ * - read-only: 只读数据源
44
+ * - cross-file-required: 操作需要跨文件协调
45
+ * - import-required: 组件插入需要添加 import
46
+ */
47
+ export type ConstraintKind = "component-boundary" | "repeat-region" | "conditional-region" | "opaque-region" | "void-element" | "read-only" | "cross-file-required" | "import-required";
@@ -0,0 +1,69 @@
1
+ import type { SiteEditOperationErrorCode } from "@vcp-dev/contracts";
2
+ /**
3
+ * 操作错误码 —— 覆盖从节点查找到写回的所有失败路径。
4
+ *
5
+ * 值域以 @vcp-dev/contracts 的 SiteEditOperationErrorCode 为唯一权威源;这里
6
+ * 保留对象形式,供 engine 内部继续使用 OperationErrorCode.NODE_NOT_FOUND
7
+ * 这类可读访问方式。
8
+ */
9
+ export declare const OperationErrorCode: {
10
+ /** 目标节点 key 在 graph 中不存在 */
11
+ readonly NODE_NOT_FOUND: "NODE_NOT_FOUND";
12
+ /** 目标路由不存在 */
13
+ readonly ROUTE_NOT_FOUND: "ROUTE_NOT_FOUND";
14
+ /** capability 检查拒绝(如 canMove = false) */
15
+ readonly CAPABILITY_REJECTED: "CAPABILITY_REJECTED";
16
+ /** 约束违反(如试图往 void element 插入子节点) */
17
+ readonly CONSTRAINT_VIOLATED: "CONSTRAINT_VIOLATED";
18
+ /** 请求参数不合法 */
19
+ readonly INVALID_PARAMS: "INVALID_PARAMS";
20
+ /** planner 无法生成合法执行计划 */
21
+ readonly PLAN_FAILED: "PLAN_FAILED";
22
+ readonly TRANSACTION_PREFLIGHT_FAILED: "TRANSACTION_PREFLIGHT_FAILED";
23
+ readonly ROUTE_REBUILD_FAILED: "ROUTE_REBUILD_FAILED";
24
+ readonly HISTORY_COMMIT_FAILED: "HISTORY_COMMIT_FAILED";
25
+ readonly MATERIALIZATION_CONFLICT: "MATERIALIZATION_CONFLICT";
26
+ readonly MATERIALIZATION_REJECTED: "MATERIALIZATION_REJECTED";
27
+ readonly MUTATION_ASSERTION_REQUIRED: "MUTATION_ASSERTION_REQUIRED";
28
+ readonly MUTATION_ASSERTION_INVALID: "MUTATION_ASSERTION_INVALID";
29
+ /** documentVersion 过期 */
30
+ readonly VERSION_STALE: "VERSION_STALE";
31
+ /** AST 解析失败 */
32
+ readonly AST_PARSE_ERROR: "AST_PARSE_ERROR";
33
+ /** 操作在当前受支持语法形状外 */
34
+ readonly UNSUPPORTED_OPERATION: "UNSUPPORTED_OPERATION";
35
+ /** NodeLocator 定位失败 */
36
+ readonly LOCATOR_FAILED: "LOCATOR_FAILED";
37
+ /** 目标关系非法,例如无效父子关系或自闭合元素插子节点 */
38
+ readonly INVALID_TARGET: "INVALID_TARGET";
39
+ /** 文件写入 I/O 错误 */
40
+ readonly WRITE_IO_ERROR: "WRITE_IO_ERROR";
41
+ /** 并发修改冲突 */
42
+ readonly CONCURRENT_MODIFIED: "CONCURRENT_MODIFIED";
43
+ /** 回滚失败 */
44
+ readonly ROLLBACK_FAILED: "ROLLBACK_FAILED";
45
+ /** 文件/路由/历史状态需要显式恢复后才能继续写入 */
46
+ readonly RECOVERY_REQUIRED: "RECOVERY_REQUIRED";
47
+ readonly RECOVERY_PERSIST_FAILED: "RECOVERY_PERSIST_FAILED";
48
+ /** 写请求缺少设计器会话上下文 */
49
+ readonly MUTATION_SESSION_REQUIRED: "MUTATION_SESSION_REQUIRED";
50
+ /** 租约断言格式、签名或验证器配置无效 */
51
+ readonly LEASE_ASSERTION_INVALID: "LEASE_ASSERTION_INVALID";
52
+ /** 租约断言已经过期 */
53
+ readonly LEASE_ASSERTION_EXPIRED: "LEASE_ASSERTION_EXPIRED";
54
+ /** 租约断言与当前写作用域不匹配 */
55
+ readonly LEASE_ASSERTION_SCOPE_MISMATCH: "LEASE_ASSERTION_SCOPE_MISMATCH";
56
+ /** 页面级移动试图跨 route */
57
+ readonly CROSS_PAGE_MOVE_UNSUPPORTED: "CROSS_PAGE_MOVE_UNSUPPORTED";
58
+ /** 内部错误 */
59
+ readonly INTERNAL_ERROR: "INTERNAL_ERROR";
60
+ };
61
+ export type OperationErrorCode = SiteEditOperationErrorCode;
62
+ /**
63
+ * 操作错误 —— 附带错误码、消息和可选详情。
64
+ */
65
+ export interface OperationError {
66
+ code: OperationErrorCode;
67
+ message: string;
68
+ details?: Record<string, unknown>;
69
+ }
@@ -0,0 +1,39 @@
1
+ import type { OperationResult } from "./operation.js";
2
+ import type { OperationError } from "./error.js";
3
+ /**
4
+ * 设计器事件联合类型 —— engine 向 client 推送的所有事件。
5
+ *
6
+ * - document-changed: 文档树结构或内容发生变更
7
+ * - operation-completed: 操作执行成功
8
+ * - operation-failed: 操作执行失败
9
+ * - graph-invalidated: graph 需要重建(如文件变更)
10
+ * - graph-ready: graph 重建完成
11
+ * - graph-error: graph 重建失败,但保留最近一次成功结果
12
+ * - capability-changed: 部分节点的 capability 发生变化
13
+ */
14
+ export type DesignerEvent = {
15
+ type: "document-changed";
16
+ routeId: string;
17
+ version: number;
18
+ } | {
19
+ type: "operation-completed";
20
+ result: OperationResult;
21
+ } | {
22
+ type: "operation-failed";
23
+ requestId: string;
24
+ error: OperationError;
25
+ } | {
26
+ type: "graph-invalidated";
27
+ routeId: string;
28
+ } | {
29
+ type: "graph-ready";
30
+ routeId: string;
31
+ version: number;
32
+ } | {
33
+ type: "graph-error";
34
+ routeId: string;
35
+ message: string;
36
+ } | {
37
+ type: "capability-changed";
38
+ keys: string[];
39
+ };
@@ -0,0 +1,26 @@
1
+ /**
2
+ * 唯一身份标识,贯穿 DOM → protocol → engine → bridge 全链路。
3
+ *
4
+ * key 是唯一语义 key,由 file / component / structuralPath 确定性生成。
5
+ * 不得携带 SourceRange —— 那是 engine 内部实现细节。
6
+ */
7
+ export interface SourceIdentity {
8
+ /** 源文件相对路径,如 "src/app/page.tsx" */
9
+ file: string;
10
+ /** 所属组件名,如 "HomePage" */
11
+ component: string;
12
+ /** 结构化路径,如 "div#0/span#1" */
13
+ structuralPath: string;
14
+ /** 唯一 key = "{file}::{component}::{structuralPath}" */
15
+ key: string;
16
+ }
17
+ /**
18
+ * 生成稳定的 SourceIdentity.key。
19
+ */
20
+ export declare function computeSourceIdentityKey(file: string, component: string, structuralPath: string): string;
21
+ /**
22
+ * 解析 SourceIdentity.key。
23
+ *
24
+ * structuralPath 允许包含分隔符,所以只切前两个段,余下部分全部并回 structuralPath。
25
+ */
26
+ export declare function parseSourceIdentityKey(key: string): Pick<SourceIdentity, "file" | "component" | "structuralPath"> | null;
@@ -0,0 +1,77 @@
1
+ import type { SiteEditInsertNodeSpec, SiteEditMoveTarget, SiteEditOperationParams, SiteEditOperationRequest, SiteEditOperationTarget, SiteEditOperationType, SiteEditOperationValue, SiteEditStyleBreakpoint, SiteEditStyleProperty, SiteEditStyleStateMode } from "@vcp-dev/contracts";
2
+ import type { OperationError } from "./error.js";
3
+ /** caller-facing 操作类型 */
4
+ export type OperationType = SiteEditOperationType;
5
+ export type OperationValue = SiteEditOperationValue;
6
+ export type OperationTarget = SiteEditOperationTarget;
7
+ export type StyleProperty = SiteEditStyleProperty;
8
+ export type StyleStateMode = SiteEditStyleStateMode;
9
+ export type StyleBreakpoint = SiteEditStyleBreakpoint;
10
+ /**
11
+ * 操作请求 —— 由 client 发起,发送至 engine 执行。
12
+ */
13
+ export type OperationRequest = SiteEditOperationRequest;
14
+ /**
15
+ * 移动/插入目标位置。
16
+ *
17
+ * 支持四种 relation:
18
+ * - before / after: 以 anchorKey 为锚点的前后位置
19
+ * - prepend / append: 以 parentKey 为容器的首尾位置
20
+ *
21
+ * 关键:anchorKey / parentKey 可以跨组件、跨文件,
22
+ * 展开为多步 RewritePlan 是 engine/planner 的责任。
23
+ */
24
+ export type MoveTarget = SiteEditMoveTarget;
25
+ /**
26
+ * 可插入的 HTML 标签集合。
27
+ *
28
+ * 使用 string 联合 + 品牌扩展,允许任意合法 HTML 标签。
29
+ */
30
+ export type InsertableTag = Extract<SiteEditInsertNodeSpec, {
31
+ kind: "native-tag";
32
+ }>["tag"];
33
+ /**
34
+ * 插入节点规格。
35
+ *
36
+ * 支持两种模式:
37
+ * - native-tag: 插入 HTML 原生标签(可带文本)
38
+ * - component-call: 插入组件调用(需要 source + exportName + optional props)
39
+ *
40
+ * 关键:不能退化成 native-tag-only,component-call 是正式能力。
41
+ */
42
+ export type InsertNodeSpec = SiteEditInsertNodeSpec;
43
+ /**
44
+ * 操作参数联合类型 —— 按 kind 区分。
45
+ *
46
+ * - update-text: 更新文本段落(segmentIndex + value)
47
+ * - remove-node: 移除节点(无额外参数)
48
+ * - insert-child: 插入子节点(node 规格 + position)
49
+ * - move-node: 移动节点(target 位置 + preserveBindings)
50
+ */
51
+ export type OperationParams = SiteEditOperationParams;
52
+ /**
53
+ * 操作结果 —— engine 执行完成后返回。
54
+ */
55
+ export interface OperationSelectionRef {
56
+ key: string;
57
+ instanceIndex?: number;
58
+ instanceCount?: number;
59
+ }
60
+ export interface OperationResult {
61
+ /** 对应的请求 ID */
62
+ requestId: string;
63
+ /** 操作类型 */
64
+ kind: OperationType;
65
+ /** 操作目标 */
66
+ target: OperationTarget;
67
+ /** 是否成功 */
68
+ ok: boolean;
69
+ /** 操作后的 document version */
70
+ resultVersion: number;
71
+ /** 失败时的错误信息 */
72
+ error?: OperationError;
73
+ /** 本次操作实际影响的文件路径 */
74
+ affectedFiles?: string[];
75
+ /** 操作完成后建议恢复/选中的节点;move-node 会在 structural key 改变时返回新 key。 */
76
+ selectionRef?: OperationSelectionRef;
77
+ }
@@ -0,0 +1,203 @@
1
+ import type { SiteEditClassNameSourceStyleContext, SiteEditPageComposition } from "@vcp-dev/contracts";
2
+ import type { NodeCapabilitySnapshot } from "./capability.js";
3
+ import type { BoundaryKind } from "./boundary.js";
4
+ import type { OperationType } from "./operation.js";
5
+ export type ExternalSourceKind = "api-field" | "cms-field" | "i18n-message" | "config-entry";
6
+ export interface ExternalSourceView {
7
+ sourceType: ExternalSourceKind;
8
+ sourceId: string;
9
+ adapterId?: string;
10
+ }
11
+ /**
12
+ * 轻量级文档树 —— 一个路由对应一棵 RenderDocument。
13
+ * 由 engine 从 graph 投影而来,client 用于构建大纲 / 画布。
14
+ */
15
+ export interface RenderDocument {
16
+ routeId: string;
17
+ version: number;
18
+ rootKeys: string[];
19
+ entries: RenderEntry[];
20
+ styleContext?: SiteEditClassNameSourceStyleContext;
21
+ pageComposition: SiteEditPageComposition;
22
+ }
23
+ /**
24
+ * 单个渲染条目 —— 描述一个节点在树中的位置与概要能力。
25
+ */
26
+ export interface RenderEntry {
27
+ key: string;
28
+ tag: string;
29
+ label: string;
30
+ parentKey: string | null;
31
+ childKeys: string[];
32
+ pageCompositionUnitKey?: string;
33
+ operationSummary: OperationSummary;
34
+ }
35
+ /**
36
+ * 能力概要 —— 标记该节点支持的四个核心操作。
37
+ * 用于大纲 / 画布的快速渲染,详细约束见 NodeCapabilitySnapshot。
38
+ */
39
+ export interface OperationSummary {
40
+ canUpdateText: boolean;
41
+ canInsertChild: boolean;
42
+ canMove: boolean;
43
+ canRemove: boolean;
44
+ }
45
+ /**
46
+ * 选中节点的详细信息 —— 按需加载。
47
+ * 包含完整 capability、text segments、boundary 信息、邻接关系。
48
+ */
49
+ export interface RenderObjectDetail {
50
+ key: string;
51
+ tag: string;
52
+ componentName: string;
53
+ sourceFile: string;
54
+ sourceLocator?: SourceLocatorView;
55
+ label: string;
56
+ capabilities: NodeCapabilitySnapshot;
57
+ writeTarget: WriteTargetView;
58
+ effectiveWriteTarget?: EffectiveWriteTargetView;
59
+ provenanceChain?: ProvenanceChainView;
60
+ componentSemantic?: ComponentSemanticDescriptor;
61
+ contentModel?: ContentModelView;
62
+ mediaModel?: MediaModelView;
63
+ styleSource?: StyleSourceView;
64
+ conditional?: ConditionalDetailView;
65
+ textSegments: TextSegmentView[];
66
+ boundaryKind: BoundaryKind | null;
67
+ isOpaque: boolean;
68
+ ancestors: RenderEntryRef[];
69
+ children: RenderEntryRef[];
70
+ siblings: RenderEntryRef[];
71
+ }
72
+ export interface SourceLocatorRangeView {
73
+ startLine: number;
74
+ startColumn: number;
75
+ endLine: number;
76
+ endColumn: number;
77
+ }
78
+ export interface SourceLocatorView {
79
+ sourceFile: string;
80
+ componentName: string;
81
+ openingElementRange: SourceLocatorRangeView;
82
+ structuralPath: string;
83
+ textPreview?: string;
84
+ }
85
+ /**
86
+ * 写回目标视图 —— 描述该节点的语义写回落点。
87
+ */
88
+ export interface WriteTargetView {
89
+ kind: "jsx-node" | "component-proxy" | "value-binding" | "route-export";
90
+ file: string;
91
+ componentName: string;
92
+ isProxy: boolean;
93
+ }
94
+ export interface EffectiveWriteTargetView {
95
+ kind: "jsx-node" | "value-path" | "route-export" | "external-entry";
96
+ file?: string;
97
+ isProxy: boolean;
98
+ displayPath?: string;
99
+ sourceType?: ExternalSourceKind;
100
+ sourceId?: string;
101
+ }
102
+ /**
103
+ * 文本段落视图 —— 表示一个可编辑 / 只读的文本片段。
104
+ */
105
+ export interface TextSegmentView {
106
+ index: number;
107
+ value: string;
108
+ editable: boolean;
109
+ source: TextSourceView | null;
110
+ }
111
+ /**
112
+ * 文本来源视图 —— 描述文本片段来自字面量、绑定或模板。
113
+ */
114
+ export interface TextSourceView {
115
+ kind: "literal" | "binding" | "imported-binding" | "repeat-template";
116
+ file: string;
117
+ expression: string;
118
+ bindingName?: string;
119
+ path?: Array<string | number>;
120
+ }
121
+ export interface ProvenanceChainView {
122
+ finalSource: SemanticSourceView | null;
123
+ chain: ProvenanceHopView[];
124
+ confidence: "exact" | "safe-derived" | "partial" | "unknown";
125
+ editMode: "direct" | "proxy" | "upstream" | "readonly" | "unsupported";
126
+ diagnostics: Array<{
127
+ code: string;
128
+ message: string;
129
+ }>;
130
+ }
131
+ export interface SemanticSourceView {
132
+ kind: "jsx-literal" | "component-prop" | "binding" | "imported-binding" | "object-field" | "array-item" | "repeat-template" | "conditional-branch" | ExternalSourceKind;
133
+ file: string;
134
+ displayPath: string;
135
+ externalSource?: ExternalSourceView;
136
+ }
137
+ export interface ProvenanceHopView {
138
+ kind: "jsx-literal" | "component-prop" | "binding" | "imported-binding" | "object-field" | "array-item" | "repeat-template" | "conditional-branch" | ExternalSourceKind;
139
+ file: string;
140
+ displayName: string;
141
+ canEditHere: boolean;
142
+ }
143
+ export interface ComponentSemanticDescriptor {
144
+ componentName: string;
145
+ instanceKey: string;
146
+ templateOwner?: string;
147
+ variantKeys?: string[];
148
+ slotKeys?: string[];
149
+ editableStrategy: "instance" | "template" | "upstream";
150
+ impactScope?: "current-instance" | "component-template" | "upstream-source";
151
+ alternativeStrategies?: Array<"instance" | "template" | "upstream">;
152
+ }
153
+ export type ContentModelOperation = never;
154
+ export type MediaModelOperation = never;
155
+ export type StyleSourceOperation = Extract<OperationType, "set-class-name-source" | "apply-style-draft">;
156
+ export interface ModelDiagnosticView {
157
+ code: "unsupported-schema" | "unsupported-field";
158
+ field?: string;
159
+ message: string;
160
+ }
161
+ export interface ContentModelView {
162
+ kind: "markdown" | "rich-text-json";
163
+ field: string;
164
+ valuePath?: string;
165
+ schema?: string;
166
+ operationBoundary: ContentModelOperation[];
167
+ diagnostics?: ModelDiagnosticView[];
168
+ }
169
+ export interface MediaModelView {
170
+ kind: "image" | "video" | "media";
171
+ sourceType: "asset-id" | "cms-media-field" | "local-file-reference";
172
+ fields: string[];
173
+ editableFields: Array<"src" | "alt" | "poster" | "caption" | "width" | "height">;
174
+ operationBoundary: MediaModelOperation[];
175
+ valuePaths?: Record<string, string>;
176
+ diagnostics?: ModelDiagnosticView[];
177
+ }
178
+ export interface StyleSourceView {
179
+ kind: "class-name-source";
180
+ className: string;
181
+ sourceKind: "missing" | "static-attribute" | "static-expression" | "dynamic-expression";
182
+ editable: boolean;
183
+ operationBoundary: StyleSourceOperation[];
184
+ sourcePath?: string;
185
+ diagnostics?: Array<{
186
+ code: "missing-class-name" | "dynamic-binding" | "non-string-binding";
187
+ message: string;
188
+ }>;
189
+ }
190
+ export interface ConditionalDetailView {
191
+ currentBranch: "then" | "else";
192
+ availableBranches: Array<"then" | "else">;
193
+ conditionExpression: string;
194
+ provenance?: ProvenanceChainView;
195
+ }
196
+ /**
197
+ * 轻量级条目引用 —— 用于邻接关系列表。
198
+ */
199
+ export interface RenderEntryRef {
200
+ key: string;
201
+ tag: string;
202
+ label: string;
203
+ }
@@ -0,0 +1,9 @@
1
+ export { computeSourceIdentityKey, parseSourceIdentityKey, } from "./protocol/identity.js";
2
+ export { OperationErrorCode } from "./protocol/error.js";
3
+ export type { BoundaryKind } from "./protocol/boundary.js";
4
+ export type { CapabilityConstraint, CapabilityModeView, ConstraintKind, NodeCapabilitySnapshot, } from "./protocol/capability.js";
5
+ export type { DesignerEvent } from "./protocol/event.js";
6
+ export type { OperationError } from "./protocol/error.js";
7
+ export type { SourceIdentity } from "./protocol/identity.js";
8
+ export type { InsertableTag, InsertNodeSpec, MoveTarget, OperationParams, OperationRequest, OperationResult, OperationSelectionRef, OperationTarget, OperationType, OperationValue, StyleBreakpoint, StyleProperty, StyleStateMode, } from "./protocol/operation.js";
9
+ export type { ComponentSemanticDescriptor, ConditionalDetailView, ContentModelView, EffectiveWriteTargetView, MediaModelView, OperationSummary, ProvenanceChainView, ProvenanceHopView, RenderDocument, RenderEntry, RenderEntryRef, RenderObjectDetail, SemanticSourceView, SourceLocatorRangeView, SourceLocatorView, StyleSourceOperation, StyleSourceView, TextSegmentView, TextSourceView, WriteTargetView, } from "./protocol/render.js";
@@ -0,0 +1,16 @@
1
+ export type SiteEditColorMixPolicy = "always" | "raw-literal-only";
2
+ export interface SiteEditThemeStyleScanOptions {
3
+ colorMixPolicy: SiteEditColorMixPolicy;
4
+ includeExtendedColorFunctions?: boolean;
5
+ includeRgbBackgroundImage?: boolean;
6
+ rejectAnyRawColorLiteral?: boolean;
7
+ rejectPrivateTokens?: boolean;
8
+ rejectTailwindPalette?: boolean;
9
+ }
10
+ export interface SiteEditThemeStyleViolations {
11
+ hardCodedSurfaceHits: string[];
12
+ rawColorHits: string[];
13
+ privateTokenHits: string[];
14
+ }
15
+ export declare const SITE_EDIT_RAW_COLOR_LITERAL_RE: RegExp;
16
+ export declare function scanSiteEditThemeStyleViolations(content: string, options: SiteEditThemeStyleScanOptions): SiteEditThemeStyleViolations;