mdk-skills 2.2.16 → 2.2.17

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mdk-skills",
3
- "version": "2.2.16",
3
+ "version": "2.2.17",
4
4
  "description": "mdk-engineer - 沉稳靠谱的前端开发助手 Claude Skills 配置包,一键注入 .claude/ 技能目录和 CLAUDE.md 人设配置",
5
5
  "author": "XiaoMa",
6
6
  "license": "MIT",
@@ -1,7 +1,12 @@
1
1
  <template>
2
2
  <div class="dashboard">
3
3
  <!-- 仓库 README -->
4
- <n-collapse v-if="readmeContent" :default-expanded-names="['readme']" class="readme-collapse" :animated="false">
4
+ <n-collapse
5
+ v-if="readmeContent"
6
+ :default-expanded-names="['readme']"
7
+ class="readme-collapse"
8
+ :animated="false"
9
+ >
5
10
  <n-collapse-item title="仓库说明" name="readme">
6
11
  <div class="markdown-content" v-html="renderedReadme" />
7
12
  </n-collapse-item>
@@ -10,7 +15,9 @@
10
15
  <div class="page-header">
11
16
  <h2>技能列表</h2>
12
17
  <n-button size="small" @click="loadSkills">
13
- <template #icon><n-icon><RefreshOutline /></n-icon></template>
18
+ <template #icon
19
+ ><n-icon><RefreshOutline /></n-icon
20
+ ></template>
14
21
  刷新
15
22
  </n-button>
16
23
  </div>
@@ -38,14 +45,18 @@
38
45
  v-model:show="detailVisible"
39
46
  :title="detailSkill?.name || '技能详情'"
40
47
  preset="card"
41
- style="width: 720px;"
48
+ style="width: 720px"
42
49
  content-style="max-height: 65vh; overflow-y: auto; padding: 16px 24px; background: #fff;"
43
50
  :mask-closable="true"
44
51
  >
45
52
  <div v-if="detailLoading" class="detail-status">
46
53
  <n-spin />
47
54
  </div>
48
- <div v-else-if="detailContent" class="markdown-content" v-html="renderedDetail" />
55
+ <div
56
+ v-else-if="detailContent"
57
+ class="markdown-content"
58
+ v-html="renderedDetail"
59
+ />
49
60
  <n-empty v-else description="该技能没有 SKILL.md 文档" />
50
61
  </n-modal>
51
62
  </div>
@@ -74,8 +85,11 @@ marked.use({
74
85
  return `<pre><button class="copy-btn" onclick="navigator.clipboard.writeText(this.parentNode.querySelector('code').textContent);this.textContent='已复制';setTimeout(()=>this.textContent='复制',1500)">复制</button><code class="hljs language-${language}">${highlighted}</code></pre>`;
75
86
  },
76
87
  link({ href, text }) {
77
- const isExternal = href && (href.startsWith("http://") || href.startsWith("https://"));
78
- const target = isExternal ? ' target="_blank" rel="noopener noreferrer"' : "";
88
+ const isExternal =
89
+ href && (href.startsWith("http://") || href.startsWith("https://"));
90
+ const target = isExternal
91
+ ? ' target="_blank" rel="noopener noreferrer"'
92
+ : "";
79
93
  return `<a href="${href}"${target}>${text}</a>`;
80
94
  },
81
95
  },
