mirror of
https://github.com/tdurieux/anonymous_github.git
synced 2026-12-04 01:53:28 +01:00
feat(viewers): sort, filter, summarize, group and chart tables
The CSV/TSV viewer (explorer, gists, the author's preview) becomes an analysis view that runs on the anonymized text already in the page: click-to-sort headers (numbers, dates, natural text; stable, empty cells last), a search box and per-column range or value filters, a summary row (Average by default; Sum, Median, Min, Max, Count, Std dev) over the filtered rows, group by with an aggregate, column stats with a histogram, copy as CSV or Markdown and download of the current view, and a Chart view (bar, line, scatter) drawn in inline SVG. The view lives in the URL fragment (#table:group=model, #table-2:... for a gist file) so a link can carry it; links without it open as before. Markdown and notebook tables (pandas DataFrames) get sortable headers, an optional summary row and "Open as table" for the full view. Redaction slots keep rendering; sorting uses the XXXX-n text. The 1 MB limit holds: rows render 200 at a time as one escaped HTML string while aggregates, filters and charts use every row. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
98bf382fa8
commit
43e92bef53
19 files changed
+2094
-98
No files matched your search
@@ -15084,3 +15084,234 @@ body.dark-mode .reviewer-preview .rp-preserved-tag { background: rgba(251, 191,
|
||||
@media (max-width: 767px) {
|
||||
.gist-file-tools { width: 100%; margin-left: 0; justify-content: space-between; }
|
||||
}
|
||||
|
||||
/* ===== R21 Table analysis (data-table.js, table-enhance.js) =====
|
||||
The CSV viewer keeps its table; a quiet toolbar row sits above it and a summary
|
||||
row under it. Series colours: dataviz reference slots 1-4, validated on the
|
||||
card (#FFF) and the dark canvas (#161412). */
|
||||
body { --dt-series-1: #2a78d6; --dt-series-2: #eb6834; --dt-series-3: #1baf7a; --dt-series-4: #eda100; --dt-grid: #ECE8E0; --dt-axis: #CFC8BB; }
|
||||
.dark-mode { --dt-series-1: #3987e5; --dt-series-2: #d95926; --dt-series-3: #199e70; --dt-series-4: #c98500; --dt-grid: #2A2724; --dt-axis: #4A453E; }
|
||||
.dt { display: flex; flex-direction: column; min-width: 0; }
|
||||
.dt-toolbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 14px 24px 0; font-size: 13px; }
|
||||
.dt-search { position: relative; display: inline-flex; align-items: center; margin: 0; flex: 0 1 220px; min-width: 140px; }
|
||||
.dt-search .ui-icon { position: absolute; left: 9px; width: 14px; height: 14px; color: var(--ink-muted); pointer-events: none; }
|
||||
.dt-search-input { width: 100%; height: 30px; padding: 0 10px 0 29px; border: 1px solid var(--border-color); border-radius: var(--radius-control); background: var(--input-bg); color: var(--input-color); font: 13px/1 var(--font-sans); }
|
||||
.dt-search-input::placeholder { color: var(--ink-muted); }
|
||||
.dt-search-input:focus { outline: 2px solid color-mix(in srgb, var(--accent) 55%, transparent); outline-offset: 0; border-color: var(--accent); }
|
||||
.dt-chip { display: inline-flex; align-items: center; gap: 5px; height: 26px; padding: 0 4px 0 10px; border-radius: 999px; background: var(--accent-soft); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 35%, transparent); font-size: 12.5px; color: var(--color); white-space: nowrap; font-variant-numeric: tabular-nums; }
|
||||
.dt-chip-name { color: var(--ink-soft); }
|
||||
.dt-chip-name::after { content: ":"; }
|
||||
.dt-chip-x { display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; padding: 0; border: 0; border-radius: 50%; background: transparent; color: var(--ink-soft); cursor: pointer; }
|
||||
.dt-chip-x:hover { background: var(--hover-bg-color); color: var(--color); }
|
||||
.dt-chip-x .ui-icon { width: 12px; height: 12px; }
|
||||
.dt-link { padding: 0; border: 0; background: none; font: inherit; font-size: 12.5px; color: var(--link-color); cursor: pointer; text-decoration: underline; text-decoration-color: color-mix(in srgb, currentColor 35%, transparent); text-underline-offset: 2px; }
|
||||
.dt-count { margin-left: auto; font-size: 12.5px; color: var(--ink-muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
|
||||
.dt-tools { display: inline-flex; align-items: center; gap: 6px; }
|
||||
.dt-select { position: relative; display: inline-flex; align-items: center; gap: 6px; height: 30px; margin: 0; padding: 0 26px 0 10px; border: 1px solid var(--border-color); border-radius: var(--radius-control); background: var(--paper-card); font-size: 12.5px; color: var(--color); white-space: nowrap; }
|
||||
.dt-select:hover { background: var(--hover-bg-color); }
|
||||
.dt-select.is-on { border-color: color-mix(in srgb, var(--accent) 40%, var(--border-color)); }
|
||||
.dt-select-label { color: var(--ink-muted); font-size: 12.5px; }
|
||||
.dt-select select { appearance: none; -webkit-appearance: none; border: 0; background: transparent; padding: 0; font: 500 12.5px/1 var(--font-sans); color: var(--color); cursor: pointer; max-width: 160px; }
|
||||
.dt-select select:focus { outline: none; }
|
||||
.dt-select:focus-within { outline: 2px solid var(--accent); outline-offset: 1px; }
|
||||
.dt-select select::before { content: ""; position: absolute; inset: 0; }
|
||||
.dt-select .dt-caret, .dt-copy-btn .dt-caret { position: absolute; right: 7px; width: 12px; height: 12px; color: var(--ink-muted); pointer-events: none; }
|
||||
.dark-mode .dt-select { background: var(--canvas-bg-color); }
|
||||
.dark-mode .dt-select select option { background: var(--paper-card); color: var(--color); }
|
||||
.dt-copy { position: relative; }
|
||||
.dt-copy-btn { position: relative; height: 30px; padding: 0 26px 0 9px !important; gap: 6px; font-size: 12.5px !important; border: 1px solid var(--border-color) !important; }
|
||||
.dt-copy-btn .ui-icon:not(.dt-caret) { width: 14px; height: 14px; }
|
||||
.dt-copy-menu, .dt-tools-menu { width: 240px; }
|
||||
.dt-tools-m { display: none; position: relative; }
|
||||
.dt-menu-field { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 0; padding: 6px 10px; font-size: 13px; color: var(--ink-soft); }
|
||||
.dt-menu-field select { max-width: 130px; height: 30px; border: 1px solid var(--border-color); border-radius: var(--radius-control); background: var(--input-bg); color: var(--color); font: 13px var(--font-sans); }
|
||||
.dt .csv-table-wrap { padding-top: 12px !important; }
|
||||
.dt-wrap { max-height: calc(100vh - 150px); }
|
||||
|
||||
/* Header: the name sorts; the chevron opens stats and filters. */
|
||||
.dt-table thead th { padding: 0 !important; }
|
||||
.dt-th { display: flex; align-items: center; justify-content: space-between; gap: 2px; }
|
||||
.dt-table th.is-num .dt-th { flex-direction: row-reverse; }
|
||||
.dt-sort { display: inline-flex; align-items: center; gap: 6px; padding: 8px 4px 8px 22px; border: 0; background: none; font: inherit; color: inherit; cursor: pointer; white-space: nowrap; }
|
||||
.dt-table th.is-num .dt-sort { padding: 8px 22px 8px 4px; flex-direction: row-reverse; }
|
||||
.dt-sort:hover .dt-th-name { color: var(--color); }
|
||||
.dt-sort:focus-visible, .dt-col-btn:focus-visible, .md-sort:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; border-radius: 4px; }
|
||||
.dt-sort-icon { width: 8px; height: 12px; flex: none; fill: var(--ink-faint); opacity: .45; transition: opacity .12s; }
|
||||
th:hover .dt-sort-icon { opacity: .9; }
|
||||
.dt-sort-icon.is-asc, .dt-sort-icon.is-desc { opacity: 1; }
|
||||
.dt-sort-icon.is-asc .up, .dt-sort-icon.is-desc .down { fill: var(--accent); }
|
||||
.dt-sort-icon.is-asc .down, .dt-sort-icon.is-desc .up { opacity: .25; }
|
||||
.dt-table th.is-sorted { color: var(--color); }
|
||||
.dt-col-btn { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; margin: 0 6px; padding: 0; border: 0; border-radius: 4px; background: none; color: var(--ink-muted); cursor: pointer; opacity: 0; transition: opacity .12s; }
|
||||
.dt-col-btn .ui-icon { width: 12px; height: 12px; }
|
||||
th:hover .dt-col-btn, .dt-col-btn:focus-visible, .dt-col-btn.is-on { opacity: 1; }
|
||||
.dt-col-btn:hover, .dt-col-btn.is-on { background: var(--hover-bg-color); color: var(--color); }
|
||||
@media (hover: none) { .dt-col-btn { opacity: .7; } }
|
||||
.dt-table th:first-child .dt-sort { padding-left: 16px; }
|
||||
.dt-table .csv-rownum + th .dt-sort { padding-left: 22px; }
|
||||
@media (max-width: 767px) {
|
||||
.dt-sort { padding: 7px 2px 7px 10px; }
|
||||
.dt-table th.is-num .dt-sort { padding: 7px 10px 7px 2px; }
|
||||
.dt-col-btn { margin: 0 2px; }
|
||||
}
|
||||
|
||||
/* Summary row: sticky under the rows, the aggregate as a small select. */
|
||||
.dt-table tfoot td { position: sticky; bottom: 0; z-index: 1; padding-top: 7px; padding-bottom: 7px; border-top: 1px solid var(--border-color); border-bottom: 0; background: var(--paper-bg-alt); font-size: 12.5px; white-space: nowrap; }
|
||||
.dark-mode .dt-table tfoot td { background: var(--paper-card); }
|
||||
.dt-table tfoot td:first-child { border-bottom-left-radius: 7px; }
|
||||
.dt-table tfoot td:last-child { border-bottom-right-radius: 7px; }
|
||||
.dt-table tfoot .csv-rownum { color: var(--ink-muted); font-size: 13px; }
|
||||
.dt-table:has(tfoot) tbody tr:last-child td { border-bottom: 0 !important; border-radius: 0 !important; }
|
||||
.dt-sum { display: inline-flex; align-items: baseline; gap: 6px; }
|
||||
.dt-sum.is-text { color: var(--ink-muted); }
|
||||
.dt-sum-value { font-weight: 600; color: var(--color); font-variant-numeric: tabular-nums; }
|
||||
.dt-sum-fn { position: relative; display: inline-flex; margin: 0; color: var(--ink-muted); font-size: 11.5px; cursor: pointer; }
|
||||
.dt-sum-fn select { position: absolute; inset: -4px -6px; width: calc(100% + 12px); opacity: 0; cursor: pointer; font-size: 16px; }
|
||||
.dt-sum-fn-label { border-bottom: 1px dotted color-mix(in srgb, var(--ink-muted) 70%, transparent); line-height: 1.3; }
|
||||
.dt-sum-fn:hover .dt-sum-fn-label { color: var(--color); }
|
||||
.dt-sum-fn:focus-within .dt-sum-fn-label { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 2px; }
|
||||
.dt-empty-row td { padding: 28px 22px !important; color: var(--ink-muted); text-align: center !important; white-space: normal !important; }
|
||||
.dt-more { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 14px; padding: 14px 2px 0; font-size: 12.5px; color: var(--ink-muted); }
|
||||
.dt.is-grouped .dt-table tbody td:first-child { font-weight: 500; }
|
||||
|
||||
/* Column menu: stats, histogram, sort, filter, group. */
|
||||
.dt-menu { position: fixed; z-index: 60; width: 260px; max-height: min(520px, calc(100vh - 24px)); overflow: auto; padding: 12px; background: var(--paper-card); border: 1px solid var(--border-color); border-radius: var(--radius-surface); box-shadow: 0 8px 28px rgba(26, 24, 21, .14); font-size: 12.5px; color: var(--color); text-align: left; font-weight: 400; }
|
||||
.dark-mode .dt-menu { box-shadow: 0 10px 30px rgba(0, 0, 0, .5); }
|
||||
.dt-menu:focus { outline: none; }
|
||||
.dt-menu-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
|
||||
.dt-menu-head b { font-size: 13.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
||||
.dt-menu-head span { color: var(--ink-muted); font-size: 12px; white-space: nowrap; }
|
||||
.dt-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 14px; margin: 0; }
|
||||
.dt-stats div { display: flex; justify-content: space-between; gap: 8px; min-width: 0; }
|
||||
.dt-stats dt { font-weight: 400; color: var(--ink-muted); }
|
||||
.dt-stats dd { margin: 0; font-variant-numeric: tabular-nums; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
||||
.dt-hist { margin: 12px 0 0; }
|
||||
.dt-hist svg { display: block; }
|
||||
.dt-hist rect { fill: var(--dt-series-1); }
|
||||
.dt-hist figcaption { display: flex; justify-content: space-between; margin-top: 4px; font-size: 11px; color: var(--ink-muted); font-variant-numeric: tabular-nums; }
|
||||
.dt-top { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 5px; }
|
||||
.dt-top li { display: grid; grid-template-columns: minmax(0, 1fr) 72px 28px; align-items: center; gap: 8px; }
|
||||
.dt-top-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
||||
.dt-top-bar { height: 6px; border-radius: 3px; background: var(--dt-series-1); justify-self: start; }
|
||||
.dt-top-n { text-align: right; color: var(--ink-muted); font-variant-numeric: tabular-nums; }
|
||||
.dt-menu-sec { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--border-soft); }
|
||||
.dt-menu-label { margin-bottom: 6px; color: var(--ink-muted); font-size: 12px; }
|
||||
.dt-menu-sort { display: flex; width: 100%; }
|
||||
.dt-menu-sort .seg-chip { flex: 1; justify-content: center; height: 26px; font-size: 12.5px; }
|
||||
.dt-range { display: flex; align-items: center; gap: 6px; color: var(--ink-muted); }
|
||||
.dt-range-input { width: 100%; min-width: 0; height: 30px; padding: 0 8px; border: 1px solid var(--border-color); border-radius: var(--radius-control); background: var(--input-bg); color: var(--input-color); font: 13px var(--font-sans); font-variant-numeric: tabular-nums; }
|
||||
.dt-range-input:focus { outline: 2px solid color-mix(in srgb, var(--accent) 55%, transparent); border-color: var(--accent); }
|
||||
.dt-chips { display: flex; flex-wrap: wrap; gap: 5px; }
|
||||
.dt-value-chip { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 9px; border: 1px solid var(--border-color); border-radius: 999px; background: transparent; font: 12.5px var(--font-sans); color: var(--color); cursor: pointer; max-width: 100%; }
|
||||
.dt-value-chip:hover { background: var(--hover-bg-color); }
|
||||
.dt-value-chip.is-on { background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent) 45%, transparent); font-weight: 500; }
|
||||
.dt-value-n { color: var(--ink-muted); font-size: 11.5px; font-variant-numeric: tabular-nums; }
|
||||
.dt-menu-action { display: flex; align-items: center; gap: 8px; width: 100%; height: 32px; padding: 0 8px; border: 0; border-radius: var(--radius-control); background: none; font: 13px var(--font-sans); color: var(--color); cursor: pointer; text-align: left; }
|
||||
.dt-menu-action:hover { background: var(--hover-bg-color); }
|
||||
.dt-menu-action .ui-icon { width: 15px; height: 15px; color: var(--ink-soft); }
|
||||
|
||||
/* Chart view */
|
||||
.dt-chart-controls { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; padding: 12px 24px 0; }
|
||||
.dt-chart-type { padding: 2px; }
|
||||
.dt-chart-type .seg-chip { height: 26px; padding: 0 10px; font-size: 12.5px; }
|
||||
.dt-y { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 5px; }
|
||||
.dt-y .dt-select-label { margin-right: 2px; }
|
||||
.dt-y-chip { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border: 1px solid var(--border-color); border-radius: 999px; background: transparent; font: 12.5px var(--font-sans); color: var(--ink-soft); cursor: pointer; }
|
||||
.dt-y-chip:hover { background: var(--hover-bg-color); color: var(--color); }
|
||||
.dt-y-chip.is-on { color: var(--color); font-weight: 500; border-color: color-mix(in srgb, var(--ink-muted) 60%, transparent); }
|
||||
.dt-key { display: inline-block; flex: none; width: 10px; height: 10px; border-radius: 2px; background: var(--key); }
|
||||
.dt-key.is-line { width: 12px; height: 2px; border-radius: 1px; }
|
||||
.dt-key.is-scatter { width: 8px; height: 8px; border-radius: 50%; }
|
||||
.dt-chart { position: relative; margin: 14px 24px 24px; padding: 16px 16px 12px; border: 1px solid var(--border-color); border-radius: 8px; background: var(--paper-card); }
|
||||
.dark-mode .dt-chart { background: var(--canvas-bg-color); }
|
||||
.dt-chart-notes { margin: 0 0 8px; font-size: 12px; color: var(--ink-muted); }
|
||||
.dt-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-bottom: 10px; font-size: 12.5px; color: var(--ink-soft); }
|
||||
.dt-legend-item { display: inline-flex; align-items: center; gap: 7px; }
|
||||
.dt-chart-empty { margin: 32px 0; text-align: center; color: var(--ink-muted); font-size: 13px; }
|
||||
.dt-svg { display: block; max-width: 100%; overflow: visible; font-family: var(--font-sans); }
|
||||
.dt-svg:focus { outline: none; }
|
||||
.dt-svg:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 4px; }
|
||||
.dt-grid { stroke: var(--dt-grid); stroke-width: 1; shape-rendering: crispEdges; }
|
||||
.dt-axis { stroke: var(--dt-axis); stroke-width: 1; shape-rendering: crispEdges; }
|
||||
.dt-crosshair { stroke: var(--ink-muted); stroke-width: 1; shape-rendering: crispEdges; }
|
||||
.dt-tick { fill: var(--ink-muted); font-size: 11px; font-variant-numeric: tabular-nums; }
|
||||
.dt-cat { fill: var(--ink-soft); font-size: 12px; }
|
||||
.dt-value { fill: var(--ink-soft); font-size: 11.5px; font-variant-numeric: tabular-nums; }
|
||||
.dt-bar { transition: opacity .12s; }
|
||||
.dt-bar.is-dim { opacity: .45; }
|
||||
.dt-hover-band { fill: var(--hover-bg-color); }
|
||||
.dt-line { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
|
||||
.dt-dot { stroke: var(--paper-card); stroke-width: 2; }
|
||||
.dark-mode .dt-dot { stroke: var(--canvas-bg-color); }
|
||||
.dt-hit { fill: transparent; cursor: crosshair; }
|
||||
.dt-axis-label { margin-top: 4px; font-size: 12px; color: var(--ink-muted); text-align: center; }
|
||||
.dt-tip { position: absolute; z-index: 5; min-width: 120px; max-width: 240px; padding: 8px 10px; background: var(--paper-card); border: 1px solid var(--border-color); border-radius: 8px; box-shadow: 0 6px 20px rgba(26, 24, 21, .14); font-size: 12px; pointer-events: none; }
|
||||
.dark-mode .dt-tip { background: var(--paper-card); box-shadow: 0 8px 24px rgba(0, 0, 0, .5); }
|
||||
.dt-tip-title { margin-bottom: 4px; color: var(--ink-soft); font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
||||
.dt-tip-row { display: flex; align-items: center; gap: 7px; line-height: 1.6; white-space: nowrap; }
|
||||
.dt-tip-row b { font-weight: 600; color: var(--color); font-variant-numeric: tabular-nums; }
|
||||
.dt-tip-row span:last-child { color: var(--ink-muted); overflow: hidden; text-overflow: ellipsis; }
|
||||
.dt-tip-note { margin-top: 3px; color: var(--ink-muted); font-size: 11.5px; }
|
||||
|
||||
/* Gist cards and the dialog: same toolbar, tighter gutters. */
|
||||
.gist-file-body.is-csv .dt-toolbar, .gist-file-body.is-csv .dt-chart-controls { padding-left: 20px; padding-right: 20px; }
|
||||
.gist-file-body.is-csv .dt-chart { margin: 14px 20px 20px; }
|
||||
.gist-file-body.is-csv .dt-wrap { max-height: 520px; }
|
||||
|
||||
@media (max-width: 767px) {
|
||||
.dt-toolbar { padding: 12px 16px 0; gap: 6px; flex-wrap: nowrap; }
|
||||
.dt-toolbar .dt-chip, .dt-toolbar .dt-link { display: none; }
|
||||
.dt-search { flex: 1 1 auto; min-width: 0; }
|
||||
.dt-count { margin-left: 4px; font-size: 12px; }
|
||||
.dt-tools { display: none; }
|
||||
.dt-tools-m { display: inline-flex; }
|
||||
.dt-tools-btn { width: 32px !important; height: 32px !important; border: 1px solid var(--border-color) !important; }
|
||||
.dt-chart-controls { padding: 12px 16px 0; }
|
||||
.dt-chart { margin: 12px 16px 16px; padding: 12px 10px 10px; }
|
||||
.gist-file-body.is-csv .dt-toolbar, .gist-file-body.is-csv .dt-chart-controls { padding-left: 16px; padding-right: 16px; }
|
||||
.gist-file-body.is-csv .dt-chart { margin: 12px 16px 16px; }
|
||||
}
|
||||
|
||||
/* Markdown and notebook tables: sortable headers, an optional Σ row, Open as table. */
|
||||
.md-table { display: block; width: max-content; max-width: 100%; margin: 0 0 16px; }
|
||||
.markdown-body .md-table > table { margin-bottom: 0 !important; }
|
||||
.md-sortable { cursor: pointer; user-select: none; white-space: nowrap; }
|
||||
.md-sort { display: inline-flex; align-items: center; margin-left: 5px; padding: 2px; border: 0; background: none; vertical-align: -1px; cursor: pointer; }
|
||||
.md-sort .dt-sort-icon { opacity: .35; }
|
||||
.md-sortable:hover .md-sort .dt-sort-icon { opacity: .9; }
|
||||
.md-sort .dt-sort-icon.is-asc, .md-sort .dt-sort-icon.is-desc { opacity: 1; }
|
||||
.markdown-body table tfoot.md-summary td { border-top: 1.5px solid var(--border-color); background: var(--paper-bg-alt); font-weight: 600; font-variant-numeric: tabular-nums; }
|
||||
.dark-mode .markdown-body table tfoot.md-summary td { background: var(--paper-card); }
|
||||
.markdown-body table tfoot.md-summary td.is-num { text-align: right; }
|
||||
.markdown-body table tfoot.md-summary td.is-muted, .markdown-body table tfoot.md-summary td.md-summary-label { font-weight: 400; color: var(--ink-muted); }
|
||||
.md-table-tools { display: flex; align-items: center; justify-content: flex-end; gap: 4px; margin-top: 6px; }
|
||||
.md-table-btn { display: inline-flex; align-items: center; gap: 5px; height: 26px; padding: 0 8px; border: 0; border-radius: var(--radius-control); background: none; font: 12.5px var(--font-sans); color: var(--ink-muted); cursor: pointer; }
|
||||
.md-table-btn:hover { background: var(--hover-bg-color); color: var(--color); }
|
||||
.md-table-btn .ui-icon { width: 14px; height: 14px; }
|
||||
.md-sigma > span[aria-hidden] { font-size: 14px; line-height: 1; }
|
||||
.md-sigma.is-on { color: var(--color); background: var(--accent-soft); }
|
||||
.md-table-agg { height: 26px; padding: 0 6px; border: 1px solid var(--border-color); border-radius: var(--radius-control); background: var(--input-bg); color: var(--color); font: 12.5px var(--font-sans); }
|
||||
.md-table-btn:focus-visible, .md-table-agg:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
|
||||
.notebook-body .md-table, notebook .md-table { margin-bottom: 4px; }
|
||||
notebook table.dataframe tfoot.md-summary td { border-top: 1.5px solid var(--border-color); background: var(--paper-bg-alt); font-weight: 600; text-align: right; }
|
||||
notebook table.dataframe tfoot.md-summary td.md-summary-label, notebook table.dataframe tfoot.md-summary td.is-muted { font-weight: 400; color: var(--ink-muted); text-align: left; }
|
||||
|
||||
/* Open as table: the full viewer in a dialog. */
|
||||
.dt-dialog-backdrop { position: fixed; inset: 0; z-index: 1050; display: flex; align-items: flex-start; justify-content: center; padding: 6vh 24px 24px; background: rgba(26, 24, 21, .36); }
|
||||
.dark-mode .dt-dialog-backdrop { background: rgba(0, 0, 0, .6); }
|
||||
.dt-dialog { display: flex; flex-direction: column; width: min(1040px, 100%); max-height: 88vh; overflow: hidden; background: var(--main-bg-color); border: 1px solid var(--border-color); border-radius: 12px; box-shadow: 0 24px 60px rgba(26, 24, 21, .25); }
|
||||
.dt-dialog-head { display: flex; align-items: center; gap: 12px; padding: 12px 14px 12px 24px; border-bottom: 1px solid var(--border-color); }
|
||||
.dt-dialog-title { flex: 1; min-width: 0; font-weight: 600; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
||||
.dt-dialog .dt-view-toggle { padding: 2px; }
|
||||
.dt-dialog .dt-view-toggle .seg-chip { height: 26px; padding: 0 10px; font-size: 12.5px; }
|
||||
.dt-dialog .dt { overflow: auto; }
|
||||
.dt-dialog .dt-wrap { max-height: none; overflow: visible; }
|
||||
@media (max-width: 767px) {
|
||||
.dt-dialog-backdrop { padding: 0; }
|
||||
.dt-dialog { max-height: 100dvh; height: 100dvh; border-radius: 0; border: 0; }
|
||||
.dt-dialog-head { padding: 10px 10px 10px 16px; }
|
||||
}
|
||||
.dt-th-agg { font-weight: 400; font-size: 11.5px; color: var(--ink-muted); }
|
||||
.md-table-agg { appearance: none; -webkit-appearance: none; padding: 0 24px 0 8px; background: var(--input-bg) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M3 4.5 6 7.5 9 4.5' fill='none' stroke='%238A857C' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 6px center / 12px; cursor: pointer; }
|
||||
.dt-menu-note { padding: 4px 10px 2px; font-size: 12px; color: var(--ink-muted); }
|
||||
.dt-dialog:focus { outline: none; }
|
||||
Reference in new issue
Block a user