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,35 @@
1
+ # The hall fonts
2
+
3
+ `GdHall`, the temple-hall diagram, sets its labels in Noto Serif Italic,
4
+ its compass in Noto Serif Bold Italic and its Hebrew letters in Frank Ruhl
5
+ Libre Bold, under family names of its own, from these three subsets. Its
6
+ text is measured with exactly these files (`src/gd/hall/fontMetrics.json`),
7
+ so another build of either font may set it differently.
8
+
9
+ They are licensed under the SIL Open Font License 1.1, not MIT:
10
+ [NotoSerif-OFL.txt](./NotoSerif-OFL.txt) (Copyright 2022 The Noto Project
11
+ Authors) and [FrankRuhlLibre-OFL.txt](./FrankRuhlLibre-OFL.txt) (Copyright
12
+ 2015 The Frank Ruhl Libre Project Authors), the upstream notices; neither
13
+ declares a Reserved Font Name. `FrankRuhlLibre-OFL.txt` ends with a few
14
+ lines of a GitHub page footer; they are in the upstream file, which is kept
15
+ byte for byte.
16
+
17
+ `scripts/gd-hall-fonts/build.py` in the
18
+ [magick.ly repository](https://github.com/gadicc/magickly) makes them:
19
+ static instances of the variable fonts in google/fonts commit
20
+ `8b0a1d0f5983c89bc2b93f1b5fb55f9e252744b5`, subset, with only the `kern`
21
+ layout feature kept.
22
+
23
+ | Source | SHA-256 |
24
+ | --- | --- |
25
+ | [`ofl/notoserif/NotoSerif-Italic[wdth,wght].ttf`](https://raw.githubusercontent.com/google/fonts/8b0a1d0f5983c89bc2b93f1b5fb55f9e252744b5/ofl/notoserif/NotoSerif-Italic%5Bwdth,wght%5D.ttf) | e87acbc6c0efd0d9a20d6a8cbbda2b266c14be3a3a6f5af8ec9d7b2460570ad1 |
26
+ | [`ofl/frankruhllibre/FrankRuhlLibre[wght].ttf`](https://raw.githubusercontent.com/google/fonts/8b0a1d0f5983c89bc2b93f1b5fb55f9e252744b5/ofl/frankruhllibre/FrankRuhlLibre%5Bwght%5D.ttf) | f9bf26966681037aae894b031bd0dcf2c1bfdfa128dd0640cf276fe62a338a43 |
27
+
28
+ | File | Instance and subset | Bytes | SHA-256 |
29
+ | --- | --- | --- | --- |
30
+ | NotoSerif-Italic-latin1.woff2 | weight 400; U+0020–007E, U+00A0–00FF, U+2013–2014, U+2018–2019, U+201C–201D, U+2026 | 11464 | 9f950c9e9439445d096145d53dcb951ec3baa9d71efbd206a87c70d876e538dd |
31
+ | NotoSerif-BoldItalic-compass.woff2 | weight 700; the letters of "East West North South" | 2072 | f39a880b7b95a001802b1cb02f3ae8ffea9e656065a54f8d3bbd43b833d6ded0 |
32
+ | FrankRuhlLibre-Bold-letters.woff2 | weight 700; U+05D0–05EA (the 22 letters and 5 final forms) | 3424 | a8d45534f1361f1375491d4fa24e24d486620a783dbf9741b4c36b7529932de2 |
33
+
34
+ [gd-hall.css](./gd-hall.css) declares them with URLs relative to itself;
35
+ `scripts/gdHallCss.mjs` writes it from `GD_HALL_FONT_FILES`.
@@ -0,0 +1,3 @@
1
+ @font-face{font-family:"GdHall Noto Serif";font-style:italic;font-weight:400;font-display:swap;src:url("./NotoSerif-Italic-latin1.woff2") format("woff2");unicode-range:U+20-7E, U+A0-FF, U+2013-2014, U+2018-2019, U+201C-201D, U+2026}
2
+ @font-face{font-family:"GdHall Noto Serif";font-style:italic;font-weight:700;font-display:swap;src:url("./NotoSerif-BoldItalic-compass.woff2") format("woff2");unicode-range:U+20, U+45, U+4E, U+53, U+57, U+61, U+65, U+68, U+6F, U+72-75}
3
+ @font-face{font-family:"GdHall Frank Ruhl Libre";font-style:normal;font-weight:700;font-display:swap;src:url("./FrankRuhlLibre-Bold-letters.woff2") format("woff2");unicode-range:U+5D0-5EA}
@@ -0,0 +1,75 @@
1
+ import { type KameaPlanetId } from "magick-data/astrology/kameas";
2
+ import type { CSSProperties, ReactNode } from "react";
3
+ /** The square's side, in the figure's units; the figure is centred on 0,0. */
4
+ export declare const KAMEA_SIDE = 96;
5
+ /**
6
+ * Where a square's cells lie in the figure: what a drawing laid over the
7
+ * numbers (a planet's seal, or a sigil traced from cell to cell) needs to
8
+ * line up with them.
9
+ */
10
+ export interface KameaGeometry {
11
+ /** Cells along a side: Saturn 3 … the Moon 9. */
12
+ order: number;
13
+ /** A cell's side, in the figure's units. */
14
+ cell: number;
15
+ /** A cell's centre, by its row from the top and its column from the left. */
16
+ center(row: number, column: number): [x: number, y: number];
17
+ }
18
+ /** The geometry of a square of `order` cells a side, in `KameaFigure`. */
19
+ export declare function kameaGeometry(order: number): KameaGeometry;
20
+ export interface KameaFigureProps {
21
+ /**
22
+ * The planet, by magick-data's id; without one, or with a name that is
23
+ * not one of the seven, an empty frame.
24
+ */
25
+ planet?: KameaPlanetId;
26
+ /** The numbers' font stack. */
27
+ fontFamily?: string;
28
+ /** The square's ground. */
29
+ paper?: string;
30
+ /** The frame, the rules and the numbers. */
31
+ ink?: string;
32
+ /**
33
+ * Drawn over the numbers, in the figure's units (centred on 0,0,
34
+ * `KAMEA_SIDE` across; `kameaGeometry` places the cells): room for a
35
+ * planet's seal or sigils to come.
36
+ */
37
+ children?: ReactNode;
38
+ }
39
+ /**
40
+ * The square as SVG elements, `KAMEA_SIDE` across and centred on the
41
+ * origin, for a drawing that places it itself (as the temple hall does);
42
+ * `Kamea` is the same in an `<svg>` of its own.
43
+ */
44
+ export declare function KameaFigure({ planet, fontFamily, paper, ink, children, }: KameaFigureProps): import("react").JSX.Element;
45
+ export interface KameaProps extends KameaFigureProps {
46
+ planet: KameaPlanetId;
47
+ /**
48
+ * The drawing's width (CSS pixels for a number); the height's when only
49
+ * that is given, as it is square, and 240 when neither is.
50
+ */
51
+ width?: number | string;
52
+ /**
53
+ * The drawing's height (CSS pixels for a number); the width's when only
54
+ * that is given, and 240 when neither is.
55
+ */
56
+ height?: number | string;
57
+ /**
58
+ * The drawing's accessible name: the square's own ("Kamea of Saturn")
59
+ * when not given, this one when a string. `false` marks it decorative,
60
+ * hidden from assistive technology (`aria-hidden`).
61
+ */
62
+ label?: string | false;
63
+ /** The `<svg>`'s class. */
64
+ className?: string;
65
+ /** The `<svg>`'s style. */
66
+ style?: CSSProperties;
67
+ }
68
+ /**
69
+ * A planet's kamea in an `<svg>` of its own, square, 240 across unless
70
+ * `width` or `height` says otherwise, the frame inset a little from the
71
+ * edge. It is an image named by its planet ("Kamea of Saturn") unless
72
+ * `label` names it otherwise or is false.
73
+ */
74
+ export declare function Kamea({ width, height, label, className, style, ...figure }: KameaProps): import("react").JSX.Element;
75
+ export default Kamea;
@@ -0,0 +1,73 @@
1
+ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import kameas from "magick-data/astrology/kameas";
3
+ import planets from "magick-data/astrology/planets";
4
+ import { svgCoordinate } from "../svgCoordinate.js";
5
+ /*
6
+ * A planet's kamea (magic square) drawn from its numbers, which magick-data
7
+ * computes (`magick-data/astrology/kameas`): a frame, the grid's rules and
8
+ * each number in its cell. It writes no ids, links or stylesheet, so any
9
+ * number of squares can share a page or a drawing. Plan 061 ("Follow-ups
10
+ * after stage F"): the temple hall's `kamea` art wraps `KameaFigure`.
11
+ */
12
+ /** The square's side, in the figure's units; the figure is centred on 0,0. */
13
+ export const KAMEA_SIDE = 96;
14
+ const FRAME = 2;
15
+ const RULE = 0.6;
16
+ /** The numbers' size, as a share of a cell. */
17
+ const NUMBER_SIZE = 0.48;
18
+ /** The geometry of a square of `order` cells a side, in `KameaFigure`. */
19
+ export function kameaGeometry(order) {
20
+ const half = KAMEA_SIDE / 2;
21
+ const cell = KAMEA_SIDE / order;
22
+ return {
23
+ order,
24
+ cell,
25
+ center: (row, column) => [
26
+ -half + (column + 0.5) * cell,
27
+ -half + (row + 0.5) * cell,
28
+ ],
29
+ };
30
+ }
31
+ /**
32
+ * The square as SVG elements, `KAMEA_SIDE` across and centred on the
33
+ * origin, for a drawing that places it itself (as the temple hall does);
34
+ * `Kamea` is the same in an `<svg>` of its own.
35
+ */
36
+ export function KameaFigure({ planet, fontFamily = "serif", paper = "#ffffff", ink = "#000000", children, }) {
37
+ const half = KAMEA_SIDE / 2;
38
+ const frame = (_jsx("rect", { x: -half, y: -half, width: KAMEA_SIDE, height: KAMEA_SIDE, fill: paper, stroke: ink, strokeWidth: FRAME }));
39
+ // Only the seven: a name from untrusted input ("constructor") is none.
40
+ const square = planet !== undefined && Object.hasOwn(kameas, planet)
41
+ ? kameas[planet]
42
+ : undefined;
43
+ if (!square)
44
+ return (_jsxs(_Fragment, { children: [frame, children] }));
45
+ const { order, cell, center } = kameaGeometry(square.length);
46
+ const size = cell * NUMBER_SIZE;
47
+ const rules = Array.from({ length: order - 1 }, (_, i) => svgCoordinate(-half + (i + 1) * cell));
48
+ return (_jsxs(_Fragment, { children: [frame, _jsx("path", { d: rules
49
+ .map((at) => `M${at},${-half}V${half}M${-half},${at}H${half}`)
50
+ .join(""), stroke: ink, strokeWidth: RULE, fill: "none" }), _jsx("g", { fill: ink, fontFamily: fontFamily, fontStyle: "italic", fontSize: svgCoordinate(size), textAnchor: "middle", children: square.flatMap((row, i) => row.map((value, j) => {
51
+ const [x, y] = center(i, j);
52
+ return (_jsx("text", { x: svgCoordinate(x),
53
+ // The digits' middle on the cell's: a third of the size down.
54
+ y: svgCoordinate(y + size * 0.36), children: value }, value));
55
+ })) }), children] }));
56
+ }
57
+ /** The square's own name: "Kamea of Saturn", "Kamea of Sol". */
58
+ function kameaName(planet) {
59
+ return planet !== undefined && Object.hasOwn(kameas, planet)
60
+ ? `Kamea of ${planets[planet].name.en.en}`
61
+ : "Kamea";
62
+ }
63
+ /**
64
+ * A planet's kamea in an `<svg>` of its own, square, 240 across unless
65
+ * `width` or `height` says otherwise, the frame inset a little from the
66
+ * edge. It is an image named by its planet ("Kamea of Saturn") unless
67
+ * `label` names it otherwise or is false.
68
+ */
69
+ export function Kamea({ width, height, label, className, style, ...figure }) {
70
+ const name = label === undefined ? kameaName(figure.planet) : label || undefined;
71
+ return (_jsx("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "-50 -50 100 100", width: width ?? height ?? 240, height: height ?? width ?? 240, className: className, style: style, role: name ? "img" : undefined, "aria-label": name, "aria-hidden": name ? undefined : true, children: _jsx(KameaFigure, { ...figure }) }));
72
+ }
73
+ export default Kamea;
@@ -0,0 +1,21 @@
1
+ import { type ImgHTMLAttributes } from "react";
2
+ export interface MercuryWidgetProps {
3
+ /** Space around the picture, as CSS `padding`. */
4
+ padding?: string;
5
+ /** The widget's background image, a URL, drawn to cover; none if omitted. */
6
+ background?: string;
7
+ /**
8
+ * Mercury's picture, drawn 85 px square and decorative: a URL, or `<img>`
9
+ * props for a responsive one (Next's `getImageProps()` gives them). None
10
+ * if omitted.
11
+ */
12
+ image?: string | ImgHTMLAttributes<HTMLImageElement>;
13
+ }
14
+ /**
15
+ * Mercury's next or current retrograde, worked out in the browser on today's
16
+ * date and shown in the reader's own date format, under a picture of the
17
+ * planet. Rendered on the server, it leaves a blank line where the dates
18
+ * go.
19
+ */
20
+ export declare function MercuryWidget({ padding, background, image, }: MercuryWidgetProps): import("react").JSX.Element;
21
+ export default MercuryWidget;
@@ -0,0 +1,80 @@
1
+ "use client";
2
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
+ import { useEffect, useState } from "react";
4
+ import { cssString } from "../cssString.js";
5
+ const NARROW_CHARACTER = /[\p{sc=Latin}\p{sc=Cyrillic}\p{sc=Greek}\p{sc=Hebrew}\p{sc=Arabic}\p{sc=Common}\p{sc=Inherited}]/u;
6
+ /**
7
+ * How many em a date label needs: 0.5 per character in the scripts above
8
+ * (digits and punctuation included) and 1 per other character. In Chromium
9
+ * no retrograde label in 79 locales was wider, though CJK and Indic labels
10
+ * come out smaller than they could be. Emoji or full-width characters would
11
+ * be wider, but the labels have none.
12
+ */
13
+ function emWidth(text) {
14
+ let em = 0;
15
+ for (const char of text)
16
+ em += NARROW_CHARACTER.test(char) ? 0.5 : 1;
17
+ return em;
18
+ }
19
+ /**
20
+ * Mercury's next or current retrograde, worked out in the browser on today's
21
+ * date and shown in the reader's own date format, under a picture of the
22
+ * planet. Rendered on the server, it leaves a blank line where the dates
23
+ * go.
24
+ */
25
+ export function MercuryWidget({ padding = "10px 0 2px 0", background, image, }) {
26
+ // The page is prerendered, and the dates depend on today's date, the
27
+ // viewer's zone and their date format, so they can't be in the HTML.
28
+ // undefined until the calculation answers, then the retrograde's dates
29
+ // as the viewer writes them, or null.
30
+ const [retrograde, setRetrograde] = useState();
31
+ useEffect(() => {
32
+ let current = true;
33
+ // The ephemeris is worth about 22kB gzipped, so it loads here rather
34
+ // than with the page.
35
+ const update = () => Promise.all([import("./mercuryRetrograde.js"), import("luxon")])
36
+ .then(([{ currentOrNextRetrograde }, { DateTime }]) => {
37
+ const d = (date) => DateTime.fromJSDate(date).toLocaleString({
38
+ month: "short",
39
+ day: "2-digit",
40
+ });
41
+ const found = currentOrNextRetrograde(new Date());
42
+ if (current)
43
+ setRetrograde(found ? { start: d(found.start), end: d(found.end) } : null);
44
+ })
45
+ .catch((error) => {
46
+ console.error(error);
47
+ if (current)
48
+ setRetrograde(null);
49
+ });
50
+ update();
51
+ // A tab left open for days would otherwise keep a finished retrograde.
52
+ const onVisible = () => {
53
+ if (document.visibilityState === "visible")
54
+ update();
55
+ };
56
+ document.addEventListener("visibilitychange", onVisible);
57
+ return () => {
58
+ current = false;
59
+ document.removeEventListener("visibilitychange", onVisible);
60
+ };
61
+ }, []);
62
+ let label = "\u00a0"; // keeps the label's line height
63
+ if (retrograde)
64
+ label = `Retro ${retrograde.start} – ${retrograde.end}`;
65
+ else if (retrograde === null)
66
+ label = "Retro dates unknown";
67
+ const fitCqi = Math.floor(1000 / emWidth(label)) / 10;
68
+ return (_jsxs("div", { style: {
69
+ textAlign: "center",
70
+ background: background ? `url(${cssString(background)})` : undefined,
71
+ backgroundSize: "cover",
72
+ height: "100%",
73
+ containerType: "inline-size",
74
+ }, children: [_jsx("div", { style: { padding }, children: image && (_jsx("img", { height: 85, width: 85, alt: "", ...(typeof image === "string" ? { src: image } : image) })) }), _jsx("div", { style: {
75
+ color: "#cc5",
76
+ fontSize: `min(1rem, ${fitCqi}cqi)`,
77
+ whiteSpace: "nowrap",
78
+ }, children: label })] }));
79
+ }
80
+ export default MercuryWidget;
@@ -0,0 +1,32 @@
1
+ /** Props of `Moon`. */
2
+ export interface MoonProps {
3
+ /**
4
+ * The day whose phase to draw, worked out by `lune`. `phase`, when
5
+ * given, wins. An invalid `Date` throws a `RangeError`.
6
+ */
7
+ date?: Date;
8
+ /**
9
+ * The phase to draw, from 0 to 1 as `lune` gives it: 0 and 1 are new,
10
+ * 0.5 full; anything else throws a `RangeError`. With neither this nor
11
+ * `date`, only the unlit disc is drawn.
12
+ */
13
+ phase?: number;
14
+ /** The SVG's width; from the height and the drawing's shape when not given. */
15
+ width?: string | number;
16
+ /** The SVG's height; from the width and the drawing's shape when not given. */
17
+ height?: string | number;
18
+ /**
19
+ * The hemisphere it is seen from, which turns the Moon as it looks from
20
+ * there: `north` by default.
21
+ */
22
+ hemisphere?: "north" | "south";
23
+ }
24
+ /**
25
+ * The Moon in a phase, lit in gold on its unlit disc with a soft glow,
26
+ * turned as it looks from either hemisphere: a phase you give, or a
27
+ * date's. It needs no browser, so it renders on the server; today's phase
28
+ * is a date the page knows. Its glow's id comes from `useId`, so several
29
+ * can share a page.
30
+ */
31
+ export declare function Moon({ date, phase, width, height, hemisphere, }: MoonProps): import("react").JSX.Element;
32
+ export default Moon;
@@ -0,0 +1,39 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ /*!
3
+ * The unlit disc's path is adapted from phase_junk() in moon-phase.js:
4
+ * https://github.com/tingletech/moon-phase/blob/643015a83509ca6a662d1af6e1ac14661852cedb/moon-phase.js
5
+ * Copyright (c) 2012, Regents of the University of California.
6
+ * All rights reserved. Used under the BSD 3-Clause License, whose
7
+ * conditions and disclaimer are in this package's LICENSE.txt; this file
8
+ * is under that licence as well as MIT.
9
+ */
10
+ import lune from "lune";
11
+ import { useId } from "react";
12
+ import { MOON_MEAN_INCLINATION, moonPath } from "./moonPath.js";
13
+ /** The middle of the drawing's viewBox (`0 0 170 162`), which it turns about. */
14
+ const CENTER = "85 81";
15
+ /** Whether `date` is a `Date` holding a time, not an invalid one. */
16
+ const validDate = (date) => date instanceof Date && Number.isFinite(date.getTime());
17
+ /**
18
+ * The Moon in a phase, lit in gold on its unlit disc with a soft glow,
19
+ * turned as it looks from either hemisphere: a phase you give, or a
20
+ * date's. It needs no browser, so it renders on the server; today's phase
21
+ * is a date the page knows. Its glow's id comes from `useId`, so several
22
+ * can share a page.
23
+ */
24
+ export function Moon({ date, phase, width, height, hemisphere = "north", }) {
25
+ // Its own glow filter, so that two moons on a page do not share an id.
26
+ const glow = `moon-glow-${useId().replace(/[^A-Za-z0-9_-]/g, "_")}`;
27
+ if (phase !== undefined && !(phase >= 0 && phase <= 1))
28
+ throw new RangeError(`Moon: phase ${phase} is not between 0 and 1`);
29
+ // lune never returns for an invalid date: its solution of Kepler's
30
+ // equation loops until it converges, and NaN never does.
31
+ if (phase === undefined && date !== undefined && !validDate(date))
32
+ throw new RangeError(`Moon: date is not a valid Date (${String(date)})`);
33
+ const drawn = phase ?? (date === undefined ? undefined : lune.phase(date).phase);
34
+ const inclination = hemisphere === "south"
35
+ ? 180 - MOON_MEAN_INCLINATION
36
+ : MOON_MEAN_INCLINATION;
37
+ return (_jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", version: "1.1", viewBox: "0 0 170 162", width: width, height: height, children: [_jsx("defs", { children: _jsxs("filter", { id: glow, children: [_jsx("feGaussianBlur", { stdDeviation: "5", result: "coloredBlur" }), _jsxs("feMerge", { children: [_jsx("feMergeNode", { in: "coloredBlur" }), _jsx("feMergeNode", { in: "SourceGraphic" })] })] }) }), _jsxs("g", { transform: `rotate(${inclination} ${CENTER})`, children: [_jsx("path", { className: "back", d: "m85,5 a20,20 0 1,1 0,150 a20,20 0 1,1 0,-150", style: { fill: "white", filter: `url(#${glow})` } }), _jsx("path", { className: "back", d: "m85,5 a20,20 0 1,1 0,150 a20,20 0 1,1 0,-150", style: { fill: "black" } }), drawn === undefined ? null : (_jsx("path", { className: "moon", d: moonPath(drawn), style: { fill: "#ebc815" } }))] })] }));
38
+ }
39
+ export default Moon;
@@ -0,0 +1,20 @@
1
+ /** Props of the Moon widget. */
2
+ export interface MoonWidgetProps {
3
+ /** Space around the drawing, inside the background, as CSS `padding`. */
4
+ padding?: string;
5
+ /**
6
+ * The viewer's latitude in degrees, south negative: south of the
7
+ * equator, the moon is drawn turned as it is seen from there.
8
+ */
9
+ latitude?: number;
10
+ /** The widget's background image, a URL, drawn to cover; none if omitted. */
11
+ background?: string;
12
+ }
13
+ /**
14
+ * Today's moon in a tile, with its phase's name: `Moon` drawn as it looks
15
+ * from the viewer's hemisphere, as from the north unless `latitude` puts
16
+ * the viewer south of the equator. The phase is worked out in the
17
+ * browser, so the server's HTML draws the unlit disc.
18
+ */
19
+ export declare function MoonWidget({ padding, latitude, background, }: MoonWidgetProps): import("react").JSX.Element;
20
+ export default MoonWidget;
@@ -0,0 +1,63 @@
1
+ "use client";
2
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
+ import lune from "lune";
4
+ import { cssString } from "../cssString.js";
5
+ import useHydrated from "../hooks/useHydrated.js";
6
+ import { Moon } from "./Moon.js";
7
+ function moonPhaseName(phase) {
8
+ if (phase === 0.5)
9
+ return "full-moon";
10
+ if (phase > 0.5) {
11
+ if (phase === 0.75)
12
+ return "last-quarter";
13
+ if (phase > 0.75)
14
+ return "waning-crescent";
15
+ return "waning-gibbous";
16
+ }
17
+ else {
18
+ if (phase === 0)
19
+ return "new-moon";
20
+ if (phase === 0.25)
21
+ return "first-quarter";
22
+ if (phase > 0.25)
23
+ return "waxing-gibbous";
24
+ return "waxing-crescent";
25
+ }
26
+ }
27
+ const namesLocal = {
28
+ en: {
29
+ "new-moon": "New Moon",
30
+ "waxing-crescent": "Waxing Crescent",
31
+ "first-quarter": "First Quarter",
32
+ "waxing-gibbous": "Waxing Gibbous",
33
+ "full-moon": "Full Moon",
34
+ "waning-gibbous": "Waning Gibbous",
35
+ "last-quarter": "Last Quarter",
36
+ "waning-crescent": "Waning Crescent",
37
+ },
38
+ };
39
+ // magick.ly passes the reader's place as `latitude` (plan 072).
40
+ /**
41
+ * Today's moon in a tile, with its phase's name: `Moon` drawn as it looks
42
+ * from the viewer's hemisphere, as from the north unless `latitude` puts
43
+ * the viewer south of the equator. The phase is worked out in the
44
+ * browser, so the server's HTML draws the unlit disc.
45
+ */
46
+ export function MoonWidget({ padding = "10px 0 2px 0", latitude, background, }) {
47
+ // Pages with this widget are prerendered at build time, so the server can't
48
+ // know today's phase. Hydrate with the unlit disc, then draw the phase.
49
+ const hydrated = useHydrated();
50
+ const phaseValue = hydrated ? lune.phase(new Date()).phase : undefined;
51
+ const phaseNameLocal = phaseValue === undefined
52
+ ? "\u00a0" // keeps the label's line height
53
+ : namesLocal.en[moonPhaseName(phaseValue)];
54
+ // Northern (and the equator) unless the place is known to be south.
55
+ const northernHemisphere = latitude === undefined || latitude >= 0;
56
+ return (_jsxs("div", { style: {
57
+ textAlign: "center",
58
+ background: background ? `url(${cssString(background)})` : undefined,
59
+ backgroundSize: "cover",
60
+ height: "100%",
61
+ }, children: [_jsx("div", { style: { padding: padding }, children: _jsx(Moon, { phase: phaseValue, height: "85", hemisphere: northernHemisphere ? "north" : "south" }) }), _jsx("div", { style: { color: "#cc5" }, children: phaseNameLocal })] }));
62
+ }
63
+ export default MoonWidget;
@@ -0,0 +1,103 @@
1
+ import type { CSSProperties } from "react";
2
+ /**
3
+ * The geomantic sigils of the seven planetary spirits, whom geomancy calls
4
+ * the Rulers of the figures: Zazel (Saturn), Hismael (Jupiter), Bartzabel
5
+ * (Mars), Sorath (the Sun), Kedemel (Venus), Taphthartharath (Mercury) and
6
+ * Chasmodai (the Moon). They are not the spirits' seals that Agrippa prints
7
+ * with the planets' tables (*De occulta philosophia*, 1533, II.22), which
8
+ * are other figures.
9
+ *
10
+ * Drawn after the earliest printing found of them, John Heydon,
11
+ * *Theomagia, or The Temple of Wisdome*, vol. 1 (London, 1663/4), book I,
12
+ * chapter 5, the table of the figures' Rulers and Genii; the Getty Research
13
+ * Institute's copy on archive.org, `theomagiaortempl00heyd`: p. 13 (leaf
14
+ * n124) and p. 15 (n126). Book I, chapter 13, p. 46 (n157) prints them
15
+ * again, with Mercury's, the Sun's and Venus' in other forms; the Golden
16
+ * Dawn's later forms descend from those of pp. 13 and 15. Each sigil
17
+ * below names the figure it follows.
18
+ *
19
+ * Our own drawing, not a tracing: each is a few hand-placed strokes of one
20
+ * width on a grid of 100 laid over the printed figure, with round ends. The
21
+ * viewBox is the stroke's extent, plus a unit. Copyright Gadi Cohen, MIT
22
+ * like the rest of the package.
23
+ */
24
+ declare const SIGILS: {
25
+ /** Mars: a tail ending in a spiral; Heydon, p. 13 (n124), first row. */
26
+ readonly bartzabel: {
27
+ readonly viewBox: "16 33 67 39";
28
+ readonly d: string;
29
+ };
30
+ /** Venus: a heart whose lobes curl in; p. 13 (n124), fourth row. */
31
+ readonly kedemel: {
32
+ readonly viewBox: "24 25 54 55";
33
+ readonly d: string;
34
+ };
35
+ /** Mercury: a bar and an upright over a cross; p. 13 (n124), second row. */
36
+ readonly taphthartharath: {
37
+ readonly viewBox: "17 19 68 61";
38
+ readonly d: "M23 24V38M23 31H62V75M22 45V59M22 52H80M80 42V56M57 75H68";
39
+ };
40
+ /** The Moon: like a 5; p. 13 (n124), third row. */
41
+ readonly chasmodai: {
42
+ readonly viewBox: "23 20 56 63";
43
+ readonly d: "M74 25L32 40C42 43 52 50 56 58C58 66 54 74 45 77C38 79 32 78 28 76";
44
+ };
45
+ /**
46
+ * The Sun: an upright with a foot, crossed by a bar that curls back on
47
+ * the left and runs into a long stroke on the right; p. 13 (n124), fifth
48
+ * row, and p. 15 (n126).
49
+ */
50
+ readonly sorath: {
51
+ readonly viewBox: "23 17 68 65";
52
+ readonly d: string;
53
+ };
54
+ /** Jupiter: two strokes meeting in a point; p. 15 (n126), first row. */
55
+ readonly hismael: {
56
+ readonly viewBox: "19 20 63 56";
57
+ readonly d: "M24 35C38 48 54 60 77 71M49 25L70 69";
58
+ };
59
+ /**
60
+ * Saturn: a half-moon with a dot, its straight side up to the right;
61
+ * p. 15 (n126), fourth row. The dot is a stroke one unit long, which
62
+ * its round ends make a dot, so the sigil is one stroke in one colour (a
63
+ * tiny stroked circle would do, but some renderers leave its centre
64
+ * open).
65
+ */
66
+ readonly zazel: {
67
+ readonly viewBox: "25 17 56 59";
68
+ readonly d: string;
69
+ };
70
+ };
71
+ /** A planetary spirit with a sigil: `bartzabel`, `kedemel`, … */
72
+ export type PlanetarySpiritId = keyof typeof SIGILS;
73
+ /** Every spirit with a sigil. */
74
+ export declare const PLANETARY_SPIRIT_IDS: PlanetarySpiritId[];
75
+ /** Whether `id` names a spirit this module draws. */
76
+ export declare const isPlanetarySpiritId: (id: string) => id is PlanetarySpiritId;
77
+ /** Props of `PlanetarySpirit`. */
78
+ export interface PlanetarySpiritProps {
79
+ /**
80
+ * The spirit (its figures' Ruler), by its `PlanetarySpiritId`, in lower
81
+ * case; none, or an id with no sigil, draws nothing.
82
+ */
83
+ spirit?: string;
84
+ /** The box's class. */
85
+ className?: string;
86
+ /** The box's style, over its own `display: flex` and centring. */
87
+ style?: CSSProperties;
88
+ /**
89
+ * The sigil's stroke, a CSS colour such as a theme's custom property
90
+ * (`var(--my-ink, black)`); black by default. It is set as the path's
91
+ * style, over its `stroke="#000"` attribute.
92
+ * @default "#000"
93
+ */
94
+ ink?: string;
95
+ /** Hides the sigil from assistive technology when the text names it. */
96
+ "aria-hidden"?: boolean;
97
+ }
98
+ /**
99
+ * A planetary spirit's geomantic sigil, centred in a flex box as tall as its
100
+ * container allows.
101
+ */
102
+ export declare function PlanetarySpirit({ spirit, className, style, ink, "aria-hidden": ariaHidden, }: PlanetarySpiritProps): import("react").JSX.Element | null;
103
+ export default PlanetarySpirit;
@@ -0,0 +1,102 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ /**
3
+ * The geomantic sigils of the seven planetary spirits, whom geomancy calls
4
+ * the Rulers of the figures: Zazel (Saturn), Hismael (Jupiter), Bartzabel
5
+ * (Mars), Sorath (the Sun), Kedemel (Venus), Taphthartharath (Mercury) and
6
+ * Chasmodai (the Moon). They are not the spirits' seals that Agrippa prints
7
+ * with the planets' tables (*De occulta philosophia*, 1533, II.22), which
8
+ * are other figures.
9
+ *
10
+ * Drawn after the earliest printing found of them, John Heydon,
11
+ * *Theomagia, or The Temple of Wisdome*, vol. 1 (London, 1663/4), book I,
12
+ * chapter 5, the table of the figures' Rulers and Genii; the Getty Research
13
+ * Institute's copy on archive.org, `theomagiaortempl00heyd`: p. 13 (leaf
14
+ * n124) and p. 15 (n126). Book I, chapter 13, p. 46 (n157) prints them
15
+ * again, with Mercury's, the Sun's and Venus' in other forms; the Golden
16
+ * Dawn's later forms descend from those of pp. 13 and 15. Each sigil
17
+ * below names the figure it follows.
18
+ *
19
+ * Our own drawing, not a tracing: each is a few hand-placed strokes of one
20
+ * width on a grid of 100 laid over the printed figure, with round ends. The
21
+ * viewBox is the stroke's extent, plus a unit. Copyright Gadi Cohen, MIT
22
+ * like the rest of the package.
23
+ */
24
+ const SIGILS = {
25
+ /** Mars: a tail ending in a spiral; Heydon, p. 13 (n124), first row. */
26
+ bartzabel: {
27
+ viewBox: "16 33 67 39",
28
+ d: "M27 64C22 64 20 60 21 55C22 50 28 49 34 50C42 51 46 56 51 61" +
29
+ "C55 65 60 67 66 67C74 67 79 60 78 51C77 43 71 38 65 38" +
30
+ "C60 38 57 43 58 48C59 53 63 55 66 54",
31
+ },
32
+ /** Venus: a heart whose lobes curl in; p. 13 (n124), fourth row. */
33
+ kedemel: {
34
+ viewBox: "24 25 54 55",
35
+ d: "M55 44C51 39 53 31 58 30C64 29 67 35 69 43C70 52 72 64 73 75" +
36
+ "C62 72 47 66 38 58C31 52 29 45 29 39C29 33 33 30 38 30" +
37
+ "C43 31 46 36 48 43",
38
+ },
39
+ /** Mercury: a bar and an upright over a cross; p. 13 (n124), second row. */
40
+ taphthartharath: {
41
+ viewBox: "17 19 68 61",
42
+ d: "M23 24V38M23 31H62V75M22 45V59M22 52H80M80 42V56M57 75H68",
43
+ },
44
+ /** The Moon: like a 5; p. 13 (n124), third row. */
45
+ chasmodai: {
46
+ viewBox: "23 20 56 63",
47
+ d: "M74 25L32 40C42 43 52 50 56 58C58 66 54 74 45 77C38 79 32 78 28 76",
48
+ },
49
+ /**
50
+ * The Sun: an upright with a foot, crossed by a bar that curls back on
51
+ * the left and runs into a long stroke on the right; p. 13 (n124), fifth
52
+ * row, and p. 15 (n126).
53
+ */
54
+ sorath: {
55
+ viewBox: "23 17 68 65",
56
+ d: "M57 22H65M59 22L61 68H53" +
57
+ "M43 55C38 60 29 57 28 49C27 42 35 39 42 41C50 43 55 46 62 46" +
58
+ "C70 46 77 44 81 38M84 26C82 38 85 50 86 62C87 72 83 77 76 77",
59
+ },
60
+ /** Jupiter: two strokes meeting in a point; p. 15 (n126), first row. */
61
+ hismael: {
62
+ viewBox: "19 20 63 56",
63
+ d: "M24 35C38 48 54 60 77 71M49 25L70 69",
64
+ },
65
+ /**
66
+ * Saturn: a half-moon with a dot, its straight side up to the right;
67
+ * p. 15 (n126), fourth row. The dot is a stroke one unit long, which
68
+ * its round ends make a dot, so the sigil is one stroke in one colour (a
69
+ * tiny stroked circle would do, but some renderers leave its centre
70
+ * open).
71
+ */
72
+ zazel: {
73
+ viewBox: "25 17 56 59",
74
+ d: "M41 22C32 31 28 46 30 58C32 67 40 71 50 71C60 71 70 69 76 64Z" +
75
+ "M43.5 51H44.5",
76
+ },
77
+ };
78
+ /** The sigils' stroke, in units of the grid of 100 they are drawn on. */
79
+ const STROKE_WIDTH = 7;
80
+ /** Every spirit with a sigil. */
81
+ export const PLANETARY_SPIRIT_IDS = Object.keys(SIGILS);
82
+ /** Whether `id` names a spirit this module draws. */
83
+ export const isPlanetarySpiritId = (id) => Object.hasOwn(SIGILS, id);
84
+ function Sigil({ spirit, ink, ...props }) {
85
+ const { viewBox, d } = SIGILS[spirit];
86
+ return (_jsx("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: viewBox, ...props, children: _jsx("path", { d: d, fill: "none", stroke: "#000", style: ink === undefined ? undefined : { stroke: ink }, strokeWidth: STROKE_WIDTH, strokeLinecap: "round", strokeLinejoin: "round" }) }));
87
+ }
88
+ /**
89
+ * A planetary spirit's geomantic sigil, centred in a flex box as tall as its
90
+ * container allows.
91
+ */
92
+ export function PlanetarySpirit({ spirit, className, style, ink, "aria-hidden": ariaHidden, }) {
93
+ if (spirit === undefined || !isPlanetarySpiritId(spirit))
94
+ return null;
95
+ return (_jsx("div", { "aria-hidden": ariaHidden, className: className, style: {
96
+ display: "flex",
97
+ alignContent: "center",
98
+ justifyContent: "center",
99
+ ...style,
100
+ }, children: _jsx(Sigil, { spirit: spirit, ink: ink, height: "100%" }) }));
101
+ }
102
+ export default PlanetarySpirit;