@@ -128,8 +142,8 @@ async function loadReadme() {
128
142
  try {
129
143
  const res = await getReadme();
130
144
  if (res.content) {
131
- readmeContent.value = res.content;
132
145
  renderedReadme.value = renderMd(res.content);
146
+ readmeContent.value = res.content;
133
147
  }
134
148
  } catch {
135
149
  // 静默失败
@@ -198,4 +212,4 @@ onUnmounted(() => document.removeEventListener("visibilitychange", onFocus));
198
212
  justify-content: center;
199
213
  padding: 40px 0;
200
214
  }
201
- </style>
215
+ </style>
@@ -1,7 +1,12 @@
1
1
  <template>
2
2
  <div class="scene-switch">
3
3
  <!-- 技能说明文档 -->
4
- <n-collapse v-if="skillsReadmeContent" :default-expanded-names="['skills-readme']" class="readme-collapse" :animated="false">
4
+ <n-collapse
5
+ v-if="skillsReadmeContent"
6
+ :default-expanded-names="['skills-readme']"
7
+ class="readme-collapse"
8
+ :animated="false"
9
+ >
5
10
  <n-collapse-item title="技能说明" name="skills-readme">
6
11
  <div class="markdown-content" v-html="renderedSkillsReadme" />
7
12
  </n-collapse-item>
@@ -9,8 +14,15 @@
9
14
 
10
15
  <div class="page-header">
11
16
  <h2>场景切换</h2>
12
- <n-button v-if="!readonly" size="small" type="primary" @click="openCreate">
13
- <template #icon><n-icon><AddOutline /></n-icon></template>
17
+ <n-button
18
+ v-if="!readonly"
19
+ size="small"
20
+ type="primary"
21
+ @click="openCreate"
22
+ >
23
+ <template #icon
24
+ ><n-icon><AddOutline /></n-icon
25
+ ></template>
14
26
  新建场景
15
27
  </n-button>
16
28
  </div>
@@ -26,9 +38,16 @@
26
38
  size="small"
27
39
  >
28
40
  <template #header-extra>
29
- <n-space v-if="!readonly && profile.id !== 'custom' && profile.skills !== null" :size="4">
41
+ <n-space
42
+ v-if="
43
+ !readonly && profile.id !== 'custom' && profile.skills !== null
44
+ "
45
+ :size="4"
46
+ >
30
47
  <n-button size="tiny" quaternary @click="openEdit(profile)">
31
- <template #icon><n-icon size="16"><PencilOutline /></n-icon></template>
48
+ <template #icon
49
+ ><n-icon size="16"><PencilOutline /></n-icon
50
+ ></template>
32
51
  </n-button>
33
52
  <n-popconfirm
34
53
  :negative-text="'取消'"
@@ -37,7 +56,9 @@
37
56
  >
38
57
  <template #trigger>
39
58
  <n-button size="tiny" quaternary>
40
- <template #icon><n-icon size="16"><TrashOutline /></n-icon></template>
59
+ <template #icon
60
+ ><n-icon size="16"><TrashOutline /></n-icon
61
+ ></template>
41
62
  </n-button>
42
63
  </template>
43
64
  确定删除场景「{{ profile.name }}」?
@@ -82,7 +103,12 @@
82
103
  </n-spin>
83
104
 
84
105
  <!-- 自定义勾选弹窗 -->
85
- <n-modal v-model:show="showCustom" title="自定义技能组合" preset="card" style="width: 480px">
106
+ <n-modal
107
+ v-model:show="showCustom"
108
+ title="自定义技能组合"
109
+ preset="card"
110
+ style="width: 480px"
111
+ >
86
112
  <n-checkbox-group v-model:value="customSelected">
87
113
  <n-space vertical>
88
114
  <n-checkbox
@@ -94,7 +120,11 @@
94
120
  </n-space>
95
121
  </n-checkbox-group>
96
122
  <template #footer>
97
- <n-button type="primary" :loading="customLoading" @click="onApplyCustom">
123
+ <n-button
124
+ type="primary"
125
+ :loading="customLoading"
126
+ @click="onApplyCustom"
127
+ >
98
128
  确认安装
99
129
  </n-button>
100
130
  </template>
@@ -197,8 +227,11 @@ marked.use({
197
227
  return `<pre><button class="copy-btn" onclick="navigator.clipboard.writeText(this.parentNode.querySelector('code').textContent);this.textContent='已复制';setTimeout(()=>this.textContent='复制',1500)">复制</button><code class="hljs language-${language}">${highlighted}</code></pre>`;
198
228
  },
199
229
  link({ href, text }) {
200
- const isExternal = href && (href.startsWith("http://") || href.startsWith("https://"));
201
- const target = isExternal ? ' target="_blank" rel="noopener noreferrer"' : "";
230
+ const isExternal =
231
+ href && (href.startsWith("http://") || href.startsWith("https://"));
232
+ const target = isExternal
233
+ ? ' target="_blank" rel="noopener noreferrer"'
234
+ : "";
202
235
  return `<a href="${href}"${target}>${text}</a>`;
203
236
  },
204
237
  },
@@ -257,8 +290,8 @@ async function loadSkillsReadme() {
257
290
  try {
258
291
  const res = await getSkillsReadme();
259
292
  if (res.content) {
260
- skillsReadmeContent.value = res.content;
261
293
  renderedSkillsReadme.value = renderMd(res.content);
294
+ skillsReadmeContent.value = res.content;
262
295
  }
263
296
  } catch {
264
297
  // 静默失败
@@ -301,7 +334,9 @@ function openEdit(profile) {
301
334
  }
302
335
 
303
336
  function openCustomDialog() {
304
- customSelected.value = allSkills.value.filter((s) => s.enabled).map((s) => s.name);
337
+ customSelected.value = allSkills.value
338
+ .filter((s) => s.enabled)
339
+ .map((s) => s.name);
305
340
  showCustom.value = true;
306
341
  }
307
342