dsh-diff-approval 0.6.0 → 0.7.0
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 +306 -133
- package/lib/types/client/locales.d.ts +6 -0
- package/package.json +1 -1
package/lib/client.js
CHANGED
|
@@ -11621,7 +11621,7 @@ XID_Start XIDS`.split(/\s/).map((p) => [w(p), p]));
|
|
|
11621
11621
|
}
|
|
11622
11622
|
//#endregion
|
|
11623
11623
|
//#region \0dsh-css:/home/runner/work/dsh-diff-approval/dsh-diff-approval/src/client/PendingPanel.module.css.mjs
|
|
11624
|
-
const css = ".F1KBNa_layer{box-sizing:border-box;flex:none;align-items:center;width:calc(100% + 8px);height:42px;margin:4px -4px;display:flex;position:relative}.F1KBNa_footerButtons{align-items:center;width:100%;display:flex}.F1KBNa_badge{box-sizing:border-box;width:100%;height:42px;color:var(--dsw-alias-label-primary);cursor:pointer;background:0 0;border:none;border-radius:12px;align-items:center;gap:8px;padding:0 10px 0 8px;font-family:inherit;font-size:14px;line-height:22px;display:flex;overflow:hidden}.F1KBNa_badge:hover{background:var(--dsw-alias-interactive-bg-hover)}.F1KBNa_badge[data-active]{background:var(--dsw-alias-interactive-bg-hover-solid)}.F1KBNa_badgeLabel{text-overflow:ellipsis;white-space:nowrap;min-width:0;overflow:hidden}.F1KBNa_badgeCount{color:var(--dsw-alias-label-tertiary);font-variant-numeric:tabular-nums;flex:none;margin-left:auto;font-size:12px;line-height:16px}.F1KBNa_layer.F1KBNa_rail{width:36px;height:36px;margin:8px 0 10px}.F1KBNa_rail .F1KBNa_badge{border-radius:50%;justify-content:center;gap:0;width:36px;height:36px;padding:0}.F1KBNa_rail .F1KBNa_badgeLabel{display:none}.F1KBNa_rail .F1KBNa_badgeCount{box-sizing:border-box;background:var(--dsw-alias-state-business-primary);min-width:18px;height:18px;color:var(--dsw-alias-label-primary-foreground);font-variant-numeric:tabular-nums;border-radius:9px;justify-content:center;align-items:center;padding:0 4px;font-size:11px;line-height:18px;display:flex;position:absolute;top:-3px;right:-7px}.F1KBNa_panel{z-index:30;border:1px solid var(--dsw-alias-border-l1);background:var(--dsw-alias-bg-base);width:auto;max-width:none;box-shadow:var(--dsw-shadow-lv2);--dsh-scrollbar-thumb:var(--dsw-alias-scrollbar-bg-l2);--dsh-scrollbar-thumb-hover:var(--dsw-alias-scrollbar-hover-l2);border-radius:12px;flex-direction:column;display:flex;position:fixed;inset:8px 8px 128px;overflow:hidden}.F1KBNa_header{box-sizing:border-box;border-bottom:1px solid var(--dsw-alias-border-l2);background:var(--dsw-alias-bg-base);flex:none;justify-content:space-between;align-items:center;min-height:44px;padding:10px 12px;display:flex}.F1KBNa_headerActions{align-items:center;gap:2px;display:flex}.F1KBNa_states{flex:1;min-height:0;padding:4px 12px 12px;overflow-y:auto}.F1KBNa_split{flex:1;align-items:stretch;min-height:0;display:flex}.F1KBNa_fileList{box-sizing:border-box;border-right:1px solid var(--dsw-alias-border-l2);flex:none;width:240px;min-height:0;padding:4px 8px 12px;overflow-y:auto}.F1KBNa_resizeHandle{cursor:col-resize;background:0 0;flex:none;width:5px;margin:0 -2px}.F1KBNa_resizeHandle:hover{background:var(--dsw-alias-border-l2)}.F1KBNa_detail{flex-direction:column;flex:1;min-width:0;min-height:0;display:flex}.F1KBNa_detailEmpty{color:var(--dsw-alias-label-tertiary);text-align:center;flex:1;justify-content:center;align-items:center;margin:0;padding:24px;font-size:12px;line-height:18px;display:flex}.F1KBNa_title{color:var(--dsw-alias-label-primary);font-size:13px;font-weight:500;line-height:20px}.F1KBNa_note,.F1KBNa_readError,.F1KBNa_hint{color:var(--dsw-alias-label-tertiary);margin:4px 0;font-size:12px;line-height:18px}.F1KBNa_readError{color:var(--dsw-alias-state-error-primary)}.F1KBNa_group{color:var(--dsw-alias-label-tertiary);margin:8px 0 4px;font-size:12px;font-weight:500;line-height:16px}.F1KBNa_rows{margin:0;padding:0;list-style:none}.F1KBNa_row{border:1px solid #0000;border-radius:10px;margin:2px 0}.F1KBNa_rowHead{width:100%;color:var(--dsw-alias-label-primary);font:inherit;text-align:left;cursor:pointer;background:0 0;border:none;border-radius:10px;align-items:baseline;gap:8px;padding:6px 8px;display:flex}.F1KBNa_rowHead:hover{background:var(--dsw-alias-interactive-bg-hover-solid)}.F1KBNa_rowHead[data-selected]{background:var(--dsw-alias-interactive-bg-hover)}.F1KBNa_rowPath{text-overflow:ellipsis;white-space:nowrap;min-width:0;font:var(--dsw-font-markdown-code-block);overflow:hidden}.F1KBNa_kindTag{border:1px solid var(--dsw-alias-border-l1);color:var(--dsw-alias-label-tertiary);white-space:nowrap;border-radius:6px;flex:none;padding:1px 6px;font-size:11px;line-height:14px}.F1KBNa_kindHint{color:var(--dsw-alias-label-tertiary);flex:none;font-size:12px;line-height:16px}.F1KBNa_divergedHint,.F1KBNa_missingHint{border-bottom:1px solid var(--dsw-alias-border-l2);margin:0;padding:6px 8px;font-size:12px;line-height:18px}.F1KBNa_missing{border:1px solid var(--dsw-alias-state-warn-primary);color:var(--dsw-alias-state-warn-label,var(--dsw-alias-state-warn-primary));white-space:nowrap;border-radius:6px;flex:none;padding:1px 6px;font-size:11px;line-height:14px}.F1KBNa_missingHint{color:var(--dsw-alias-state-warn-label,var(--dsw-alias-state-warn-primary))}.F1KBNa_rowMeta{color:var(--dsw-alias-label-tertiary);font-variant-numeric:tabular-nums;flex:none;gap:6px;margin-left:auto;font-size:12px;line-height:16px;display:inline-flex}.F1KBNa_addCount{color:color-mix(in srgb, var(--dsw-alias-state-success-primary) 60%, var(--dsw-alias-label-primary))}.F1KBNa_delCount{color:color-mix(in srgb, var(--dsw-alias-state-error-primary) 60%, var(--dsw-alias-label-primary))}.F1KBNa_diff{background:var(--dsw-alias-markdown-code-block);flex-direction:column;flex:1;min-height:0;display:flex;position:relative;overflow:hidden}.F1KBNa_diffHeader{border-bottom:1px solid var(--dsw-alias-border-l2);align-items:center;gap:8px;padding:6px 8px;display:flex}.F1KBNa_diffPath{text-overflow:ellipsis;white-space:nowrap;min-width:0;color:var(--dsw-alias-label-primary);font:var(--dsw-font-markdown-code-block);flex:1;font-size:12px;line-height:18px;overflow:hidden}.F1KBNa_diffActions{border-bottom:1px solid var(--dsw-alias-border-l2);align-items:center;gap:8px;padding:6px 8px;display:flex}.F1KBNa_diffStats{color:var(--dsw-alias-label-tertiary);font-variant-numeric:tabular-nums;font-size:12px;line-height:16px}.F1KBNa_flexSpacer{flex:1}.F1KBNa_action{border:1px solid var(--dsw-alias-border-l1);color:var(--dsw-alias-label-primary);cursor:pointer;background:0 0;border-radius:8px;padding:3px 12px;font-family:inherit;font-size:12px;line-height:18px}.F1KBNa_action:hover:not(:disabled){background:var(--dsw-alias-interactive-bg-hover)}.F1KBNa_action:disabled{color:var(--dsw-alias-label-tertiary);cursor:default}.F1KBNa_actionPrimary{background:var(--dsw-alias-state-business-primary);border-color:var(--dsw-alias-state-business-primary);color:var(--dsw-static-neutral-bluish-50)}.F1KBNa_actionPrimary:hover:not(:disabled){background:color-mix(in srgb, var(--dsw-alias-state-business-primary) 85%, var(--dsw-static-neutral-bluish-1000))}.F1KBNa_actionPrimary:disabled{background:var(--dsw-alias-state-business-primary);color:var(--dsw-static-neutral-bluish-50);opacity:.55}.F1KBNa_iconAction{justify-content:center;align-items:center;min-height:25px;padding:4px 6px;display:inline-flex}.F1KBNa_close{cursor:pointer;width:28px;height:28px;color:var(--dsw-alias-label-tertiary);background:0 0;border:none;border-radius:28px;justify-content:center;align-items:center;padding:0;display:inline-flex}.F1KBNa_close:hover{background:var(--dsw-alias-interactive-bg-hover);color:var(--dsw-alias-label-primary)}.F1KBNa_expand{cursor:pointer;width:28px;height:28px;color:var(--dsw-alias-label-tertiary);background:0 0;border:none;border-radius:28px;justify-content:center;align-items:center;padding:0;display:inline-flex}.F1KBNa_expand:hover{background:var(--dsw-alias-interactive-bg-hover);color:var(--dsw-alias-label-primary)}.F1KBNa_expandExpanded svg{transform:rotate(180deg)}.F1KBNa_diffBodyWrap{flex:1;min-height:0;display:flex;position:relative}.F1KBNa_diffBody{min-width:0;font:var(--dsw-font-markdown-code-block);cursor:text;flex:1;padding:0;position:relative;overflow:auto}.F1KBNa_diffBody::-webkit-scrollbar,.F1KBNa_diffBody::-webkit-scrollbar-track,.F1KBNa_diffBody::-webkit-scrollbar-thumb{cursor:default}.F1KBNa_blockActions{border:1px solid var(--dsw-alias-border-l2);background:var(--dsw-alias-markdown-code-block);box-shadow:var(--dsw-shadow-lv1);z-index:2;border-radius:10px;align-items:center;gap:4px;padding:4px;display:flex;position:absolute;right:6px}.F1KBNa_overviewRuler{pointer-events:none;opacity:.5;width:4px;position:absolute;top:0;bottom:0;right:0}.F1KBNa_overviewMarker{border-radius:2px;width:100%;min-height:2px;position:absolute;right:0}.F1KBNa_markerDel{background-color:var(--dsw-alias-state-error-primary)}.F1KBNa_markerAdd{background-color:var(--dsw-alias-state-success-primary)}.F1KBNa_lines{border-spacing:0;width:max-content;min-width:100%;display:table}.F1KBNa_line{height:22px;line-height:22px;display:table-row}.F1KBNa_vSpacer{display:table-row}.F1KBNa_gutter{box-sizing:border-box;text-align:right;width:44px;color:var(--dsw-alias-label-tertiary);font-variant-numeric:tabular-nums;user-select:none;cursor:default;padding-right:10px;display:table-cell}.F1KBNa_code{white-space:pre;display:table-cell}.F1KBNa_context{color:var(--dsw-alias-label-primary)}.F1KBNa_del{background-color:color-mix(in srgb, var(--dsw-alias-state-error-primary) 12%, transparent)}.F1KBNa_add{background-color:color-mix(in srgb, var(--dsw-alias-state-success-primary) 10%, transparent)}.F1KBNa_statusBar{box-sizing:border-box;border-top:1px solid var(--dsw-alias-border-l2);height:34px;color:var(--dsw-alias-label-tertiary);font-family:var(--dsw-font-markdown-code-block);font-variant-numeric:tabular-nums;flex:none;align-items:center;padding:0 8px;font-size:12px;line-height:18px;display:flex}.F1KBNa_statusAction{border:1px solid var(--dsw-alias-border-l1);color:var(--dsw-alias-label-primary);white-space:nowrap;cursor:pointer;background:0 0;border-radius:8px;padding:3px 12px;font-family:inherit;font-size:12px;line-height:18px}.F1KBNa_statusAction:hover{background:var(--dsw-alias-interactive-bg-hover)}.F1KBNa_langSelect{border:1px solid var(--dsw-alias-border-l1);color:var(--dsw-alias-label-primary);cursor:pointer;background:0 0;border-radius:8px;flex:none;align-items:center;gap:4px;padding:3px 12px;font-family:inherit;font-size:12px;line-height:18px;display:inline-flex}.F1KBNa_langSelect:hover{background:var(--dsw-alias-interactive-bg-hover)}.F1KBNa_langLabel{text-overflow:ellipsis;white-space:nowrap;max-width:140px;overflow:hidden}";
|
|
11624
|
+
const css = ".F1KBNa_layer{box-sizing:border-box;flex:none;align-items:center;width:calc(100% + 8px);height:42px;margin:4px -4px;display:flex;position:relative}.F1KBNa_footerButtons{align-items:center;width:100%;display:flex}.F1KBNa_badge{box-sizing:border-box;width:100%;height:42px;color:var(--dsw-alias-label-primary);cursor:pointer;background:0 0;border:none;border-radius:12px;align-items:center;gap:8px;padding:0 10px 0 8px;font-family:inherit;font-size:14px;line-height:22px;display:flex;overflow:hidden}.F1KBNa_badge:hover{background:var(--dsw-alias-interactive-bg-hover)}.F1KBNa_badge[data-active]{background:var(--dsw-alias-interactive-bg-hover-solid)}.F1KBNa_badgeLabel{text-overflow:ellipsis;white-space:nowrap;min-width:0;overflow:hidden}.F1KBNa_badgeCount{color:var(--dsw-alias-label-tertiary);font-variant-numeric:tabular-nums;flex:none;margin-left:auto;font-size:12px;line-height:16px}.F1KBNa_layer.F1KBNa_rail{width:36px;height:36px;margin:8px 0 10px}.F1KBNa_rail .F1KBNa_badge{border-radius:50%;justify-content:center;gap:0;width:36px;height:36px;padding:0}.F1KBNa_rail .F1KBNa_badgeLabel{display:none}.F1KBNa_rail .F1KBNa_badgeCount{box-sizing:border-box;background:var(--dsw-alias-state-business-primary);min-width:18px;height:18px;color:var(--dsw-alias-label-primary-foreground);font-variant-numeric:tabular-nums;border-radius:9px;justify-content:center;align-items:center;padding:0 4px;font-size:11px;line-height:18px;display:flex;position:absolute;top:-3px;right:-7px}.F1KBNa_panel{z-index:30;border:1px solid var(--dsw-alias-border-l1);background:var(--dsw-alias-bg-base);width:auto;max-width:none;box-shadow:var(--dsw-shadow-lv2);--dsh-scrollbar-thumb:var(--dsw-alias-scrollbar-bg-l2);--dsh-scrollbar-thumb-hover:var(--dsw-alias-scrollbar-hover-l2);border-radius:12px;flex-direction:column;display:flex;position:fixed;inset:8px 8px 128px;overflow:hidden}.F1KBNa_header{box-sizing:border-box;border-bottom:1px solid var(--dsw-alias-border-l2);background:var(--dsw-alias-bg-base);flex:none;justify-content:space-between;align-items:center;min-height:44px;padding:10px 12px;display:flex}.F1KBNa_headerActions{align-items:center;gap:2px;display:flex}.F1KBNa_states{flex:1;min-height:0;padding:4px 12px 12px;overflow-y:auto}.F1KBNa_split{flex:1;align-items:stretch;min-height:0;display:flex}.F1KBNa_fileList{box-sizing:border-box;border-right:1px solid var(--dsw-alias-border-l2);flex:none;width:240px;min-height:0;padding:4px 8px 12px;overflow-y:auto}.F1KBNa_resizeHandle{cursor:col-resize;background:0 0;flex:none;width:5px;margin:0 -2px}.F1KBNa_resizeHandle:hover{background:var(--dsw-alias-border-l2)}.F1KBNa_detail{flex-direction:column;flex:1;min-width:0;min-height:0;display:flex}.F1KBNa_detailEmpty{color:var(--dsw-alias-label-tertiary);text-align:center;flex:1;justify-content:center;align-items:center;margin:0;padding:24px;font-size:12px;line-height:18px;display:flex}.F1KBNa_title{color:var(--dsw-alias-label-primary);font-size:13px;font-weight:500;line-height:20px}.F1KBNa_note,.F1KBNa_readError,.F1KBNa_hint{color:var(--dsw-alias-label-tertiary);margin:4px 0;font-size:12px;line-height:18px}.F1KBNa_readError{color:var(--dsw-alias-state-error-primary)}.F1KBNa_group{color:var(--dsw-alias-label-tertiary);margin:8px 0 4px;font-size:12px;font-weight:500;line-height:16px}.F1KBNa_rows{margin:0;padding:0;list-style:none}.F1KBNa_row{border:1px solid #0000;border-radius:10px;margin:2px 0}.F1KBNa_rowHead{width:100%;color:var(--dsw-alias-label-primary);font:inherit;text-align:left;cursor:pointer;background:0 0;border:none;border-radius:10px;align-items:baseline;gap:8px;padding:6px 8px;display:flex}.F1KBNa_rowHead:hover{background:var(--dsw-alias-interactive-bg-hover-solid)}.F1KBNa_rowHead[data-selected]{background:var(--dsw-alias-interactive-bg-hover)}.F1KBNa_rowPath{text-overflow:ellipsis;white-space:nowrap;min-width:0;font:var(--dsw-font-markdown-code-block);overflow:hidden}.F1KBNa_kindTag{border:1px solid var(--dsw-alias-border-l1);color:var(--dsw-alias-label-tertiary);white-space:nowrap;border-radius:6px;flex:none;padding:1px 6px;font-size:11px;line-height:14px}.F1KBNa_kindHint{color:var(--dsw-alias-label-tertiary);flex:none;font-size:12px;line-height:16px}.F1KBNa_divergedHint,.F1KBNa_missingHint{border-bottom:1px solid var(--dsw-alias-border-l2);margin:0;padding:6px 8px;font-size:12px;line-height:18px}.F1KBNa_missing{border:1px solid var(--dsw-alias-state-warn-primary);color:var(--dsw-alias-state-warn-label,var(--dsw-alias-state-warn-primary));white-space:nowrap;border-radius:6px;flex:none;padding:1px 6px;font-size:11px;line-height:14px}.F1KBNa_missingHint{color:var(--dsw-alias-state-warn-label,var(--dsw-alias-state-warn-primary))}.F1KBNa_rowMeta{color:var(--dsw-alias-label-tertiary);font-variant-numeric:tabular-nums;flex:none;gap:6px;margin-left:auto;font-size:12px;line-height:16px;display:inline-flex}.F1KBNa_addCount{color:color-mix(in srgb, var(--dsw-alias-state-success-primary) 60%, var(--dsw-alias-label-primary))}.F1KBNa_delCount{color:color-mix(in srgb, var(--dsw-alias-state-error-primary) 60%, var(--dsw-alias-label-primary))}.F1KBNa_diff{background:var(--dsw-alias-markdown-code-block);flex-direction:column;flex:1;min-height:0;display:flex;position:relative;overflow:hidden}.F1KBNa_diffHeader{border-bottom:1px solid var(--dsw-alias-border-l2);align-items:center;gap:8px;padding:6px 8px;display:flex}.F1KBNa_diffPath{text-overflow:ellipsis;white-space:nowrap;min-width:0;color:var(--dsw-alias-label-primary);font:var(--dsw-font-markdown-code-block);flex:1;font-size:12px;line-height:18px;overflow:hidden}.F1KBNa_diffActions{border-bottom:1px solid var(--dsw-alias-border-l2);align-items:center;gap:8px;padding:6px 8px;display:flex}.F1KBNa_diffStats{color:var(--dsw-alias-label-tertiary);font-variant-numeric:tabular-nums;font-size:12px;line-height:16px}.F1KBNa_flexSpacer{flex:1}.F1KBNa_action{border:1px solid var(--dsw-alias-border-l1);color:var(--dsw-alias-label-primary);cursor:pointer;background:0 0;border-radius:8px;padding:3px 12px;font-family:inherit;font-size:12px;line-height:18px}.F1KBNa_action:hover:not(:disabled){background:var(--dsw-alias-interactive-bg-hover)}.F1KBNa_action:disabled{color:var(--dsw-alias-label-tertiary);cursor:default}.F1KBNa_actionPrimary{background:var(--dsw-alias-state-business-primary);border-color:var(--dsw-alias-state-business-primary);color:var(--dsw-static-neutral-bluish-50)}.F1KBNa_actionPrimary:hover:not(:disabled){background:color-mix(in srgb, var(--dsw-alias-state-business-primary) 85%, var(--dsw-static-neutral-bluish-1000))}.F1KBNa_actionPrimary:disabled{background:var(--dsw-alias-state-business-primary);color:var(--dsw-static-neutral-bluish-50);opacity:.55}.F1KBNa_iconAction{justify-content:center;align-items:center;min-height:25px;padding:4px 6px;display:inline-flex}.F1KBNa_close{cursor:pointer;width:28px;height:28px;color:var(--dsw-alias-label-tertiary);background:0 0;border:none;border-radius:28px;justify-content:center;align-items:center;padding:0;display:inline-flex}.F1KBNa_close:hover{background:var(--dsw-alias-interactive-bg-hover);color:var(--dsw-alias-label-primary)}.F1KBNa_expand{cursor:pointer;width:28px;height:28px;color:var(--dsw-alias-label-tertiary);background:0 0;border:none;border-radius:28px;justify-content:center;align-items:center;padding:0;display:inline-flex}.F1KBNa_expand:hover{background:var(--dsw-alias-interactive-bg-hover);color:var(--dsw-alias-label-primary)}.F1KBNa_expandExpanded svg{transform:rotate(180deg)}.F1KBNa_diffBodyWrap{flex:1;min-height:0;display:flex;position:relative}.F1KBNa_diffBody{min-width:0;font:var(--dsw-font-markdown-code-block);cursor:text;flex:1;padding:0;position:relative;overflow:auto}.F1KBNa_diffBody::-webkit-scrollbar,.F1KBNa_diffBody::-webkit-scrollbar-track,.F1KBNa_diffBody::-webkit-scrollbar-thumb{cursor:default}.F1KBNa_blockActions{border:1px solid var(--dsw-alias-border-l2);background:var(--dsw-alias-markdown-code-block);box-shadow:var(--dsw-shadow-lv1);z-index:2;border-radius:10px;align-items:center;gap:9px;padding:5px;display:flex;position:absolute;right:8px}.F1KBNa_blockPosition{color:var(--dsw-alias-label-tertiary);font-variant-numeric:tabular-nums;white-space:nowrap;margin-top:1px;margin-left:7px;font-size:12px;line-height:16px}.F1KBNa_searchBar{z-index:3;border:1px solid var(--dsw-alias-border-l2);background:var(--dsw-alias-markdown-code-block);box-shadow:var(--dsw-shadow-lv1);border-radius:10px;align-items:center;gap:4px;padding:4px;display:flex;position:absolute;top:8px;right:8px}.F1KBNa_searchInput{border:1px solid var(--dsw-alias-border-l2);background:var(--dsw-alias-bg-base);width:150px;color:var(--dsw-alias-label-primary);border-radius:6px;outline:none;padding:3px 8px;font-family:inherit;font-size:12px;line-height:18px}.F1KBNa_searchInput:focus{border-color:var(--dsw-alias-state-business-primary)}.F1KBNa_searchCount{text-align:center;min-width:34px;color:var(--dsw-alias-label-tertiary);font-variant-numeric:tabular-nums;white-space:nowrap;font-size:12px;line-height:16px}.F1KBNa_diffBody [data-diff-search=hit]{background-image:linear-gradient(#facc1529,#facc1529)}.F1KBNa_diffBody [data-diff-search=current]{background-image:linear-gradient(#facc1552,#facc1552)}.F1KBNa_overviewRuler{pointer-events:none;opacity:.5;width:4px;position:absolute;top:0;bottom:0;right:0}.F1KBNa_overviewMarker{border-radius:2px;width:100%;min-height:2px;position:absolute;right:0}.F1KBNa_markerDel{background-color:var(--dsw-alias-state-error-primary)}.F1KBNa_markerAdd{background-color:var(--dsw-alias-state-success-primary)}.F1KBNa_lines{border-spacing:0;width:max-content;min-width:100%;display:table}.F1KBNa_line{height:22px;line-height:22px;display:table-row}.F1KBNa_vSpacer{display:table-row}.F1KBNa_gutter{box-sizing:border-box;text-align:right;width:44px;color:var(--dsw-alias-label-tertiary);font-variant-numeric:tabular-nums;user-select:none;cursor:default;padding-right:10px;display:table-cell}.F1KBNa_code{white-space:pre;display:table-cell}.F1KBNa_context{color:var(--dsw-alias-label-primary)}.F1KBNa_del{background-color:color-mix(in srgb, var(--dsw-alias-state-error-primary) 12%, transparent)}.F1KBNa_add{background-color:color-mix(in srgb, var(--dsw-alias-state-success-primary) 10%, transparent)}.F1KBNa_statusBar{box-sizing:border-box;border-top:1px solid var(--dsw-alias-border-l2);height:34px;color:var(--dsw-alias-label-tertiary);font-family:var(--dsw-font-markdown-code-block);font-variant-numeric:tabular-nums;flex:none;align-items:center;padding:0 8px;font-size:12px;line-height:18px;display:flex}.F1KBNa_statusAction{border:1px solid var(--dsw-alias-border-l1);color:var(--dsw-alias-label-primary);white-space:nowrap;cursor:pointer;background:0 0;border-radius:8px;padding:3px 12px;font-family:inherit;font-size:12px;line-height:18px}.F1KBNa_statusAction:hover{background:var(--dsw-alias-interactive-bg-hover)}.F1KBNa_langSelect{border:1px solid var(--dsw-alias-border-l1);color:var(--dsw-alias-label-primary);cursor:pointer;background:0 0;border-radius:8px;flex:none;align-items:center;gap:4px;padding:3px 12px;font-family:inherit;font-size:12px;line-height:18px;display:inline-flex}.F1KBNa_langSelect:hover{background:var(--dsw-alias-interactive-bg-hover)}.F1KBNa_langLabel{text-overflow:ellipsis;white-space:nowrap;max-width:140px;overflow:hidden}";
|
|
11625
11625
|
const tagId = "dsh-diff-approval/PendingPanel.module.css";
|
|
11626
11626
|
if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=" + JSON.stringify(tagId) + "]") === null) {
|
|
11627
11627
|
const tag = document.createElement("style");
|
|
@@ -11631,69 +11631,73 @@ XID_Start XIDS`.split(/\s/).map((p) => [w(p), p]));
|
|
|
11631
11631
|
document.head.appendChild(tag);
|
|
11632
11632
|
}
|
|
11633
11633
|
var PendingPanel_module_css_default = {
|
|
11634
|
-
"
|
|
11635
|
-
"
|
|
11636
|
-
"
|
|
11637
|
-
"
|
|
11634
|
+
"gutter": "F1KBNa_gutter",
|
|
11635
|
+
"missingHint": "F1KBNa_missingHint",
|
|
11636
|
+
"searchCount": "F1KBNa_searchCount",
|
|
11637
|
+
"hint": "F1KBNa_hint",
|
|
11638
|
+
"layer": "F1KBNa_layer",
|
|
11639
|
+
"footerButtons": "F1KBNa_footerButtons",
|
|
11640
|
+
"langSelect": "F1KBNa_langSelect",
|
|
11641
|
+
"addCount": "F1KBNa_addCount",
|
|
11638
11642
|
"rowPath": "F1KBNa_rowPath",
|
|
11639
|
-
"
|
|
11640
|
-
"
|
|
11641
|
-
"headerActions": "F1KBNa_headerActions",
|
|
11643
|
+
"context": "F1KBNa_context",
|
|
11644
|
+
"kindTag": "F1KBNa_kindTag",
|
|
11642
11645
|
"states": "F1KBNa_states",
|
|
11643
|
-
"
|
|
11644
|
-
"markerDel": "F1KBNa_markerDel",
|
|
11645
|
-
"close": "F1KBNa_close",
|
|
11646
|
-
"markerAdd": "F1KBNa_markerAdd",
|
|
11647
|
-
"statusBar": "F1KBNa_statusBar",
|
|
11646
|
+
"resizeHandle": "F1KBNa_resizeHandle",
|
|
11648
11647
|
"diffStats": "F1KBNa_diffStats",
|
|
11649
|
-
"
|
|
11650
|
-
"
|
|
11651
|
-
"row": "F1KBNa_row",
|
|
11652
|
-
"delCount": "F1KBNa_delCount",
|
|
11648
|
+
"del": "F1KBNa_del",
|
|
11649
|
+
"searchInput": "F1KBNa_searchInput",
|
|
11653
11650
|
"expand": "F1KBNa_expand",
|
|
11654
|
-
"
|
|
11655
|
-
"
|
|
11656
|
-
"
|
|
11657
|
-
"
|
|
11658
|
-
"kindTag": "F1KBNa_kindTag",
|
|
11659
|
-
"langLabel": "F1KBNa_langLabel",
|
|
11660
|
-
"flexSpacer": "F1KBNa_flexSpacer",
|
|
11661
|
-
"add": "F1KBNa_add",
|
|
11662
|
-
"badgeLabel": "F1KBNa_badgeLabel",
|
|
11663
|
-
"diffPath": "F1KBNa_diffPath",
|
|
11651
|
+
"searchBar": "F1KBNa_searchBar",
|
|
11652
|
+
"markerDel": "F1KBNa_markerDel",
|
|
11653
|
+
"title": "F1KBNa_title",
|
|
11654
|
+
"vSpacer": "F1KBNa_vSpacer",
|
|
11664
11655
|
"badgeCount": "F1KBNa_badgeCount",
|
|
11665
|
-
"
|
|
11656
|
+
"kindHint": "F1KBNa_kindHint",
|
|
11666
11657
|
"rail": "F1KBNa_rail",
|
|
11667
|
-
"
|
|
11668
|
-
"
|
|
11658
|
+
"expandExpanded": "F1KBNa_expandExpanded",
|
|
11659
|
+
"action": "F1KBNa_action",
|
|
11660
|
+
"diffHeader": "F1KBNa_diffHeader",
|
|
11661
|
+
"fileList": "F1KBNa_fileList",
|
|
11662
|
+
"diffActions": "F1KBNa_diffActions",
|
|
11663
|
+
"readError": "F1KBNa_readError",
|
|
11664
|
+
"note": "F1KBNa_note",
|
|
11665
|
+
"line": "F1KBNa_line",
|
|
11666
|
+
"divergedHint": "F1KBNa_divergedHint",
|
|
11667
|
+
"group": "F1KBNa_group",
|
|
11668
|
+
"diff": "F1KBNa_diff",
|
|
11669
11669
|
"code": "F1KBNa_code",
|
|
11670
|
+
"headerActions": "F1KBNa_headerActions",
|
|
11670
11671
|
"detail": "F1KBNa_detail",
|
|
11671
|
-
"
|
|
11672
|
-
"
|
|
11673
|
-
"
|
|
11674
|
-
"statusAction": "F1KBNa_statusAction",
|
|
11675
|
-
"panel": "F1KBNa_panel",
|
|
11676
|
-
"overviewMarker": "F1KBNa_overviewMarker",
|
|
11677
|
-
"blockActions": "F1KBNa_blockActions",
|
|
11672
|
+
"missing": "F1KBNa_missing",
|
|
11673
|
+
"add": "F1KBNa_add",
|
|
11674
|
+
"badgeLabel": "F1KBNa_badgeLabel",
|
|
11678
11675
|
"iconAction": "F1KBNa_iconAction",
|
|
11679
|
-
"
|
|
11680
|
-
"
|
|
11681
|
-
"
|
|
11682
|
-
"
|
|
11683
|
-
"
|
|
11676
|
+
"markerAdd": "F1KBNa_markerAdd",
|
|
11677
|
+
"row": "F1KBNa_row",
|
|
11678
|
+
"diffBody": "F1KBNa_diffBody",
|
|
11679
|
+
"langLabel": "F1KBNa_langLabel",
|
|
11680
|
+
"lines": "F1KBNa_lines",
|
|
11681
|
+
"panel": "F1KBNa_panel",
|
|
11684
11682
|
"split": "F1KBNa_split",
|
|
11685
|
-
"
|
|
11683
|
+
"badge": "F1KBNa_badge",
|
|
11684
|
+
"delCount": "F1KBNa_delCount",
|
|
11686
11685
|
"overviewRuler": "F1KBNa_overviewRuler",
|
|
11687
11686
|
"rowMeta": "F1KBNa_rowMeta",
|
|
11688
|
-
"
|
|
11689
|
-
"
|
|
11690
|
-
"fileList": "F1KBNa_fileList",
|
|
11691
|
-
"actionPrimary": "F1KBNa_actionPrimary",
|
|
11692
|
-
"kindHint": "F1KBNa_kindHint",
|
|
11687
|
+
"blockActions": "F1KBNa_blockActions",
|
|
11688
|
+
"rows": "F1KBNa_rows",
|
|
11693
11689
|
"diffBodyWrap": "F1KBNa_diffBodyWrap",
|
|
11694
|
-
"
|
|
11695
|
-
"
|
|
11696
|
-
"
|
|
11690
|
+
"detailEmpty": "F1KBNa_detailEmpty",
|
|
11691
|
+
"close": "F1KBNa_close",
|
|
11692
|
+
"statusBar": "F1KBNa_statusBar",
|
|
11693
|
+
"actionPrimary": "F1KBNa_actionPrimary",
|
|
11694
|
+
"rowHead": "F1KBNa_rowHead",
|
|
11695
|
+
"statusAction": "F1KBNa_statusAction",
|
|
11696
|
+
"diffPath": "F1KBNa_diffPath",
|
|
11697
|
+
"flexSpacer": "F1KBNa_flexSpacer",
|
|
11698
|
+
"blockPosition": "F1KBNa_blockPosition",
|
|
11699
|
+
"header": "F1KBNa_header",
|
|
11700
|
+
"overviewMarker": "F1KBNa_overviewMarker"
|
|
11697
11701
|
};
|
|
11698
11702
|
//#endregion
|
|
11699
11703
|
//#region lib/types/client/PendingPanel.js
|
|
@@ -11729,6 +11733,10 @@ XID_Start XIDS`.split(/\s/).map((p) => [w(p), p]));
|
|
|
11729
11733
|
const ROW_HEIGHT_PX = 22;
|
|
11730
11734
|
/** Rows rendered beyond the visible window in each direction. */
|
|
11731
11735
|
const OVERSCAN_ROWS = 8;
|
|
11736
|
+
/** Height of the floating per-block Keep/Revert frame in px: 26px actions +
|
|
11737
|
+
* 5px frame padding on each side + 1px border on each side, plus a little
|
|
11738
|
+
* breathing room so the bottom padding never sits flush against it. */
|
|
11739
|
+
const BLOCK_ACTIONS_FRAME_PX = 40;
|
|
11732
11740
|
/** The trailing file-name segment of a path, used for row display. */
|
|
11733
11741
|
function basenameOf(path) {
|
|
11734
11742
|
const index = Math.max(path.lastIndexOf("/"), path.lastIndexOf("\\"));
|
|
@@ -11745,7 +11753,7 @@ XID_Start XIDS`.split(/\s/).map((p) => [w(p), p]));
|
|
|
11745
11753
|
* does not re-render rows whose content, highlight, and focus are unchanged.
|
|
11746
11754
|
*/
|
|
11747
11755
|
const DiffRow = (0, react.memo)(function DiffRow(props) {
|
|
11748
|
-
const { index, row, runs, focused, onRowHover } = props;
|
|
11756
|
+
const { index, row, runs, focused, searchHit, searchCurrent, onRowHover } = props;
|
|
11749
11757
|
const lineNumber = row.kind === "del" ? row.oldLine : row.newLine;
|
|
11750
11758
|
const sideRuns = row.kind === "del" ? runs?.oldRuns : runs?.newRuns;
|
|
11751
11759
|
const lineRuns = lineNumber === void 0 ? void 0 : sideRuns?.[lineNumber - 1];
|
|
@@ -11758,6 +11766,7 @@ XID_Start XIDS`.split(/\s/).map((p) => [w(p), p]));
|
|
|
11758
11766
|
"data-diff-line": row.kind,
|
|
11759
11767
|
"data-diff-row": index,
|
|
11760
11768
|
"data-diff-focused": focused ? "" : void 0,
|
|
11769
|
+
"data-diff-search": searchHit ? searchCurrent ? "current" : "hit" : void 0,
|
|
11761
11770
|
onMouseEnter: () => {
|
|
11762
11771
|
onRowHover(index);
|
|
11763
11772
|
},
|
|
@@ -11945,7 +11954,7 @@ XID_Start XIDS`.split(/\s/).map((p) => [w(p), p]));
|
|
|
11945
11954
|
});
|
|
11946
11955
|
}
|
|
11947
11956
|
/** The selected file's diff, actions, jump controls, and copy toolbar. */
|
|
11948
|
-
function PendingDiff({ file, busy, workspacePath, t, onKeep, onRevert, onBlockKeep, onBlockRevert, onOpen }) {
|
|
11957
|
+
function PendingDiff({ file, busy, workspacePath, jumpSignal, t, onKeep, onRevert, onBlockKeep, onBlockRevert, onOpen }) {
|
|
11949
11958
|
const [langOverride, setLangOverride] = (0, react.useState)(void 0);
|
|
11950
11959
|
const [langMenuOpen, setLangMenuOpen] = (0, react.useState)(false);
|
|
11951
11960
|
const langMenuItems = (0, react.useMemo)(() => [{
|
|
@@ -12026,6 +12035,10 @@ XID_Start XIDS`.split(/\s/).map((p) => [w(p), p]));
|
|
|
12026
12035
|
const [hoveredBlock, setHoveredBlock] = (0, react.useState)(void 0);
|
|
12027
12036
|
const [selection, setSelection] = (0, react.useState)(void 0);
|
|
12028
12037
|
const [copied, setCopied] = (0, react.useState)(false);
|
|
12038
|
+
const [searchOpen, setSearchOpen] = (0, react.useState)(false);
|
|
12039
|
+
const [searchQuery, setSearchQuery] = (0, react.useState)("");
|
|
12040
|
+
const [searchIndex, setSearchIndex] = (0, react.useState)(0);
|
|
12041
|
+
const searchInputRef = (0, react.useRef)(null);
|
|
12029
12042
|
(0, react.useEffect)(() => {
|
|
12030
12043
|
setFocus(0);
|
|
12031
12044
|
setScrollTop(0);
|
|
@@ -12035,10 +12048,54 @@ XID_Start XIDS`.split(/\s/).map((p) => [w(p), p]));
|
|
|
12035
12048
|
setLangOverride(void 0);
|
|
12036
12049
|
setLangMenuOpen(false);
|
|
12037
12050
|
setCopied(false);
|
|
12051
|
+
setSearchOpen(false);
|
|
12052
|
+
setSearchQuery("");
|
|
12053
|
+
setSearchIndex(0);
|
|
12038
12054
|
}, [file.id]);
|
|
12039
12055
|
const blockRanges = (0, react.useMemo)(() => {
|
|
12040
12056
|
return model.blocks.map((block) => blockRangesOf(model.diff.rows, block));
|
|
12041
12057
|
}, [model]);
|
|
12058
|
+
const searchMatches = (0, react.useMemo)(() => {
|
|
12059
|
+
if (searchQuery === "") return [];
|
|
12060
|
+
const lower = searchQuery.toLowerCase();
|
|
12061
|
+
const matches = [];
|
|
12062
|
+
for (let index = 0; index < model.diff.rows.length; index++) if (model.diff.rows[index].text.toLowerCase().includes(lower)) matches.push(index);
|
|
12063
|
+
return matches;
|
|
12064
|
+
}, [model, searchQuery]);
|
|
12065
|
+
const searchHitSet = (0, react.useMemo)(() => new Set(searchMatches), [searchMatches]);
|
|
12066
|
+
const currentSearchRow = searchMatches.length === 0 ? void 0 : searchMatches[searchIndex % searchMatches.length];
|
|
12067
|
+
const goSearch = (direction) => {
|
|
12068
|
+
if (searchMatches.length === 0) return;
|
|
12069
|
+
setSearchIndex((current) => (current + direction + searchMatches.length) % searchMatches.length);
|
|
12070
|
+
};
|
|
12071
|
+
const toggleSearch = () => {
|
|
12072
|
+
if (searchOpen) {
|
|
12073
|
+
setSearchOpen(false);
|
|
12074
|
+
setSearchQuery("");
|
|
12075
|
+
setSearchIndex(0);
|
|
12076
|
+
} else setSearchOpen(true);
|
|
12077
|
+
};
|
|
12078
|
+
const closeSearch = () => {
|
|
12079
|
+
setSearchOpen(false);
|
|
12080
|
+
setSearchQuery("");
|
|
12081
|
+
setSearchIndex(0);
|
|
12082
|
+
};
|
|
12083
|
+
(0, react.useEffect)(() => {
|
|
12084
|
+
if (searchOpen) searchInputRef.current?.focus();
|
|
12085
|
+
}, [searchOpen]);
|
|
12086
|
+
(0, react.useEffect)(() => {
|
|
12087
|
+
setSearchIndex(0);
|
|
12088
|
+
}, [searchQuery, file.id]);
|
|
12089
|
+
(0, react.useEffect)(() => {
|
|
12090
|
+
const row = currentSearchRow;
|
|
12091
|
+
if (row === void 0) return;
|
|
12092
|
+
const body = bodyRef.current;
|
|
12093
|
+
if (body === null) return;
|
|
12094
|
+
const target = row * ROW_HEIGHT_PX + ROW_HEIGHT_PX / 2 - body.clientHeight / 2;
|
|
12095
|
+
const clamped = Math.max(0, Math.min(target, body.scrollHeight - body.clientHeight));
|
|
12096
|
+
if (body.scrollTop !== clamped) body.scrollTop = clamped;
|
|
12097
|
+
setScrollTop(clamped);
|
|
12098
|
+
}, [currentSearchRow, searchMatches]);
|
|
12042
12099
|
const blockIndexByRow = (0, react.useMemo)(() => {
|
|
12043
12100
|
const map = /* @__PURE__ */ new Map();
|
|
12044
12101
|
model.blocks.forEach((block, blockIndex) => {
|
|
@@ -12055,6 +12112,8 @@ XID_Start XIDS`.split(/\s/).map((p) => [w(p), p]));
|
|
|
12055
12112
|
const start = Math.max(0, Math.floor(scrollTop / ROW_HEIGHT_PX) - OVERSCAN_ROWS);
|
|
12056
12113
|
const end = Math.min(rowCount, Math.ceil((scrollTop + viewport) / ROW_HEIGHT_PX) + OVERSCAN_ROWS);
|
|
12057
12114
|
const visibleRows = rows.slice(start, end);
|
|
12115
|
+
const hoveredBlockEnd = hoveredBlock !== void 0 ? model.blocks[hoveredBlock]?.end : void 0;
|
|
12116
|
+
const blockActionsPadPx = hoveredBlockEnd === void 0 ? 0 : Math.max(0, (hoveredBlockEnd + 1) * ROW_HEIGHT_PX + BLOCK_ACTIONS_FRAME_PX - rowCount * ROW_HEIGHT_PX);
|
|
12058
12117
|
const widestLine = (0, react.useMemo)(() => {
|
|
12059
12118
|
let widest = 0;
|
|
12060
12119
|
for (const row of model.diff.rows) if (row.text.length > widest) widest = row.text.length;
|
|
@@ -12103,6 +12162,10 @@ XID_Start XIDS`.split(/\s/).map((p) => [w(p), p]));
|
|
|
12103
12162
|
});
|
|
12104
12163
|
setScrollTick((tick) => tick + 1);
|
|
12105
12164
|
};
|
|
12165
|
+
(0, react.useEffect)(() => {
|
|
12166
|
+
if (jumpSignal === 0) return;
|
|
12167
|
+
jump(1);
|
|
12168
|
+
}, [jumpSignal]);
|
|
12106
12169
|
const onScroll = () => {
|
|
12107
12170
|
const body = bodyRef.current;
|
|
12108
12171
|
if (body === null) return;
|
|
@@ -12144,6 +12207,20 @@ XID_Start XIDS`.split(/\s/).map((p) => [w(p), p]));
|
|
|
12144
12207
|
document.removeEventListener("keydown", onKeyDown);
|
|
12145
12208
|
};
|
|
12146
12209
|
}, [copySelection]);
|
|
12210
|
+
(0, react.useEffect)(() => {
|
|
12211
|
+
const onKeyDown = (event) => {
|
|
12212
|
+
if (!(event.ctrlKey || event.metaKey) || event.altKey || event.shiftKey) return;
|
|
12213
|
+
if (event.key.toLowerCase() !== "f") return;
|
|
12214
|
+
event.preventDefault();
|
|
12215
|
+
setSearchOpen(true);
|
|
12216
|
+
searchInputRef.current?.focus();
|
|
12217
|
+
searchInputRef.current?.select();
|
|
12218
|
+
};
|
|
12219
|
+
window.addEventListener("keydown", onKeyDown, true);
|
|
12220
|
+
return () => {
|
|
12221
|
+
window.removeEventListener("keydown", onKeyDown, true);
|
|
12222
|
+
};
|
|
12223
|
+
}, []);
|
|
12147
12224
|
const focusedBlock = model.blocks.length > 0 ? model.blocks[focus] : void 0;
|
|
12148
12225
|
const inFocusedBlock = (index) => focusedBlock !== void 0 && index >= focusedBlock.start && index <= focusedBlock.end;
|
|
12149
12226
|
return (0, react_jsx_runtime.jsxs)("div", {
|
|
@@ -12234,6 +12311,19 @@ XID_Start XIDS`.split(/\s/).map((p) => [w(p), p]));
|
|
|
12234
12311
|
children: (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconChevronDownOutline14, { size: 14 })
|
|
12235
12312
|
})
|
|
12236
12313
|
})] }),
|
|
12314
|
+
(0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Tooltip, {
|
|
12315
|
+
label: t("action.search"),
|
|
12316
|
+
side: "bottom",
|
|
12317
|
+
delayMs: 500,
|
|
12318
|
+
children: (0, react_jsx_runtime.jsx)("button", {
|
|
12319
|
+
type: "button",
|
|
12320
|
+
className: `${PendingPanel_module_css_default.action} ${PendingPanel_module_css_default.iconAction}`,
|
|
12321
|
+
"data-diff-search-toggle": true,
|
|
12322
|
+
"aria-label": t("action.search"),
|
|
12323
|
+
onClick: toggleSearch,
|
|
12324
|
+
children: (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconSearchOutline16, { size: 14 })
|
|
12325
|
+
})
|
|
12326
|
+
}),
|
|
12237
12327
|
(0, react_jsx_runtime.jsx)("span", { className: PendingPanel_module_css_default.flexSpacer }),
|
|
12238
12328
|
(0, react_jsx_runtime.jsx)("button", {
|
|
12239
12329
|
type: "button",
|
|
@@ -12263,76 +12353,154 @@ XID_Start XIDS`.split(/\s/).map((p) => [w(p), p]));
|
|
|
12263
12353
|
}),
|
|
12264
12354
|
(0, react_jsx_runtime.jsxs)("div", {
|
|
12265
12355
|
className: PendingPanel_module_css_default.diffBodyWrap,
|
|
12266
|
-
children: [
|
|
12267
|
-
|
|
12268
|
-
|
|
12269
|
-
|
|
12270
|
-
|
|
12271
|
-
|
|
12272
|
-
|
|
12273
|
-
|
|
12274
|
-
|
|
12275
|
-
|
|
12276
|
-
|
|
12356
|
+
children: [
|
|
12357
|
+
(0, react_jsx_runtime.jsxs)("div", {
|
|
12358
|
+
className: PendingPanel_module_css_default.diffBody,
|
|
12359
|
+
ref: bodyRef,
|
|
12360
|
+
onScroll,
|
|
12361
|
+
onMouseLeave: () => {
|
|
12362
|
+
setHoveredBlock(void 0);
|
|
12363
|
+
},
|
|
12364
|
+
"data-diff-body": true,
|
|
12365
|
+
children: [(0, react_jsx_runtime.jsxs)("div", {
|
|
12366
|
+
className: PendingPanel_module_css_default.lines,
|
|
12367
|
+
style: { minWidth: `max(100%, ${widestLine}ch)` },
|
|
12368
|
+
children: [
|
|
12369
|
+
start > 0 && (0, react_jsx_runtime.jsx)("div", {
|
|
12370
|
+
className: PendingPanel_module_css_default.vSpacer,
|
|
12371
|
+
style: { height: start * ROW_HEIGHT_PX },
|
|
12372
|
+
"aria-hidden": "true"
|
|
12373
|
+
}),
|
|
12374
|
+
visibleRows.map((row, offset) => {
|
|
12375
|
+
const index = start + offset;
|
|
12376
|
+
return (0, react_jsx_runtime.jsx)(DiffRow, {
|
|
12377
|
+
index,
|
|
12378
|
+
row,
|
|
12379
|
+
runs,
|
|
12380
|
+
focused: inFocusedBlock(index),
|
|
12381
|
+
searchHit: searchHitSet.has(index),
|
|
12382
|
+
searchCurrent: index === currentSearchRow,
|
|
12383
|
+
onRowHover
|
|
12384
|
+
}, index);
|
|
12385
|
+
}),
|
|
12386
|
+
end < rowCount && (0, react_jsx_runtime.jsx)("div", {
|
|
12387
|
+
className: PendingPanel_module_css_default.vSpacer,
|
|
12388
|
+
style: { height: (rowCount - end) * ROW_HEIGHT_PX },
|
|
12389
|
+
"aria-hidden": "true"
|
|
12390
|
+
}),
|
|
12391
|
+
blockActionsPadPx > 0 && (0, react_jsx_runtime.jsx)("div", {
|
|
12392
|
+
className: PendingPanel_module_css_default.vSpacer,
|
|
12393
|
+
style: { height: blockActionsPadPx },
|
|
12394
|
+
"aria-hidden": "true"
|
|
12395
|
+
})
|
|
12396
|
+
]
|
|
12397
|
+
}), hoveredBlock !== void 0 && model.blocks[hoveredBlock] !== void 0 && (0, react_jsx_runtime.jsxs)("div", {
|
|
12398
|
+
className: PendingPanel_module_css_default.blockActions,
|
|
12399
|
+
"data-diff-block-actions": true,
|
|
12400
|
+
style: { top: (model.blocks[hoveredBlock].end + 1) * ROW_HEIGHT_PX },
|
|
12401
|
+
children: [
|
|
12402
|
+
(0, react_jsx_runtime.jsx)("span", {
|
|
12403
|
+
className: PendingPanel_module_css_default.blockPosition,
|
|
12404
|
+
"data-diff-block-position": true,
|
|
12405
|
+
children: t("panel.blockPosition", {
|
|
12406
|
+
current: hoveredBlock + 1,
|
|
12407
|
+
total: model.blocks.length
|
|
12408
|
+
})
|
|
12409
|
+
}),
|
|
12410
|
+
(0, react_jsx_runtime.jsx)("button", {
|
|
12411
|
+
type: "button",
|
|
12412
|
+
className: `${PendingPanel_module_css_default.action} ${PendingPanel_module_css_default.actionPrimary}`,
|
|
12413
|
+
"data-diff-block-keep": true,
|
|
12414
|
+
disabled: busy,
|
|
12415
|
+
onClick: () => {
|
|
12416
|
+
onBlockKeep(file.sessionId, file.id, blockRanges[hoveredBlock]);
|
|
12417
|
+
},
|
|
12418
|
+
children: t("action.keep")
|
|
12419
|
+
}),
|
|
12420
|
+
(0, react_jsx_runtime.jsx)("button", {
|
|
12421
|
+
type: "button",
|
|
12422
|
+
className: PendingPanel_module_css_default.action,
|
|
12423
|
+
"data-diff-block-revert": true,
|
|
12424
|
+
disabled: busy,
|
|
12425
|
+
onClick: () => {
|
|
12426
|
+
onBlockRevert(file.sessionId, file.id, blockRanges[hoveredBlock]);
|
|
12427
|
+
},
|
|
12428
|
+
children: t("action.revert")
|
|
12429
|
+
})
|
|
12430
|
+
]
|
|
12431
|
+
})]
|
|
12432
|
+
}),
|
|
12433
|
+
searchOpen && (0, react_jsx_runtime.jsxs)("div", {
|
|
12434
|
+
className: PendingPanel_module_css_default.searchBar,
|
|
12435
|
+
"data-diff-searchbar": true,
|
|
12277
12436
|
children: [
|
|
12278
|
-
|
|
12279
|
-
|
|
12280
|
-
|
|
12281
|
-
"
|
|
12437
|
+
(0, react_jsx_runtime.jsx)("input", {
|
|
12438
|
+
ref: searchInputRef,
|
|
12439
|
+
className: PendingPanel_module_css_default.searchInput,
|
|
12440
|
+
"data-diff-search-input": true,
|
|
12441
|
+
value: searchQuery,
|
|
12442
|
+
placeholder: t("panel.searchPlaceholder"),
|
|
12443
|
+
onChange: (event) => {
|
|
12444
|
+
setSearchQuery(event.target.value);
|
|
12445
|
+
},
|
|
12446
|
+
onKeyDown: (event) => {
|
|
12447
|
+
if (event.key === "Enter") {
|
|
12448
|
+
event.preventDefault();
|
|
12449
|
+
goSearch(event.shiftKey ? -1 : 1);
|
|
12450
|
+
} else if (event.key === "Escape") closeSearch();
|
|
12451
|
+
}
|
|
12452
|
+
}),
|
|
12453
|
+
(0, react_jsx_runtime.jsx)("span", {
|
|
12454
|
+
className: PendingPanel_module_css_default.searchCount,
|
|
12455
|
+
"data-diff-search-count": true,
|
|
12456
|
+
children: searchMatches.length === 0 ? "0/0" : `${searchIndex % searchMatches.length + 1}/${searchMatches.length}`
|
|
12457
|
+
}),
|
|
12458
|
+
(0, react_jsx_runtime.jsx)("button", {
|
|
12459
|
+
type: "button",
|
|
12460
|
+
className: `${PendingPanel_module_css_default.action} ${PendingPanel_module_css_default.iconAction}`,
|
|
12461
|
+
"data-diff-search-prev": true,
|
|
12462
|
+
"aria-label": t("action.prevDiff"),
|
|
12463
|
+
disabled: searchMatches.length === 0,
|
|
12464
|
+
onClick: () => {
|
|
12465
|
+
goSearch(-1);
|
|
12466
|
+
},
|
|
12467
|
+
children: (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconChevronUpOutline14, { size: 14 })
|
|
12282
12468
|
}),
|
|
12283
|
-
|
|
12284
|
-
|
|
12285
|
-
|
|
12286
|
-
|
|
12287
|
-
|
|
12288
|
-
|
|
12289
|
-
|
|
12290
|
-
|
|
12291
|
-
},
|
|
12469
|
+
(0, react_jsx_runtime.jsx)("button", {
|
|
12470
|
+
type: "button",
|
|
12471
|
+
className: `${PendingPanel_module_css_default.action} ${PendingPanel_module_css_default.iconAction}`,
|
|
12472
|
+
"data-diff-search-next": true,
|
|
12473
|
+
"aria-label": t("action.nextDiff"),
|
|
12474
|
+
disabled: searchMatches.length === 0,
|
|
12475
|
+
onClick: () => {
|
|
12476
|
+
goSearch(1);
|
|
12477
|
+
},
|
|
12478
|
+
children: (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconChevronDownOutline14, { size: 14 })
|
|
12292
12479
|
}),
|
|
12293
|
-
|
|
12294
|
-
|
|
12295
|
-
|
|
12296
|
-
"
|
|
12480
|
+
(0, react_jsx_runtime.jsx)("button", {
|
|
12481
|
+
type: "button",
|
|
12482
|
+
className: `${PendingPanel_module_css_default.action} ${PendingPanel_module_css_default.iconAction}`,
|
|
12483
|
+
"data-diff-search-close": true,
|
|
12484
|
+
"aria-label": t("action.close"),
|
|
12485
|
+
onClick: closeSearch,
|
|
12486
|
+
children: (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconCloseOutline16, { size: 14 })
|
|
12297
12487
|
})
|
|
12298
12488
|
]
|
|
12299
|
-
}),
|
|
12300
|
-
|
|
12301
|
-
|
|
12302
|
-
|
|
12303
|
-
|
|
12304
|
-
|
|
12305
|
-
className: `${PendingPanel_module_css_default.
|
|
12306
|
-
"data-diff-
|
|
12307
|
-
|
|
12308
|
-
|
|
12309
|
-
|
|
12310
|
-
}
|
|
12311
|
-
|
|
12312
|
-
|
|
12313
|
-
|
|
12314
|
-
className: PendingPanel_module_css_default.action,
|
|
12315
|
-
"data-diff-block-revert": true,
|
|
12316
|
-
disabled: busy,
|
|
12317
|
-
onClick: () => {
|
|
12318
|
-
onBlockRevert(file.sessionId, file.id, blockRanges[hoveredBlock]);
|
|
12319
|
-
},
|
|
12320
|
-
children: t("action.revert")
|
|
12321
|
-
})]
|
|
12322
|
-
})]
|
|
12323
|
-
}), rulerMarkers.length > 0 && (0, react_jsx_runtime.jsx)("div", {
|
|
12324
|
-
className: PendingPanel_module_css_default.overviewRuler,
|
|
12325
|
-
"data-diff-approval-ruler": true,
|
|
12326
|
-
"aria-hidden": "true",
|
|
12327
|
-
children: rulerMarkers.map((marker, index) => (0, react_jsx_runtime.jsx)("div", {
|
|
12328
|
-
className: `${PendingPanel_module_css_default.overviewMarker} ${marker.kind === "del" ? PendingPanel_module_css_default.markerDel : PendingPanel_module_css_default.markerAdd}`,
|
|
12329
|
-
"data-diff-ruler-marker": marker.kind,
|
|
12330
|
-
style: {
|
|
12331
|
-
top: `${marker.top}%`,
|
|
12332
|
-
height: `${marker.height}%`
|
|
12333
|
-
}
|
|
12334
|
-
}, index))
|
|
12335
|
-
})]
|
|
12489
|
+
}),
|
|
12490
|
+
rulerMarkers.length > 0 && (0, react_jsx_runtime.jsx)("div", {
|
|
12491
|
+
className: PendingPanel_module_css_default.overviewRuler,
|
|
12492
|
+
"data-diff-approval-ruler": true,
|
|
12493
|
+
"aria-hidden": "true",
|
|
12494
|
+
children: rulerMarkers.map((marker, index) => (0, react_jsx_runtime.jsx)("div", {
|
|
12495
|
+
className: `${PendingPanel_module_css_default.overviewMarker} ${marker.kind === "del" ? PendingPanel_module_css_default.markerDel : PendingPanel_module_css_default.markerAdd}`,
|
|
12496
|
+
"data-diff-ruler-marker": marker.kind,
|
|
12497
|
+
style: {
|
|
12498
|
+
top: `${marker.top}%`,
|
|
12499
|
+
height: `${marker.height}%`
|
|
12500
|
+
}
|
|
12501
|
+
}, index))
|
|
12502
|
+
})
|
|
12503
|
+
]
|
|
12336
12504
|
}),
|
|
12337
12505
|
(0, react_jsx_runtime.jsxs)("div", {
|
|
12338
12506
|
className: PendingPanel_module_css_default.statusBar,
|
|
@@ -12400,6 +12568,9 @@ XID_Start XIDS`.split(/\s/).map((p) => [w(p), p]));
|
|
|
12400
12568
|
const snapshot = usePending((snapshot) => snapshot);
|
|
12401
12569
|
const [open, setOpen] = (0, react.useState)(false);
|
|
12402
12570
|
const [selected, setSelected] = (0, react.useState)("");
|
|
12571
|
+
/** Bumped when the already-open file is clicked again, to jump to the next
|
|
12572
|
+
* diff block in the open file's detail pane. */
|
|
12573
|
+
const [jumpSignal, setJumpSignal] = (0, react.useState)(0);
|
|
12403
12574
|
/** Pending count captured at open time; auto-close needs a list that emptied. */
|
|
12404
12575
|
const [openedCount, setOpenedCount] = (0, react.useState)(0);
|
|
12405
12576
|
/** Bottom offset tracking the chat composer's top edge so the input stays visible. */
|
|
@@ -12461,13 +12632,11 @@ XID_Start XIDS`.split(/\s/).map((p) => [w(p), p]));
|
|
|
12461
12632
|
document.removeEventListener("pointerdown", onPointerDown, true);
|
|
12462
12633
|
};
|
|
12463
12634
|
}, [open]);
|
|
12464
|
-
const files = snapshot.files;
|
|
12465
|
-
const mine = files.filter((file) => file.sessionId === current);
|
|
12466
|
-
const theirs = files.filter((file) => file.sessionId !== current);
|
|
12635
|
+
const files = snapshot.files.filter((file) => file.sessionId === current);
|
|
12467
12636
|
(0, react.useEffect)(() => {
|
|
12468
12637
|
if (!open) return;
|
|
12469
12638
|
if (selected !== "" && files.some((file) => file.id === selected)) return;
|
|
12470
|
-
const next = [
|
|
12639
|
+
const next = files[0];
|
|
12471
12640
|
if (next !== void 0 && next.id !== selected) setSelected(next.id);
|
|
12472
12641
|
}, [
|
|
12473
12642
|
open,
|
|
@@ -12495,7 +12664,10 @@ XID_Start XIDS`.split(/\s/).map((p) => [w(p), p]));
|
|
|
12495
12664
|
file: entry,
|
|
12496
12665
|
selected: selected === entry.id,
|
|
12497
12666
|
t,
|
|
12498
|
-
onSelect:
|
|
12667
|
+
onSelect: (id) => {
|
|
12668
|
+
if (id === selected) setJumpSignal((signal) => signal + 1);
|
|
12669
|
+
else setSelected(id);
|
|
12670
|
+
}
|
|
12499
12671
|
}, entry.id);
|
|
12500
12672
|
const selectedFile = files.find((file) => file.id === selected);
|
|
12501
12673
|
/** Drag the list/detail divider; width follows the pointer within its bounds. */
|
|
@@ -12588,23 +12760,17 @@ XID_Start XIDS`.split(/\s/).map((p) => [w(p), p]));
|
|
|
12588
12760
|
}) : (0, react_jsx_runtime.jsxs)("div", {
|
|
12589
12761
|
className: PendingPanel_module_css_default.split,
|
|
12590
12762
|
children: [
|
|
12591
|
-
(0, react_jsx_runtime.
|
|
12763
|
+
(0, react_jsx_runtime.jsx)("nav", {
|
|
12592
12764
|
className: PendingPanel_module_css_default.fileList,
|
|
12593
12765
|
style: { width: listWidth },
|
|
12594
12766
|
"data-diff-approval-file-list": true,
|
|
12595
|
-
children:
|
|
12767
|
+
children: files.length > 0 && (0, react_jsx_runtime.jsxs)("section", { children: [(0, react_jsx_runtime.jsx)("h3", {
|
|
12596
12768
|
className: PendingPanel_module_css_default.group,
|
|
12597
12769
|
children: t("panel.group.current")
|
|
12598
12770
|
}), (0, react_jsx_runtime.jsx)("ul", {
|
|
12599
12771
|
className: PendingPanel_module_css_default.rows,
|
|
12600
|
-
children:
|
|
12601
|
-
})] })
|
|
12602
|
-
className: PendingPanel_module_css_default.group,
|
|
12603
|
-
children: t("panel.group.others")
|
|
12604
|
-
}), (0, react_jsx_runtime.jsx)("ul", {
|
|
12605
|
-
className: PendingPanel_module_css_default.rows,
|
|
12606
|
-
children: theirs.map(renderEntry)
|
|
12607
|
-
})] })]
|
|
12772
|
+
children: files.map(renderEntry)
|
|
12773
|
+
})] })
|
|
12608
12774
|
}),
|
|
12609
12775
|
(0, react_jsx_runtime.jsx)("div", {
|
|
12610
12776
|
className: PendingPanel_module_css_default.resizeHandle,
|
|
@@ -12620,6 +12786,7 @@ XID_Start XIDS`.split(/\s/).map((p) => [w(p), p]));
|
|
|
12620
12786
|
file: selectedFile,
|
|
12621
12787
|
busy: snapshot.busy.has(selectedFile.id),
|
|
12622
12788
|
workspacePath: snapshot.workspacePath,
|
|
12789
|
+
jumpSignal,
|
|
12623
12790
|
t,
|
|
12624
12791
|
onKeep,
|
|
12625
12792
|
onRevert,
|
|
@@ -12931,7 +13098,9 @@ XID_Start XIDS`.split(/\s/).map((p) => [w(p), p]));
|
|
|
12931
13098
|
"panel.group.others": "其他会话",
|
|
12932
13099
|
"panel.aria": "待处理改动",
|
|
12933
13100
|
"panel.stats": "+{added} -{removed}",
|
|
13101
|
+
"panel.blockPosition": "第 {current}/{total} 块",
|
|
12934
13102
|
"panel.selectHint": "点击每项查看整个文件的差异;选中文本后,用底部状态栏或 Ctrl+L 复制引用",
|
|
13103
|
+
"panel.searchPlaceholder": "搜索",
|
|
12935
13104
|
"panel.missing": "文件已不存在",
|
|
12936
13105
|
"panel.missingHint": "该文件已不存在,回退会恢复该文件。",
|
|
12937
13106
|
"panel.createHint": "回退会删除该新建的文件。",
|
|
@@ -12950,6 +13119,7 @@ XID_Start XIDS`.split(/\s/).map((p) => [w(p), p]));
|
|
|
12950
13119
|
"action.langAuto": "自动",
|
|
12951
13120
|
"action.langAutoDetected": "自动:{lang}",
|
|
12952
13121
|
"action.langSelect": "高亮语言",
|
|
13122
|
+
"action.search": "搜索 (Ctrl+F)",
|
|
12953
13123
|
"action.expand": "展开全屏",
|
|
12954
13124
|
"action.exitFullscreen": "退出全屏",
|
|
12955
13125
|
"action.close": "关闭",
|
|
@@ -12967,7 +13137,9 @@ XID_Start XIDS`.split(/\s/).map((p) => [w(p), p]));
|
|
|
12967
13137
|
"panel.group.others": "Other sessions",
|
|
12968
13138
|
"panel.aria": "Pending changes",
|
|
12969
13139
|
"panel.stats": "+{added} -{removed}",
|
|
13140
|
+
"panel.blockPosition": "{current}/{total}",
|
|
12970
13141
|
"panel.selectHint": "Select an item to review its whole-file diff; select text and copy its reference from the status bar (Ctrl+L)",
|
|
13142
|
+
"panel.searchPlaceholder": "Search",
|
|
12971
13143
|
"panel.missing": "File is gone",
|
|
12972
13144
|
"panel.missingHint": "This file no longer exists; reverting restores it.",
|
|
12973
13145
|
"panel.createHint": "Reverting removes this created file.",
|
|
@@ -12986,6 +13158,7 @@ XID_Start XIDS`.split(/\s/).map((p) => [w(p), p]));
|
|
|
12986
13158
|
"action.langAuto": "Auto",
|
|
12987
13159
|
"action.langAutoDetected": "Auto: {lang}",
|
|
12988
13160
|
"action.langSelect": "Highlight language",
|
|
13161
|
+
"action.search": "Search (Ctrl+F)",
|
|
12989
13162
|
"action.expand": "Expand fullscreen",
|
|
12990
13163
|
"action.exitFullscreen": "Exit fullscreen",
|
|
12991
13164
|
"action.close": "Close",
|
|
@@ -10,7 +10,9 @@ export declare const zh: {
|
|
|
10
10
|
'panel.group.others': string;
|
|
11
11
|
'panel.aria': string;
|
|
12
12
|
'panel.stats': string;
|
|
13
|
+
'panel.blockPosition': string;
|
|
13
14
|
'panel.selectHint': string;
|
|
15
|
+
'panel.searchPlaceholder': string;
|
|
14
16
|
'panel.missing': string;
|
|
15
17
|
'panel.missingHint': string;
|
|
16
18
|
'panel.createHint': string;
|
|
@@ -29,6 +31,7 @@ export declare const zh: {
|
|
|
29
31
|
'action.langAuto': string;
|
|
30
32
|
'action.langAutoDetected': string;
|
|
31
33
|
'action.langSelect': string;
|
|
34
|
+
'action.search': string;
|
|
32
35
|
'action.expand': string;
|
|
33
36
|
'action.exitFullscreen': string;
|
|
34
37
|
'action.close': string;
|
|
@@ -54,7 +57,9 @@ export declare const en: {
|
|
|
54
57
|
'panel.group.others': string;
|
|
55
58
|
'panel.aria': string;
|
|
56
59
|
'panel.stats': string;
|
|
60
|
+
'panel.blockPosition': string;
|
|
57
61
|
'panel.selectHint': string;
|
|
62
|
+
'panel.searchPlaceholder': string;
|
|
58
63
|
'panel.missing': string;
|
|
59
64
|
'panel.missingHint': string;
|
|
60
65
|
'panel.createHint': string;
|
|
@@ -73,6 +78,7 @@ export declare const en: {
|
|
|
73
78
|
'action.langAuto': string;
|
|
74
79
|
'action.langAutoDetected': string;
|
|
75
80
|
'action.langSelect': string;
|
|
81
|
+
'action.search': string;
|
|
76
82
|
'action.expand': string;
|
|
77
83
|
'action.exitFullscreen': string;
|
|
78
84
|
'action.close': string;
|
package/package.json
CHANGED