@monkey-mini-app/dsh-mini-app 0.1.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/cordis.patch.yml +6 -0
- package/lib/client.d.cts +35 -0
- package/lib/client.js +5462 -0
- package/lib/index.d.ts +140 -0
- package/lib/index.js +1094 -0
- package/package.json +90 -0
- package/skills/monkey-mini-app/SKILL.md +209 -0
- package/skills/monkey-mini-app/references/catalog.md +99 -0
- package/skills/monkey-mini-app/references/contracts/activity-feed.md +24 -0
- package/skills/monkey-mini-app/references/contracts/app-shell.md +28 -0
- package/skills/monkey-mini-app/references/contracts/attachment-gallery.md +22 -0
- package/skills/monkey-mini-app/references/contracts/autocomplete.md +16 -0
- package/skills/monkey-mini-app/references/contracts/cascader.md +25 -0
- package/skills/monkey-mini-app/references/contracts/code-block.md +15 -0
- package/skills/monkey-mini-app/references/contracts/code-editor.md +17 -0
- package/skills/monkey-mini-app/references/contracts/color-picker.md +14 -0
- package/skills/monkey-mini-app/references/contracts/comment-thread.md +24 -0
- package/skills/monkey-mini-app/references/contracts/confirm-dialog.md +19 -0
- package/skills/monkey-mini-app/references/contracts/copyable.md +13 -0
- package/skills/monkey-mini-app/references/contracts/currency-input.md +15 -0
- package/skills/monkey-mini-app/references/contracts/data-grid.md +87 -0
- package/skills/monkey-mini-app/references/contracts/date-picker.md +17 -0
- package/skills/monkey-mini-app/references/contracts/date-range-picker.md +26 -0
- package/skills/monkey-mini-app/references/contracts/date-time-picker.md +18 -0
- package/skills/monkey-mini-app/references/contracts/date-time-range-picker.md +24 -0
- package/skills/monkey-mini-app/references/contracts/description-list.md +13 -0
- package/skills/monkey-mini-app/references/contracts/detail-panel.md +27 -0
- package/skills/monkey-mini-app/references/contracts/diff-viewer.md +16 -0
- package/skills/monkey-mini-app/references/contracts/donut-chart.md +31 -0
- package/skills/monkey-mini-app/references/contracts/duration-input.md +14 -0
- package/skills/monkey-mini-app/references/contracts/env-badge.md +13 -0
- package/skills/monkey-mini-app/references/contracts/event-calendar.md +50 -0
- package/skills/monkey-mini-app/references/contracts/file-dropzone.md +14 -0
- package/skills/monkey-mini-app/references/contracts/file-tree.md +23 -0
- package/skills/monkey-mini-app/references/contracts/filter-bar.md +26 -0
- package/skills/monkey-mini-app/references/contracts/gantt.md +24 -0
- package/skills/monkey-mini-app/references/contracts/gauge.md +14 -0
- package/skills/monkey-mini-app/references/contracts/jira-wiki.md +53 -0
- package/skills/monkey-mini-app/references/contracts/jql-input.md +37 -0
- package/skills/monkey-mini-app/references/contracts/json-viewer.md +13 -0
- package/skills/monkey-mini-app/references/contracts/kanban-issue-panel.md +45 -0
- package/skills/monkey-mini-app/references/contracts/kanban.md +64 -0
- package/skills/monkey-mini-app/references/contracts/log-viewer.md +13 -0
- package/skills/monkey-mini-app/references/contracts/markdown-editor.md +24 -0
- package/skills/monkey-mini-app/references/contracts/markdown.md +14 -0
- package/skills/monkey-mini-app/references/contracts/mini-calendar.md +15 -0
- package/skills/monkey-mini-app/references/contracts/notification-center.md +23 -0
- package/skills/monkey-mini-app/references/contracts/number-field.md +17 -0
- package/skills/monkey-mini-app/references/contracts/page-header.md +25 -0
- package/skills/monkey-mini-app/references/contracts/password-field.md +14 -0
- package/skills/monkey-mini-app/references/contracts/phone-input.md +14 -0
- package/skills/monkey-mini-app/references/contracts/progress-ring.md +13 -0
- package/skills/monkey-mini-app/references/contracts/radar-chart.md +23 -0
- package/skills/monkey-mini-app/references/contracts/rating.md +15 -0
- package/skills/monkey-mini-app/references/contracts/relative-date-picker.md +24 -0
- package/skills/monkey-mini-app/references/contracts/request-inspector.md +16 -0
- package/skills/monkey-mini-app/references/contracts/rich-text-editor.md +15 -0
- package/skills/monkey-mini-app/references/contracts/run-timeline.md +24 -0
- package/skills/monkey-mini-app/references/contracts/scrollspy.md +13 -0
- package/skills/monkey-mini-app/references/contracts/search-input.md +17 -0
- package/skills/monkey-mini-app/references/contracts/severity-chip.md +13 -0
- package/skills/monkey-mini-app/references/contracts/slider-range.md +16 -0
- package/skills/monkey-mini-app/references/contracts/sortable-list.md +23 -0
- package/skills/monkey-mini-app/references/contracts/sparkline.md +13 -0
- package/skills/monkey-mini-app/references/contracts/stacked-bar-chart.md +23 -0
- package/skills/monkey-mini-app/references/contracts/stat-card.md +27 -0
- package/skills/monkey-mini-app/references/contracts/status-badge.md +24 -0
- package/skills/monkey-mini-app/references/contracts/stepper.md +26 -0
- package/skills/monkey-mini-app/references/contracts/tag-input.md +15 -0
- package/skills/monkey-mini-app/references/contracts/terminal.md +13 -0
- package/skills/monkey-mini-app/references/contracts/test-step-list.md +23 -0
- package/skills/monkey-mini-app/references/contracts/time-picker.md +18 -0
- package/skills/monkey-mini-app/references/contracts/time-range-picker.md +23 -0
- package/skills/monkey-mini-app/references/contracts/time-wheel.md +29 -0
- package/skills/monkey-mini-app/references/contracts/timeline.md +24 -0
- package/skills/monkey-mini-app/references/contracts/timezone-select.md +27 -0
- package/skills/monkey-mini-app/references/contracts/transfer.md +24 -0
- package/skills/monkey-mini-app/references/contracts/tree-view.md +23 -0
- package/skills/monkey-mini-app/references/contracts/trend-card.md +26 -0
- package/skills/monkey-mini-app/references/contracts/user-picker.md +24 -0
- package/skills/monkey-mini-app/references/ctx.md +137 -0
- package/skills/monkey-mini-app/references/history.md +10 -0
- package/skills/monkey-mini-app/references/icons.md +83 -0
- package/skills/monkey-mini-app/references/llm-json.md +69 -0
- package/skills/monkey-mini-app/references/loader.md +30 -0
- package/skills/monkey-mini-app/references/test.md +30 -0
- package/skills/monkey-mini-app/references/tools.md +21 -0
- package/skills/monkey-mini-app/references/troubleshoot.md +12 -0
- package/skills/monkey-mini-app/templates/README.md +24 -0
- package/skills/monkey-mini-app/templates/agentrun/main.api.ts +78 -0
- package/skills/monkey-mini-app/templates/agentrun/manifest.json +9 -0
- package/skills/monkey-mini-app/templates/agentrun/ui.tsx +125 -0
- package/skills/monkey-mini-app/templates/insights/lib/sample.ts +17 -0
- package/skills/monkey-mini-app/templates/insights/main.api.ts +101 -0
- package/skills/monkey-mini-app/templates/insights/manifest.json +9 -0
- package/skills/monkey-mini-app/templates/insights/ui.tsx +138 -0
- package/skills/monkey-mini-app/templates/jira/main.api.ts +115 -0
- package/skills/monkey-mini-app/templates/jira/manifest.json +9 -0
- package/skills/monkey-mini-app/templates/jira/ui.tsx +318 -0
- package/skills/monkey-mini-app/templates/minimal/main.api.ts +16 -0
- package/skills/monkey-mini-app/templates/minimal/manifest.json +8 -0
- package/skills/monkey-mini-app/templates/minimal/ui.tsx +74 -0
- package/skills/monkey-mini-app/templates/monitor/main.api.ts +91 -0
- package/skills/monkey-mini-app/templates/monitor/manifest.json +9 -0
- package/skills/monkey-mini-app/templates/monitor/ui.tsx +176 -0
- package/skills/monkey-mini-app/templates/review/main.api.ts +68 -0
- package/skills/monkey-mini-app/templates/review/manifest.json +9 -0
- package/skills/monkey-mini-app/templates/review/ui.tsx +159 -0
- package/skills/monkey-mini-app/templates/todo/main.api.ts +83 -0
- package/skills/monkey-mini-app/templates/todo/manifest.json +8 -0
- package/skills/monkey-mini-app/templates/todo/ui.tsx +177 -0
- package/tsup.config.ts +68 -0
package/package.json
ADDED
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@monkey-mini-app/dsh-mini-app",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "DeepSeek Harness plugin: mini-app host wiring, panel, and skills",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "./lib/index.js",
|
|
7
|
+
"types": "./lib/index.d.ts",
|
|
8
|
+
"exports": {
|
|
9
|
+
".": {
|
|
10
|
+
"types": "./lib/index.d.ts",
|
|
11
|
+
"import": "./lib/index.js",
|
|
12
|
+
"default": "./lib/index.js"
|
|
13
|
+
},
|
|
14
|
+
"./client": {
|
|
15
|
+
"types": "./lib/client.d.cts",
|
|
16
|
+
"import": "./lib/client.js",
|
|
17
|
+
"require": "./lib/client.js",
|
|
18
|
+
"default": "./lib/client.js"
|
|
19
|
+
},
|
|
20
|
+
"./package.json": "./package.json"
|
|
21
|
+
},
|
|
22
|
+
"files": [
|
|
23
|
+
"lib",
|
|
24
|
+
"cordis.patch.yml",
|
|
25
|
+
"tsup.config.ts",
|
|
26
|
+
"skills"
|
|
27
|
+
],
|
|
28
|
+
"scripts": {
|
|
29
|
+
"build": "rm -rf lib && tsup",
|
|
30
|
+
"prepare": "rm -rf lib && tsup",
|
|
31
|
+
"test": "vitest run --passWithNoTests",
|
|
32
|
+
"typecheck": "tsc -p tsconfig.json --noEmit",
|
|
33
|
+
"prepublishOnly": "pnpm --filter @monkey-mini-app/ui build && node ../../scripts/generate-skill.mjs && rm -rf lib && tsup"
|
|
34
|
+
},
|
|
35
|
+
"dsh": {
|
|
36
|
+
"bundle": {
|
|
37
|
+
"patch": "./cordis.patch.yml"
|
|
38
|
+
},
|
|
39
|
+
"client": {
|
|
40
|
+
"inject": [
|
|
41
|
+
"@deepseek-ai/dsh-client-runtime",
|
|
42
|
+
"@deepseek-ai/dsh-client-ui-slots"
|
|
43
|
+
],
|
|
44
|
+
"platform": "web"
|
|
45
|
+
}
|
|
46
|
+
},
|
|
47
|
+
"keywords": [
|
|
48
|
+
"dsh",
|
|
49
|
+
"dsh-plugin",
|
|
50
|
+
"deepseek-harness",
|
|
51
|
+
"monkey-mini-app"
|
|
52
|
+
],
|
|
53
|
+
"dependencies": {
|
|
54
|
+
"@deepseek-ai/dsh-llm": "0.1.1-rc.2",
|
|
55
|
+
"@deepseek-ai/dsh-session": "0.1.1-rc.2",
|
|
56
|
+
"@deepseek-ai/dsh-subagent": "0.1.1-rc.2",
|
|
57
|
+
"@hono/node-server": "^2.1.1",
|
|
58
|
+
"@monkey-mini-app/host": "^0.1.0",
|
|
59
|
+
"@monkey-mini-app/panel": "^0.1.0",
|
|
60
|
+
"@monkey-mini-app/ui": "^0.1.0",
|
|
61
|
+
"esbuild": "^0.28.2",
|
|
62
|
+
"esbuild-wasm": "^0.25.12",
|
|
63
|
+
"hono": "^4.8.0",
|
|
64
|
+
"i18next": "^25.4.0",
|
|
65
|
+
"isomorphic-git": "^1.29.0",
|
|
66
|
+
"sucrase": "^3.35.1"
|
|
67
|
+
},
|
|
68
|
+
"peerDependencies": {
|
|
69
|
+
"react": "^18 || ^19",
|
|
70
|
+
"react-dom": "^18 || ^19"
|
|
71
|
+
},
|
|
72
|
+
"devDependencies": {
|
|
73
|
+
"@types/node": "^22.13.4",
|
|
74
|
+
"@types/react": "19",
|
|
75
|
+
"@types/react-dom": "19",
|
|
76
|
+
"lucide-react": "^0.544.0",
|
|
77
|
+
"react": "19",
|
|
78
|
+
"react-dom": "19",
|
|
79
|
+
"tsup": "^8.3.6",
|
|
80
|
+
"typescript": "^5.7.3",
|
|
81
|
+
"vitest": "^3.0.5"
|
|
82
|
+
},
|
|
83
|
+
"engines": {
|
|
84
|
+
"node": ">=20"
|
|
85
|
+
},
|
|
86
|
+
"license": "MIT",
|
|
87
|
+
"publishConfig": {
|
|
88
|
+
"access": "public"
|
|
89
|
+
}
|
|
90
|
+
}
|
|
@@ -0,0 +1,209 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: monkey-mini-app
|
|
3
|
+
description: Create or edit local mini-apps (ui.tsx + main.api.ts). Create with mini_app_register; edit with mini_app_read + mini_app_edit; verify with mini_app_reload; smoke with mini_app_call; open with mini_app_open.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# monkey-mini-app
|
|
7
|
+
|
|
8
|
+
生成或修改本地小程序。本 skill 在 `~/.dsh/skills/monkey-mini-app/`(`references/`、`templates/` 同级)。
|
|
9
|
+
|
|
10
|
+
**`ctx` / 模型 API 以本 skill 的 [references/ctx.md](references/ctx.md)、[references/llm-json.md](references/llm-json.md) 为准**(含 `llm` / `agent` / `schema` / `onEvent`)。现网样例不要当契约:不要读 `~/.monkey-mini-app/runtime/apps/*/`。
|
|
11
|
+
|
|
12
|
+
## 文件怎么落地
|
|
13
|
+
|
|
14
|
+
Workspace 直接 Write `~/.monkey-mini-app/runtime/**` 会被沙箱拒绝,一律走 `mini_app_*` 工具。
|
|
15
|
+
|
|
16
|
+
### 新建 app → `mini_app_register`
|
|
17
|
+
|
|
18
|
+
脚手架创建(要 `manifest.json`)。`files` 的 **key 是相对路径**(动态名字),value 是全文;自动建目录。常见还有 `ui.tsx`、`main.api.ts`,按需 `lib/...`、`components/...`(禁止 `..` / 绝对路径):
|
|
19
|
+
|
|
20
|
+
```
|
|
21
|
+
mini_app_register({
|
|
22
|
+
appId: "com.example.foo",
|
|
23
|
+
files: {
|
|
24
|
+
"manifest.json": "...",
|
|
25
|
+
"ui.tsx": "...",
|
|
26
|
+
"main.api.ts": "...",
|
|
27
|
+
"lib/parse.ts": "...",
|
|
28
|
+
"components/Card.tsx": "..."
|
|
29
|
+
}
|
|
30
|
+
})
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
### 改已有文件 → `read` + `edit`(主路径)
|
|
34
|
+
|
|
35
|
+
不要再用 `register` 整树重写来改一行。
|
|
36
|
+
|
|
37
|
+
```
|
|
38
|
+
mini_app_list_files({ appId })
|
|
39
|
+
mini_app_read({ appId, path: "ui.tsx" })
|
|
40
|
+
// 可选行窗(1-indexed 闭区间):startLine/endLine;也可 offset+limit(Pi 风格)
|
|
41
|
+
// mini_app_read({ appId, path: "ui.tsx", startLine: 10, endLine: 40 })
|
|
42
|
+
// mini_app_read({ appId, path: "main.api.ts", offset: 1, limit: 80, numbered: true })
|
|
43
|
+
mini_app_edit({
|
|
44
|
+
appId,
|
|
45
|
+
path: "ui.tsx",
|
|
46
|
+
edits: [{ oldText: "旧片段(须唯一)", newText: "新片段" }],
|
|
47
|
+
// commit: false // 多轮小改可先不提交,最后 reload 收口
|
|
48
|
+
})
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
- **新建单文件 / 大段重写** → `mini_app_write({ appId, path, content })`
|
|
52
|
+
- **删文件** → `mini_app_delete({ appId, path })`(不能删 `manifest.json`)
|
|
53
|
+
- mutate 默认 **auto-commit**;设 `commit: false` 可攒改动
|
|
54
|
+
|
|
55
|
+
### 验证 + 预热缓存 → `mini_app_reload`
|
|
56
|
+
|
|
57
|
+
改完一轮后调用(**替代旧的 `mini_app_validate`**):校验 + **同步编译** `main.api` 与 UI;成功且工作区有未提交改动会 auto-commit。
|
|
58
|
+
|
|
59
|
+
```
|
|
60
|
+
mini_app_reload({ appId }) // { ok, errors, compiled, committed? }
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
然后:
|
|
64
|
+
|
|
65
|
+
1. `mini_app_call({ appId, method, args })` 冒烟(不是 curl / 不是 bash 打 `:17880`)
|
|
66
|
+
2. `mini_app_open({ appId })` —— 弹出侧栏「小程序」并打开该 app
|
|
67
|
+
|
|
68
|
+
`mini_app_list` 只需确认插件活着。显式 `mini_app_history_commit` / `_list` / `_reset` / `_revert` 仍可用。
|
|
69
|
+
|
|
70
|
+
## 协议
|
|
71
|
+
|
|
72
|
+
- UI **禁止** `import` `main.api.ts`
|
|
73
|
+
- UI:`const { call } = useDashboardApi()`,自己管 loading;`useDashboardApi` 从 `@monkeyagent/host` 导入(host 注入,不要自己实现)
|
|
74
|
+
- 后端:`export default defineDashboard({ name, description, api })`
|
|
75
|
+
- `call("foo")` 必须是 `api.foo`
|
|
76
|
+
- 后端 import 只许 `@monkeyagent/dashboard` 和 `./lib` `./components`
|
|
77
|
+
- 抓网:`ctx.http(url)` / `ctx.http(url, { method, headers, query, body, timeout })`;解析写 `./lib`
|
|
78
|
+
- 本机命令才用 `ctx.bash`(`{ stdout, stderr, exitCode }`)
|
|
79
|
+
- **模型**:`ctx.llm(prompt, opts?)` / `ctx.agent(goal, opts?)` → **string**。共用 opts:`provider?` `model?` `system?` `schema?` `maxTokens?` `signal?`;agent 另加 `onEvent?`。结构化 JSON → [llm-json.md](references/llm-json.md);过程事件与完整签名 → [ctx.md](references/ctx.md)
|
|
80
|
+
- MCP / tool 参数是普通对象,禁止 `{ input: "..." }`;`ctx.tool` / `ctx.agent` / `ctx.llm` 返回值都是 **string**(tool/mcp 经宿主 stringify)
|
|
81
|
+
- 文案给用户看;卡片标题用业务语言(「今日摘要」),不要写 `ctx.bash` / `storage/*.json`
|
|
82
|
+
- **长耗时任务只跑采样** + 必须响应 `ctx.signal` + `scanStatus`/`progress`,见 [ctx.md](references/ctx.md)
|
|
83
|
+
|
|
84
|
+
## UI(@monkey-mini-app/ui)
|
|
85
|
+
|
|
86
|
+
```tsx
|
|
87
|
+
import { useEffect, useState } from "react";
|
|
88
|
+
import { Button, Input, Card, CardContent, CardHeader, CardTitle, Textarea } from "@monkey-mini-app/ui";
|
|
89
|
+
import { useDashboardApi } from "@monkeyagent/host";
|
|
90
|
+
|
|
91
|
+
export default function Ui() {
|
|
92
|
+
const { call } = useDashboardApi();
|
|
93
|
+
const [draft, setDraft] = useState("");
|
|
94
|
+
...
|
|
95
|
+
return (
|
|
96
|
+
<Card className="mt-8 w-full">
|
|
97
|
+
<CardHeader><CardTitle>名称</CardTitle></CardHeader>
|
|
98
|
+
<CardContent className="flex flex-col gap-3">
|
|
99
|
+
<Input value={draft} onChange={(e) => setDraft(e.target.value)} placeholder="写一条" />
|
|
100
|
+
<Button onClick={async () => { await call("add", { title: draft }); }}>添加</Button>
|
|
101
|
+
</CardContent>
|
|
102
|
+
</Card>
|
|
103
|
+
);
|
|
104
|
+
}
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
- **布局用 Tailwind classes**(`flex flex-col gap-3 p-4 grid md:grid-cols-3 w-full space-y-4`),库内没有 Stack/Text 这类布局组件
|
|
108
|
+
- **`UiProvider` 由 host 自动包裹**(locale 跟随 host 设置),不要自己写 Provider
|
|
109
|
+
- 组件清单(props + 类型 + 示例)→ **[references/catalog.md](references/catalog.md)** 与 **[references/contracts/](references/contracts/)**(自动生成,改组件后 `pnpm skill:gen` 再生成)
|
|
110
|
+
- **图标**:`import { Icon } from "@monkey-mini-app/ui"` 后用 `Icon.HelpCircle`(任意 lucide 名都行);**常用推荐子集 + 何时用** → **[references/icons.md](references/icons.md)**(不要读上千个名,看这份精简的)
|
|
111
|
+
- **空状态插图**:`import { IlluServerStatus } from "@monkey-mini-app/ui"`(`Illu*`,已 token 化跟主题)
|
|
112
|
+
- 组件库已内置 lucide 图标 / recharts / CodeMirror 等依赖——**不要**额外 import 这些 npm 包;从 `@monkey-mini-app/ui` 拿
|
|
113
|
+
|
|
114
|
+
| 场景 | 组件 |
|
|
115
|
+
|---|---|
|
|
116
|
+
| 页面骨架 | `AppShell` `PageHeader` `FilterBar` `DetailPanel` |
|
|
117
|
+
| KPI 卡片 | `StatCard` `TrendCard` `StatusBadge` `SeverityChip` |
|
|
118
|
+
| 表格 | `DataGrid` + `ColumnDef`(排序/筛选/分页/CSV 自带) |
|
|
119
|
+
| 日期时间 | `DatePicker` `DateRangePicker` `DateTimePicker` `TimePicker` `DurationInput` `RelativeDatePicker` |
|
|
120
|
+
| 看板/日历/计划 | `Kanban` `EventCalendar` `Gantt` `Timeline` `Stepper` |
|
|
121
|
+
| 树/列表 | `TreeView` `SortableList` `FileTree` |
|
|
122
|
+
| 编辑器 | `CodeEditor` `MarkdownEditor` `RichTextEditor` `CodeBlock` `Markdown` |
|
|
123
|
+
| 检查/日志 | `DiffViewer` `JsonViewer` `LogViewer` `RequestInspector` `Terminal` |
|
|
124
|
+
| 表单扩展 | `SearchInput` `NumberField` `TagInput` `ConfirmDialog` `FileDropzone` `Copyable` `UserPicker` |
|
|
125
|
+
| 图表 | `DonutChart` `StackedBarChart` `Sparkline` `Gauge` `RadarChart` + L1 `Chart` |
|
|
126
|
+
| 基础件 | `Button` `Input` `Select` `Dialog` `Sheet` `Tabs` `Card` `Badge` `Toast` `Empty` … |
|
|
127
|
+
|
|
128
|
+
## CRUD 骨架(普通记事直接改这段)
|
|
129
|
+
|
|
130
|
+
`manifest.json`:
|
|
131
|
+
|
|
132
|
+
```json
|
|
133
|
+
{
|
|
134
|
+
"id": "com.example.foo",
|
|
135
|
+
"name": "名称",
|
|
136
|
+
"description": "一句话",
|
|
137
|
+
"version": "0.1.0",
|
|
138
|
+
"entry": "ui.tsx",
|
|
139
|
+
"theme": { "followsHost": true },
|
|
140
|
+
"acronym": "MC"
|
|
141
|
+
}
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
`acronym`(可选):双字母缩写,用于 Host 列表的卡片 monogram。不写时按中文名拼音声母自动生成(「备忘录」→ BW),英文名取前两个字母。只有想自定义缩写时才需要填(如品牌名)。
|
|
145
|
+
|
|
146
|
+
`main.api.ts`:
|
|
147
|
+
|
|
148
|
+
```ts
|
|
149
|
+
import { defineDashboard } from "@monkeyagent/dashboard";
|
|
150
|
+
|
|
151
|
+
async function loadItems(ctx) {
|
|
152
|
+
const items = await ctx.storage.get("items");
|
|
153
|
+
return Array.isArray(items) ? items : [];
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
export default defineDashboard({
|
|
157
|
+
name: "名称",
|
|
158
|
+
description: "一句话",
|
|
159
|
+
api: {
|
|
160
|
+
async list(ctx) {
|
|
161
|
+
return loadItems(ctx);
|
|
162
|
+
},
|
|
163
|
+
async add(ctx, args) {
|
|
164
|
+
const title = String(args?.title ?? "").trim();
|
|
165
|
+
if (!title) throw new Error("请填写标题");
|
|
166
|
+
const items = await loadItems(ctx);
|
|
167
|
+
const item = { id: "i_" + Date.now(), title, createdAt: Date.now() };
|
|
168
|
+
items.unshift(item);
|
|
169
|
+
await ctx.storage.set("items", items);
|
|
170
|
+
return item;
|
|
171
|
+
},
|
|
172
|
+
async remove(ctx, args) {
|
|
173
|
+
const items = (await loadItems(ctx)).filter((x) => x.id !== args?.id);
|
|
174
|
+
await ctx.storage.set("items", items);
|
|
175
|
+
return { ok: true };
|
|
176
|
+
},
|
|
177
|
+
},
|
|
178
|
+
});
|
|
179
|
+
```
|
|
180
|
+
|
|
181
|
+
## 按需再读(不要一次全打开)
|
|
182
|
+
|
|
183
|
+
| 何时 | 打开 |
|
|
184
|
+
|------|------|
|
|
185
|
+
| 组件 props / 类型 / 示例 | [references/catalog.md](references/catalog.md) → [references/contracts/](references/contracts/) |
|
|
186
|
+
| 图标子集(`Icon` 命名空间,何时用) | [references/icons.md](references/icons.md) || `ctx.*` 完整契约(含 agent `onEvent` 事件形状) | [references/ctx.md](references/ctx.md)(用 `ctx.http`,不要 bash curl) |
|
|
187
|
+
| `schema` 结构化 JSON 例子 | [references/llm-json.md](references/llm-json.md) |
|
|
188
|
+
| **真的要用** `ctx.tool` | 先 `mini_app_list_ctx_tools`,再 [references/tools.md](references/tools.md) |
|
|
189
|
+
| 相对 import、`./lib` 解析 | [references/loader.md](references/loader.md) |
|
|
190
|
+
| 人类调试 Host `:17880` / curl | [references/test.md](references/test.md)(≠ `ctx.http`) |
|
|
191
|
+
| 骨架基线 / 最小可运行结构 | `templates/minimal/` |
|
|
192
|
+
| 本地 CRUD + 筛选 + 派生统计 | `templates/todo/` |
|
|
193
|
+
| 联网数据 → 模型摘要(长任务/采样/取消) | `templates/insights/` |
|
|
194
|
+
| 本机指标实时看板(system + bash) | `templates/monitor/` |
|
|
195
|
+
| 编辑/diff/日志/用例表格(复杂组件示例) | `templates/review/` |
|
|
196
|
+
| `ctx.agent` 多步任务 + 过程/取消 | `templates/agentrun/` |
|
|
197
|
+
| 看板/表格双视图 + 编辑 + AI(flagship) | `templates/jira/` |
|
|
198
|
+
| **先把 7 个模板的指引侧重读一遍再选** | [`templates/README.md`](templates/README.md) |
|
|
199
|
+
| 报错 | [references/troubleshoot.md](references/troubleshoot.md) |
|
|
200
|
+
|
|
201
|
+
普通 storage CRUD **先用上面骨架**,不要为了记笔记去读整份 Todo。模板是风格样板:中文产品文案、`call` 自己管 loading/error、后端可用 TypeScript。
|
|
202
|
+
|
|
203
|
+
## Checklist
|
|
204
|
+
|
|
205
|
+
- [ ] 新建用 `mini_app_register`;改已有用 `mini_app_read` + `mini_app_edit`(或 `write`)
|
|
206
|
+
- [ ] `mini_app_reload` 编译通过
|
|
207
|
+
- [ ] `mini_app_call` 冒烟通过(不是 curl)
|
|
208
|
+
- [ ] `mini_app_open`
|
|
209
|
+
- [ ] call 键 ⊆ api 键;UI 无 fetch / secrets / llm
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
<!-- generated by scripts/generate-skill.mjs — do not edit -->
|
|
2
|
+
|
|
3
|
+
# @monkey-mini-app/ui catalog
|
|
4
|
+
|
|
5
|
+
Import from `@monkey-mini-app/ui`. Host loads `@monkey-mini-app/ui/globals.css` + `UiProvider`.
|
|
6
|
+
Open `contracts/<slug>.md` for **props + related types** + examples.
|
|
7
|
+
|
|
8
|
+
## Layout & blocks
|
|
9
|
+
|
|
10
|
+
| component | when | types | contract |
|
|
11
|
+
|---|---|---|---|
|
|
12
|
+
| `ActivityFeed` | — | `TimelineItem` | [docs](contracts/activity-feed.md) |
|
|
13
|
+
| `AppShell` | Root layout for a mini-app page | — | [docs](contracts/app-shell.md) |
|
|
14
|
+
| `AttachmentGallery` | — | `GalleryFile` | [docs](contracts/attachment-gallery.md) |
|
|
15
|
+
| `CommentThread` | — | `Comment` | [docs](contracts/comment-thread.md) |
|
|
16
|
+
| `DescriptionList` | — | — | [docs](contracts/description-list.md) |
|
|
17
|
+
| `DetailPanel` | Master-detail after row/card click | — | [docs](contracts/detail-panel.md) |
|
|
18
|
+
| `DonutChart` | — | `ChartConfig` `Slice` | [docs](contracts/donut-chart.md) |
|
|
19
|
+
| `EnvBadge` | — | — | [docs](contracts/env-badge.md) |
|
|
20
|
+
| `FileTree` | — | `TreeNode` | [docs](contracts/file-tree.md) |
|
|
21
|
+
| `FilterBar` | Above DataGrid or any filtered list | — | [docs](contracts/filter-bar.md) |
|
|
22
|
+
| `Gauge` | — | — | [docs](contracts/gauge.md) |
|
|
23
|
+
| `NotificationCenter` | — | `NotificationItem` | [docs](contracts/notification-center.md) |
|
|
24
|
+
| `PageHeader` | Top of a page inside AppShell main | — | [docs](contracts/page-header.md) |
|
|
25
|
+
| `ProgressRing` | — | — | [docs](contracts/progress-ring.md) |
|
|
26
|
+
| `RadarChart` | — | `ChartConfig` | [docs](contracts/radar-chart.md) |
|
|
27
|
+
| `RequestInspector` | — | — | [docs](contracts/request-inspector.md) |
|
|
28
|
+
| `RunTimeline` | — | `TimelineItem` | [docs](contracts/run-timeline.md) |
|
|
29
|
+
| `Scrollspy` | — | — | [docs](contracts/scrollspy.md) |
|
|
30
|
+
| `SeverityChip` | — | — | [docs](contracts/severity-chip.md) |
|
|
31
|
+
| `Sparkline` | — | — | [docs](contracts/sparkline.md) |
|
|
32
|
+
| `StackedBarChart` | — | `ChartConfig` | [docs](contracts/stacked-bar-chart.md) |
|
|
33
|
+
| `StatCard` | Dashboard metric strip | — | [docs](contracts/stat-card.md) |
|
|
34
|
+
| `StatusBadge` | pass \| fail \| blocked \| flaky \| running \| pending cells and chips | — | [docs](contracts/status-badge.md) |
|
|
35
|
+
| `Terminal` | — | — | [docs](contracts/terminal.md) |
|
|
36
|
+
| `TestStepList` | — | `TestStep` | [docs](contracts/test-step-list.md) |
|
|
37
|
+
| `TrendCard` | — | `TrendPoint` | [docs](contracts/trend-card.md) |
|
|
38
|
+
|
|
39
|
+
## Products
|
|
40
|
+
|
|
41
|
+
| component | when | types | contract |
|
|
42
|
+
|---|---|---|---|
|
|
43
|
+
| `CodeBlock` | — | — | [docs](contracts/code-block.md) |
|
|
44
|
+
| `CodeEditor` | — | — | [docs](contracts/code-editor.md) |
|
|
45
|
+
| `DataGrid` | Any list/table of rows — prefer over raw Table* | `SearchVariant` `DataGridColumnMeta` `DataGridFeatures` | [docs](contracts/data-grid.md) |
|
|
46
|
+
| `DiffViewer` | — | — | [docs](contracts/diff-viewer.md) |
|
|
47
|
+
| `EventCalendar` | Scheduling, on-call, release windows | `CalendarView` `CalendarEvent` | [docs](contracts/event-calendar.md) |
|
|
48
|
+
| `FileDropzone` | — | — | [docs](contracts/file-dropzone.md) |
|
|
49
|
+
| `Gantt` | — | `GanttTask` | [docs](contracts/gantt.md) |
|
|
50
|
+
| `JiraWiki` | Jira description / comment body | `JiraWikiClassNames` | [docs](contracts/jira-wiki.md) |
|
|
51
|
+
| `JqlInput` | Issue search / saved filters | `JqlSuggestItem` | [docs](contracts/jql-input.md) |
|
|
52
|
+
| `JsonViewer` | — | — | [docs](contracts/json-viewer.md) |
|
|
53
|
+
| `Kanban` | Issue/workflow boards | `KanbanComment` `KanbanCard` `KanbanColumn` | [docs](contracts/kanban.md) |
|
|
54
|
+
| `KanbanIssuePanel` | — | `KanbanCard` `KanbanComment` | [docs](contracts/kanban-issue-panel.md) |
|
|
55
|
+
| `LogViewer` | — | — | [docs](contracts/log-viewer.md) |
|
|
56
|
+
| `Markdown` | — | — | [docs](contracts/markdown.md) |
|
|
57
|
+
| `MarkdownEditor` | — | `MarkdownEditorMode` | [docs](contracts/markdown-editor.md) |
|
|
58
|
+
| `RichTextEditor` | — | — | [docs](contracts/rich-text-editor.md) |
|
|
59
|
+
| `SortableList` | — | `SortableItem` | [docs](contracts/sortable-list.md) |
|
|
60
|
+
| `Stepper` | — | `Step` | [docs](contracts/stepper.md) |
|
|
61
|
+
| `Timeline` | — | `TimelineItem` | [docs](contracts/timeline.md) |
|
|
62
|
+
| `TreeView` | — | `TreeNode` | [docs](contracts/tree-view.md) |
|
|
63
|
+
|
|
64
|
+
## Composites (inputs)
|
|
65
|
+
|
|
66
|
+
| component | when | types | contract |
|
|
67
|
+
|---|---|---|---|
|
|
68
|
+
| `Autocomplete` | — | — | [docs](contracts/autocomplete.md) |
|
|
69
|
+
| `Cascader` | — | `CascaderNode` | [docs](contracts/cascader.md) |
|
|
70
|
+
| `ColorPicker` | — | — | [docs](contracts/color-picker.md) |
|
|
71
|
+
| `ConfirmDialog` | — | — | [docs](contracts/confirm-dialog.md) |
|
|
72
|
+
| `Copyable` | — | — | [docs](contracts/copyable.md) |
|
|
73
|
+
| `CurrencyInput` | — | — | [docs](contracts/currency-input.md) |
|
|
74
|
+
| `DatePicker` | — | — | [docs](contracts/date-picker.md) |
|
|
75
|
+
| `DateRangePicker` | Filters needing from/to calendar days | — | [docs](contracts/date-range-picker.md) |
|
|
76
|
+
| `DateTimePicker` | — | — | [docs](contracts/date-time-picker.md) |
|
|
77
|
+
| `DateTimeRangePicker` | — | `DateTimeRange` | [docs](contracts/date-time-range-picker.md) |
|
|
78
|
+
| `DurationInput` | — | — | [docs](contracts/duration-input.md) |
|
|
79
|
+
| `MiniCalendar` | — | — | [docs](contracts/mini-calendar.md) |
|
|
80
|
+
| `NumberField` | — | — | [docs](contracts/number-field.md) |
|
|
81
|
+
| `PasswordField` | — | — | [docs](contracts/password-field.md) |
|
|
82
|
+
| `PhoneInput` | — | — | [docs](contracts/phone-input.md) |
|
|
83
|
+
| `Rating` | — | — | [docs](contracts/rating.md) |
|
|
84
|
+
| `RelativeDatePicker` | — | `RelativePreset` | [docs](contracts/relative-date-picker.md) |
|
|
85
|
+
| `SearchInput` | — | — | [docs](contracts/search-input.md) |
|
|
86
|
+
| `SliderRange` | — | — | [docs](contracts/slider-range.md) |
|
|
87
|
+
| `TagInput` | — | — | [docs](contracts/tag-input.md) |
|
|
88
|
+
| `TimePicker` | `value` is `HH:mm` (24h). | — | [docs](contracts/time-picker.md) |
|
|
89
|
+
| `TimeRangePicker` | — | `TimeRange` | [docs](contracts/time-range-picker.md) |
|
|
90
|
+
| `TimeWheel` | — | `TimePickerProps` | [docs](contracts/time-wheel.md) |
|
|
91
|
+
| `TimezoneSelect` | — | `ZoneInfo` | [docs](contracts/timezone-select.md) |
|
|
92
|
+
| `Transfer` | — | `TransferItem` | [docs](contracts/transfer.md) |
|
|
93
|
+
| `UserPicker` | — | `UserOption` | [docs](contracts/user-picker.md) |
|
|
94
|
+
|
|
95
|
+
## L1 primitives
|
|
96
|
+
|
|
97
|
+
Button, Input, Textarea, Select, Combobox, Checkbox, Switch, RadioGroup, Slider, Label, Field, Dialog, AlertDialog, Sheet, Drawer, Popover, Tooltip, DropdownMenu, ContextMenu, Tabs, Accordion, Card, Badge, Avatar, Breadcrumb, Pagination, Progress, Skeleton, Spinner, Empty, Alert, Separator, ScrollArea, Resizable, Sidebar, Command, Calendar, Table, Chart, Toast, …
|
|
98
|
+
|
|
99
|
+
Use L1 to glue products. Prefer composites for dates/inputs.
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
<!-- generated by scripts/generate-skill.mjs — do not edit -->
|
|
2
|
+
|
|
3
|
+
# ActivityFeed
|
|
4
|
+
|
|
5
|
+
`import { ActivityFeed, TimelineItem } from "@monkey-mini-app/ui"`
|
|
6
|
+
|
|
7
|
+
`packages/ui/src/blocks/activity-feed.tsx` · blocks
|
|
8
|
+
|
|
9
|
+
## Props
|
|
10
|
+
|
|
11
|
+
| field | type | required | note |
|
|
12
|
+
|---|---|:---:|---|
|
|
13
|
+
| `items` | `TimelineItem[]` | ✓ | |
|
|
14
|
+
|
|
15
|
+
## Types
|
|
16
|
+
|
|
17
|
+
### `TimelineItem`
|
|
18
|
+
|
|
19
|
+
| field | type | required | note |
|
|
20
|
+
|---|---|:---:|---|
|
|
21
|
+
| `description` | `string \| undefined` | | |
|
|
22
|
+
| `id` | `string` | ✓ | |
|
|
23
|
+
| `time` | `string \| undefined` | | |
|
|
24
|
+
| `title` | `string` | ✓ | |
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
<!-- generated by scripts/generate-skill.mjs — do not edit -->
|
|
2
|
+
|
|
3
|
+
# AppShell
|
|
4
|
+
|
|
5
|
+
App frame: optional sidebar + header + main.
|
|
6
|
+
|
|
7
|
+
**when** Root layout for a mini-app page
|
|
8
|
+
|
|
9
|
+
`import { AppShell } from "@monkey-mini-app/ui"`
|
|
10
|
+
|
|
11
|
+
`packages/ui/src/blocks/app-shell.tsx` · blocks
|
|
12
|
+
|
|
13
|
+
## Props
|
|
14
|
+
|
|
15
|
+
| field | type | required | note |
|
|
16
|
+
|---|---|:---:|---|
|
|
17
|
+
| `children` | `ReactNode` | ✓ | |
|
|
18
|
+
| `className` | `string \| undefined` | | |
|
|
19
|
+
| `header` | `ReactNode` | | |
|
|
20
|
+
| `sidebar` | `ReactNode` | | |
|
|
21
|
+
|
|
22
|
+
## Example
|
|
23
|
+
|
|
24
|
+
```tsx
|
|
25
|
+
<AppShell sidebar={<nav />} header={<PageHeader title="Home" />}>
|
|
26
|
+
{children}
|
|
27
|
+
</AppShell>
|
|
28
|
+
```
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
<!-- generated by scripts/generate-skill.mjs — do not edit -->
|
|
2
|
+
|
|
3
|
+
# AttachmentGallery
|
|
4
|
+
|
|
5
|
+
`import { AttachmentGallery, GalleryFile } from "@monkey-mini-app/ui"`
|
|
6
|
+
|
|
7
|
+
`packages/ui/src/blocks/attachment-gallery.tsx` · blocks
|
|
8
|
+
|
|
9
|
+
## Props
|
|
10
|
+
|
|
11
|
+
| field | type | required | note |
|
|
12
|
+
|---|---|:---:|---|
|
|
13
|
+
| `files` | `GalleryFile[]` | ✓ | |
|
|
14
|
+
|
|
15
|
+
## Types
|
|
16
|
+
|
|
17
|
+
### `GalleryFile`
|
|
18
|
+
|
|
19
|
+
| field | type | required | note |
|
|
20
|
+
|---|---|:---:|---|
|
|
21
|
+
| `name` | `string` | ✓ | |
|
|
22
|
+
| `url` | `string \| undefined` | | |
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
<!-- generated by scripts/generate-skill.mjs — do not edit -->
|
|
2
|
+
|
|
3
|
+
# Autocomplete
|
|
4
|
+
|
|
5
|
+
`import { Autocomplete } from "@monkey-mini-app/ui"`
|
|
6
|
+
|
|
7
|
+
`packages/ui/src/composites/autocomplete.tsx` · composites
|
|
8
|
+
|
|
9
|
+
## Props
|
|
10
|
+
|
|
11
|
+
| field | type | required | note |
|
|
12
|
+
|---|---|:---:|---|
|
|
13
|
+
| `onChange` | `((value: string) => void) \| undefined` | | |
|
|
14
|
+
| `options` | `string[]` | ✓ | |
|
|
15
|
+
| `placeholder` | `string \| undefined` | | |
|
|
16
|
+
| `value` | `string \| undefined` | | |
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
<!-- generated by scripts/generate-skill.mjs — do not edit -->
|
|
2
|
+
|
|
3
|
+
# Cascader
|
|
4
|
+
|
|
5
|
+
`import { Cascader, CascaderNode } from "@monkey-mini-app/ui"`
|
|
6
|
+
|
|
7
|
+
`packages/ui/src/composites/cascader.tsx` · composites
|
|
8
|
+
|
|
9
|
+
## Props
|
|
10
|
+
|
|
11
|
+
| field | type | required | note |
|
|
12
|
+
|---|---|:---:|---|
|
|
13
|
+
| `onChange` | `((value: string[]) => void) \| undefined` | | |
|
|
14
|
+
| `options` | `CascaderNode[]` | ✓ | |
|
|
15
|
+
| `value` | `string[] \| undefined` | | |
|
|
16
|
+
|
|
17
|
+
## Types
|
|
18
|
+
|
|
19
|
+
### `CascaderNode`
|
|
20
|
+
|
|
21
|
+
| field | type | required | note |
|
|
22
|
+
|---|---|:---:|---|
|
|
23
|
+
| `children` | `CascaderNode[] \| undefined` | | |
|
|
24
|
+
| `label` | `string` | ✓ | |
|
|
25
|
+
| `value` | `string` | ✓ | |
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
<!-- generated by scripts/generate-skill.mjs — do not edit -->
|
|
2
|
+
|
|
3
|
+
# CodeBlock
|
|
4
|
+
|
|
5
|
+
`import { CodeBlock } from "@monkey-mini-app/ui"`
|
|
6
|
+
|
|
7
|
+
`packages/ui/src/products/code-block.tsx` · products
|
|
8
|
+
|
|
9
|
+
## Props
|
|
10
|
+
|
|
11
|
+
| field | type | required | note |
|
|
12
|
+
|---|---|:---:|---|
|
|
13
|
+
| `className` | `string \| undefined` | | |
|
|
14
|
+
| `code` | `string` | ✓ | |
|
|
15
|
+
| `language` | `string \| undefined` | | |
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
<!-- generated by scripts/generate-skill.mjs — do not edit -->
|
|
2
|
+
|
|
3
|
+
# CodeEditor
|
|
4
|
+
|
|
5
|
+
`import { CodeEditor } from "@monkey-mini-app/ui"`
|
|
6
|
+
|
|
7
|
+
`packages/ui/src/products/code-editor.tsx` · products
|
|
8
|
+
|
|
9
|
+
## Props
|
|
10
|
+
|
|
11
|
+
| field | type | required | note |
|
|
12
|
+
|---|---|:---:|---|
|
|
13
|
+
| `className` | `string \| undefined` | | |
|
|
14
|
+
| `height` | `string \| undefined` | | |
|
|
15
|
+
| `language` | `"js" \| "ts" \| "json" \| "html" \| "md" \| undefined` | | |
|
|
16
|
+
| `onChange` | `((value: string) => void) \| undefined` | | |
|
|
17
|
+
| `value` | `string` | ✓ | |
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
<!-- generated by scripts/generate-skill.mjs — do not edit -->
|
|
2
|
+
|
|
3
|
+
# ColorPicker
|
|
4
|
+
|
|
5
|
+
`import { ColorPicker } from "@monkey-mini-app/ui"`
|
|
6
|
+
|
|
7
|
+
`packages/ui/src/composites/color-picker.tsx` · composites
|
|
8
|
+
|
|
9
|
+
## Props
|
|
10
|
+
|
|
11
|
+
| field | type | required | note |
|
|
12
|
+
|---|---|:---:|---|
|
|
13
|
+
| `onChange` | `((value: string) => void) \| undefined` | | |
|
|
14
|
+
| `value` | `string \| undefined` | | |
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
<!-- generated by scripts/generate-skill.mjs — do not edit -->
|
|
2
|
+
|
|
3
|
+
# CommentThread
|
|
4
|
+
|
|
5
|
+
`import { CommentThread, Comment } from "@monkey-mini-app/ui"`
|
|
6
|
+
|
|
7
|
+
`packages/ui/src/blocks/comment-thread.tsx` · blocks
|
|
8
|
+
|
|
9
|
+
## Props
|
|
10
|
+
|
|
11
|
+
| field | type | required | note |
|
|
12
|
+
|---|---|:---:|---|
|
|
13
|
+
| `comments` | `Comment[]` | ✓ | |
|
|
14
|
+
|
|
15
|
+
## Types
|
|
16
|
+
|
|
17
|
+
### `Comment`
|
|
18
|
+
|
|
19
|
+
| field | type | required | note |
|
|
20
|
+
|---|---|:---:|---|
|
|
21
|
+
| `author` | `string` | ✓ | |
|
|
22
|
+
| `body` | `string` | ✓ | |
|
|
23
|
+
| `id` | `string` | ✓ | |
|
|
24
|
+
| `time` | `string \| undefined` | | |
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
<!-- generated by scripts/generate-skill.mjs — do not edit -->
|
|
2
|
+
|
|
3
|
+
# ConfirmDialog
|
|
4
|
+
|
|
5
|
+
`import { ConfirmDialog } from "@monkey-mini-app/ui"`
|
|
6
|
+
|
|
7
|
+
`packages/ui/src/composites/confirm-dialog.tsx` · composites
|
|
8
|
+
|
|
9
|
+
## Props
|
|
10
|
+
|
|
11
|
+
| field | type | required | note |
|
|
12
|
+
|---|---|:---:|---|
|
|
13
|
+
| `cancelLabel` | `string \| undefined` | | |
|
|
14
|
+
| `confirmLabel` | `string \| undefined` | | |
|
|
15
|
+
| `description` | `string \| undefined` | | |
|
|
16
|
+
| `onConfirm` | `() => void` | ✓ | |
|
|
17
|
+
| `onOpenChange` | `(open: boolean) => void` | ✓ | |
|
|
18
|
+
| `open` | `boolean` | ✓ | |
|
|
19
|
+
| `title` | `string` | ✓ | |
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
<!-- generated by scripts/generate-skill.mjs — do not edit -->
|
|
2
|
+
|
|
3
|
+
# Copyable
|
|
4
|
+
|
|
5
|
+
`import { Copyable } from "@monkey-mini-app/ui"`
|
|
6
|
+
|
|
7
|
+
`packages/ui/src/composites/copyable.tsx` · composites
|
|
8
|
+
|
|
9
|
+
## Props
|
|
10
|
+
|
|
11
|
+
| field | type | required | note |
|
|
12
|
+
|---|---|:---:|---|
|
|
13
|
+
| `value` | `string` | ✓ | |
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
<!-- generated by scripts/generate-skill.mjs — do not edit -->
|
|
2
|
+
|
|
3
|
+
# CurrencyInput
|
|
4
|
+
|
|
5
|
+
`import { CurrencyInput } from "@monkey-mini-app/ui"`
|
|
6
|
+
|
|
7
|
+
`packages/ui/src/composites/currency-input.tsx` · composites
|
|
8
|
+
|
|
9
|
+
## Props
|
|
10
|
+
|
|
11
|
+
| field | type | required | note |
|
|
12
|
+
|---|---|:---:|---|
|
|
13
|
+
| `currency` | `string \| undefined` | | |
|
|
14
|
+
| `onChange` | `((value: string) => void) \| undefined` | | |
|
|
15
|
+
| `value` | `string \| undefined` | | |
|