dsh-featherhunter-plugin-base 0.0.0-stage → 0.0.1
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/LICENSE +21 -0
- package/README.md +46 -2
- package/data/img/card-feishu.png +0 -0
- package/data/img/card-qq.png +0 -0
- package/data/img/card-wechat-2026-10-23.png +0 -0
- package/data/img/qr-feishu.png +0 -0
- package/data/img/qr-qq.png +0 -0
- package/data/img/qr-wechat-2026-10-23.png +0 -0
- package/data/manifest.json +158 -0
- package/dist/client/index.d.ts +13 -0
- package/dist/client/index.js +826 -0
- package/dist/client/modal.d.ts +28 -0
- package/dist/client/plugins.d.ts +44 -0
- package/dist/client/styles.d.ts +13 -0
- package/dist/client/texts.d.ts +11 -0
- package/dist/client/types.d.ts +85 -0
- package/dist/core/baseline.d.ts +2 -0
- package/dist/core/index.d.ts +40 -0
- package/dist/core/index.js +358 -0
- package/dist/core/types.d.ts +84 -0
- package/dist/node/cli.d.ts +2 -0
- package/dist/node/cli.js +67 -0
- package/dist/node/index.d.ts +40 -0
- package/dist/node/index.js +859 -0
- package/dist/node/readme-compare.d.ts +199 -0
- package/dist/node/types.d.ts +37 -0
- package/package.json +72 -4
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 FeatherHunter
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,3 +1,47 @@
|
|
|
1
|
-
#
|
|
1
|
+
# dsh-featherhunter-plugin-base
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
FeatherHunter DSH 插件共用的基础包:设置面板里的**联系作者弹窗 / 作者插件推荐卡**,
|
|
4
|
+
以及 **README 四块内容**(联系区、star 历史、致谢、MORE)的渲染与同步工具。
|
|
5
|
+
|
|
6
|
+
- 纯 ESM,零运行时依赖,单包三入口。
|
|
7
|
+
- `./client` 不 import React:宿主把 React 传进 `createBaseUI(React, options)`,共享宿主的 reconciler。
|
|
8
|
+
- 数据唯一真源在仓库 `contact/`,构建后发布为 `data/manifest.json` + `data/img/`,经 npm CDN 分发。
|
|
9
|
+
- 首次渲染用包内置基线(飞书 + QQ),随后回源更新;二维码过期时降级为链接。
|
|
10
|
+
|
|
11
|
+
## 入口
|
|
12
|
+
|
|
13
|
+
| 入口 | 内容 |
|
|
14
|
+
| --- | --- |
|
|
15
|
+
| `dsh-featherhunter-plugin-base/core` | 类型、manifest 校验、排序 / 语言 / 有效期工具、内置基线 |
|
|
16
|
+
| `dsh-featherhunter-plugin-base/client` | `createBaseUI(React, options)`:`ContactButton` / `ContactRow` / `AuthorPlugins` / `openContactModal` / `closeContactModal` / `preloadContent` |
|
|
17
|
+
| `dsh-featherhunter-plugin-base/node` | README 四块渲染器 + `verifyBlock` + CLI(`readme:init` / `readme:sync` / `contact:update` / `doctor`) |
|
|
18
|
+
|
|
19
|
+
## 使用
|
|
20
|
+
|
|
21
|
+
```ts
|
|
22
|
+
import { createBaseUI } from "dsh-featherhunter-plugin-base/client";
|
|
23
|
+
|
|
24
|
+
const base = createBaseUI(React, { lang: "zh", selfId: "deck" });
|
|
25
|
+
// <base.ContactButton /> / <base.AuthorPlugins />
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
```sh
|
|
29
|
+
npx dsh-base readme:sync --check
|
|
30
|
+
npx dsh-base doctor
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
## 开发
|
|
34
|
+
|
|
35
|
+
```sh
|
|
36
|
+
npm install
|
|
37
|
+
npm run typecheck
|
|
38
|
+
npm test
|
|
39
|
+
npm run build
|
|
40
|
+
npm run build:demo # demo/index.html 可直接用浏览器打开
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
数据从源图到发布清单的完整流程见票 03;CDN 分发与回滚见票 02。
|
|
44
|
+
|
|
45
|
+
## License
|
|
46
|
+
|
|
47
|
+
MIT
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schema": 1,
|
|
3
|
+
"version": "0.0.1",
|
|
4
|
+
"revision": 1,
|
|
5
|
+
"updatedAt": "2026-10-23T00:00:00+08:00",
|
|
6
|
+
"fallbackUrl": "https://github.com/FeatherHunter/featherhunter-plugin-manage",
|
|
7
|
+
"groups": [
|
|
8
|
+
{
|
|
9
|
+
"id": "feishu",
|
|
10
|
+
"platform": "feishu",
|
|
11
|
+
"order": 10,
|
|
12
|
+
"readmeTitle": {
|
|
13
|
+
"zh": "飞书群(主)",
|
|
14
|
+
"en": "Feishu Group (Main)"
|
|
15
|
+
},
|
|
16
|
+
"alt": {
|
|
17
|
+
"zh": "DSH 插件交流群 飞书群二维码",
|
|
18
|
+
"en": "DSH plugin community group Feishu QR code"
|
|
19
|
+
},
|
|
20
|
+
"card": "card-feishu.png",
|
|
21
|
+
"qr": {
|
|
22
|
+
"kind": "remote",
|
|
23
|
+
"path": "qr-feishu.png"
|
|
24
|
+
},
|
|
25
|
+
"title": {
|
|
26
|
+
"zh": "DSH 插件交流群",
|
|
27
|
+
"en": "DSH Plugin Community"
|
|
28
|
+
},
|
|
29
|
+
"subtitle": {
|
|
30
|
+
"zh": "用户418832的组织",
|
|
31
|
+
"en": "User 418832's organization"
|
|
32
|
+
},
|
|
33
|
+
"note": {
|
|
34
|
+
"zh": "该二维码永久有效",
|
|
35
|
+
"en": "This QR code never expires"
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
"id": "qq",
|
|
40
|
+
"platform": "qq",
|
|
41
|
+
"order": 20,
|
|
42
|
+
"readmeTitle": {
|
|
43
|
+
"zh": "QQ群(新)",
|
|
44
|
+
"en": "QQ Group (New)"
|
|
45
|
+
},
|
|
46
|
+
"alt": {
|
|
47
|
+
"zh": "DSH 插件交流群 QQ 群二维码",
|
|
48
|
+
"en": "DSH plugin community group QQ QR code"
|
|
49
|
+
},
|
|
50
|
+
"card": "card-qq.png",
|
|
51
|
+
"qr": {
|
|
52
|
+
"kind": "remote",
|
|
53
|
+
"path": "qr-qq.png"
|
|
54
|
+
},
|
|
55
|
+
"title": {
|
|
56
|
+
"zh": "DSH 插件交流群",
|
|
57
|
+
"en": "DSH Plugin Community"
|
|
58
|
+
},
|
|
59
|
+
"subtitle": {
|
|
60
|
+
"zh": "群号:1020866453",
|
|
61
|
+
"en": "Group ID: 1020866453"
|
|
62
|
+
},
|
|
63
|
+
"note": {
|
|
64
|
+
"zh": "扫一扫二维码,加入群聊",
|
|
65
|
+
"en": "Scan the QR code to join the group chat"
|
|
66
|
+
}
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
"id": "wechat",
|
|
70
|
+
"platform": "wechat",
|
|
71
|
+
"order": 30,
|
|
72
|
+
"readmeTitle": {
|
|
73
|
+
"zh": "微信群(新)",
|
|
74
|
+
"en": "WeChat Group (New)"
|
|
75
|
+
},
|
|
76
|
+
"alt": {
|
|
77
|
+
"zh": "DSH 插件交流群微信群二维码",
|
|
78
|
+
"en": "DSH plugin community group WeChat QR code"
|
|
79
|
+
},
|
|
80
|
+
"card": "card-wechat-2026-10-23.png",
|
|
81
|
+
"qr": {
|
|
82
|
+
"kind": "remote",
|
|
83
|
+
"path": "qr-wechat-2026-10-23.png"
|
|
84
|
+
},
|
|
85
|
+
"title": {
|
|
86
|
+
"zh": "DSH 插件交流群",
|
|
87
|
+
"en": "DSH Plugin Community"
|
|
88
|
+
},
|
|
89
|
+
"subtitle": {
|
|
90
|
+
"zh": "群聊:DSH 插件交流群",
|
|
91
|
+
"en": "Group chat: DSH Plugin Community"
|
|
92
|
+
},
|
|
93
|
+
"validUntil": "2026-10-30"
|
|
94
|
+
}
|
|
95
|
+
],
|
|
96
|
+
"plugins": [
|
|
97
|
+
{
|
|
98
|
+
"id": "deck",
|
|
99
|
+
"order": 10,
|
|
100
|
+
"verifiedAt": "2026-10-30",
|
|
101
|
+
"name": "dsh-mattpocock-skills-deck",
|
|
102
|
+
"repo": "FeatherHunter/dsh-mattpocock-skills-deck",
|
|
103
|
+
"desc": {
|
|
104
|
+
"zh": "近 30 万 star 的 mattpocock/skills 整套预置好(27 个技能),装好即用。",
|
|
105
|
+
"en": "The whole mattpocock/skills set (nearly 300k stars) preinstalled — 27 skills, ready as soon as it is installed."
|
|
106
|
+
},
|
|
107
|
+
"url": "https://github.com/FeatherHunter/dsh-mattpocock-skills-deck"
|
|
108
|
+
},
|
|
109
|
+
{
|
|
110
|
+
"id": "prompt",
|
|
111
|
+
"order": 20,
|
|
112
|
+
"verifiedAt": "2026-10-30",
|
|
113
|
+
"name": "dsh-prompt",
|
|
114
|
+
"repo": "FeatherHunter/dsh-prompt",
|
|
115
|
+
"desc": {
|
|
116
|
+
"zh": "经常反复重复的模板化提示词,存成自定义模板,选中后直接注入,不再需要耗费精力。",
|
|
117
|
+
"en": "The boilerplate prompts you keep retyping, saved as custom templates and injected on selection — no more wasted effort."
|
|
118
|
+
},
|
|
119
|
+
"url": "https://github.com/FeatherHunter/dsh-prompt"
|
|
120
|
+
},
|
|
121
|
+
{
|
|
122
|
+
"id": "palette",
|
|
123
|
+
"order": 30,
|
|
124
|
+
"verifiedAt": "2026-10-30",
|
|
125
|
+
"name": "dsh-opencode-palette",
|
|
126
|
+
"repo": "FeatherHunter/dsh-opencode-palette",
|
|
127
|
+
"desc": {
|
|
128
|
+
"zh": "38 款 opencode 经典配色 + 20+自定义主题 一键换装 DSH。",
|
|
129
|
+
"en": "38 classic opencode themes + 20+ custom themes — reskin DSH in one click."
|
|
130
|
+
},
|
|
131
|
+
"url": "https://github.com/FeatherHunter/dsh-opencode-palette"
|
|
132
|
+
},
|
|
133
|
+
{
|
|
134
|
+
"id": "im",
|
|
135
|
+
"order": 40,
|
|
136
|
+
"verifiedAt": "2026-10-30",
|
|
137
|
+
"name": "dsh-im-companion",
|
|
138
|
+
"repo": "FeatherHunter/dsh-im-companion",
|
|
139
|
+
"desc": {
|
|
140
|
+
"zh": "给 dsh-im 加了「助理」和「家」的概念。",
|
|
141
|
+
"en": "Adds the ideas of an “assistant” and a “home” to dsh-im."
|
|
142
|
+
},
|
|
143
|
+
"url": "https://github.com/FeatherHunter/dsh-im-companion"
|
|
144
|
+
},
|
|
145
|
+
{
|
|
146
|
+
"id": "ilife",
|
|
147
|
+
"order": 50,
|
|
148
|
+
"verifiedAt": "2026-10-30",
|
|
149
|
+
"name": "ilife",
|
|
150
|
+
"repo": "FeatherHunter/ilife",
|
|
151
|
+
"desc": {
|
|
152
|
+
"zh": "⚠️建设中⚠️爱生活:居家生活套件,记账、运动、饮食、体重、食谱、物品管理、作息规划、备忘录等。",
|
|
153
|
+
"en": "⚠️Work in progress⚠️ iLife, the home-life suite: bookkeeping, exercise, diet, weight, recipes, item management, schedule planning, memos and more."
|
|
154
|
+
},
|
|
155
|
+
"url": "https://github.com/FeatherHunter/ilife"
|
|
156
|
+
}
|
|
157
|
+
]
|
|
158
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type * as ReactNamespace from "react";
|
|
2
|
+
import type { BaseUI, BaseUIOptions } from "./types";
|
|
3
|
+
export type * from "./types";
|
|
4
|
+
/**
|
|
5
|
+
* Build the settings-panel widgets bound to the injected React runtime.
|
|
6
|
+
*
|
|
7
|
+
* The client bundle never imports React: the host passes its own copy so this
|
|
8
|
+
* package shares the host's reconciler and context.
|
|
9
|
+
*/
|
|
10
|
+
export declare function createBaseUI(React: typeof ReactNamespace, options?: BaseUIOptions): BaseUI;
|
|
11
|
+
export { BASE_CSS, BASE_STYLE_ID, ensureBaseStyles } from "./styles";
|
|
12
|
+
export { MESSAGES, resolveText } from "./texts";
|
|
13
|
+
export type { TextKey, TextOverrides } from "./texts";
|