Files
apes-sidebar/src/client/SideCardSection.module.css
T
Menghuan1918 5ee81fb073 feat(clues): collect resources from files, Feishu and GitHub, adapted to DSH 0.2.2-rc.2
This lands the clue collection line on top of origin/dev (v0.32.1, DSH
0.2.2-rc.2). The 14 commits that carried it are squashed into this one
because every one of them overlapped upstream's own changes (version,
19 dictionaries, CHANGELOG), and each intermediate commit would have
failed to compile against rc.2's menu API. The pre-integration head is
kept at backup/clues-uiux-refresh-pre-rebase.

What the feature is:
- a Clues tab that reads local files, Feishu tasks/docs and GitHub
  issues/pulls through one source registry, with a scope row, shared
  search, filters, paging and stable [[dsh-clue:...]] references;
- one window host for detail, pack management, source configuration,
  new pack and sharing (preview and edit are separate paths: a read is
  never saved over);
- .cluepack export/import with per-row resolvability previews;
- a source runtime that owns dependency installs and connection
  authorization (gh, lark-cli device code) and only probes on an
  explicit read;
- the public betterSidebarClues service and the windows capability
  (features gains clues / windowHost).

Merged with upstream rather than over it:
- the settings section keeps upstream's start-page takeover group and
  this branch's clue sources group; navigation is now six groups;
- the dictionaries keep both sides' new keys (1211 each, verified equal
  across all 19), the external-plugin guide and CHANGELOG keep both
  histories, and service features list both capability sets.

Adapted to 0.2.2-rc.2:
- menu call sites use anchorPoint instead of getAnchorRect;
- the shared SelectMenu mounts the host menu only while open, because
  rc.2's Menu reads the DOM during render and broke server-rendered
  settings surfaces;
- the submenu flip workaround stays deleted (the host positions
  submenus now), pinned by an updated layout-css assertion.

Version 0.33.0 (three synced spots) with a new 未发布 / Unreleased
changelog section; package.json regains the ./clues export, lib/clues.js
and the uqr dependency that upstream never had.

Gates: typecheck, lint, 5410 unit tests, build, check:consumer-types and
the full mount lane (35 passed) against dsh 0.2.2-rc.2 in Chromium.
2026-11-24 16:43:26 +08:00

410 lines
13 KiB
CSS

