@skillre/dsh-plugin-work-dashboard 0.0.0-stage → 0.6.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/LICENSE +21 -0
- package/README.en.md +253 -0
- package/README.md +347 -2
- package/UNINSTALL.md +7 -0
- package/compatibility.json +155 -0
- package/cordis.patch.yml +24 -0
- package/docs/DESIGN-0.3.md +122 -0
- package/docs/DETAIL.md +1 -0
- package/docs/DETAIL.zh.md +1 -0
- package/docs/preview.svg +254 -0
- package/docs/preview.zh.svg +254 -0
- package/icon.svg +17 -0
- package/lib/client/api.d.ts +35 -0
- package/lib/client/api.js +44 -0
- package/lib/client/contracts.d.ts +94 -0
- package/lib/client/contracts.js +21 -0
- package/lib/client/css/base.d.ts +31 -0
- package/lib/client/css/base.js +422 -0
- package/lib/client/css/charts.d.ts +14 -0
- package/lib/client/css/charts.js +191 -0
- package/lib/client/css/detail.d.ts +21 -0
- package/lib/client/css/detail.js +399 -0
- package/lib/client/css/insights.d.ts +27 -0
- package/lib/client/css/insights.js +660 -0
- package/lib/client/css/overview.d.ts +22 -0
- package/lib/client/css/overview.js +338 -0
- package/lib/client/preferences.d.ts +56 -0
- package/lib/client/preferences.js +118 -0
- package/lib/client/styles.d.ts +17 -0
- package/lib/client/styles.js +22 -0
- package/lib/client/text.d.ts +32 -0
- package/lib/client/text.js +934 -0
- package/lib/client/view-contract.d.ts +110 -0
- package/lib/client/view-contract.js +28 -0
- package/lib/client.js +5389 -0
- package/lib/config.d.ts +61 -0
- package/lib/config.js +67 -0
- package/lib/gap.d.ts +60 -0
- package/lib/gap.js +227 -0
- package/lib/index.d.ts +40 -0
- package/lib/index.js +130 -0
- package/lib/repo.d.ts +124 -0
- package/lib/repo.js +407 -0
- package/lib/risks.d.ts +24 -0
- package/lib/risks.js +85 -0
- package/lib/skill.d.ts +94 -0
- package/lib/skill.js +220 -0
- package/lib/store.d.ts +63 -0
- package/lib/store.js +494 -0
- package/lib/timeline.d.ts +23 -0
- package/lib/timeline.js +93 -0
- package/lib/transport.d.ts +61 -0
- package/lib/transport.js +121 -0
- package/lib/types.d.ts +612 -0
- package/lib/types.js +62 -0
- package/locale/en.json +7 -0
- package/locale/zh.json +7 -0
- package/package.json +117 -4
- package/skills/poc-export/SKILL.md +81 -0
- package/skills/poc-export/scripts/export-form.mjs +654 -0
- package/skills/poc-ledger/SKILL.md +171 -0
- package/skills/poc-submit/SKILL.md +186 -0
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Overview styles: the portfolio band, the three project readings, the pending rail.
|
|
3
|
+
*
|
|
4
|
+
* Three decisions drive this sheet:
|
|
5
|
+
*
|
|
6
|
+
* 1. **The band is one instrument, not six cards.** It gets one container with
|
|
7
|
+
* internal dividers, so the eye reads it as a single dashboard rather than
|
|
8
|
+
* six unrelated widgets. A card grid with gaps between every figure was the
|
|
9
|
+
* failure mode of the previous stat strip.
|
|
10
|
+
* 2. **Cards carry the reading order.** Name → stage → money → latest progress →
|
|
11
|
+
* four dimensions → gaps. The gap badge sits top-right because it is the
|
|
12
|
+
* reason to open the card at all; everything else is context for it.
|
|
13
|
+
* 3. **Selection is visible from the keyboard.** The shell moves a cursor with
|
|
14
|
+
* the arrow keys, so a selected card and a selected row both have to be
|
|
15
|
+
* unmistakable — a ring, not a background tint, because the background is
|
|
16
|
+
* already doing hover duty.
|
|
17
|
+
*
|
|
18
|
+
* Class prefixes owned here: `.pf-` (band), `.pcard-`, `.pboard-`, `.ptable-`,
|
|
19
|
+
* `.pending-`, plus the shared `.panel` / `.workspace-grid` / `.project-row`
|
|
20
|
+
* atoms this surface defines because nothing else uses them.
|
|
21
|
+
*/
|
|
22
|
+
export declare const OVERVIEW_CSS = "\n/* ---------- layout ---------- */\n.wd-shell .workspace-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 16px; align-items: start; }\n@media (max-width: 1180px) { .wd-shell .workspace-grid { grid-template-columns: minmax(0, 1fr); } }\n.wd-shell .primary-column, .wd-shell .secondary-column { min-width: 0; display: flex; flex-direction: column; gap: 16px; }\n.wd-shell .panel {\n border: 1px solid var(--wd-hairline); border-radius: 12px;\n background: var(--wd-surface); overflow: hidden;\n box-shadow: var(--wd-shadow-1);\n}\n.wd-shell .panel-header {\n display: flex; align-items: baseline; gap: 9px;\n padding: 12px 18px 10px;\n border-bottom: 1px solid var(--wd-hairline);\n background: linear-gradient(180deg, var(--wd-surface) 0%, var(--wd-inset) 150%);\n}\n.wd-shell .panel-title { margin: 0; font-size: 13.5px; line-height: 20px; font-weight: 650; letter-spacing: -.005em; }\n.wd-shell .panel-kicker {\n margin-left: auto; font-size: 11px; color: var(--dsw-alias-label-tertiary);\n font-variant-numeric: tabular-nums;\n padding: 1px 8px; border-radius: 20px;\n background: var(--wd-inset); border: 1px solid var(--wd-hairline);\n}\n.wd-shell .panel-body { padding: 0; }\n.wd-shell .panel-body.padded { padding: 13px 18px; }\n\n/* ---------- portfolio band ---------- */\n.wd-shell .pf-band {\n margin-bottom: 14px;\n border: 1px solid var(--wd-hairline); border-radius: 12px;\n background: var(--wd-surface);\n box-shadow: var(--wd-shadow-1);\n overflow: hidden;\n}\n.wd-shell .pf-band-head {\n display: flex; align-items: baseline; gap: 10px;\n padding: 9px 16px 8px;\n border-bottom: 1px solid var(--wd-hairline);\n background: linear-gradient(180deg, var(--wd-surface) 0%, var(--wd-inset) 150%);\n}\n.wd-shell .pf-band-title { margin: 0; font-size: 13.5px; line-height: 20px; font-weight: 650; }\n.wd-shell .pf-band-note { margin-left: auto; font-size: 11px; color: var(--dsw-alias-label-tertiary); font-variant-numeric: tabular-nums; }\n.wd-shell .pf-grid {\n display: grid;\n grid-template-columns: repeat(8, minmax(0, 1fr));\n gap: 1px;\n background: var(--wd-hairline);\n}\n@media (max-width: 1280px) { .wd-shell .pf-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }\n@media (max-width: 860px) { .wd-shell .pf-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }\n@media (max-width: 560px) { .wd-shell .pf-grid { grid-template-columns: minmax(0, 1fr); } }\n/* Two strips, four blocks each. The band is context: it answers \"where does the\n money sit\" in about a third of the screen, then gets out of the way. An eight-column\n grid lets two wide figures and four list figures share exactly two rows. */\n.wd-shell .pf-block {\n padding: 8px 12px 9px;\n background: var(--wd-surface);\n min-height: 0;\n justify-content: flex-start;\n}\n.wd-shell .pf-block[data-span=\"4\"] { grid-column: span 4; }\n.wd-shell .pf-block[data-span=\"2\"] { grid-column: span 2; }\n@media (max-width: 1280px) {\n .wd-shell .pf-block[data-span=\"4\"] { grid-column: span 4; }\n .wd-shell .pf-block[data-span=\"2\"] { grid-column: span 2; }\n}\n@media (max-width: 860px) {\n .wd-shell .pf-block[data-span=\"4\"], .wd-shell .pf-block[data-span=\"2\"] { grid-column: span 2; }\n}\n@media (max-width: 560px) {\n .wd-shell .pf-block[data-span=\"4\"], .wd-shell .pf-block[data-span=\"2\"] { grid-column: span 1; }\n}\n@media (max-width: 720px) { .wd-shell .pf-block-wide { grid-column: span 1; } }\n.wd-shell .pf-radials { display: flex; gap: 8px; justify-content: space-between; padding: 2px 2px 0; }\n/* Four rows fit exactly; the cap only protects against a deployment with many\n more orgs than this one, where the strip must not grow the band. */\n.wd-shell .pf-block[data-span=\"2\"] .barlist { max-height: 168px; overflow: auto; scrollbar-width: thin; }\n.wd-shell .pf-collapse {\n display: inline-flex; align-items: center; gap: 4px;\n padding: 1px 7px; border-radius: 6px;\n border: 1px solid var(--wd-hairline); background: var(--wd-inset);\n font-size: 10px; line-height: 15px; color: var(--dsw-alias-label-tertiary);\n cursor: pointer; font-family: inherit; white-space: nowrap;\n}\n.wd-shell .pf-collapse:hover { color: var(--wd-text); background: var(--wd-surface); }\n.wd-shell .pf-band[data-collapsed=\"true\"] .pf-grid { display: none; }\n.wd-shell .pf-note {\n margin: 5px 0 0; font-size: 10px; line-height: 15px;\n color: var(--dsw-alias-label-tertiary);\n overflow-wrap: anywhere;\n display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;\n}\n.wd-shell .pf-note[data-tone=\"amber\"] { color: var(--wd-amber); }\n\n/* ---------- project cards ---------- */\n.wd-shell .pcard-grid {\n display: grid;\n grid-template-columns: repeat(auto-fill, minmax(268px, 1fr));\n gap: 12px; padding: 14px;\n}\n.wd-shell .pcard {\n display: flex; flex-direction: column; gap: 9px;\n padding: 13px 14px 11px;\n border: 1px solid var(--wd-hairline); border-radius: 10px;\n background: var(--wd-surface);\n cursor: pointer; min-width: 0;\n transition: box-shadow .15s ease, border-color .15s ease, transform .15s ease;\n}\n.wd-shell .pcard:hover { box-shadow: var(--wd-shadow-2); border-color: var(--dsw-alias-border-l2); transform: translateY(-1px); }\n.wd-shell .pcard:focus-visible { outline: 2px solid var(--wd-primary); outline-offset: 1px; }\n.wd-shell .pcard[data-selected=\"true\"] {\n border-color: var(--wd-primary);\n box-shadow: 0 0 0 3px var(--wd-primary-soft), var(--wd-shadow-2);\n}\n.wd-shell .pcard[data-closed=\"true\"] { opacity: .82; }\n.wd-shell .pcard-head { display: flex; align-items: flex-start; gap: 8px; }\n.wd-shell .pcard-title-block { min-width: 0; flex: 1 1 auto; display: flex; flex-direction: column; gap: 1px; }\n.wd-shell .pcard-name {\n font-size: 13.5px; line-height: 19px; font-weight: 650;\n letter-spacing: -.005em; overflow-wrap: anywhere;\n display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;\n}\n.wd-shell .pcard-id {\n font-family: ui-monospace, SFMono-Regular, Menlo, monospace;\n font-size: 10px; line-height: 15px; color: var(--dsw-alias-label-tertiary);\n}\n.wd-shell .pcard-badge {\n flex: none; padding: 1px 7px; border-radius: 20px;\n font-size: 10px; line-height: 15px; font-weight: 650; white-space: nowrap;\n}\n.wd-shell .pcard-badge[data-tone=\"red\"] { background: var(--wd-red-soft); color: var(--wd-red); }\n.wd-shell .pcard-badge[data-tone=\"amber\"] { background: var(--wd-amber-soft); color: var(--wd-amber); }\n.wd-shell .pcard-stage { display: flex; align-items: center; gap: 8px; min-width: 0; }\n.wd-shell .pcard-stage-pill { flex: none; }\n.wd-shell .pcard-stage .rail-mini { flex: 1 1 auto; }\n.wd-shell .pcard-meta { display: flex; align-items: baseline; gap: 8px; }\n.wd-shell .pcard-org {\n flex: 1 1 auto; min-width: 0;\n font-size: 11px; line-height: 16px; color: var(--dsw-alias-label-secondary);\n overflow: hidden; text-overflow: ellipsis; white-space: nowrap;\n}\n.wd-shell .pcard-amount {\n flex: none; font-size: 12.5px; font-weight: 650;\n font-variant-numeric: tabular-nums; color: var(--wd-amber);\n}\n.wd-shell .pcard-unit { margin-left: 2px; font-size: 9.5px; font-weight: 500; color: var(--dsw-alias-label-tertiary); }\n.wd-shell .pcard-progress {\n display: flex; flex-direction: column; gap: 1px;\n padding: 7px 9px; border-radius: 8px;\n background: var(--wd-inset); border: 1px solid var(--wd-hairline);\n}\n.wd-shell .pcard-progress-label {\n font-size: 9.5px; line-height: 14px; letter-spacing: .05em;\n text-transform: uppercase; color: var(--dsw-alias-label-tertiary); font-weight: 600;\n}\n.wd-shell .pcard-progress-copy {\n font-size: 11.5px; line-height: 16px; color: var(--dsw-alias-label-secondary);\n overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;\n}\n.wd-shell .pcard-progress-meta {\n margin-top: 1px; font-size: 9.5px; line-height: 14px;\n color: var(--dsw-alias-label-tertiary); font-variant-numeric: tabular-nums;\n}\n.wd-shell .pcard-dims { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; }\n.wd-shell .pcard-dim {\n display: flex; flex-direction: column; align-items: center; gap: 1px;\n padding: 3px 2px; border-radius: 6px; min-width: 0;\n background: var(--wd-red-soft);\n}\n.wd-shell .pcard-dim[data-present=\"true\"] { background: var(--wd-green-soft); }\n.wd-shell .pcard-dim-mark { font-size: 10.5px; line-height: 14px; font-weight: 650; color: var(--wd-red); }\n.wd-shell .pcard-dim[data-present=\"true\"] .pcard-dim-mark { color: var(--wd-green); }\n.wd-shell .pcard-dim-label {\n font-size: 8.5px; line-height: 12px; color: var(--dsw-alias-label-tertiary);\n white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%;\n}\n.wd-shell .pcard-foot { display: flex; align-items: center; gap: 8px; }\n.wd-shell .pcard-since { font-size: 10px; line-height: 14px; color: var(--dsw-alias-label-tertiary); font-variant-numeric: tabular-nums; }\n.wd-shell .pcard-open { margin-left: auto; font-size: 10.5px; color: var(--wd-primary); font-weight: 600; }\n\n/* ---------- board ---------- */\n.wd-shell .pboard {\n display: flex; gap: 10px; padding: 14px;\n overflow-x: auto; overscroll-behavior-x: contain;\n align-items: stretch;\n}\n.wd-shell .pboard-column {\n flex: 1 1 0; min-width: 176px; max-width: 300px;\n display: flex; flex-direction: column; gap: 8px;\n padding: 10px 9px 12px; border-radius: 10px;\n background: var(--wd-inset); border: 1px solid var(--wd-hairline);\n}\n.wd-shell .pboard-column[data-empty=\"true\"] { background: transparent; border-style: dashed; }\n.wd-shell .pboard-column-head { display: flex; flex-direction: column; gap: 3px; }\n.wd-shell .pboard-column-label { font-size: 11.5px; line-height: 16px; font-weight: 650; color: var(--dsw-alias-label-secondary); }\n.wd-shell .pboard-column-count {\n font-size: 9.5px; line-height: 14px;\n color: var(--dsw-alias-label-tertiary); font-variant-numeric: tabular-nums;\n}\n.wd-shell .pboard-column-body { display: flex; flex-direction: column; gap: 7px; flex: 1 1 auto; }\n.wd-shell .pboard-card {\n display: flex; flex-direction: column; gap: 3px;\n padding: 9px 10px; border-radius: 8px; width: 100%; text-align: left;\n border: 1px solid var(--wd-hairline); background: var(--wd-surface);\n cursor: pointer; font-family: inherit;\n box-shadow: var(--wd-shadow-1);\n transition: box-shadow .14s ease, border-color .14s ease;\n}\n.wd-shell .pboard-card:hover { box-shadow: var(--wd-shadow-2); border-color: var(--dsw-alias-border-l2); }\n.wd-shell .pboard-card[data-high=\"true\"] { border-left: 3px solid var(--wd-red); }\n.wd-shell .pboard-card-name {\n font-size: 11.5px; line-height: 16px; font-weight: 600; color: var(--dsw-alias-label-primary);\n overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;\n}\n.wd-shell .pboard-card-meta { font-size: 9.5px; line-height: 14px; color: var(--dsw-alias-label-tertiary); font-variant-numeric: tabular-nums; }\n.wd-shell .pboard-card-owner { font-variant-numeric: normal; }\n.wd-shell .pboard-card-progress {\n font-size: 10px; line-height: 14px; color: var(--dsw-alias-label-secondary);\n overflow: hidden; text-overflow: ellipsis; white-space: nowrap;\n}\n.wd-shell .pboard-card-gap { font-size: 9.5px; line-height: 14px; font-weight: 650; color: var(--wd-red); }\n.wd-shell .pboard-empty {\n padding: 16px 8px; text-align: center;\n font-size: 10.5px; line-height: 16px; color: var(--dsw-alias-label-tertiary);\n border: 1px dashed var(--wd-hairline); border-radius: 8px;\n}\n\n/* ---------- table ---------- */\n.wd-shell .project-table { width: 100%; border-collapse: collapse; table-layout: fixed; }\n.wd-shell .table-head th {\n position: sticky; top: 0; z-index: 1;\n padding: 8px 12px; text-align: left; white-space: nowrap;\n font-size: 10.5px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase;\n color: var(--dsw-alias-label-tertiary);\n border-bottom: 1px solid var(--wd-hairline);\n background: var(--wd-inset);\n}\n.wd-shell .table-head th:first-child { padding-left: 16px; }\n.wd-shell .table-head th:last-child { padding-right: 16px; }\n.wd-shell .ptable-sort {\n display: inline-flex; align-items: center; gap: 3px;\n padding: 0; border: 0; background: transparent; cursor: pointer;\n font: inherit; font-size: 10.5px; font-weight: 600; letter-spacing: .06em;\n text-transform: uppercase; color: inherit; white-space: nowrap;\n}\n.wd-shell .ptable-sort:hover { color: var(--wd-text); }\n.wd-shell .ptable-sort[data-active=\"true\"] { color: var(--wd-primary); }\n.wd-shell .ptable-sort-arrow { font-size: 9.5px; }\n.wd-shell .project-row { border-bottom: 1px solid var(--wd-hairline); cursor: pointer; transition: background .1s ease; }\n.wd-shell .project-row:last-child { border-bottom: 0; }\n.wd-shell .project-row:hover { background: var(--wd-inset); }\n.wd-shell .project-row[data-selected=\"true\"] { background: var(--wd-primary-soft); }\n.wd-shell .project-row:focus-visible { outline: 2px solid var(--wd-primary); outline-offset: -2px; }\n.wd-shell .project-row td { padding: 10px 12px; vertical-align: middle; }\n.wd-shell .project-row td:first-child { padding-left: 16px; }\n.wd-shell .project-row td:last-child { padding-right: 16px; text-align: right; }\n.wd-shell .project-name {\n font-size: 12.5px; line-height: 18px; font-weight: 600;\n display: block; overflow-wrap: anywhere; letter-spacing: -.005em;\n}\n.wd-shell .project-id {\n font-size: 10px; line-height: 15px; color: var(--dsw-alias-label-tertiary);\n font-family: ui-monospace, SFMono-Regular, Menlo, monospace;\n display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;\n}\n.wd-shell .project-org { display: block; font-size: 11.5px; line-height: 17px; font-weight: 550; overflow-wrap: anywhere; }\n.wd-shell .project-meta { font-size: 10.5px; line-height: 16px; color: var(--dsw-alias-label-secondary); }\n.wd-shell .progress-summary {\n font-size: 11px; line-height: 16px; color: var(--dsw-alias-label-secondary);\n overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;\n}\n.wd-shell .ptable-stage { display: flex; flex-direction: column; gap: 4px; align-items: flex-start; }\n.wd-shell .ptable-amount { display: flex; flex-direction: column; gap: 4px; align-items: stretch; }\n.wd-shell .amount-cell { display: block; text-align: right; font-variant-numeric: tabular-nums; font-weight: 650; font-size: 12px; }\n.wd-shell .gap-cell { display: flex; align-items: baseline; gap: 3px; white-space: nowrap; }\n.wd-shell .gap-count { font-variant-numeric: tabular-nums; font-weight: 650; font-size: 12.5px; }\n.wd-shell .gap-count[data-level=\"high\"] { color: var(--wd-red); }\n.wd-shell .gap-count[data-level=\"medium\"] { color: var(--wd-amber); }\n.wd-shell .gap-count[data-level=\"none\"] { color: var(--wd-green); }\n.wd-shell .row-actions { display: flex; gap: 5px; justify-content: flex-end; }\n.wd-shell .gap-copy { font-size: 11px; line-height: 16px; color: var(--dsw-alias-label-secondary); overflow-wrap: anywhere; }\n\n/* ---------- pending rail ---------- */\n.wd-shell .pending { display: flex; flex-direction: column; }\n.wd-shell .pending-group { border-bottom: 1px solid var(--wd-hairline); }\n.wd-shell .pending-group:last-child { border-bottom: 0; }\n.wd-shell .pending-group[data-level=\"high\"] { border-left: 3px solid var(--wd-red); }\n.wd-shell .pending-group[data-level=\"medium\"] { border-left: 3px solid var(--wd-amber); }\n.wd-shell .pending-group-head {\n display: flex; align-items: baseline; gap: 6px;\n padding: 9px 13px 5px; flex-wrap: wrap;\n}\n.wd-shell .pending-rule-no {\n flex: none; padding: 0 5px; border-radius: 4px;\n font-size: 9.5px; line-height: 15px; font-weight: 650;\n font-family: ui-monospace, SFMono-Regular, Menlo, monospace;\n background: var(--wd-slate-soft); color: var(--dsw-alias-label-secondary);\n}\n.wd-shell .pending-group[data-level=\"high\"] .pending-rule-no { background: var(--wd-red-soft); color: var(--wd-red); }\n.wd-shell .pending-group[data-level=\"medium\"] .pending-rule-no { background: var(--wd-amber-soft); color: var(--wd-amber); }\n.wd-shell .pending-rule-title { flex: 1 1 auto; min-width: 0; font-size: 11.5px; line-height: 16px; font-weight: 600; overflow-wrap: anywhere; }\n.wd-shell .pending-rule-count { flex: none; font-size: 9.5px; color: var(--dsw-alias-label-tertiary); font-variant-numeric: tabular-nums; }\n.wd-shell .pending-group-body { padding: 0 13px 10px; display: flex; flex-direction: column; gap: 6px; }\n.wd-shell .pending-gap { display: flex; flex-direction: column; gap: 2px; }\n.wd-shell .pending-gap-copy { font-size: 10.5px; line-height: 15px; color: var(--dsw-alias-label-secondary); overflow-wrap: anywhere; }\n.wd-shell .pending-gap-project { display: flex; }\n.wd-shell .pending-link {\n padding: 0; border: 0; background: transparent; cursor: pointer;\n font: inherit; font-size: 10px; color: var(--wd-primary); text-align: left;\n}\n.wd-shell .pending-link:hover { text-decoration: underline; }\n.wd-shell .pending-more { font-size: 9.5px; line-height: 14px; color: var(--dsw-alias-label-tertiary); font-style: italic; }\n\n@media (prefers-reduced-motion: reduce) {\n .wd-shell .pcard, .wd-shell .pboard-card, .wd-shell .project-row { transition: none; }\n}\n";
|
|
@@ -0,0 +1,338 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Overview styles: the portfolio band, the three project readings, the pending rail.
|
|
3
|
+
*
|
|
4
|
+
* Three decisions drive this sheet:
|
|
5
|
+
*
|
|
6
|
+
* 1. **The band is one instrument, not six cards.** It gets one container with
|
|
7
|
+
* internal dividers, so the eye reads it as a single dashboard rather than
|
|
8
|
+
* six unrelated widgets. A card grid with gaps between every figure was the
|
|
9
|
+
* failure mode of the previous stat strip.
|
|
10
|
+
* 2. **Cards carry the reading order.** Name → stage → money → latest progress →
|
|
11
|
+
* four dimensions → gaps. The gap badge sits top-right because it is the
|
|
12
|
+
* reason to open the card at all; everything else is context for it.
|
|
13
|
+
* 3. **Selection is visible from the keyboard.** The shell moves a cursor with
|
|
14
|
+
* the arrow keys, so a selected card and a selected row both have to be
|
|
15
|
+
* unmistakable — a ring, not a background tint, because the background is
|
|
16
|
+
* already doing hover duty.
|
|
17
|
+
*
|
|
18
|
+
* Class prefixes owned here: `.pf-` (band), `.pcard-`, `.pboard-`, `.ptable-`,
|
|
19
|
+
* `.pending-`, plus the shared `.panel` / `.workspace-grid` / `.project-row`
|
|
20
|
+
* atoms this surface defines because nothing else uses them.
|
|
21
|
+
*/
|
|
22
|
+
export const OVERVIEW_CSS = `
|
|
23
|
+
/* ---------- layout ---------- */
|
|
24
|
+
.wd-shell .workspace-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 16px; align-items: start; }
|
|
25
|
+
@media (max-width: 1180px) { .wd-shell .workspace-grid { grid-template-columns: minmax(0, 1fr); } }
|
|
26
|
+
.wd-shell .primary-column, .wd-shell .secondary-column { min-width: 0; display: flex; flex-direction: column; gap: 16px; }
|
|
27
|
+
.wd-shell .panel {
|
|
28
|
+
border: 1px solid var(--wd-hairline); border-radius: 12px;
|
|
29
|
+
background: var(--wd-surface); overflow: hidden;
|
|
30
|
+
box-shadow: var(--wd-shadow-1);
|
|
31
|
+
}
|
|
32
|
+
.wd-shell .panel-header {
|
|
33
|
+
display: flex; align-items: baseline; gap: 9px;
|
|
34
|
+
padding: 12px 18px 10px;
|
|
35
|
+
border-bottom: 1px solid var(--wd-hairline);
|
|
36
|
+
background: linear-gradient(180deg, var(--wd-surface) 0%, var(--wd-inset) 150%);
|
|
37
|
+
}
|
|
38
|
+
.wd-shell .panel-title { margin: 0; font-size: 13.5px; line-height: 20px; font-weight: 650; letter-spacing: -.005em; }
|
|
39
|
+
.wd-shell .panel-kicker {
|
|
40
|
+
margin-left: auto; font-size: 11px; color: var(--dsw-alias-label-tertiary);
|
|
41
|
+
font-variant-numeric: tabular-nums;
|
|
42
|
+
padding: 1px 8px; border-radius: 20px;
|
|
43
|
+
background: var(--wd-inset); border: 1px solid var(--wd-hairline);
|
|
44
|
+
}
|
|
45
|
+
.wd-shell .panel-body { padding: 0; }
|
|
46
|
+
.wd-shell .panel-body.padded { padding: 13px 18px; }
|
|
47
|
+
|
|
48
|
+
/* ---------- portfolio band ---------- */
|
|
49
|
+
.wd-shell .pf-band {
|
|
50
|
+
margin-bottom: 14px;
|
|
51
|
+
border: 1px solid var(--wd-hairline); border-radius: 12px;
|
|
52
|
+
background: var(--wd-surface);
|
|
53
|
+
box-shadow: var(--wd-shadow-1);
|
|
54
|
+
overflow: hidden;
|
|
55
|
+
}
|
|
56
|
+
.wd-shell .pf-band-head {
|
|
57
|
+
display: flex; align-items: baseline; gap: 10px;
|
|
58
|
+
padding: 9px 16px 8px;
|
|
59
|
+
border-bottom: 1px solid var(--wd-hairline);
|
|
60
|
+
background: linear-gradient(180deg, var(--wd-surface) 0%, var(--wd-inset) 150%);
|
|
61
|
+
}
|
|
62
|
+
.wd-shell .pf-band-title { margin: 0; font-size: 13.5px; line-height: 20px; font-weight: 650; }
|
|
63
|
+
.wd-shell .pf-band-note { margin-left: auto; font-size: 11px; color: var(--dsw-alias-label-tertiary); font-variant-numeric: tabular-nums; }
|
|
64
|
+
.wd-shell .pf-grid {
|
|
65
|
+
display: grid;
|
|
66
|
+
grid-template-columns: repeat(8, minmax(0, 1fr));
|
|
67
|
+
gap: 1px;
|
|
68
|
+
background: var(--wd-hairline);
|
|
69
|
+
}
|
|
70
|
+
@media (max-width: 1280px) { .wd-shell .pf-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
|
|
71
|
+
@media (max-width: 860px) { .wd-shell .pf-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
|
|
72
|
+
@media (max-width: 560px) { .wd-shell .pf-grid { grid-template-columns: minmax(0, 1fr); } }
|
|
73
|
+
/* Two strips, four blocks each. The band is context: it answers "where does the
|
|
74
|
+
money sit" in about a third of the screen, then gets out of the way. An eight-column
|
|
75
|
+
grid lets two wide figures and four list figures share exactly two rows. */
|
|
76
|
+
.wd-shell .pf-block {
|
|
77
|
+
padding: 8px 12px 9px;
|
|
78
|
+
background: var(--wd-surface);
|
|
79
|
+
min-height: 0;
|
|
80
|
+
justify-content: flex-start;
|
|
81
|
+
}
|
|
82
|
+
.wd-shell .pf-block[data-span="4"] { grid-column: span 4; }
|
|
83
|
+
.wd-shell .pf-block[data-span="2"] { grid-column: span 2; }
|
|
84
|
+
@media (max-width: 1280px) {
|
|
85
|
+
.wd-shell .pf-block[data-span="4"] { grid-column: span 4; }
|
|
86
|
+
.wd-shell .pf-block[data-span="2"] { grid-column: span 2; }
|
|
87
|
+
}
|
|
88
|
+
@media (max-width: 860px) {
|
|
89
|
+
.wd-shell .pf-block[data-span="4"], .wd-shell .pf-block[data-span="2"] { grid-column: span 2; }
|
|
90
|
+
}
|
|
91
|
+
@media (max-width: 560px) {
|
|
92
|
+
.wd-shell .pf-block[data-span="4"], .wd-shell .pf-block[data-span="2"] { grid-column: span 1; }
|
|
93
|
+
}
|
|
94
|
+
@media (max-width: 720px) { .wd-shell .pf-block-wide { grid-column: span 1; } }
|
|
95
|
+
.wd-shell .pf-radials { display: flex; gap: 8px; justify-content: space-between; padding: 2px 2px 0; }
|
|
96
|
+
/* Four rows fit exactly; the cap only protects against a deployment with many
|
|
97
|
+
more orgs than this one, where the strip must not grow the band. */
|
|
98
|
+
.wd-shell .pf-block[data-span="2"] .barlist { max-height: 168px; overflow: auto; scrollbar-width: thin; }
|
|
99
|
+
.wd-shell .pf-collapse {
|
|
100
|
+
display: inline-flex; align-items: center; gap: 4px;
|
|
101
|
+
padding: 1px 7px; border-radius: 6px;
|
|
102
|
+
border: 1px solid var(--wd-hairline); background: var(--wd-inset);
|
|
103
|
+
font-size: 10px; line-height: 15px; color: var(--dsw-alias-label-tertiary);
|
|
104
|
+
cursor: pointer; font-family: inherit; white-space: nowrap;
|
|
105
|
+
}
|
|
106
|
+
.wd-shell .pf-collapse:hover { color: var(--wd-text); background: var(--wd-surface); }
|
|
107
|
+
.wd-shell .pf-band[data-collapsed="true"] .pf-grid { display: none; }
|
|
108
|
+
.wd-shell .pf-note {
|
|
109
|
+
margin: 5px 0 0; font-size: 10px; line-height: 15px;
|
|
110
|
+
color: var(--dsw-alias-label-tertiary);
|
|
111
|
+
overflow-wrap: anywhere;
|
|
112
|
+
display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
|
|
113
|
+
}
|
|
114
|
+
.wd-shell .pf-note[data-tone="amber"] { color: var(--wd-amber); }
|
|
115
|
+
|
|
116
|
+
/* ---------- project cards ---------- */
|
|
117
|
+
.wd-shell .pcard-grid {
|
|
118
|
+
display: grid;
|
|
119
|
+
grid-template-columns: repeat(auto-fill, minmax(268px, 1fr));
|
|
120
|
+
gap: 12px; padding: 14px;
|
|
121
|
+
}
|
|
122
|
+
.wd-shell .pcard {
|
|
123
|
+
display: flex; flex-direction: column; gap: 9px;
|
|
124
|
+
padding: 13px 14px 11px;
|
|
125
|
+
border: 1px solid var(--wd-hairline); border-radius: 10px;
|
|
126
|
+
background: var(--wd-surface);
|
|
127
|
+
cursor: pointer; min-width: 0;
|
|
128
|
+
transition: box-shadow .15s ease, border-color .15s ease, transform .15s ease;
|
|
129
|
+
}
|
|
130
|
+
.wd-shell .pcard:hover { box-shadow: var(--wd-shadow-2); border-color: var(--dsw-alias-border-l2); transform: translateY(-1px); }
|
|
131
|
+
.wd-shell .pcard:focus-visible { outline: 2px solid var(--wd-primary); outline-offset: 1px; }
|
|
132
|
+
.wd-shell .pcard[data-selected="true"] {
|
|
133
|
+
border-color: var(--wd-primary);
|
|
134
|
+
box-shadow: 0 0 0 3px var(--wd-primary-soft), var(--wd-shadow-2);
|
|
135
|
+
}
|
|
136
|
+
.wd-shell .pcard[data-closed="true"] { opacity: .82; }
|
|
137
|
+
.wd-shell .pcard-head { display: flex; align-items: flex-start; gap: 8px; }
|
|
138
|
+
.wd-shell .pcard-title-block { min-width: 0; flex: 1 1 auto; display: flex; flex-direction: column; gap: 1px; }
|
|
139
|
+
.wd-shell .pcard-name {
|
|
140
|
+
font-size: 13.5px; line-height: 19px; font-weight: 650;
|
|
141
|
+
letter-spacing: -.005em; overflow-wrap: anywhere;
|
|
142
|
+
display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
|
|
143
|
+
}
|
|
144
|
+
.wd-shell .pcard-id {
|
|
145
|
+
font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
|
|
146
|
+
font-size: 10px; line-height: 15px; color: var(--dsw-alias-label-tertiary);
|
|
147
|
+
}
|
|
148
|
+
.wd-shell .pcard-badge {
|
|
149
|
+
flex: none; padding: 1px 7px; border-radius: 20px;
|
|
150
|
+
font-size: 10px; line-height: 15px; font-weight: 650; white-space: nowrap;
|
|
151
|
+
}
|
|
152
|
+
.wd-shell .pcard-badge[data-tone="red"] { background: var(--wd-red-soft); color: var(--wd-red); }
|
|
153
|
+
.wd-shell .pcard-badge[data-tone="amber"] { background: var(--wd-amber-soft); color: var(--wd-amber); }
|
|
154
|
+
.wd-shell .pcard-stage { display: flex; align-items: center; gap: 8px; min-width: 0; }
|
|
155
|
+
.wd-shell .pcard-stage-pill { flex: none; }
|
|
156
|
+
.wd-shell .pcard-stage .rail-mini { flex: 1 1 auto; }
|
|
157
|
+
.wd-shell .pcard-meta { display: flex; align-items: baseline; gap: 8px; }
|
|
158
|
+
.wd-shell .pcard-org {
|
|
159
|
+
flex: 1 1 auto; min-width: 0;
|
|
160
|
+
font-size: 11px; line-height: 16px; color: var(--dsw-alias-label-secondary);
|
|
161
|
+
overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
|
|
162
|
+
}
|
|
163
|
+
.wd-shell .pcard-amount {
|
|
164
|
+
flex: none; font-size: 12.5px; font-weight: 650;
|
|
165
|
+
font-variant-numeric: tabular-nums; color: var(--wd-amber);
|
|
166
|
+
}
|
|
167
|
+
.wd-shell .pcard-unit { margin-left: 2px; font-size: 9.5px; font-weight: 500; color: var(--dsw-alias-label-tertiary); }
|
|
168
|
+
.wd-shell .pcard-progress {
|
|
169
|
+
display: flex; flex-direction: column; gap: 1px;
|
|
170
|
+
padding: 7px 9px; border-radius: 8px;
|
|
171
|
+
background: var(--wd-inset); border: 1px solid var(--wd-hairline);
|
|
172
|
+
}
|
|
173
|
+
.wd-shell .pcard-progress-label {
|
|
174
|
+
font-size: 9.5px; line-height: 14px; letter-spacing: .05em;
|
|
175
|
+
text-transform: uppercase; color: var(--dsw-alias-label-tertiary); font-weight: 600;
|
|
176
|
+
}
|
|
177
|
+
.wd-shell .pcard-progress-copy {
|
|
178
|
+
font-size: 11.5px; line-height: 16px; color: var(--dsw-alias-label-secondary);
|
|
179
|
+
overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
|
|
180
|
+
}
|
|
181
|
+
.wd-shell .pcard-progress-meta {
|
|
182
|
+
margin-top: 1px; font-size: 9.5px; line-height: 14px;
|
|
183
|
+
color: var(--dsw-alias-label-tertiary); font-variant-numeric: tabular-nums;
|
|
184
|
+
}
|
|
185
|
+
.wd-shell .pcard-dims { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; }
|
|
186
|
+
.wd-shell .pcard-dim {
|
|
187
|
+
display: flex; flex-direction: column; align-items: center; gap: 1px;
|
|
188
|
+
padding: 3px 2px; border-radius: 6px; min-width: 0;
|
|
189
|
+
background: var(--wd-red-soft);
|
|
190
|
+
}
|
|
191
|
+
.wd-shell .pcard-dim[data-present="true"] { background: var(--wd-green-soft); }
|
|
192
|
+
.wd-shell .pcard-dim-mark { font-size: 10.5px; line-height: 14px; font-weight: 650; color: var(--wd-red); }
|
|
193
|
+
.wd-shell .pcard-dim[data-present="true"] .pcard-dim-mark { color: var(--wd-green); }
|
|
194
|
+
.wd-shell .pcard-dim-label {
|
|
195
|
+
font-size: 8.5px; line-height: 12px; color: var(--dsw-alias-label-tertiary);
|
|
196
|
+
white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%;
|
|
197
|
+
}
|
|
198
|
+
.wd-shell .pcard-foot { display: flex; align-items: center; gap: 8px; }
|
|
199
|
+
.wd-shell .pcard-since { font-size: 10px; line-height: 14px; color: var(--dsw-alias-label-tertiary); font-variant-numeric: tabular-nums; }
|
|
200
|
+
.wd-shell .pcard-open { margin-left: auto; font-size: 10.5px; color: var(--wd-primary); font-weight: 600; }
|
|
201
|
+
|
|
202
|
+
/* ---------- board ---------- */
|
|
203
|
+
.wd-shell .pboard {
|
|
204
|
+
display: flex; gap: 10px; padding: 14px;
|
|
205
|
+
overflow-x: auto; overscroll-behavior-x: contain;
|
|
206
|
+
align-items: stretch;
|
|
207
|
+
}
|
|
208
|
+
.wd-shell .pboard-column {
|
|
209
|
+
flex: 1 1 0; min-width: 176px; max-width: 300px;
|
|
210
|
+
display: flex; flex-direction: column; gap: 8px;
|
|
211
|
+
padding: 10px 9px 12px; border-radius: 10px;
|
|
212
|
+
background: var(--wd-inset); border: 1px solid var(--wd-hairline);
|
|
213
|
+
}
|
|
214
|
+
.wd-shell .pboard-column[data-empty="true"] { background: transparent; border-style: dashed; }
|
|
215
|
+
.wd-shell .pboard-column-head { display: flex; flex-direction: column; gap: 3px; }
|
|
216
|
+
.wd-shell .pboard-column-label { font-size: 11.5px; line-height: 16px; font-weight: 650; color: var(--dsw-alias-label-secondary); }
|
|
217
|
+
.wd-shell .pboard-column-count {
|
|
218
|
+
font-size: 9.5px; line-height: 14px;
|
|
219
|
+
color: var(--dsw-alias-label-tertiary); font-variant-numeric: tabular-nums;
|
|
220
|
+
}
|
|
221
|
+
.wd-shell .pboard-column-body { display: flex; flex-direction: column; gap: 7px; flex: 1 1 auto; }
|
|
222
|
+
.wd-shell .pboard-card {
|
|
223
|
+
display: flex; flex-direction: column; gap: 3px;
|
|
224
|
+
padding: 9px 10px; border-radius: 8px; width: 100%; text-align: left;
|
|
225
|
+
border: 1px solid var(--wd-hairline); background: var(--wd-surface);
|
|
226
|
+
cursor: pointer; font-family: inherit;
|
|
227
|
+
box-shadow: var(--wd-shadow-1);
|
|
228
|
+
transition: box-shadow .14s ease, border-color .14s ease;
|
|
229
|
+
}
|
|
230
|
+
.wd-shell .pboard-card:hover { box-shadow: var(--wd-shadow-2); border-color: var(--dsw-alias-border-l2); }
|
|
231
|
+
.wd-shell .pboard-card[data-high="true"] { border-left: 3px solid var(--wd-red); }
|
|
232
|
+
.wd-shell .pboard-card-name {
|
|
233
|
+
font-size: 11.5px; line-height: 16px; font-weight: 600; color: var(--dsw-alias-label-primary);
|
|
234
|
+
overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
|
|
235
|
+
}
|
|
236
|
+
.wd-shell .pboard-card-meta { font-size: 9.5px; line-height: 14px; color: var(--dsw-alias-label-tertiary); font-variant-numeric: tabular-nums; }
|
|
237
|
+
.wd-shell .pboard-card-owner { font-variant-numeric: normal; }
|
|
238
|
+
.wd-shell .pboard-card-progress {
|
|
239
|
+
font-size: 10px; line-height: 14px; color: var(--dsw-alias-label-secondary);
|
|
240
|
+
overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
|
|
241
|
+
}
|
|
242
|
+
.wd-shell .pboard-card-gap { font-size: 9.5px; line-height: 14px; font-weight: 650; color: var(--wd-red); }
|
|
243
|
+
.wd-shell .pboard-empty {
|
|
244
|
+
padding: 16px 8px; text-align: center;
|
|
245
|
+
font-size: 10.5px; line-height: 16px; color: var(--dsw-alias-label-tertiary);
|
|
246
|
+
border: 1px dashed var(--wd-hairline); border-radius: 8px;
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
/* ---------- table ---------- */
|
|
250
|
+
.wd-shell .project-table { width: 100%; border-collapse: collapse; table-layout: fixed; }
|
|
251
|
+
.wd-shell .table-head th {
|
|
252
|
+
position: sticky; top: 0; z-index: 1;
|
|
253
|
+
padding: 8px 12px; text-align: left; white-space: nowrap;
|
|
254
|
+
font-size: 10.5px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
|
|
255
|
+
color: var(--dsw-alias-label-tertiary);
|
|
256
|
+
border-bottom: 1px solid var(--wd-hairline);
|
|
257
|
+
background: var(--wd-inset);
|
|
258
|
+
}
|
|
259
|
+
.wd-shell .table-head th:first-child { padding-left: 16px; }
|
|
260
|
+
.wd-shell .table-head th:last-child { padding-right: 16px; }
|
|
261
|
+
.wd-shell .ptable-sort {
|
|
262
|
+
display: inline-flex; align-items: center; gap: 3px;
|
|
263
|
+
padding: 0; border: 0; background: transparent; cursor: pointer;
|
|
264
|
+
font: inherit; font-size: 10.5px; font-weight: 600; letter-spacing: .06em;
|
|
265
|
+
text-transform: uppercase; color: inherit; white-space: nowrap;
|
|
266
|
+
}
|
|
267
|
+
.wd-shell .ptable-sort:hover { color: var(--wd-text); }
|
|
268
|
+
.wd-shell .ptable-sort[data-active="true"] { color: var(--wd-primary); }
|
|
269
|
+
.wd-shell .ptable-sort-arrow { font-size: 9.5px; }
|
|
270
|
+
.wd-shell .project-row { border-bottom: 1px solid var(--wd-hairline); cursor: pointer; transition: background .1s ease; }
|
|
271
|
+
.wd-shell .project-row:last-child { border-bottom: 0; }
|
|
272
|
+
.wd-shell .project-row:hover { background: var(--wd-inset); }
|
|
273
|
+
.wd-shell .project-row[data-selected="true"] { background: var(--wd-primary-soft); }
|
|
274
|
+
.wd-shell .project-row:focus-visible { outline: 2px solid var(--wd-primary); outline-offset: -2px; }
|
|
275
|
+
.wd-shell .project-row td { padding: 10px 12px; vertical-align: middle; }
|
|
276
|
+
.wd-shell .project-row td:first-child { padding-left: 16px; }
|
|
277
|
+
.wd-shell .project-row td:last-child { padding-right: 16px; text-align: right; }
|
|
278
|
+
.wd-shell .project-name {
|
|
279
|
+
font-size: 12.5px; line-height: 18px; font-weight: 600;
|
|
280
|
+
display: block; overflow-wrap: anywhere; letter-spacing: -.005em;
|
|
281
|
+
}
|
|
282
|
+
.wd-shell .project-id {
|
|
283
|
+
font-size: 10px; line-height: 15px; color: var(--dsw-alias-label-tertiary);
|
|
284
|
+
font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
|
|
285
|
+
display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
|
|
286
|
+
}
|
|
287
|
+
.wd-shell .project-org { display: block; font-size: 11.5px; line-height: 17px; font-weight: 550; overflow-wrap: anywhere; }
|
|
288
|
+
.wd-shell .project-meta { font-size: 10.5px; line-height: 16px; color: var(--dsw-alias-label-secondary); }
|
|
289
|
+
.wd-shell .progress-summary {
|
|
290
|
+
font-size: 11px; line-height: 16px; color: var(--dsw-alias-label-secondary);
|
|
291
|
+
overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
|
|
292
|
+
}
|
|
293
|
+
.wd-shell .ptable-stage { display: flex; flex-direction: column; gap: 4px; align-items: flex-start; }
|
|
294
|
+
.wd-shell .ptable-amount { display: flex; flex-direction: column; gap: 4px; align-items: stretch; }
|
|
295
|
+
.wd-shell .amount-cell { display: block; text-align: right; font-variant-numeric: tabular-nums; font-weight: 650; font-size: 12px; }
|
|
296
|
+
.wd-shell .gap-cell { display: flex; align-items: baseline; gap: 3px; white-space: nowrap; }
|
|
297
|
+
.wd-shell .gap-count { font-variant-numeric: tabular-nums; font-weight: 650; font-size: 12.5px; }
|
|
298
|
+
.wd-shell .gap-count[data-level="high"] { color: var(--wd-red); }
|
|
299
|
+
.wd-shell .gap-count[data-level="medium"] { color: var(--wd-amber); }
|
|
300
|
+
.wd-shell .gap-count[data-level="none"] { color: var(--wd-green); }
|
|
301
|
+
.wd-shell .row-actions { display: flex; gap: 5px; justify-content: flex-end; }
|
|
302
|
+
.wd-shell .gap-copy { font-size: 11px; line-height: 16px; color: var(--dsw-alias-label-secondary); overflow-wrap: anywhere; }
|
|
303
|
+
|
|
304
|
+
/* ---------- pending rail ---------- */
|
|
305
|
+
.wd-shell .pending { display: flex; flex-direction: column; }
|
|
306
|
+
.wd-shell .pending-group { border-bottom: 1px solid var(--wd-hairline); }
|
|
307
|
+
.wd-shell .pending-group:last-child { border-bottom: 0; }
|
|
308
|
+
.wd-shell .pending-group[data-level="high"] { border-left: 3px solid var(--wd-red); }
|
|
309
|
+
.wd-shell .pending-group[data-level="medium"] { border-left: 3px solid var(--wd-amber); }
|
|
310
|
+
.wd-shell .pending-group-head {
|
|
311
|
+
display: flex; align-items: baseline; gap: 6px;
|
|
312
|
+
padding: 9px 13px 5px; flex-wrap: wrap;
|
|
313
|
+
}
|
|
314
|
+
.wd-shell .pending-rule-no {
|
|
315
|
+
flex: none; padding: 0 5px; border-radius: 4px;
|
|
316
|
+
font-size: 9.5px; line-height: 15px; font-weight: 650;
|
|
317
|
+
font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
|
|
318
|
+
background: var(--wd-slate-soft); color: var(--dsw-alias-label-secondary);
|
|
319
|
+
}
|
|
320
|
+
.wd-shell .pending-group[data-level="high"] .pending-rule-no { background: var(--wd-red-soft); color: var(--wd-red); }
|
|
321
|
+
.wd-shell .pending-group[data-level="medium"] .pending-rule-no { background: var(--wd-amber-soft); color: var(--wd-amber); }
|
|
322
|
+
.wd-shell .pending-rule-title { flex: 1 1 auto; min-width: 0; font-size: 11.5px; line-height: 16px; font-weight: 600; overflow-wrap: anywhere; }
|
|
323
|
+
.wd-shell .pending-rule-count { flex: none; font-size: 9.5px; color: var(--dsw-alias-label-tertiary); font-variant-numeric: tabular-nums; }
|
|
324
|
+
.wd-shell .pending-group-body { padding: 0 13px 10px; display: flex; flex-direction: column; gap: 6px; }
|
|
325
|
+
.wd-shell .pending-gap { display: flex; flex-direction: column; gap: 2px; }
|
|
326
|
+
.wd-shell .pending-gap-copy { font-size: 10.5px; line-height: 15px; color: var(--dsw-alias-label-secondary); overflow-wrap: anywhere; }
|
|
327
|
+
.wd-shell .pending-gap-project { display: flex; }
|
|
328
|
+
.wd-shell .pending-link {
|
|
329
|
+
padding: 0; border: 0; background: transparent; cursor: pointer;
|
|
330
|
+
font: inherit; font-size: 10px; color: var(--wd-primary); text-align: left;
|
|
331
|
+
}
|
|
332
|
+
.wd-shell .pending-link:hover { text-decoration: underline; }
|
|
333
|
+
.wd-shell .pending-more { font-size: 9.5px; line-height: 14px; color: var(--dsw-alias-label-tertiary); font-style: italic; }
|
|
334
|
+
|
|
335
|
+
@media (prefers-reduced-motion: reduce) {
|
|
336
|
+
.wd-shell .pcard, .wd-shell .pboard-card, .wd-shell .project-row { transition: none; }
|
|
337
|
+
}
|
|
338
|
+
`;
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Browser-local refresh cadence.
|
|
3
|
+
*
|
|
4
|
+
* The cadence is a user preference, not plugin configuration, so it lives in
|
|
5
|
+
* `localStorage` under the keys the specification names and never reaches the
|
|
6
|
+
* Host. This module owns the read/write/parse rules so the settings dialog and
|
|
7
|
+
* the timer effect share one interpretation, and so the whole policy is
|
|
8
|
+
* testable without a DOM.
|
|
9
|
+
*
|
|
10
|
+
* Failure policy: storage is optional. A browser with storage disabled (or a
|
|
11
|
+
* quota error) must still render the console, so every write is best-effort and
|
|
12
|
+
* every read falls back to the documented default: manual refresh only.
|
|
13
|
+
*/
|
|
14
|
+
import { type RefreshInterval, type SortKey, type ViewMode } from '../types.js';
|
|
15
|
+
/** One resolved cadence: what the timer effect needs, nothing more. */
|
|
16
|
+
export interface RefreshPreference {
|
|
17
|
+
interval: RefreshInterval;
|
|
18
|
+
/** Only meaningful when `interval === 'custom'`. */
|
|
19
|
+
customMinutes: number;
|
|
20
|
+
}
|
|
21
|
+
/** The documented default: no automatic refresh at all. */
|
|
22
|
+
export declare const DEFAULT_PREFERENCE: RefreshPreference;
|
|
23
|
+
/** The storage face this module needs; `undefined` when unavailable. */
|
|
24
|
+
export type StorageLike = Pick<Storage, 'getItem' | 'setItem'> | undefined;
|
|
25
|
+
/** Resolve the browser storage without throwing when it is blocked. */
|
|
26
|
+
export declare function browserStorage(): StorageLike;
|
|
27
|
+
/** Clamp a custom cadence into the supported range, rounding to a whole minute. */
|
|
28
|
+
export declare function clampMinutes(value: number): number;
|
|
29
|
+
/** Accept only a declared interval id; anything else is the default. */
|
|
30
|
+
export declare function parseInterval(raw: string | null | undefined): RefreshInterval;
|
|
31
|
+
/** Read the stored preference, falling back to manual-only on anything odd. */
|
|
32
|
+
export declare function readPreference(storage?: StorageLike): RefreshPreference;
|
|
33
|
+
/** Persist the preference; a blocked or full storage degrades silently. */
|
|
34
|
+
export declare function writePreference(preference: RefreshPreference, storage?: StorageLike): void;
|
|
35
|
+
/**
|
|
36
|
+
* The timer period in milliseconds, or `null` when refresh is manual only.
|
|
37
|
+
*
|
|
38
|
+
* This is the single place the four cadences turn into a number, so the effect
|
|
39
|
+
* and the settings dialog can never disagree about "every 10 minutes".
|
|
40
|
+
*/
|
|
41
|
+
export declare function intervalMs(preference: RefreshPreference): number | null;
|
|
42
|
+
/** The stored overview layout: which view mode, and how the list is sorted. */
|
|
43
|
+
export interface ViewPreference {
|
|
44
|
+
viewMode: ViewMode;
|
|
45
|
+
sortKey: SortKey;
|
|
46
|
+
}
|
|
47
|
+
/** The documented default: cards, ordered by what needs attention. */
|
|
48
|
+
export declare const DEFAULT_VIEW_PREFERENCE: ViewPreference;
|
|
49
|
+
/** Accept only a declared view mode; anything else is the default. */
|
|
50
|
+
export declare function parseViewMode(raw: string | null | undefined): ViewMode;
|
|
51
|
+
/** Accept only a declared sort key; anything else is the default. */
|
|
52
|
+
export declare function parseSortKey(raw: string | null | undefined): SortKey;
|
|
53
|
+
/** Read the stored view preference, falling back to the default on anything odd. */
|
|
54
|
+
export declare function readViewPreference(storage?: StorageLike): ViewPreference;
|
|
55
|
+
/** Persist the view preference; a blocked or full storage degrades silently. */
|
|
56
|
+
export declare function writeViewPreference(preference: ViewPreference, storage?: StorageLike): void;
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Browser-local refresh cadence.
|
|
3
|
+
*
|
|
4
|
+
* The cadence is a user preference, not plugin configuration, so it lives in
|
|
5
|
+
* `localStorage` under the keys the specification names and never reaches the
|
|
6
|
+
* Host. This module owns the read/write/parse rules so the settings dialog and
|
|
7
|
+
* the timer effect share one interpretation, and so the whole policy is
|
|
8
|
+
* testable without a DOM.
|
|
9
|
+
*
|
|
10
|
+
* Failure policy: storage is optional. A browser with storage disabled (or a
|
|
11
|
+
* quota error) must still render the console, so every write is best-effort and
|
|
12
|
+
* every read falls back to the documented default: manual refresh only.
|
|
13
|
+
*/
|
|
14
|
+
import { CUSTOM_MINUTES_KEY, CUSTOM_MINUTES_MAX, CUSTOM_MINUTES_MIN, DEFAULT_CUSTOM_MINUTES, REFRESH_INTERVAL_KEY, REFRESH_INTERVALS, SORT_KEY_KEY, SORT_KEYS, VIEW_MODE_KEY, VIEW_MODES, } from '../types.js';
|
|
15
|
+
/** The documented default: no automatic refresh at all. */
|
|
16
|
+
export const DEFAULT_PREFERENCE = { interval: 'off', customMinutes: DEFAULT_CUSTOM_MINUTES };
|
|
17
|
+
/** Resolve the browser storage without throwing when it is blocked. */
|
|
18
|
+
export function browserStorage() {
|
|
19
|
+
try {
|
|
20
|
+
if (typeof globalThis.localStorage === 'undefined')
|
|
21
|
+
return undefined;
|
|
22
|
+
// Safari in private mode throws on the first access; probe it once.
|
|
23
|
+
const probe = '__poc-console-probe__';
|
|
24
|
+
globalThis.localStorage.setItem(probe, '1');
|
|
25
|
+
globalThis.localStorage.getItem(probe);
|
|
26
|
+
globalThis.localStorage.removeItem?.(probe);
|
|
27
|
+
return globalThis.localStorage;
|
|
28
|
+
}
|
|
29
|
+
catch {
|
|
30
|
+
return undefined;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
/** Clamp a custom cadence into the supported range, rounding to a whole minute. */
|
|
34
|
+
export function clampMinutes(value) {
|
|
35
|
+
if (!Number.isFinite(value))
|
|
36
|
+
return DEFAULT_CUSTOM_MINUTES;
|
|
37
|
+
return Math.min(CUSTOM_MINUTES_MAX, Math.max(CUSTOM_MINUTES_MIN, Math.round(value)));
|
|
38
|
+
}
|
|
39
|
+
/** Accept only a declared interval id; anything else is the default. */
|
|
40
|
+
export function parseInterval(raw) {
|
|
41
|
+
const value = (raw ?? '').trim();
|
|
42
|
+
return REFRESH_INTERVALS.includes(value) ? value : DEFAULT_PREFERENCE.interval;
|
|
43
|
+
}
|
|
44
|
+
/** Read the stored preference, falling back to manual-only on anything odd. */
|
|
45
|
+
export function readPreference(storage = browserStorage()) {
|
|
46
|
+
if (storage === undefined)
|
|
47
|
+
return { ...DEFAULT_PREFERENCE };
|
|
48
|
+
const interval = parseInterval(storage.getItem(REFRESH_INTERVAL_KEY));
|
|
49
|
+
const rawMinutes = storage.getItem(CUSTOM_MINUTES_KEY);
|
|
50
|
+
const parsed = rawMinutes === null ? Number.NaN : Number(rawMinutes);
|
|
51
|
+
return {
|
|
52
|
+
interval,
|
|
53
|
+
customMinutes: Number.isFinite(parsed) ? clampMinutes(parsed) : DEFAULT_CUSTOM_MINUTES,
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
/** Persist the preference; a blocked or full storage degrades silently. */
|
|
57
|
+
export function writePreference(preference, storage = browserStorage()) {
|
|
58
|
+
if (storage === undefined)
|
|
59
|
+
return;
|
|
60
|
+
try {
|
|
61
|
+
storage.setItem(REFRESH_INTERVAL_KEY, preference.interval);
|
|
62
|
+
storage.setItem(CUSTOM_MINUTES_KEY, String(clampMinutes(preference.customMinutes)));
|
|
63
|
+
}
|
|
64
|
+
catch {
|
|
65
|
+
// A read-only or full storage only costs the user the setting, not the board.
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* The timer period in milliseconds, or `null` when refresh is manual only.
|
|
70
|
+
*
|
|
71
|
+
* This is the single place the four cadences turn into a number, so the effect
|
|
72
|
+
* and the settings dialog can never disagree about "every 10 minutes".
|
|
73
|
+
*/
|
|
74
|
+
export function intervalMs(preference) {
|
|
75
|
+
switch (preference.interval) {
|
|
76
|
+
case 'off':
|
|
77
|
+
return null;
|
|
78
|
+
case '10m':
|
|
79
|
+
return 10 * 60_000;
|
|
80
|
+
case '1h':
|
|
81
|
+
return 60 * 60_000;
|
|
82
|
+
case 'custom':
|
|
83
|
+
return clampMinutes(preference.customMinutes) * 60_000;
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
/** The documented default: cards, ordered by what needs attention. */
|
|
87
|
+
export const DEFAULT_VIEW_PREFERENCE = { viewMode: 'cards', sortKey: 'attention' };
|
|
88
|
+
/** Accept only a declared view mode; anything else is the default. */
|
|
89
|
+
export function parseViewMode(raw) {
|
|
90
|
+
const value = (raw ?? '').trim();
|
|
91
|
+
return VIEW_MODES.includes(value) ? value : DEFAULT_VIEW_PREFERENCE.viewMode;
|
|
92
|
+
}
|
|
93
|
+
/** Accept only a declared sort key; anything else is the default. */
|
|
94
|
+
export function parseSortKey(raw) {
|
|
95
|
+
const value = (raw ?? '').trim();
|
|
96
|
+
return SORT_KEYS.includes(value) ? value : DEFAULT_VIEW_PREFERENCE.sortKey;
|
|
97
|
+
}
|
|
98
|
+
/** Read the stored view preference, falling back to the default on anything odd. */
|
|
99
|
+
export function readViewPreference(storage = browserStorage()) {
|
|
100
|
+
if (storage === undefined)
|
|
101
|
+
return { ...DEFAULT_VIEW_PREFERENCE };
|
|
102
|
+
return {
|
|
103
|
+
viewMode: parseViewMode(storage.getItem(VIEW_MODE_KEY)),
|
|
104
|
+
sortKey: parseSortKey(storage.getItem(SORT_KEY_KEY)),
|
|
105
|
+
};
|
|
106
|
+
}
|
|
107
|
+
/** Persist the view preference; a blocked or full storage degrades silently. */
|
|
108
|
+
export function writeViewPreference(preference, storage = browserStorage()) {
|
|
109
|
+
if (storage === undefined)
|
|
110
|
+
return;
|
|
111
|
+
try {
|
|
112
|
+
storage.setItem(VIEW_MODE_KEY, preference.viewMode);
|
|
113
|
+
storage.setItem(SORT_KEY_KEY, preference.sortKey);
|
|
114
|
+
}
|
|
115
|
+
catch {
|
|
116
|
+
// Losing the layout preference costs one click, not the board.
|
|
117
|
+
}
|
|
118
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The style assembly point.
|
|
3
|
+
*
|
|
4
|
+
* Each surface ships its CSS beside its component (`css/charts.ts`,
|
|
5
|
+
* `css/overview.ts`, `css/detail.ts`, `css/insights.ts`), and the shell owns the
|
|
6
|
+
* frame (`css/base.ts`). This module concatenates them into the single sheet the
|
|
7
|
+
* page mounts in one `<style>` element, in a fixed cascade order: variables and
|
|
8
|
+
* frame first, then the chart primitives, then the surfaces that build on them.
|
|
9
|
+
*
|
|
10
|
+
* Keeping the fragments in separate files is what let four modules be written in
|
|
11
|
+
* parallel without touching each other's stylesheets. The order below is the
|
|
12
|
+
* contract: a surface may rely on the frame's atoms, and no surface may rely on
|
|
13
|
+
* another surface's rules.
|
|
14
|
+
*/
|
|
15
|
+
export declare const CONSOLE_CSS: string;
|
|
16
|
+
/** The scoped root class, re-exported for tests that assert the scope. */
|
|
17
|
+
export declare const ROOT_CLASS = "wd-shell";
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The style assembly point.
|
|
3
|
+
*
|
|
4
|
+
* Each surface ships its CSS beside its component (`css/charts.ts`,
|
|
5
|
+
* `css/overview.ts`, `css/detail.ts`, `css/insights.ts`), and the shell owns the
|
|
6
|
+
* frame (`css/base.ts`). This module concatenates them into the single sheet the
|
|
7
|
+
* page mounts in one `<style>` element, in a fixed cascade order: variables and
|
|
8
|
+
* frame first, then the chart primitives, then the surfaces that build on them.
|
|
9
|
+
*
|
|
10
|
+
* Keeping the fragments in separate files is what let four modules be written in
|
|
11
|
+
* parallel without touching each other's stylesheets. The order below is the
|
|
12
|
+
* contract: a surface may rely on the frame's atoms, and no surface may rely on
|
|
13
|
+
* another surface's rules.
|
|
14
|
+
*/
|
|
15
|
+
import { BASE_CSS } from './css/base.js';
|
|
16
|
+
import { CHARTS_CSS } from './css/charts.js';
|
|
17
|
+
import { DETAIL_CSS } from './css/detail.js';
|
|
18
|
+
import { INSIGHTS_CSS } from './css/insights.js';
|
|
19
|
+
import { OVERVIEW_CSS } from './css/overview.js';
|
|
20
|
+
export const CONSOLE_CSS = [BASE_CSS, CHARTS_CSS, OVERVIEW_CSS, DETAIL_CSS, INSIGHTS_CSS].join('\n');
|
|
21
|
+
/** The scoped root class, re-exported for tests that assert the scope. */
|
|
22
|
+
export const ROOT_CLASS = 'wd-shell';
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Client dictionaries.
|
|
3
|
+
*
|
|
4
|
+
* Two locales ship with the bundle: Simplified Chinese (the authoring language
|
|
5
|
+
* and the language the ledger itself is written in) and English. Keys are flat
|
|
6
|
+
* and dot-namespaced, resolved through the shared `locale` service, so switching
|
|
7
|
+
* the GUI language re-renders the console without a reload.
|
|
8
|
+
*
|
|
9
|
+
* Rule and dimension copy is keyed by the stable ids the Host sends
|
|
10
|
+
* (`gap.G0-why-customer.title`, `dim.evidence`) rather than by prose, so a new
|
|
11
|
+
* rule id only needs a dictionary entry on both halves of the same bundle.
|
|
12
|
+
*/
|
|
13
|
+
/** The namespace registered with the Client locale service. */
|
|
14
|
+
export declare const NAMESPACE = "skillreWorkDashboard";
|
|
15
|
+
/** Chinese dictionary; the key set is the source of truth. */
|
|
16
|
+
export declare const zh: Record<string, string>;
|
|
17
|
+
/** English dictionary; every key mirrors {@link zh}. */
|
|
18
|
+
export declare const en: Record<string, string>;
|
|
19
|
+
/** Read one key from a dictionary, falling back to the key itself. */
|
|
20
|
+
export declare function textOf(dict: Record<string, string>, key: string): string;
|
|
21
|
+
/** Pick the dictionary for a locale id, falling back to English. */
|
|
22
|
+
export declare function dictFor(locale: string): Record<string, string>;
|
|
23
|
+
/** The translate function the locale service binds for one namespace. */
|
|
24
|
+
export type Translate = (key: string, params?: Record<string, string | number>) => string;
|
|
25
|
+
/**
|
|
26
|
+
* Fill `{name}` placeholders from a parameter bag.
|
|
27
|
+
*
|
|
28
|
+
* The Client-side locale service interpolates the same way, but this helper is
|
|
29
|
+
* also used for dictionary lookups that bypass the service (the initial paint
|
|
30
|
+
* before the service's snapshot is available), and for the tests.
|
|
31
|
+
*/
|
|
32
|
+
export declare function format(template: string, params?: Record<string, string | number>): string;
|