@blocklet/pages-kit-block-studio 0.5.47 → 0.5.49

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.
@@ -1,5 +1,7 @@
1
+ import { State } from '@blocklet/pages-kit/types';
1
2
  import { z } from 'zod';
2
3
  import { LLMConfigProperty } from './zod-utils';
4
+ type CanUseState = Pick<State, 'pages' | 'components' | 'resources'>;
3
5
  export declare function generateWrapperCode({ project, state, version }: any): Promise<{
4
6
  fileName: string;
5
7
  content: string;
@@ -16,12 +18,12 @@ export declare function generatePropertiesJsonSchemaWithZod({ properties, llmCon
16
18
  * 使用Zod生成页面数据JSON Schema
17
19
  * 替代generatePageDataJsonSchemas
18
20
  */
19
- export declare function generatePageDataJsonSchemasWithZod(state: any): string;
21
+ export declare function generatePageDataJsonSchemasWithZod(state: CanUseState): string;
20
22
  /**
21
23
  * 使用Zod生成页面数据类型
22
24
  * 替代generatePageDataTypes
23
25
  */
24
- export declare function generatePageDataTypesWithZod(state: any): string;
26
+ export declare function generatePageDataTypesWithZod(state: CanUseState): string;
25
27
  /**
26
28
  * 使用Zod生成TypeScript类型属性
27
29
  * 与现有generatePropertiesTypes函数保持相同签名
@@ -34,7 +36,7 @@ export declare function generatePropertiesTypesWithZod(properties: Record<string
34
36
  * @param pageId 目标页面ID
35
37
  * @returns 包含所有 section 数据类型的 Zod schema 的序列化描述
36
38
  */
37
- export declare function generatePageDataZodToAgent(state: any, pageId: string): z.ZodObject<{
39
+ export declare function generatePageDataZodToAgent(state: CanUseState, pageId: string): z.ZodObject<{
38
40
  title: z.ZodString;
39
41
  description: z.ZodString;
40
42
  sectionsData: z.ZodObject<Record<string, z.ZodTypeAny>, "strip", z.ZodTypeAny, {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@blocklet/pages-kit-block-studio",
3
- "version": "0.5.47",
3
+ "version": "0.5.49",
4
4
  "description": "Pages Kit block studio for blocklet(s)",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -141,7 +141,7 @@
141
141
  "zod": "^3.24.2",
142
142
  "zod-to-json-schema": "^3.24.4",
143
143
  "zod-to-ts": "^1.2.0",
144
- "@blocklet/pages-kit": "0.5.47"
144
+ "@blocklet/pages-kit": "0.5.49"
145
145
  },
146
146
  "devDependencies": {
147
147
  "@rollup/plugin-typescript": "^11.1.6",
@@ -167,7 +167,7 @@
167
167
  "zod": "^3.24.2",
168
168
  "zod-to-json-schema": "^3.24.4",
169
169
  "zod-to-ts": "^1.2.0",
170
- "@blocklet/pages-kit": "0.5.47"
170
+ "@blocklet/pages-kit": "0.5.49"
171
171
  },
172
172
  "scripts": {
173
173
  "lint": "eslint src --ext .mjs,.js,.jsx,.ts,.tsx",