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.
- package/LICENSE.txt +89 -0
- package/README.md +353 -2
- package/fonts/FrankRuhlLibre-Bold-letters.woff2 +0 -0
- package/fonts/FrankRuhlLibre-OFL.txt +105 -0
- package/fonts/NotoSerif-BoldItalic-compass.woff2 +0 -0
- package/fonts/NotoSerif-Italic-latin1.woff2 +0 -0
- package/fonts/NotoSerif-OFL.txt +93 -0
- package/fonts/SOURCES.md +35 -0
- package/fonts/gd-hall.css +3 -0
- package/lib/astrology/Kamea.d.ts +75 -0
- package/lib/astrology/Kamea.js +73 -0
- package/lib/astrology/MercuryWidget.d.ts +21 -0
- package/lib/astrology/MercuryWidget.js +80 -0
- package/lib/astrology/Moon.d.ts +32 -0
- package/lib/astrology/Moon.js +39 -0
- package/lib/astrology/MoonWidget.d.ts +20 -0
- package/lib/astrology/MoonWidget.js +63 -0
- package/lib/astrology/PlanetarySpirit.d.ts +103 -0
- package/lib/astrology/PlanetarySpirit.js +102 -0
- package/lib/astrology/mercuryRetrograde.d.ts +20 -0
- package/lib/astrology/mercuryRetrograde.js +80 -0
- package/lib/astrology/moonPath.d.ts +20 -0
- package/lib/astrology/moonPath.js +45 -0
- package/lib/chakras/Chakras.d.ts +34 -0
- package/lib/chakras/Chakras.js +149 -0
- package/lib/cssString.d.ts +5 -0
- package/lib/cssString.js +7 -0
- package/lib/drawingVersions.d.ts +29 -0
- package/lib/drawingVersions.js +15 -0
- package/lib/enochian/Tablet.d.ts +17 -0
- package/lib/enochian/Tablet.js +24 -0
- package/lib/enochian/tabletSigils.d.ts +46 -0
- package/lib/enochian/tabletSigils.js +172 -0
- package/lib/enochian/tabletSvg.d.ts +85 -0
- package/lib/enochian/tabletSvg.js +278 -0
- package/lib/gd/FylfotCross.d.ts +60 -0
- package/lib/gd/FylfotCross.js +121 -0
- package/lib/gd/GradeTree.d.ts +10 -0
- package/lib/gd/GradeTree.js +21 -0
- package/lib/gd/Lamen.d.ts +31 -0
- package/lib/gd/Lamen.js +317 -0
- package/lib/gd/RoseSigil.d.ts +31 -0
- package/lib/gd/RoseSigil.js +49 -0
- package/lib/gd/RoseSigilImage.d.ts +38 -0
- package/lib/gd/RoseSigilImage.js +29 -0
- package/lib/gd/SevenBranchedCandlestick.d.ts +54 -0
- package/lib/gd/SevenBranchedCandlestick.js +269 -0
- package/lib/gd/TableOfShewbread.d.ts +19 -0
- package/lib/gd/TableOfShewbread.js +120 -0
- package/lib/gd/hall/GdHall.d.ts +94 -0
- package/lib/gd/hall/GdHall.js +147 -0
- package/lib/gd/hall/art/altar.d.ts +8 -0
- package/lib/gd/hall/art/altar.js +21 -0
- package/lib/gd/hall/art/altarItems.d.ts +20 -0
- package/lib/gd/hall/art/altarItems.js +113 -0
- package/lib/gd/hall/art/banner.d.ts +23 -0
- package/lib/gd/hall/art/banner.js +64 -0
- package/lib/gd/hall/art/board.d.ts +9 -0
- package/lib/gd/hall/art/board.js +49 -0
- package/lib/gd/hall/art/cards.d.ts +11 -0
- package/lib/gd/hall/art/cards.js +124 -0
- package/lib/gd/hall/art/furnishings.d.ts +12 -0
- package/lib/gd/hall/art/furnishings.js +36 -0
- package/lib/gd/hall/art/geometry.d.ts +49 -0
- package/lib/gd/hall/art/geometry.js +97 -0
- package/lib/gd/hall/art/hebrewLetter.d.ts +10 -0
- package/lib/gd/hall/art/hebrewLetter.js +38 -0
- package/lib/gd/hall/art/index.d.ts +7 -0
- package/lib/gd/hall/art/index.js +61 -0
- package/lib/gd/hall/art/items.d.ts +12 -0
- package/lib/gd/hall/art/items.js +125 -0
- package/lib/gd/hall/art/kamea.d.ts +20 -0
- package/lib/gd/hall/art/kamea.js +64 -0
- package/lib/gd/hall/art/lamen.d.ts +9 -0
- package/lib/gd/hall/art/lamen.js +52 -0
- package/lib/gd/hall/art/lightning.d.ts +13 -0
- package/lib/gd/hall/art/lightning.js +44 -0
- package/lib/gd/hall/art/lights.d.ts +13 -0
- package/lib/gd/hall/art/lights.js +64 -0
- package/lib/gd/hall/art/marker.d.ts +8 -0
- package/lib/gd/hall/art/marker.js +19 -0
- package/lib/gd/hall/art/pantacle.d.ts +10 -0
- package/lib/gd/hall/art/pantacle.js +119 -0
- package/lib/gd/hall/art/pillar.d.ts +4 -0
- package/lib/gd/hall/art/pillar.js +25 -0
- package/lib/gd/hall/art/placeholder.d.ts +8 -0
- package/lib/gd/hall/art/placeholder.js +18 -0
- package/lib/gd/hall/art/platform.d.ts +13 -0
- package/lib/gd/hall/art/platform.js +28 -0
- package/lib/gd/hall/art/seals.d.ts +23 -0
- package/lib/gd/hall/art/seals.js +151 -0
- package/lib/gd/hall/art/shared.d.ts +87 -0
- package/lib/gd/hall/art/shared.js +95 -0
- package/lib/gd/hall/art/symbols.d.ts +37 -0
- package/lib/gd/hall/art/symbols.js +134 -0
- package/lib/gd/hall/art/tarotKey.d.ts +34 -0
- package/lib/gd/hall/art/tarotKey.js +101 -0
- package/lib/gd/hall/art/veil.d.ts +8 -0
- package/lib/gd/hall/art/veil.js +22 -0
- package/lib/gd/hall/art/vessels.d.ts +19 -0
- package/lib/gd/hall/art/vessels.js +74 -0
- package/lib/gd/hall/aspect.d.ts +31 -0
- package/lib/gd/hall/aspect.js +161 -0
- package/lib/gd/hall/attributes.d.ts +52 -0
- package/lib/gd/hall/attributes.js +116 -0
- package/lib/gd/hall/describe.d.ts +38 -0
- package/lib/gd/hall/describe.js +184 -0
- package/lib/gd/hall/dimensions.d.ts +39 -0
- package/lib/gd/hall/dimensions.js +49 -0
- package/lib/gd/hall/editor.d.ts +13 -0
- package/lib/gd/hall/editor.js +13 -0
- package/lib/gd/hall/fontMetrics.json +177 -0
- package/lib/gd/hall/fonts.d.ts +45 -0
- package/lib/gd/hall/fonts.js +73 -0
- package/lib/gd/hall/hebrewLetters.d.ts +8 -0
- package/lib/gd/hall/hebrewLetters.js +40 -0
- package/lib/gd/hall/index.d.ts +19 -0
- package/lib/gd/hall/index.js +17 -0
- package/lib/gd/hall/labels.d.ts +72 -0
- package/lib/gd/hall/labels.js +109 -0
- package/lib/gd/hall/layout.d.ts +213 -0
- package/lib/gd/hall/layout.js +837 -0
- package/lib/gd/hall/planets.d.ts +13 -0
- package/lib/gd/hall/planets.js +35 -0
- package/lib/gd/hall/presets/index.d.ts +13 -0
- package/lib/gd/hall/presets/index.js +29 -0
- package/lib/gd/hall/presets/neophyte.d.ts +7 -0
- package/lib/gd/hall/presets/neophyte.js +74 -0
- package/lib/gd/hall/presets/philosophus.d.ts +30 -0
- package/lib/gd/hall/presets/philosophus.js +244 -0
- package/lib/gd/hall/presets/portal.d.ts +24 -0
- package/lib/gd/hall/presets/portal.js +241 -0
- package/lib/gd/hall/presets/practicus.d.ts +17 -0
- package/lib/gd/hall/presets/practicus.js +181 -0
- package/lib/gd/hall/presets/theoricus.d.ts +13 -0
- package/lib/gd/hall/presets/theoricus.js +178 -0
- package/lib/gd/hall/presets/types.d.ts +72 -0
- package/lib/gd/hall/presets/types.js +58 -0
- package/lib/gd/hall/presets/zelator.d.ts +12 -0
- package/lib/gd/hall/presets/zelator.js +161 -0
- package/lib/gd/hall/spec.d.ts +54 -0
- package/lib/gd/hall/spec.js +108 -0
- package/lib/gd/hall/types.d.ts +131 -0
- package/lib/gd/hall/types.js +1 -0
- package/lib/gd/hall/validate.d.ts +13 -0
- package/lib/gd/hall/validate.js +285 -0
- package/lib/gd/hall/vocabulary.d.ts +139 -0
- package/lib/gd/hall/vocabulary.js +435 -0
- package/lib/gd/lamenGlyphs.d.ts +16 -0
- package/lib/gd/lamenGlyphs.js +167 -0
- package/lib/gd/lamenGrades.d.ts +29 -0
- package/lib/gd/lamenGrades.js +36 -0
- package/lib/gd/roseSigilGeometry.d.ts +10 -0
- package/lib/gd/roseSigilGeometry.js +10 -0
- package/lib/gd/roseSigilInternals.d.ts +85 -0
- package/lib/gd/roseSigilInternals.js +343 -0
- package/lib/gd/roseSigilOptimizer.d.ts +15 -0
- package/lib/gd/roseSigilOptimizer.js +59 -0
- package/lib/gd/roseSigilVersions.d.ts +12 -0
- package/lib/gd/roseSigilVersions.js +57 -0
- package/lib/hooks/useHydrated.d.ts +9 -0
- package/lib/hooks/useHydrated.js +13 -0
- package/lib/kabbalah/TreeOfLife.d.ts +135 -0
- package/lib/kabbalah/TreeOfLife.js +312 -0
- package/lib/kabbalah/fieldPath.d.ts +25 -0
- package/lib/kabbalah/fieldPath.js +100 -0
- package/lib/kabbalah/treeLabels.d.ts +30 -0
- package/lib/kabbalah/treeLabels.js +32 -0
- package/lib/kabbalah/treeOfLifeFigure.d.ts +59 -0
- package/lib/kabbalah/treeOfLifeFigure.js +151 -0
- package/lib/svgCoordinate.d.ts +12 -0
- package/lib/svgCoordinate.js +16 -0
- package/package.json +162 -3
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
/*
|
|
3
|
+
* The Watchtowers' sigils as `Tablet` draws them, and the versions'
|
|
4
|
+
* names. Internal to the package: `Tablet` is the entry; the tests read
|
|
5
|
+
* these to check the drawings.
|
|
6
|
+
*/
|
|
7
|
+
function EarthSigil() {
|
|
8
|
+
return (_jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "-100 -100 200 200", children: [_jsx("circle", { cx: 0, cy: 0, r: 92, fill: "none", stroke: "black", strokeWidth: 15 }), _jsx("path", { d: "M -10 -10 v -45 " +
|
|
9
|
+
"c 0 -10, -10 -10, -20 -10" +
|
|
10
|
+
"v -8 h 60 v 8" +
|
|
11
|
+
"c -10 0, -20 0, -20 10" +
|
|
12
|
+
"v 45 h -20", fill: "#c3b030", stroke: "black" }), _jsx("path", { d: "M -10 -10 v -45 " +
|
|
13
|
+
"c 0 -10, -10 -10, -20 -10" +
|
|
14
|
+
"v -8 h 60 v 8" +
|
|
15
|
+
"c -10 0, -20 0, -20 10" +
|
|
16
|
+
"v 45 h -20", fill: "#626e30", stroke: "black", transform: "rotate(90)" }), _jsx("path", { d: "M -10 -10 v -45 " +
|
|
17
|
+
"c 0 -10, -10 -10, -20 -10" +
|
|
18
|
+
"v -8 h 60 v 8" +
|
|
19
|
+
"c -10 0, -20 0, -20 10" +
|
|
20
|
+
"v 45 h -20", fill: "black", stroke: "black", transform: "rotate(180)" }), _jsx("path", { d: "M -10 -10 v -45 " +
|
|
21
|
+
"c 0 -10, -10 -10, -20 -10" +
|
|
22
|
+
"v -8 h 60 v 8" +
|
|
23
|
+
"c -10 0, -20 0, -20 10" +
|
|
24
|
+
"v 45 h -20", fill: "#993621", stroke: "black", transform: "rotate(270)" })] }));
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* The Air sigil's Tau, on a grid of 100: a flat-topped crossbar whose
|
|
28
|
+
* underside arches up to the stem and whose ends taper down and out, a thin
|
|
29
|
+
* stem, and a foot flaring to a triangle. Drawn by hand after the Equinox's
|
|
30
|
+
* Plate X (see `EquinoxSigils`), symmetric about x = 51.
|
|
31
|
+
*/
|
|
32
|
+
const AIR_TAU = "M25 21.5H77L84 33.5C74 27 62.5 24.5 52.2 24.5V76" +
|
|
33
|
+
"C53 79.5 56 83 58.5 85.5H43.5C46 83 49 79.5 49.8 76" +
|
|
34
|
+
"V24.5C39.5 24.5 28 27 18 33.5Z";
|
|
35
|
+
/**
|
|
36
|
+
* One of the four Yods over the Tau, drawn as a small flame, as it
|
|
37
|
+
* stands on the page (no rotation), about its centre: the point at the top
|
|
38
|
+
* flicks over to the right and drops into a shallow hollow, the right side
|
|
39
|
+
* swells out and runs down nearly straight to a second point at the
|
|
40
|
+
* bottom, as sharp as the top's, and the left side runs down from the top
|
|
41
|
+
* in a full, convex curve, widest a little above halfway, then turns into
|
|
42
|
+
* a shallow hollow above the bottom point, so the outline has a gentle S
|
|
43
|
+
* along its length. About 1.8 times as long as it is wide. Cubic segments
|
|
44
|
+
* placed by eye against an enlarged crop of the Equinox's Plate X (see
|
|
45
|
+
* `EquinoxSigils`) and checked against the width of its marks at a few
|
|
46
|
+
* heights, not traced, and not any font's yod. Regardie's own drawing
|
|
47
|
+
* (The Golden Dawn, vol. 4, 1940) gives the flames wavy strokes instead;
|
|
48
|
+
* both versions here keep the plate's form.
|
|
49
|
+
*/
|
|
50
|
+
const AIR_YOD = "M-1.3 -5.5C-0.8 -4.6 -0.8 -3.2 0.3 -2.4C1.6 -1.5 3.4 -0.8 3.6 1.4" +
|
|
51
|
+
"C3.8 2.8 3.6 4.4 2.8 5.5" +
|
|
52
|
+
"C1.9 4.9 0.6 4 -0.6 3.5C-1.9 2.9 -3.6 1.6 -3.7 -0.3" +
|
|
53
|
+
"C-3.75 -2.3 -2.9 -4.2 -1.3 -5.5Z";
|
|
54
|
+
/**
|
|
55
|
+
* The Yods' centres along the grid's x, a little over the crossbar, about
|
|
56
|
+
* 0.185 of its width apart. Each Yod is about 0.17 of the crossbar's width
|
|
57
|
+
* long and leans about 34 degrees from vertical, top to the left (the
|
|
58
|
+
* plate's lean about 35), centred over the stem.
|
|
59
|
+
*/
|
|
60
|
+
const AIR_YOD_XS = [33.2, 45.4, 57.6, 69.8];
|
|
61
|
+
/**
|
|
62
|
+
* Air: a Tau with four Yods above it, drawn as small flames, yellow on
|
|
63
|
+
* mauve within a yellow ring; `plain`, in black alone, as the Equinox's
|
|
64
|
+
* Plate X prints it. The Golden Dawn calls the marks Yods (Regardie, The
|
|
65
|
+
* Golden Dawn, vol. 4, 1940, p. 307), and Regardie says the sigils are
|
|
66
|
+
* taken from Dee's Sigillum Dei Aemeth (p. 308). The T at the top of the
|
|
67
|
+
* Sigillum's outer ring has a 4 written over it (Sloane MS 3188; The
|
|
68
|
+
* Equinox I(7), 1912, Plate II, archive.org `crowley-equinox_202110`,
|
|
69
|
+
* "The Equinox Vol. 1, No. 7", leaf n238), so the four Yods likely stand
|
|
70
|
+
* for that 4: that is our inference, which no source states. Book T calls
|
|
71
|
+
* flames Yods (the Ace of Wands, The Equinox I(8), 1912, p. 153, "The
|
|
72
|
+
* Equinox Vol. 1, No. 8", leaf n183), hence Yods drawn as flames. Our own
|
|
73
|
+
* drawing after Plate X, constructed in code.
|
|
74
|
+
*/
|
|
75
|
+
function AirSigil({ plain = false }) {
|
|
76
|
+
return (_jsx("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "-100 -100 200 200", children: _jsxs("g", { stroke: "#000", children: [!plain && _jsx("circle", { r: 98, fill: "#ff0", strokeWidth: 2.5 }), !plain && _jsx("circle", { r: 80, fill: "#774060", strokeWidth: 2 }), _jsxs("g", { fill: plain ? "#000" : "#ff0", strokeWidth: 0.6, strokeLinejoin: "round", transform: "scale(1.6) translate(-51 -45.5)", children: [_jsx("path", { d: AIR_TAU }), AIR_YOD_XS.map((x) => (_jsx("path", { d: AIR_YOD, transform: `translate(${x} 11)` }, x)))] })] }) }));
|
|
77
|
+
}
|
|
78
|
+
/** One arm of the Water sigil's cross potent, pointing up from the centre. */
|
|
79
|
+
const POTENT_ARM = "M -4 -4 V -54 Q -4 -60 -16 -62 V -69 H 16 V -62 Q 4 -60 4 -54 V -4 Z";
|
|
80
|
+
/** The figures in the cross's angles, as strokes around (0, 0). */
|
|
81
|
+
const ANGLE_FIGURES = {
|
|
82
|
+
b: "M -7 -17 V 13 M -7 4 a 9 9 0 1 1 0 0.1",
|
|
83
|
+
"6": "M 8 -16 Q -9 -14 -9 5 M -9 5 a 9 9 0 1 0 0 -0.1",
|
|
84
|
+
"4": "M 4 15 V -16 L -11 6 H 10",
|
|
85
|
+
};
|
|
86
|
+
/**
|
|
87
|
+
* Water: a cross potent with b, 6, 4 and b in its angles, in blue on
|
|
88
|
+
* orange within a blue ring: Regardie, The Golden Dawn, vol. 4 (1940),
|
|
89
|
+
* p.307. Drawn here from that description. `plain`: in black alone, the
|
|
90
|
+
* figures 4 and b over b and 6, as the Equinox's Plate X prints it.
|
|
91
|
+
*/
|
|
92
|
+
function WaterSigil({ plain = false }) {
|
|
93
|
+
const blue = plain ? "#000" : "#2255cc";
|
|
94
|
+
const figures = plain
|
|
95
|
+
? [
|
|
96
|
+
["4", -33, -33],
|
|
97
|
+
["b", 33, -33],
|
|
98
|
+
["b", -33, 33],
|
|
99
|
+
["6", 33, 33],
|
|
100
|
+
]
|
|
101
|
+
: [
|
|
102
|
+
["b", -33, -33],
|
|
103
|
+
["6", 33, -33],
|
|
104
|
+
["4", -33, 33],
|
|
105
|
+
["b", 33, 33],
|
|
106
|
+
];
|
|
107
|
+
return (_jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "-100 -100 200 200", children: [!plain && _jsx("circle", { r: 92, fill: "#f80", stroke: blue, strokeWidth: 15 }), _jsx(CrossPotent, { fill: blue }), _jsx("g", { fill: "none", stroke: blue, strokeWidth: 5, strokeLinecap: "round", strokeLinejoin: "round", children: figures.map(([figure, x, y]) => (_jsx("path", { d: ANGLE_FIGURES[figure], transform: `translate(${x} ${y})` }, `${x},${y}`))) })] }));
|
|
108
|
+
}
|
|
109
|
+
/** A cross potent: four arms, each flared at its end. */
|
|
110
|
+
function CrossPotent({ fill }) {
|
|
111
|
+
return (_jsx("g", { fill: fill, children: [0, 90, 180, 270].map((angle) => (_jsx("path", { d: POTENT_ARM, transform: `rotate(${angle})` }, angle))) }));
|
|
112
|
+
}
|
|
113
|
+
/** Earth as the Equinox's Plate X prints it: a cross potent, in black. */
|
|
114
|
+
function PlainEarthSigil() {
|
|
115
|
+
return (_jsx("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "-100 -100 200 200", children: _jsx(CrossPotent, { fill: "#000" }) }));
|
|
116
|
+
}
|
|
117
|
+
/** One of the Fire sigil's twelve rays, a flame rising from the centre. */
|
|
118
|
+
const FLAME = "M 0 -36 c -8 -6 8 -12 0 -18 s 8 -12 0 -17";
|
|
119
|
+
/** The twelve rays' angles, every 30°. */
|
|
120
|
+
const FLAME_ANGLES = Array.from({ length: 12 }, (_, ray) => ray * 30);
|
|
121
|
+
/**
|
|
122
|
+
* Fire: a circle with twelve rays, alternately mauve and yellow, about a
|
|
123
|
+
* red centre and ring, on green within a red ring: Regardie, The Golden
|
|
124
|
+
* Dawn, vol. 4 (1940), p.307. Drawn here from that description.
|
|
125
|
+
*/
|
|
126
|
+
function FireSigil() {
|
|
127
|
+
const red = "#e22";
|
|
128
|
+
return (_jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "-100 -100 200 200", children: [_jsx("circle", { r: 92, fill: "#2b2", stroke: red, strokeWidth: 15 }), _jsx("circle", { r: 22, fill: "none", stroke: red, strokeWidth: 6 }), _jsx("circle", { r: 9, fill: red }), _jsx("g", { fill: "none", strokeWidth: 6, strokeLinecap: "round", children: FLAME_ANGLES.map((angle) => (_jsx("path", { d: FLAME, stroke: angle % 60 ? "#ff0" : "#a05090", transform: `rotate(${angle})` }, angle))) })] }));
|
|
129
|
+
}
|
|
130
|
+
/**
|
|
131
|
+
* Fire as the Equinox's Plate X prints it, in black: a small circle with
|
|
132
|
+
* twelve rays, straight and wavy by turns.
|
|
133
|
+
*/
|
|
134
|
+
function PlainFireSigil() {
|
|
135
|
+
return (_jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "-100 -100 200 200", children: [_jsx("circle", { r: 22, fill: "none", stroke: "#000", strokeWidth: 6 }), _jsx("g", { fill: "none", stroke: "#000", strokeWidth: 6, strokeLinecap: "round", children: FLAME_ANGLES.map((angle) => (_jsx("path", { d: angle % 60 ? FLAME : "M 0 -30 V -76", transform: `rotate(${angle})` }, angle))) })] }));
|
|
136
|
+
}
|
|
137
|
+
/** Regardie's sigils, which the Golden Dawn's version and his print draw. */
|
|
138
|
+
export const Sigils = {
|
|
139
|
+
earth: EarthSigil,
|
|
140
|
+
air: () => _jsx(AirSigil, {}),
|
|
141
|
+
water: () => _jsx(WaterSigil, {}),
|
|
142
|
+
fire: FireSigil,
|
|
143
|
+
};
|
|
144
|
+
/**
|
|
145
|
+
* The Equinox's sigils, from its Plate X, in black: *The Equinox* I(7)
|
|
146
|
+
* (1912), "Liber Chanokh", Plate X, one sigil in each corner (Air top
|
|
147
|
+
* left, Water top right, Earth bottom left, Fire bottom right); archive.org
|
|
148
|
+
* `crowley-equinox_202110`, the file "The Equinox Vol. 1, No. 7", leaf
|
|
149
|
+
* n256. These plain forms are our own drawings after that plate,
|
|
150
|
+
* constructed in code from lines, arcs and curves, with no font's outlines.
|
|
151
|
+
* Air's is a Tau with four Yods above it, drawn as small flames; we take
|
|
152
|
+
* the Yods to stand, likely, for the 4 over the T in Dee's Sigillum Dei
|
|
153
|
+
* Aemeth (Plate II, leaf n238), an inference no source states (see
|
|
154
|
+
* `AirSigil`).
|
|
155
|
+
* Of Regardie's coloured sigils (`Sigils`), only Air's form follows the
|
|
156
|
+
* plate: Water and Fire are drawn from Regardie's description of them (The
|
|
157
|
+
* Golden Dawn, vol. 4, 1940, p. 307), and Earth is a cross in four colours.
|
|
158
|
+
*/
|
|
159
|
+
export const EquinoxSigils = {
|
|
160
|
+
earth: PlainEarthSigil,
|
|
161
|
+
air: () => _jsx(AirSigil, { plain: true }),
|
|
162
|
+
water: () => _jsx(WaterSigil, { plain: true }),
|
|
163
|
+
fire: PlainFireSigil,
|
|
164
|
+
};
|
|
165
|
+
/** Each version as a drawing names it. */
|
|
166
|
+
export const VERSION_NAMES = {
|
|
167
|
+
gd: "the Golden Dawn's version",
|
|
168
|
+
regardie: "Regardie's print",
|
|
169
|
+
equinox: "the Equinox's version",
|
|
170
|
+
dee: "Dee's table of 1584",
|
|
171
|
+
raphael: "Raphael's table of 1587",
|
|
172
|
+
};
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import React, { type CSSProperties } from "react";
|
|
2
|
+
/** A tablet's page, as its `<svg>`'s viewBox: x, y, width, height. */
|
|
3
|
+
export type TabletViewBox = readonly [number, number, number, number];
|
|
4
|
+
/** A Watchtower's page: its sigil above its grid. */
|
|
5
|
+
export declare const WATCHTOWER_VIEWBOX: TabletViewBox;
|
|
6
|
+
/** The Tablet of Union's page: its grid of five by four with a margin. */
|
|
7
|
+
export declare const UNION_VIEWBOX: TabletViewBox;
|
|
8
|
+
/** The page a tablet draws on, by its key. */
|
|
9
|
+
export declare function tabletViewBox(id: string): TabletViewBox;
|
|
10
|
+
/** A square of a tablet's grid, by row and column from 0. */
|
|
11
|
+
export interface TabletSquare {
|
|
12
|
+
row: number;
|
|
13
|
+
column: number;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Squares to outline over a Watchtower's grid, one of them selected, and
|
|
17
|
+
* what a click on one does. The outlines are drawing only; a page that
|
|
18
|
+
* offers them gives keyboard and screen-reader users the same choice in a
|
|
19
|
+
* list.
|
|
20
|
+
*/
|
|
21
|
+
export interface TabletHighlights {
|
|
22
|
+
squares: readonly TabletSquare[];
|
|
23
|
+
selected?: TabletSquare;
|
|
24
|
+
onSelect?: (square: TabletSquare) => void;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* The name a tablet is announced by: "Enochian Watchtower of Fire", "Tablet
|
|
28
|
+
* of Union", or "Enochian tablet" for a key the data does not have; in a
|
|
29
|
+
* version other than the default, with the version's name ("Enochian
|
|
30
|
+
* Watchtower of Fire, Dee's table of 1584").
|
|
31
|
+
*/
|
|
32
|
+
export declare function tabletName(id: string, version?: string): string;
|
|
33
|
+
/** Props of `Tablet`. */
|
|
34
|
+
export interface TabletProps {
|
|
35
|
+
/**
|
|
36
|
+
* The tablet, by its key in magick-data: `earth`, `air`, `water`, `fire`
|
|
37
|
+
* or `union`.
|
|
38
|
+
*/
|
|
39
|
+
tablet: string;
|
|
40
|
+
/**
|
|
41
|
+
* One of the data's `TABLET_VERSIONS`; the Golden Dawn's (`gd`) when
|
|
42
|
+
* absent or unknown.
|
|
43
|
+
*/
|
|
44
|
+
version?: string;
|
|
45
|
+
/** Mirror the letters the version reverses (default true). */
|
|
46
|
+
mirrorReversed?: boolean;
|
|
47
|
+
/**
|
|
48
|
+
* Draw each square's second letters small in its corner (default
|
|
49
|
+
* false). Watchtowers only: no source gives the Tablet of Union a
|
|
50
|
+
* second letter, so its grid has none to draw.
|
|
51
|
+
*/
|
|
52
|
+
showSecondLetters?: boolean;
|
|
53
|
+
/** Squares of a Watchtower's grid to outline, and choose by pointer. */
|
|
54
|
+
highlights?: TabletHighlights;
|
|
55
|
+
/**
|
|
56
|
+
* The drawing's accessible name: the tablet's own (`tabletName`) when
|
|
57
|
+
* not given, this one when a string. `false` marks it decorative,
|
|
58
|
+
* hidden from assistive technology (`aria-hidden`).
|
|
59
|
+
*/
|
|
60
|
+
label?: string | false;
|
|
61
|
+
/** Page font style for the grid letters; omitted renders the Latin transliteration. */
|
|
62
|
+
enochianStyle?: CSSProperties;
|
|
63
|
+
/**
|
|
64
|
+
* Draws a CSS border around the page (default false). Leave it off
|
|
65
|
+
* where the SVG is exported or turned into an image, which CSS boxes do
|
|
66
|
+
* not reach.
|
|
67
|
+
*/
|
|
68
|
+
frame?: boolean;
|
|
69
|
+
/** The SVG's width; from the height and the page's shape when not given. */
|
|
70
|
+
width?: string | number;
|
|
71
|
+
/** The SVG's height; from the width and the page's shape when not given. */
|
|
72
|
+
height?: string | number;
|
|
73
|
+
/** The `<svg>`, for exporting the drawing. */
|
|
74
|
+
ref?: React.Ref<SVGSVGElement>;
|
|
75
|
+
}
|
|
76
|
+
/**
|
|
77
|
+
* `Tablet`'s drawing, its root's accessibility attributes the caller's:
|
|
78
|
+
* none for the hall's art, which draws a tablet inside an image that
|
|
79
|
+
* names itself, so that the hall's markup is as it was.
|
|
80
|
+
*/
|
|
81
|
+
export declare function TabletSvg({ tablet: tabletId, version, mirrorReversed, showSecondLetters, enochianStyle, frame, width, height, highlights, ref, role, "aria-label": ariaLabel, "aria-hidden": ariaHidden, }: Omit<TabletProps, "label"> & {
|
|
82
|
+
role?: "img";
|
|
83
|
+
"aria-label"?: string;
|
|
84
|
+
"aria-hidden"?: true;
|
|
85
|
+
}): React.JSX.Element;
|
|
@@ -0,0 +1,278 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
+
/**
|
|
3
|
+
* The Enochian tablets' drawing, a private module: the entry,
|
|
4
|
+
* `enochian/Tablet`, names it and re-exports what is public, and the
|
|
5
|
+
* hall's art draws it unnamed.
|
|
6
|
+
*/
|
|
7
|
+
import enochianTablets, { DEFAULT_TABLET_VERSION, TABLET_VERSIONS, tabletVersion, } from "magick-data/enochian/tablets";
|
|
8
|
+
import React from "react";
|
|
9
|
+
import { EquinoxSigils, Sigils, VERSION_NAMES } from "./tabletSigils.js";
|
|
10
|
+
/** A Watchtower's page: its sigil above its grid. */
|
|
11
|
+
export const WATCHTOWER_VIEWBOX = [-105, 0, 210, 297];
|
|
12
|
+
/** The Tablet of Union's page: its grid of five by four with a margin. */
|
|
13
|
+
export const UNION_VIEWBOX = [0, 0, 124, 104];
|
|
14
|
+
/** The page a tablet draws on, by its key. */
|
|
15
|
+
export function tabletViewBox(id) {
|
|
16
|
+
return tabletOf(id)?.kind === "union" ? UNION_VIEWBOX : WATCHTOWER_VIEWBOX;
|
|
17
|
+
}
|
|
18
|
+
/** The tablet with this key, or nothing for a key the data does not have. */
|
|
19
|
+
function tabletOf(id) {
|
|
20
|
+
return Object.hasOwn(enochianTablets, id)
|
|
21
|
+
? enochianTablets[id]
|
|
22
|
+
: undefined;
|
|
23
|
+
}
|
|
24
|
+
function isCrossFromPosition(x, y) {
|
|
25
|
+
if (x === 2 || x === 5 || x === 6 || x === 9)
|
|
26
|
+
return true;
|
|
27
|
+
if (y === 1 || y === 6 || y === 8)
|
|
28
|
+
return true;
|
|
29
|
+
return false;
|
|
30
|
+
}
|
|
31
|
+
function elementFromPosition(x, y) {
|
|
32
|
+
if (x < 5) {
|
|
33
|
+
if (y < 6)
|
|
34
|
+
return "air";
|
|
35
|
+
if (y > 6)
|
|
36
|
+
return "earth";
|
|
37
|
+
}
|
|
38
|
+
else if (x > 6) {
|
|
39
|
+
if (y < 6)
|
|
40
|
+
return "water";
|
|
41
|
+
if (y > 6)
|
|
42
|
+
return "fire";
|
|
43
|
+
}
|
|
44
|
+
return "";
|
|
45
|
+
}
|
|
46
|
+
/** Each angle's colour, by element; the cross between them has none. */
|
|
47
|
+
const elementColors = {
|
|
48
|
+
air: "yellow",
|
|
49
|
+
water: "#59f",
|
|
50
|
+
fire: "#f55",
|
|
51
|
+
earth: "black",
|
|
52
|
+
};
|
|
53
|
+
const tabletColors = {
|
|
54
|
+
earth: {
|
|
55
|
+
color: {
|
|
56
|
+
default: "black",
|
|
57
|
+
earth: "white",
|
|
58
|
+
},
|
|
59
|
+
background: "black",
|
|
60
|
+
borderCross: "white",
|
|
61
|
+
},
|
|
62
|
+
air: {
|
|
63
|
+
color: {
|
|
64
|
+
default: "black",
|
|
65
|
+
air: "brown",
|
|
66
|
+
},
|
|
67
|
+
background: "#fff100",
|
|
68
|
+
},
|
|
69
|
+
// Painted in blue, the Water angle lettered in orange, and in red, the
|
|
70
|
+
// Fire angle in green: Regardie, The Golden Dawn, vol. 4 (1940), p.275.
|
|
71
|
+
water: {
|
|
72
|
+
color: {
|
|
73
|
+
water: "#f80",
|
|
74
|
+
},
|
|
75
|
+
background: "#59f",
|
|
76
|
+
},
|
|
77
|
+
fire: {
|
|
78
|
+
color: {
|
|
79
|
+
fire: "#2b2",
|
|
80
|
+
},
|
|
81
|
+
background: "#f33",
|
|
82
|
+
},
|
|
83
|
+
};
|
|
84
|
+
/**
|
|
85
|
+
* Which sigils each version draws: Regardie's for the Golden Dawn's and
|
|
86
|
+
* his own, the Equinox's for its own, and none for Dee's and Raphael's
|
|
87
|
+
* tables, which carry none (the Golden Dawn takes its sigils from Dee's
|
|
88
|
+
* Sigillum Dei Aemeth).
|
|
89
|
+
*/
|
|
90
|
+
const VERSION_SIGILS = {
|
|
91
|
+
gd: Sigils,
|
|
92
|
+
regardie: Sigils,
|
|
93
|
+
equinox: EquinoxSigils,
|
|
94
|
+
dee: undefined,
|
|
95
|
+
raphael: undefined,
|
|
96
|
+
};
|
|
97
|
+
/**
|
|
98
|
+
* Where a version without sigils (Dee's and Raphael's tables) would draw
|
|
99
|
+
* one: a short note saying why there is none, in the sigil's place, so
|
|
100
|
+
* the page keeps its shape. Drawn in the transliteration's font always.
|
|
101
|
+
*/
|
|
102
|
+
const NO_SIGIL_LINES = [
|
|
103
|
+
"No sigil: Dee's tables carry none.",
|
|
104
|
+
"The Watchtower sigils are the Golden Dawn's, from",
|
|
105
|
+
"the Sigillum Dei Aemeth (Regardie, vol. 4, p.307).",
|
|
106
|
+
];
|
|
107
|
+
function NoSigil() {
|
|
108
|
+
return (_jsx("g", { "data-sigil-note": "", children: NO_SIGIL_LINES.map((line, index) => (_jsx("text", { x: 0, y: 18 + index * 9, style: { fontSize: 6.5, textAnchor: "middle", fill: "#555" }, children: line }, line))) }));
|
|
109
|
+
}
|
|
110
|
+
/** A version by its id, or the default for an id that is none. */
|
|
111
|
+
function versionOf(version) {
|
|
112
|
+
return TABLET_VERSIONS.includes(version ?? "")
|
|
113
|
+
? version
|
|
114
|
+
: DEFAULT_TABLET_VERSION;
|
|
115
|
+
}
|
|
116
|
+
/** The squares whose letters the version reverses, as "row,column". */
|
|
117
|
+
function reversedSquares(tablet, options) {
|
|
118
|
+
return new Set(options.reversed
|
|
119
|
+
? tablet.marks
|
|
120
|
+
.filter((mark) => mark.reversed)
|
|
121
|
+
.map(({ row, column }) => `${row},${column}`)
|
|
122
|
+
: []);
|
|
123
|
+
}
|
|
124
|
+
/** Each square's second letters, as "row,column", when they are drawn. */
|
|
125
|
+
function altLetters(tablet, options) {
|
|
126
|
+
return new Map(options.alt
|
|
127
|
+
? tablet.marks
|
|
128
|
+
.filter((mark) => mark.alt?.length)
|
|
129
|
+
.map(({ row, column, alt }) => [
|
|
130
|
+
`${row},${column}`,
|
|
131
|
+
(alt ?? []).join(""),
|
|
132
|
+
])
|
|
133
|
+
: []);
|
|
134
|
+
}
|
|
135
|
+
/**
|
|
136
|
+
* A square's second letters, small in its top right corner, in the
|
|
137
|
+
* transliteration's font or the page's Enochian one.
|
|
138
|
+
*/
|
|
139
|
+
function AltLetters({ letters, right, top, fill, enochianStyle, }) {
|
|
140
|
+
return (_jsx("text", { x: right - 1.5, y: top + 6, "data-alt": "", style: {
|
|
141
|
+
fontSize: 6,
|
|
142
|
+
textAnchor: "end",
|
|
143
|
+
fill,
|
|
144
|
+
...enochianStyle,
|
|
145
|
+
// Left to right, so that the corner holds them in either font.
|
|
146
|
+
direction: "ltr",
|
|
147
|
+
unicodeBidi: "normal",
|
|
148
|
+
}, children: letters }));
|
|
149
|
+
}
|
|
150
|
+
/** A reversed letter's mirror about the vertical through `cx`. */
|
|
151
|
+
const mirrorAt = (cx) => `translate(${2 * cx} 0) scale(-1 1)`;
|
|
152
|
+
function Grid({ id, tablet, options, enochianStyle, highlights, }) {
|
|
153
|
+
const enochianFont = enochianStyle !== undefined;
|
|
154
|
+
const reversed = reversedSquares(tablet, options);
|
|
155
|
+
const alt = altLetters(tablet, options);
|
|
156
|
+
const size = 20;
|
|
157
|
+
const border = 2;
|
|
158
|
+
return (_jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: `0 0 ${size * 12 + border * 2} ${size * 13 + border * 2}`, children: [tablet.grid.map((row, y) => row.map((letter, x) => {
|
|
159
|
+
const element = elementFromPosition(x, y);
|
|
160
|
+
const isCross = isCrossFromPosition(x, y);
|
|
161
|
+
const fill = tabletColors[id]?.background || elementColors[element];
|
|
162
|
+
const color = tabletColors[id]?.color?.[element] || elementColors[element];
|
|
163
|
+
return (_jsxs(React.Fragment, { children: [_jsx("rect", { x: x * size + border, y: y * size + border, width: size, height: size, style: {
|
|
164
|
+
strokeWidth: 1.2,
|
|
165
|
+
stroke: isCross
|
|
166
|
+
? tabletColors[id]?.border || "black"
|
|
167
|
+
: tabletColors[id]?.borderCross || "black",
|
|
168
|
+
fill: isCross ? "white" : fill,
|
|
169
|
+
} }, `r-${y}-${x}`), letter !== null && (_jsx("text", { x: x * size + size / 2 + border, y: y * size + size / 2 + 6 + border, transform: reversed.has(`${y},${x}`)
|
|
170
|
+
? mirrorAt(x * size + size / 2 + border)
|
|
171
|
+
: undefined, style: {
|
|
172
|
+
fontWeight: enochianFont ? "bold" : undefined,
|
|
173
|
+
fontSize: size - 2 - (enochianFont ? 4 : 0),
|
|
174
|
+
textAnchor: "middle",
|
|
175
|
+
fill: isCross ? "black" : color || undefined,
|
|
176
|
+
...enochianStyle,
|
|
177
|
+
}, children: letter }, `t-${y}-${x}`)), alt.has(`${y},${x}`) && (_jsx(AltLetters, { letters: alt.get(`${y},${x}`) ?? "", right: (x + 1) * size + border, top: y * size + border, fill: isCross ? "black" : color || undefined, enochianStyle: enochianStyle }))] }, "grid-" + x + "," + y));
|
|
178
|
+
})), highlights?.squares.map(({ row, column }) => {
|
|
179
|
+
const chosen = highlights.selected?.row === row &&
|
|
180
|
+
highlights.selected?.column === column;
|
|
181
|
+
return (_jsx("rect", { "data-square": `${row},${column}`, x: column * size + border + 1, y: row * size + border + 1, width: size - 2, height: size - 2, style: {
|
|
182
|
+
fill: "transparent",
|
|
183
|
+
stroke: chosen ? "#c0f" : "#e0f",
|
|
184
|
+
strokeWidth: chosen ? 3 : 1.6,
|
|
185
|
+
strokeDasharray: chosen ? undefined : "3 2",
|
|
186
|
+
}, onClick: highlights.onSelect
|
|
187
|
+
? () => highlights.onSelect?.({ row, column })
|
|
188
|
+
: undefined }, `h-${row}-${column}`));
|
|
189
|
+
}), _jsx("rect", { x: 0, y: 0, width: size * 12 + border * 2, height: size * 13 + border * 2, style: {
|
|
190
|
+
strokeWidth: border + 2,
|
|
191
|
+
stroke: "black",
|
|
192
|
+
fill: "none",
|
|
193
|
+
} })] }));
|
|
194
|
+
}
|
|
195
|
+
/**
|
|
196
|
+
* The Tablet of Union's lines in their elements' colours on white, EXARP
|
|
197
|
+
* for Air, HCOMA for Water, NANTA for Earth and BITOM for Fire: Regardie,
|
|
198
|
+
* The Golden Dawn, vol. 4 (1940), p.275.
|
|
199
|
+
*/
|
|
200
|
+
const UNION_LINE_COLORS = ["#d4a000", "#2255cc", "black", "#e22"];
|
|
201
|
+
/** The Tablet of Union, its squares at a Watchtower's size, on its page. */
|
|
202
|
+
function UnionGrid({ tablet, options, enochianStyle, }) {
|
|
203
|
+
const enochianFont = enochianStyle !== undefined;
|
|
204
|
+
const reversed = reversedSquares(tablet, options);
|
|
205
|
+
const size = 20;
|
|
206
|
+
const [, , pageWidth, pageHeight] = UNION_VIEWBOX;
|
|
207
|
+
const columns = tablet.grid[0]?.length ?? 0;
|
|
208
|
+
const left = (pageWidth - size * columns) / 2;
|
|
209
|
+
const top = (pageHeight - size * tablet.grid.length) / 2;
|
|
210
|
+
return (_jsxs(_Fragment, { children: [tablet.grid
|
|
211
|
+
.flatMap((row, y) => row.map((letter, x) => ({ letter, x, y })))
|
|
212
|
+
.map(({ letter, x, y }) => {
|
|
213
|
+
const cx = left + x * size + size / 2;
|
|
214
|
+
return (_jsxs(React.Fragment, { children: [_jsx("rect", { x: left + x * size, y: top + y * size, width: size, height: size, style: { strokeWidth: 1.2, stroke: "black", fill: "white" } }), _jsx("text", { x: cx, y: top + y * size + size / 2 + 6, transform: reversed.has(`${y},${x}`) ? mirrorAt(cx) : undefined, style: {
|
|
215
|
+
fontWeight: enochianFont ? "bold" : undefined,
|
|
216
|
+
fontSize: size - 2 - (enochianFont ? 4 : 0),
|
|
217
|
+
textAnchor: "middle",
|
|
218
|
+
fill: UNION_LINE_COLORS[y] ?? "black",
|
|
219
|
+
...enochianStyle,
|
|
220
|
+
}, children: letter })] }, `grid-${x},${y}`));
|
|
221
|
+
}), _jsx("rect", { x: left, y: top, width: size * columns, height: size * tablet.grid.length, style: { strokeWidth: 4, stroke: "black", fill: "none" } })] }));
|
|
222
|
+
}
|
|
223
|
+
/** Each Watchtower's element, as its accessible name says it. */
|
|
224
|
+
const ELEMENT_NAMES = {
|
|
225
|
+
earth: "Earth",
|
|
226
|
+
air: "Air",
|
|
227
|
+
water: "Water",
|
|
228
|
+
fire: "Fire",
|
|
229
|
+
};
|
|
230
|
+
/**
|
|
231
|
+
* The name a tablet is announced by: "Enochian Watchtower of Fire", "Tablet
|
|
232
|
+
* of Union", or "Enochian tablet" for a key the data does not have; in a
|
|
233
|
+
* version other than the default, with the version's name ("Enochian
|
|
234
|
+
* Watchtower of Fire, Dee's table of 1584").
|
|
235
|
+
*/
|
|
236
|
+
export function tabletName(id, version) {
|
|
237
|
+
const tablet = tabletOf(id);
|
|
238
|
+
const name = tablet?.kind === "union"
|
|
239
|
+
? "Tablet of Union"
|
|
240
|
+
: tablet && Object.hasOwn(ELEMENT_NAMES, id)
|
|
241
|
+
? `Enochian Watchtower of ${ELEMENT_NAMES[id]}`
|
|
242
|
+
: "Enochian tablet";
|
|
243
|
+
const chosen = versionOf(version);
|
|
244
|
+
return tablet && chosen !== DEFAULT_TABLET_VERSION
|
|
245
|
+
? `${name}, ${VERSION_NAMES[chosen]}`
|
|
246
|
+
: name;
|
|
247
|
+
}
|
|
248
|
+
/**
|
|
249
|
+
* The page of a tablet a version does not have (Dee's and Raphael's have
|
|
250
|
+
* no Tablet of Union): its outline and a line saying so.
|
|
251
|
+
*/
|
|
252
|
+
function Missing({ name, version, viewBox, }) {
|
|
253
|
+
const [x, y, width, height] = viewBox;
|
|
254
|
+
const lines = [`No ${name}`, `in ${VERSION_NAMES[version]}`];
|
|
255
|
+
return (_jsxs("g", { "data-missing": "", children: [_jsx("rect", { x: x + 2, y: y + 2, width: width - 4, height: height - 4, style: {
|
|
256
|
+
fill: "white",
|
|
257
|
+
stroke: "#888",
|
|
258
|
+
strokeWidth: 1,
|
|
259
|
+
strokeDasharray: "4 3",
|
|
260
|
+
} }), lines.map((line, index) => (_jsx("text", { x: x + width / 2, y: y + height / 2 + (index - 0.5) * 10 + 3, style: { fontSize: 7, textAnchor: "middle", fill: "#444" }, children: line }, line)))] }));
|
|
261
|
+
}
|
|
262
|
+
/**
|
|
263
|
+
* `Tablet`'s drawing, its root's accessibility attributes the caller's:
|
|
264
|
+
* none for the hall's art, which draws a tablet inside an image that
|
|
265
|
+
* names itself, so that the hall's markup is as it was.
|
|
266
|
+
*/
|
|
267
|
+
export function TabletSvg({ tablet: tabletId, version, mirrorReversed = true, showSecondLetters = false, enochianStyle, frame = false, width, height, highlights, ref, role, "aria-label": ariaLabel, "aria-hidden": ariaHidden, }) {
|
|
268
|
+
const id = tabletId;
|
|
269
|
+
const chosen = versionOf(version);
|
|
270
|
+
const data = tabletOf(id);
|
|
271
|
+
const tablet = tabletVersion(data, chosen);
|
|
272
|
+
const sigils = VERSION_SIGILS[chosen];
|
|
273
|
+
const Sigil = sigils && Object.hasOwn(sigils, id)
|
|
274
|
+
? sigils[id]
|
|
275
|
+
: undefined;
|
|
276
|
+
const options = { reversed: mirrorReversed, alt: showSecondLetters };
|
|
277
|
+
return (_jsx("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: tabletViewBox(id).join(" "), width: width, height: height, style: frame ? { border: "1px solid black" } : undefined, role: role, "aria-label": ariaLabel, "aria-hidden": ariaHidden, ref: ref, children: data && !tablet ? (_jsx(Missing, { name: tabletName(id), version: chosen, viewBox: tabletViewBox(id) })) : tablet?.kind === "union" ? (_jsx(UnionGrid, { tablet: tablet, options: options, enochianStyle: enochianStyle })) : (tablet && (_jsxs(_Fragment, { children: [Sigil ? (_jsx("g", { transform: "translate(-31.5,-5) scale(0.3)", children: _jsx(Sigil, {}) })) : (_jsx(NoSigil, {})), _jsx("g", { transform: "translate(-94.5,48) scale(0.9)", children: _jsx(Grid, { id: id, tablet: tablet, options: options, enochianStyle: enochianStyle, highlights: highlights }) })] }))) }));
|
|
278
|
+
}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The finished cross, row by row: each square's symbol by its id in
|
|
3
|
+
* magick-data, and `null` where the cross has no square.
|
|
4
|
+
*/
|
|
5
|
+
export declare const FYLFOT_CELLS: readonly [readonly ["fire", "sagittarius", "leo", null, "water"], readonly [null, null, "aries", null, "pisces"], readonly ["taurus", "capricorn", "sol", "cancer", "scorpio"], readonly ["virgo", null, "libra", null, null], readonly ["earth", null, "aquarius", "gemini", "air"]];
|
|
6
|
+
/** A symbol of the cross, by its id in magick-data: `aries`, `fire`, `sol`. */
|
|
7
|
+
export type FylfotSymbolId = Exclude<(typeof FYLFOT_CELLS)[number][number], null>;
|
|
8
|
+
/**
|
|
9
|
+
* A square that shows no symbol, for a cross being filled in: `""` is an
|
|
10
|
+
* empty square, which takes clicks, and `"cursor"` the square being
|
|
11
|
+
* filled now, outlined.
|
|
12
|
+
*/
|
|
13
|
+
export type FylfotBlank = "" | "cursor";
|
|
14
|
+
/**
|
|
15
|
+
* What a square shows: a symbol, a blank, or `null` where there is no
|
|
16
|
+
* square.
|
|
17
|
+
*/
|
|
18
|
+
export type FylfotCell = FylfotSymbolId | FylfotBlank | null;
|
|
19
|
+
/** A square a click landed on, as `onCellClick` is given it. */
|
|
20
|
+
export interface FylfotCellClick {
|
|
21
|
+
/**
|
|
22
|
+
* What the square showed: a symbol, or `""` for an empty square. The
|
|
23
|
+
* cursor's square and the places with no square take no clicks.
|
|
24
|
+
*/
|
|
25
|
+
id: FylfotSymbolId | "";
|
|
26
|
+
/** Its row and column, from 0 at the top left. */
|
|
27
|
+
row: number;
|
|
28
|
+
column: number;
|
|
29
|
+
/**
|
|
30
|
+
* The symbol the finished cross has there, or `null` where it has no
|
|
31
|
+
* square, as `cells` may put one where the finished cross has none.
|
|
32
|
+
*/
|
|
33
|
+
expected: FylfotSymbolId | null;
|
|
34
|
+
}
|
|
35
|
+
/** The magick-data table a symbol of the cross is a row of. */
|
|
36
|
+
export declare function fylfotSymbolTable(id: FylfotSymbolId): "planet" | "element" | "zodiac";
|
|
37
|
+
/** Props of the fylfot cross. */
|
|
38
|
+
export interface FylfotCrossProps {
|
|
39
|
+
/**
|
|
40
|
+
* What each square shows, row by row; the finished cross,
|
|
41
|
+
* `FYLFOT_CELLS`, by default.
|
|
42
|
+
*/
|
|
43
|
+
cells?: readonly (readonly FylfotCell[])[];
|
|
44
|
+
/**
|
|
45
|
+
* Called when a symbol or an empty square is clicked, with what it
|
|
46
|
+
* showed, where it is and what belongs there. Without it the squares
|
|
47
|
+
* take no clicks, so the cross renders as a Server Component.
|
|
48
|
+
*/
|
|
49
|
+
onCellClick?: (click: FylfotCellClick) => void;
|
|
50
|
+
/** Colours each arm by its element (default true). */
|
|
51
|
+
showColors?: boolean;
|
|
52
|
+
/**
|
|
53
|
+
* The squares' borders, a CSS colour such as a theme's custom property;
|
|
54
|
+
* black by default.
|
|
55
|
+
*/
|
|
56
|
+
ink?: string;
|
|
57
|
+
}
|
|
58
|
+
/** The fylfot cross of the signs and elements, as a table of squares. */
|
|
59
|
+
export declare function FylfotCross({ cells, onCellClick, showColors, ink, }: FylfotCrossProps): import("react").JSX.Element;
|
|
60
|
+
export default FylfotCross;
|