@vcp-dev/contracts 0.10.20 → 0.10.22
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/dist/cms-page-directory.d.ts +7 -0
- package/dist/design-token-block.js +2 -2
- package/dist/external-site-edit.d.ts +32 -1
- package/dist/index.d.ts +115 -2
- package/dist/index.js +8 -8
- package/dist/input-context-bundle.d.ts +1 -1
- package/dist/media-library.d.ts +17 -58
- package/dist/page-template.d.ts +24 -0
- package/dist/site-edit-source.d.ts +8 -1
- package/dist/site-edit-version.d.ts +1 -1
- package/dist/site-localization-fields.d.ts +17 -7
- package/dist/site-workflow.d.ts +0 -1
- package/dist/subsite-visible-text-export.d.ts +19 -0
- package/dist/type-weight.d.ts +4 -0
- package/dist/workspace-file-mutation-tools.d.ts +17 -2
- package/package.json +1 -1
|
@@ -137,7 +137,7 @@ export declare const MAX_DOCUMENT_SOURCES_PER_SITE = 2;
|
|
|
137
137
|
*
|
|
138
138
|
* multipart/form-data 字段值一律是字符串:`consent_cross_border` 用字面量联合只放行
|
|
139
139
|
* `true` / `"true"`(其余含 `"false"` 一律拒)。**不用 `.transform()`**——会破坏
|
|
140
|
-
* `z.toJSONSchema` → OpenAPI(该 schema 进 `@ApiBody
|
|
140
|
+
* `z.toJSONSchema` → OpenAPI(该 schema 进 `@ApiBody`);
|
|
141
141
|
* 服务端用 `isConsentGranted()` 把 `true`/`"true"` 归一为已同意布尔。
|
|
142
142
|
*/
|
|
143
143
|
export declare const CreateDocumentUploadRequestSchema: z.ZodObject<{
|
package/dist/media-library.d.ts
CHANGED
|
@@ -101,32 +101,19 @@ export declare const UploadMediaLibraryAssetResponseSchema: z.ZodObject<{
|
|
|
101
101
|
}, z.core.$strip>;
|
|
102
102
|
export type UploadMediaLibraryAssetResponse = z.infer<typeof UploadMediaLibraryAssetResponseSchema>;
|
|
103
103
|
export declare const AI_IMAGE_GENERATION_MAX_QUANTITY = 4;
|
|
104
|
-
export declare const AI_IMAGE_GENERATION_ENTITLEMENT = "site.image_generation.max";
|
|
105
|
-
export declare const AiImageGenerationPrecheckRequestSchema: z.ZodObject<{
|
|
106
|
-
quantity: z.ZodNumber;
|
|
107
|
-
}, z.core.$strip>;
|
|
108
|
-
export type AiImageGenerationPrecheckRequest = z.infer<typeof AiImageGenerationPrecheckRequestSchema>;
|
|
109
|
-
export declare const AiImageGenerationQuotaSchema: z.ZodObject<{
|
|
110
|
-
available: z.ZodBoolean;
|
|
111
|
-
remaining: z.ZodNullable<z.ZodNumber>;
|
|
112
|
-
unlimited: z.ZodBoolean;
|
|
113
|
-
max_quantity: z.ZodNumber;
|
|
114
|
-
}, z.core.$strip>;
|
|
115
|
-
export type AiImageGenerationQuota = z.infer<typeof AiImageGenerationQuotaSchema>;
|
|
116
|
-
export declare const AiImageGenerationPrecheckResponseSchema: z.ZodObject<{
|
|
117
|
-
code: z.ZodLiteral<0>;
|
|
118
|
-
message: z.ZodString;
|
|
119
|
-
data: z.ZodObject<{
|
|
120
|
-
available: z.ZodBoolean;
|
|
121
|
-
remaining: z.ZodNullable<z.ZodNumber>;
|
|
122
|
-
unlimited: z.ZodBoolean;
|
|
123
|
-
max_quantity: z.ZodNumber;
|
|
124
|
-
}, z.core.$strip>;
|
|
125
|
-
}, z.core.$strip>;
|
|
126
|
-
export type AiImageGenerationPrecheckResponse = z.infer<typeof AiImageGenerationPrecheckResponseSchema>;
|
|
127
104
|
export declare const GenerateAiImagesRequestSchema: z.ZodObject<{
|
|
128
105
|
pageName: z.ZodString;
|
|
129
|
-
pageType: z.
|
|
106
|
+
pageType: z.ZodEnum<{
|
|
107
|
+
landing_page: "landing_page";
|
|
108
|
+
general_page: "general_page";
|
|
109
|
+
detail_page: "detail_page";
|
|
110
|
+
list_page: "list_page";
|
|
111
|
+
category_page: "category_page";
|
|
112
|
+
tag_page: "tag_page";
|
|
113
|
+
author_page: "author_page";
|
|
114
|
+
search_page: "search_page";
|
|
115
|
+
date_page: "date_page";
|
|
116
|
+
}>;
|
|
130
117
|
sectionTitle: z.ZodString;
|
|
131
118
|
nearbyTitle: z.ZodString;
|
|
132
119
|
nearbyBody: z.ZodString;
|
|
@@ -134,49 +121,21 @@ export declare const GenerateAiImagesRequestSchema: z.ZodObject<{
|
|
|
134
121
|
aspectRatio: z.ZodString;
|
|
135
122
|
}, z.core.$strip>;
|
|
136
123
|
export type GenerateAiImagesRequest = z.infer<typeof GenerateAiImagesRequestSchema>;
|
|
137
|
-
export declare const GeneratedAiImageResultSchema: z.
|
|
124
|
+
export declare const GeneratedAiImageResultSchema: z.ZodObject<{
|
|
138
125
|
index: z.ZodNumber;
|
|
139
126
|
ok: z.ZodLiteral<true>;
|
|
140
|
-
url: z.
|
|
141
|
-
|
|
142
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
143
|
-
index: z.ZodNumber;
|
|
144
|
-
ok: z.ZodLiteral<false>;
|
|
145
|
-
error: z.ZodEnum<{
|
|
146
|
-
quota: "quota";
|
|
147
|
-
generate: "generate";
|
|
148
|
-
network: "network";
|
|
149
|
-
}>;
|
|
150
|
-
message: z.ZodString;
|
|
151
|
-
request_id: z.ZodNullable<z.ZodString>;
|
|
152
|
-
}, z.core.$strip>], "ok">;
|
|
127
|
+
url: z.ZodString;
|
|
128
|
+
}, z.core.$strip>;
|
|
153
129
|
export type GeneratedAiImageResult = z.infer<typeof GeneratedAiImageResultSchema>;
|
|
154
130
|
export declare const GenerateAiImagesResponseSchema: z.ZodObject<{
|
|
155
131
|
code: z.ZodLiteral<0>;
|
|
156
132
|
message: z.ZodString;
|
|
157
133
|
data: z.ZodObject<{
|
|
158
|
-
|
|
159
|
-
available: z.ZodBoolean;
|
|
160
|
-
remaining: z.ZodNullable<z.ZodNumber>;
|
|
161
|
-
unlimited: z.ZodBoolean;
|
|
162
|
-
max_quantity: z.ZodNumber;
|
|
163
|
-
}, z.core.$strip>;
|
|
164
|
-
items: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
134
|
+
items: z.ZodArray<z.ZodObject<{
|
|
165
135
|
index: z.ZodNumber;
|
|
166
136
|
ok: z.ZodLiteral<true>;
|
|
167
|
-
url: z.
|
|
168
|
-
|
|
169
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
170
|
-
index: z.ZodNumber;
|
|
171
|
-
ok: z.ZodLiteral<false>;
|
|
172
|
-
error: z.ZodEnum<{
|
|
173
|
-
quota: "quota";
|
|
174
|
-
generate: "generate";
|
|
175
|
-
network: "network";
|
|
176
|
-
}>;
|
|
177
|
-
message: z.ZodString;
|
|
178
|
-
request_id: z.ZodNullable<z.ZodString>;
|
|
179
|
-
}, z.core.$strip>], "ok">>;
|
|
137
|
+
url: z.ZodString;
|
|
138
|
+
}, z.core.$strip>>;
|
|
180
139
|
}, z.core.$strip>;
|
|
181
140
|
}, z.core.$strip>;
|
|
182
141
|
export type GenerateAiImagesResponse = z.infer<typeof GenerateAiImagesResponseSchema>;
|
package/dist/page-template.d.ts
CHANGED
|
@@ -78,6 +78,12 @@ export declare const PageTemplateTaskSchema: z.ZodObject<{
|
|
|
78
78
|
created_at: z.ZodString;
|
|
79
79
|
started_at: z.ZodNullable<z.ZodString>;
|
|
80
80
|
finished_at: z.ZodNullable<z.ZodString>;
|
|
81
|
+
advisories: z.ZodDefault<z.ZodNullable<z.ZodArray<z.ZodObject<{
|
|
82
|
+
code: z.ZodEnum<{
|
|
83
|
+
preexisting_placeholder_media: "preexisting_placeholder_media";
|
|
84
|
+
}>;
|
|
85
|
+
block_ids: z.ZodArray<z.ZodString>;
|
|
86
|
+
}, z.core.$strict>>>>;
|
|
81
87
|
execution_scene: z.ZodLiteral<"page_template_create">;
|
|
82
88
|
external_run_id: z.ZodString;
|
|
83
89
|
external_thread_id: z.ZodString;
|
|
@@ -111,6 +117,12 @@ export declare const PageTemplateCreateResponseSchema: z.ZodObject<{
|
|
|
111
117
|
created_at: z.ZodString;
|
|
112
118
|
started_at: z.ZodNullable<z.ZodString>;
|
|
113
119
|
finished_at: z.ZodNullable<z.ZodString>;
|
|
120
|
+
advisories: z.ZodDefault<z.ZodNullable<z.ZodArray<z.ZodObject<{
|
|
121
|
+
code: z.ZodEnum<{
|
|
122
|
+
preexisting_placeholder_media: "preexisting_placeholder_media";
|
|
123
|
+
}>;
|
|
124
|
+
block_ids: z.ZodArray<z.ZodString>;
|
|
125
|
+
}, z.core.$strict>>>>;
|
|
114
126
|
execution_scene: z.ZodLiteral<"page_template_create">;
|
|
115
127
|
external_run_id: z.ZodString;
|
|
116
128
|
external_thread_id: z.ZodString;
|
|
@@ -138,6 +150,12 @@ export declare const PageTemplatePromoteResponseSchema: z.ZodObject<{
|
|
|
138
150
|
page_path: z.ZodString;
|
|
139
151
|
route_id: z.ZodString;
|
|
140
152
|
snapshot_id: z.ZodUUID;
|
|
153
|
+
advisories: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
154
|
+
code: z.ZodEnum<{
|
|
155
|
+
preexisting_placeholder_media: "preexisting_placeholder_media";
|
|
156
|
+
}>;
|
|
157
|
+
block_ids: z.ZodArray<z.ZodString>;
|
|
158
|
+
}, z.core.$strict>>>;
|
|
141
159
|
}, z.core.$strict>;
|
|
142
160
|
export type PageTemplatePromoteResponse = z.infer<typeof PageTemplatePromoteResponseSchema>;
|
|
143
161
|
export declare const PageTemplateCleanupResponseSchema: z.ZodObject<{
|
|
@@ -148,6 +166,12 @@ export declare const PageTemplateCleanupResponseSchema: z.ZodObject<{
|
|
|
148
166
|
page_path: z.ZodString;
|
|
149
167
|
route_id: z.ZodString;
|
|
150
168
|
snapshot_id: z.ZodUUID;
|
|
169
|
+
advisories: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
170
|
+
code: z.ZodEnum<{
|
|
171
|
+
preexisting_placeholder_media: "preexisting_placeholder_media";
|
|
172
|
+
}>;
|
|
173
|
+
block_ids: z.ZodArray<z.ZodString>;
|
|
174
|
+
}, z.core.$strict>>>;
|
|
151
175
|
}, z.core.$strict>;
|
|
152
176
|
export type PageTemplateCleanupResponse = z.infer<typeof PageTemplateCleanupResponseSchema>;
|
|
153
177
|
export declare const PageTemplateErrorCodeSchema: z.ZodEnum<{
|
|
@@ -1,12 +1,19 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
export declare const SITE_EDIT_SOURCE_ALLOWED_ROOT_FILES: readonly ["design.md", "DESIGN.md"];
|
|
3
3
|
export declare const SITE_EDIT_SOURCE_ALLOWED_DIRS: readonly ["components/site", "src/components/site", "lib/generated", "src/lib/generated", "public"];
|
|
4
|
+
/**
|
|
5
|
+
* 目录白名单之外、按**全等**放行的模板层文件:路径在模板里,内容却归每个站。
|
|
6
|
+
*
|
|
7
|
+
* 404 正文由 `app/not-found.tsx` 与设计器入口 `app/system/not-found/page.tsx` 共用,
|
|
8
|
+
* 文案是普通文字,设计器改完要能写回;不放开整个 `components/system/`。
|
|
9
|
+
*/
|
|
10
|
+
export declare const SITE_EDIT_SOURCE_ALLOWED_SYSTEM_FILES: readonly ["components/system/not-found-content.tsx", "src/components/system/not-found-content.tsx"];
|
|
4
11
|
export declare const SITE_EDIT_SOURCE_ALLOWED_APP_FILES: readonly ["app/globals.css", "src/app/globals.css"];
|
|
5
12
|
export declare const SITE_EDIT_TEXT_SOURCE_EXTENSIONS: readonly [".cjs", ".css", ".cts", ".html", ".js", ".json", ".jsx", ".md", ".mdx", ".mjs", ".mts", ".ts", ".tsx", ".txt", ".yaml", ".yml"];
|
|
6
13
|
export declare const SITE_EDIT_SOURCE_DELETE_CAPABILITY: "source-delete";
|
|
7
14
|
export declare const SiteEditSourceDeleteCapabilitySchema: z.ZodLiteral<"source-delete">;
|
|
8
15
|
export type SiteEditSourceDeleteCapability = z.infer<typeof SiteEditSourceDeleteCapabilitySchema>;
|
|
9
|
-
export type SiteEditSourceDeleteProtectionReason = "design-document" | "route-entry" | "app-global-style" | "generated-media-manifest";
|
|
16
|
+
export type SiteEditSourceDeleteProtectionReason = "design-document" | "route-entry" | "app-global-style" | "generated-media-manifest" | "system-page";
|
|
10
17
|
export declare const SiteEditSourcePathSchema: z.ZodString;
|
|
11
18
|
export type SiteEditSourcePath = z.infer<typeof SiteEditSourcePathSchema>;
|
|
12
19
|
export declare const SiteEditSourceDirectoryPathSchema: z.ZodString;
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
*
|
|
6
6
|
* 由 release-edit-engine-packages.ts 在 bump 版本时自动更新。
|
|
7
7
|
*/
|
|
8
|
-
export declare const CURRENT_EDIT_ENGINE_VERSION = "0.10.
|
|
8
|
+
export declare const CURRENT_EDIT_ENGINE_VERSION = "0.10.22";
|
|
9
9
|
export declare const EDIT_ENGINE_VERSION_HEADER = "x-vcp-edit-engine-version";
|
|
10
10
|
export declare const EDIT_ENGINE_VERSION_SOURCE_HEADER = "x-vcp-edit-engine-version-source";
|
|
11
11
|
export type EditEngineVersionSource = "explicit" | "fallback_current" | "system_current";
|
|
@@ -17,7 +17,7 @@ import { z } from "zod";
|
|
|
17
17
|
* 落空、整页 SEO 元数据全部丢失且不报错。
|
|
18
18
|
* - **根布局 `metadata`**(平台确定性产出的站级元数据):站名、标题模板、
|
|
19
19
|
* OpenGraph / Twitter 的标题与描述是文案;`metadataBase`、`openGraph.type`、
|
|
20
|
-
* `twitter.card
|
|
20
|
+
* `twitter.card`、各类图片地址、`robots` 索引指令是机器值。
|
|
21
21
|
* - **`NAV_ITEMS`**(导航静态兜底数据):`label` 是导航上印着的字;`href` 是路由、
|
|
22
22
|
* `targetType` 是渲染分支的判别式、`iconKey` 是图标注册表的键。
|
|
23
23
|
*
|
|
@@ -36,8 +36,9 @@ import { z } from "zod";
|
|
|
36
36
|
*
|
|
37
37
|
* - `*`:数组下标(查表前把具体下标归一成这一段)。
|
|
38
38
|
* - `**`:**本段及其整棵子树**。只用在取值形状开放、无法逐字段枚举的地方
|
|
39
|
-
* (`schema_json` 是任意 JSON-LD,`meta_tags_json` 是键由 CMS
|
|
40
|
-
*
|
|
39
|
+
* (`schema_json` 是任意 JSON-LD,`meta_tags_json` 是键由 CMS 决定的开放记录,
|
|
40
|
+
* 根布局 `robots` 是上游 Next 的指令对象,形状随 Next 版本开放)。
|
|
41
|
+
* 这几处按机器值整体处理是**故意往漏翻倒**:真有一天生成侧往里写文案,结果是
|
|
41
42
|
* 那段不被翻译(可见、可查),而不是把结构化数据译坏(静默、难查)。
|
|
42
43
|
*/
|
|
43
44
|
/** 已登记的混合结构。取值与抽取器的单元 `kind` 同名,便于对读。 */
|
|
@@ -77,9 +78,17 @@ export declare const PageSeoDeclSchema: z.ZodObject<{
|
|
|
77
78
|
* `keywords`、`openGraph.url` / `locale`——它们今天只出现在运行时返回值里,但形状
|
|
78
79
|
* 同源,一并登记免得哪天被内联进源码时整份文件停翻。
|
|
79
80
|
*
|
|
80
|
-
*
|
|
81
|
-
*
|
|
82
|
-
*
|
|
81
|
+
* `robots` 是平台自己写进系统页的:`app/system/not-found/page.tsx`(模板)与
|
|
82
|
+
* `app/search/page.tsx`(产品搜索)都用 `export const metadata` 声明
|
|
83
|
+
* `robots: { index: false, follow: false }`——这两条路由返回 200,不挡就会被收录。
|
|
84
|
+
* 它是给爬虫的指令,取值要么是布尔开关,要么是 `googleBot` 这类指令串
|
|
85
|
+
* (`"max-snippet:-1"`),没有一处是访客读的字,因此整棵子树按机器值登记。
|
|
86
|
+
* 没登记之前,这两份文件在翻译链路上整文件不译(搜索页标题停在主站语种),在可见
|
|
87
|
+
* 文本导出里直接让整站导出失败。
|
|
88
|
+
*
|
|
89
|
+
* 这里**没有**声明 `icons` / `verification` 等其余 Next 元数据键:真出现了就是
|
|
90
|
+
* 「已登记结构长出了没登记的字段」,按设计整文件本轮不翻并记降级,由人来决定新键
|
|
91
|
+
* 是文案还是机器值。这是清单相对上游开放类型必然会漂的那一面,方向安全。
|
|
83
92
|
*/
|
|
84
93
|
export declare const RootLayoutMetadataSchema: z.ZodObject<{
|
|
85
94
|
metadataBase: z.ZodOptional<z.ZodString>;
|
|
@@ -111,6 +120,7 @@ export declare const RootLayoutMetadataSchema: z.ZodObject<{
|
|
|
111
120
|
alternates: z.ZodOptional<z.ZodObject<{
|
|
112
121
|
canonical: z.ZodOptional<z.ZodString>;
|
|
113
122
|
}, z.core.$strip>>;
|
|
123
|
+
robots: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodRecord<z.ZodString, z.ZodUnknown>]>>;
|
|
114
124
|
}, z.core.$strip>;
|
|
115
125
|
/**
|
|
116
126
|
* `NAV_ITEMS` 的一条,与 `@vcp/sitemap` 的 `NavItem` 对齐(分组条目是同一批字段的
|
|
@@ -172,7 +182,7 @@ export declare const PAGE_SEO_MACHINE_FIELD_PATHS: readonly ["path", "meta_tags_
|
|
|
172
182
|
/** 根布局 `metadata` 里该翻的字段路径。 */
|
|
173
183
|
export declare const ROOT_LAYOUT_METADATA_LOCALIZABLE_FIELD_PATHS: readonly ["title", "title.default", "title.template", "title.absolute", "description", "keywords", "openGraph.title", "openGraph.description", "openGraph.siteName", "openGraph.images.*.alt", "twitter.title", "twitter.description"];
|
|
174
184
|
/** 根布局 `metadata` 里必须逐字节留下的字段路径。 */
|
|
175
|
-
export declare const ROOT_LAYOUT_METADATA_MACHINE_FIELD_PATHS: readonly ["metadataBase", "openGraph.type", "openGraph.url", "openGraph.locale", "openGraph.images.*", "openGraph.images.*.url", "twitter.card", "twitter.images.*", "alternates.canonical"];
|
|
185
|
+
export declare const ROOT_LAYOUT_METADATA_MACHINE_FIELD_PATHS: readonly ["metadataBase", "openGraph.type", "openGraph.url", "openGraph.locale", "openGraph.images.*", "openGraph.images.*.url", "twitter.card", "twitter.images.*", "alternates.canonical", "robots.**"];
|
|
176
186
|
/**
|
|
177
187
|
* `NAV_ITEMS` 里该翻的字段路径。写成**叶子字段名**:查表前下标与 `children` 层会被
|
|
178
188
|
* 归一掉,`NAV_ITEMS[2].children[0].label` 与 `NAV_ITEMS[0].label` 查的是同一条。
|
package/dist/site-workflow.d.ts
CHANGED
|
@@ -933,7 +933,6 @@ export declare const CompleteSiteWorkflowRequestSchema: z.ZodObject<{
|
|
|
933
933
|
}, z.core.$strict>;
|
|
934
934
|
export type CompleteSiteWorkflowRequest = z.infer<typeof CompleteSiteWorkflowRequestSchema>;
|
|
935
935
|
export declare const CompleteQualityOnlyWorkflowRequestSchema: z.ZodObject<{
|
|
936
|
-
expected_current_node: z.ZodLiteral<"preview_personalization">;
|
|
937
936
|
publish_workflow_id: z.ZodUUID;
|
|
938
937
|
expected_publish_revision: z.ZodNumber;
|
|
939
938
|
}, z.core.$strict>;
|
|
@@ -29,6 +29,25 @@ export declare const SubsiteVisibleTextExportResponseSchema: z.ZodObject<{
|
|
|
29
29
|
text: z.ZodString;
|
|
30
30
|
media_key: z.ZodOptional<z.ZodString>;
|
|
31
31
|
}, z.core.$strip>>>;
|
|
32
|
+
images: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
33
|
+
id: z.ZodString;
|
|
34
|
+
source: z.ZodEnum<{
|
|
35
|
+
"media-registry": "media-registry";
|
|
36
|
+
"source-literal": "source-literal";
|
|
37
|
+
}>;
|
|
38
|
+
src: z.ZodString;
|
|
39
|
+
alt: z.ZodNullable<z.ZodString>;
|
|
40
|
+
media_key: z.ZodOptional<z.ZodString>;
|
|
41
|
+
width: z.ZodOptional<z.ZodNumber>;
|
|
42
|
+
height: z.ZodOptional<z.ZodNumber>;
|
|
43
|
+
provider: z.ZodOptional<z.ZodString>;
|
|
44
|
+
is_placeholder: z.ZodBoolean;
|
|
45
|
+
occurrences: z.ZodArray<z.ZodObject<{
|
|
46
|
+
file_path: z.ZodString;
|
|
47
|
+
line: z.ZodNumber;
|
|
48
|
+
}, z.core.$strip>>;
|
|
49
|
+
}, z.core.$strip>>>;
|
|
32
50
|
}, z.core.$strip>;
|
|
51
|
+
export type SubsiteVisibleTextImage = NonNullable<z.infer<typeof SubsiteVisibleTextExportResponseSchema>["images"]>[number];
|
|
33
52
|
export type SubsiteVisibleTextEntry = NonNullable<z.infer<typeof SubsiteVisibleTextExportResponseSchema>["entries"]>[number];
|
|
34
53
|
export type SubsiteVisibleTextExportResponse = z.infer<typeof SubsiteVisibleTextExportResponseSchema>;
|
package/dist/type-weight.d.ts
CHANGED
|
@@ -12,6 +12,9 @@ export type WeightRole = "display" | "heading" | "title" | "ui" | "button" | "bo
|
|
|
12
12
|
export declare const WEIGHT_STYLE_PRESETS: Readonly<Record<WeightStyleId, Readonly<Record<WeightRole, number>>>>;
|
|
13
13
|
export declare const SITE_WEIGHT_TOKEN_NAMES: string[];
|
|
14
14
|
export declare const SITE_LEADING_BODY_TOKEN = "--site-leading-body";
|
|
15
|
+
/** 标题行高令牌,与 display / heading / title 三个字重角色一一对应(模板基础层挂在 h1 / h2 / h3 与对应的 `type-*` 角色类上)。 */
|
|
16
|
+
export declare const SITE_LEADING_HEADING_TOKEN_NAMES: readonly ["--site-leading-display", "--site-leading-heading", "--site-leading-title"];
|
|
17
|
+
export type SiteLeadingHeadingToken = (typeof SITE_LEADING_HEADING_TOKEN_NAMES)[number];
|
|
15
18
|
/**
|
|
16
19
|
* `resolveFontDisplayName` silently falls back to `"Inter"` for a name it
|
|
17
20
|
* doesn't recognize, so calling it first would make an unknown font
|
|
@@ -26,4 +29,5 @@ export declare function siteWeightVariables(style: WeightStyleId | undefined, fo
|
|
|
26
29
|
body?: string;
|
|
27
30
|
}): Record<`--site-weight-${WeightRole}`, string>;
|
|
28
31
|
export declare function siteLeadingBody(locale: string | undefined): string;
|
|
32
|
+
export declare function siteLeadingHeadingVariables(locale: string | undefined): Record<SiteLeadingHeadingToken, string>;
|
|
29
33
|
export declare function resolveTryOnFontWeights(family: string, wanted: readonly number[]): string[];
|
|
@@ -19,9 +19,18 @@ export declare const MODEL_FILE_MUTATION_TOOL_NAMES: readonly ["write_file", "ed
|
|
|
19
19
|
* 会错判。
|
|
20
20
|
*/
|
|
21
21
|
export declare const LEGACY_FILE_MUTATION_TOOL_NAME: "apply_patch_batch";
|
|
22
|
-
/**
|
|
23
|
-
|
|
22
|
+
/**
|
|
23
|
+
* 平台确定性改写站点代码的类型化工具:模型只给意图(例如面包屑放法),平台在工具
|
|
24
|
+
* 内部读工作副本、算出改动、经 `applyPatchBatch` 一次写入。它们会改站点代码,所以
|
|
25
|
+
* 算写类(预览蒙层、工具卡分类都要认);但入参与结果不是 canonical 补丁形状,
|
|
26
|
+
* agent 运行时的补丁归一、逐文件重试预算只认 {@link isCanonicalFileMutationToolName}。
|
|
27
|
+
*/
|
|
28
|
+
export declare const PLATFORM_FILE_MUTATION_TOOL_NAMES: readonly ["set_breadcrumb_placement"];
|
|
29
|
+
/** 写类工具全集:模型可见的三个 + 历史批量工具 + 平台确定性写入工具。 */
|
|
30
|
+
export declare const WORKSPACE_FILE_MUTATION_TOOL_NAMES: readonly ["write_file", "edit_file", "delete_file", "apply_patch_batch", "set_breadcrumb_placement"];
|
|
24
31
|
export type ModelFileMutationToolName = (typeof MODEL_FILE_MUTATION_TOOL_NAMES)[number];
|
|
32
|
+
export type PlatformFileMutationToolName = (typeof PLATFORM_FILE_MUTATION_TOOL_NAMES)[number];
|
|
33
|
+
export type CanonicalFileMutationToolName = ModelFileMutationToolName | typeof LEGACY_FILE_MUTATION_TOOL_NAME;
|
|
25
34
|
export type WorkspaceFileMutationToolName = (typeof WORKSPACE_FILE_MUTATION_TOOL_NAMES)[number];
|
|
26
35
|
/** 是不是模型可见的文件修改工具(不含历史批量工具)。 */
|
|
27
36
|
export declare function isModelFileMutationToolName(toolName: string): toolName is ModelFileMutationToolName;
|
|
@@ -30,3 +39,9 @@ export declare function isModelFileMutationToolName(toolName: string): toolName
|
|
|
30
39
|
* ——预览蒙层、工具卡分类、状态胶囊、业务任务标题共用同一判据。
|
|
31
40
|
*/
|
|
32
41
|
export declare function isWorkspaceFileMutationToolName(toolName: string): toolName is WorkspaceFileMutationToolName;
|
|
42
|
+
/**
|
|
43
|
+
* 是不是走 canonical 补丁协议的写类工具(模型可见的三个 + 历史批量工具):入参能
|
|
44
|
+
* 归一成 `ApplyPatchBatchToolInput`、结果就是 `ApplyPatchBatchResult`。平台确定性
|
|
45
|
+
* 写入工具不在此列,它们的结果由调用方按各自合同处理。
|
|
46
|
+
*/
|
|
47
|
+
export declare function isCanonicalFileMutationToolName(toolName: string): toolName is CanonicalFileMutationToolName;
|