maooo-skyline-ui-system 0.1.6 → 0.1.7

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.
Files changed (30) hide show
  1. package/README.md +2 -0
  2. package/miniprogram_dist/ai-design-system/component-schemas/button.schema.json +25 -5
  3. package/miniprogram_dist/ai-design-system/component-schemas/calendar.schema.json +39 -4
  4. package/miniprogram_dist/ai-design-system/component-schemas/card.schema.json +30 -6
  5. package/miniprogram_dist/ai-design-system/component-schemas/countdown.schema.json +15 -2
  6. package/miniprogram_dist/ai-design-system/component-schemas/form-input.schema.json +141 -20
  7. package/miniprogram_dist/ai-design-system/component-schemas/form-textarea.schema.json +96 -15
  8. package/miniprogram_dist/ai-design-system/component-schemas/form.schema.json +23 -4
  9. package/miniprogram_dist/ai-design-system/component-schemas/icon.schema.json +1 -1
  10. package/miniprogram_dist/ai-design-system/component-schemas/image-cropper.schema.json +20 -2
  11. package/miniprogram_dist/ai-design-system/component-schemas/input.schema.json +30 -2
  12. package/miniprogram_dist/ai-design-system/component-schemas/media-upload.schema.json +71 -8
  13. package/miniprogram_dist/ai-design-system/component-schemas/navbar.schema.json +30 -3
  14. package/miniprogram_dist/ai-design-system/component-schemas/notify.schema.json +72 -18
  15. package/miniprogram_dist/ai-design-system/component-schemas/oss-upload.schema.json +60 -7
  16. package/miniprogram_dist/ai-design-system/component-schemas/popup-page.schema.json +33 -4
  17. package/miniprogram_dist/ai-design-system/component-schemas/popup.schema.json +38 -9
  18. package/miniprogram_dist/ai-design-system/component-schemas/rate.schema.json +14 -3
  19. package/miniprogram_dist/ai-design-system/component-schemas/stepper.schema.json +15 -2
  20. package/miniprogram_dist/ai-design-system/component-schemas/switch.schema.json +10 -2
  21. package/miniprogram_dist/ai-design-system/component-schemas/textarea.schema.json +15 -2
  22. package/miniprogram_dist/ai-design-system/component-schemas/toast.schema.json +27 -7
  23. package/miniprogram_dist/ai-design-system/component-schemas/upload.schema.json +46 -6
  24. package/miniprogram_dist/ai-design-system/manifest.json +3 -3
  25. package/miniprogram_dist/ai-design-system/prompts/page-generation.prompt.md +3 -0
  26. package/miniprogram_dist/ai-design-system/schemas/component.schema.json +31 -1
  27. package/miniprogram_dist/ai-design-system/schemas/page.schema.json +65 -4
  28. package/miniprogram_dist/index.js +1 -1
  29. package/miniprogram_dist/notify/notify.js +0 -4
  30. package/package.json +7 -4
package/README.md CHANGED
@@ -85,6 +85,7 @@ npm run sync:icons
85
85
  npm run build:schema
86
86
  npm run build:token
87
87
  npm run build:docs
