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.
@@ -1,5 +1,5 @@
1
1
  import { TREE_TOPOLOGY_SPHERE_NAMES, TREE_TOPOLOGY_SPHERE_IDS, TREE_TOPOLOGY_PATH_IDS } from './chunk-X5HGLMEF.mjs';
2
- import { id, createTree } from './chunk-NOZKIUGP.mjs';
2
+ import { id, createTree, parseId } from './chunk-NOZKIUGP.mjs';
3
3
 
4
4
  // src/visual/archeometer.ts
5
5
  var TAU = Math.PI * 2;
@@ -1344,7 +1344,7 @@ function generateAstroGlyphSvg(keyOrGlyph, options = {}) {
1344
1344
  const svg = generateGlyphSvg(glyph.primitives, options);
1345
1345
  return svg.replace("<svg ", `<svg data-astro-glyph="${escapeAttr2(glyph.key)}" data-astro-glyph-category="${glyph.category}" `);
1346
1346
  }
1347
- function getAstroWheelRenderModel(chart, options = {}) {
1347
+ function buildAstroWheelSvgModel(chart, options = {}) {
1348
1348
  const viewBox = normalizeViewBox2(options.viewBox);
1349
1349
  const palette = resolvePalette2(options.palette, options.background ?? "transparent");
1350
1350
  const excludedBodies = resolveExcludedBodies(options.excludeBodies);
@@ -1352,7 +1352,7 @@ function getAstroWheelRenderModel(chart, options = {}) {
1352
1352
  viewBox.width / ASTRO_WHEEL_DEFAULT_VIEWBOX.width,
1353
1353
  viewBox.height / ASTRO_WHEEL_DEFAULT_VIEWBOX.height
1354
1354
  );
1355
- const padding = options.padding ?? round2(18 * scale + getExternalPointPadding(options, scale));
1355
+ const padding = options.padding ?? round2(18 * scale + getExternalPointPadding());
1356
1356
  const center = {
1357
1357
  x: round2(viewBox.minX + viewBox.width / 2),
1358
1358
  y: round2(viewBox.minY + viewBox.height / 2)
@@ -1381,7 +1381,7 @@ function getAstroWheelRenderModel(chart, options = {}) {
1381
1381
  rings,
1382
1382
  scale
1383
1383
  }) : [];
1384
- const basePointLayer = buildPointLayer({
1384
+ const basePointGroup = buildPointGroup({
1385
1385
  layer: {
1386
1386
  id: "birth",
1387
1387
  label: "Birth",
@@ -1403,27 +1403,12 @@ function getAstroWheelRenderModel(chart, options = {}) {
1403
1403
  maxDisplacementDegrees: maxPointDisplacementDegrees,
1404
1404
  railVisibility
1405
1405
  });
1406
- const extraPointLayers = (options.pointLayers ?? []).map(
1407
- (layer) => buildPointLayer({
1408
- layer,
1409
- center,
1410
- angleOf: angleOf2,
1411
- rings,
1412
- scale,
1413
- palette,
1414
- excludedBodies,
1415
- pointConnectorMode,
1416
- maxDisplacementDegrees: maxPointDisplacementDegrees,
1417
- railVisibility
1418
- })
1419
- );
1420
- const pointLayers = [
1421
- ...resolvedPoints.enabled ? [basePointLayer] : [],
1422
- ...extraPointLayers
1406
+ const pointGroups = [
1407
+ ...resolvedPoints.enabled ? [basePointGroup] : []
1423
1408
  ];
1424
- const points = pointLayers.flatMap((layer) => [...layer.points]);
1409
+ const points = pointGroups.flatMap((layer) => [...layer.points]);
1425
1410
  const pointByKey = Object.fromEntries(points.map((point) => [point.key, point]));
1426
- const baseAspectLayer = resolvedAspects.enabled ? buildAspectLayer({
1411
+ const baseAspectGroup = resolvedAspects.enabled ? buildAspectGroup({
1427
1412
  layer: {
1428
1413
  id: "birth",
1429
1414
  label: "Birth aspects",
@@ -1439,25 +1424,11 @@ function getAstroWheelRenderModel(chart, options = {}) {
1439
1424
  palette,
1440
1425
  excludedBodies
1441
1426
  }) : null;
1442
- const extraAspectLayers = (options.aspectLayers ?? []).map(
1443
- (layer) => buildAspectLayer({
1444
- layer,
1445
- chart: layer.chart ?? chart,
1446
- pointByKey,
1447
- center,
1448
- angleOf: angleOf2,
1449
- rings,
1450
- palette,
1451
- excludedBodies
1452
- })
1453
- );
1454
- const aspectLayers = [
1455
- ...baseAspectLayer ? [baseAspectLayer] : [],
1456
- ...extraAspectLayers
1427
+ const aspectGroups = [
1428
+ ...baseAspectGroup ? [baseAspectGroup] : []
1457
1429
  ];
1458
- const aspectLines = aspectLayers.flatMap((layer) => [...layer.aspectLines]);
1459
- const positionRails = basePointLayer.rails;
1460
- const boundaryNotches = pointLayers.flatMap((layer) => [...layer.notches]);
1430
+ const aspectLines = aspectGroups.flatMap((layer) => [...layer.aspectLines]);
1431
+ const positionRails = basePointGroup.rails;
1461
1432
  return {
1462
1433
  viewBox,
1463
1434
  center,
@@ -1471,15 +1442,14 @@ function getAstroWheelRenderModel(chart, options = {}) {
1471
1442
  points,
1472
1443
  pointByKey,
1473
1444
  aspectLines,
1474
- pointLayers,
1475
- aspectLayers,
1445
+ pointGroups,
1446
+ aspectGroups,
1476
1447
  positionRails,
1477
- boundaryNotches,
1478
1448
  palette
1479
1449
  };
1480
1450
  }
1481
1451
  function generateAstroWheelSvg(chart, options = {}) {
1482
- const model = getAstroWheelRenderModel(chart, options);
1452
+ const model = buildAstroWheelSvgModel(chart, options);
1483
1453
  const viewBox = model.viewBox;
1484
1454
  const zodiacOptions = resolveZodiacOptions(options.zodiac);
1485
1455
  const houseOptions = resolveHouseOptions(options.houses);
@@ -1534,15 +1504,15 @@ function renderSvgDefs(push, model) {
1534
1504
  push(`</defs>`);
1535
1505
  }
1536
1506
  function renderAspects(push, model) {
1537
- if (model.aspectLayers.length === 0) {
1507
+ if (model.aspectGroups.length === 0) {
1538
1508
  return;
1539
1509
  }
1540
1510
  push(`<g id="astro-wheel-aspects" aria-label="aspects">`);
1541
- for (const layer of model.aspectLayers) {
1542
- push(`<g class="astro-wheel-aspect-layer" data-aspect-layer="${escapeAttr2(layer.id)}"${layer.label ? ` aria-label="${escapeAttr2(layer.label)}"` : ""}>`);
1511
+ for (const layer of model.aspectGroups) {
1512
+ push(`<g class="astro-wheel-aspect-group" data-aspect-group="${escapeAttr2(layer.id)}"${layer.label ? ` aria-label="${escapeAttr2(layer.label)}"` : ""}>`);
1543
1513
  for (const aspect of layer.aspectLines) {
1544
1514
  push(
1545
- `<line data-aspect-layer="${escapeAttr2(aspect.layerId)}" 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"/>`
1515
+ `<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"/>`
1546
1516
  );
1547
1517
  }
1548
1518
  push(`</g>`);
@@ -1632,23 +1602,18 @@ function renderHouses(push, model, options) {
1632
1602
  push(`</g>`);
1633
1603
  }
1634
1604
  function renderPlanets(push, model) {
1635
- if (model.pointLayers.length === 0) {
1605
+ if (model.pointGroups.length === 0) {
1636
1606
  return;
1637
1607
  }
1638
1608
  push(`<g id="astro-wheel-planets" aria-label="planets">`);
1639
- for (const layer of model.pointLayers) {
1640
- renderPointLayerGuide(push, layer, model);
1641
- }
1642
- for (const notch of model.boundaryNotches) {
1643
- push(
1644
- `<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"/>`
1645
- );
1609
+ for (const layer of model.pointGroups) {
1610
+ renderPointGroupGuide(push, layer, model);
1646
1611
  }
1647
- for (const layer of model.pointLayers) {
1648
- push(`<g class="astro-wheel-point-layer" data-point-layer="${escapeAttr2(layer.id)}"${layer.label ? ` aria-label="${escapeAttr2(layer.label)}"` : ""}>`);
1612
+ for (const layer of model.pointGroups) {
1613
+ push(`<g class="astro-wheel-point-group" data-point-group="${escapeAttr2(layer.id)}"${layer.label ? ` aria-label="${escapeAttr2(layer.label)}"` : ""}>`);
1649
1614
  for (const point of layer.points) {
1650
1615
  push(
1651
- `<g class="astro-wheel-point" data-point-layer="${escapeAttr2(point.layerId)}" data-point-key="${escapeAttr2(point.key)}" data-point-name="${escapeAttr2(point.name)}" data-point-kind="${point.kind}" data-longitude="${fmt2(point.longitude)}">`
1616
+ `<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)}">`
1652
1617
  );
1653
1618
  push(`<title>${escapeText2(point.name)} ${fmt2(point.longitude)}\xB0</title>`);
1654
1619
  push(
@@ -1669,17 +1634,17 @@ function renderPlanets(push, model) {
1669
1634
  }
1670
1635
  push(`</g>`);
1671
1636
  }
1672
- function renderPointLayerGuide(push, layer, model) {
1637
+ function renderPointGroupGuide(push, layer, model) {
1673
1638
  const isExternal = layer.radius > model.rings.houses.r2 + model.scale;
1674
1639
  if (!isExternal) {
1675
1640
  return;
1676
1641
  }
1677
1642
  push(
1678
- `<circle class="astro-wheel-external-point-ring" data-point-layer="${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)}"/>`
1643
+ `<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)}"/>`
1679
1644
  );
1680
1645
  }
1681
1646
  function renderGlyphOverlay(push, model) {
1682
- if (model.angleMarkers.length === 0 && model.pointLayers.length === 0) {
1647
+ if (model.angleMarkers.length === 0 && model.pointGroups.length === 0) {
1683
1648
  return;
1684
1649
  }
1685
1650
  push(`<g id="astro-wheel-glyph-layer" aria-label="chart glyphs">`);
@@ -1690,10 +1655,10 @@ function renderGlyphOverlay(push, model) {
1690
1655
  }
1691
1656
  push(`</g>`);
1692
1657
  }
1693
- if (model.pointLayers.length > 0) {
1658
+ if (model.pointGroups.length > 0) {
1694
1659
  push(`<g id="astro-wheel-point-glyphs" aria-label="planet glyphs">`);
1695
- for (const layer of model.pointLayers) {
1696
- push(`<g class="astro-wheel-point-glyph-layer" data-point-layer="${escapeAttr2(layer.id)}"${layer.label ? ` aria-label="${escapeAttr2(layer.label)} glyphs"` : ""}>`);
1660
+ for (const layer of model.pointGroups) {
1661
+ push(`<g class="astro-wheel-point-glyph-layer" data-point-group="${escapeAttr2(layer.id)}"${layer.label ? ` aria-label="${escapeAttr2(layer.label)} glyphs"` : ""}>`);
1697
1662
  for (const point of layer.points) {
1698
1663
  renderPointLabelGroup(push, point, model);
1699
1664
  }
@@ -1735,7 +1700,7 @@ function angleDisplayLabel(key) {
1735
1700
  }
1736
1701
  function renderPointLabelGroup(push, point, model) {
1737
1702
  push(
1738
- `<g class="astro-wheel-point-label" data-point-layer="${escapeAttr2(point.layerId)}" 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})">`
1703
+ `<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})">`
1739
1704
  );
1740
1705
  push(`<title>${escapeText2(pointLabelTitle(point))}</title>`);
1741
1706
  renderPointGlyph(push, point, 0, 0, point.glyphScale, model.palette.glyphHalo);
@@ -1744,7 +1709,7 @@ function renderPointLabelGroup(push, point, model) {
1744
1709
  if (!label.visible)
1745
1710
  continue;
1746
1711
  push(
1747
- `<g class="astro-wheel-position-rail-label" data-point-layer="${escapeAttr2(point.layerId)}" 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})">`
1712
+ `<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})">`
1748
1713
  );
1749
1714
  if (label.railId === "sign" && label.sign) {
1750
1715
  renderInlineSignGlyph(push, label.sign, 0, 0, label.glyphScale ?? label.fontSize, point.color);
@@ -1862,13 +1827,7 @@ function resolvePointGlyph(name) {
1862
1827
  return PLANET_GLYPHS[resolved] ?? ANGLE_GLYPHS[resolved] ?? null;
1863
1828
  }
1864
1829
  function getExternalPointPadding(options, scale) {
1865
- const externalLayers = options.pointLayers?.filter((layer) => layer.radius === "external") ?? [];
1866
- if (externalLayers.length === 0) {
1867
- return 0;
1868
- }
1869
- return Math.max(
1870
- ...externalLayers.map((layer) => (layer.radiusOffset ?? 18) + 36 * scale)
1871
- );
1830
+ return 0;
1872
1831
  }
1873
1832
  function buildZodiacSegments(params) {
1874
1833
  const { center, angleOf: angleOf2, rings, scale, palette } = params;
@@ -1963,7 +1922,7 @@ function buildAngleMarkers(params) {
1963
1922
  };
1964
1923
  });
1965
1924
  }
1966
- function buildPointLayer(params) {
1925
+ function buildPointGroup(params) {
1967
1926
  const {
1968
1927
  layer,
1969
1928
  center,
@@ -1977,7 +1936,7 @@ function buildPointLayer(params) {
1977
1936
  railVisibility
1978
1937
  } = params;
1979
1938
  const ring = rings.planets;
1980
- const requestedRadius = resolvePointLayerRadius(layer, rings);
1939
+ const requestedRadius = resolvePointGroupRadius(layer, rings);
1981
1940
  const requestedExternalLayer = requestedRadius > rings.houses.r2 + scale;
1982
1941
  const thickness = ring.r2 - ring.r1;
1983
1942
  const glyphFontSize = clamp(thickness * 0.68, 14 * scale, 30 * scale) * (layer.glyphScale ?? 1);
@@ -2117,15 +2076,6 @@ function buildPointLayer(params) {
2117
2076
  connector
2118
2077
  };
2119
2078
  });
2120
- const notches = buildBoundaryNotches({
2121
- layerId: layer.id,
2122
- points,
2123
- houses: layer.chart?.houses.houses ?? [],
2124
- center,
2125
- radius,
2126
- ring,
2127
- scale
2128
- });
2129
2079
  return {
2130
2080
  id: layer.id,
2131
2081
  label: layer.label,
@@ -2133,7 +2083,6 @@ function buildPointLayer(params) {
2133
2083
  tickColor,
2134
2084
  radius,
2135
2085
  rails,
2136
- notches,
2137
2086
  points
2138
2087
  };
2139
2088
  }
@@ -2164,7 +2113,7 @@ function makeAstroWheelPoint(params) {
2164
2113
  });
2165
2114
  const glyphScale = glyphFontSize * 0.66;
2166
2115
  return {
2167
- layerId: layer.id,
2116
+ groupId: layer.id,
2168
2117
  key: seed.key,
2169
2118
  name: seed.name,
2170
2119
  kind: seed.kind,
@@ -2199,13 +2148,13 @@ function makeAstroWheelPoint(params) {
2199
2148
  };
2200
2149
  }
2201
2150
  function resolveRailVisibility(input) {
2202
- if (input === "glyph-only") {
2151
+ if (!input || input === "glyph-only") {
2203
2152
  return { degree: false, sign: false, minutes: false, retrograde: false };
2204
2153
  }
2205
2154
  if (input === "compact") {
2206
2155
  return { degree: true, sign: true, minutes: false, retrograde: true };
2207
2156
  }
2208
- if (!input || input === "full") {
2157
+ if (input === "full") {
2209
2158
  return { degree: true, sign: true, minutes: true, retrograde: true };
2210
2159
  }
2211
2160
  return {
@@ -2324,83 +2273,19 @@ function buildPointLineConnector(params) {
2324
2273
  y2: params.glyphPosition.y
2325
2274
  };
2326
2275
  }
2327
- function buildBoundaryNotches(params) {
2328
- if (params.houses.length === 0)
2329
- return [];
2330
- const { center, ring, radius, scale } = params;
2331
- return params.points.flatMap((point) => {
2332
- if (!point.nearestCuspHouse || point.nearestCuspDistanceDegrees === void 0)
2333
- return [];
2334
- const displaced = circularAngleDistance(point.trueAngle, point.displayAngle) > deg2rad2(0.35);
2335
- if (!displaced)
2336
- return [];
2337
- const cusp = params.houses[point.nearestCuspHouse - 1];
2338
- const cuspAngle = point.trueAngle + deg2rad2(shortestLongitudeDistance(point.longitude, cusp.longitude));
2339
- const trueDelta = signedAngleDelta(cuspAngle, point.trueAngle);
2340
- const displayDelta = signedAngleDelta(cuspAngle, point.displayAngle);
2341
- const crossed = Math.sign(trueDelta) !== Math.sign(displayDelta) && displayDelta !== 0;
2342
- const crowds = point.nearestCuspDistanceDegrees <= 2;
2343
- if (!crossed && !crowds)
2344
- return [];
2345
- const glyphHalfAngle = Math.max(point.glyphScale * 0.62, 4 * scale) / Math.max(radius, 1);
2346
- const directed = displayDelta === 0 ? trueDelta : displayDelta;
2347
- const direction = directed >= 0 ? 1 : -1;
2348
- const endAngle = cuspAngle + directed + direction * glyphHalfAngle;
2349
- const halfThickness = Math.max(point.glyphScale * 0.9, 7 * scale);
2350
- const innerRadius = clamp(radius - halfThickness, ring.r1, ring.r2);
2351
- const outerRadius = clamp(radius + halfThickness, ring.r1, ring.r2);
2352
- return [{
2353
- id: `${params.layerId}-${point.key}-notch`,
2354
- layerId: params.layerId,
2355
- pointKey: point.key,
2356
- house: point.house ?? 0,
2357
- cuspHouse: point.nearestCuspHouse,
2358
- cuspLongitude: normalizeAngle(cusp.longitude),
2359
- radius: outerRadius,
2360
- innerRadius,
2361
- outerRadius,
2362
- startAngle: cuspAngle,
2363
- endAngle,
2364
- path: boundaryNotchPath(center, innerRadius, outerRadius, cuspAngle, endAngle)
2365
- }];
2366
- });
2367
- }
2368
- function boundaryNotchPath(center, innerRadius, outerRadius, cuspAngle, endAngle) {
2369
- const outerCusp = polarToXY2(center.x, center.y, outerRadius, cuspAngle);
2370
- const outerEnd = polarToXY2(center.x, center.y, outerRadius, endAngle);
2371
- const innerEnd = polarToXY2(center.x, center.y, innerRadius, endAngle);
2372
- const innerCusp = polarToXY2(center.x, center.y, innerRadius, cuspAngle);
2373
- const delta = signedAngleDelta(cuspAngle, endAngle);
2374
- const sweepOuter = delta >= 0 ? 1 : 0;
2375
- const sweepInner = delta >= 0 ? 0 : 1;
2376
- return [
2377
- `M ${fmt2(outerCusp.x)} ${fmt2(outerCusp.y)}`,
2378
- `A ${fmt2(outerRadius)} ${fmt2(outerRadius)} 0 0 ${sweepOuter} ${fmt2(outerEnd.x)} ${fmt2(outerEnd.y)}`,
2379
- `L ${fmt2(innerEnd.x)} ${fmt2(innerEnd.y)}`,
2380
- `A ${fmt2(innerRadius)} ${fmt2(innerRadius)} 0 0 ${sweepInner} ${fmt2(innerCusp.x)} ${fmt2(innerCusp.y)}`,
2381
- "Z"
2382
- ].join(" ");
2383
- }
2384
- function buildAspectLayer(params) {
2276
+ function buildAspectGroup(params) {
2385
2277
  const { layer, chart, pointByKey, center, angleOf: angleOf2, rings, palette, excludedBodies } = params;
2386
- const sourceEdges = layer.edges ? layer.edges : layer.chartB ? computeCrossAspectEdges(
2387
- chart.planets,
2388
- layer.chartB.planets,
2389
- layer.aspectSpecs ?? ASTRO_WHEEL_DEFAULT_ASPECT_SPECS
2390
- ) : getSourceAspectEdges(chart, {
2278
+ const sourceEdges = layer.edges ? layer.edges : getSourceAspectEdges(chart, {
2391
2279
  edges: layer.edges,
2392
2280
  aspectSpecs: layer.aspectSpecs
2393
2281
  });
2394
2282
  const aspectRadius = layer.radius ?? rings.aspects.r2 * (layer.radiusScale ?? 0.96);
2395
- const layerPointPrefix = pointKeyPrefix(layer.pointLayerId);
2396
- const layerPointPrefixA = layer.pointLayerIdA ? pointKeyPrefix(layer.pointLayerIdA) : layerPointPrefix;
2397
- const layerPointPrefixB = layer.pointLayerIdB ? pointKeyPrefix(layer.pointLayerIdB) : layerPointPrefix;
2398
2283
  const aspectLines = sourceEdges.flatMap((edge) => {
2399
2284
  if (isExcludedBody(edge.planetA, excludedBodies) || isExcludedBody(edge.planetB, excludedBodies)) {
2400
2285
  return [];
2401
2286
  }
2402
- const planetAKey = layerPointPrefixA + normalizePointKey(edge.planetA);
2403
- const planetBKey = layerPointPrefixB + normalizePointKey(edge.planetB);
2287
+ const planetAKey = normalizePointKey(edge.planetA);
2288
+ const planetBKey = normalizePointKey(edge.planetB);
2404
2289
  const planetA = pointByKey[planetAKey];
2405
2290
  const planetB = pointByKey[planetBKey];
2406
2291
  if (!planetA || !planetB) {
@@ -2412,7 +2297,7 @@ function buildAspectLayer(params) {
2412
2297
  const a = layer.radius || layer.radiusScale ? polarToXY2(center.x, center.y, aspectRadius, angleOf2(planetA.longitude)) : planetA.trueAnchor;
2413
2298
  const b = layer.radius || layer.radiusScale ? polarToXY2(center.x, center.y, aspectRadius, angleOf2(planetB.longitude)) : planetB.trueAnchor;
2414
2299
  return [{
2415
- layerId: layer.id,
2300
+ groupId: layer.id,
2416
2301
  planetA: planetA.name,
2417
2302
  planetB: planetB.name,
2418
2303
  planetAKey,
@@ -2471,9 +2356,9 @@ function getPointSeeds(layer, excludedBodies) {
2471
2356
  }
2472
2357
  return seeds.filter((seed) => !isExcludedBody(seed.name, excludedBodies)).sort((a, b) => normalizeAngle(a.longitude) - normalizeAngle(b.longitude));
2473
2358
  }
2474
- function planetSeed(key, planet, layerId) {
2359
+ function planetSeed(key, planet, groupId) {
2475
2360
  return {
2476
- key: layerPointKey(layerId, key || planet.name),
2361
+ key: layerPointKey(groupId, key || planet.name),
2477
2362
  name: planet.name,
2478
2363
  kind: "planet",
2479
2364
  glyph: pointGlyph(planet.name),
@@ -2483,9 +2368,9 @@ function planetSeed(key, planet, layerId) {
2483
2368
  zodiacPosition: planet.zodiacPosition
2484
2369
  };
2485
2370
  }
2486
- function nodeSeed(key, node, layerId) {
2371
+ function nodeSeed(key, node, groupId) {
2487
2372
  return {
2488
- key: layerPointKey(layerId, node.name || key),
2373
+ key: layerPointKey(groupId, node.name || key),
2489
2374
  name: node.name,
2490
2375
  kind: "node",
2491
2376
  glyph: pointGlyph(node.name),
@@ -2494,9 +2379,9 @@ function nodeSeed(key, node, layerId) {
2494
2379
  zodiacPosition: node
2495
2380
  };
2496
2381
  }
2497
- function pointSeed(point, layerId) {
2382
+ function pointSeed(point, groupId) {
2498
2383
  return {
2499
- key: layerPointKey(layerId, point.key ?? point.name),
2384
+ key: layerPointKey(groupId, point.key ?? point.name),
2500
2385
  name: point.name,
2501
2386
  kind: point.kind ?? "planet",
2502
2387
  glyph: point.glyph ?? pointGlyph(point.name),
@@ -2511,7 +2396,7 @@ function solveCircularLabelAngles(items, options) {
2511
2396
  if (items.length === 0) {
2512
2397
  return [];
2513
2398
  }
2514
- const normalized = items.map((item) => ({
2399
+ const normalized = seedExactAngleClusters(items, { paddingPx, maxDisplacementRad }).map((item) => ({
2515
2400
  ...item,
2516
2401
  idealAngle: clampRad(item.idealAngle)
2517
2402
  })).sort((a, b) => a.idealAngle - b.idealAngle);
@@ -2550,8 +2435,8 @@ function solveCircularLabelAngles(items, options) {
2550
2435
  }
2551
2436
  const solved = linear.map((item) => ({
2552
2437
  ...item,
2553
- visualAngle: item.idealAngle
2554
- }));
2438
+ visualAngle: item.visualAngleSeed ?? item.idealAngle
2439
+ })).sort((a, b) => a.visualAngle - b.visualAngle);
2555
2440
  for (let iteration = 0; iteration < 50; iteration++) {
2556
2441
  const forces = new Array(solved.length).fill(0);
2557
2442
  let maxForce = 0;
@@ -2594,6 +2479,38 @@ function solveCircularLabelAngles(items, options) {
2594
2479
  visualAngle: clampRad(item.visualAngle)
2595
2480
  }));
2596
2481
  }
2482
+ function seedExactAngleClusters(items, options) {
2483
+ const seeded = items.map((item) => ({
2484
+ ...item,
2485
+ idealAngle: clampRad(item.idealAngle)
2486
+ }));
2487
+ const groups = /* @__PURE__ */ new Map();
2488
+ for (const item of seeded) {
2489
+ const key = item.idealAngle.toFixed(6);
2490
+ const group = groups.get(key);
2491
+ if (group) {
2492
+ group.push(item);
2493
+ } else {
2494
+ groups.set(key, [item]);
2495
+ }
2496
+ }
2497
+ for (const group of groups.values()) {
2498
+ if (group.length < 2) {
2499
+ continue;
2500
+ }
2501
+ const center = group[0].idealAngle;
2502
+ const largestDemand = Math.max(
2503
+ ...group.map((item) => labelAngularHalfDemand(item, options.paddingPx) * 2)
2504
+ );
2505
+ const maxStep = group.length > 1 ? options.maxDisplacementRad * 2 / (group.length - 1) : largestDemand;
2506
+ const step = Math.min(largestDemand, maxStep);
2507
+ const midpoint2 = (group.length - 1) / 2;
2508
+ group.forEach((item, index) => {
2509
+ item.visualAngleSeed = center + (index - midpoint2) * step;
2510
+ });
2511
+ }
2512
+ return seeded;
2513
+ }
2597
2514
  function clampAngleAroundIdeal(value, ideal, maxDistance) {
2598
2515
  if (!Number.isFinite(maxDistance) || maxDistance >= Math.PI) {
2599
2516
  return value;
@@ -2677,32 +2594,6 @@ function computeAspectEdges(planets, specs) {
2677
2594
  }
2678
2595
  return edges;
2679
2596
  }
2680
- function computeCrossAspectEdges(planetsA, planetsB, specs) {
2681
- const keysA = Object.keys(planetsA);
2682
- const keysB = Object.keys(planetsB);
2683
- const edges = [];
2684
- for (const keyA of keysA) {
2685
- for (const keyB of keysB) {
2686
- const planetA = planetsA[keyA];
2687
- const planetB = planetsB[keyB];
2688
- const match = getAspectMatch(planetA.longitude, planetB.longitude, specs);
2689
- if (!match) {
2690
- continue;
2691
- }
2692
- edges.push({
2693
- planetA: keyA,
2694
- planetB: keyB,
2695
- longitudeA: normalizeAngle(planetA.longitude),
2696
- longitudeB: normalizeAngle(planetB.longitude),
2697
- aspect: match.spec.name,
2698
- aspectAngle: match.spec.angle,
2699
- delta: match.delta,
2700
- orb: match.orb
2701
- });
2702
- }
2703
- }
2704
- return edges;
2705
- }
2706
2597
  function getAspectMatch(lonA, lonB, specs) {
2707
2598
  const delta = Math.min(
2708
2599
  normalizeAngle(lonB - lonA),
@@ -2851,7 +2742,7 @@ function resolveAspectOptions(options) {
2851
2742
  aspectSpecs: options.aspectSpecs
2852
2743
  };
2853
2744
  }
2854
- function resolvePointLayerRadius(layer, rings) {
2745
+ function resolvePointGroupRadius(layer, rings) {
2855
2746
  const ring = rings.planets;
2856
2747
  if (layer.radius === "external") {
2857
2748
  return rings.houses.r2 + (layer.radiusOffset ?? 18);
@@ -2884,12 +2775,9 @@ function isExcludedBody(name, excludedBodies) {
2884
2775
  function normalizePointKey(value) {
2885
2776
  return value.trim().toLocaleLowerCase().replace(/[_-]+/g, " ").replace(/\s+/g, " ");
2886
2777
  }
2887
- function layerPointKey(layerId, value) {
2778
+ function layerPointKey(groupId, value) {
2888
2779
  const key = normalizePointKey(value);
2889
- return layerId === "birth" ? key : `${layerId}:${key}`;
2890
- }
2891
- function pointKeyPrefix(layerId) {
2892
- return !layerId || layerId === "birth" ? "" : `${layerId}:`;
2780
+ return groupId === "birth" ? key : `${groupId}:${key}`;
2893
2781
  }
2894
2782
  function renderGlyphPrimitives(push, primitives, options) {
2895
2783
  for (const p of primitives) {
@@ -3055,7 +2943,42 @@ var DEFAULT_PATH_HIGHLIGHT_WIDTH = 8;
3055
2943
  var DEFAULT_SPHERE_HIT_RADIUS = DEFAULT_SPHERE_RADIUS + 8;
3056
2944
  var DEFAULT_PATH_HIT_STROKE_WIDTH = DEFAULT_PATH_EDGE_WIDTH + 8;
3057
2945
  var MUTED_TARGET_COLOR = "#AAA";
2946
+ var INNER_BORDER_SPHERE_NAMES = /* @__PURE__ */ new Set(["Tiphareth"]);
2947
+ var NAZAR_NACRE = "__nacre__";
2948
+ var NAZAR_IRIS = "#33a6dd";
2949
+ var NAZAR_PUPIL = "#0b0b12";
3058
2950
  var sphereId = (name) => id("sphere" /* SPHERE */, name);
2951
+ var pathId = (value) => id("path" /* PATH */, value);
2952
+ var SPLIT_GRADIENT_PATH_IDS = new Set(
2953
+ Array.from({ length: 22 }, (_, index) => pathId(String(index + 1)))
2954
+ );
2955
+ var SPLIT_GRADIENT_BLEND = 34;
2956
+ var SPECIAL_SPHERE_PATH_COLORS = {
2957
+ Kether: "#cfe0f2",
2958
+ Chokhmah: "#e6d6ef",
2959
+ Malkuth: "#8a6a52"
2960
+ };
2961
+ var CHOKHMAH_SWEEP_SPAN = 0.42;
2962
+ var CHOKHMAH_SWEEP_SAMPLES = 12;
2963
+ function iridescentColorAt(t) {
2964
+ const frac = (t % 1 + 1) % 1;
2965
+ return interpolateColorStops(IRIDESCENT_STOPS, frac);
2966
+ }
2967
+ function iridescentContactT(center, toward) {
2968
+ const degrees = Math.atan2(toward.y - center.y, toward.x - center.x) * 180 / Math.PI;
2969
+ return ((degrees + 90) / 360 % 1 + 1) % 1;
2970
+ }
2971
+ function edgeAnchoredVector(from, to, radius) {
2972
+ const length = Math.hypot(to.x - from.x, to.y - from.y) || 1;
2973
+ const ux = (to.x - from.x) / length;
2974
+ const uy = (to.y - from.y) / length;
2975
+ return {
2976
+ x1: round3(from.x + ux * radius),
2977
+ y1: round3(from.y + uy * radius),
2978
+ x2: round3(to.x - ux * radius),
2979
+ y2: round3(to.y - uy * radius)
2980
+ };
2981
+ }
3059
2982
  var TREE_SPHERE_IDS = [...TREE_TOPOLOGY_SPHERE_IDS];
3060
2983
  var TREE_PATH_IDS = [...TREE_TOPOLOGY_PATH_IDS];
3061
2984
  var CANONICAL_SPHERE_PERCENTAGES = {
@@ -3307,21 +3230,44 @@ function generateTreeSvg(options = {}) {
3307
3230
  `<clipPath id="clip-${slug}"><circle cx="${point.x}" cy="${point.y}" r="${radius}"/></clipPath>`
3308
3231
  );
3309
3232
  }
3310
- push(`<radialGradient id="kether-glow" cx="50%" cy="50%" r="50%">
3311
- <stop offset="0%" stop-color="white" stop-opacity="0.95"/>
3312
- <stop offset="45%" stop-color="white" stop-opacity="0.6"/>
3313
- <stop offset="80%" stop-color="white" stop-opacity="0.15"/>
3314
- <stop offset="100%" stop-color="white" stop-opacity="0"/>
3315
- </radialGradient>`);
3316
- push(`<linearGradient id="kether-facet" x1="0" y1="0" x2="0" y2="1">
3317
- <stop offset="0%" stop-color="white" stop-opacity="0.9"/>
3318
- <stop offset="50%" stop-color="white" stop-opacity="0.5"/>
3319
- <stop offset="100%" stop-color="white" stop-opacity="0.1"/>
3320
- </linearGradient>`);
3321
- push(`<radialGradient id="kether-rim" cx="50%" cy="50%" r="75%">
3322
- <stop offset="60%" stop-color="black" stop-opacity="0"/>
3323
- <stop offset="100%" stop-color="black" stop-opacity="0.18"/>
3324
- </radialGradient>`);
3233
+ if (palette.mode === "color") {
3234
+ for (const splitPathId of SPLIT_GRADIENT_PATH_IDS) {
3235
+ const splitPath = layout.paths[splitPathId];
3236
+ if (!splitPath || highlights.pathColors[splitPathId] !== void 0 || activationMap.get(splitPathId) !== void 0) {
3237
+ continue;
3238
+ }
3239
+ const fromColor = resolveSplitEndpointColor({
3240
+ palette,
3241
+ sphereId: splitPath.fromId,
3242
+ tree
3243
+ });
3244
+ const toColor = resolveSplitEndpointColor({
3245
+ palette,
3246
+ sphereId: splitPath.toId,
3247
+ tree
3248
+ });
3249
+ const blendStart = round3(50 - SPLIT_GRADIENT_BLEND / 2);
3250
+ const blendEnd = round3(50 + SPLIT_GRADIENT_BLEND / 2);
3251
+ const fromName = parseId(splitPath.fromId);
3252
+ const toName = parseId(splitPath.toId);
3253
+ const contactT = toName === "Chokhmah" ? iridescentContactT(splitPath.to, splitPath.from) : fromName === "Chokhmah" ? iridescentContactT(splitPath.from, splitPath.to) : null;
3254
+ const stops = buildSplitGradientStops({
3255
+ fromName,
3256
+ toName,
3257
+ fromColor,
3258
+ toColor,
3259
+ blendStart,
3260
+ blendEnd,
3261
+ contactT
3262
+ });
3263
+ const edge = edgeAnchoredVector(splitPath.from, splitPath.to, radius);
3264
+ push(
3265
+ `<linearGradient id="path-grad-${parseId(splitPathId)}" gradientUnits="userSpaceOnUse" x1="${edge.x1}" y1="${edge.y1}" x2="${edge.x2}" y2="${edge.y2}">
3266
+ ${stops}
3267
+ </linearGradient>`
3268
+ );
3269
+ }
3270
+ }
3325
3271
  push(`</defs>`);
3326
3272
  const background = options.background ?? "white";
3327
3273
  if (background !== "transparent") {
@@ -3367,22 +3313,31 @@ function generateTreeSvg(options = {}) {
3367
3313
  activation: activationMap.get(currentPathId),
3368
3314
  canonicalColor
3369
3315
  });
3370
- const color = activation ? resolvePathDisplayColor({
3371
- canonicalColor,
3372
- activation
3373
- }) : baseColor;
3374
- const edgeColor = resolvePathEdgeColor({
3375
- palette,
3376
- pathColor: color
3377
- });
3316
+ const useSplitGradient = palette.mode === "color" && !activation && highlights.pathColors[currentPathId] === void 0 && SPLIT_GRADIENT_PATH_IDS.has(currentPathId);
3317
+ const solidColor = activation ? resolvePathDisplayColor({ canonicalColor, activation }) : baseColor;
3318
+ const solidEdgeColor = resolvePathEdgeColor({ palette, pathColor: solidColor });
3319
+ const gradientRef = useSplitGradient ? `url(#path-grad-${parseId(currentPathId)})` : null;
3320
+ const color = gradientRef ?? solidColor;
3321
+ const edgeColor = gradientRef ?? solidEdgeColor;
3322
+ const edgeFilter = palette.pathEdgeUseFilter ? ` filter="url(#pathDarken)"` : "";
3323
+ if (gradientRef) {
3324
+ push(
3325
+ `<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}/>`
3326
+ );
3327
+ }
3378
3328
  push(
3379
- `<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"${palette.pathEdgeUseFilter ? ` filter="url(#pathDarken)"` : ""}/>`
3329
+ `<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}/>`
3380
3330
  );
3381
3331
  if (activation?.visible && activation.emphasis > 0) {
3382
3332
  push(
3383
3333
  `<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"/>`
3384
3334
  );
3385
3335
  }
3336
+ if (gradientRef) {
3337
+ push(
3338
+ `<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"/>`
3339
+ );
3340
+ }
3386
3341
  push(
3387
3342
  `<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"/>`
3388
3343
  );
@@ -3497,6 +3452,16 @@ function renderSphere(push, params) {
3497
3452
  push(
3498
3453
  `<circle cx="${point.x}" cy="${point.y}" r="${params.radius}" fill="none" stroke="${escapeAttr3(params.palette.sphereStrokeColor)}" stroke-width="${params.sphereStrokeWidth}"/>`
3499
3454
  );
3455
+ } else if (INNER_BORDER_SPHERE_NAMES.has(params.sphereName)) {
3456
+ const borderWidth = round3(params.radius * 0.05);
3457
+ const borderColor = interpolateColor(
3458
+ toPrimaryFill(activeFill, params.palette.defaultSphereFill),
3459
+ "#000000",
3460
+ 0.2
3461
+ );
3462
+ push(
3463
+ `<circle cx="${point.x}" cy="${point.y}" r="${round3(params.radius - borderWidth / 2)}" fill="none" stroke="${escapeAttr3(borderColor)}" stroke-width="${borderWidth}"/>`
3464
+ );
3500
3465
  }
3501
3466
  }
3502
3467
  function buildLayoutMap(tree, spherePositions) {
@@ -3583,6 +3548,40 @@ function resolveTargetActivation(params) {
3583
3548
  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
3584
3549
  };
3585
3550
  }
3551
+ function resolveSplitEndpointColor(params) {
3552
+ const name = parseId(params.sphereId);
3553
+ return SPECIAL_SPHERE_PATH_COLORS[name] ?? resolveSphereCanonicalColor(params);
3554
+ }
3555
+ function buildSplitGradientStops(params) {
3556
+ const { fromName, toName, fromColor, toColor, blendStart, blendEnd, contactT } = params;
3557
+ const stop = (offset, color) => ` <stop offset="${round3(offset)}%" stop-color="${escapeAttr3(color)}"/>`;
3558
+ const sweep = (start, end, t0, sphereAtEnd) => Array.from({ length: CHOKHMAH_SWEEP_SAMPLES }, (_, index) => {
3559
+ const f = index / (CHOKHMAH_SWEEP_SAMPLES - 1);
3560
+ const offset = start + f * (end - start);
3561
+ const along = sphereAtEnd ? 1 - f : f;
3562
+ return stop(offset, iridescentColorAt(t0 + along * CHOKHMAH_SWEEP_SPAN));
3563
+ });
3564
+ if (toName === "Chokhmah" && contactT !== null) {
3565
+ return [
3566
+ stop(0, fromColor),
3567
+ stop(blendStart, fromColor),
3568
+ ...sweep(blendEnd, 100, contactT, true)
3569
+ ].join("\n");
3570
+ }
3571
+ if (fromName === "Chokhmah" && contactT !== null) {
3572
+ return [
3573
+ ...sweep(0, blendStart, contactT, false),
3574
+ stop(blendEnd, toColor),
3575
+ stop(100, toColor)
3576
+ ].join("\n");
3577
+ }
3578
+ return [
3579
+ stop(0, fromColor),
3580
+ stop(blendStart, fromColor),
3581
+ stop(blendEnd, toColor),
3582
+ stop(100, toColor)
3583
+ ].join("\n");
3584
+ }
3586
3585
  function resolveSphereCanonicalColor(params) {
3587
3586
  const override = params.palette.sphereFills[params.sphereId];
3588
3587
  if (override) {
@@ -3830,33 +3829,18 @@ function arcPath2(cx, cy, radius, startDegrees, endDegrees) {
3830
3829
  const largeArc = endDegrees - startDegrees <= 180 ? 0 : 1;
3831
3830
  return `M ${cx} ${cy} L ${start.x} ${start.y} A ${radius} ${radius} 0 ${largeArc} 1 ${end.x} ${end.y} Z`;
3832
3831
  }
3833
- function renderKether(push, point, radius, baseFill = "#e0e0e0") {
3832
+ function renderKether(push, point, radius, baseFill = NAZAR_NACRE) {
3833
+ const { x, y } = point;
3834
+ renderIridescent(push, point, radius, NACRE_STOPS);
3835
+ if (baseFill !== NAZAR_NACRE) {
3836
+ renderSphereTintOverlay(push, point, radius, baseFill, 0.5);
3837
+ }
3834
3838
  push(
3835
- `<circle cx="${point.x}" cy="${point.y}" r="${radius}" fill="${escapeAttr3(baseFill)}"/>`
3839
+ `<circle cx="${x}" cy="${y}" r="${round3(radius * 0.42)}" fill="${escapeAttr3(NAZAR_IRIS)}"/>`
3840
+ );
3841
+ push(
3842
+ `<circle cx="${x}" cy="${y}" r="${round3(radius * 0.2)}" fill="${escapeAttr3(NAZAR_PUPIL)}"/>`
3836
3843
  );
3837
- push(`<circle cx="${point.x}" cy="${point.y}" r="${radius}" fill="url(#kether-glow)"/>`);
3838
- const spokes = 16;
3839
- const innerRadius = round3(radius * 0.18);
3840
- const outerRadius = round3(radius * 0.92);
3841
- const innerWidth = round3(radius * 0.04);
3842
- const angleStep = 360 / spokes;
3843
- push(`<g opacity="0.85">`);
3844
- for (let index = 0; index < spokes; index++) {
3845
- const angle = index * angleStep;
3846
- push(`<g transform="rotate(${angle} ${point.x} ${point.y})">`);
3847
- const x0 = round3(point.x - innerWidth);
3848
- const y0 = round3(point.y - innerRadius);
3849
- const x1 = point.x;
3850
- const y1 = round3(point.y - outerRadius);
3851
- const x2 = round3(point.x + innerWidth);
3852
- const y2 = round3(point.y - innerRadius);
3853
- push(
3854
- `<polygon points="${x0},${y0} ${x1},${y1} ${x2},${y2} ${point.x},${point.y}" fill="url(#kether-facet)"/>`
3855
- );
3856
- push(`</g>`);
3857
- }
3858
- push(`</g>`);
3859
- push(`<circle cx="${point.x}" cy="${point.y}" r="${radius}" fill="url(#kether-rim)"/>`);
3860
3844
  }
3861
3845
  function renderSlicedSphere(push, point, radius, colors, startAngle) {
3862
3846
  const segmentCount = colors.length;
@@ -3868,18 +3852,28 @@ function renderSlicedSphere(push, point, radius, colors, startAngle) {
3868
3852
  currentAngle += step;
3869
3853
  }
3870
3854
  }
3871
- function renderIridescent(push, point, radius) {
3872
- const stops = [
3873
- [0, "#F0E8EE"],
3874
- [0.1, "#ffa3e6"],
3875
- [0.22, "#a7e0ff"],
3876
- [0.34, "#baff9a"],
3877
- [0.46, "#ffe28a"],
3878
- [0.58, "#c6a4ff"],
3879
- [0.7, "#9ad6ff"],
3880
- [0.82, "#ffa3e6"],
3881
- [1, "#F0E8EE"]
3882
- ];
3855
+ var IRIDESCENT_STOPS = [
3856
+ [0, "#F0E8EE"],
3857
+ [0.1, "#ffa3e6"],
3858
+ [0.22, "#a7e0ff"],
3859
+ [0.34, "#baff9a"],
3860
+ [0.46, "#ffe28a"],
3861
+ [0.58, "#c6a4ff"],
3862
+ [0.7, "#9ad6ff"],
3863
+ [0.82, "#ffa3e6"],
3864
+ [1, "#F0E8EE"]
3865
+ ];
3866
+ var NACRE_STOPS = [
3867
+ [0, "#eaf6f6"],
3868
+ [0.12, "#a8d6ec"],
3869
+ [0.25, "#c3b6ec"],
3870
+ [0.4, "#a6ecec"],
3871
+ [0.55, "#dfe6fb"],
3872
+ [0.7, "#a6cdf0"],
3873
+ [0.82, "#cbb4ec"],
3874
+ [1, "#eaf6f6"]
3875
+ ];
3876
+ function renderIridescent(push, point, radius, stops = IRIDESCENT_STOPS) {
3883
3877
  const slices = 72;
3884
3878
  const sphereRadius = round3(radius * 0.96);
3885
3879
  for (let index = 0; index < slices; index++) {
@@ -3957,6 +3951,6 @@ function escapeAttr3(value) {
3957
3951
  return value.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;");
3958
3952
  }
3959
3953
 
3960
- export { ANGLE_GLYPHS, ANGLE_GLYPH_PRIMITIVES, ARCHEOMETER_DEFAULT_VIEWBOX, ASPECT_GLYPHS, ASPECT_GLYPH_PRIMITIVES, ASTRO_GLYPHS, ASTRO_WHEEL_DEFAULT_ASPECT_SPECS, ASTRO_WHEEL_DEFAULT_VIEWBOX, ASTRO_WHEEL_POINT_GLYPHS, ASTRO_WHEEL_ZODIAC_SIGNS, DEFAULT_ARCHEOMETER_MUSICAL_NOTES, DEFAULT_ARCHEOMETER_PLANETS, DEFAULT_ARCHEOMETER_SECTOR_CORRESPONDENCES, DEFAULT_ARCHEOMETER_TRIANGLES, DEFAULT_ARCHEOMETER_TRIANGLE_LABELS, DEFAULT_ARCHEOMETER_UTTERANCE, DEFAULT_ARCHEOMETER_ZODIAC, DEFAULT_ARCHETYPE_MUSICAL_NOTES, DEFAULT_ARCHETYPE_PLANETS, DEFAULT_ARCHETYPE_TRIANGLES, DEFAULT_ARCHETYPE_UTTERANCE, DEFAULT_ARCHETYPE_ZODIAC, PLANET_GLYPHS, PLANET_GLYPH_PRIMITIVES, TREE_PATH_IDS, TREE_SPHERE_IDS, TREE_SPHERE_NAMES, TREE_SVG_DEFAULT_VIEWBOX, ZODIAC_GLYPHS, ZODIAC_GLYPH_PRIMITIVES, generateArcheometerSvg, generateAstroGlyphSvg, generateAstroWheelSvg, generateGlyphSvg, generateTreeSvg, getArcheometerRenderModel, getAstroGlyph, getAstroWheelRenderModel, getRouteActivations, getTreeLayout, getTreeRenderModel, listAstroGlyphs };
3954
+ export { ANGLE_GLYPHS, ANGLE_GLYPH_PRIMITIVES, ARCHEOMETER_DEFAULT_VIEWBOX, ASPECT_GLYPHS, ASPECT_GLYPH_PRIMITIVES, ASTRO_GLYPHS, ASTRO_WHEEL_DEFAULT_ASPECT_SPECS, ASTRO_WHEEL_DEFAULT_VIEWBOX, ASTRO_WHEEL_POINT_GLYPHS, ASTRO_WHEEL_ZODIAC_SIGNS, DEFAULT_ARCHEOMETER_MUSICAL_NOTES, DEFAULT_ARCHEOMETER_PLANETS, DEFAULT_ARCHEOMETER_SECTOR_CORRESPONDENCES, DEFAULT_ARCHEOMETER_TRIANGLES, DEFAULT_ARCHEOMETER_TRIANGLE_LABELS, DEFAULT_ARCHEOMETER_UTTERANCE, DEFAULT_ARCHEOMETER_ZODIAC, DEFAULT_ARCHETYPE_MUSICAL_NOTES, DEFAULT_ARCHETYPE_PLANETS, DEFAULT_ARCHETYPE_TRIANGLES, DEFAULT_ARCHETYPE_UTTERANCE, DEFAULT_ARCHETYPE_ZODIAC, PLANET_GLYPHS, PLANET_GLYPH_PRIMITIVES, TREE_PATH_IDS, TREE_SPHERE_IDS, TREE_SPHERE_NAMES, TREE_SVG_DEFAULT_VIEWBOX, ZODIAC_GLYPHS, ZODIAC_GLYPH_PRIMITIVES, generateArcheometerSvg, generateAstroGlyphSvg, generateAstroWheelSvg, generateGlyphSvg, generateTreeSvg, getArcheometerRenderModel, getAstroGlyph, getRouteActivations, getTreeLayout, getTreeRenderModel, listAstroGlyphs };
3961
3955
  //# sourceMappingURL=out.js.map
3962
- //# sourceMappingURL=chunk-PPIKM3QA.mjs.map
3956
+ //# sourceMappingURL=chunk-SLB2NLWI.mjs.map