@240xu/dsh-message-ops 0.11.6 → 0.11.7
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 +1 -1
- package/src/client.js +17 -6
package/package.json
CHANGED
package/src/client.js
CHANGED
|
@@ -429,9 +429,20 @@ window.__ModuleLoader__.load({
|
|
|
429
429
|
// `v3.44` / `V6.28` / `v.85` 这类**零宽度线段**。若用 fill 渲染,线段没有
|
|
430
430
|
// 面积 → 整条分支线消失,只剩几个孤立色块(0.11.x 实测症状:
|
|
431
431
|
// 「那个 svg 渲染有问题」)。必须 stroke + round cap/join。
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
432
|
+
// 唯一数据源:所有图标入口(React 组件 / innerHTML 字符串)都从这里取,
|
|
433
|
+
// 以免再次出现「一处改名、另一处仍用旧名 → d="undefined"」的回归。
|
|
434
|
+
const BRANCH_PATH = 'M5 2.5a2 2 0 1 1-.9 3.78v3.44a2 2 0 1 1-1.2 0V6.28A2 2 0 1 1 5 2.5Zm0 1.2a.8.8 0 1 0 0 1.6.8.8 0 0 0 0-1.6ZM3.5 11.5a.8.8 0 1 0 1.6 0 .8.8 0 0 0-1.6 0ZM12.5 2.5a2 2 0 0 1 .6 3.9v.85c0 1.9-1.54 3.44-3.44 3.44H8.03a2 2 0 1 1 0-1.2h1.63a2.24 2.24 0 0 0 2.24-2.24V6.4a2 2 0 0 1 .6-3.9Zm0 1.2a.8.8 0 1 0 0 1.6.8.8 0 0 0 0-1.6Z'
|
|
435
|
+
const BRANCH_STROKE = 1.4
|
|
436
|
+
|
|
437
|
+
/** 生成分支图标的 SVG 标记(供 innerHTML 场景复用)。 */
|
|
438
|
+
function branchIconMarkup(size) {
|
|
439
|
+
const px = size || 16
|
|
440
|
+
return '<svg width="' + px + '" height="' + px + '" viewBox="0 0 16 16" fill="none"'
|
|
441
|
+
+ ' xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"'
|
|
442
|
+
+ ' style="flex:none"><path d="' + BRANCH_PATH + '" fill="none"'
|
|
443
|
+
+ ' stroke="currentColor" stroke-width="' + BRANCH_STROKE + '"'
|
|
444
|
+
+ ' stroke-linecap="round" stroke-linejoin="round"/></svg>'
|
|
445
|
+
}
|
|
435
446
|
|
|
436
447
|
function BranchIcon() {
|
|
437
448
|
return React.createElement('svg', {
|
|
@@ -439,8 +450,8 @@ window.__ModuleLoader__.load({
|
|
|
439
450
|
xmlns: 'http://www.w3.org/2000/svg',
|
|
440
451
|
'aria-hidden': 'true', focusable: 'false',
|
|
441
452
|
}, React.createElement('path', {
|
|
442
|
-
d:
|
|
443
|
-
stroke: 'currentColor', strokeWidth:
|
|
453
|
+
d: BRANCH_PATH,
|
|
454
|
+
stroke: 'currentColor', strokeWidth: BRANCH_STROKE,
|
|
444
455
|
strokeLinecap: 'round', strokeLinejoin: 'round',
|
|
445
456
|
fill: 'none',
|
|
446
457
|
}))
|
|
@@ -2732,7 +2743,7 @@ window.__ModuleLoader__.load({
|
|
|
2732
2743
|
'font:inherit', 'font-size:13px', 'line-height:20px',
|
|
2733
2744
|
'text-align:left', 'border-radius:6px', 'cursor:pointer',
|
|
2734
2745
|
].join(';')
|
|
2735
|
-
item.innerHTML =
|
|
2746
|
+
item.innerHTML = branchIconMarkup(16) + '<span></span>'
|
|
2736
2747
|
item.querySelector('span').textContent = __t('menu.ops')
|
|
2737
2748
|
item.addEventListener('mouseenter', function () {
|
|
2738
2749
|
item.style.background = 'var(--dsw-alias-interactive-bg-hover,rgba(128,128,128,.14))'
|