@martinomagnifico/tablechart 1.0.5 → 1.0.7
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/CHANGELOG.md +29 -0
- package/README.md +1 -1
- package/dist/tablechart-core.d.mts +1 -1
- package/dist/tablechart-shared.d.mts +4 -2
- package/dist/tablechart-shared.mjs +184 -151
- package/dist/tablechart.css +1 -1
- package/dist/tablechart.js +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,34 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [1.0.7] - 2026-10-16
|
|
4
|
+
|
|
5
|
+
### Added
|
|
6
|
+
|
|
7
|
+
- A `tooltipparent` option. Can by body or any other selector.
|
|
8
|
+
|
|
9
|
+
### Changed
|
|
10
|
+
|
|
11
|
+
- The text of a tooltip has the size of the chart's text on the screen, also when the chart is scaled.
|
|
12
|
+
- A scroll closes a tooltip, like a key. It opens again when the mouse moves.
|
|
13
|
+
|
|
14
|
+
### Fixed
|
|
15
|
+
|
|
16
|
+
- After a scroll, a tooltip could show at the top of the window, for a row that had scrolled away.
|
|
17
|
+
- The arrow of a tooltip points at the middle of its row and stops just short of it, at every size. It was a little to the right, and on a large screen it covered the mark.
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
## [1.0.6] - 2026-10-16
|
|
22
|
+
|
|
23
|
+
### Changed
|
|
24
|
+
|
|
25
|
+
- Any key closes a tooltip, not only Escape.
|
|
26
|
+
- Only a mouse that moves opens a tooltip.
|
|
27
|
+
- A Markdown table with chart attributes is wrapped in a `figure`, not a `div`.
|
|
28
|
+
- The console asks for a `figure` when a chart is another element.
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
|
|
3
32
|
## [1.0.5] - 2026-10-16
|
|
4
33
|
|
|
5
34
|
### Added
|
package/README.md
CHANGED
|
@@ -89,7 +89,7 @@ Most options can also be set on one chart with a `data-chart-*` attribute. All o
|
|
|
89
89
|
|
|
90
90
|
`init()` returns `{ charts, refresh, destroy }`. `refresh()` lays out every chart again. `destroy()` stops watching scroll, size and language changes.
|
|
91
91
|
|
|
92
|
-
To make a chart of one
|
|
92
|
+
To make a chart of one figure, use `create()`. Each chart is also on its figure, as `figure.tablechart`.
|
|
93
93
|
|
|
94
94
|
```js
|
|
95
95
|
import { create } from "@martinomagnifico/tablechart";
|
|
@@ -12,7 +12,7 @@ export declare const unbuild: (state: ChartState) => void;
|
|
|
12
12
|
export declare const setShown: (state: ChartState, shown: boolean) => void;
|
|
13
13
|
//#endregion
|
|
14
14
|
//#region src/js/functions/sources.d.ts
|
|
15
|
-
/** A Markdown table, or a caption with chart attributes, is wrapped in a
|
|
15
|
+
/** A Markdown table, or a caption with chart attributes, is wrapped in a figure with the caption and annotations beside it. */
|
|
16
16
|
export declare const adoptTables: (figures: HTMLElement[]) => HTMLElement[];
|
|
17
17
|
/** `data-chart-src` fills the figure's table with the rows of a JSON file, keeping a header row the author wrote; a file that fails is reported. */
|
|
18
18
|
export declare const loadSources: (figures: HTMLElement[]) => Promise<void>;
|
|
@@ -259,6 +259,8 @@ interface Config {
|
|
|
259
259
|
tooltip: boolean | "auto";
|
|
260
260
|
/** The old name of `tooltip`, until the next minor version. */
|
|
261
261
|
hover?: boolean;
|
|
262
|
+
/** Where the tooltip goes in the page: an element or a selector, `body` by default. In a scaled element, such as the slides of a presentation, the tooltip has their scale. */
|
|
263
|
+
tooltipparent: HTMLElement | string | null;
|
|
262
264
|
/** The table under the chart: `"always"`, only in `"print"`, in print when numbers are left out (`"auto"`), or `"never"`. A figure overrides it with `data-chart-table`. */
|
|
263
265
|
table: "never" | "auto" | "print" | "always";
|
|
264
266
|
/** The name of the total that a donut without a total row works out, for screen readers. */
|
|
@@ -316,9 +318,9 @@ declare global {
|
|
|
316
318
|
declare const entranceOf: (figure: HTMLElement, config: Config) => number;
|
|
317
319
|
/** Turns elements into figures with a table and translation keys, all at once, so duplicate keys are found. */
|
|
318
320
|
declare const prepare: (found: HTMLElement[], config: Config) => Promise<HTMLElement[]>;
|
|
319
|
-
/** Makes a chart of one
|
|
321
|
+
/** Makes a chart of one figure; returns the existing chart if there is one, or null without data. */
|
|
320
322
|
declare const create: (element: HTMLElement, options?: Partial<Config>) => Promise<TablechartChart | null>;
|
|
321
|
-
/** Makes a chart of every
|
|
323
|
+
/** Makes a chart of every figure in `root` that matches the selector, skipping existing charts. */
|
|
322
324
|
declare const init: (options?: Partial<Config>, root?: ParentNode) => Promise<TablechartInstance>;
|
|
323
325
|
//#endregion
|
|
324
326
|
export { StepPlan as _, init as a, PLACED_CLASS as c, QUEUED_CLASS as d, SHOWN_CLASS as f, Series as g, Row as h, entranceOf as i, PLOT_CLASS as l, ChartState as m, TablechartInstance as n, prepare as o, defaultConfig as p, create as r, Config as s, TablechartChart as t, PRINTING_CLASS as u, stepTo as v };
|