/** Continuous settings rows; public controls own their visual states. */
.section {
display: flex;
flex-direction: column;
flex: 1;
min-height: 0;
gap: var(--ds-sidebar-space-4);
width: 100%;
min-width: 0;
box-sizing: border-box;
container: sidebar-settings / inline-size;
font-size: 13px;
line-height: 20px;
}
.group {
flex: none;
display: flex;
flex-direction: column;
gap: var(--ds-sidebar-space-2);
min-width: 0;
padding: 0;
border: 0;
background: transparent;
}
.groupHeading {
display: flex;
align-items: baseline;
gap: var(--ds-sidebar-space-2);
margin: 0;
padding: 0 0 var(--ds-sidebar-space-2);
border-bottom: 1px solid var(--dsw-alias-border-l2);
font-size: 11px;
line-height: 18px;
font-weight: 500;
color: var(--dsw-alias-label-tertiary);
}
/* A one-line explanation inside a group card. */
.groupHint {
margin: 0;
padding: 0 2px 4px;
color: var(--dsw-alias-label-tertiary);
font-size: 12px;
line-height: 18px;
}
/* The start-page order list's header: section label plus the reset action. */
.guideOrderHeader {
display: flex;
align-items: center;
justify-content: space-between;
gap: 12px;
padding: 8px 2px 2px;
color: var(--dsw-alias-label-secondary);
font-size: 12px;
line-height: 18px;
font-weight: 600;
}
.guideReset {
padding: 2px 8px;
border: 1px solid var(--dsw-alias-border-l2);
border-radius: 6px;
background: transparent;
color: var(--dsw-alias-label-secondary);
font: inherit;
font-size: 11px;
cursor: pointer;
}
.guideReset:hover {
background: var(--dsw-alias-interactive-bg-hover);
color: var(--dsw-alias-label-primary);
}
.guideReset:focus-visible {
outline: 2px solid var(--dsw-alias-border-l4);
outline-offset: 2px;
}
.guideEmpty {
margin: 0;
padding: 12px 2px;
color: var(--dsw-alias-label-tertiary);
font-size: 12px;
line-height: 18px;
}
/* A compact two-option segmented control (vertical alignment). */
.segmented {
display: inline-flex;
flex: none;
padding: 2px;
border: 1px solid var(--dsw-alias-border-l2);
border-radius: 8px;
background: var(--dsw-alias-bg-layer-2);
}
.segment {
min-width: 48px;
padding: 4px 10px;
border: 0;
border-radius: 6px;
background: transparent;
color: var(--dsw-alias-label-secondary);
font: inherit;
font-size: 12px;
line-height: 18px;
cursor: pointer;
}
.segment:hover {
color: var(--dsw-alias-label-primary);
}
.segmentOn {
background: var(--dsw-alias-bg-layer-3);
color: var(--dsw-alias-label-primary);
box-shadow: inset 0 0 0 1px var(--dsw-alias-border-l2);
}
.segment:focus-visible {
outline: 2px solid var(--dsw-alias-border-l4);
outline-offset: 2px;
}
.count {
font-size: 11px;
font-weight: 500;
color: var(--dsw-alias-label-tertiary);
font-variant-numeric: tabular-nums;
}
.grid {
display: flex;
flex-direction: column;
gap: 0;
min-width: 0;
}
.card {
display: flex;
flex-wrap: wrap;
align-items: center;
gap: 0 var(--ds-sidebar-space-3);
min-width: 0;
border: 0;
border-bottom: 1px solid var(--dsw-alias-border-l1);
border-radius: 0;
background: transparent;
font: inherit;
color: inherit;
}
.cardOn { background: transparent; }
.cardMain {
display: flex;
align-items: center;
flex: 1 1 200px;
gap: var(--ds-sidebar-space-2);
min-width: 0;
min-height: 44px;
padding: var(--ds-sidebar-space-3) 0;
}
.cardIconChip {
display: inline-flex;
align-items: center;
justify-content: center;
flex: none;
width: 20px;
height: 20px;
color: var(--dsw-alias-label-secondary);
}
.cardText { display: flex; flex: 1; flex-direction: column; min-width: 0; gap: 4px; }
.cardTitle { min-width: 0; font-weight: 500; color: var(--dsw-alias-label-primary); overflow-wrap: anywhere; }
.cardDesc { font-size: 12px; line-height: 18px; color: var(--dsw-alias-label-tertiary); overflow-wrap: anywhere; }
.addCard {
composes: button from "./ui/kit.module.css";
justify-content: flex-start;
width: 100%;
min-height: 44px;
padding: var(--ds-sidebar-space-3) 0;
border: 0;
text-align: start;
white-space: normal;
}
.row {
min-width: 0;
border-bottom: 1px solid var(--dsw-alias-border-l1);
}
.rowText {
display: flex;
flex: 1 1 200px;
flex-direction: column;
gap: 4px;
min-width: 0;
}
.title { font-size: 13px; line-height: 20px; color: var(--dsw-alias-label-primary); overflow-wrap: anywhere; }
.desc { font-size: 12px; line-height: 18px; color: var(--dsw-alias-label-tertiary); overflow-wrap: anywhere; }
.control {
flex: none;
display: flex;
flex-wrap: wrap;
align-items: center;
gap: var(--ds-sidebar-space-2);
min-width: 0;
max-width: 100%;
}
.typedInput { width: 200px; min-width: 0; max-width: 100%; }
.typedInputNumber { width: 76px; min-width: 0; max-width: 100%; }
.suffix { font-size: 12px; color: var(--dsw-alias-label-secondary); }
.cssTextArea { width: 100%; min-height: 120px; font-family: var(--ds-font-family-code, monospace); resize: vertical; }
.popupDialog.popupDialog {
max-height: 100%;
gap: var(--ds-sidebar-space-4);
padding: 0 0 var(--ds-sidebar-gutter);
background: var(--dsw-alias-bg-layer-1);
width: min(calc(var(--ds-sidebar-content-width) + var(--ds-sidebar-gutter) * 2), 100%);
border: 1px solid var(--dsw-alias-border-l2);
border-radius: 6px;
box-shadow: none;
container: sidebar-settings-dialog / inline-size;
font-size: 13px;
line-height: 20px;
}
.popupRows {
display: flex;
flex-direction: column;
gap: 0;
width: 100%;
min-width: 0;
box-sizing: border-box;
}
.popupRow {
display: flex;
flex-wrap: wrap;
align-items: center;
justify-content: space-between;
gap: var(--ds-sidebar-space-2) var(--ds-sidebar-space-4);
min-width: 0;
padding: var(--ds-sidebar-space-3) 0;
border-bottom: 1px solid var(--dsw-alias-border-l1);
}
.patternsRow { display: flex; flex-direction: column; gap: 8px; min-width: 0; padding: 12px 0; border-bottom: 1px solid var(--dsw-alias-border-l1); }
.patternsChips { display: flex; flex-wrap: wrap; gap: 8px; }
.patternsChip { display: inline-flex; align-items: center; gap: 4px; padding-inline-start: 8px; border: 1px solid var(--dsw-alias-border-l2); border-radius: 6px; font-size: 12px; color: var(--dsw-alias-label-primary); }
.patternsChipRemove {
composes: iconButton iconButtonSm from "./ui/kit.module.css";
font: inherit;
}
.patternsAdd { display: flex; align-items: center; gap: 8px; }
.patternsInput { flex: 1; min-width: 0; }
.error { padding: 8px 0; font-size: 12px; color: var(--dsw-alias-state-error-primary); }
.rowError { flex: 1 1 100%; margin: 0; font-size: 12px; line-height: 18px; color: var(--dsw-alias-state-error-primary); overflow-wrap: anywhere; }
.cardError { flex: 1 1 100%; margin: 0; padding: 0 0 8px; font-size: 12px; line-height: 18px; color: var(--dsw-alias-state-error-primary); overflow-wrap: anywhere; }
.pluginModal.pluginModal {
max-height: 100%;
gap: var(--ds-sidebar-space-4);
padding: 0 0 var(--ds-sidebar-gutter);
background: var(--dsw-alias-bg-layer-1);
width: min(calc(var(--ds-sidebar-content-width) + var(--ds-sidebar-gutter) * 2), 100%);
border: 1px solid var(--dsw-alias-border-l2);
border-radius: 6px;
box-shadow: none;
container: sidebar-settings-dialog / inline-size;
font-size: 13px;
line-height: 20px;
}
.pluginList { display: flex; flex-direction: column; gap: 12px; width: 100%; min-width: 0; }
.pluginTopicBtn { width: 100%; }
.pluginEmpty { padding: 20px 0; font-size: 12px; color: var(--dsw-alias-label-tertiary); }
.pluginEntry { display: flex; flex-direction: column; gap: 8px; padding: 12px 0; border-bottom: 1px solid var(--dsw-alias-border-l1); min-width: 0; }
.pluginEntryHead { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; min-width: 0; }
.pluginEntryActions { display: inline-flex; align-items: center; gap: 8px; flex: none; }
.pluginJumpBtn { flex: none; }
.pluginCopyBtn { flex: none; }
.pluginName {
composes: button from "./ui/kit.module.css";
flex: 1 1 160px;
min-width: 0;
justify-content: flex-start;
padding: 0;
border: 0;
font-weight: 500;
color: var(--dsw-alias-label-primary);
text-align: start;
overflow: hidden;
text-overflow: ellipsis;
}
.pluginDesc { font-size: 12px; line-height: 18px; color: var(--dsw-alias-label-secondary); overflow-wrap: anywhere; }
.pluginInstall { display: block; max-width: 100%; padding: 8px; border: 1px solid var(--dsw-alias-border-l1); border-radius: 6px; background: var(--dsw-alias-bg-base); font-family: var(--ds-font-family-code, monospace); font-size: 11px; color: var(--dsw-alias-label-secondary); white-space: pre-wrap; overflow-wrap: anywhere; }
.pluginSearch { width: 100%; }
.pluginEntries {
display: flex;
flex-direction: column;
gap: 12px;
min-width: 0;
}
.pluginGroup { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.pluginGroupHeading { font-size: 11px; font-weight: 500; color: var(--dsw-alias-label-tertiary); }
.openWithEditorRow { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr) auto auto; gap: 8px; align-items: center; min-width: 0; }
.openWithEditorInput, .openWithEditorTemplate { width: 100%; min-width: 0; }
.openWithFamily { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; color: var(--dsw-alias-label-secondary); white-space: nowrap; cursor: pointer; }
.openWithHint { font-size: 12px; line-height: 18px; color: var(--dsw-alias-state-error-primary); }
/* One left axis at the wide size, a group select on a narrow window. */
.settingsShell {
display: flex;
flex: 1;
flex-direction: row;
align-items: stretch;
gap: 0;
min-width: 0;
min-height: 0;
width: 100%;
}
.navRail {
flex: none;
box-sizing: border-box;
width: 144px;
padding: 8px;
border-inline-end: 1px solid var(--dsw-alias-border-l1);
}
.navSelect { display: none; min-width: 0; }
.groupSelect { width: 100%; min-height: 28px; }
@media (hover: none), (pointer: coarse) {
.groupSelect { min-height: 44px; }
}
.groupNav {
display: flex;
flex-direction: column;
flex: none;
gap: 2px;
width: 100%;
min-width: 0;
box-sizing: border-box;
padding: 0;
border: 0;
border-radius: 0;
background: transparent;
overflow: visible;
}
.groupNav > button {
display: flex;
flex: none;
width: 100%;
min-height: 28px;
align-items: center;
justify-content: flex-start;
gap: 8px;
padding: 4px 8px;
border: 0;
border-radius: 4px;
white-space: nowrap;
text-align: start;
}
.groupNav.groupNav > button[aria-selected='true'] {
border-color: var(--dsw-alias-border-l1);
background: var(--dsw-alias-interactive-bg-active);
color: var(--dsw-alias-label-primary);
font-weight: 600;
}
.groupIcon { display: inline-flex; flex: none; align-items: center; color: var(--dsw-alias-label-secondary); }
.groupNav > button[aria-selected='true'] .groupIcon { color: var(--dsw-alias-label-primary); }
@media (hover: none), (pointer: coarse) {
.groupNav > button { min-height: 44px; }
}
.groupPane {
display: flex;
flex-direction: column;
gap: var(--ds-sidebar-space-4);
flex: 1;
width: 100%;
min-width: 0;
min-height: 0;
box-sizing: border-box;
padding: 12px 16px;
overflow-y: auto;
overscroll-behavior: contain;
scrollbar-width: thin;
}
@container sidebar-settings (max-width: 639px) {
.settingsShell { flex-direction: column; }
.navRail { display: none; }
.navSelect {
display: block;
padding: 8px 12px;
border-bottom: 1px solid var(--dsw-alias-border-l1);
}
.groupPane { padding: 12px; }
}
.subHeading { padding-top: 12px; font-size: 11px; font-weight: 500; color: var(--dsw-alias-label-tertiary); }
.card:last-child, .popupRow:last-child, .patternsRow:last-child, .row:last-child { border-bottom: 0; }
.dialogContent {
flex: 1 1 auto;
min-height: 0;
overflow-y: auto;
overscroll-behavior: contain;
}
.dialogContent > div:first-child { padding: var(--ds-sidebar-gutter); }
.dialogContent > div:last-child { padding: 0 var(--ds-sidebar-gutter); margin-top: var(--ds-sidebar-space-4); }
.dialogContent > div:first-child > h2 { font-size: 14px; line-height: 20px; }
.popupDialog > :last-child, .pluginModal > :last-child { flex: none; padding: 0 var(--ds-sidebar-gutter); }
@container sidebar-settings-dialog (max-width: 560px) {
.popupRow { flex-direction: column; align-items: stretch; }
.popupRow > :last-child { max-width: 100%; width: 100%; justify-content: flex-start; }
.openWithEditorRow { grid-template-columns: minmax(0, 1fr) auto; }
.openWithEditorInput, .openWithEditorTemplate { grid-column: 1 / -1; }
}
@media (pointer: coarse) {
.addCard, .groupNav > button, .pluginName, .patternsChipRemove { min-height: 44px; }
.patternsChipRemove { min-width: 44px; }
.dialogContent > div:first-child > button { min-width: 44px; min-height: 44px; }
}