dsh-better-workspace 0.11.0 → 0.11.2
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/dsh.plugin.json +1 -1
- package/package.json +1 -1
- package/src/client.js +22 -6
package/dsh.plugin.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"id": "dsh-external/dsh-better-workspace",
|
|
3
|
-
"version": "0.11.
|
|
3
|
+
"version": "0.11.2",
|
|
4
4
|
"main": "./src/index.js",
|
|
5
5
|
"description": "侧边栏工作区层级树:名称中的 / 即虚拟分组(web/前端 · web/后端),添加工作区的目录流附所属分组弹窗,重命名即时重排层级,可新建空分组。Hierarchy tree for the DSH sidebar workspace list.",
|
|
6
6
|
"engines": {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-better-workspace",
|
|
3
|
-
"version": "0.11.
|
|
3
|
+
"version": "0.11.2",
|
|
4
4
|
"description": "DSH web plugin: a hierarchical workspace tree for the sidebar. Workspace titles containing \"/\" group into virtual folders (web/前端 · web/后端); the add-workspace directory flow gains a parent-group popup; renames re-derive the tree; a new-folder button creates empty levels.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"repository": {
|
package/src/client.js
CHANGED
|
@@ -2699,7 +2699,10 @@ window.__ModuleLoader__.load({
|
|
|
2699
2699
|
'.bw-row-icon{flex:none;display:grid;place-items:center;color:var(--dsw-alias-label-tertiary,#9a9a9a)}',
|
|
2700
2700
|
'.bw-chevron{flex:none;display:grid;place-items:center;color:var(--dsw-alias-label-tertiary,#9a9a9a);transition:transform .15s ease}',
|
|
2701
2701
|
'.bw-chevron-open{transform:rotate(90deg)}',
|
|
2702
|
-
|
|
2702
|
+
// overflow:hidden (needed for the ellipsis) clips the outline: 3px of
|
|
2703
|
+
// padding covers the widest rim (2px at the top of the slider). margin
|
|
2704
|
+
// cancels it, so text still starts and truncates where it did.
|
|
2705
|
+
'.bw-row-label{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;padding:3px;margin:-3px}',
|
|
2703
2706
|
'.bw-row-count{flex:none;font-size:11px;color:var(--dsw-alias-label-quaternary,#8a8a8a)}',
|
|
2704
2707
|
'.bw-row-time{flex:none;font-size:11px;color:var(--dsw-alias-label-quaternary,#8a8a8a)}',
|
|
2705
2708
|
// The outline is inherited from the row: the 11px meta column (session
|
|
@@ -2783,7 +2786,7 @@ window.__ModuleLoader__.load({
|
|
|
2783
2786
|
'.bw-preview{display:flex;align-items:center;gap:8px;padding:6px 8px;border:1px dashed var(--dsw-alias-border-l2,rgba(127,127,127,.3));border-radius:6px;min-height:28px}',
|
|
2784
2787
|
'.bw-preview-icon{flex:none;display:grid;place-items:center;width:20px;height:20px;color:var(--dsw-alias-label-primary,#e6e6e6)}',
|
|
2785
2788
|
'.bw-preview-icon svg{width:18px;height:18px}',
|
|
2786
|
-
'.bw-preview-label{font-size:12.5px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;line-height:18px}',
|
|
2789
|
+
'.bw-preview-label{font-size:12.5px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;line-height:18px;padding:3px;margin:-3px}',
|
|
2787
2790
|
'.bw-pulse{animation:bw-breathe 1.8s ease-in-out infinite}',
|
|
2788
2791
|
'@keyframes bw-breathe{0%,100%{filter:drop-shadow(0 0 1px var(--bw-pulse-color));opacity:.55}50%{filter:drop-shadow(0 0 6px var(--bw-pulse-color));opacity:1}}',
|
|
2789
2792
|
'.bw-pulse-text{animation:bw-breathe-text 1.8s ease-in-out infinite}',
|
|
@@ -3253,7 +3256,9 @@ window.__ModuleLoader__.load({
|
|
|
3253
3256
|
// and returns the opposite pole; rows without a custom color inherit
|
|
3254
3257
|
// --bw-stroke-color, sampled from the live computed style (see the sampler
|
|
3255
3258
|
// in BetterBrowser) so a palette flip needs no React render.
|
|
3256
|
-
|
|
3259
|
+
// The slider is the rim the eye actually sees (0.5..2px). strokeStyleOf
|
|
3260
|
+
// paints twice that because paint-order hides the inner half of the band.
|
|
3261
|
+
const STROKE_MAX = 2
|
|
3257
3262
|
// The outline color defaults to a plain gray: it reads on light and dark
|
|
3258
3263
|
// backgrounds alike without shouting like pure black/white. "auto" derives
|
|
3259
3264
|
// the contrasting pole from the font color instead.
|
|
@@ -3328,12 +3333,23 @@ window.__ModuleLoader__.load({
|
|
|
3328
3333
|
}
|
|
3329
3334
|
return colorToRgb(picked) ? picked : DEFAULT_APPEARANCE.strokeColor
|
|
3330
3335
|
}
|
|
3331
|
-
// paint-order keeps the stroke UNDER the fill
|
|
3332
|
-
//
|
|
3336
|
+
// paint-order keeps the stroke UNDER the fill so the glyph does not thin out
|
|
3337
|
+
// — the whole point of an outer outline. The price is half the band:
|
|
3338
|
+
// -webkit-text-stroke centres it on the outline and the fill covers the inner
|
|
3339
|
+
// half, so the painted width must be TWICE the rim the slider promises.
|
|
3340
|
+
// Painting the configured value (0.10.x) left a 0.5px rim that antialiasing
|
|
3341
|
+
// blended away into a pale, uneven edge.
|
|
3342
|
+
//
|
|
3343
|
+
// 0.11.1 replaced this with eight offset glyph copies. It measured better and
|
|
3344
|
+
// looked worse: eight directions are only four diagonal samples, so every
|
|
3345
|
+
// slope and curve came out as a string of detached blocks instead of a filled
|
|
3346
|
+
// rim. A geometric stroke is continuous by construction — it really is a path
|
|
3347
|
+
// stroke — so the answer is to give it enough width to survive antialiasing,
|
|
3348
|
+
// not to fake it out of copies.
|
|
3333
3349
|
const strokeStyleOf = (appearance) => {
|
|
3334
3350
|
if (!appearance || appearance.stroke === false) return null
|
|
3335
3351
|
return {
|
|
3336
|
-
WebkitTextStrokeWidth: clampStrokeWidth(appearance.strokeWidth) + 'px',
|
|
3352
|
+
WebkitTextStrokeWidth: clampStrokeWidth(appearance.strokeWidth) * 2 + 'px',
|
|
3337
3353
|
WebkitTextStrokeColor: strokeColorOf(appearance),
|
|
3338
3354
|
paintOrder: 'stroke fill',
|
|
3339
3355
|
}
|