@umriss-ui/charts 0.3.0-rc.1 → 0.3.1
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 +36 -5
- package/README.md +2 -6
- package/dist/charts.js +279 -261
- package/dist/index.d.ts +29 -0
- package/package.json +3 -4
package/dist/index.d.ts
CHANGED
|
@@ -685,6 +685,17 @@ export declare interface RemovedSpan {
|
|
|
685
685
|
readonly operatingTime: number;
|
|
686
686
|
}
|
|
687
687
|
|
|
688
|
+
/** Any number of CSS colours - a token, `light-dark(…)`, `var(--…)`, a
|
|
689
|
+
literal - resolved to values a canvas can draw, in the scheme that applies
|
|
690
|
+
at `root`. The same probe `resolveTheme` uses, for a canvas of a
|
|
691
|
+
neighbouring package (ADR-0022): the schedule draws its subtasks with the
|
|
692
|
+
colours of @umriss-ui/core and of its caller, not with the chart palette.
|
|
693
|
+
|
|
694
|
+
Not cached: the caller keeps the result and reads anew when
|
|
695
|
+
`subscribeTheme` tells it to. Where no resolution comes back (a DOM
|
|
696
|
+
without a style engine), a colour is given back as it stands. */
|
|
697
|
+
export declare function resolveColours<K extends string>(root: Element, colours: Readonly<Record<K, string>>): Record<K, string>;
|
|
698
|
+
|
|
688
699
|
export declare interface ResolvedTheme {
|
|
689
700
|
colorAxis: string;
|
|
690
701
|
colorGrid: string;
|
|
@@ -894,6 +905,12 @@ export declare interface StateSeriesConfig<T = unknown> extends SeriesBase<T> {
|
|
|
894
905
|
laneTo?: number;
|
|
895
906
|
}
|
|
896
907
|
|
|
908
|
+
/** Subscribe to theme invalidations - a switch of `color-scheme` on the
|
|
909
|
+
document, the system's preference, or `invalidateTheme()`. The scenes of
|
|
910
|
+
the charts use it, and so does any canvas that resolved its colours with
|
|
911
|
+
`resolveColours`. Returns the unsubscribe. */
|
|
912
|
+
export declare function subscribeTheme(notify: () => void): () => void;
|
|
913
|
+
|
|
897
914
|
/** Step for tick candidates in wall clock time, at an intended count. Rounded up
|
|
898
915
|
to the next readable step, so that no more ticks arise than wanted. Above the
|
|
899
916
|
day steps it continues in whole days. */
|
|
@@ -962,6 +979,18 @@ export declare interface TooltipProps<T> {
|
|
|
962
979
|
mark in the axis band tells the reader that time was taken out there. */
|
|
963
980
|
export declare function toOperatingTime(wallClock: number, input: CalendarInput): number;
|
|
964
981
|
|
|
982
|
+
/** Wall clock time → operating time, but without NaN: whatever lies in removed
|
|
983
|
+
time falls onto the seam that this span collapses onto anyway; whatever lies
|
|
984
|
+
before the first or after the last interval onto 0 or onto the whole
|
|
985
|
+
operating time respectively.
|
|
986
|
+
|
|
987
|
+
Why this exists: the materialised x values must stay ascending. Binary search
|
|
988
|
+
- for a hit as for a segment boundary - assumes that, and every comparison
|
|
989
|
+
with NaN is false, so that a search over a block of NaN silently lands on the
|
|
990
|
+
wrong point. The clamped value is a POSITION, not a statement: the point
|
|
991
|
+
itself is carried as a gap and is never drawn and never hit. */
|
|
992
|
+
export declare function toOperatingTimeClamped(wallClock: number, input: CalendarInput): number;
|
|
993
|
+
|
|
965
994
|
/** Operating time → wall clock time; outside [0, total] there is none.
|
|
966
995
|
|
|
967
996
|
At a seam - the end of an interval which is at the same time the beginning of
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@umriss-ui/charts",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.1",
|
|
4
4
|
"description": "Canvas-based chart library - few chart kinds, uncompromisingly clean, high performance.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Roman Händler",
|
|
@@ -27,8 +27,7 @@
|
|
|
27
27
|
"CHANGELOG.md"
|
|
28
28
|
],
|
|
29
29
|
"publishConfig": {
|
|
30
|
-
"access": "public"
|
|
31
|
-
"tag": "next"
|
|
30
|
+
"access": "public"
|
|
32
31
|
},
|
|
33
32
|
"sideEffects": [
|
|
34
33
|
"**/*.css"
|
|
@@ -59,7 +58,7 @@
|
|
|
59
58
|
"vite": "^6.0.0",
|
|
60
59
|
"vite-plugin-dts": "^4.3.0",
|
|
61
60
|
"@umriss-ui/demo": "0.0.0",
|
|
62
|
-
"@umriss-ui/core": "0.
|
|
61
|
+
"@umriss-ui/core": "0.3.1"
|
|
63
62
|
},
|
|
64
63
|
"scripts": {
|
|
65
64
|
"props": "node --disable-warning=ExperimentalWarning --experimental-strip-types demo/props.ts",
|