@anov/cic-standard-sdk 0.0.4 → 0.0.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.
- package/dist/cic-sdk.cjs.js +1 -1
- package/dist/cic-sdk.es.js +1 -1
- package/dist/cic-sdk.umd.js +1 -1
- package/dist/sdk/CICSDK.d.ts +2 -2
- package/dist/types/cic.d.ts +18 -0
- package/dist/types/index.d.ts +11 -23
- package/dist/types/variables.d.ts +3 -3
- package/package.json +3 -2
package/dist/sdk/CICSDK.d.ts
CHANGED
|
@@ -64,7 +64,7 @@ export declare class CICSDK implements ICICSDK {
|
|
|
64
64
|
static validateDependency: (input: unknown) => import("./generators/common").Result<null>;
|
|
65
65
|
static normalizeDependency: (input: unknown) => Dependency;
|
|
66
66
|
/** 创建 Registry 组件项 */
|
|
67
|
-
static createRegistryComponent: (input: unknown) => import("./generators/common").Result<import("../types
|
|
67
|
+
static createRegistryComponent: (input: unknown) => import("./generators/common").Result<import("../types").RegistryComponents>;
|
|
68
68
|
static validateRegistryComponent: (input: unknown) => import("./generators/common").Result<null>;
|
|
69
|
-
static normalizeRegistryComponent: (input: unknown) => import("../types
|
|
69
|
+
static normalizeRegistryComponent: (input: unknown) => import("../types").RegistryComponents;
|
|
70
70
|
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Meta } from './meta';
|
|
2
|
+
import { Registry } from './registry';
|
|
3
|
+
import { Variables } from './variables';
|
|
4
|
+
import { CICPage } from './page';
|
|
5
|
+
import { Dependency } from './deps';
|
|
6
|
+
/**
|
|
7
|
+
* CIC 配置定义
|
|
8
|
+
* 说明:定义了 CIC 项目的全局配置,包含版本、元数据、页面、组件、变量、依赖等。
|
|
9
|
+
*/
|
|
10
|
+
export interface CICConfig {
|
|
11
|
+
version: string;
|
|
12
|
+
meta: Meta;
|
|
13
|
+
pages: CICPage[];
|
|
14
|
+
registry?: Registry;
|
|
15
|
+
variables?: Variables;
|
|
16
|
+
deps?: Dependency[];
|
|
17
|
+
extensions?: Record<string, any>;
|
|
18
|
+
}
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,23 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
|
|
10
|
-
export
|
|
11
|
-
|
|
12
|
-
meta: Meta;
|
|
13
|
-
pages: CICPage[];
|
|
14
|
-
registry?: Registry;
|
|
15
|
-
variables?: Variables;
|
|
16
|
-
deps?: Dependency[];
|
|
17
|
-
extensions?: Record<string, any>;
|
|
18
|
-
}
|
|
19
|
-
/**
|
|
20
|
-
* CIC 类型定义
|
|
21
|
-
* 说明:定义了 CIC 项目中使用的各种类型,包括元数据、布局、页面、组件、变量、依赖项等。
|
|
22
|
-
*/
|
|
23
|
-
export type { Meta, Layout, CICPage, Registry, Variables, Dependency, ComponentInstance, DataSourceItem };
|
|
1
|
+
/** AUTO-GENERATED BY generate-types.ts — DO NOT EDIT MANUALLY */
|
|
2
|
+
export * from './cic';
|
|
3
|
+
export * from './componets';
|
|
4
|
+
export * from './data';
|
|
5
|
+
export * from './dataSources';
|
|
6
|
+
export * from './deps';
|
|
7
|
+
export * from './events';
|
|
8
|
+
export * from './meta';
|
|
9
|
+
export * from './page';
|
|
10
|
+
export * from './registry';
|
|
11
|
+
export * from './variables';
|
|
@@ -50,9 +50,9 @@ export type VariablesMap = Record<string, Variable>;
|
|
|
50
50
|
/** 变量集合,按作用域组织:global/page/component。 */
|
|
51
51
|
export interface Variables {
|
|
52
52
|
/** 全局变量,对所有页面和组件均生效。 */
|
|
53
|
-
global
|
|
53
|
+
global?: VariablesMap;
|
|
54
54
|
/** 页面级变量,键为页面 ID,值为该页面的变量映射。 */
|
|
55
|
-
page
|
|
55
|
+
page?: Record<string, VariablesMap>;
|
|
56
56
|
/** 组件级变量,键为组件 ID,值为该组件的变量映射。 */
|
|
57
|
-
component
|
|
57
|
+
component?: Record<string, VariablesMap>;
|
|
58
58
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@anov/cic-standard-sdk",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.5",
|
|
4
4
|
"description": "CIC Standard SDK with TypeScript support",
|
|
5
5
|
"main": "dist/cic-sdk.cjs.js",
|
|
6
6
|
"module": "dist/cic-sdk.es.js",
|
|
@@ -25,7 +25,8 @@
|
|
|
25
25
|
"test": "vitest",
|
|
26
26
|
"test:coverage": "vitest run --coverage",
|
|
27
27
|
"gen:schema": "tsx scripts/generate-schema.ts",
|
|
28
|
-
"gen:mock": "tsx scripts/generate-mock.ts"
|
|
28
|
+
"gen:mock": "tsx scripts/generate-mock.ts",
|
|
29
|
+
"gen:types": "tsx scripts/generate-types.ts"
|
|
29
30
|
},
|
|
30
31
|
"devDependencies": {
|
|
31
32
|
"@types/node": "^24.10.2",
|