kaabalah 6.10.0 → 6.12.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/dist/{chunk-GHHOLWAG.js → chunk-LUHQNKKJ.js} +255 -262
- package/dist/chunk-LUHQNKKJ.js.map +1 -0
- package/dist/{chunk-PPIKM3QA.mjs → chunk-SLB2NLWI.mjs} +257 -263
- package/dist/chunk-SLB2NLWI.mjs.map +1 -0
- package/dist/cli.js +290 -335
- package/dist/cli.js.map +1 -1
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +42 -46
- package/dist/index.mjs +1 -1
- package/dist/visual/index.d.mts +3 -101
- package/dist/visual/index.d.ts +3 -101
- package/dist/visual/index.js +42 -46
- package/dist/visual/index.mjs +1 -1
- package/package.json +2 -1
- package/dist/chunk-GHHOLWAG.js.map +0 -1
- package/dist/chunk-PPIKM3QA.mjs.map +0 -1
package/dist/cli.js
CHANGED
|
@@ -10432,7 +10432,7 @@ function generateAstroGlyphSvg(keyOrGlyph, options = {}) {
|
|
|
10432
10432
|
const svg = generateGlyphSvg(glyph.primitives, options);
|
|
10433
10433
|
return svg.replace("<svg ", `<svg data-astro-glyph="${escapeAttr2(glyph.key)}" data-astro-glyph-category="${glyph.category}" `);
|
|
10434
10434
|
}
|
|
10435
|
-
function
|
|
10435
|
+
function buildAstroWheelSvgModel(chart, options = {}) {
|
|
10436
10436
|
const viewBox = normalizeViewBox2(options.viewBox);
|
|
10437
10437
|
const palette = resolvePalette2(options.palette, options.background ?? "transparent");
|
|
10438
10438
|
const excludedBodies = resolveExcludedBodies(options.excludeBodies);
|
|
@@ -10469,7 +10469,7 @@ function getAstroWheelRenderModel(chart, options = {}) {
|
|
|
10469
10469
|
rings,
|
|
10470
10470
|
scale
|
|
10471
10471
|
}) : [];
|
|
10472
|
-
const
|
|
10472
|
+
const basePointGroup = buildPointGroup({
|
|
10473
10473
|
layer: {
|
|
10474
10474
|
id: "birth",
|
|
10475
10475
|
label: "Birth",
|
|
@@ -10491,27 +10491,12 @@ function getAstroWheelRenderModel(chart, options = {}) {
|
|
|
10491
10491
|
maxDisplacementDegrees: maxPointDisplacementDegrees,
|
|
10492
10492
|
railVisibility
|
|
10493
10493
|
});
|
|
10494
|
-
const
|
|
10495
|
-
|
|
10496
|
-
layer,
|
|
10497
|
-
center,
|
|
10498
|
-
angleOf: angleOf2,
|
|
10499
|
-
rings,
|
|
10500
|
-
scale,
|
|
10501
|
-
palette,
|
|
10502
|
-
excludedBodies,
|
|
10503
|
-
pointConnectorMode,
|
|
10504
|
-
maxDisplacementDegrees: maxPointDisplacementDegrees,
|
|
10505
|
-
railVisibility
|
|
10506
|
-
})
|
|
10507
|
-
);
|
|
10508
|
-
const pointLayers = [
|
|
10509
|
-
...resolvedPoints.enabled ? [basePointLayer] : [],
|
|
10510
|
-
...extraPointLayers
|
|
10494
|
+
const pointGroups = [
|
|
10495
|
+
...resolvedPoints.enabled ? [basePointGroup] : []
|
|
10511
10496
|
];
|
|
10512
|
-
const points =
|
|
10497
|
+
const points = pointGroups.flatMap((layer) => [...layer.points]);
|
|
10513
10498
|
const pointByKey = Object.fromEntries(points.map((point) => [point.key, point]));
|
|
10514
|
-
const
|
|
10499
|
+
const baseAspectGroup = resolvedAspects.enabled ? buildAspectGroup({
|
|
10515
10500
|
layer: {
|
|
10516
10501
|
id: "birth",
|
|
10517
10502
|
label: "Birth aspects",
|
|
@@ -10527,25 +10512,11 @@ function getAstroWheelRenderModel(chart, options = {}) {
|
|
|
10527
10512
|
palette,
|
|
10528
10513
|
excludedBodies
|
|
10529
10514
|
}) : null;
|
|
10530
|
-
const
|
|
10531
|
-
|
|
10532
|
-
layer,
|
|
10533
|
-
chart: layer.chart ?? chart,
|
|
10534
|
-
pointByKey,
|
|
10535
|
-
center,
|
|
10536
|
-
angleOf: angleOf2,
|
|
10537
|
-
rings,
|
|
10538
|
-
palette,
|
|
10539
|
-
excludedBodies
|
|
10540
|
-
})
|
|
10541
|
-
);
|
|
10542
|
-
const aspectLayers = [
|
|
10543
|
-
...baseAspectLayer ? [baseAspectLayer] : [],
|
|
10544
|
-
...extraAspectLayers
|
|
10515
|
+
const aspectGroups = [
|
|
10516
|
+
...baseAspectGroup ? [baseAspectGroup] : []
|
|
10545
10517
|
];
|
|
10546
|
-
const aspectLines =
|
|
10547
|
-
const positionRails =
|
|
10548
|
-
const boundaryNotches = pointLayers.flatMap((layer) => [...layer.notches]);
|
|
10518
|
+
const aspectLines = aspectGroups.flatMap((layer) => [...layer.aspectLines]);
|
|
10519
|
+
const positionRails = basePointGroup.rails;
|
|
10549
10520
|
return {
|
|
10550
10521
|
viewBox,
|
|
10551
10522
|
center,
|
|
@@ -10559,15 +10530,14 @@ function getAstroWheelRenderModel(chart, options = {}) {
|
|
|
10559
10530
|
points,
|
|
10560
10531
|
pointByKey,
|
|
10561
10532
|
aspectLines,
|
|
10562
|
-
|
|
10563
|
-
|
|
10533
|
+
pointGroups,
|
|
10534
|
+
aspectGroups,
|
|
10564
10535
|
positionRails,
|
|
10565
|
-
boundaryNotches,
|
|
10566
10536
|
palette
|
|
10567
10537
|
};
|
|
10568
10538
|
}
|
|
10569
10539
|
function generateAstroWheelSvg(chart, options = {}) {
|
|
10570
|
-
const model =
|
|
10540
|
+
const model = buildAstroWheelSvgModel(chart, options);
|
|
10571
10541
|
const viewBox = model.viewBox;
|
|
10572
10542
|
const zodiacOptions = resolveZodiacOptions(options.zodiac);
|
|
10573
10543
|
const houseOptions = resolveHouseOptions(options.houses);
|
|
@@ -10622,15 +10592,15 @@ function renderSvgDefs(push, model) {
|
|
|
10622
10592
|
push(`</defs>`);
|
|
10623
10593
|
}
|
|
10624
10594
|
function renderAspects(push, model) {
|
|
10625
|
-
if (model.
|
|
10595
|
+
if (model.aspectGroups.length === 0) {
|
|
10626
10596
|
return;
|
|
10627
10597
|
}
|
|
10628
10598
|
push(`<g id="astro-wheel-aspects" aria-label="aspects">`);
|
|
10629
|
-
for (const layer of model.
|
|
10630
|
-
push(`<g class="astro-wheel-aspect-
|
|
10599
|
+
for (const layer of model.aspectGroups) {
|
|
10600
|
+
push(`<g class="astro-wheel-aspect-group" data-aspect-group="${escapeAttr2(layer.id)}"${layer.label ? ` aria-label="${escapeAttr2(layer.label)}"` : ""}>`);
|
|
10631
10601
|
for (const aspect of layer.aspectLines) {
|
|
10632
10602
|
push(
|
|
10633
|
-
`<line data-aspect-
|
|
10603
|
+
`<line data-aspect-group="${escapeAttr2(aspect.groupId)}" data-aspect="${escapeAttr2(aspect.aspect)}" data-planet-a="${escapeAttr2(aspect.planetA)}" data-planet-b="${escapeAttr2(aspect.planetB)}" x1="${fmt2(aspect.line.x1)}" y1="${fmt2(aspect.line.y1)}" x2="${fmt2(aspect.line.x2)}" y2="${fmt2(aspect.line.y2)}" stroke="${escapeAttr2(aspect.color)}" stroke-opacity="${fmt2(aspect.opacity)}" stroke-width="${fmt2(aspect.strokeWidth * model.scale)}" stroke-linecap="round"/>`
|
|
10634
10604
|
);
|
|
10635
10605
|
}
|
|
10636
10606
|
push(`</g>`);
|
|
@@ -10720,23 +10690,18 @@ function renderHouses(push, model, options) {
|
|
|
10720
10690
|
push(`</g>`);
|
|
10721
10691
|
}
|
|
10722
10692
|
function renderPlanets(push, model) {
|
|
10723
|
-
if (model.
|
|
10693
|
+
if (model.pointGroups.length === 0) {
|
|
10724
10694
|
return;
|
|
10725
10695
|
}
|
|
10726
10696
|
push(`<g id="astro-wheel-planets" aria-label="planets">`);
|
|
10727
|
-
for (const layer of model.
|
|
10728
|
-
|
|
10697
|
+
for (const layer of model.pointGroups) {
|
|
10698
|
+
renderPointGroupGuide(push, layer, model);
|
|
10729
10699
|
}
|
|
10730
|
-
for (const
|
|
10731
|
-
push(
|
|
10732
|
-
`<path class="astro-wheel-boundary-notch" data-point-layer="${escapeAttr2(notch.layerId)}" data-point-key="${escapeAttr2(notch.pointKey)}" data-house="${notch.house}" data-cusp-house="${notch.cuspHouse}" d="${escapeAttr2(notch.path)}" fill="none" stroke="${escapeAttr2(model.palette.houseLine)}" stroke-opacity="0.6" stroke-width="${fmt2(1.1 * model.scale)}" stroke-linejoin="round" stroke-linecap="round"/>`
|
|
10733
|
-
);
|
|
10734
|
-
}
|
|
10735
|
-
for (const layer of model.pointLayers) {
|
|
10736
|
-
push(`<g class="astro-wheel-point-layer" data-point-layer="${escapeAttr2(layer.id)}"${layer.label ? ` aria-label="${escapeAttr2(layer.label)}"` : ""}>`);
|
|
10700
|
+
for (const layer of model.pointGroups) {
|
|
10701
|
+
push(`<g class="astro-wheel-point-group" data-point-group="${escapeAttr2(layer.id)}"${layer.label ? ` aria-label="${escapeAttr2(layer.label)}"` : ""}>`);
|
|
10737
10702
|
for (const point of layer.points) {
|
|
10738
10703
|
push(
|
|
10739
|
-
`<g class="astro-wheel-point" data-point-
|
|
10704
|
+
`<g class="astro-wheel-point" data-point-group="${escapeAttr2(point.groupId)}" data-point-key="${escapeAttr2(point.key)}" data-point-name="${escapeAttr2(point.name)}" data-point-kind="${point.kind}" data-longitude="${fmt2(point.longitude)}">`
|
|
10740
10705
|
);
|
|
10741
10706
|
push(`<title>${escapeText2(point.name)} ${fmt2(point.longitude)}\xB0</title>`);
|
|
10742
10707
|
push(
|
|
@@ -10757,17 +10722,17 @@ function renderPlanets(push, model) {
|
|
|
10757
10722
|
}
|
|
10758
10723
|
push(`</g>`);
|
|
10759
10724
|
}
|
|
10760
|
-
function
|
|
10725
|
+
function renderPointGroupGuide(push, layer, model) {
|
|
10761
10726
|
const isExternal = layer.radius > model.rings.houses.r2 + model.scale;
|
|
10762
10727
|
if (!isExternal) {
|
|
10763
10728
|
return;
|
|
10764
10729
|
}
|
|
10765
10730
|
push(
|
|
10766
|
-
`<circle class="astro-wheel-external-point-ring" data-point-
|
|
10731
|
+
`<circle class="astro-wheel-external-point-ring" data-point-group="${escapeAttr2(layer.id)}" cx="${fmt2(model.center.x)}" cy="${fmt2(model.center.y)}" r="${fmt2(layer.radius)}" fill="none" stroke="${escapeAttr2(layer.tickColor)}" stroke-opacity="0.32" stroke-width="${fmt2(1.15 * model.scale)}"/>`
|
|
10767
10732
|
);
|
|
10768
10733
|
}
|
|
10769
10734
|
function renderGlyphOverlay(push, model) {
|
|
10770
|
-
if (model.angleMarkers.length === 0 && model.
|
|
10735
|
+
if (model.angleMarkers.length === 0 && model.pointGroups.length === 0) {
|
|
10771
10736
|
return;
|
|
10772
10737
|
}
|
|
10773
10738
|
push(`<g id="astro-wheel-glyph-layer" aria-label="chart glyphs">`);
|
|
@@ -10778,10 +10743,10 @@ function renderGlyphOverlay(push, model) {
|
|
|
10778
10743
|
}
|
|
10779
10744
|
push(`</g>`);
|
|
10780
10745
|
}
|
|
10781
|
-
if (model.
|
|
10746
|
+
if (model.pointGroups.length > 0) {
|
|
10782
10747
|
push(`<g id="astro-wheel-point-glyphs" aria-label="planet glyphs">`);
|
|
10783
|
-
for (const layer of model.
|
|
10784
|
-
push(`<g class="astro-wheel-point-glyph-layer" data-point-
|
|
10748
|
+
for (const layer of model.pointGroups) {
|
|
10749
|
+
push(`<g class="astro-wheel-point-glyph-layer" data-point-group="${escapeAttr2(layer.id)}"${layer.label ? ` aria-label="${escapeAttr2(layer.label)} glyphs"` : ""}>`);
|
|
10785
10750
|
for (const point of layer.points) {
|
|
10786
10751
|
renderPointLabelGroup(push, point, model);
|
|
10787
10752
|
}
|
|
@@ -10823,7 +10788,7 @@ function angleDisplayLabel(key) {
|
|
|
10823
10788
|
}
|
|
10824
10789
|
function renderPointLabelGroup(push, point, model) {
|
|
10825
10790
|
push(
|
|
10826
|
-
`<g class="astro-wheel-point-label" data-point-
|
|
10791
|
+
`<g class="astro-wheel-point-label" data-point-group="${escapeAttr2(point.groupId)}" data-point-key="${escapeAttr2(point.key)}" data-point-name="${escapeAttr2(point.name)}" data-point-kind="${point.kind}" data-longitude="${fmt2(point.longitude)}" data-display-longitude="${fmt2(point.displayLongitude)}" data-house="${point.house ?? ""}" transform="translate(${fmt2(point.glyphPosition.x)} ${fmt2(point.glyphPosition.y)})" filter="url(#${GLYPH_OUTLINE_FILTER_ID})">`
|
|
10827
10792
|
);
|
|
10828
10793
|
push(`<title>${escapeText2(pointLabelTitle(point))}</title>`);
|
|
10829
10794
|
renderPointGlyph(push, point, 0, 0, point.glyphScale, model.palette.glyphHalo);
|
|
@@ -10832,7 +10797,7 @@ function renderPointLabelGroup(push, point, model) {
|
|
|
10832
10797
|
if (!label.visible)
|
|
10833
10798
|
continue;
|
|
10834
10799
|
push(
|
|
10835
|
-
`<g class="astro-wheel-position-rail-label" data-point-
|
|
10800
|
+
`<g class="astro-wheel-position-rail-label" data-point-group="${escapeAttr2(point.groupId)}" data-point-key="${escapeAttr2(point.key)}" data-point-name="${escapeAttr2(point.name)}" data-position-rail="${label.railId}" transform="translate(${fmt2(label.position.x)} ${fmt2(label.position.y)})" filter="url(#${GLYPH_OUTLINE_FILTER_ID})">`
|
|
10836
10801
|
);
|
|
10837
10802
|
if (label.railId === "sign" && label.sign) {
|
|
10838
10803
|
renderInlineSignGlyph(push, label.sign, 0, 0, label.glyphScale ?? label.fontSize, point.color);
|
|
@@ -10922,13 +10887,7 @@ function resolvePointGlyph(name) {
|
|
|
10922
10887
|
return PLANET_GLYPHS[resolved] ?? ANGLE_GLYPHS[resolved] ?? null;
|
|
10923
10888
|
}
|
|
10924
10889
|
function getExternalPointPadding(options, scale) {
|
|
10925
|
-
|
|
10926
|
-
if (externalLayers.length === 0) {
|
|
10927
|
-
return 0;
|
|
10928
|
-
}
|
|
10929
|
-
return Math.max(
|
|
10930
|
-
...externalLayers.map((layer) => (layer.radiusOffset ?? 18) + 36 * scale)
|
|
10931
|
-
);
|
|
10890
|
+
return 0;
|
|
10932
10891
|
}
|
|
10933
10892
|
function buildZodiacSegments(params) {
|
|
10934
10893
|
const { center, angleOf: angleOf2, rings, scale, palette } = params;
|
|
@@ -11023,7 +10982,7 @@ function buildAngleMarkers(params) {
|
|
|
11023
10982
|
};
|
|
11024
10983
|
});
|
|
11025
10984
|
}
|
|
11026
|
-
function
|
|
10985
|
+
function buildPointGroup(params) {
|
|
11027
10986
|
const {
|
|
11028
10987
|
layer,
|
|
11029
10988
|
center,
|
|
@@ -11037,7 +10996,7 @@ function buildPointLayer(params) {
|
|
|
11037
10996
|
railVisibility
|
|
11038
10997
|
} = params;
|
|
11039
10998
|
const ring = rings.planets;
|
|
11040
|
-
const requestedRadius =
|
|
10999
|
+
const requestedRadius = resolvePointGroupRadius(layer, rings);
|
|
11041
11000
|
const requestedExternalLayer = requestedRadius > rings.houses.r2 + scale;
|
|
11042
11001
|
const thickness = ring.r2 - ring.r1;
|
|
11043
11002
|
const glyphFontSize = clamp(thickness * 0.68, 14 * scale, 30 * scale) * (layer.glyphScale ?? 1);
|
|
@@ -11177,15 +11136,6 @@ function buildPointLayer(params) {
|
|
|
11177
11136
|
connector
|
|
11178
11137
|
};
|
|
11179
11138
|
});
|
|
11180
|
-
const notches = buildBoundaryNotches({
|
|
11181
|
-
layerId: layer.id,
|
|
11182
|
-
points,
|
|
11183
|
-
houses: layer.chart?.houses.houses ?? [],
|
|
11184
|
-
center,
|
|
11185
|
-
radius,
|
|
11186
|
-
ring,
|
|
11187
|
-
scale
|
|
11188
|
-
});
|
|
11189
11139
|
return {
|
|
11190
11140
|
id: layer.id,
|
|
11191
11141
|
label: layer.label,
|
|
@@ -11193,7 +11143,6 @@ function buildPointLayer(params) {
|
|
|
11193
11143
|
tickColor,
|
|
11194
11144
|
radius,
|
|
11195
11145
|
rails,
|
|
11196
|
-
notches,
|
|
11197
11146
|
points
|
|
11198
11147
|
};
|
|
11199
11148
|
}
|
|
@@ -11225,7 +11174,7 @@ function makeAstroWheelPoint(params) {
|
|
|
11225
11174
|
});
|
|
11226
11175
|
const glyphScale = glyphFontSize * 0.66;
|
|
11227
11176
|
return {
|
|
11228
|
-
|
|
11177
|
+
groupId: layer.id,
|
|
11229
11178
|
key: seed.key,
|
|
11230
11179
|
name: seed.name,
|
|
11231
11180
|
kind: seed.kind,
|
|
@@ -11260,13 +11209,13 @@ function makeAstroWheelPoint(params) {
|
|
|
11260
11209
|
};
|
|
11261
11210
|
}
|
|
11262
11211
|
function resolveRailVisibility(input) {
|
|
11263
|
-
if (input === "glyph-only") {
|
|
11212
|
+
if (!input || input === "glyph-only") {
|
|
11264
11213
|
return { degree: false, sign: false, minutes: false, retrograde: false };
|
|
11265
11214
|
}
|
|
11266
11215
|
if (input === "compact") {
|
|
11267
11216
|
return { degree: true, sign: true, minutes: false, retrograde: true };
|
|
11268
11217
|
}
|
|
11269
|
-
if (
|
|
11218
|
+
if (input === "full") {
|
|
11270
11219
|
return { degree: true, sign: true, minutes: true, retrograde: true };
|
|
11271
11220
|
}
|
|
11272
11221
|
return {
|
|
@@ -11385,84 +11334,20 @@ function buildPointLineConnector(params) {
|
|
|
11385
11334
|
y2: params.glyphPosition.y
|
|
11386
11335
|
};
|
|
11387
11336
|
}
|
|
11388
|
-
function
|
|
11389
|
-
if (params.houses.length === 0)
|
|
11390
|
-
return [];
|
|
11391
|
-
const { center, ring, radius, scale } = params;
|
|
11392
|
-
return params.points.flatMap((point) => {
|
|
11393
|
-
if (!point.nearestCuspHouse || point.nearestCuspDistanceDegrees === void 0)
|
|
11394
|
-
return [];
|
|
11395
|
-
const displaced = circularAngleDistance(point.trueAngle, point.displayAngle) > deg2rad2(0.35);
|
|
11396
|
-
if (!displaced)
|
|
11397
|
-
return [];
|
|
11398
|
-
const cusp = params.houses[point.nearestCuspHouse - 1];
|
|
11399
|
-
const cuspAngle = point.trueAngle + deg2rad2(shortestLongitudeDistance(point.longitude, cusp.longitude));
|
|
11400
|
-
const trueDelta = signedAngleDelta(cuspAngle, point.trueAngle);
|
|
11401
|
-
const displayDelta = signedAngleDelta(cuspAngle, point.displayAngle);
|
|
11402
|
-
const crossed = Math.sign(trueDelta) !== Math.sign(displayDelta) && displayDelta !== 0;
|
|
11403
|
-
const crowds = point.nearestCuspDistanceDegrees <= 2;
|
|
11404
|
-
if (!crossed && !crowds)
|
|
11405
|
-
return [];
|
|
11406
|
-
const glyphHalfAngle = Math.max(point.glyphScale * 0.62, 4 * scale) / Math.max(radius, 1);
|
|
11407
|
-
const directed = displayDelta === 0 ? trueDelta : displayDelta;
|
|
11408
|
-
const direction = directed >= 0 ? 1 : -1;
|
|
11409
|
-
const endAngle = cuspAngle + directed + direction * glyphHalfAngle;
|
|
11410
|
-
const halfThickness = Math.max(point.glyphScale * 0.9, 7 * scale);
|
|
11411
|
-
const innerRadius = clamp(radius - halfThickness, ring.r1, ring.r2);
|
|
11412
|
-
const outerRadius = clamp(radius + halfThickness, ring.r1, ring.r2);
|
|
11413
|
-
return [{
|
|
11414
|
-
id: `${params.layerId}-${point.key}-notch`,
|
|
11415
|
-
layerId: params.layerId,
|
|
11416
|
-
pointKey: point.key,
|
|
11417
|
-
house: point.house ?? 0,
|
|
11418
|
-
cuspHouse: point.nearestCuspHouse,
|
|
11419
|
-
cuspLongitude: normalizeAngle2(cusp.longitude),
|
|
11420
|
-
radius: outerRadius,
|
|
11421
|
-
innerRadius,
|
|
11422
|
-
outerRadius,
|
|
11423
|
-
startAngle: cuspAngle,
|
|
11424
|
-
endAngle,
|
|
11425
|
-
path: boundaryNotchPath(center, innerRadius, outerRadius, cuspAngle, endAngle)
|
|
11426
|
-
}];
|
|
11427
|
-
});
|
|
11428
|
-
}
|
|
11429
|
-
function boundaryNotchPath(center, innerRadius, outerRadius, cuspAngle, endAngle) {
|
|
11430
|
-
const outerCusp = polarToXY2(center.x, center.y, outerRadius, cuspAngle);
|
|
11431
|
-
const outerEnd = polarToXY2(center.x, center.y, outerRadius, endAngle);
|
|
11432
|
-
const innerEnd = polarToXY2(center.x, center.y, innerRadius, endAngle);
|
|
11433
|
-
const innerCusp = polarToXY2(center.x, center.y, innerRadius, cuspAngle);
|
|
11434
|
-
const delta = signedAngleDelta(cuspAngle, endAngle);
|
|
11435
|
-
const sweepOuter = delta >= 0 ? 1 : 0;
|
|
11436
|
-
const sweepInner = delta >= 0 ? 0 : 1;
|
|
11437
|
-
return [
|
|
11438
|
-
`M ${fmt2(outerCusp.x)} ${fmt2(outerCusp.y)}`,
|
|
11439
|
-
`A ${fmt2(outerRadius)} ${fmt2(outerRadius)} 0 0 ${sweepOuter} ${fmt2(outerEnd.x)} ${fmt2(outerEnd.y)}`,
|
|
11440
|
-
`L ${fmt2(innerEnd.x)} ${fmt2(innerEnd.y)}`,
|
|
11441
|
-
`A ${fmt2(innerRadius)} ${fmt2(innerRadius)} 0 0 ${sweepInner} ${fmt2(innerCusp.x)} ${fmt2(innerCusp.y)}`,
|
|
11442
|
-
"Z"
|
|
11443
|
-
].join(" ");
|
|
11444
|
-
}
|
|
11445
|
-
function buildAspectLayer(params) {
|
|
11337
|
+
function buildAspectGroup(params) {
|
|
11446
11338
|
const { layer, chart, pointByKey, center, angleOf: angleOf2, rings, palette, excludedBodies } = params;
|
|
11447
|
-
const sourceEdges = layer.edges ? layer.edges :
|
|
11448
|
-
chart.planets,
|
|
11449
|
-
layer.chartB.planets,
|
|
11450
|
-
layer.aspectSpecs ?? ASTRO_WHEEL_DEFAULT_ASPECT_SPECS
|
|
11451
|
-
) : getSourceAspectEdges(chart, {
|
|
11339
|
+
const sourceEdges = layer.edges ? layer.edges : getSourceAspectEdges(chart, {
|
|
11452
11340
|
enabled: true,
|
|
11453
11341
|
edges: layer.edges,
|
|
11454
11342
|
aspectSpecs: layer.aspectSpecs
|
|
11455
11343
|
});
|
|
11456
11344
|
const aspectRadius = layer.radius ?? rings.aspects.r2 * (layer.radiusScale ?? 0.96);
|
|
11457
|
-
const layerPointPrefix = pointKeyPrefix(layer.pointLayerId);
|
|
11458
|
-
const layerPointPrefixA = layer.pointLayerIdA ? pointKeyPrefix(layer.pointLayerIdA) : layerPointPrefix;
|
|
11459
|
-
const layerPointPrefixB = layer.pointLayerIdB ? pointKeyPrefix(layer.pointLayerIdB) : layerPointPrefix;
|
|
11460
11345
|
const aspectLines = sourceEdges.flatMap((edge) => {
|
|
11461
11346
|
if (isExcludedBody(edge.planetA, excludedBodies) || isExcludedBody(edge.planetB, excludedBodies)) {
|
|
11462
11347
|
return [];
|
|
11463
11348
|
}
|
|
11464
|
-
const planetAKey =
|
|
11465
|
-
const planetBKey =
|
|
11349
|
+
const planetAKey = normalizePointKey(edge.planetA);
|
|
11350
|
+
const planetBKey = normalizePointKey(edge.planetB);
|
|
11466
11351
|
const planetA = pointByKey[planetAKey];
|
|
11467
11352
|
const planetB = pointByKey[planetBKey];
|
|
11468
11353
|
if (!planetA || !planetB) {
|
|
@@ -11474,7 +11359,7 @@ function buildAspectLayer(params) {
|
|
|
11474
11359
|
const a = layer.radius || layer.radiusScale ? polarToXY2(center.x, center.y, aspectRadius, angleOf2(planetA.longitude)) : planetA.trueAnchor;
|
|
11475
11360
|
const b = layer.radius || layer.radiusScale ? polarToXY2(center.x, center.y, aspectRadius, angleOf2(planetB.longitude)) : planetB.trueAnchor;
|
|
11476
11361
|
return [{
|
|
11477
|
-
|
|
11362
|
+
groupId: layer.id,
|
|
11478
11363
|
planetA: planetA.name,
|
|
11479
11364
|
planetB: planetB.name,
|
|
11480
11365
|
planetAKey,
|
|
@@ -11533,9 +11418,9 @@ function getPointSeeds(layer, excludedBodies) {
|
|
|
11533
11418
|
}
|
|
11534
11419
|
return seeds.filter((seed) => !isExcludedBody(seed.name, excludedBodies)).sort((a, b) => normalizeAngle2(a.longitude) - normalizeAngle2(b.longitude));
|
|
11535
11420
|
}
|
|
11536
|
-
function planetSeed(key, planet,
|
|
11421
|
+
function planetSeed(key, planet, groupId) {
|
|
11537
11422
|
return {
|
|
11538
|
-
key: layerPointKey(
|
|
11423
|
+
key: layerPointKey(groupId, key || planet.name),
|
|
11539
11424
|
name: planet.name,
|
|
11540
11425
|
kind: "planet",
|
|
11541
11426
|
glyph: pointGlyph(planet.name),
|
|
@@ -11545,9 +11430,9 @@ function planetSeed(key, planet, layerId) {
|
|
|
11545
11430
|
zodiacPosition: planet.zodiacPosition
|
|
11546
11431
|
};
|
|
11547
11432
|
}
|
|
11548
|
-
function nodeSeed(key, node,
|
|
11433
|
+
function nodeSeed(key, node, groupId) {
|
|
11549
11434
|
return {
|
|
11550
|
-
key: layerPointKey(
|
|
11435
|
+
key: layerPointKey(groupId, node.name || key),
|
|
11551
11436
|
name: node.name,
|
|
11552
11437
|
kind: "node",
|
|
11553
11438
|
glyph: pointGlyph(node.name),
|
|
@@ -11556,9 +11441,9 @@ function nodeSeed(key, node, layerId) {
|
|
|
11556
11441
|
zodiacPosition: node
|
|
11557
11442
|
};
|
|
11558
11443
|
}
|
|
11559
|
-
function pointSeed(point,
|
|
11444
|
+
function pointSeed(point, groupId) {
|
|
11560
11445
|
return {
|
|
11561
|
-
key: layerPointKey(
|
|
11446
|
+
key: layerPointKey(groupId, point.key ?? point.name),
|
|
11562
11447
|
name: point.name,
|
|
11563
11448
|
kind: point.kind ?? "planet",
|
|
11564
11449
|
glyph: point.glyph ?? pointGlyph(point.name),
|
|
@@ -11573,7 +11458,7 @@ function solveCircularLabelAngles(items, options) {
|
|
|
11573
11458
|
if (items.length === 0) {
|
|
11574
11459
|
return [];
|
|
11575
11460
|
}
|
|
11576
|
-
const normalized = items.map((item) => ({
|
|
11461
|
+
const normalized = seedExactAngleClusters(items, { paddingPx, maxDisplacementRad }).map((item) => ({
|
|
11577
11462
|
...item,
|
|
11578
11463
|
idealAngle: clampRad(item.idealAngle)
|
|
11579
11464
|
})).sort((a, b) => a.idealAngle - b.idealAngle);
|
|
@@ -11612,8 +11497,8 @@ function solveCircularLabelAngles(items, options) {
|
|
|
11612
11497
|
}
|
|
11613
11498
|
const solved = linear.map((item) => ({
|
|
11614
11499
|
...item,
|
|
11615
|
-
visualAngle: item.idealAngle
|
|
11616
|
-
}));
|
|
11500
|
+
visualAngle: item.visualAngleSeed ?? item.idealAngle
|
|
11501
|
+
})).sort((a, b) => a.visualAngle - b.visualAngle);
|
|
11617
11502
|
for (let iteration = 0; iteration < 50; iteration++) {
|
|
11618
11503
|
const forces = new Array(solved.length).fill(0);
|
|
11619
11504
|
let maxForce = 0;
|
|
@@ -11656,6 +11541,38 @@ function solveCircularLabelAngles(items, options) {
|
|
|
11656
11541
|
visualAngle: clampRad(item.visualAngle)
|
|
11657
11542
|
}));
|
|
11658
11543
|
}
|
|
11544
|
+
function seedExactAngleClusters(items, options) {
|
|
11545
|
+
const seeded = items.map((item) => ({
|
|
11546
|
+
...item,
|
|
11547
|
+
idealAngle: clampRad(item.idealAngle)
|
|
11548
|
+
}));
|
|
11549
|
+
const groups = /* @__PURE__ */ new Map();
|
|
11550
|
+
for (const item of seeded) {
|
|
11551
|
+
const key = item.idealAngle.toFixed(6);
|
|
11552
|
+
const group = groups.get(key);
|
|
11553
|
+
if (group) {
|
|
11554
|
+
group.push(item);
|
|
11555
|
+
} else {
|
|
11556
|
+
groups.set(key, [item]);
|
|
11557
|
+
}
|
|
11558
|
+
}
|
|
11559
|
+
for (const group of groups.values()) {
|
|
11560
|
+
if (group.length < 2) {
|
|
11561
|
+
continue;
|
|
11562
|
+
}
|
|
11563
|
+
const center = group[0].idealAngle;
|
|
11564
|
+
const largestDemand = Math.max(
|
|
11565
|
+
...group.map((item) => labelAngularHalfDemand(item, options.paddingPx) * 2)
|
|
11566
|
+
);
|
|
11567
|
+
const maxStep = group.length > 1 ? options.maxDisplacementRad * 2 / (group.length - 1) : largestDemand;
|
|
11568
|
+
const step = Math.min(largestDemand, maxStep);
|
|
11569
|
+
const midpoint2 = (group.length - 1) / 2;
|
|
11570
|
+
group.forEach((item, index) => {
|
|
11571
|
+
item.visualAngleSeed = center + (index - midpoint2) * step;
|
|
11572
|
+
});
|
|
11573
|
+
}
|
|
11574
|
+
return seeded;
|
|
11575
|
+
}
|
|
11659
11576
|
function clampAngleAroundIdeal(value, ideal, maxDistance) {
|
|
11660
11577
|
if (!Number.isFinite(maxDistance) || maxDistance >= Math.PI) {
|
|
11661
11578
|
return value;
|
|
@@ -11739,32 +11656,6 @@ function computeAspectEdges(planets, specs) {
|
|
|
11739
11656
|
}
|
|
11740
11657
|
return edges;
|
|
11741
11658
|
}
|
|
11742
|
-
function computeCrossAspectEdges(planetsA, planetsB, specs) {
|
|
11743
|
-
const keysA = Object.keys(planetsA);
|
|
11744
|
-
const keysB = Object.keys(planetsB);
|
|
11745
|
-
const edges = [];
|
|
11746
|
-
for (const keyA of keysA) {
|
|
11747
|
-
for (const keyB of keysB) {
|
|
11748
|
-
const planetA = planetsA[keyA];
|
|
11749
|
-
const planetB = planetsB[keyB];
|
|
11750
|
-
const match = getAspectMatch2(planetA.longitude, planetB.longitude, specs);
|
|
11751
|
-
if (!match) {
|
|
11752
|
-
continue;
|
|
11753
|
-
}
|
|
11754
|
-
edges.push({
|
|
11755
|
-
planetA: keyA,
|
|
11756
|
-
planetB: keyB,
|
|
11757
|
-
longitudeA: normalizeAngle2(planetA.longitude),
|
|
11758
|
-
longitudeB: normalizeAngle2(planetB.longitude),
|
|
11759
|
-
aspect: match.spec.name,
|
|
11760
|
-
aspectAngle: match.spec.angle,
|
|
11761
|
-
delta: match.delta,
|
|
11762
|
-
orb: match.orb
|
|
11763
|
-
});
|
|
11764
|
-
}
|
|
11765
|
-
}
|
|
11766
|
-
return edges;
|
|
11767
|
-
}
|
|
11768
11659
|
function getAspectMatch2(lonA, lonB, specs) {
|
|
11769
11660
|
const delta = Math.min(
|
|
11770
11661
|
normalizeAngle2(lonB - lonA),
|
|
@@ -11913,7 +11804,7 @@ function resolveAspectOptions(options) {
|
|
|
11913
11804
|
aspectSpecs: options.aspectSpecs
|
|
11914
11805
|
};
|
|
11915
11806
|
}
|
|
11916
|
-
function
|
|
11807
|
+
function resolvePointGroupRadius(layer, rings) {
|
|
11917
11808
|
const ring = rings.planets;
|
|
11918
11809
|
if (layer.radius === "external") {
|
|
11919
11810
|
return rings.houses.r2 + (layer.radiusOffset ?? 18);
|
|
@@ -11946,12 +11837,9 @@ function isExcludedBody(name, excludedBodies) {
|
|
|
11946
11837
|
function normalizePointKey(value) {
|
|
11947
11838
|
return value.trim().toLocaleLowerCase().replace(/[_-]+/g, " ").replace(/\s+/g, " ");
|
|
11948
11839
|
}
|
|
11949
|
-
function layerPointKey(
|
|
11840
|
+
function layerPointKey(groupId, value) {
|
|
11950
11841
|
const key = normalizePointKey(value);
|
|
11951
|
-
return
|
|
11952
|
-
}
|
|
11953
|
-
function pointKeyPrefix(layerId) {
|
|
11954
|
-
return !layerId || layerId === "birth" ? "" : `${layerId}:`;
|
|
11842
|
+
return groupId === "birth" ? key : `${groupId}:${key}`;
|
|
11955
11843
|
}
|
|
11956
11844
|
function renderGlyphPrimitives(push, primitives, options) {
|
|
11957
11845
|
for (const p of primitives) {
|
|
@@ -15352,13 +15240,13 @@ function loadHermeticQabalah(tree) {
|
|
|
15352
15240
|
}
|
|
15353
15241
|
];
|
|
15354
15242
|
for (const path of paths) {
|
|
15355
|
-
const
|
|
15243
|
+
const pathId2 = tree.addPath({
|
|
15356
15244
|
leftSphere: path.leftSphere,
|
|
15357
15245
|
rightSphere: path.rightSphere,
|
|
15358
15246
|
relatedNumber: path.relatedNumber
|
|
15359
15247
|
});
|
|
15360
15248
|
tree.addLetters({
|
|
15361
|
-
path:
|
|
15249
|
+
path: pathId2,
|
|
15362
15250
|
letters: path.letters
|
|
15363
15251
|
});
|
|
15364
15252
|
}
|
|
@@ -16691,14 +16579,14 @@ var init_kaabalah = __esm({
|
|
|
16691
16579
|
}
|
|
16692
16580
|
];
|
|
16693
16581
|
for (const path of paths) {
|
|
16694
|
-
const
|
|
16582
|
+
const pathId2 = tree.addPath({
|
|
16695
16583
|
leftSphere: path.leftSphere,
|
|
16696
16584
|
rightSphere: path.rightSphere,
|
|
16697
16585
|
relatedNumber: path.relatedNumber,
|
|
16698
16586
|
data: path.data
|
|
16699
16587
|
});
|
|
16700
16588
|
tree.addLetters({
|
|
16701
|
-
path:
|
|
16589
|
+
path: pathId2,
|
|
16702
16590
|
letters: path.letters
|
|
16703
16591
|
});
|
|
16704
16592
|
}
|
|
@@ -19018,13 +18906,13 @@ function loadLurianicKabbalah(tree) {
|
|
|
19018
18906
|
}
|
|
19019
18907
|
];
|
|
19020
18908
|
for (const path of paths) {
|
|
19021
|
-
const
|
|
18909
|
+
const pathId2 = tree.addPath({
|
|
19022
18910
|
leftSphere: path.leftSphere,
|
|
19023
18911
|
rightSphere: path.rightSphere,
|
|
19024
18912
|
relatedNumber: path.relatedNumber
|
|
19025
18913
|
});
|
|
19026
18914
|
tree.addLetters({
|
|
19027
|
-
path:
|
|
18915
|
+
path: pathId2,
|
|
19028
18916
|
letters: path.letters
|
|
19029
18917
|
});
|
|
19030
18918
|
}
|
|
@@ -19513,7 +19401,7 @@ var init_tree_of_life = __esm({
|
|
|
19513
19401
|
relatedNumber,
|
|
19514
19402
|
data
|
|
19515
19403
|
}) {
|
|
19516
|
-
const
|
|
19404
|
+
const pathId2 = this.upsertNode(
|
|
19517
19405
|
new BaseNode({
|
|
19518
19406
|
id: relatedNumber,
|
|
19519
19407
|
type: "path" /* PATH */,
|
|
@@ -19526,11 +19414,11 @@ var init_tree_of_life = __esm({
|
|
|
19526
19414
|
);
|
|
19527
19415
|
const numberOfSpheres = 10;
|
|
19528
19416
|
const pathNumber = relatedNumber + numberOfSpheres;
|
|
19529
|
-
this.link(leftSphere,
|
|
19530
|
-
this.link(rightSphere,
|
|
19531
|
-
this.addNumber({ number: relatedNumber, nodeId:
|
|
19532
|
-
this.addNumber({ number: pathNumber, nodeId:
|
|
19533
|
-
return
|
|
19417
|
+
this.link(leftSphere, pathId2);
|
|
19418
|
+
this.link(rightSphere, pathId2);
|
|
19419
|
+
this.addNumber({ number: relatedNumber, nodeId: pathId2 });
|
|
19420
|
+
this.addNumber({ number: pathNumber, nodeId: pathId2 });
|
|
19421
|
+
return pathId2;
|
|
19534
19422
|
}
|
|
19535
19423
|
addLetters({
|
|
19536
19424
|
path,
|
|
@@ -19650,10 +19538,10 @@ function cloneSphereData(data) {
|
|
|
19650
19538
|
function clonePathData(data) {
|
|
19651
19539
|
return { ...data };
|
|
19652
19540
|
}
|
|
19653
|
-
function parsePathNumber(
|
|
19654
|
-
const parsed = Number.parseInt(parseId(
|
|
19541
|
+
function parsePathNumber(pathId2) {
|
|
19542
|
+
const parsed = Number.parseInt(parseId(pathId2), 10);
|
|
19655
19543
|
if (!Number.isInteger(parsed)) {
|
|
19656
|
-
throw new Error(`Invalid tree path id: ${
|
|
19544
|
+
throw new Error(`Invalid tree path id: ${pathId2}`);
|
|
19657
19545
|
}
|
|
19658
19546
|
return parsed;
|
|
19659
19547
|
}
|
|
@@ -20488,6 +20376,25 @@ var init_core = __esm({
|
|
|
20488
20376
|
});
|
|
20489
20377
|
|
|
20490
20378
|
// src/visual/tree.ts
|
|
20379
|
+
function iridescentColorAt(t) {
|
|
20380
|
+
const frac = (t % 1 + 1) % 1;
|
|
20381
|
+
return interpolateColorStops(IRIDESCENT_STOPS, frac);
|
|
20382
|
+
}
|
|
20383
|
+
function iridescentContactT(center, toward) {
|
|
20384
|
+
const degrees = Math.atan2(toward.y - center.y, toward.x - center.x) * 180 / Math.PI;
|
|
20385
|
+
return ((degrees + 90) / 360 % 1 + 1) % 1;
|
|
20386
|
+
}
|
|
20387
|
+
function edgeAnchoredVector(from, to, radius) {
|
|
20388
|
+
const length = Math.hypot(to.x - from.x, to.y - from.y) || 1;
|
|
20389
|
+
const ux = (to.x - from.x) / length;
|
|
20390
|
+
const uy = (to.y - from.y) / length;
|
|
20391
|
+
return {
|
|
20392
|
+
x1: round3(from.x + ux * radius),
|
|
20393
|
+
y1: round3(from.y + uy * radius),
|
|
20394
|
+
x2: round3(to.x - ux * radius),
|
|
20395
|
+
y2: round3(to.y - uy * radius)
|
|
20396
|
+
};
|
|
20397
|
+
}
|
|
20491
20398
|
function getTreeLayout(system = "kaabalah") {
|
|
20492
20399
|
const tree = createTree({ system });
|
|
20493
20400
|
const percentages = buildLayoutMap(tree, CANONICAL_SPHERE_PERCENTAGES);
|
|
@@ -20724,21 +20631,44 @@ function generateTreeSvg(options = {}) {
|
|
|
20724
20631
|
`<clipPath id="clip-${slug}"><circle cx="${point.x}" cy="${point.y}" r="${radius}"/></clipPath>`
|
|
20725
20632
|
);
|
|
20726
20633
|
}
|
|
20727
|
-
|
|
20728
|
-
|
|
20729
|
-
|
|
20730
|
-
|
|
20731
|
-
|
|
20732
|
-
|
|
20733
|
-
|
|
20734
|
-
|
|
20735
|
-
|
|
20736
|
-
|
|
20737
|
-
|
|
20738
|
-
|
|
20739
|
-
|
|
20740
|
-
|
|
20741
|
-
|
|
20634
|
+
if (palette.mode === "color") {
|
|
20635
|
+
for (const splitPathId of SPLIT_GRADIENT_PATH_IDS) {
|
|
20636
|
+
const splitPath = layout.paths[splitPathId];
|
|
20637
|
+
if (!splitPath || highlights.pathColors[splitPathId] !== void 0 || activationMap.get(splitPathId) !== void 0) {
|
|
20638
|
+
continue;
|
|
20639
|
+
}
|
|
20640
|
+
const fromColor = resolveSplitEndpointColor({
|
|
20641
|
+
palette,
|
|
20642
|
+
sphereId: splitPath.fromId,
|
|
20643
|
+
tree
|
|
20644
|
+
});
|
|
20645
|
+
const toColor = resolveSplitEndpointColor({
|
|
20646
|
+
palette,
|
|
20647
|
+
sphereId: splitPath.toId,
|
|
20648
|
+
tree
|
|
20649
|
+
});
|
|
20650
|
+
const blendStart = round3(50 - SPLIT_GRADIENT_BLEND / 2);
|
|
20651
|
+
const blendEnd = round3(50 + SPLIT_GRADIENT_BLEND / 2);
|
|
20652
|
+
const fromName = parseId(splitPath.fromId);
|
|
20653
|
+
const toName = parseId(splitPath.toId);
|
|
20654
|
+
const contactT = toName === "Chokhmah" ? iridescentContactT(splitPath.to, splitPath.from) : fromName === "Chokhmah" ? iridescentContactT(splitPath.from, splitPath.to) : null;
|
|
20655
|
+
const stops = buildSplitGradientStops({
|
|
20656
|
+
fromName,
|
|
20657
|
+
toName,
|
|
20658
|
+
fromColor,
|
|
20659
|
+
toColor,
|
|
20660
|
+
blendStart,
|
|
20661
|
+
blendEnd,
|
|
20662
|
+
contactT
|
|
20663
|
+
});
|
|
20664
|
+
const edge = edgeAnchoredVector(splitPath.from, splitPath.to, radius);
|
|
20665
|
+
push(
|
|
20666
|
+
`<linearGradient id="path-grad-${parseId(splitPathId)}" gradientUnits="userSpaceOnUse" x1="${edge.x1}" y1="${edge.y1}" x2="${edge.x2}" y2="${edge.y2}">
|
|
20667
|
+
${stops}
|
|
20668
|
+
</linearGradient>`
|
|
20669
|
+
);
|
|
20670
|
+
}
|
|
20671
|
+
}
|
|
20742
20672
|
push(`</defs>`);
|
|
20743
20673
|
const background = options.background ?? "white";
|
|
20744
20674
|
if (background !== "transparent") {
|
|
@@ -20784,22 +20714,31 @@ function generateTreeSvg(options = {}) {
|
|
|
20784
20714
|
activation: activationMap.get(currentPathId),
|
|
20785
20715
|
canonicalColor
|
|
20786
20716
|
});
|
|
20787
|
-
const
|
|
20788
|
-
|
|
20789
|
-
|
|
20790
|
-
}) :
|
|
20791
|
-
const
|
|
20792
|
-
|
|
20793
|
-
|
|
20794
|
-
|
|
20717
|
+
const useSplitGradient = palette.mode === "color" && !activation && highlights.pathColors[currentPathId] === void 0 && SPLIT_GRADIENT_PATH_IDS.has(currentPathId);
|
|
20718
|
+
const solidColor = activation ? resolvePathDisplayColor({ canonicalColor, activation }) : baseColor;
|
|
20719
|
+
const solidEdgeColor = resolvePathEdgeColor({ palette, pathColor: solidColor });
|
|
20720
|
+
const gradientRef = useSplitGradient ? `url(#path-grad-${parseId(currentPathId)})` : null;
|
|
20721
|
+
const color = gradientRef ?? solidColor;
|
|
20722
|
+
const edgeColor = gradientRef ?? solidEdgeColor;
|
|
20723
|
+
const edgeFilter = palette.pathEdgeUseFilter ? ` filter="url(#pathDarken)"` : "";
|
|
20724
|
+
if (gradientRef) {
|
|
20725
|
+
push(
|
|
20726
|
+
`<line x1="${path.from.x}" y1="${path.from.y}" x2="${path.to.x}" y2="${path.to.y}" stroke="${escapeAttr3(solidEdgeColor)}" stroke-width="${pathEdgeWidth}" stroke-linecap="round"${edgeFilter}/>`
|
|
20727
|
+
);
|
|
20728
|
+
}
|
|
20795
20729
|
push(
|
|
20796
|
-
`<line x1="${path.from.x}" y1="${path.from.y}" x2="${path.to.x}" y2="${path.to.y}" stroke="${escapeAttr3(edgeColor)}" stroke-width="${pathEdgeWidth}" stroke-linecap="round"${
|
|
20730
|
+
`<line x1="${path.from.x}" y1="${path.from.y}" x2="${path.to.x}" y2="${path.to.y}" stroke="${escapeAttr3(edgeColor)}" stroke-width="${pathEdgeWidth}" stroke-linecap="round"${edgeFilter}/>`
|
|
20797
20731
|
);
|
|
20798
20732
|
if (activation?.visible && activation.emphasis > 0) {
|
|
20799
20733
|
push(
|
|
20800
20734
|
`<line x1="${path.from.x}" y1="${path.from.y}" x2="${path.to.x}" y2="${path.to.y}" stroke="${escapeAttr3(color)}" stroke-opacity="${round3(0.18 + activation.emphasis * 0.28)}" stroke-width="${round3(pathEdgeWidth + activation.emphasis * 10)}" stroke-linecap="round"/>`
|
|
20801
20735
|
);
|
|
20802
20736
|
}
|
|
20737
|
+
if (gradientRef) {
|
|
20738
|
+
push(
|
|
20739
|
+
`<line x1="${path.from.x}" y1="${path.from.y}" x2="${path.to.x}" y2="${path.to.y}" stroke="${escapeAttr3(solidColor)}" stroke-width="${pathMainWidth}" stroke-linecap="round"/>`
|
|
20740
|
+
);
|
|
20741
|
+
}
|
|
20803
20742
|
push(
|
|
20804
20743
|
`<line x1="${path.from.x}" y1="${path.from.y}" x2="${path.to.x}" y2="${path.to.y}" stroke="${escapeAttr3(color)}" stroke-width="${pathMainWidth}" stroke-linecap="round"/>`
|
|
20805
20744
|
);
|
|
@@ -20914,6 +20853,16 @@ function renderSphere(push, params) {
|
|
|
20914
20853
|
push(
|
|
20915
20854
|
`<circle cx="${point.x}" cy="${point.y}" r="${params.radius}" fill="none" stroke="${escapeAttr3(params.palette.sphereStrokeColor)}" stroke-width="${params.sphereStrokeWidth}"/>`
|
|
20916
20855
|
);
|
|
20856
|
+
} else if (INNER_BORDER_SPHERE_NAMES.has(params.sphereName)) {
|
|
20857
|
+
const borderWidth = round3(params.radius * 0.05);
|
|
20858
|
+
const borderColor = interpolateColor(
|
|
20859
|
+
toPrimaryFill(activeFill, params.palette.defaultSphereFill),
|
|
20860
|
+
"#000000",
|
|
20861
|
+
0.2
|
|
20862
|
+
);
|
|
20863
|
+
push(
|
|
20864
|
+
`<circle cx="${point.x}" cy="${point.y}" r="${round3(params.radius - borderWidth / 2)}" fill="none" stroke="${escapeAttr3(borderColor)}" stroke-width="${borderWidth}"/>`
|
|
20865
|
+
);
|
|
20917
20866
|
}
|
|
20918
20867
|
}
|
|
20919
20868
|
function buildLayoutMap(tree, spherePositions) {
|
|
@@ -21000,6 +20949,40 @@ function resolveTargetActivation(params) {
|
|
|
21000
20949
|
emphasis: state === "selected" ? clamp01(Math.max(strength, 0.9)) : state === "hovered" ? clamp01(Math.max(strength, 0.72)) : state === "active" ? clamp01(Math.max(strength, 0.56)) : 0
|
|
21001
20950
|
};
|
|
21002
20951
|
}
|
|
20952
|
+
function resolveSplitEndpointColor(params) {
|
|
20953
|
+
const name = parseId(params.sphereId);
|
|
20954
|
+
return SPECIAL_SPHERE_PATH_COLORS[name] ?? resolveSphereCanonicalColor(params);
|
|
20955
|
+
}
|
|
20956
|
+
function buildSplitGradientStops(params) {
|
|
20957
|
+
const { fromName, toName, fromColor, toColor, blendStart, blendEnd, contactT } = params;
|
|
20958
|
+
const stop = (offset, color) => ` <stop offset="${round3(offset)}%" stop-color="${escapeAttr3(color)}"/>`;
|
|
20959
|
+
const sweep = (start, end, t0, sphereAtEnd) => Array.from({ length: CHOKHMAH_SWEEP_SAMPLES }, (_, index) => {
|
|
20960
|
+
const f = index / (CHOKHMAH_SWEEP_SAMPLES - 1);
|
|
20961
|
+
const offset = start + f * (end - start);
|
|
20962
|
+
const along = sphereAtEnd ? 1 - f : f;
|
|
20963
|
+
return stop(offset, iridescentColorAt(t0 + along * CHOKHMAH_SWEEP_SPAN));
|
|
20964
|
+
});
|
|
20965
|
+
if (toName === "Chokhmah" && contactT !== null) {
|
|
20966
|
+
return [
|
|
20967
|
+
stop(0, fromColor),
|
|
20968
|
+
stop(blendStart, fromColor),
|
|
20969
|
+
...sweep(blendEnd, 100, contactT, true)
|
|
20970
|
+
].join("\n");
|
|
20971
|
+
}
|
|
20972
|
+
if (fromName === "Chokhmah" && contactT !== null) {
|
|
20973
|
+
return [
|
|
20974
|
+
...sweep(0, blendStart, contactT, false),
|
|
20975
|
+
stop(blendEnd, toColor),
|
|
20976
|
+
stop(100, toColor)
|
|
20977
|
+
].join("\n");
|
|
20978
|
+
}
|
|
20979
|
+
return [
|
|
20980
|
+
stop(0, fromColor),
|
|
20981
|
+
stop(blendStart, fromColor),
|
|
20982
|
+
stop(blendEnd, toColor),
|
|
20983
|
+
stop(100, toColor)
|
|
20984
|
+
].join("\n");
|
|
20985
|
+
}
|
|
21003
20986
|
function resolveSphereCanonicalColor(params) {
|
|
21004
20987
|
const override = params.palette.sphereFills[params.sphereId];
|
|
21005
20988
|
if (override) {
|
|
@@ -21247,33 +21230,18 @@ function arcPath2(cx, cy, radius, startDegrees, endDegrees) {
|
|
|
21247
21230
|
const largeArc = endDegrees - startDegrees <= 180 ? 0 : 1;
|
|
21248
21231
|
return `M ${cx} ${cy} L ${start.x} ${start.y} A ${radius} ${radius} 0 ${largeArc} 1 ${end.x} ${end.y} Z`;
|
|
21249
21232
|
}
|
|
21250
|
-
function renderKether(push, point, radius, baseFill =
|
|
21233
|
+
function renderKether(push, point, radius, baseFill = NAZAR_NACRE) {
|
|
21234
|
+
const { x, y } = point;
|
|
21235
|
+
renderIridescent(push, point, radius, NACRE_STOPS);
|
|
21236
|
+
if (baseFill !== NAZAR_NACRE) {
|
|
21237
|
+
renderSphereTintOverlay(push, point, radius, baseFill, 0.5);
|
|
21238
|
+
}
|
|
21251
21239
|
push(
|
|
21252
|
-
`<circle cx="${
|
|
21240
|
+
`<circle cx="${x}" cy="${y}" r="${round3(radius * 0.42)}" fill="${escapeAttr3(NAZAR_IRIS)}"/>`
|
|
21241
|
+
);
|
|
21242
|
+
push(
|
|
21243
|
+
`<circle cx="${x}" cy="${y}" r="${round3(radius * 0.2)}" fill="${escapeAttr3(NAZAR_PUPIL)}"/>`
|
|
21253
21244
|
);
|
|
21254
|
-
push(`<circle cx="${point.x}" cy="${point.y}" r="${radius}" fill="url(#kether-glow)"/>`);
|
|
21255
|
-
const spokes = 16;
|
|
21256
|
-
const innerRadius = round3(radius * 0.18);
|
|
21257
|
-
const outerRadius = round3(radius * 0.92);
|
|
21258
|
-
const innerWidth = round3(radius * 0.04);
|
|
21259
|
-
const angleStep = 360 / spokes;
|
|
21260
|
-
push(`<g opacity="0.85">`);
|
|
21261
|
-
for (let index = 0; index < spokes; index++) {
|
|
21262
|
-
const angle = index * angleStep;
|
|
21263
|
-
push(`<g transform="rotate(${angle} ${point.x} ${point.y})">`);
|
|
21264
|
-
const x0 = round3(point.x - innerWidth);
|
|
21265
|
-
const y0 = round3(point.y - innerRadius);
|
|
21266
|
-
const x1 = point.x;
|
|
21267
|
-
const y1 = round3(point.y - outerRadius);
|
|
21268
|
-
const x2 = round3(point.x + innerWidth);
|
|
21269
|
-
const y2 = round3(point.y - innerRadius);
|
|
21270
|
-
push(
|
|
21271
|
-
`<polygon points="${x0},${y0} ${x1},${y1} ${x2},${y2} ${point.x},${point.y}" fill="url(#kether-facet)"/>`
|
|
21272
|
-
);
|
|
21273
|
-
push(`</g>`);
|
|
21274
|
-
}
|
|
21275
|
-
push(`</g>`);
|
|
21276
|
-
push(`<circle cx="${point.x}" cy="${point.y}" r="${radius}" fill="url(#kether-rim)"/>`);
|
|
21277
21245
|
}
|
|
21278
21246
|
function renderSlicedSphere(push, point, radius, colors, startAngle) {
|
|
21279
21247
|
const segmentCount = colors.length;
|
|
@@ -21285,18 +21253,7 @@ function renderSlicedSphere(push, point, radius, colors, startAngle) {
|
|
|
21285
21253
|
currentAngle += step;
|
|
21286
21254
|
}
|
|
21287
21255
|
}
|
|
21288
|
-
function renderIridescent(push, point, radius) {
|
|
21289
|
-
const stops = [
|
|
21290
|
-
[0, "#F0E8EE"],
|
|
21291
|
-
[0.1, "#ffa3e6"],
|
|
21292
|
-
[0.22, "#a7e0ff"],
|
|
21293
|
-
[0.34, "#baff9a"],
|
|
21294
|
-
[0.46, "#ffe28a"],
|
|
21295
|
-
[0.58, "#c6a4ff"],
|
|
21296
|
-
[0.7, "#9ad6ff"],
|
|
21297
|
-
[0.82, "#ffa3e6"],
|
|
21298
|
-
[1, "#F0E8EE"]
|
|
21299
|
-
];
|
|
21256
|
+
function renderIridescent(push, point, radius, stops = IRIDESCENT_STOPS) {
|
|
21300
21257
|
const slices = 72;
|
|
21301
21258
|
const sphereRadius = round3(radius * 0.96);
|
|
21302
21259
|
for (let index = 0; index < slices; index++) {
|
|
@@ -21373,7 +21330,7 @@ function resolveDualToneFill(fill) {
|
|
|
21373
21330
|
function escapeAttr3(value) {
|
|
21374
21331
|
return value.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """);
|
|
21375
21332
|
}
|
|
21376
|
-
var TREE_SVG_DEFAULT_VIEWBOX, TREE_SPHERE_NAMES, CANONICAL_X_PERCENTAGES, CANONICAL_ROW_Y_PERCENTAGES, DEFAULT_SPHERE_RADIUS, DEFAULT_PATH_EDGE_WIDTH, DEFAULT_PATH_MAIN_WIDTH, DEFAULT_PATH_HIGHLIGHT_WIDTH, DEFAULT_SPHERE_HIT_RADIUS, DEFAULT_PATH_HIT_STROKE_WIDTH, MUTED_TARGET_COLOR, sphereId, TREE_SPHERE_IDS, TREE_PATH_IDS, CANONICAL_SPHERE_PERCENTAGES;
|
|
21333
|
+
var TREE_SVG_DEFAULT_VIEWBOX, TREE_SPHERE_NAMES, CANONICAL_X_PERCENTAGES, CANONICAL_ROW_Y_PERCENTAGES, DEFAULT_SPHERE_RADIUS, DEFAULT_PATH_EDGE_WIDTH, DEFAULT_PATH_MAIN_WIDTH, DEFAULT_PATH_HIGHLIGHT_WIDTH, DEFAULT_SPHERE_HIT_RADIUS, DEFAULT_PATH_HIT_STROKE_WIDTH, MUTED_TARGET_COLOR, INNER_BORDER_SPHERE_NAMES, NAZAR_NACRE, NAZAR_IRIS, NAZAR_PUPIL, sphereId, pathId, SPLIT_GRADIENT_PATH_IDS, SPLIT_GRADIENT_BLEND, SPECIAL_SPHERE_PATH_COLORS, CHOKHMAH_SWEEP_SPAN, CHOKHMAH_SWEEP_SAMPLES, TREE_SPHERE_IDS, TREE_PATH_IDS, CANONICAL_SPHERE_PERCENTAGES, IRIDESCENT_STOPS, NACRE_STOPS;
|
|
21377
21334
|
var init_tree = __esm({
|
|
21378
21335
|
"src/visual/tree.ts"() {
|
|
21379
21336
|
"use strict";
|
|
@@ -21405,7 +21362,23 @@ var init_tree = __esm({
|
|
|
21405
21362
|
DEFAULT_SPHERE_HIT_RADIUS = DEFAULT_SPHERE_RADIUS + 8;
|
|
21406
21363
|
DEFAULT_PATH_HIT_STROKE_WIDTH = DEFAULT_PATH_EDGE_WIDTH + 8;
|
|
21407
21364
|
MUTED_TARGET_COLOR = "#AAA";
|
|
21365
|
+
INNER_BORDER_SPHERE_NAMES = /* @__PURE__ */ new Set(["Tiphareth"]);
|
|
21366
|
+
NAZAR_NACRE = "__nacre__";
|
|
21367
|
+
NAZAR_IRIS = "#33a6dd";
|
|
21368
|
+
NAZAR_PUPIL = "#0b0b12";
|
|
21408
21369
|
sphereId = (name) => id("sphere" /* SPHERE */, name);
|
|
21370
|
+
pathId = (value) => id("path" /* PATH */, value);
|
|
21371
|
+
SPLIT_GRADIENT_PATH_IDS = new Set(
|
|
21372
|
+
Array.from({ length: 22 }, (_, index) => pathId(String(index + 1)))
|
|
21373
|
+
);
|
|
21374
|
+
SPLIT_GRADIENT_BLEND = 34;
|
|
21375
|
+
SPECIAL_SPHERE_PATH_COLORS = {
|
|
21376
|
+
Kether: "#cfe0f2",
|
|
21377
|
+
Chokhmah: "#e6d6ef",
|
|
21378
|
+
Malkuth: "#8a6a52"
|
|
21379
|
+
};
|
|
21380
|
+
CHOKHMAH_SWEEP_SPAN = 0.42;
|
|
21381
|
+
CHOKHMAH_SWEEP_SAMPLES = 12;
|
|
21409
21382
|
TREE_SPHERE_IDS = [...TREE_TOPOLOGY_SPHERE_IDS];
|
|
21410
21383
|
TREE_PATH_IDS = [...TREE_TOPOLOGY_PATH_IDS];
|
|
21411
21384
|
CANONICAL_SPHERE_PERCENTAGES = {
|
|
@@ -21421,6 +21394,27 @@ var init_tree = __esm({
|
|
|
21421
21394
|
[sphereId("Yesod")]: { x: CANONICAL_X_PERCENTAGES.mid, y: CANONICAL_ROW_Y_PERCENTAGES[6] },
|
|
21422
21395
|
[sphereId("Malkuth")]: { x: CANONICAL_X_PERCENTAGES.mid, y: CANONICAL_ROW_Y_PERCENTAGES[7] }
|
|
21423
21396
|
};
|
|
21397
|
+
IRIDESCENT_STOPS = [
|
|
21398
|
+
[0, "#F0E8EE"],
|
|
21399
|
+
[0.1, "#ffa3e6"],
|
|
21400
|
+
[0.22, "#a7e0ff"],
|
|
21401
|
+
[0.34, "#baff9a"],
|
|
21402
|
+
[0.46, "#ffe28a"],
|
|
21403
|
+
[0.58, "#c6a4ff"],
|
|
21404
|
+
[0.7, "#9ad6ff"],
|
|
21405
|
+
[0.82, "#ffa3e6"],
|
|
21406
|
+
[1, "#F0E8EE"]
|
|
21407
|
+
];
|
|
21408
|
+
NACRE_STOPS = [
|
|
21409
|
+
[0, "#eaf6f6"],
|
|
21410
|
+
[0.12, "#a8d6ec"],
|
|
21411
|
+
[0.25, "#c3b6ec"],
|
|
21412
|
+
[0.4, "#a6ecec"],
|
|
21413
|
+
[0.55, "#dfe6fb"],
|
|
21414
|
+
[0.7, "#a6cdf0"],
|
|
21415
|
+
[0.82, "#cbb4ec"],
|
|
21416
|
+
[1, "#eaf6f6"]
|
|
21417
|
+
];
|
|
21424
21418
|
}
|
|
21425
21419
|
});
|
|
21426
21420
|
|
|
@@ -21464,7 +21458,6 @@ __export(visual_exports, {
|
|
|
21464
21458
|
generateTreeSvg: () => generateTreeSvg,
|
|
21465
21459
|
getArcheometerRenderModel: () => getArcheometerRenderModel,
|
|
21466
21460
|
getAstroGlyph: () => getAstroGlyph,
|
|
21467
|
-
getAstroWheelRenderModel: () => getAstroWheelRenderModel,
|
|
21468
21461
|
getRouteActivations: () => getRouteActivations,
|
|
21469
21462
|
getTreeLayout: () => getTreeLayout,
|
|
21470
21463
|
getTreeRenderModel: () => getTreeRenderModel,
|
|
@@ -24481,22 +24474,22 @@ function getTarotArchetypeCache() {
|
|
|
24481
24474
|
parts: ["westernAstrology", "tarot"]
|
|
24482
24475
|
});
|
|
24483
24476
|
const archetypes = MAJOR_ARCANA_CARDS.map((card) => {
|
|
24484
|
-
const
|
|
24485
|
-
const path = tree.getNode(
|
|
24486
|
-
const hebrewLetter = tree.getCorrespondences(
|
|
24477
|
+
const pathId2 = id("path" /* PATH */, card.number);
|
|
24478
|
+
const path = tree.getNode(pathId2);
|
|
24479
|
+
const hebrewLetter = tree.getCorrespondences(pathId2, {
|
|
24487
24480
|
type: "hebrewLetter" /* HEBREW_LETTER */,
|
|
24488
24481
|
limit: 1
|
|
24489
24482
|
})[0]?.node;
|
|
24490
|
-
const tarotArkAnnu = tree.getCorrespondences(
|
|
24483
|
+
const tarotArkAnnu = tree.getCorrespondences(pathId2, {
|
|
24491
24484
|
type: "tarotArkAnnu" /* TAROT_ARK_ANNU */,
|
|
24492
24485
|
limit: 1
|
|
24493
24486
|
})[0]?.node;
|
|
24494
24487
|
if (!path || !hebrewLetter || !tarotArkAnnu) {
|
|
24495
24488
|
throw new Error(
|
|
24496
|
-
`Missing canonical tarot archetype metadata for ${
|
|
24489
|
+
`Missing canonical tarot archetype metadata for ${pathId2}.`
|
|
24497
24490
|
);
|
|
24498
24491
|
}
|
|
24499
|
-
const astrology = tree.getCorrespondences(
|
|
24492
|
+
const astrology = tree.getCorrespondences(pathId2, {
|
|
24500
24493
|
type: [
|
|
24501
24494
|
"westernElement" /* WESTERN_ELEMENT */,
|
|
24502
24495
|
"planet" /* PLANET */,
|
|
@@ -24509,9 +24502,9 @@ function getTarotArchetypeCache() {
|
|
|
24509
24502
|
);
|
|
24510
24503
|
const descriptionsByDeck = buildDescriptionsByDeck(tarotArkAnnu);
|
|
24511
24504
|
return {
|
|
24512
|
-
canonicalId:
|
|
24505
|
+
canonicalId: pathId2,
|
|
24513
24506
|
kind: "major",
|
|
24514
|
-
pathId,
|
|
24507
|
+
pathId: pathId2,
|
|
24515
24508
|
pathNumber: card.number,
|
|
24516
24509
|
pathSlug: parseId(hebrewLetter.id).toLowerCase(),
|
|
24517
24510
|
hebrewLetterId: hebrewLetter.id,
|
|
@@ -25237,7 +25230,7 @@ function orderedSpheres() {
|
|
|
25237
25230
|
}
|
|
25238
25231
|
function orderedPaths() {
|
|
25239
25232
|
orderedPathsInstance ?? (orderedPathsInstance = Object.freeze(
|
|
25240
|
-
orderedPathIds.map((
|
|
25233
|
+
orderedPathIds.map((pathId2) => canonicalTree().getNode(pathId2)).filter((node) => Boolean(node))
|
|
25241
25234
|
));
|
|
25242
25235
|
return orderedPathsInstance;
|
|
25243
25236
|
}
|
|
@@ -25285,8 +25278,8 @@ function createSymbolRegistry(entries) {
|
|
|
25285
25278
|
function createClassicalPlanetPathIdsByKey(tree) {
|
|
25286
25279
|
const registry = /* @__PURE__ */ new Map();
|
|
25287
25280
|
const mutable = /* @__PURE__ */ new Map();
|
|
25288
|
-
for (const
|
|
25289
|
-
const planet = tree.getCorrespondences(
|
|
25281
|
+
for (const pathId2 of orderedPathIds) {
|
|
25282
|
+
const planet = tree.getCorrespondences(pathId2, {
|
|
25290
25283
|
type: "planet" /* PLANET */,
|
|
25291
25284
|
depth: 1,
|
|
25292
25285
|
limit: 1
|
|
@@ -25299,7 +25292,7 @@ function createClassicalPlanetPathIdsByKey(tree) {
|
|
|
25299
25292
|
continue;
|
|
25300
25293
|
}
|
|
25301
25294
|
const bucket = mutable.get(key) ?? [];
|
|
25302
|
-
bucket.push(
|
|
25295
|
+
bucket.push(pathId2);
|
|
25303
25296
|
mutable.set(key, bucket);
|
|
25304
25297
|
}
|
|
25305
25298
|
for (const [key, value] of mutable.entries()) {
|
|
@@ -25684,10 +25677,10 @@ function getKaabalisticCorrespondenceTargets(lookup) {
|
|
|
25684
25677
|
if (lookup.kind === "planet") {
|
|
25685
25678
|
const planet = normalizePlanetName(lookup.planet);
|
|
25686
25679
|
const planetKey = normalizeLookupKey(planet);
|
|
25687
|
-
const planetPathTargets = (classicalPlanetPathIdsByKey().get(planetKey) ?? []).map((
|
|
25688
|
-
targetId:
|
|
25680
|
+
const planetPathTargets = (classicalPlanetPathIdsByKey().get(planetKey) ?? []).map((pathId2) => ({
|
|
25681
|
+
targetId: pathId2,
|
|
25689
25682
|
targetType: "path",
|
|
25690
|
-
targetName: getTargetName(
|
|
25683
|
+
targetName: getTargetName(pathId2),
|
|
25691
25684
|
mapping: "planet-sign-path",
|
|
25692
25685
|
distance: 1,
|
|
25693
25686
|
sign,
|
|
@@ -27060,7 +27053,7 @@ var import_config3 = require("dotenv/config");
|
|
|
27060
27053
|
// package.json
|
|
27061
27054
|
var package_default = {
|
|
27062
27055
|
name: "kaabalah",
|
|
27063
|
-
version: "6.
|
|
27056
|
+
version: "6.12.0",
|
|
27064
27057
|
description: "The de-facto library for any esoteric calculations and tooling",
|
|
27065
27058
|
engines: {
|
|
27066
27059
|
node: ">=18.18.0"
|
|
@@ -27146,6 +27139,7 @@ var package_default = {
|
|
|
27146
27139
|
"test:ui": "vitest --ui --silent",
|
|
27147
27140
|
"prepare-browser-test": "cp wasm/build/swisseph.wasm examples/ && cp -r ephe examples/",
|
|
27148
27141
|
"generate:trees": "npx tsx examples/generate-tree-svg.ts",
|
|
27142
|
+
"generate:wheel": "npx tsx examples/generate-astro-wheel-svgs.ts",
|
|
27149
27143
|
"generate:wheels": "npx tsx examples/generate-astro-wheel-svgs.ts",
|
|
27150
27144
|
"generate:archeometer": "npx tsx examples/generate-archeometer-svg.ts",
|
|
27151
27145
|
"generate:svgs": "npm run generate:trees && npm run generate:wheels && npm run generate:archeometer",
|
|
@@ -27488,7 +27482,6 @@ var COMMANDS = [
|
|
|
27488
27482
|
{ name: "no-houses", type: "boolean", default: false, description: "Hide house cusps, labels, and angle markers" },
|
|
27489
27483
|
{ name: "no-points", type: "boolean", default: false, description: "Hide birth planets, nodes, and vertex" },
|
|
27490
27484
|
{ name: "no-aspects", type: "boolean", default: false, description: "Hide aspect lines" },
|
|
27491
|
-
{ name: "render-model", type: "boolean", default: false, description: "Return wheel geometry JSON instead of SVG" },
|
|
27492
27485
|
{ name: "output", type: "string", description: "Write the SVG to a file instead of stdout" },
|
|
27493
27486
|
{ name: "viewbox-width", type: "number", description: "Override SVG viewBox width" },
|
|
27494
27487
|
{ name: "viewbox-height", type: "number", description: "Override SVG viewBox height" },
|
|
@@ -27500,8 +27493,7 @@ var COMMANDS = [
|
|
|
27500
27493
|
examples: [
|
|
27501
27494
|
"kaabalah astrology:wheel 1990-01-15 14:30 --lat=40.7128 --lon=-74.006 --json --compact --fields=svg",
|
|
27502
27495
|
"kaabalah astrology:wheel 1990-01-15 14:30 --lat=40.7128 --lon=-74.006 --background=transparent --output=chart.svg --json",
|
|
27503
|
-
"kaabalah astrology:wheel --input-json=- --json --compact --fields=svg < chart-wheel.json"
|
|
27504
|
-
"kaabalah astrology:wheel 1990-01-15 14:30 --lat=40.7128 --lon=-74.006 --render-model --json --compact"
|
|
27496
|
+
"kaabalah astrology:wheel --input-json=- --json --compact --fields=svg < chart-wheel.json"
|
|
27505
27497
|
]
|
|
27506
27498
|
},
|
|
27507
27499
|
{
|
|
@@ -28849,7 +28841,6 @@ function buildAstroWheelSvgOptions(flags, inputPayload) {
|
|
|
28849
28841
|
}
|
|
28850
28842
|
if (getInputBoolean(inputPayload, "noAspects") === true || getFlagBool(flags, "no-aspects")) {
|
|
28851
28843
|
options.aspects = false;
|
|
28852
|
-
options.aspectLayers = [];
|
|
28853
28844
|
}
|
|
28854
28845
|
if (options.aspects !== false && inputPayload?.aspectSpecs != null && Array.isArray(inputPayload.aspectSpecs)) {
|
|
28855
28846
|
options.aspects = {
|
|
@@ -29668,14 +29659,6 @@ async function cmdAstrologyWheel(args, flags, inputPayload, executionContext) {
|
|
|
29668
29659
|
const aspectFilter = parseAspectTypeFilter(flags, inputPayload);
|
|
29669
29660
|
const wheelOptions = buildAstroWheelSvgOptions(flags, inputPayload);
|
|
29670
29661
|
const outputPathFlag = getFlagString(flags, "output") ?? getInputString(inputPayload, "output");
|
|
29671
|
-
const renderModel = getFlagBool(flags, "render-model") || getInputBoolean(inputPayload, "renderModel") === true;
|
|
29672
|
-
if (renderModel && outputPathFlag) {
|
|
29673
|
-
exitWithError(
|
|
29674
|
-
"INVALID_ARGUMENT",
|
|
29675
|
-
"--output is only supported when generating an astrology wheel SVG. Omit --render-model to write an SVG file.",
|
|
29676
|
-
flags
|
|
29677
|
-
);
|
|
29678
|
-
}
|
|
29679
29662
|
try {
|
|
29680
29663
|
await initWasm(runtimePaths, executionContext);
|
|
29681
29664
|
} catch (err) {
|
|
@@ -29691,7 +29674,6 @@ async function cmdAstrologyWheel(args, flags, inputPayload, executionContext) {
|
|
|
29691
29674
|
latitude: input.latitude,
|
|
29692
29675
|
longitude: input.longitude,
|
|
29693
29676
|
houseSystem: input.houseSystem,
|
|
29694
|
-
renderModel,
|
|
29695
29677
|
output: outputPathFlag
|
|
29696
29678
|
});
|
|
29697
29679
|
const chart = await getBirthChart2({
|
|
@@ -29702,37 +29684,10 @@ async function cmdAstrologyWheel(args, flags, inputPayload, executionContext) {
|
|
|
29702
29684
|
timeZoneSettings: input.timeZoneSettings
|
|
29703
29685
|
});
|
|
29704
29686
|
const filteredChart = filterChartAspects(chart, { maxOrb, aspectFilter });
|
|
29705
|
-
const { generateAstroWheelSvg: generateAstroWheelSvg2
|
|
29687
|
+
const { generateAstroWheelSvg: generateAstroWheelSvg2 } = await Promise.resolve().then(() => (init_visual(), visual_exports));
|
|
29706
29688
|
executionContext.throwIfInterrupted();
|
|
29707
29689
|
const inputEcho = formatSingleChartInputEcho(input);
|
|
29708
29690
|
const serializedOptions = serializeAstroWheelOptions(wheelOptions);
|
|
29709
|
-
if (renderModel) {
|
|
29710
|
-
const model = getAstroWheelRenderModel2(filteredChart, wheelOptions);
|
|
29711
|
-
executionContext.throwIfInterrupted();
|
|
29712
|
-
if (isJsonMode(flags)) {
|
|
29713
|
-
outputJson(
|
|
29714
|
-
{
|
|
29715
|
-
...model,
|
|
29716
|
-
input: inputEcho,
|
|
29717
|
-
options: serializedOptions
|
|
29718
|
-
},
|
|
29719
|
-
flags
|
|
29720
|
-
);
|
|
29721
|
-
return;
|
|
29722
|
-
}
|
|
29723
|
-
console.log(`
|
|
29724
|
-
Astrology Wheel Render Model: ${input.dateStr} ${input.timeStr}
|
|
29725
|
-
`);
|
|
29726
|
-
console.log(
|
|
29727
|
-
` ViewBox: ${model.viewBox.minX} ${model.viewBox.minY} ${model.viewBox.width} ${model.viewBox.height}`
|
|
29728
|
-
);
|
|
29729
|
-
console.log(` Points: ${model.points.length}`);
|
|
29730
|
-
console.log(` Houses: ${model.houseCusps.length}`);
|
|
29731
|
-
console.log(` Aspects: ${model.aspectLines.length}`);
|
|
29732
|
-
console.log(` Point layers: ${model.pointLayers.map((layer) => layer.id).join(", ") || "none"}`);
|
|
29733
|
-
console.log();
|
|
29734
|
-
return;
|
|
29735
|
-
}
|
|
29736
29691
|
const svg = generateAstroWheelSvg2(filteredChart, wheelOptions);
|
|
29737
29692
|
executionContext.throwIfInterrupted();
|
|
29738
29693
|
const bytes = Buffer.byteLength(svg, "utf8");
|
|
@@ -31284,8 +31239,8 @@ function renderAsciiTree(layout, columns, rows) {
|
|
|
31284
31239
|
}
|
|
31285
31240
|
plot(x1, y1, lineChar);
|
|
31286
31241
|
};
|
|
31287
|
-
for (const
|
|
31288
|
-
const path = layout.percentages.paths[
|
|
31242
|
+
for (const pathId2 of layout.pathOrder) {
|
|
31243
|
+
const path = layout.percentages.paths[pathId2];
|
|
31289
31244
|
drawLine(
|
|
31290
31245
|
toGridX(path.from.x),
|
|
31291
31246
|
toGridY(path.from.y),
|