magick-components 0.0.0-stage → 0.1.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.
Files changed (173) hide show
  1. package/LICENSE.txt +89 -0
  2. package/README.md +353 -2
  3. package/fonts/FrankRuhlLibre-Bold-letters.woff2 +0 -0
  4. package/fonts/FrankRuhlLibre-OFL.txt +105 -0
  5. package/fonts/NotoSerif-BoldItalic-compass.woff2 +0 -0
  6. package/fonts/NotoSerif-Italic-latin1.woff2 +0 -0
  7. package/fonts/NotoSerif-OFL.txt +93 -0
  8. package/fonts/SOURCES.md +35 -0
  9. package/fonts/gd-hall.css +3 -0
  10. package/lib/astrology/Kamea.d.ts +75 -0
  11. package/lib/astrology/Kamea.js +73 -0
  12. package/lib/astrology/MercuryWidget.d.ts +21 -0
  13. package/lib/astrology/MercuryWidget.js +80 -0
  14. package/lib/astrology/Moon.d.ts +32 -0
  15. package/lib/astrology/Moon.js +39 -0
  16. package/lib/astrology/MoonWidget.d.ts +20 -0
  17. package/lib/astrology/MoonWidget.js +63 -0
  18. package/lib/astrology/PlanetarySpirit.d.ts +103 -0
  19. package/lib/astrology/PlanetarySpirit.js +102 -0
  20. package/lib/astrology/mercuryRetrograde.d.ts +20 -0
  21. package/lib/astrology/mercuryRetrograde.js +80 -0
  22. package/lib/astrology/moonPath.d.ts +20 -0
  23. package/lib/astrology/moonPath.js +45 -0
  24. package/lib/chakras/Chakras.d.ts +34 -0
  25. package/lib/chakras/Chakras.js +149 -0
  26. package/lib/cssString.d.ts +5 -0
  27. package/lib/cssString.js +7 -0
  28. package/lib/drawingVersions.d.ts +29 -0
  29. package/lib/drawingVersions.js +15 -0
  30. package/lib/enochian/Tablet.d.ts +17 -0
  31. package/lib/enochian/Tablet.js +24 -0
  32. package/lib/enochian/tabletSigils.d.ts +46 -0
  33. package/lib/enochian/tabletSigils.js +172 -0
  34. package/lib/enochian/tabletSvg.d.ts +85 -0
  35. package/lib/enochian/tabletSvg.js +278 -0
  36. package/lib/gd/FylfotCross.d.ts +60 -0
  37. package/lib/gd/FylfotCross.js +121 -0
  38. package/lib/gd/GradeTree.d.ts +10 -0
  39. package/lib/gd/GradeTree.js +21 -0
  40. package/lib/gd/Lamen.d.ts +31 -0
  41. package/lib/gd/Lamen.js +317 -0
  42. package/lib/gd/RoseSigil.d.ts +31 -0
  43. package/lib/gd/RoseSigil.js +49 -0
  44. package/lib/gd/RoseSigilImage.d.ts +38 -0
  45. package/lib/gd/RoseSigilImage.js +29 -0
  46. package/lib/gd/SevenBranchedCandlestick.d.ts +54 -0
  47. package/lib/gd/SevenBranchedCandlestick.js +269 -0
  48. package/lib/gd/TableOfShewbread.d.ts +19 -0
  49. package/lib/gd/TableOfShewbread.js +120 -0
  50. package/lib/gd/hall/GdHall.d.ts +94 -0
  51. package/lib/gd/hall/GdHall.js +147 -0
  52. package/lib/gd/hall/art/altar.d.ts +8 -0
  53. package/lib/gd/hall/art/altar.js +21 -0
  54. package/lib/gd/hall/art/altarItems.d.ts +20 -0
  55. package/lib/gd/hall/art/altarItems.js +113 -0
  56. package/lib/gd/hall/art/banner.d.ts +23 -0
  57. package/lib/gd/hall/art/banner.js +64 -0
  58. package/lib/gd/hall/art/board.d.ts +9 -0
  59. package/lib/gd/hall/art/board.js +49 -0
  60. package/lib/gd/hall/art/cards.d.ts +11 -0
  61. package/lib/gd/hall/art/cards.js +124 -0
  62. package/lib/gd/hall/art/furnishings.d.ts +12 -0
  63. package/lib/gd/hall/art/furnishings.js +36 -0
  64. package/lib/gd/hall/art/geometry.d.ts +49 -0
  65. package/lib/gd/hall/art/geometry.js +97 -0
  66. package/lib/gd/hall/art/hebrewLetter.d.ts +10 -0
  67. package/lib/gd/hall/art/hebrewLetter.js +38 -0
  68. package/lib/gd/hall/art/index.d.ts +7 -0
  69. package/lib/gd/hall/art/index.js +61 -0
  70. package/lib/gd/hall/art/items.d.ts +12 -0
  71. package/lib/gd/hall/art/items.js +125 -0
  72. package/lib/gd/hall/art/kamea.d.ts +20 -0
  73. package/lib/gd/hall/art/kamea.js +64 -0
  74. package/lib/gd/hall/art/lamen.d.ts +9 -0
  75. package/lib/gd/hall/art/lamen.js +52 -0
  76. package/lib/gd/hall/art/lightning.d.ts +13 -0
  77. package/lib/gd/hall/art/lightning.js +44 -0
  78. package/lib/gd/hall/art/lights.d.ts +13 -0
  79. package/lib/gd/hall/art/lights.js +64 -0
  80. package/lib/gd/hall/art/marker.d.ts +8 -0
  81. package/lib/gd/hall/art/marker.js +19 -0
  82. package/lib/gd/hall/art/pantacle.d.ts +10 -0
  83. package/lib/gd/hall/art/pantacle.js +119 -0
  84. package/lib/gd/hall/art/pillar.d.ts +4 -0
  85. package/lib/gd/hall/art/pillar.js +25 -0
  86. package/lib/gd/hall/art/placeholder.d.ts +8 -0
  87. package/lib/gd/hall/art/placeholder.js +18 -0
  88. package/lib/gd/hall/art/platform.d.ts +13 -0
  89. package/lib/gd/hall/art/platform.js +28 -0
  90. package/lib/gd/hall/art/seals.d.ts +23 -0
  91. package/lib/gd/hall/art/seals.js +151 -0
  92. package/lib/gd/hall/art/shared.d.ts +87 -0
  93. package/lib/gd/hall/art/shared.js +95 -0
  94. package/lib/gd/hall/art/symbols.d.ts +37 -0
  95. package/lib/gd/hall/art/symbols.js +134 -0
  96. package/lib/gd/hall/art/tarotKey.d.ts +34 -0
  97. package/lib/gd/hall/art/tarotKey.js +101 -0
  98. package/lib/gd/hall/art/veil.d.ts +8 -0
  99. package/lib/gd/hall/art/veil.js +22 -0
  100. package/lib/gd/hall/art/vessels.d.ts +19 -0
  101. package/lib/gd/hall/art/vessels.js +74 -0
  102. package/lib/gd/hall/aspect.d.ts +31 -0
  103. package/lib/gd/hall/aspect.js +161 -0
  104. package/lib/gd/hall/attributes.d.ts +52 -0
  105. package/lib/gd/hall/attributes.js +116 -0
  106. package/lib/gd/hall/describe.d.ts +38 -0
  107. package/lib/gd/hall/describe.js +184 -0
  108. package/lib/gd/hall/dimensions.d.ts +39 -0
  109. package/lib/gd/hall/dimensions.js +49 -0
  110. package/lib/gd/hall/editor.d.ts +13 -0
  111. package/lib/gd/hall/editor.js +13 -0
  112. package/lib/gd/hall/fontMetrics.json +177 -0
  113. package/lib/gd/hall/fonts.d.ts +45 -0
  114. package/lib/gd/hall/fonts.js +73 -0
  115. package/lib/gd/hall/hebrewLetters.d.ts +8 -0
  116. package/lib/gd/hall/hebrewLetters.js +40 -0
  117. package/lib/gd/hall/index.d.ts +19 -0
  118. package/lib/gd/hall/index.js +17 -0
  119. package/lib/gd/hall/labels.d.ts +72 -0
  120. package/lib/gd/hall/labels.js +109 -0
  121. package/lib/gd/hall/layout.d.ts +213 -0
  122. package/lib/gd/hall/layout.js +837 -0
  123. package/lib/gd/hall/planets.d.ts +13 -0
  124. package/lib/gd/hall/planets.js +35 -0
  125. package/lib/gd/hall/presets/index.d.ts +13 -0
  126. package/lib/gd/hall/presets/index.js +29 -0
  127. package/lib/gd/hall/presets/neophyte.d.ts +7 -0
  128. package/lib/gd/hall/presets/neophyte.js +74 -0
  129. package/lib/gd/hall/presets/philosophus.d.ts +30 -0
  130. package/lib/gd/hall/presets/philosophus.js +244 -0
  131. package/lib/gd/hall/presets/portal.d.ts +24 -0
  132. package/lib/gd/hall/presets/portal.js +241 -0
  133. package/lib/gd/hall/presets/practicus.d.ts +17 -0
  134. package/lib/gd/hall/presets/practicus.js +181 -0
  135. package/lib/gd/hall/presets/theoricus.d.ts +13 -0
  136. package/lib/gd/hall/presets/theoricus.js +178 -0
  137. package/lib/gd/hall/presets/types.d.ts +72 -0
  138. package/lib/gd/hall/presets/types.js +58 -0
  139. package/lib/gd/hall/presets/zelator.d.ts +12 -0
  140. package/lib/gd/hall/presets/zelator.js +161 -0
  141. package/lib/gd/hall/spec.d.ts +54 -0
  142. package/lib/gd/hall/spec.js +108 -0
  143. package/lib/gd/hall/types.d.ts +131 -0
  144. package/lib/gd/hall/types.js +1 -0
  145. package/lib/gd/hall/validate.d.ts +13 -0
  146. package/lib/gd/hall/validate.js +285 -0
  147. package/lib/gd/hall/vocabulary.d.ts +139 -0
  148. package/lib/gd/hall/vocabulary.js +435 -0
  149. package/lib/gd/lamenGlyphs.d.ts +16 -0
  150. package/lib/gd/lamenGlyphs.js +167 -0
  151. package/lib/gd/lamenGrades.d.ts +29 -0
  152. package/lib/gd/lamenGrades.js +36 -0
  153. package/lib/gd/roseSigilGeometry.d.ts +10 -0
  154. package/lib/gd/roseSigilGeometry.js +10 -0
  155. package/lib/gd/roseSigilInternals.d.ts +85 -0
  156. package/lib/gd/roseSigilInternals.js +343 -0
  157. package/lib/gd/roseSigilOptimizer.d.ts +15 -0
  158. package/lib/gd/roseSigilOptimizer.js +59 -0
  159. package/lib/gd/roseSigilVersions.d.ts +12 -0
  160. package/lib/gd/roseSigilVersions.js +57 -0
  161. package/lib/hooks/useHydrated.d.ts +9 -0
  162. package/lib/hooks/useHydrated.js +13 -0
  163. package/lib/kabbalah/TreeOfLife.d.ts +135 -0
  164. package/lib/kabbalah/TreeOfLife.js +312 -0
  165. package/lib/kabbalah/fieldPath.d.ts +25 -0
  166. package/lib/kabbalah/fieldPath.js +100 -0
  167. package/lib/kabbalah/treeLabels.d.ts +30 -0
  168. package/lib/kabbalah/treeLabels.js +32 -0
  169. package/lib/kabbalah/treeOfLifeFigure.d.ts +59 -0
  170. package/lib/kabbalah/treeOfLifeFigure.js +151 -0
  171. package/lib/svgCoordinate.d.ts +12 -0
  172. package/lib/svgCoordinate.js +16 -0
  173. package/package.json +162 -3
