wiki-formant 0.42.0 → 0.43.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/README.md +2 -2
- package/dist/base.css +3 -1
- package/dist/chart.d.ts +1 -1
- package/dist/chart.js +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -775,8 +775,8 @@ monthly.
|
|
|
775
775
|
```
|
|
776
776
|
|
|
777
777
|
A price point may carry `open`, `high` and `low` (its `value` is the close)
|
|
778
|
-
and `volume`. Points that carry the candle get a
|
|
779
|
-
candles with `candles`; points that carry volume get a volume pane under the
|
|
778
|
+
and `volume`. Points that carry the candle get a candles switch, a candlestick icon
|
|
779
|
+
pressed while they show, opening on candles with `candles`; points that carry volume get a volume pane under the
|
|
780
780
|
price, a fifth of the height. Candles take `--chart-up` and `--chart-down` from
|
|
781
781
|
the canvas box, else its `color`. A week of candles opens on its first, closes
|
|
782
782
|
on its last, spans the highest high and lowest low, and sums its volume. A point
|
package/dist/base.css
CHANGED
|
@@ -191,8 +191,10 @@ pre:hover > .code-copy-btn,
|
|
|
191
191
|
}
|
|
192
192
|
.chart-controls > div { display: flex; gap: 2px; }
|
|
193
193
|
.chart-controls :is(button, a) { font: inherit; color: inherit; text-decoration: none; background: none; cursor: pointer; opacity: 0.6; }
|
|
194
|
+
/* An icon sits on the text's line, so an icon button is as tall as a labelled one. */
|
|
195
|
+
.chart-icon { display: inline-block; width: 1em; height: 1em; vertical-align: -0.125em; }
|
|
194
196
|
/* A button is pressed; a link (a stats page's window) is the page shown. */
|
|
195
|
-
.chart-controls :is([aria-pressed='true'], [aria-current]) { opacity: 1; }
|
|
197
|
+
.chart-controls :is(button, a):is([aria-pressed='true'], [aria-current]) { opacity: 1; }
|
|
196
198
|
|
|
197
199
|
/* ---- Stats ----------------------------------------------------------------
|
|
198
200
|
`--share` is a row's value over the largest in its list, 0 to 1. Bars take
|
package/dist/chart.d.ts
CHANGED
|
@@ -49,7 +49,7 @@ export interface TimeChartProps {
|
|
|
49
49
|
fromZero?: boolean;
|
|
50
50
|
/** The value axis and crosshair label. Read on every draw, so it need not be stable. */
|
|
51
51
|
format?: (n: number) => string;
|
|
52
|
-
/** Open on candles, where the points carry them. A
|
|
52
|
+
/** Open on candles, where the points carry them. A candles toggle shows either way. */
|
|
53
53
|
candles?: boolean;
|
|
54
54
|
/** In pixels. Otherwise the stylesheet's `--chart-height`, else 15rem. */
|
|
55
55
|
height?: number;
|
package/dist/chart.js
CHANGED
|
@@ -261,5 +261,5 @@ export function TimeChart({ series, label, ranges = typeof series === 'function'
|
|
|
261
261
|
c.api.timeScale().fitContent();
|
|
262
262
|
}, [ready, source, view, candles]);
|
|
263
263
|
const status = source && 'error' in source ? source.error : points && !view?.shown.length ? 'No data in this range' : null;
|
|
264
|
-
return (_jsxs("figure", { className: className ? `chart ${className}` : 'chart', children: [_jsx("div", { ref: box, className: "chart-canvas", role: "img", "aria-label": label, style: height ? { height } : undefined }), (!ready || (!points && !status)) && _jsx("div", { className: "chart-status skeleton", "aria-hidden": true }), status && _jsx("p", { className: "chart-status", children: status }), (controls || ranges.length > 1 || (view && (view.steps.length > 1 || view.ohlc))) && (_jsxs("div", { className: "chart-controls", children: [controls, ranges.length > 1 && (_jsx("div", { role: "group", "aria-label": "Range", children: ranges.map(r => (_jsx("button", { type: "button", "aria-pressed": r === range, onClick: () => { setRange(r); setStep(null); }, children: RANGE[r].label }, r))) })), view && view.steps.length > 1 && (_jsx("div", { role: "group", "aria-label": "Step", children: view.steps.map(s => (_jsx("button", { type: "button", "aria-pressed": s === view.step, onClick: () => setStep(s), title: `One point per ${s}`, children: STEP[s].label }, s))) })), view?.ohlc && (
|
|
264
|
+
return (_jsxs("figure", { className: className ? `chart ${className}` : 'chart', children: [_jsx("div", { ref: box, className: "chart-canvas", role: "img", "aria-label": label, style: height ? { height } : undefined }), (!ready || (!points && !status)) && _jsx("div", { className: "chart-status skeleton", "aria-hidden": true }), status && _jsx("p", { className: "chart-status", children: status }), (controls || ranges.length > 1 || (view && (view.steps.length > 1 || view.ohlc))) && (_jsxs("div", { className: "chart-controls", children: [controls, ranges.length > 1 && (_jsx("div", { role: "group", "aria-label": "Range", children: ranges.map(r => (_jsx("button", { type: "button", "aria-pressed": r === range, onClick: () => { setRange(r); setStep(null); }, children: RANGE[r].label }, r))) })), view && view.steps.length > 1 && (_jsx("div", { role: "group", "aria-label": "Step", children: view.steps.map(s => (_jsx("button", { type: "button", "aria-pressed": s === view.step, onClick: () => setStep(s), title: `One point per ${s}`, children: STEP[s].label }, s))) })), view?.ohlc && (_jsx("div", { children: _jsx("button", { type: "button", "aria-pressed": candles, "aria-label": "Candles", title: "Candles", onClick: () => setCandles(c => !c), children: _jsxs("svg", { className: "chart-icon", viewBox: "0 0 12 12", "aria-hidden": true, children: [_jsx("path", { d: "M3.5 1v2M3.5 9v2M8.5 2v3M8.5 9v1", stroke: "currentColor" }), _jsx("rect", { x: "2", y: "3", width: "3", height: "6", rx: "0.5", fill: "currentColor" }), _jsx("rect", { x: "7", y: "5", width: "3", height: "4", rx: "0.5", fill: "currentColor" })] }) }) }))] }))] }));
|
|
265
265
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "wiki-formant",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.43.0",
|
|
4
4
|
"description": "The portable half of a wiki: derived taxonomy and facet controls, a version-negotiating MCP transport, markdown twins, block rendering, a rich-text editor engine, conditional-GET plumbing, and the headers and CSP every origin sends.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|