88
+ npm run verify
88
89
  ```
89
90
 
90
91
  命令说明:
@@ -95,6 +96,7 @@ npm run build:docs
95
96
  - `npm run build:schema`: 构建或校验 schema 相关产物。
96
97
  - `npm run build:token`: 从设计 token 源数据构建主题产物。
97
98
  - `npm run build:docs`: 从组件和 schema 构建文档产物。
99
+ - `npm run verify`: 发布前质量门禁,依次构建 token、校验组件契约、运行测试、构建 npm 产物并校验发布内容。
98
100
 
99
101
  发包与业务接入说明见 [`docs/npm-publish.zh-CN.md`](./docs/npm-publish.zh-CN.md)。
100
102
 
@@ -11,14 +11,24 @@
11
11
  {
12
12
  "name": "variant",
13
13
  "type": "string",
14
- "enum": ["primary", "secondary", "outline"],
14
+ "enum": [
15
+ "primary",
16
+ "secondary",
17
+ "outline"
18
+ ],
15
19
  "default": "primary",
16
20
  "description": "按钮视觉类型"
17
21
  },
18
22
  {
19
23
  "name": "size",
20
24
  "type": "string",
21
- "enum": ["giant", "large", "medium", "small", "mini"],
25
+ "enum": [
26
+ "giant",
27
+ "large",
28
+ "medium",
29
+ "small",
30
+ "mini"
31
+ ],
22
32
  "default": "medium",
23
33
  "description": "按钮尺寸"
24
34
  },
@@ -41,8 +51,12 @@
41
51
  "description": "是否加载中。加载态不属于 variant,loading=true 时不触发 click"
42
52
  }
43
53
  ],
44
- "events": ["onClick"],
45
- "slots": ["icon"],
54
+ "events": [
55
+ "onClick"
56
+ ],
57
+ "slots": [
58
+ "icon"
59
+ ],
46
60
  "tokens": [
47
61
  "color.brand.primary",
48
62
  "color.text.primary",
@@ -55,5 +69,11 @@
55
69
  "spacing.2",
56
70
  "spacing.4",
57
71
  "spacing.6"
58
- ]
72
+ ],
73
+ "eventDetails": {
74
+ "onClick": {
75
+ "description": "点击按钮时触发",
76
+ "detail": "包含原生事件 detail 以及 label、variant、size、block。"
77
+ }
78
+ }
59
79
  }
@@ -23,7 +23,10 @@
23
23
  {
24
24
  "name": "mode",
25
25
  "type": "string",
26
- "enum": ["single", "multiple"],
26
+ "enum": [
27
+ "single",
28
+ "multiple"
29
+ ],
27
30
  "default": "single",
28
31
  "description": "日期选择模式"
29
32
  },
@@ -48,7 +51,10 @@
48
51
  {
49
52
  "name": "weekStart",
50
53
  "type": "string",
51
- "enum": ["monday", "sunday"],
54
+ "enum": [
55
+ "monday",
56
+ "sunday"
57
+ ],
52
58
  "default": "monday",
53
59
  "description": "星期栏起始日"
54
60
  },
@@ -79,7 +85,10 @@
79
85
  {
80
86
  "name": "tagMode",
81
87
  "type": "string",
82
- "enum": ["single", "multiple"],
88
+ "enum": [
89
+ "single",
90
+ "multiple"
91
+ ],
83
92
  "default": "multiple",
84
93
  "description": "tag 选择模式"
85
94
  },
@@ -139,5 +148,31 @@
139
148
  "radius.md",
140
149
  "radius.lg",
141
150
  "radius.pill"
142
- ]
151
+ ],
152
+ "eventDetails": {
153
+ "onClick": {
154
+ "description": "点击日期时触发",
155
+ "detail": "包含 date、item 与 disabled。"
156
+ },
157
+ "onChange": {
158
+ "description": "日期选择变化时触发",
159
+ "detail": "包含 value、date 与 item。"
160
+ },
161
+ "onTagChange": {
162
+ "description": "底部 tag 选择变化时触发",
163
+ "detail": "包含 value 与 option。"
164
+ },
165
+ "onConfirm": {
166
+ "description": "确认日期选择时触发",
167
+ "detail": "包含 value、tagValue 与 dates。"
168
+ },
169
+ "onClose": {
170
+ "description": "请求关闭日历时触发",
171
+ "detail": "包含关闭来源或遮罩事件 detail。"
172
+ },
173
+ "onError": {
174
+ "description": "日期或 tag 操作失败时触发",
175
+ "detail": "包含 source、message 与 error。"
176
+ }
177
+ }
143
178
  }
@@ -5,20 +5,44 @@
5
5
  {
6
6
  "name": "title",
7
7
  "type": "string",
8
- "default": ""
8
+ "default": "",
9
+ "description": "卡片标题文本"
9
10
  },
10
11
  {
11
12
  "name": "desc",
12
13
  "type": "string",
13
- "default": ""
14
+ "default": "",
15
+ "description": "卡片描述文本"
14
16
  },
15
17
  {
16
18
  "name": "clickable",
17
19
  "type": "boolean",
18
- "default": false
20
+ "default": false,
21
+ "description": "是否启用卡片点击态"
19
22
  }
20
23
  ],
21
- "events": ["onClick"],
22
- "slots": ["default"],
23
- "tokens": ["color.background.surface", "shadow.sm", "radius.lg", "spacing.4"]
24
+ "events": [
25
+ "onClick"
26
+ ],
27
+ "slots": [
28
+ "default"
29
+ ],
30
+ "slotDetails": {
31
+ "default": {
32
+ "description": "卡片主体内容区,可放置已注册的展示或操作组件。",
33
+ "allowsChildren": true
34
+ }
35
+ },
36
+ "tokens": [
37
+ "color.background.surface",
38
+ "shadow.sm",
39
+ "radius.lg",
40
+ "spacing.4"
41
+ ],
42
+ "eventDetails": {
43
+ "onClick": {
44
+ "description": "点击卡片时触发",
45
+ "detail": "透传点击事件 detail。"
46
+ }
47
+ }
24
48
  }
@@ -21,7 +21,10 @@
21
21
  "description": "外部自定义 class"
22
22
  }
23
23
  ],
24
- "events": ["onChange", "onFinish"],
24
+ "events": [
25
+ "onChange",
26
+ "onFinish"
27
+ ],
25
28
  "slots": [],
26
29
  "tokens": [
27
30
  "color.brand.primary",
@@ -33,5 +36,15 @@
33
36
  "radius.md",
34
37
  "spacing.2",
35
38
  "spacing.3"
36
- ]
39
+ ],
40
+ "eventDetails": {
41
+ "onChange": {
42
+ "description": "倒计时变化时触发",
43
+ "detail": "包含当前剩余时间的 days、hours、minutes、seconds 等字段。"
44
+ },
45
+ "onFinish": {
46
+ "description": "倒计时结束时触发",
47
+ "detail": "包含结束时的剩余时间字段。"
48
+ }
49
+ }
37
50
  }
@@ -2,26 +2,147 @@
2
2
  "name": "form-input",
3
3
  "description": "组合 mo-form-group 和 mo-input 的单行表单项",
4
4
  "props": [
5
- { "name": "label", "type": "string", "default": "", "description": "字段标题" },
6
- { "name": "required", "type": "boolean", "default": false, "description": "是否展示必填标识" },
7
- { "name": "requiredMark", "type": "string", "default": "*", "description": "必填标识文案" },
8
- { "name": "help", "type": "string", "default": "", "description": "辅助提示" },
9
- { "name": "error", "type": "string", "default": "", "description": "错误提示,优先级高于 help" },
10
- { "name": "size", "type": "string", "default": "medium", "description": "尺寸,可选 medium 或 small" },
11
- { "name": "name", "type": "string", "default": "", "description": "字段名称" },
12
- { "name": "value", "type": "string", "default": "", "description": "当前值" },
13
- { "name": "placeholder", "type": "string", "default": "请输入", "description": "占位文案" },
14
- { "name": "type", "type": "string", "default": "text", "description": "输入类型,非法值降级为 text" },
15
- { "name": "focus", "type": "boolean", "default": false, "description": "是否自动聚焦" },
16
- { "name": "maxlength", "type": "number", "default": 140, "description": "最大输入长度" },
17
- { "name": "confirmType", "type": "string", "default": "done", "description": "键盘确认按钮类型" },
18
- { "name": "disabled", "type": "boolean", "default": false, "description": "是否禁用" },
19
- { "name": "allowClear", "type": "boolean", "default": false, "description": "是否展示清除按钮" },
20
- { "name": "prefixIcon", "type": "string", "default": "", "description": "左侧 Iconfont 图标名称" },
21
- { "name": "suffixIcon", "type": "string", "default": "", "description": "右侧 Iconfont 图标名称" },
22
- { "name": "customClass", "type": "string", "default": "", "description": "外部自定义 class" }
5
+ {
6
+ "name": "label",
7
+ "type": "string",
8
+ "default": "",
9
+ "description": "字段标题"
10
+ },
11
+ {
12
+ "name": "required",
13
+ "type": "boolean",
14
+ "default": false,
15
+ "description": "是否展示必填标识"
16
+ },
17
+ {
18
+ "name": "requiredMark",
19
+ "type": "string",
20
+ "default": "*",
21
+ "description": "必填标识文案"
22
+ },
23
+ {
24
+ "name": "help",
25
+ "type": "string",
26
+ "default": "",
27
+ "description": "辅助提示"
28
+ },
29
+ {
30
+ "name": "error",
31
+ "type": "string",
32
+ "default": "",
33
+ "description": "错误提示,优先级高于 help"
34
+ },
35
+ {
36
+ "name": "size",
37
+ "type": "string",
38
+ "default": "medium",
39
+ "description": "尺寸,可选 medium 或 small"
40
+ },
41
+ {
42
+ "name": "name",
43
+ "type": "string",
44
+ "default": "",
45
+ "description": "字段名称"
46
+ },
47
+ {
48
+ "name": "value",
49
+ "type": "string",
50
+ "default": "",
51
+ "description": "当前值"
52
+ },
53
+ {
54
+ "name": "placeholder",
55
+ "type": "string",
56
+ "default": "请输入",
57
+ "description": "占位文案"
58
+ },
59
+ {
60
+ "name": "type",
61
+ "type": "string",
62
+ "default": "text",
63
+ "description": "输入类型,非法值降级为 text"
64
+ },
65
+ {
66
+ "name": "focus",
67
+ "type": "boolean",
68
+ "default": false,
69
+ "description": "是否自动聚焦"
70
+ },
71
+ {
72
+ "name": "maxlength",
73
+ "type": "number",
74
+ "default": 140,
75
+ "description": "最大输入长度"
76
+ },
77
+ {
78
+ "name": "confirmType",
79
+ "type": "string",
80
+ "default": "done",
81
+ "description": "键盘确认按钮类型"
82
+ },
83
+ {
84
+ "name": "disabled",
85
+ "type": "boolean",
86
+ "default": false,
87
+ "description": "是否禁用"
88
+ },
89
+ {
90
+ "name": "allowClear",
91
+ "type": "boolean",
92
+ "default": false,
93
+ "description": "是否展示清除按钮"
94
+ },
95
+ {
96
+ "name": "prefixIcon",
97
+ "type": "string",
98
+ "default": "",
99
+ "description": "左侧 Iconfont 图标名称"
100
+ },
101
+ {
102
+ "name": "suffixIcon",
103
+ "type": "string",
104
+ "default": "",
105
+ "description": "右侧 Iconfont 图标名称"
106
+ },
107
+ {
108
+ "name": "customClass",
109
+ "type": "string",
110
+ "default": "",
111
+ "description": "外部自定义 class"
112
+ }
113
+ ],
114
+ "events": [
115
+ "onInput",
116
+ "onChange",
117
+ "onConfirm",
118
+ "onClear",
119
+ "onSearch"
23
120
  ],
24
- "events": ["onInput", "onChange", "onConfirm", "onClear", "onSearch"],
25
121
  "slots": [],
26
- "tokens": ["color.text.primary", "color.brand.primary"]
122
+ "tokens": [
123
+ "color.text.primary",
124
+ "color.brand.primary"
125
+ ],
126
+ "eventDetails": {
127
+ "onInput": {
128
+ "description": "输入时触发",
129
+ "detail": "包含 name 与 value。"
130
+ },
131
+ "onChange": {
132
+ "description": "输入值变化时触发",
133
+ "detail": "包含 name 与 value。"
134
+ },
135
+ "onConfirm": {
136
+ "description": "确认输入时触发",
137
+ "detail": "包含 name 与 value。"
138
+ },
139
+ "onClear": {
140
+ "description": "清空输入时触发",
141
+ "detail": "包含 name 与 value。"
142
+ },
143
+ "onSearch": {
144
+ "description": "搜索确认时触发",
145
+ "detail": "包含 name 与 value。"
146
+ }
147
+ }
27
148
  }
@@ -2,21 +2,102 @@
2
2
  "name": "form-textarea",
3
3
  "description": "组合 mo-form-group 和 mo-textarea 的多行表单项",
4
4
  "props": [
5
- { "name": "label", "type": "string", "default": "", "description": "字段标题" },
6
- { "name": "required", "type": "boolean", "default": false, "description": "是否展示必填标识" },
7
- { "name": "requiredMark", "type": "string", "default": "*", "description": "必填标识文案" },
8
- { "name": "help", "type": "string", "default": "", "description": "辅助提示" },
9
- { "name": "error", "type": "string", "default": "", "description": "错误提示,优先级高于 help" },
10
- { "name": "size", "type": "string", "default": "medium", "description": "尺寸,可选 medium 或 small" },
11
- { "name": "name", "type": "string", "default": "", "description": "字段名称" },
12
- { "name": "value", "type": "string", "default": "", "description": "当前值" },
13
- { "name": "placeholder", "type": "string", "default": "请输入", "description": "占位文案" },
14
- { "name": "height", "type": "number", "default": 200, "description": "输入区域高度,单位 rpx" },
15
- { "name": "maxlength", "type": "number", "default": 500, "description": "最大输入长度" },
16
- { "name": "disabled", "type": "boolean", "default": false, "description": "是否禁用" },
17
- { "name": "customClass", "type": "string", "default": "", "description": "外部自定义 class" }
5
+ {
6
+ "name": "label",
7
+ "type": "string",
8
+ "default": "",
9
+ "description": "字段标题"
10
+ },
11
+ {
12
+ "name": "required",
13
+ "type": "boolean",
14
+ "default": false,
15
+ "description": "是否展示必填标识"
16
+ },
17
+ {
18
+ "name": "requiredMark",
19
+ "type": "string",
20
+ "default": "*",
21
+ "description": "必填标识文案"
22
+ },
23
+ {
24
+ "name": "help",
25
+ "type": "string",
26
+ "default": "",
27
+ "description": "辅助提示"
28
+ },
29
+ {
30
+ "name": "error",
31
+ "type": "string",
32
+ "default": "",
33
+ "description": "错误提示,优先级高于 help"
34
+ },
35
+ {
36
+ "name": "size",
37
+ "type": "string",
38
+ "default": "medium",
39
+ "description": "尺寸,可选 medium 或 small"
40
+ },
41
+ {
42
+ "name": "name",
43
+ "type": "string",
44
+ "default": "",
45
+ "description": "字段名称"
46
+ },
47
+ {
48
+ "name": "value",
49
+ "type": "string",
50
+ "default": "",
51
+ "description": "当前值"
52
+ },
53
+ {
54
+ "name": "placeholder",
55
+ "type": "string",
56
+ "default": "请输入",
57
+ "description": "占位文案"
58
+ },
59
+ {
60
+ "name": "height",
61
+ "type": "number",
62
+ "default": 200,
63
+ "description": "输入区域高度,单位 rpx"
64
+ },
65
+ {
66
+ "name": "maxlength",
67
+ "type": "number",
68
+ "default": 500,
69
+ "description": "最大输入长度"
70
+ },
71
+ {
72
+ "name": "disabled",
73
+ "type": "boolean",
74
+ "default": false,
75
+ "description": "是否禁用"
76
+ },
77
+ {
78
+ "name": "customClass",
79
+ "type": "string",
80
+ "default": "",
81
+ "description": "外部自定义 class"
82
+ }
83
+ ],
84
+ "events": [
85
+ "onInput",
86
+ "onConfirm"
18
87
  ],
19
- "events": ["onInput", "onConfirm"],
20
88
  "slots": [],
21
- "tokens": ["color.text.primary", "color.brand.primary"]
89
+ "tokens": [
90
+ "color.text.primary",
91
+ "color.brand.primary"
92
+ ],
93
+ "eventDetails": {
94
+ "onInput": {
95
+ "description": "输入时触发",
96
+ "detail": "包含 name 与 value。"
97
+ },
98
+ "onConfirm": {
99
+ "description": "确认输入时触发",
100
+ "detail": "包含 name 与 value。"
101
+ }
102
+ }
22
103
  }
@@ -5,15 +5,34 @@
5
5
  {
6
6
  "name": "title",
7
7
  "type": "string",
8
- "default": ""
8
+ "default": "",
9
+ "description": "表单区块标题"
9
10
  },
10
11
  {
11
12
  "name": "desc",
12
13
  "type": "string",
13
- "default": ""
14
+ "default": "",
15
+ "description": "表单区块说明文案"
14
16
  }
15
17
  ],
16
18
  "events": [],
17
- "slots": ["default", "actions"],
18
- "tokens": ["spacing.4", "color.background.surface", "typography.size.title"]
19
+ "slots": [
20
+ "default",
21
+ "actions"
22
+ ],
23
+ "slotDetails": {
24
+ "default": {
25
+ "description": "表单字段内容区,可放置输入、选择和分组组件。",
26
+ "allowsChildren": true
27
+ },
28
+ "actions": {
29
+ "description": "表单底部操作区,可放置按钮等提交或取消操作组件。",
30
+ "allowsChildren": true
31
+ }
32
+ },
33
+ "tokens": [
34
+ "spacing.4",
35
+ "color.background.surface",
36
+ "typography.size.title"
37
+ ]
19
38
  }
@@ -17,7 +17,7 @@
17
17
  {
18
18
  "name": "color",
19
19
  "type": "string",
20
- "default": "#111111",
20
+ "default": "",
21
21
  "description": "图标颜色"
22
22
  },
23
23
  {
@@ -57,7 +57,11 @@
57
57
  "description": "外部自定义 class"
58
58
  }
59
59
  ],
60
- "events": ["onConfirm", "onCancel", "onError"],
60
+ "events": [
61
+ "onConfirm",
62
+ "onCancel",
63
+ "onError"
64
+ ],
61
65
  "slots": [],
62
66
  "tokens": [
63
67
  "color.background.surface",
@@ -67,5 +71,19 @@
67
71
  "color.text.inverse",
68
72
  "color.brand.primary",
69
73
  "radius.md"
70
- ]
74
+ ],
75
+ "eventDetails": {
76
+ "onConfirm": {
77
+ "description": "裁剪确认时触发",
78
+ "detail": "包含 tempFilePath、cropInfo、fileList、files 与 currentIndex。"
79
+ },
80
+ "onCancel": {
81
+ "description": "取消裁剪时触发",
82
+ "detail": "无固定 detail。"
83
+ },
84
+ "onError": {
85
+ "description": "裁剪失败时触发",
86
+ "detail": "包含 source、message、error 及附加上下文。"
87
+ }
88
+ }
71
89
  }
@@ -75,7 +75,13 @@
75
75
  "description": "外部自定义 class"
76
76
  }
77
77
  ],
78
- "events": ["onInput", "onChange", "onConfirm", "onClear", "onSearch"],
78
+ "events": [
79
+ "onInput",
80
+ "onChange",
81
+ "onConfirm",
82
+ "onClear",
83
+ "onSearch"
84
+ ],
79
85
  "slots": [],
80
86
  "tokens": [
81
87
  "color.background.surface",
@@ -85,5 +91,27 @@
85
91
  "color.text.secondary",
86
92
  "radius.md",
87
93
  "radius.pill"
88
- ]
94
+ ],
95
+ "eventDetails": {
96
+ "onInput": {
97
+ "description": "输入时触发",
98
+ "detail": "包含 name 与 value。"
99
+ },
100
+ "onChange": {
101
+ "description": "输入值变化时触发",
102
+ "detail": "包含 name 与 value。"
103
+ },
104
+ "onConfirm": {
105
+ "description": "确认输入时触发",
106
+ "detail": "包含 name 与 value。"
107
+ },
108
+ "onClear": {
109
+ "description": "清空输入时触发",
110
+ "detail": "包含 name 与 value。"
111
+ },
112
+ "onSearch": {
113
+ "description": "搜索确认时触发",
114
+ "detail": "包含 name 与 value。"
115
+ }
116
+ }
89
117
  }