@restregular/dsh-powerup 0.8.0 → 0.8.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/README.md +13 -1
- package/client.js +99 -20
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -107,6 +107,15 @@ entries other plugins add) become an icon grid instead of a one-per-row list:
|
|
|
107
107
|
anchored to the tile, scaling in from its edge. Inside the flyout: click an
|
|
108
108
|
entry to open that panel, `×` removes it from the folder, click the title to
|
|
109
109
|
rename the folder, and **Ungroup** returns every member to the grid.
|
|
110
|
+
- **The host's "More" entry is a tile too.** The host wraps its extra-panels
|
|
111
|
+
menu in a `Menu` root `<span>` around the row button (not a div), so the
|
|
112
|
+
launcher resolves any non-button child that owns a direct button as that
|
|
113
|
+
entry; it gets the same stacked icon/label tile and can be dragged like any
|
|
114
|
+
other panel. It never folds into a folder.
|
|
115
|
+
- **A synthetic "Back to conversation" tile.** Power-Up adds one extra tile of
|
|
116
|
+
its own (chat glyph + label) that calls `layout.selectPanel(null)` to return
|
|
117
|
+
to the Conversation; it highlights when no global panel is selected, can be
|
|
118
|
+
placed anywhere by dragging, and never joins a folder either.
|
|
110
119
|
- **Collapsed sidebar stays native.** When the sidebar collapses to its 56px
|
|
111
120
|
rail there are no labels to stack, so the launcher steps aside and the host's
|
|
112
121
|
rail rendering takes over untouched.
|
|
@@ -200,7 +209,10 @@ fiber is unloaded. The panel closes; refresh the page when the install finishes.
|
|
|
200
209
|
host's own panel rows: it marks the `<nav>`, applies grid/tile CSS, appends
|
|
201
210
|
synthetic folder tiles, hides the rows that moved into a folder with an
|
|
202
211
|
inline `display` (React rewrites `className` when the active panel changes and
|
|
203
|
-
would drop an added class), and sorts with the grid's `order` property.
|
|
212
|
+
would drop an added class), and sorts with the grid's `order` property. Host
|
|
213
|
+
rows are resolved by shape — a direct `<button>`, or a wrapper (the More
|
|
214
|
+
launcher's `Menu` root `<span>`) whose direct child is that button — because
|
|
215
|
+
the wrapper element differs between the panel rows and the more menu. A
|
|
204
216
|
`MutationObserver` re-applies that after every host render, and the module
|
|
205
217
|
falls back to the native rail whenever the wide layout disappears.
|
|
206
218
|
- **Launcher state is tiny and self-healing.** `dsh-powerup:launcher:v1` stores
|
package/client.js
CHANGED
|
@@ -69,7 +69,7 @@
|
|
|
69
69
|
|
|
70
70
|
const NS = 'dsh-powerup';
|
|
71
71
|
const SETTINGS_KEY = 'dsh-powerup:settings:v1';
|
|
72
|
-
const VERSION = '0.8.
|
|
72
|
+
const VERSION = '0.8.2';
|
|
73
73
|
const MENU_GAP = 8;
|
|
74
74
|
const MENU_WIDTH = 248;
|
|
75
75
|
/** Reference scheme understood by the Host's `powerup_step_read` tool. */
|
|
@@ -115,6 +115,7 @@
|
|
|
115
115
|
'launcher.renameHint': '点击重命名',
|
|
116
116
|
'launcher.dissolve': '解散分组',
|
|
117
117
|
'launcher.removeItem': '移出分组',
|
|
118
|
+
'launcher.backToConversation': '返回会话',
|
|
118
119
|
'page.footer': 'Power-Up {version} · 设置在浏览器本地保存',
|
|
119
120
|
'page.localOnly': '仅影响当前浏览器',
|
|
120
121
|
'action.copy': '复制内容',
|
|
@@ -301,6 +302,7 @@
|
|
|
301
302
|
'launcher.renameHint': 'Click to rename',
|
|
302
303
|
'launcher.dissolve': 'Ungroup',
|
|
303
304
|
'launcher.removeItem': 'Remove from group',
|
|
305
|
+
'launcher.backToConversation': 'Back to conversation',
|
|
304
306
|
'page.footer': 'Power-Up {version} · Settings are stored in this browser',
|
|
305
307
|
'page.localOnly': 'This browser only',
|
|
306
308
|
'action.copy': 'Copy content',
|
|
@@ -544,6 +546,12 @@
|
|
|
544
546
|
const LAUNCHER_GROUP_PREFIX = 'group:';
|
|
545
547
|
/** Pixel distance before a press turns into a drag. */
|
|
546
548
|
const LAUNCHER_DRAG_THRESHOLD = 6;
|
|
549
|
+
/** Tile key of the host's "more panels" launcher. */
|
|
550
|
+
const LAUNCHER_MORE_KEY = '__more';
|
|
551
|
+
/** Tile key of the Power-Up "back to conversation" tile. */
|
|
552
|
+
const LAUNCHER_CHAT_KEY = '__chat';
|
|
553
|
+
/** 16-grid chat glyph for the synthetic "back to conversation" tile. */
|
|
554
|
+
const LAUNCHER_CHAT_ICON = '<svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true" focusable="false"><path d="M2.8 3.4h10.4v6.8H7.4L4.4 12.8v-2.6H2.8V3.4Z" stroke="currentColor" stroke-width="1.3" stroke-linejoin="round"/></svg>';
|
|
547
555
|
|
|
548
556
|
function launcherGroupEntry(groupId) {
|
|
549
557
|
return LAUNCHER_GROUP_PREFIX + groupId;
|
|
@@ -580,6 +588,7 @@
|
|
|
580
588
|
const list = Array.isArray(value.items) ? value.items : [];
|
|
581
589
|
for (const key of list) {
|
|
582
590
|
if (typeof key !== 'string' || !known.has(key) || assigned.has(key)) continue;
|
|
591
|
+
if (key.startsWith('__')) continue;
|
|
583
592
|
assigned.add(key);
|
|
584
593
|
items.push(key);
|
|
585
594
|
}
|
|
@@ -645,6 +654,7 @@
|
|
|
645
654
|
const readRaw = typeof options.read === 'function' ? options.read : () => null;
|
|
646
655
|
const writeRaw = typeof options.write === 'function' ? options.write : () => {};
|
|
647
656
|
const listPanels = typeof options.listPanels === 'function' ? options.listPanels : () => [];
|
|
657
|
+
const selectConversation = typeof options.selectConversation === 'function' ? options.selectConversation : () => {};
|
|
648
658
|
|
|
649
659
|
let nav = null;
|
|
650
660
|
let docObserver = null;
|
|
@@ -657,6 +667,7 @@
|
|
|
657
667
|
let pendingLoad = true;
|
|
658
668
|
let hostTiles = [];
|
|
659
669
|
let folderButtons = new Map();
|
|
670
|
+
let chatButton = null;
|
|
660
671
|
let dropLine = null;
|
|
661
672
|
let drag = null;
|
|
662
673
|
let popup = null;
|
|
@@ -763,20 +774,23 @@
|
|
|
763
774
|
const tiles = [];
|
|
764
775
|
const usedKeys = new Set();
|
|
765
776
|
for (const child of [...container.children]) {
|
|
766
|
-
if (child.hasAttribute('data-powerup-folder')) continue;
|
|
777
|
+
if (child.hasAttribute('data-powerup-folder') || child.hasAttribute('data-powerup-chat')) continue;
|
|
767
778
|
if (typeof child.classList === 'object' && child.classList !== null && child.classList.contains('dsh-powerup-drop-line')) continue;
|
|
768
779
|
let gridEl = child;
|
|
769
780
|
let buttonEl = null;
|
|
770
781
|
if (child.tagName === 'BUTTON') buttonEl = child;
|
|
771
|
-
else if (child.
|
|
772
|
-
|
|
782
|
+
else if (typeof child.querySelector === 'function') {
|
|
783
|
+
/* The host's "more" launcher wraps its row in a Menu root <span>;
|
|
784
|
+
other hosts may use a div. Either way the row is the direct
|
|
785
|
+
button child of that wrapper. */
|
|
786
|
+
buttonEl = child.querySelector(':scope > button');
|
|
773
787
|
if (buttonEl === null) continue;
|
|
774
788
|
} else continue;
|
|
775
789
|
const label = buttonEl.getAttribute('aria-label') ?? '';
|
|
776
790
|
if (label === '') continue;
|
|
777
|
-
const isMore = child.tagName
|
|
778
|
-
let key = isMore ?
|
|
779
|
-
if (key !==
|
|
791
|
+
const isMore = child.tagName !== 'BUTTON';
|
|
792
|
+
let key = isMore ? LAUNCHER_MORE_KEY : (byLabel.get(label) ?? 'label:' + label);
|
|
793
|
+
if (key !== LAUNCHER_MORE_KEY && usedKeys.has(key)) {
|
|
780
794
|
let suffix = 2;
|
|
781
795
|
while (usedKeys.has(key + '~' + suffix)) suffix += 1;
|
|
782
796
|
key = key + '~' + suffix;
|
|
@@ -857,6 +871,30 @@
|
|
|
857
871
|
return button;
|
|
858
872
|
}
|
|
859
873
|
|
|
874
|
+
/** The synthetic "back to conversation" tile, created once and re-used. */
|
|
875
|
+
function ensureChatButton() {
|
|
876
|
+
if (chatButton !== null && chatButton.isConnected === true) return chatButton;
|
|
877
|
+
const button = document.createElement('button');
|
|
878
|
+
button.type = 'button';
|
|
879
|
+
button.className = 'dsh-powerup-chat';
|
|
880
|
+
button.setAttribute('data-powerup-chat', '');
|
|
881
|
+
button.innerHTML = '<span class="dsh-powerup-chat-glyph" aria-hidden="true">' + LAUNCHER_CHAT_ICON + '</span><span class="dsh-powerup-chat-label"></span>';
|
|
882
|
+
button.addEventListener('click', (event) => {
|
|
883
|
+
event.preventDefault();
|
|
884
|
+
event.stopPropagation();
|
|
885
|
+
if (drag !== null && drag.active) return;
|
|
886
|
+
closePopup();
|
|
887
|
+
try {
|
|
888
|
+
selectConversation();
|
|
889
|
+
} catch (error) {
|
|
890
|
+
warn('conversation could not be selected:', error);
|
|
891
|
+
}
|
|
892
|
+
});
|
|
893
|
+
nav.appendChild(button);
|
|
894
|
+
chatButton = button;
|
|
895
|
+
return button;
|
|
896
|
+
}
|
|
897
|
+
|
|
860
898
|
function hideDropLine() {
|
|
861
899
|
if (dropLine !== null) dropLine.style.display = 'none';
|
|
862
900
|
if (nav !== null && typeof nav.querySelectorAll === 'function') {
|
|
@@ -870,6 +908,7 @@
|
|
|
870
908
|
hideDropLine();
|
|
871
909
|
folderButtons.forEach((button) => button.remove());
|
|
872
910
|
folderButtons = new Map();
|
|
911
|
+
if (chatButton !== null) chatButton.style.display = 'none';
|
|
873
912
|
if (dropLine !== null) {
|
|
874
913
|
dropLine.remove();
|
|
875
914
|
dropLine = null;
|
|
@@ -916,7 +955,7 @@
|
|
|
916
955
|
hostTiles = collectHostTiles(nav);
|
|
917
956
|
const wide = detectWide(hostTiles);
|
|
918
957
|
nav.classList.toggle('dsh-powerup-launcher-wide', wide);
|
|
919
|
-
const panelKeys = hostTiles.
|
|
958
|
+
const panelKeys = [LAUNCHER_CHAT_KEY, ...hostTiles.map((tile) => tile.key)];
|
|
920
959
|
if (pendingLoad) {
|
|
921
960
|
pendingLoad = false;
|
|
922
961
|
state = normalizeLauncherState(readPersisted(), panelKeys);
|
|
@@ -935,12 +974,19 @@
|
|
|
935
974
|
/* Inline display (not a class): React rewrites className when the
|
|
936
975
|
active panel changes and would drop an added class. */
|
|
937
976
|
tile.gridEl.style.display = hidden ? 'none' : '';
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
const position = orderIndex.get(tile.key);
|
|
941
|
-
tile.gridEl.style.order = position === undefined ? '' : String(position);
|
|
942
|
-
}
|
|
977
|
+
const position = orderIndex.get(tile.key);
|
|
978
|
+
tile.gridEl.style.order = position === undefined ? '' : String(position);
|
|
943
979
|
}
|
|
980
|
+
const chat = ensureChatButton();
|
|
981
|
+
const chatLabel = t('launcher.backToConversation');
|
|
982
|
+
chat.setAttribute('aria-label', chatLabel);
|
|
983
|
+
chat.setAttribute('title', chatLabel);
|
|
984
|
+
const chatText = typeof chat.querySelector === 'function' ? chat.querySelector('.dsh-powerup-chat-label') : null;
|
|
985
|
+
if (chatText !== null) chatText.textContent = chatLabel;
|
|
986
|
+
chat.style.display = wide ? '' : 'none';
|
|
987
|
+
const chatPosition = orderIndex.get(LAUNCHER_CHAT_KEY);
|
|
988
|
+
chat.style.order = chatPosition === undefined ? '' : String(chatPosition);
|
|
989
|
+
chat.classList.toggle('is-active', hostTiles.every((tile) => tile.active !== true));
|
|
944
990
|
const live = new Set();
|
|
945
991
|
for (const [groupId, group] of Object.entries(state.groups)) {
|
|
946
992
|
live.add(groupId);
|
|
@@ -1252,6 +1298,10 @@
|
|
|
1252
1298
|
const candidates = [];
|
|
1253
1299
|
for (const entry of state.order) {
|
|
1254
1300
|
if (entry === excludeKey) continue;
|
|
1301
|
+
if (entry === LAUNCHER_CHAT_KEY) {
|
|
1302
|
+
if (chatButton !== null && chatButton.isConnected === true) candidates.push({ key: entry, el: chatButton, kind: 'chat' });
|
|
1303
|
+
continue;
|
|
1304
|
+
}
|
|
1255
1305
|
const groupId = launcherEntryGroupId(entry);
|
|
1256
1306
|
if (groupId !== null) {
|
|
1257
1307
|
const button = folderButtons.get(groupId);
|
|
@@ -1270,6 +1320,9 @@
|
|
|
1270
1320
|
if (target === null || target === undefined || typeof target.closest !== 'function') return null;
|
|
1271
1321
|
const button = target.closest('button');
|
|
1272
1322
|
if (button === null || nav === null || !nav.contains(button)) return null;
|
|
1323
|
+
if (button.hasAttribute('data-powerup-chat')) {
|
|
1324
|
+
return { kind: 'chat', key: LAUNCHER_CHAT_KEY, gridEl: button, label: t('launcher.backToConversation') };
|
|
1325
|
+
}
|
|
1273
1326
|
const folderId = button.getAttribute('data-powerup-folder');
|
|
1274
1327
|
if (folderId !== null) {
|
|
1275
1328
|
const group = state.groups[folderId];
|
|
@@ -1277,8 +1330,8 @@
|
|
|
1277
1330
|
return { kind: 'folder', key: launcherGroupEntry(folderId), gridEl: button, label: group.name };
|
|
1278
1331
|
}
|
|
1279
1332
|
const tile = hostTiles.find((candidate) => candidate.buttonEl === button);
|
|
1280
|
-
if (tile === undefined
|
|
1281
|
-
return { kind: 'panel', key: tile.key, gridEl: tile.gridEl, label: tile.label };
|
|
1333
|
+
if (tile === undefined) return null;
|
|
1334
|
+
return { kind: tile.isMore ? 'more' : 'panel', key: tile.key, gridEl: tile.gridEl, label: tile.label };
|
|
1282
1335
|
}
|
|
1283
1336
|
|
|
1284
1337
|
function onPointerDown(event) {
|
|
@@ -1353,7 +1406,14 @@
|
|
|
1353
1406
|
}
|
|
1354
1407
|
|
|
1355
1408
|
function updateDrop(x, y) {
|
|
1356
|
-
if (drag === null || !drag.active) return;
|
|
1409
|
+
if (drag === null || !drag.active || nav === null) return;
|
|
1410
|
+
const navRect = nav.getBoundingClientRect();
|
|
1411
|
+
if (x < navRect.left - 24 || x > navRect.right + 24 || y < navRect.top - 24) {
|
|
1412
|
+
/* Released far outside the launcher: drop is a no-op, not an append. */
|
|
1413
|
+
drag.drop = null;
|
|
1414
|
+
hideDropLine();
|
|
1415
|
+
return;
|
|
1416
|
+
}
|
|
1357
1417
|
const candidates = topLevelCandidates(drag.descriptor.key);
|
|
1358
1418
|
let drop = null;
|
|
1359
1419
|
for (const candidate of candidates) {
|
|
@@ -1364,7 +1424,9 @@
|
|
|
1364
1424
|
const centerX = rect.left + rect.width / 2;
|
|
1365
1425
|
const centerY = rect.top + rect.height / 2;
|
|
1366
1426
|
const nearCenter = Math.abs(x - centerX) <= rect.width * 0.28 && Math.abs(y - centerY) <= rect.height * 0.32;
|
|
1367
|
-
|
|
1427
|
+
const special = candidate.key === LAUNCHER_CHAT_KEY || candidate.key === LAUNCHER_MORE_KEY
|
|
1428
|
+
|| drag.descriptor.key === LAUNCHER_CHAT_KEY || drag.descriptor.key === LAUNCHER_MORE_KEY;
|
|
1429
|
+
if (nearCenter && !special) {
|
|
1368
1430
|
drop = { kind: 'merge', target: candidate };
|
|
1369
1431
|
} else {
|
|
1370
1432
|
drop = { kind: 'insert', index: candidates.indexOf(candidate) + (x < centerX ? 0 : 1), anchor: rect, after: x >= centerX };
|
|
@@ -1492,6 +1554,8 @@
|
|
|
1492
1554
|
|
|
1493
1555
|
function performMerge(sourceKey, targetKey) {
|
|
1494
1556
|
if (sourceKey === targetKey) return;
|
|
1557
|
+
if (sourceKey === LAUNCHER_CHAT_KEY || targetKey === LAUNCHER_CHAT_KEY
|
|
1558
|
+
|| sourceKey === LAUNCHER_MORE_KEY || targetKey === LAUNCHER_MORE_KEY) return;
|
|
1495
1559
|
const sourceGroupId = launcherEntryGroupId(sourceKey);
|
|
1496
1560
|
const targetGroupId = launcherEntryGroupId(targetKey);
|
|
1497
1561
|
if (sourceGroupId !== null && sourceGroupId === targetGroupId) return;
|
|
@@ -1580,6 +1644,10 @@
|
|
|
1580
1644
|
document.removeEventListener('pointerdown', onPointerDown, true);
|
|
1581
1645
|
}
|
|
1582
1646
|
clearVisuals();
|
|
1647
|
+
if (chatButton !== null) {
|
|
1648
|
+
chatButton.remove();
|
|
1649
|
+
chatButton = null;
|
|
1650
|
+
}
|
|
1583
1651
|
state = { order: [], groups: {} };
|
|
1584
1652
|
pendingLoad = true;
|
|
1585
1653
|
nav = null;
|
|
@@ -1647,6 +1715,10 @@
|
|
|
1647
1715
|
}
|
|
1648
1716
|
},
|
|
1649
1717
|
listPanels,
|
|
1718
|
+
selectConversation: () => {
|
|
1719
|
+
const layout = ctx.get('layout');
|
|
1720
|
+
if (layout !== undefined && layout !== null && typeof layout.selectPanel === 'function') layout.selectPanel(null);
|
|
1721
|
+
},
|
|
1650
1722
|
});
|
|
1651
1723
|
ctx.effect(() => {
|
|
1652
1724
|
core.start();
|
|
@@ -1970,9 +2042,9 @@
|
|
|
1970
2042
|
*/
|
|
1971
2043
|
const LAUNCHER_CSS = `
|
|
1972
2044
|
nav.dsh-powerup-launcher.dsh-powerup-launcher-wide{position:relative;display:grid!important;grid-template-columns:repeat(auto-fill,minmax(58px,1fr));grid-auto-rows:min-content;gap:2px;align-content:start;align-items:stretch;margin:0 0 10px;padding:2px 0}
|
|
1973
|
-
nav.dsh-powerup-launcher.dsh-powerup-launcher-wide>button,nav.dsh-powerup-launcher.dsh-powerup-launcher-wide>[data-powerup-more]>button,.dsh-powerup-folder{box-sizing:border-box;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;width:auto;min-width:0;height:auto;min-height:52px;margin:0;padding:6px 2px 5px;border:0;border-radius:var(--dsw-radius-md,8px);background:transparent;color:var(--dsw-alias-label-primary);font:inherit;font-size:11px;line-height:14px;text-align:center;cursor:pointer;user-select:none;-webkit-user-select:none;transition:background .12s ease,color .12s ease,transform .12s ease}
|
|
1974
|
-
nav.dsh-powerup-launcher.dsh-powerup-launcher-wide>button:hover,nav.dsh-powerup-launcher.dsh-powerup-launcher-wide>[data-powerup-more]>button:hover,.dsh-powerup-folder:hover{background:var(--dsw-alias-interactive-bg-hover)}
|
|
1975
|
-
nav.dsh-powerup-launcher.dsh-powerup-launcher-wide>button:active,nav.dsh-powerup-launcher.dsh-powerup-launcher-wide>[data-powerup-more]>button:active,.dsh-powerup-folder:active{transform:scale(.96)}
|
|
2045
|
+
nav.dsh-powerup-launcher.dsh-powerup-launcher-wide>button,nav.dsh-powerup-launcher.dsh-powerup-launcher-wide>[data-powerup-more]>button,.dsh-powerup-folder,.dsh-powerup-chat{box-sizing:border-box;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;width:auto;min-width:0;height:auto;min-height:52px;margin:0;padding:6px 2px 5px;border:0;border-radius:var(--dsw-radius-md,8px);background:transparent;color:var(--dsw-alias-label-primary);font:inherit;font-size:11px;line-height:14px;text-align:center;cursor:pointer;user-select:none;-webkit-user-select:none;transition:background .12s ease,color .12s ease,transform .12s ease}
|
|
2046
|
+
nav.dsh-powerup-launcher.dsh-powerup-launcher-wide>button:hover,nav.dsh-powerup-launcher.dsh-powerup-launcher-wide>[data-powerup-more]>button:hover,.dsh-powerup-folder:hover,.dsh-powerup-chat:hover{background:var(--dsw-alias-interactive-bg-hover)}
|
|
2047
|
+
nav.dsh-powerup-launcher.dsh-powerup-launcher-wide>button:active,nav.dsh-powerup-launcher.dsh-powerup-launcher-wide>[data-powerup-more]>button:active,.dsh-powerup-folder:active,.dsh-powerup-chat:active{transform:scale(.96)}
|
|
1976
2048
|
nav.dsh-powerup-launcher.dsh-powerup-launcher-wide>button[class*="panelActive"],nav.dsh-powerup-launcher.dsh-powerup-launcher-wide>[data-powerup-more]>button[aria-expanded=true]{background:var(--dsw-alias-interactive-bg-hover)}
|
|
1977
2049
|
nav.dsh-powerup-launcher.dsh-powerup-launcher-wide>[data-powerup-more]{display:flex!important;flex-direction:column;min-width:0;margin:0}
|
|
1978
2050
|
nav.dsh-powerup-launcher.dsh-powerup-launcher-wide [class*="panelGlyph"]{display:inline-flex;align-items:center;justify-content:center;width:24px;height:24px;flex:none}
|
|
@@ -1988,10 +2060,17 @@ nav.dsh-powerup-launcher.dsh-powerup-launcher-wide>button:hover [class*="panelTi
|
|
|
1988
2060
|
.dsh-powerup-folder-name{display:block;width:100%;max-width:100%;color:var(--dsw-alias-label-secondary);font-size:11px;line-height:14px;text-align:center;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
|
|
1989
2061
|
.dsh-powerup-folder.is-active .dsh-powerup-folder-name{color:var(--dsw-alias-label-primary)}
|
|
1990
2062
|
.dsh-powerup-folder.is-active .dsh-powerup-folder-stack{background:color-mix(in srgb,var(--dsw-alias-state-business-primary) 22%,transparent)}
|
|
2063
|
+
.dsh-powerup-chat-glyph{display:inline-flex;align-items:center;justify-content:center;width:24px;height:24px;flex:none;color:var(--dsw-alias-label-secondary)}
|
|
2064
|
+
.dsh-powerup-chat-glyph svg{width:20px;height:20px}
|
|
2065
|
+
.dsh-powerup-chat-label{display:block;width:100%;max-width:100%;color:var(--dsw-alias-label-secondary);font-size:11px;line-height:14px;text-align:center;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
|
|
2066
|
+
.dsh-powerup-chat:hover .dsh-powerup-chat-label{color:var(--dsw-alias-label-primary)}
|
|
2067
|
+
.dsh-powerup-chat.is-active{background:var(--dsw-alias-interactive-bg-hover)}
|
|
2068
|
+
.dsh-powerup-chat.is-active .dsh-powerup-chat-label,.dsh-powerup-chat.is-active .dsh-powerup-chat-glyph{color:var(--dsw-alias-label-primary)}
|
|
1991
2069
|
.dsh-powerup-dragging{opacity:.32}
|
|
1992
2070
|
.dsh-powerup-merge-target{background:color-mix(in srgb,var(--dsw-alias-state-business-primary) 17%,transparent)!important;box-shadow:inset 0 0 0 1px var(--dsw-alias-state-business-primary)}
|
|
1993
2071
|
.dsh-powerup-drop-line{position:absolute;z-index:6;display:none;width:2px;border-radius:999px;background:var(--dsw-alias-state-business-primary);box-shadow:0 0 0 1px color-mix(in srgb,var(--dsw-alias-state-business-primary) 26%,transparent);pointer-events:none}
|
|
1994
2072
|
.dsh-powerup-drag-ghost{position:fixed;z-index:1800;box-sizing:border-box;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;padding:6px 2px 5px;border-radius:var(--dsw-radius-md,8px);background:var(--dsw-alias-bg-layer-2);box-shadow:var(--dsw-elevation-prominent);color:var(--dsw-alias-label-primary);font-size:11px;line-height:14px;pointer-events:none;opacity:.96;transform:scale(1.05);transition:opacity .1s ease}
|
|
2073
|
+
.dsh-powerup-drag-ghost>button{box-sizing:border-box;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;width:100%;min-height:0;margin:0;padding:6px 2px 5px;border:0;background:transparent;color:inherit;font:inherit;font-size:11px;line-height:14px;text-align:center;cursor:pointer;user-select:none;-webkit-user-select:none}
|
|
1995
2074
|
.dsh-powerup-drag-ghost [class*="panelGlyph"]{display:inline-flex;align-items:center;justify-content:center;width:24px;height:24px;flex:none}
|
|
1996
2075
|
.dsh-powerup-drag-ghost [class*="panelGlyph"] svg{width:20px;height:20px}
|
|
1997
2076
|
.dsh-powerup-drag-ghost [class*="panelTitle"]{display:block;width:100%;max-width:100%;color:var(--dsw-alias-label-secondary);font-size:11px;line-height:14px;text-align:center;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@restregular/dsh-powerup",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.2",
|
|
4
4
|
"description": "Power-Up — small, opt-in upgrades for DeepSeek Harness. Adds a right-click action menu to the Trajectory ledger, an optional stop reason in the session header's background jobs panel (appended to the injected completion notice), and an install control for third-party plugins from the Plugins page: read versions from the configured registries, install the version in the input through the Add plugin path (removing the old copy first), mark restart-needed installs, hand Power-Up's own install to the background, and optionally restart DSH. One-click install skips the enable and restart questions and can apply those actions automatically with configurable defaults. The ledger menu also copies a step reference (session id + step id) that the read-only powerup_step_read tool resolves back into the raw session data. · 为 DeepSeek Harness 提供小型增强:在轨迹页面右键记录即可复制、引用、查看详情或从该记录 Fork;右键「复制步骤引用」得到「会话 ID + 步骤 ID」,Agent 用只读工具 powerup_step_read 即可取回该步骤的完整原始数据;在会话顶部的后台任务面板手动停止任务时可填写停止原因,原因会附加到任务结束后的会话提示;并在插件页为第三方已安装插件提供安装按钮,从安装源读取版本,按输入框中的版本沿用「添加插件」流程安装(先卸载旧版),支持待重启标记、Power-Up 自身后台安装与可选重启;安装面板提供「一键安装」,按输入框版本安装并跳过启用/重启询问,默认自动启用并重启,可在 Power-Up 页面调整默认行为。 · 侧边栏启动器:把左侧边栏的面板按钮变成随宽度自适应的图标网格(图标在上、文字在下),支持拖拽排序与分组(拖到另一个图标中间即合并为分组,点击分组弹出浮层展示内部图标),可随时整体关闭。",
|
|
5
5
|
"icon": "./icon.svg",
|
|
6
6
|
"type": "module",
|