dsh-prompt-templates 1.0.0 → 1.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/client.js CHANGED
@@ -1,9 +1,9 @@
1
- // dsh-prompt-templates —— 浏览器半:pi-web-ui 提示词模板 UI 的移植。
1
+ // dsh-prompt-templates —— 浏览器半:提示词模板面板。
2
2
  //
3
- // 来源:xing-shuyin/pi-web-ui web/src/components/PromptTemplates.tsx(MIT)
4
- // 卡片网格 / 选择器弹窗 / 编辑弹窗 / 恢复默认 / 内置可移出 —— 结构与交互保持一致;
5
- // 仅把 pi-web 专有的 useT、appUrl、appSend、react-icons、recordModelUsage 换成
6
- // dsh 的等价物(翻译表、相对 URL、inputActions.setDraft、内联 SVG)。
3
+ // 结构:卡片网格 / 选择器弹窗 / 编辑弹窗 / 恢复默认。
4
+ // 内置模板可移出并在「恢复默认」后找回;分类与折叠状态持久化在宿主侧。
5
+ // 面板通过宿主 HTTP 端点读写数据,通过 inputActions 写入输入框,
6
+ // 图标为内联 SVG,翻译由内置字典处理,不引入额外依赖。
7
7
  //
8
8
  // 注册位置:
9
9
  // conversation.input.left -> 图标按钮(输入框工具行左侧,dsh 为插件保留的空位)
@@ -197,7 +197,7 @@ window.__ModuleLoader__.load({
197
197
  }
198
198
 
199
199
  // ---------------------------------------------------------------- icons
200
- // pi-web 用 react-icons/fi;这里用等价的线性 SVG,避免额外依赖。
200
+ // 图标为内联线性 SVG,避免额外依赖。
201
201
  function svg(paths, size) {
202
202
  return function Icon(props) {
203
203
  return h(
@@ -264,7 +264,7 @@ window.__ModuleLoader__.load({
264
264
  }
265
265
 
266
266
  // ---------------------------------------------------------------- styles
267
- // pi-web-ui 的原始规则;变量层把 --text/--border/--accent… 映射到 dsh 主题 token。
267
+ // 视觉规则;变量层把 --text/--border/--accent… 映射到 dsh 主题 token。
268
268
  // ---------------------------------------------------------------- styles
269
269
  // Liquid Glass:半透明玻璃面板 + 内层轻玻璃卡片 + 统一圆角与柔和动效。
270
270
  // 颜色全部走 dsh 主题 token,明暗主题自动跟随;不支持 backdrop-filter 时降级为更实的底色。
@@ -324,7 +324,7 @@ window.__ModuleLoader__.load({
324
324
  '--lg-ease: cubic-bezier(.22,.61,.36,1)',
325
325
  '--lg-dur: 220ms',
326
326
 
327
- // pi-web 变量名别名,兼容既有规则
327
+ // 旧变量名别名,保持既有规则兼容
328
328
  '--text: var(--lg-text)',
329
329
  '--text-dim: var(--lg-text-dim)',
330
330
  '--text-faint: var(--lg-text-faint)',
@@ -625,7 +625,7 @@ window.__ModuleLoader__.load({
625
625
  }, [])
626
626
  }
627
627
 
628
- /** 有效模板 = 内置(未移出,应用覆盖)+ 自定义。与 pi-web 的 useMemo 同构。 */
628
+ /** 有效模板 = 内置(未移出,应用覆盖)+ 自定义。 */
629
629
  function computeTemplates(items, builtin) {
630
630
  var overrides = new Map()
631
631
  var hidden = new Set()
@@ -1389,7 +1389,7 @@ window.__ModuleLoader__.load({
1389
1389
  }
1390
1390
 
1391
1391
  // ---------------------------------------------------------------- 面板主体
1392
- /** 一个面板实例 = 选择器弹窗 + 编辑弹窗状态;pi-web 的 TemplateProvider 等价物。 */
1392
+ /** 一个面板实例 = 选择器弹窗 + 编辑弹窗状态。 */
1393
1393
  // ---------------------------------------------------------------- 分类管理
1394
1394
  function CategoryManager(props) {
1395
1395
  var categories = props.categories
package/locale/en.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "meta": {
3
3
  "title": "Prompt Templates",
4
- "description": "A prompt template library ported from pi-web-ui: open the card grid from the composer icon and fill a template with one click; ships 25 engineering workflow templates with create, edit, remove and reset."
4
+ "description": "Open a template panel from the composer icon: category groups with collapse, 34 built-in templates (9 AI-coding mindset shortcuts), search, filters, favorites, editing and AI-assisted classification."
5
5
  }
6
6
  }
package/locale/zh.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "meta": {
3
3
  "title": "提示词模板",
4
- "description": "移植自 pi-web-ui 的提示词模板库:输入框左侧图标打开模板卡片,点卡片一键填入;内置 25 条工程工作流模板,可新建、编辑、移出与恢复默认。"
4
+ "description": "输入框左侧图标打开模板面板:按分类折叠分组,内置 34 条模板(含 9 条 AI Coding 思维快捷键),支持搜索筛选、收藏、编辑与 AI 自动归类。"
5
5
  }
6
6
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-prompt-templates",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
4
4
  "type": "module",
5
5
  "description": "DSH 提示词模板库:分类折叠、搜索筛选、收藏、AI 智能归类,内置 34 条模板(含 9 条 AI Coding 思维快捷键);Liquid Glass 材质。",
6
6
  "license": "MIT",