dsh-plugin-deck-studio 0.2.10 → 0.2.13
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/assets/icon.svg +13 -0
- package/client.js +39 -15
- package/index.js +538 -20
- package/lib/config.js +16 -12
- package/lib/data-dir-detect.js +381 -0
- package/lib/data-dir.js +288 -0
- package/package.json +3 -1
- package/seeds/docs/assets/screenshots/f192-01-plugin-icon.png +0 -0
- package/seeds/docs/assets/screenshots/f192-02-icon-sizes.png +0 -0
- package/seeds/docs/assets/screenshots/f197-01-deckline-entry.png +0 -0
- package/seeds/docs/assets/screenshots/f197-02-deckline-icon.png +0 -0
- package/seeds/docs/install.en.md +63 -5
- package/seeds/docs/install.md +66 -6
- package/ui/workbench.css +38 -0
- package/ui/workbench.html +913 -15
package/assets/icon.svg
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64" width="512" height="512">
|
|
2
|
+
<defs>
|
|
3
|
+
<linearGradient id="dlbg" x1="4" y1="2" x2="60" y2="62" gradientUnits="userSpaceOnUse"><stop stop-color="#0e5563"/><stop offset="1" stop-color="#08343d"/></linearGradient>
|
|
4
|
+
<linearGradient id="dlgold" x1="40" y1="8" x2="58" y2="26" gradientUnits="userSpaceOnUse"><stop stop-color="#e8b45c"/><stop offset="1" stop-color="#c5882f"/></linearGradient>
|
|
5
|
+
<linearGradient id="dlcard" x1="18" y1="16" x2="50" y2="44" gradientUnits="userSpaceOnUse"><stop stop-color="#fffdf8"/><stop offset="1" stop-color="#efe8d9"/></linearGradient>
|
|
6
|
+
</defs>
|
|
7
|
+
<rect width="64" height="64" rx="16" fill="url(#dlbg)"/>
|
|
8
|
+
<rect x="15" y="26" width="34" height="21" rx="3.5" fill="#faf8f2" opacity=".55" transform="rotate(-5 32 36.5)"/>
|
|
9
|
+
<rect x="17" y="17" width="34" height="22" rx="3.5" fill="url(#dlcard)"/>
|
|
10
|
+
<rect x="22" y="23" width="19" height="3.2" rx="1.6" fill="#0f6975"/>
|
|
11
|
+
<rect x="22" y="29" width="12" height="2.8" rx="1.4" fill="#1496a8" opacity=".85"/>
|
|
12
|
+
<path d="M48.5 8.5l2.5 6 6 2.5-6 2.5-2.5 6-2.5-6-6-2.5 6-2.5z" fill="url(#dlgold)"/>
|
|
13
|
+
</svg>
|
package/client.js
CHANGED
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
* 数据全部由宿主半聚合好(浏览器半只做展示,不重算业务口径)。
|
|
6
6
|
*
|
|
7
7
|
* 形态:主区「Deck 工作台」面板(iframe 复用 /api/deck-studio.app?embed=1)。
|
|
8
|
-
*
|
|
9
|
-
* 不再注册右侧 dockkit 观测标签页(F-63
|
|
8
|
+
* 启动后自动打开(零点击进入),侧栏只保留一个带图标的「Deckline」面板入口(与其它插件同形态);
|
|
9
|
+
* 不再注册右侧 dockkit 观测标签页(F-63:入口太多且丑),也不再占用侧栏脚部按钮。
|
|
10
10
|
* 宿主没有 layout 主区面板契约时降级为 main 面板 + sidebar.panellist。
|
|
11
11
|
*
|
|
12
12
|
* Chatbox 说明(ADR-0006 D1):对话入口就是 DSH 原生 Chat——选择
|
|
@@ -235,9 +235,34 @@ div[data-sidebar-collapsed]{grid-template-columns:0px minmax(0px,1fr) 0px!import
|
|
|
235
235
|
);
|
|
236
236
|
}
|
|
237
237
|
|
|
238
|
-
/**
|
|
239
|
-
function DeckGlyph() {
|
|
240
|
-
|
|
238
|
+
/** 侧栏图标(panellist 行用):叠卡片 + 星芒,单色 currentColor,跟随主题深浅色。 */
|
|
239
|
+
function DeckGlyph({ size }) {
|
|
240
|
+
const edge = size || 16;
|
|
241
|
+
return h("svg", {
|
|
242
|
+
width: edge,
|
|
243
|
+
height: edge,
|
|
244
|
+
viewBox: "0 0 16 16",
|
|
245
|
+
fill: "none",
|
|
246
|
+
"aria-hidden": "true",
|
|
247
|
+
style: { display: "block" },
|
|
248
|
+
},
|
|
249
|
+
h("rect", {
|
|
250
|
+
x: 4.8, y: 2.4, width: 8.2, height: 6.2, rx: 1.5,
|
|
251
|
+
stroke: "currentColor", strokeWidth: 1.2, opacity: 0.55,
|
|
252
|
+
}),
|
|
253
|
+
h("rect", {
|
|
254
|
+
x: 2.4, y: 5.2, width: 9.2, height: 6.8, rx: 1.6,
|
|
255
|
+
stroke: "currentColor", strokeWidth: 1.35,
|
|
256
|
+
}),
|
|
257
|
+
h("path", {
|
|
258
|
+
d: "M4.6 7.6h4.6M4.6 9.6h3",
|
|
259
|
+
stroke: "currentColor", strokeWidth: 1.2, strokeLinecap: "round",
|
|
260
|
+
}),
|
|
261
|
+
h("path", {
|
|
262
|
+
d: "M12.5 9.9l.45 1.15 1.15.45-1.15.45-.45 1.15-.45-1.15-1.15-.45 1.15-.45z",
|
|
263
|
+
fill: "currentColor",
|
|
264
|
+
}),
|
|
265
|
+
);
|
|
241
266
|
}
|
|
242
267
|
|
|
243
268
|
function MainPanel() {
|
|
@@ -535,17 +560,16 @@ div[data-sidebar-collapsed]{grid-template-columns:0px minmax(0px,1fr) 0px!import
|
|
|
535
560
|
return () => window.clearTimeout(timer);
|
|
536
561
|
}, "deck-studio: auto-open workbench");
|
|
537
562
|
|
|
538
|
-
//
|
|
563
|
+
// 唯一入口:侧栏面板行「Deckline」(与 plugins / schedules 等插件同一种形态,带图标);
|
|
564
|
+
// → 对话用工作台里的「← 回到对话」。
|
|
539
565
|
if (hasRightbar) {
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
ctx.slots.
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
"deck-studio: workbench footer button",
|
|
548
|
-
);
|
|
566
|
+
if (layout?.selectPanel) {
|
|
567
|
+
ctx.effect(
|
|
568
|
+
() => ctx.slots.inject("sidebar.panellist", () =>
|
|
569
|
+
ctx.slots.register({ name: "sidebar.panellist", id: WORKBENCH_KEY, order: 46, label: () => "Deckline" }, DeckGlyph)),
|
|
570
|
+
"deck-studio: workbench sidebar entry",
|
|
571
|
+
);
|
|
572
|
+
}
|
|
549
573
|
ctx.logger?.info?.("deck-studio client: workbench-only mode");
|
|
550
574
|
} else {
|
|
551
575
|
ctx.effect(
|