@rooode/dsh-plugin-preview 0.1.18 → 0.1.19
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/lib/client.js +27 -22
- package/lib/index.js +1 -1
- package/package.json +1 -1
package/lib/client.js
CHANGED
|
@@ -27,10 +27,10 @@
|
|
|
27
27
|
const STORAGE_KEY_TREE_OPEN = 'dsh:preview:tree:open:v1';
|
|
28
28
|
const STORAGE_KEY_TREE_WIDTH = 'dsh:preview:tree:width:v1';
|
|
29
29
|
const STORAGE_KEY_MANUAL_WS = 'dsh:preview:manual_workspace:v1';
|
|
30
|
-
const DEFAULT_PANEL_WIDTH =
|
|
30
|
+
const DEFAULT_PANEL_WIDTH = 700;
|
|
31
31
|
const MIN_PANEL_WIDTH = 380;
|
|
32
|
-
const DEFAULT_TREE_WIDTH =
|
|
33
|
-
const MIN_TREE_WIDTH =
|
|
32
|
+
const DEFAULT_TREE_WIDTH = 220;
|
|
33
|
+
const MIN_TREE_WIDTH = 170;
|
|
34
34
|
const MAX_TREE_WIDTH = 450;
|
|
35
35
|
const SUPPORTED_EXTENSIONS = new Set([
|
|
36
36
|
'.md', '.markdown', '.mdown', '.mkdn', '.mdwn',
|
|
@@ -3437,13 +3437,6 @@
|
|
|
3437
3437
|
h('div', { className: 'dsh-preview-toolbar' },
|
|
3438
3438
|
// Left: View mode toggles
|
|
3439
3439
|
h('div', { className: 'dsh-preview-toolbar-left' },
|
|
3440
|
-
h('button', {
|
|
3441
|
-
type: 'button',
|
|
3442
|
-
className: `dsh-preview-tool-btn ${isTreeOpen ? 'active' : ''}`,
|
|
3443
|
-
onClick: onToggleTree,
|
|
3444
|
-
title: isTreeOpen ? '隐藏工作区目录树 (Ctrl/Cmd+B)' : '展开工作区目录树 (Ctrl/Cmd+B)',
|
|
3445
|
-
}, '🗂️ 目录树'),
|
|
3446
|
-
|
|
3447
3440
|
// Adaptive View Mode buttons based on File Category
|
|
3448
3441
|
category === 'markdown' ? (
|
|
3449
3442
|
h('div', { className: 'dsh-preview-mode-group' },
|
|
@@ -4337,19 +4330,28 @@
|
|
|
4337
4330
|
}
|
|
4338
4331
|
|
|
4339
4332
|
/* Side-by-Side Right Sidebar Layout Integration */
|
|
4340
|
-
body.dsh-preview-sidebar-active div[class*="
|
|
4341
|
-
|
|
4342
|
-
max-width: calc(100% - var(--dsh-preview-width,
|
|
4333
|
+
body.dsh-preview-sidebar-active div[class*="frame"] {
|
|
4334
|
+
width: calc(100% - var(--dsh-preview-width, 700px)) !important;
|
|
4335
|
+
max-width: calc(100% - var(--dsh-preview-width, 700px)) !important;
|
|
4343
4336
|
box-sizing: border-box !important;
|
|
4344
|
-
transition:
|
|
4337
|
+
transition: width 0.18s cubic-bezier(0.16, 1, 0.3, 1), max-width 0.18s cubic-bezier(0.16, 1, 0.3, 1) !important;
|
|
4345
4338
|
}
|
|
4346
|
-
body.dsh-preview-sidebar-active.dsh-preview-maximized div[class*="
|
|
4339
|
+
body.dsh-preview-sidebar-active.dsh-preview-maximized div[class*="frame"] {
|
|
4347
4340
|
display: none !important;
|
|
4348
4341
|
}
|
|
4349
4342
|
body.dsh-preview-sidebar-active.dsh-preview-maximized .dsh-preview-drawer-container {
|
|
4350
4343
|
width: 100vw !important;
|
|
4351
4344
|
}
|
|
4352
4345
|
|
|
4346
|
+
/* Shift Right Activity Rail to dock on the preview sidebar left border when open */
|
|
4347
|
+
body.dsh-preview-sidebar-active .dsh-right-activity-rail {
|
|
4348
|
+
right: var(--dsh-preview-width, 700px) !important;
|
|
4349
|
+
transition: right 0.18s cubic-bezier(0.16, 1, 0.3, 1) !important;
|
|
4350
|
+
}
|
|
4351
|
+
body.dsh-preview-sidebar-active.dsh-preview-maximized .dsh-right-activity-rail {
|
|
4352
|
+
display: none !important;
|
|
4353
|
+
}
|
|
4354
|
+
|
|
4353
4355
|
/* Workspace Switcher Header & Popover */
|
|
4354
4356
|
.dsh-tree-sidebar-title.dsh-tree-title-clickable {
|
|
4355
4357
|
cursor: pointer;
|
|
@@ -4746,15 +4748,18 @@
|
|
|
4746
4748
|
display: flex;
|
|
4747
4749
|
align-items: center;
|
|
4748
4750
|
justify-content: space-between;
|
|
4749
|
-
padding:
|
|
4751
|
+
padding: 4px 8px;
|
|
4750
4752
|
height: 38px;
|
|
4751
4753
|
min-height: 38px;
|
|
4752
4754
|
flex-shrink: 0;
|
|
4753
4755
|
background: var(--dsw-alias-bg-layer-2, #f8fafc);
|
|
4754
4756
|
border-bottom: 1px solid var(--dsw-alias-border-l2, #e2e8f0);
|
|
4755
|
-
gap:
|
|
4757
|
+
gap: 6px;
|
|
4756
4758
|
box-sizing: border-box;
|
|
4759
|
+
overflow-x: auto;
|
|
4760
|
+
scrollbar-width: none;
|
|
4757
4761
|
}
|
|
4762
|
+
.dsh-preview-toolbar::-webkit-scrollbar { display: none; }
|
|
4758
4763
|
body[data-ds-dark-theme] .dsh-preview-toolbar {
|
|
4759
4764
|
background: var(--dsw-alias-bg-layer-2, #161a24);
|
|
4760
4765
|
border-bottom-color: var(--dsw-alias-border-l2, #252d3d);
|
|
@@ -4763,7 +4768,7 @@
|
|
|
4763
4768
|
.dsh-preview-toolbar-right {
|
|
4764
4769
|
display: flex;
|
|
4765
4770
|
align-items: center;
|
|
4766
|
-
gap:
|
|
4771
|
+
gap: 4px;
|
|
4767
4772
|
flex-shrink: 0;
|
|
4768
4773
|
white-space: nowrap;
|
|
4769
4774
|
}
|
|
@@ -4785,7 +4790,7 @@
|
|
|
4785
4790
|
border: none;
|
|
4786
4791
|
color: var(--dsw-alias-label-secondary, #64748b);
|
|
4787
4792
|
font-size: 11px;
|
|
4788
|
-
padding:
|
|
4793
|
+
padding: 3px 7px;
|
|
4789
4794
|
border-radius: 4px;
|
|
4790
4795
|
cursor: pointer;
|
|
4791
4796
|
transition: all 0.15s;
|
|
@@ -4811,13 +4816,13 @@
|
|
|
4811
4816
|
border: 1px solid var(--dsw-alias-border-l2, #cbd5e1);
|
|
4812
4817
|
color: var(--dsw-alias-label-primary, #334155);
|
|
4813
4818
|
font-size: 11px;
|
|
4814
|
-
padding:
|
|
4815
|
-
border-radius:
|
|
4819
|
+
padding: 3px 7px;
|
|
4820
|
+
border-radius: 4px;
|
|
4816
4821
|
cursor: pointer;
|
|
4817
4822
|
transition: all 0.15s;
|
|
4818
4823
|
display: flex;
|
|
4819
4824
|
align-items: center;
|
|
4820
|
-
gap:
|
|
4825
|
+
gap: 3px;
|
|
4821
4826
|
white-space: nowrap;
|
|
4822
4827
|
flex-shrink: 0;
|
|
4823
4828
|
}
|
package/lib/index.js
CHANGED
|
@@ -29,7 +29,7 @@ export class PreviewService extends Service {
|
|
|
29
29
|
handler: this.handleHttpRequest.bind(this),
|
|
30
30
|
});
|
|
31
31
|
});
|
|
32
|
-
console.log('[PreviewService] Registered /api/preview route on webServer (v0.1.
|
|
32
|
+
console.log('[PreviewService] Registered /api/preview route on webServer (v0.1.19)');
|
|
33
33
|
} else {
|
|
34
34
|
console.warn('[PreviewService] webServer not available yet in ctx');
|
|
35
35
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rooode/dsh-plugin-preview",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.19",
|
|
4
4
|
"description": "DeepSeek Harness Markdown 文档与工作空间文件浏览器右侧预览插件 (支持工作区文件树、文件夹创建与文件移动、JSON 交互结构树/格式化、Java/C++/Python/JS/TS/YAML/Go/Rust 多语言语法高亮与符号大纲、自动换行与多标签 FileTabs)",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "lib/index.js",
|