@joplo-app/kit 0.2.2 → 0.2.4
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/index.d.ts +6 -0
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -106,6 +106,8 @@ export type FeatureDef = {
|
|
|
106
106
|
kind: 'feature';
|
|
107
107
|
name: string;
|
|
108
108
|
goal: string;
|
|
109
|
+
/** 演示顺序:有限数字从小到大,未写的在后;同值按功能文件夹名自然排序。名字里不用手写编号。 */
|
|
110
|
+
order?: number;
|
|
109
111
|
/** 角色:旧写法是名字数组(只作说明);写成 { 键: role('名字') } 才能被层级和过渡卡引用。 */
|
|
110
112
|
roles?: string[] | Record<string, RoleDef>;
|
|
111
113
|
constraints?: Record<string, string | {
|
|
@@ -245,18 +247,22 @@ export declare const trace: ((...ids: string[]) => EffectDef) & {
|
|
|
245
247
|
* 各层共享同一份场景状态(ui / data / inputs),切层时步骤不变。需要全景就自己声明一个 overview 层。
|
|
246
248
|
* layers: { client: layer('客户端视角', <ClientView />), backend: layer('后端流转', <Arch />) }
|
|
247
249
|
*/
|
|
250
|
+
/** 层级标签的预设图标(与 core 的 LAYER_ICONS 一致)。不写时:手机视口 mobile,其余 window。 */
|
|
251
|
+
export type LayerIcon = 'window' | 'browser' | 'mobile' | 'desktop' | 'terminal' | 'chat' | 'agent' | 'server' | 'data' | 'email' | 'doc' | 'flow';
|
|
248
252
|
export type LayerDef = {
|
|
249
253
|
kind: 'layer';
|
|
250
254
|
title: string;
|
|
251
255
|
tree: JNode | JNode[];
|
|
252
256
|
viewport?: 'desktop' | 'mobile';
|
|
253
257
|
role?: string;
|
|
258
|
+
icon?: LayerIcon;
|
|
254
259
|
source?: string;
|
|
255
260
|
};
|
|
256
261
|
/** opts.role:这一层是谁的画面(feature.roles 的键,D56);画面角落显示这个人的名牌,层级标签带上头像。 */
|
|
257
262
|
export declare const layer: (title: string, tree: JNode | JNode[], opts?: {
|
|
258
263
|
viewport?: "desktop" | "mobile";
|
|
259
264
|
role?: string;
|
|
265
|
+
icon?: LayerIcon;
|
|
260
266
|
}) => LayerDef;
|
|
261
267
|
/** 步骤参数:字符串是字幕(可省略,省略时自动生成),其余是效果。 */
|
|
262
268
|
export type StepArg = string | EffectDef;
|