@@ -0,0 +1,20 @@
1
+ export type Station = {
2
+ /** "retrograde" where Mercury starts moving backwards, "direct" where it stops. */
3
+ type: "retrograde" | "direct";
4
+ time: Date;
5
+ };
6
+ /** Mercury's stations between `from` and `to`, in time order. */
7
+ export declare function mercuryStations(from: Date, to: Date, stepDays?: number): Station[];
8
+ /**
9
+ * A retrograde as the dates the viewer's own zone puts its stations on:
10
+ * each the start of its local day.
11
+ */
12
+ export type Retrograde = {
13
+ start: Date;
14
+ end: Date;
15
+ };
16
+ /**
17
+ * The retrograde Mercury is in, or else its next one. A retrograde counts as
18
+ * running until the end of its end date, so a viewer sees it all of that day.
19
+ */
20
+ export declare function currentOrNextRetrograde(now: Date): Retrograde | undefined;
@@ -0,0 +1,80 @@
1
+ import { Body, Ecliptic, GeoVector, MakeTime, Search, } from "astronomy-engine";
2
+ import { DateTime } from "luxon";
3
+ /** Half the interval the longitude's speed is measured over, in days. */
4
+ const HALF_STEP = 1 / 1440; // one minute
5
+ /**
6
+ * Mercury turns retrograde and direct at a station, where its apparent
7
+ * longitude stops and turns back. The dates come out within ten minutes of
8
+ * JPL Horizons over 2020-2035, so a station this close to local midnight
9
+ * could belong to either date; the wider date is used.
10
+ */
11
+ const MARGIN_MINUTES = 15;
12
+ /** Apparent geocentric ecliptic longitude of Mercury, in degrees. */
13
+ function longitude(time) {
14
+ // GeoVector corrects for light travel time and aberration, and Ecliptic
15
+ // rotates to the true equinox and ecliptic of date.
16
+ return Ecliptic(GeoVector(Body.Mercury, time, true)).elon;
17
+ }
18
+ /** How fast that longitude changes, in degrees a day. */
19
+ function speed(time) {
20
+ let change = longitude(time.AddDays(HALF_STEP)) - longitude(time.AddDays(-HALF_STEP));
21
+ if (change > 180)
22
+ change -= 360;
23
+ else if (change < -180)
24
+ change += 360;
25
+ return change / (2 * HALF_STEP);
26
+ }
27
+ /** Mercury's stations between `from` and `to`, in time order. */
28
+ export function mercuryStations(from, to, stepDays = 2) {
29
+ const stations = [];
30
+ const end = MakeTime(to);
31
+ let time = MakeTime(from);
32
+ let value = speed(time);
33
+ while (time.ut < end.ut) {
34
+ const next = time.AddDays(stepDays);
35
+ const nextValue = speed(next);
36
+ // A station is where the speed crosses zero, so search for that root.
37
+ const options = { dt_tolerance_seconds: 1 };
38
+ if (value >= 0 && nextValue < 0) {
39
+ // Search answers null where it cannot bracket the root. Dropping a
40
+ // station would pair the wrong ones, so fail instead of misdating.
41
+ const found = Search((t) => -speed(t), time, next, options);
42
+ if (!found)
43
+ throw new Error(`No station by ${next.date.toISOString()}`);
44
+ stations.push({ type: "retrograde", time: found.date });
45
+ }
46
+ else if (value < 0 && nextValue >= 0) {
47
+ const found = Search(speed, time, next, options);
48
+ if (!found)
49
+ throw new Error(`No station by ${next.date.toISOString()}`);
50
+ stations.push({ type: "direct", time: found.date });
51
+ }
52
+ time = next;
53
+ value = nextValue;
54
+ }
55
+ return stations;
56
+ }
57
+ /** The start of the local date `minutes` after `time`. */
58
+ function localDate(time, minutes) {
59
+ return DateTime.fromJSDate(time).plus({ minutes }).startOf("day");
60
+ }
61
+ /**
62
+ * The retrograde Mercury is in, or else its next one. A retrograde counts as
63
+ * running until the end of its end date, so a viewer sees it all of that day.
64
+ */
65
+ export function currentOrNextRetrograde(now) {
66
+ const day = 86400_000;
67
+ // Retrogrades last under 25 days and start about every 116 days.
68
+ const stations = mercuryStations(new Date(now.getTime() - 40 * day), new Date(now.getTime() + 200 * day));
69
+ for (const [index, station] of stations.entries()) {
70
+ const next = stations[index + 1];
71
+ if (station.type !== "retrograde" || next?.type !== "direct")
72
+ continue;
73
+ const end = localDate(next.time, MARGIN_MINUTES);
74
+ if (now.getTime() <= end.endOf("day").toMillis())
75
+ return {
76
+ start: localDate(station.time, -MARGIN_MINUTES).toJSDate(),
77
+ end: end.toJSDate(),
78
+ };
79
+ }
80
+ }
@@ -0,0 +1,20 @@
1
+ /*!
2
+ * The lit part's path is adapted from phase_junk() in moon-phase.js:
3
+ * https://github.com/tingletech/moon-phase/blob/643015a83509ca6a662d1af6e1ac14661852cedb/moon-phase.js
4
+ * Copyright (c) 2012, Regents of the University of California.
5
+ * All rights reserved. Used under the BSD 3-Clause License, whose
6
+ * conditions and disclaimer are in this package's LICENSE.txt; this file
7
+ * is under that licence as well as MIT.
8
+ */
9
+ /**
10
+ * The Moon drawing's geometry, a module of its own so that it can be
11
+ * imported anywhere, `MoonWidget`'s client module included (plan 080,
12
+ * decision 7).
13
+ */
14
+ /** The Moon's orbit's mean inclination to the ecliptic, in degrees. */
15
+ export declare const MOON_MEAN_INCLINATION = 5.15;
16
+ /**
17
+ * SVG path of the moon's lit part for a `lune` phase (0 to 1, 0.5 is
18
+ * full); a `RangeError` for anything else, NaN included.
19
+ */
20
+ export declare function moonPath(phase: number): string;
@@ -0,0 +1,45 @@
1
+ /*!
2
+ * The lit part's path is adapted from phase_junk() in moon-phase.js:
3
+ * https://github.com/tingletech/moon-phase/blob/643015a83509ca6a662d1af6e1ac14661852cedb/moon-phase.js
4
+ * Copyright (c) 2012, Regents of the University of California.
5
+ * All rights reserved. Used under the BSD 3-Clause License, whose
6
+ * conditions and disclaimer are in this package's LICENSE.txt; this file
7
+ * is under that licence as well as MIT.
8
+ */
9
+ /**
10
+ * The Moon drawing's geometry, a module of its own so that it can be
11
+ * imported anywhere, `MoonWidget`'s client module included (plan 080,
12
+ * decision 7).
13
+ */
14
+ /** The Moon's orbit's mean inclination to the ecliptic, in degrees. */
15
+ export const MOON_MEAN_INCLINATION = 5.15;
16
+ // Ported from moon-phase's phase_junk() (above), which also draws the
17
+ // disc; the hemisphere, the inclination and the glow are ours.
18
+ /**
19
+ * SVG path of the moon's lit part for a `lune` phase (0 to 1, 0.5 is
20
+ * full); a `RangeError` for anything else, NaN included.
21
+ */
22
+ export function moonPath(phase) {
23
+ if (!(phase >= 0 && phase <= 1))
24
+ throw new RangeError(`moonPath: phase ${phase} is not between 0 and 1`);
25
+ let mag, sweep;
26
+ // the "sweep-flag" and the direction of movement change every quarter moon
27
+ // zero and one are both new moon; 0.50 is full moon
28
+ if (phase <= 0.25) {
29
+ sweep = [1, 0];
30
+ mag = 20 - 20 * phase * 4;
31
+ }
32
+ else if (phase <= 0.5) {
33
+ sweep = [0, 0];
34
+ mag = 20 * (phase - 0.25) * 4;
35
+ }
36
+ else if (phase <= 0.75) {
37
+ sweep = [1, 1];
38
+ mag = 20 - 20 * (phase - 0.5) * 4;
39
+ }
40
+ else {
41
+ sweep = [0, 1];
42
+ mag = 20 * (phase - 0.75) * 4;
43
+ }
44
+ return `m85,5 a${mag},20 0 1,${sweep[0]} 0,150 a20,20 0 1,${sweep[1]} 0,-150`;
45
+ }
@@ -0,0 +1,34 @@
1
+ /**
2
+ * The seven chakras on a seated figure.
3
+ *
4
+ * The figure, a woman seated cross-legged with her hands resting palm up
5
+ * on her knees, thumb and index finger touching, was drawn for this
6
+ * package on 13 November 2026 as an original: constructed below from
7
+ * hand-placed cubic Béziers, one half mirrored onto the other, without
8
+ * tracing or adapting any image. It replaces an earlier silhouette
9
+ * (added in fe44a6bf, December 2020) whose source was not recorded
10
+ * (plan 080, "Before publishing").
11
+ *
12
+ * The figure is filled `#000`, which the app's dark ink selects on
13
+ * (`.chakras path[fill="#000"]`); the chakras keep their colours.
14
+ */
15
+ /** Props of `Chakras`. */
16
+ export interface ChakrasProps {
17
+ /** The SVG's width; from the height and the figure's shape when not given. */
18
+ width?: string | number;
19
+ /** The SVG's height; from the width and the figure's shape when not given. */
20
+ height?: string | number;
21
+ /**
22
+ * A chakra's id in magick-data (`root`, `sacral`, `solar-plexus`,
23
+ * `heart`, `throat`, `third-eye`, `crown`): that one is drawn and the
24
+ * others faded. `null` fades them all; not given, none is faded. Any
25
+ * other value throws, as the Tree's `activeSephirah` does.
26
+ */
27
+ activeChakra?: string | null;
28
+ }
29
+ /**
30
+ * The seven chakras as coloured circles on a figure's silhouette, from the
31
+ * root at the base of its spine to the crown at the top of its head.
32
+ */
33
+ export declare function Chakras({ width, height, activeChakra }: ChakrasProps): import("react").JSX.Element;
34
+ export default Chakras;
@@ -0,0 +1,149 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ /**
3
+ * The seven chakras on a seated figure.
4
+ *
5
+ * The figure, a woman seated cross-legged with her hands resting palm up
6
+ * on her knees, thumb and index finger touching, was drawn for this
7
+ * package on 13 November 2026 as an original: constructed below from
8
+ * hand-placed cubic Béziers, one half mirrored onto the other, without
9
+ * tracing or adapting any image. It replaces an earlier silhouette
10
+ * (added in fe44a6bf, December 2020) whose source was not recorded
11
+ * (plan 080, "Before publishing").
12
+ *
13
+ * The figure is filled `#000`, which the app's dark ink selects on
14
+ * (`.chakras path[fill="#000"]`); the chakras keep their colours.
15
+ */
16
+ const WIDTH = 91.414;
17
+ const HEIGHT = 83.244;
18
+ /** The figure's midline, on which the chakras sit. */
19
+ const MID = WIDTH / 2;
20
+ const format = (value) => String(Math.round(value * 1000) / 1000);
21
+ /** A point on the right (`side` 1) or mirrored onto the left (-1). */
22
+ const at = ([dx, y], side) => `${format(MID + side * dx)} ${format(y)}`;
23
+ const curveTo = ([c1, c2, end], side) => `C${at(c1, side)} ${at(c2, side)} ${at(end, side)}`;
24
+ /**
25
+ * One outline from a right half that starts and ends on the midline: the
26
+ * half, then its mirror image traced back up to the start.
27
+ */
28
+ function symmetricOutline(start, half) {
29
+ const ends = [start, ...half.map(([, , end]) => end)];
30
+ const back = half
31
+ .map(([c1, c2], i) => curveTo([c2, c1, ends[i]], -1))
32
+ .reverse();
33
+ return `M${at(start, 1)}${half.map((curve) => curveTo(curve, 1)).join("")}${back.join("")}Z`;
34
+ }
35
+ /** Closed shapes on the right and their mirror images on the left. */
36
+ function mirrored(shapes) {
37
+ const one = ([start, curves], side) => `M${at(start, side)}${curves.map((curve) => curveTo(curve, side)).join("")}Z`;
38
+ return [1, -1]
39
+ .flatMap((side) => shapes.map((shape) => one(shape, side)))
40
+ .join("");
41
+ }
42
+ /** A circle as four Béziers, for the hole a hand's fingers ring. */
43
+ function circle([dx, y], r) {
44
+ const k = 0.5523 * r;
45
+ return [
46
+ [dx + r, y],
47
+ [
48
+ [
49
+ [dx + r, y + k],
50
+ [dx + k, y + r],
51
+ [dx, y + r],
52
+ ],
53
+ [
54
+ [dx - k, y + r],
55
+ [dx - r, y + k],
56
+ [dx - r, y],
57
+ ],
58
+ [
59
+ [dx - r, y - k],
60
+ [dx - k, y - r],
61
+ [dx, y - r],
62
+ ],
63
+ [
64
+ [dx + k, y - r],
65
+ [dx + r, y - k],
66
+ [dx + r, y],
67
+ ],
68
+ ],
69
+ ];
70
+ }
71
+ /**
72
+ * Head, slender neck, trunk with its waist and hips, and crossed legs,
73
+ * from the crown round to the seat.
74
+ */
75
+ // biome-ignore format: one Bézier a line
76
+ const body = symmetricOutline([0, 5.7], [
77
+ [[3.65, 5.7], [6.6, 9.2], [6.6, 13.5]], // head
78
+ [[6.6, 17.5], [4.6, 20.4], [2.6, 21.4]], // jaw to the neck
79
+ [[2.45, 22.8], [2.45, 24.3], [2.8, 25.4]], // neck
80
+ [[3.6, 27.6], [8, 28.6], [12, 29.8]], // shoulder's slope
81
+ [[14.8, 30.6], [16.4, 32.6], [16.6, 35.5]], // shoulder
82
+ [[16.7, 37.8], [15.2, 39], [14.6, 40.5]], // armpit
83
+ [[13.6, 44.5], [9.6, 47], [9.6, 51.5]], // flank to the waist
84
+ [[9.6, 55], [12, 57.5], [15, 58.8]], // hip
85
+ [[22, 60.2], [30, 61], [36, 62.2]], // thigh
86
+ [[40.8, 62.6], [43.2, 65.2], [42.8, 68.8]], // knee
87
+ [[42.4, 72.6], [38.4, 74.6], [33, 75.2]], // under the knee
88
+ [[24, 76.3], [14, 78], [7, 79.2]], // shin
89
+ [[4, 79.7], [1.5, 79], [0, 78.2]], // where the shins cross
90
+ ]);
91
+ /**
92
+ * The arms, each hand resting palm up on its knee, the thumb and index
93
+ * finger touching in a ring; the space between arm, flank and thigh
94
+ * stays open.
95
+ */
96
+ // biome-ignore format: one Bézier a line
97
+ const arms = mirrored([
98
+ [[11, 29.5], [
99
+ [[14.8, 30.4], [16.6, 32.4], [16.9, 35.5]], // shoulder, over the body's
100
+ [[17.4, 40.5], [19.9, 46], [22.7, 50.4]], // upper arm
101
+ [[23.9, 52.3], [25.2, 53.8], [27, 55.1]], // elbow
102
+ [[30.5, 57.4], [34, 58.8], [36.6, 59.3]], // forearm to the wrist
103
+ [[37.4, 59.35], [38.25, 58.6], [38.25, 57.4]], // index finger, rising
104
+ [[38.25, 56.43], [39.03, 55.65], [40, 55.65]], // the ring's top
105
+ [[40.97, 55.65], [41.75, 56.43], [41.75, 57.4]], // the thumb
106
+ [[41.75, 58.2], [42.2, 58.85], [43, 59.1]], // the hand's outer edge
107
+ [[43.8, 59.35], [44.6, 59.45], [45, 59.6]], // first finger
108
+ [[45.4, 59.75], [45.35, 60.2], [44.9, 60.25]], // its tip
109
+ [[44.3, 60.3], [43.8, 60.3], [43.5, 60.35]],
110
+ [[44.1, 60.4], [44.7, 60.5], [45, 60.7]], // second finger
111
+ [[45.3, 60.9], [45.1, 61.25], [44.7, 61.2]], // its tip
112
+ [[44.2, 61.15], [43.8, 61.1], [43.5, 61.15]],
113
+ [[43.9, 61.3], [44.3, 61.45], [44.45, 61.65]], // third finger
114
+ [[44.6, 61.95], [44.3, 62.15], [43.9, 62.1]], // its tip
115
+ [[42.5, 62.3], [40.6, 62.6], [38.8, 62.7]], // palm, on the knee
116
+ [[34.5, 62.2], [28, 59.6], [24.4, 57]], // under the forearm
117
+ [[22.6, 55.7], [21.4, 54], [20.4, 52]], // inside the elbow
118
+ [[18.6, 48.4], [15.8, 44], [15, 40.5]], // inside the upper arm
119
+ [[14.6, 38], [13, 33], [11, 31]], // back into the shoulder
120
+ ]],
121
+ circle([40, 57.4], 1), // inside the thumb and index finger
122
+ ]);
123
+ /** Each chakra's height on the midline, crown to root. */
124
+ const chakras = [
125
+ { id: "crown", fill: "#c9f", cy: 4.68 }, // on the crown
126
+ { id: "third-eye", fill: "#A28BE7", cy: 14 }, // the brow
127
+ { id: "throat", fill: "#0ff", cy: 24 },
128
+ { id: "heart", fill: "#0f0", cy: 37.5 },
129
+ { id: "solar-plexus", fill: "#ff0", cy: 49 }, // above the navel
130
+ { id: "sacral", fill: "#f60", cy: 60.5 }, // the lower belly
131
+ { id: "root", fill: "red", cy: 71.5 }, // the seat
132
+ ];
133
+ const opacityActive = { false: 0.2, true: 1 };
134
+ /** Each chakra's id, which `activeChakra` takes. */
135
+ const CHAKRA_IDS = chakras.map((chakra) => chakra.id);
136
+ /**
137
+ * The seven chakras as coloured circles on a figure's silhouette, from the
138
+ * root at the base of its spine to the crown at the top of its head.
139
+ */
140
+ export function Chakras({ width, height, activeChakra }) {
141
+ if (activeChakra !== undefined &&
142
+ activeChakra !== null &&
143
+ !CHAKRA_IDS.includes(activeChakra))
144
+ throw new Error(`Chakras: unknown activeChakra ${JSON.stringify(activeChakra)}; expected a chakra's id, one of ${CHAKRA_IDS.join(", ")}, or null for none`);
145
+ return (_jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", width: width, height: height, version: "1.1", viewBox: `0 0 ${WIDTH} ${HEIGHT}`, children: [_jsx("path", { fill: "#000", d: body }), _jsx("path", { fill: "#000", fillRule: "evenodd", d: arms }), chakras.map((chakra) => (_jsx("circle", { cx: format(MID), cy: chakra.cy, r: "4.679", fill: chakra.fill, opacity: activeChakra === undefined || activeChakra === chakra.id
146
+ ? opacityActive.true
147
+ : opacityActive.false }, chakra.id)))] }));
148
+ }
149
+ export default Chakras;
@@ -0,0 +1,5 @@
1
+ /**
2
+ * A CSS string of `text`, quoted, with its quotes, backslashes and line
3
+ * breaks escaped, so a URL cannot end the `url()` early.
4
+ */
5
+ export declare function cssString(text: string): string;
@@ -0,0 +1,7 @@
1
+ /**
2
+ * A CSS string of `text`, quoted, with its quotes, backslashes and line
3
+ * breaks escaped, so a URL cannot end the `url()` early.
4
+ */
5
+ export function cssString(text) {
6
+ return `"${text.replace(/["\\\n\r\f]/g, (char) => `\\${char.charCodeAt(0).toString(16)} `)}"`;
7
+ }
@@ -0,0 +1,29 @@
1
+ /**
2
+ * What a drawing's versions say about themselves, as the rose's and the
3
+ * candlestick's entries export it: a name for a menu, a note for a
4
+ * footnote and the works cited, much as magick-data's tablet notes give
5
+ * the Enochian tablets' versions. Private: each entry exports its own
6
+ * notes and these types.
7
+ */
8
+ /** A work a version is taken from: the citation, and its scan where public. */
9
+ export interface DrawingSource {
10
+ /** The work and the place in it, with the scan's leaf where there is one. */
11
+ readonly text: string;
12
+ /** The page of the work's public scan, where there is one. */
13
+ readonly url?: string;
14
+ }
15
+ /** One version of a drawing. */
16
+ export interface DrawingVersionNote<Id extends string = string> {
17
+ readonly id: Id;
18
+ /** The version's name, for a menu: "Regardie 1939". */
19
+ readonly title: string;
20
+ /** Where the version comes from and how it differs, for a footnote. */
21
+ readonly text: string;
22
+ /** The works it is drawn from, in the order the note names them. */
23
+ readonly sources: readonly DrawingSource[];
24
+ }
25
+ /**
26
+ * A leaf of an archive.org scan: the item, and the file within it where
27
+ * the item holds several, as magick-data's `sourceUrl` links them.
28
+ */
29
+ export declare function archiveLeaf(item: string, leaf: number, file?: string): string;
@@ -0,0 +1,15 @@
1
+ /**
2
+ * What a drawing's versions say about themselves, as the rose's and the
3
+ * candlestick's entries export it: a name for a menu, a note for a
4
+ * footnote and the works cited, much as magick-data's tablet notes give
5
+ * the Enochian tablets' versions. Private: each entry exports its own
6
+ * notes and these types.
7
+ */
8
+ /**
9
+ * A leaf of an archive.org scan: the item, and the file within it where
10
+ * the item holds several, as magick-data's `sourceUrl` links them.
11
+ */
12
+ export function archiveLeaf(item, leaf, file) {
13
+ const within = file ? `/${encodeURIComponent(file)}` : "";
14
+ return `https://archive.org/details/${item}${within}/page/n${leaf}`;
15
+ }
@@ -0,0 +1,17 @@
1
+ import { type TabletProps } from "./tabletSvg.tsx";
2
+ export { type TabletHighlights, type TabletProps, type TabletSquare, type TabletViewBox, tabletName, tabletViewBox, UNION_VIEWBOX, WATCHTOWER_VIEWBOX, } from "./tabletSvg.tsx";
3
+ /**
4
+ * An Enochian tablet in a version (`version`, the Golden Dawn's by
5
+ * default): a Watchtower's sigil above its grid on a 210 × 297 page, or
6
+ * the Tablet of Union's grid on a page of its own (`tabletViewBox`). The
7
+ * version's reversed letters are mirrored unless `mirrorReversed` is
8
+ * false, and a Watchtower's second letters drawn small in each square's
9
+ * corner when `showSecondLetters` is true. A key the data does not have
10
+ * draws an empty page; a tablet the version does not have, its page
11
+ * saying so. It is an image named by `tabletName` (an `aria-label`, which
12
+ * shows no tooltip over the squares as a `<title>` would) unless `label`
13
+ * names it otherwise or is false, as for a tablet drawn inside a larger
14
+ * drawing that names itself.
15
+ */
16
+ export declare function Tablet({ label, mirrorReversed, showSecondLetters, frame, ...props }: TabletProps): import("react").JSX.Element;
17
+ export default Tablet;
@@ -0,0 +1,24 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { TabletSvg, tabletName } from "./tabletSvg.js";
3
+ export { tabletName, tabletViewBox, UNION_VIEWBOX, WATCHTOWER_VIEWBOX, } from "./tabletSvg.js";
4
+ /**
5
+ * An Enochian tablet in a version (`version`, the Golden Dawn's by
6
+ * default): a Watchtower's sigil above its grid on a 210 × 297 page, or
7
+ * the Tablet of Union's grid on a page of its own (`tabletViewBox`). The
8
+ * version's reversed letters are mirrored unless `mirrorReversed` is
9
+ * false, and a Watchtower's second letters drawn small in each square's
10
+ * corner when `showSecondLetters` is true. A key the data does not have
11
+ * draws an empty page; a tablet the version does not have, its page
12
+ * saying so. It is an image named by `tabletName` (an `aria-label`, which
13
+ * shows no tooltip over the squares as a `<title>` would) unless `label`
14
+ * names it otherwise or is false, as for a tablet drawn inside a larger
15
+ * drawing that names itself.
16
+ */
17
+ export function Tablet({ label, mirrorReversed = true, showSecondLetters = false, frame = false, ...props }) {
18
+ const name = label === undefined
19
+ ? tabletName(props.tablet, props.version)
20
+ : label || undefined;
21
+ const drawn = { ...props, mirrorReversed, showSecondLetters, frame };
22
+ return name ? (_jsx(TabletSvg, { ...drawn, role: "img", "aria-label": name })) : (_jsx(TabletSvg, { ...drawn, "aria-hidden": true }));
23
+ }
24
+ export default Tablet;
@@ -0,0 +1,46 @@
1
+ import type { TabletVersionId } from "magick-data/enochian/tablets";
2
+ declare function EarthSigil(): import("react").JSX.Element;
3
+ /** Earth as the Equinox's Plate X prints it: a cross potent, in black. */
4
+ declare function PlainEarthSigil(): import("react").JSX.Element;
5
+ /**
6
+ * Fire: a circle with twelve rays, alternately mauve and yellow, about a
7
+ * red centre and ring, on green within a red ring: Regardie, The Golden
8
+ * Dawn, vol. 4 (1940), p.307. Drawn here from that description.
9
+ */
10
+ declare function FireSigil(): import("react").JSX.Element;
11
+ /**
12
+ * Fire as the Equinox's Plate X prints it, in black: a small circle with
13
+ * twelve rays, straight and wavy by turns.
14
+ */
15
+ declare function PlainFireSigil(): import("react").JSX.Element;
16
+ /** Regardie's sigils, which the Golden Dawn's version and his print draw. */
17
+ export declare const Sigils: {
18
+ earth: typeof EarthSigil;
19
+ air: () => import("react").JSX.Element;
20
+ water: () => import("react").JSX.Element;
21
+ fire: typeof FireSigil;
22
+ };
23
+ /**
24
+ * The Equinox's sigils, from its Plate X, in black: *The Equinox* I(7)
25
+ * (1912), "Liber Chanokh", Plate X, one sigil in each corner (Air top
26
+ * left, Water top right, Earth bottom left, Fire bottom right); archive.org
27
+ * `crowley-equinox_202110`, the file "The Equinox Vol. 1, No. 7", leaf
28
+ * n256. These plain forms are our own drawings after that plate,
29
+ * constructed in code from lines, arcs and curves, with no font's outlines.
30
+ * Air's is a Tau with four Yods above it, drawn as small flames; we take
31
+ * the Yods to stand, likely, for the 4 over the T in Dee's Sigillum Dei
32
+ * Aemeth (Plate II, leaf n238), an inference no source states (see
33
+ * `AirSigil`).
34
+ * Of Regardie's coloured sigils (`Sigils`), only Air's form follows the
35
+ * plate: Water and Fire are drawn from Regardie's description of them (The
36
+ * Golden Dawn, vol. 4, 1940, p. 307), and Earth is a cross in four colours.
37
+ */
38
+ export declare const EquinoxSigils: {
39
+ earth: typeof PlainEarthSigil;
40
+ air: () => import("react").JSX.Element;
41
+ water: () => import("react").JSX.Element;
42
+ fire: typeof PlainFireSigil;
43
+ };
44
+ /** Each version as a drawing names it. */
45
+ export declare const VERSION_NAMES: Readonly<Record<TabletVersionId, string>>;
46
+ export {};