@sudobility/music_types 0.13.8 → 0.13.10

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,82 @@
1
+ /**
2
+ * The notation glyphs, as data.
3
+ *
4
+ * **Generated — do not edit by hand.** The source of truth is
5
+ * `music_app/src/components/icons/notation-icons.tsx`, rendered and serialized
6
+ * by `music_app/scripts/generate-notation-icon-art.mjs`. Re-run that after
7
+ * changing an icon.
8
+ *
9
+ * Here rather than in an app because two of them draw these: the web toolbar
10
+ * and the React Native one. A second copy would drift from the first the moment
11
+ * either was tuned, and the drift would be invisible — a glyph a pixel off is
12
+ * not something a test notices or a reader can name.
13
+ *
14
+ * Data rather than components for the same reason `icon-art.ts` next door is:
15
+ * this package must work on the backend and add no dependencies, so it cannot
16
+ * hold JSX. Each app replays the shapes with its own primitives — `<path>` on
17
+ * the web, `react-native-svg`'s `Path` on native.
18
+ */
19
+ /** Every glyph is authored in a 24×24 box. */
20
+ export declare const NOTATION_ICON_VIEWBOX = 24;
21
+ /** A stroke cap/join, spelled as SVG spells it. */
22
+ export type NotationLineCap = "butt" | "round" | "square";
23
+ export type NotationLineJoin = "miter" | "round" | "bevel";
24
+ type Paint = {
25
+ readonly fill?: string;
26
+ readonly stroke?: string;
27
+ readonly strokeWidth?: number;
28
+ readonly strokeLinecap?: NotationLineCap;
29
+ readonly strokeLinejoin?: NotationLineJoin;
30
+ readonly strokeDasharray?: string;
31
+ readonly opacity?: number;
32
+ readonly transform?: string;
33
+ };
34
+ export type NotationIconShape = (Paint & {
35
+ readonly kind: "path";
36
+ readonly d: string;
37
+ readonly fillRule?: "evenodd" | "nonzero";
38
+ }) | (Paint & {
39
+ readonly kind: "rect";
40
+ readonly x: number;
41
+ readonly y: number;
42
+ readonly width: number;
43
+ readonly height: number;
44
+ readonly rx?: number;
45
+ }) | (Paint & {
46
+ readonly kind: "ellipse";
47
+ readonly cx: number;
48
+ readonly cy: number;
49
+ readonly rx: number;
50
+ readonly ry: number;
51
+ }) | (Paint & {
52
+ readonly kind: "circle";
53
+ readonly cx: number;
54
+ readonly cy: number;
55
+ readonly r: number;
56
+ }) | (Paint & {
57
+ readonly kind: "text";
58
+ readonly x: number;
59
+ readonly y: number;
60
+ readonly content: string;
61
+ readonly fontSize?: number;
62
+ readonly fontStyle?: string;
63
+ readonly textAnchor?: string;
64
+ }) | (Paint & {
65
+ readonly kind: "group";
66
+ readonly shapes: readonly NotationIconShape[];
67
+ });
68
+ /**
69
+ * The closed vocabulary, as an array with the type read off it.
70
+ *
71
+ * A union has no runtime form, so anything that must *validate* a name would
72
+ * otherwise write the list out again.
73
+ */
74
+ export declare const NOTATION_ICON_NAMES: readonly ["AddMeasureIcon", "ArpeggioIcon", "ArticulationIcon", "BeamBreakIcon", "BeamNoneIcon", "ChordIcon", "ContinuousLayoutIcon", "CrescendoIcon", "DeleteMeasureIcon", "DiminuendoIcon", "DottedIcon", "DoubleFlatIcon", "DoubleSharpIcon", "EighthNoteIcon", "FermataIcon", "FlatIcon", "GoToStartIcon", "HalfNoteIcon", "InsertModeIcon", "InsertNoteIcon", "InsertRestIcon", "MetronomeIcon", "NaturalIcon", "NextMeasureIcon", "OrnamentIcon", "PageLayoutIcon", "PreviousMeasureIcon", "QuantizeIcon", "QuarterNoteIcon", "ReplaceModeIcon", "SelectAllIcon", "SharpIcon", "SixteenthNoteIcon", "SlurIcon", "SoloIcon", "SunMoonIcon", "ThirtySecondNoteIcon", "TieIcon", "TripletIcon", "WholeNoteIcon"];
75
+ export type NotationIconName = (typeof NOTATION_ICON_NAMES)[number];
76
+ /**
77
+ * A record, never a parallel array: adding a name above fails to compile until
78
+ * its shapes are supplied here, where an array would silently offer the old set.
79
+ */
80
+ export declare const NOTATION_ICONS: Record<NotationIconName, readonly NotationIconShape[]>;
81
+ export {};
82
+ //# sourceMappingURL=notation-icon-art.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"notation-icon-art.d.ts","sourceRoot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