@mark1russell7/visuals 0.3.1 → 0.3.2

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.
@@ -0,0 +1,67 @@
1
+ import { s as Mark, v as Level } from "./mark-D8AdQYAS.js";
2
+ import { r as StageContent } from "./stage-DmFfah2e.js";
3
+ import { t as StageTheme } from "./theme-3EGbXXoP.js";
4
+ /** The colors of the marks of a stage. Each color is a CSS hex color, for example `#22364a`. */
5
+ interface MarkersTheme extends StageTheme {
6
+ /** The color of the marks of each level. */
7
+ readonly levels: Readonly<Record<Level, string>>;
8
+ /** The color of the line around a sign and around a run. Give the color of the page, so a mark is clear on each solid. */
9
+ readonly halo: string;
10
+ /** The color of the line around a mark whose record has a highlight. */
11
+ readonly accent: string;
12
+ /**
13
+ * The colors of a field, from the value `min` of its scale to the value `max`.
14
+ * A value between two colors gets a mix of them. A list with no color gives the color of the level of the field.
15
+ */
16
+ readonly field: readonly string[];
17
+ /** The part of a field that is not clear, from 0 to 1. The default is 0.8. */
18
+ readonly fieldOpacity?: number | undefined;
19
+ }
20
+ /** The options of the marks of a stage. */
21
+ interface MarkersOptions {
22
+ /** The radius of the sign of a point with no size, in CSS pixels. The default is `SIGN_RADIUS`. */
23
+ readonly signRadius?: number | undefined;
24
+ /** The width of the line of a link, in CSS pixels. The default is 2. */
25
+ readonly linkWidth?: number | undefined;
26
+ /** The lengths of a dash and of a gap of a link, in CSS pixels. The default is a dash of 6 and a gap of 4. */
27
+ readonly linkDash?: readonly [dash: number, gap: number] | undefined;
28
+ /**
29
+ * The distance of a sign and of a field from their surface, in the unit of the space.
30
+ * It is only for the test of what hides a mark: the surface of a mark does not hide it.
31
+ * The default is 1/400 of the size of the space of the marks.
32
+ */
33
+ readonly lift?: number | undefined;
34
+ }
35
+ /** The content of a stage that draws marks. The value of a pick is the mark. */
36
+ interface MarkersContent extends StageContent<Mark, MarkersTheme> {
37
+ /**
38
+ * This function shows only the marks that a test accepts, for example the marks of one kind. A mark that the picture does not show gets no pick.
39
+ * Start `refresh` of the stage after it. A test that accepts each mark shows all of them again.
40
+ */
41
+ show(test: (mark: Mark) => boolean): void;
42
+ }
43
+ /** The radius of the sign of a point with no size, in CSS pixels. The sign of a disc has this radius. */
44
+ export declare const SIGN_RADIUS = 7;
45
+ /**
46
+ * This function gives the radius of the sign of a level with the line around it, in CSS pixels.
47
+ * `radius` is the radius of the sign of a disc. Give the result to the field `clear` of a label, so the text stays off the sign.
48
+ */
49
+ export declare function signReach(level: Level, radius?: number): number;
50
+ /**
51
+ * This function makes the content of a stage that draws marks. Examine the marks with `checkMarks` first.
52
+ *
53
+ * - A point is a sign with the shape and the color of its level. A sign looks at the camera.
54
+ * A sign with no size keeps its size in the picture.
55
+ * - A run is a round line with its width in the space. Its center is half of its width above its surface.
56
+ * - A link is a dashed line. The picture shows it while its record, or the record of one of its ends, has a highlight.
57
+ * - A field is a grid of colors on its plane. A cell with no value is clear.
58
+ * - A meter has no place, so the content ignores it.
59
+ *
60
+ * A mark that a solid of an earlier content hides is less clear, and a mark with a highlight stays solid.
61
+ * A sign gets a pick before each other record, and a run gets a pick before a field.
62
+ * A run and a field give the distance of their pick.
63
+ * Put the content after the content of the solids in `stackContents`.
64
+ */
65
+ export declare function createMarkers(marks: readonly Mark[], options?: MarkersOptions): MarkersContent;
66
+ export type { MarkersContent, MarkersOptions, MarkersTheme };
67
+ //# sourceMappingURL=markers.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"markers.d.ts","names":[],"sources":["../src/markers/content.ts"],"mappings":";;;;UA4BiB,qBAAqB;;WAE3B,QAAQ,SAAS,OAAO;;WAExB;;WAEA;;;;;WAKA;;WAEA;;;UAIM;;WAEN;;WAEA;;WAEA,qBAAqB,cAAc;;;;;;WAMnC;;;UAIM,uBAAuB,aAAa,MAAM;;;;;EAKzD,KAAK,OAAO,MAAM;;;qBAIP;;;;;wBAqCG,UAAU,OAAO,OAAO;;;;;;;;;;;;;;;;wBAuNxB,cAAc,gBAAgB,QAAQ,UAAS,iBAAsB"}