@zhama/a2ui-core 0.1.0 → 0.2.0
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/README.md +95 -22
- package/dist/builders/index.cjs +3 -496
- package/dist/builders/index.d.cts +8 -13
- package/dist/builders/index.d.ts +8 -13
- package/dist/builders/index.js +3 -445
- package/dist/index.cjs +3 -869
- package/dist/index.d.cts +3 -41
- package/dist/index.d.ts +3 -41
- package/dist/index.js +3 -802
- package/dist/primitives-nmkVz-tB.d.cts +80 -0
- package/dist/primitives-nmkVz-tB.d.ts +80 -0
- package/dist/types/index.cjs +2 -22
- package/dist/types/index.d.cts +3 -79
- package/dist/types/index.d.ts +3 -79
- package/dist/types/index.js +2 -15
- package/dist/utils/index.cjs +1 -0
- package/dist/utils/index.d.cts +40 -0
- package/dist/utils/index.d.ts +40 -0
- package/dist/utils/index.js +1 -0
- package/dist/validators/index.cjs +1 -313
- package/dist/validators/index.d.cts +1 -0
- package/dist/validators/index.d.ts +1 -0
- package/dist/validators/index.js +1 -308
- package/package.json +80 -53
- package/dist/builders/index.cjs.map +0 -1
- package/dist/builders/index.js.map +0 -1
- package/dist/index.cjs.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/types/index.cjs.map +0 -1
- package/dist/types/index.js.map +0 -1
- package/dist/validators/index.cjs.map +0 -1
- package/dist/validators/index.js.map +0 -1
package/dist/index.d.cts
CHANGED
|
@@ -1,43 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
export { A2UI_EXTENSION_URI, A2UI_EXTENSION_URI_V08, A2UI_MIME_TYPE, Action, ActionContextItem, ActionV08, AnyComponent, AudioPlayerComponent, BeginRenderingMessage,
|
|
1
|
+
export { B as BooleanOrPath, d as BooleanValue, C as ContextValue, N as NumberOrPath, c as NumberValue, a as StringArrayOrPath, e as StringArrayValue, S as StringOrPath, b as StringValue } from './primitives-nmkVz-tB.cjs';
|
|
2
|
+
export { A2UI_EXTENSION_URI, A2UI_EXTENSION_URI_V08, A2UI_MIME_TYPE, Action, ActionContextItem, ActionV08, AnyComponent, AudioPlayerComponent, BeginRenderingMessage, ButtonComponent, CardComponent, CheckBoxComponent, ChildrenProperty, ChoicePickerComponent, ClientToServerMessage, ColumnComponent, ComponentCommon, ComponentInstance, ComponentInstanceV08, ComponentType, CreateSurfaceMessage, DataArray, DataChangeEvent, DataModelUpdateMessage, DataObject, DataValue, DateTimeInputComponent, DeleteSurfaceMessage, DeleteSurfaceMessageV08, DividerComponent, IconComponent, ImageComponent, ListComponent, ModalComponent, RowComponent, STANDARD_CATALOG_ID, ServerToClientMessage, ServerToClientMessageV08, ServerToClientMessageV09, SliderComponent, StandardIconName, SurfaceUpdateMessage, TabsComponent, TextComponent, TextFieldComponent, Theme, UpdateComponentsMessage, UpdateDataModelMessage, UserActionEvent, ValueMap, VideoComponent, isV08Message, isV09Message } from './types/index.cjs';
|
|
3
3
|
export { AudioPlayerOptions, ButtonOptions, CardOptions, CheckBoxOptions, ChoicePickerOptions, ComponentOptions, DEFAULT_PATH_MAPPINGS, DateTimeInputOptions, DividerOptions, IconOptions, ImageOptions, LayoutOptions, ListOptions, ModalOptions, PathMappings, SliderOptions, TabItem, TabsOptions, TextFieldOptions, TextOptions, UpdateDataItem, VideoOptions, audioPlayer, beginRendering, body, button, caption, card, checkbox, choicePicker, column, createSurface, createV08Messages, createV09Messages, dataModelInit, dataModelUpdate, dateTimeInput, deleteSurface, deleteSurfaceV08, divider, flattenObjectToValueMap, generateId, getIdCounter, h1, h2, h3, h4, h5, icon, image, jsonlToMessages, list, messagesToJsonl, modal, normalizePath, objectToValueMap, pathUpdate, resetIdCounter, row, slider, surfaceUpdate, tabs, text, textButton, textField, updateComponents, updateDataModel, updatesToValueMap, valueMapToObject, valueToValueMap, video } from './builders/index.cjs';
|
|
4
4
|
export { ValidationError, ValidationOptions, ValidationResult, ValidationWarning, validateMessage, validateMessages, validateV08Message, validateV09Message } from './validators/index.cjs';
|
|
5
|
-
|
|
6
|
-
/**
|
|
7
|
-
* A2UI Utilities
|
|
8
|
-
*
|
|
9
|
-
* 通用工具函数
|
|
10
|
-
*/
|
|
11
|
-
|
|
12
|
-
/**
|
|
13
|
-
* 判断值是否为数据路径绑定
|
|
14
|
-
*/
|
|
15
|
-
declare function isPathBinding(value: StringOrPath | NumberOrPath | BooleanOrPath): value is {
|
|
16
|
-
path: string;
|
|
17
|
-
};
|
|
18
|
-
/**
|
|
19
|
-
* 从值中获取字面量(如果是绑定则返回 undefined)
|
|
20
|
-
*/
|
|
21
|
-
declare function getLiteralValue<T extends string | number | boolean>(value: T | {
|
|
22
|
-
path: string;
|
|
23
|
-
}): T | undefined;
|
|
24
|
-
/**
|
|
25
|
-
* 从值中获取路径(如果是字面量则返回 undefined)
|
|
26
|
-
*/
|
|
27
|
-
declare function getPathValue(value: StringOrPath | NumberOrPath | BooleanOrPath): string | undefined;
|
|
28
|
-
/**
|
|
29
|
-
* 创建数据路径绑定
|
|
30
|
-
*/
|
|
31
|
-
declare function path(dataPath: string): {
|
|
32
|
-
path: string;
|
|
33
|
-
};
|
|
34
|
-
/**
|
|
35
|
-
* 深度合并对象
|
|
36
|
-
*/
|
|
37
|
-
declare function deepMerge<T extends Record<string, unknown>>(target: T, source: Partial<T>): T;
|
|
38
|
-
/**
|
|
39
|
-
* 生成 UUID v4
|
|
40
|
-
*/
|
|
41
|
-
declare function uuid(): string;
|
|
42
|
-
|
|
43
|
-
export { BooleanOrPath, NumberOrPath, StringOrPath, deepMerge, getLiteralValue, getPathValue, isPathBinding, path, uuid };
|
|
5
|
+
export { deepMerge, getLiteralValue, getPathValue, isPathBinding, path, uuid } from './utils/index.cjs';
|
package/dist/index.d.ts
CHANGED
|
@@ -1,43 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
export { A2UI_EXTENSION_URI, A2UI_EXTENSION_URI_V08, A2UI_MIME_TYPE, Action, ActionContextItem, ActionV08, AnyComponent, AudioPlayerComponent, BeginRenderingMessage,
|
|
1
|
+
export { B as BooleanOrPath, d as BooleanValue, C as ContextValue, N as NumberOrPath, c as NumberValue, a as StringArrayOrPath, e as StringArrayValue, S as StringOrPath, b as StringValue } from './primitives-nmkVz-tB.js';
|
|
2
|
+
export { A2UI_EXTENSION_URI, A2UI_EXTENSION_URI_V08, A2UI_MIME_TYPE, Action, ActionContextItem, ActionV08, AnyComponent, AudioPlayerComponent, BeginRenderingMessage, ButtonComponent, CardComponent, CheckBoxComponent, ChildrenProperty, ChoicePickerComponent, ClientToServerMessage, ColumnComponent, ComponentCommon, ComponentInstance, ComponentInstanceV08, ComponentType, CreateSurfaceMessage, DataArray, DataChangeEvent, DataModelUpdateMessage, DataObject, DataValue, DateTimeInputComponent, DeleteSurfaceMessage, DeleteSurfaceMessageV08, DividerComponent, IconComponent, ImageComponent, ListComponent, ModalComponent, RowComponent, STANDARD_CATALOG_ID, ServerToClientMessage, ServerToClientMessageV08, ServerToClientMessageV09, SliderComponent, StandardIconName, SurfaceUpdateMessage, TabsComponent, TextComponent, TextFieldComponent, Theme, UpdateComponentsMessage, UpdateDataModelMessage, UserActionEvent, ValueMap, VideoComponent, isV08Message, isV09Message } from './types/index.js';
|
|
3
3
|
export { AudioPlayerOptions, ButtonOptions, CardOptions, CheckBoxOptions, ChoicePickerOptions, ComponentOptions, DEFAULT_PATH_MAPPINGS, DateTimeInputOptions, DividerOptions, IconOptions, ImageOptions, LayoutOptions, ListOptions, ModalOptions, PathMappings, SliderOptions, TabItem, TabsOptions, TextFieldOptions, TextOptions, UpdateDataItem, VideoOptions, audioPlayer, beginRendering, body, button, caption, card, checkbox, choicePicker, column, createSurface, createV08Messages, createV09Messages, dataModelInit, dataModelUpdate, dateTimeInput, deleteSurface, deleteSurfaceV08, divider, flattenObjectToValueMap, generateId, getIdCounter, h1, h2, h3, h4, h5, icon, image, jsonlToMessages, list, messagesToJsonl, modal, normalizePath, objectToValueMap, pathUpdate, resetIdCounter, row, slider, surfaceUpdate, tabs, text, textButton, textField, updateComponents, updateDataModel, updatesToValueMap, valueMapToObject, valueToValueMap, video } from './builders/index.js';
|
|
4
4
|
export { ValidationError, ValidationOptions, ValidationResult, ValidationWarning, validateMessage, validateMessages, validateV08Message, validateV09Message } from './validators/index.js';
|
|
5
|
-
|
|
6
|
-
/**
|
|
7
|
-
* A2UI Utilities
|
|
8
|
-
*
|
|
9
|
-
* 通用工具函数
|
|
10
|
-
*/
|
|
11
|
-
|
|
12
|
-
/**
|
|
13
|
-
* 判断值是否为数据路径绑定
|
|
14
|
-
*/
|
|
15
|
-
declare function isPathBinding(value: StringOrPath | NumberOrPath | BooleanOrPath): value is {
|
|
16
|
-
path: string;
|
|
17
|
-
};
|
|
18
|
-
/**
|
|
19
|
-
* 从值中获取字面量(如果是绑定则返回 undefined)
|
|
20
|
-
*/
|
|
21
|
-
declare function getLiteralValue<T extends string | number | boolean>(value: T | {
|
|
22
|
-
path: string;
|
|
23
|
-
}): T | undefined;
|
|
24
|
-
/**
|
|
25
|
-
* 从值中获取路径(如果是字面量则返回 undefined)
|
|
26
|
-
*/
|
|
27
|
-
declare function getPathValue(value: StringOrPath | NumberOrPath | BooleanOrPath): string | undefined;
|
|
28
|
-
/**
|
|
29
|
-
* 创建数据路径绑定
|
|
30
|
-
*/
|
|
31
|
-
declare function path(dataPath: string): {
|
|
32
|
-
path: string;
|
|
33
|
-
};
|
|
34
|
-
/**
|
|
35
|
-
* 深度合并对象
|
|
36
|
-
*/
|
|
37
|
-
declare function deepMerge<T extends Record<string, unknown>>(target: T, source: Partial<T>): T;
|
|
38
|
-
/**
|
|
39
|
-
* 生成 UUID v4
|
|
40
|
-
*/
|
|
41
|
-
declare function uuid(): string;
|
|
42
|
-
|
|
43
|
-
export { BooleanOrPath, NumberOrPath, StringOrPath, deepMerge, getLiteralValue, getPathValue, isPathBinding, path, uuid };
|
|
5
|
+
export { deepMerge, getLiteralValue, getPathValue, isPathBinding, path, uuid } from './utils/index.js';
|