changelog + website: fixes

This commit is contained in:
nym21
2026-03-27 12:50:35 +01:00
parent 17570e12b8
commit 041652d85d
15 changed files with 130 additions and 218 deletions
+1 -2
View File
@@ -1,5 +1,4 @@
*/**/*.md
!scripts/**/_*.js
*_old.js
_*.js
dump-*
*dump*
@@ -248,5 +248,4 @@
*
* Generic tree node type for walking
* @typedef {AnySeriesPattern | Record<string, unknown>} TreeNode
*
*/
+18 -10
View File
@@ -4,7 +4,6 @@ import {
HistogramSeries,
LineSeries,
BaselineSeries,
// } from "../modules/lightweight-charts/5.1.0/dist/lightweight-charts.standalone.development.mjs";
} from "../modules/lightweight-charts/5.1.0/dist/lightweight-charts.standalone.production.mjs";
import { createLegend, createSeriesLegend } from "./legend.js";
import { capture } from "./capture.js";
@@ -83,17 +82,18 @@ function getRangePresets() {
const m = now.getUTCMonth();
const d = now.getUTCDate();
/** @param {number} months @param {number} [days] */
const ago = (months, days = 0) => Math.floor(Date.UTC(y, m - months, d - days) / 1000);
const ago = (months, days = 0) =>
Math.floor(Date.UTC(y, m - months, d - days) / 1000);
/** @type {RangePreset[]} */
const presets = [
{ label: "1w", index: /** @type {IndexLabel} */ ("30mn"), from: ago(0, 7) },
{ label: "1m", index: /** @type {IndexLabel} */ ("1h"), from: ago(1) },
{ label: "3m", index: /** @type {IndexLabel} */ ("4h"), from: ago(3) },
{ label: "6m", index: /** @type {IndexLabel} */ ("12h"), from: ago(6) },
{ label: "1y", index: /** @type {IndexLabel} */ ("1d"), from: ago(12) },
{ label: "4y", index: /** @type {IndexLabel} */ ("3d"), from: ago(48) },
{ label: "8y", index: /** @type {IndexLabel} */ ("1w"), from: ago(96) },
{ label: "1m", index: /** @type {IndexLabel} */ ("1h"), from: ago(1) },
{ label: "3m", index: /** @type {IndexLabel} */ ("4h"), from: ago(3) },
{ label: "6m", index: /** @type {IndexLabel} */ ("12h"), from: ago(6) },
{ label: "1y", index: /** @type {IndexLabel} */ ("1d"), from: ago(12) },
{ label: "4y", index: /** @type {IndexLabel} */ ("3d"), from: ago(48) },
{ label: "8y", index: /** @type {IndexLabel} */ ("1w"), from: ago(96) },
];
const ytdFrom = Math.floor(Date.UTC(y, 0, 1) / 1000);
@@ -105,7 +105,11 @@ function getRangePresets() {
from: ytdFrom,
});
presets.push({ label: "all", index: /** @type {IndexLabel} */ ("1w"), from: -Infinity });
presets.push({
label: "all",
index: /** @type {IndexLabel} */ ("1w"),
from: -Infinity,
});
return presets;
}
@@ -445,7 +449,11 @@ export function createChart({ parent, brk, fitContent }) {
if (this.isAllHidden(paneIndex)) {
const collapsedHeight = paneIndex === 0 ? 32 : 64;
const chartHeight = ichart.chartElement().clientHeight;
pane.setStretchFactor(chartHeight > 0 ? collapsedHeight / (chartHeight - collapsedHeight) : 0);
pane.setStretchFactor(
chartHeight > 0
? collapsedHeight / (chartHeight - collapsedHeight)
: 0,
);
} else {
pane.setStretchFactor(1);
}
+7 -3
View File
@@ -62,6 +62,10 @@
padding: 0 var(--main-padding);
padding-top: 0.375rem;
@media (pointer: coarse) {
pointer-events: auto;
}
> * {
pointer-events: auto;
}
@@ -255,11 +259,11 @@
button {
color: var(--off-color);
padding: 0.375rem;
margin: -0.375rem 0.25rem;
padding: 0.375rem 0.5rem;
margin: -0.375rem 0;
&:first-of-type {
margin-left: -0.25rem;
margin-left: -0.5rem;
}
}
}
+14 -8
View File
@@ -55,11 +55,7 @@ aside {
flex: 1;
@media (max-width: 767px) {
padding-bottom: calc(var(--main-padding) + 1.5rem);
html[data-display="standalone"] & {
padding-bottom: calc(var(--main-padding) + 2rem);
}
padding-bottom: calc(var(--main-padding) + 0.5rem);
}
@media (min-width: 768px) {
@@ -95,16 +91,23 @@ button {
}
h1 {
font-size: var(--font-size-xl);
font-size: 2rem;
line-height: var(--line-height-xl);
font-weight: 300;
}
h3 {
font-size: var(--font-size-lg);
font-size: 1.5rem;
line-height: var(--line-height-lg);
}
h1,
h2,
h3 {
font-family: instrument;
letter-spacing: 0.05rem;
font-weight: 400;
}
html {
background-color: var(--background-color);
color: var(--color);
@@ -115,6 +118,8 @@ html {
input {
width: 100%;
padding: 0;
letter-spacing: inherit;
&::placeholder {
color: var(--off-color);
@@ -194,6 +199,7 @@ select {
flex-shrink: 0;
width: 100%;
text-transform: uppercase;
color: var(--color);
}
:is(input, select):focus-visible {
+1 -7
View File
@@ -29,7 +29,7 @@ main {
background-image: linear-gradient(
to bottom,
transparent,
var(--background-color) 90%,
var(--background-color) 85%,
var(--background-color)
);
}
@@ -96,12 +96,6 @@ main {
);
}
@media (max-width: 767px) {
html[data-display="standalone"] & {
margin-bottom: calc(var(--main-padding) + 0.5rem);
}
}
> fieldset {
display: flex;
gap: 1.25rem;
+1 -1
View File
@@ -52,7 +52,7 @@
h1 {
font-size: 2rem;
letter-spacing: 0.075rem;
letter-spacing: 0.05rem;
text-wrap: nowrap;
}
}
-181
View File
@@ -49,184 +49,3 @@ h5,
h6 {
text-wrap: balance;
}
/**,
::after,
::before,
::backdrop,
::file-selector-button {
box-sizing: border-box;
margin: 0;
padding: 0;
border: 0 solid;
}
html,
:host {
line-height: 1.5;
-webkit-text-size-adjust: 100%;
tab-size: 4;
font-family:
"Lilex", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas,
"Liberation Mono", "Courier New", monospace;
-webkit-tap-highlight-color: transparent;
}
body {
line-height: inherit;
}
hr {
height: 0;
color: inherit;
border-top-width: 1px;
}
abbr:where([title]) {
-webkit-text-decoration: underline dotted;
text-decoration: underline dotted;
}
h1,
h2,
h3,
h4,
h5,
h6 {
font-size: inherit;
font-weight: inherit;
}
a {
color: inherit;
}
b,
strong {
font-weight: bolder;
}
code,
kbd,
samp,
pre {
font-family:
var(--default-mono-font-family), ui-monospace, SFMono-Regular, Menlo,
Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
font-feature-settings: var(--default-mono-font-feature-settings, normal);
font-variation-settings: var(--default-mono-font-variation-settings, normal);
font-size: 1em;
}
small {
font-size: 80%;
}
sub,
sup {
font-size: 75%;
line-height: 0;
position: relative;
vertical-align: baseline;
}
sub {
bottom: -0.25em;
}
sup {
top: -0.5em;
}
table {
text-indent: 0;
border-color: inherit;
border-collapse: collapse;
}
button,
input,
optgroup,
select,
textarea,
::file-selector-button {
font: inherit;
font-feature-settings: inherit;
font-variation-settings: inherit;
letter-spacing: inherit;
color: inherit;
background: transparent;
text-transform: inherit;
}
button,
input:where([type="button"], [type="reset"], [type="submit"]),
::file-selector-button {
appearance: button;
}
:-moz-focusring {
outline: auto;
}
:-moz-ui-invalid {
box-shadow: none;
}
progress {
vertical-align: baseline;
}
::-webkit-inner-spin-button,
::-webkit-outer-spin-button {
height: auto;
}
::-webkit-search-decoration {
-webkit-appearance: none;
}
summary {
display: list-item;
}
ol,
ul,
menu {
list-style: none;
}
textarea {
resize: vertical;
}
::placeholder {
opacity: 1;
color: color-mix(in srgb, currentColor 50%, transparent);
}
:disabled {
cursor: default;
}
img,
svg,
video,
canvas,
audio,
iframe,
embed,
object {
display: block;
vertical-align: middle;
}
img,
video {
max-width: 100%;
height: auto;
}
[hidden] {
display: none !important;
}*/
+3
View File
@@ -45,6 +45,9 @@
--line-height-xl: calc(1.75 / 1.25);
--main-padding: 2rem;
/*@media (max-width: 767px) {
--main-padding: 1.5rem;
}*/
--negative-main-padding: calc(-1 * var(--main-padding));
--font-weight-base: 400;
--default-main-width: 25rem;