kaabalah 6.11.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-XUD2HQUG.js → chunk-LUHQNKKJ.js} +168 -62
- package/dist/chunk-LUHQNKKJ.js.map +1 -0
- package/dist/{chunk-4MACEIWO.mjs → chunk-SLB2NLWI.mjs} +169 -63
- package/dist/chunk-SLB2NLWI.mjs.map +1 -0
- package/dist/cli.js +201 -95
- package/dist/cli.js.map +1 -1
- package/dist/index.js +42 -42
- package/dist/index.mjs +1 -1
- package/dist/visual/index.js +42 -42
- package/dist/visual/index.mjs +1 -1
- package/package.json +1 -1
- package/dist/chunk-4MACEIWO.mjs.map +0 -1
- package/dist/chunk-XUD2HQUG.js.map +0 -1
|
@@ -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;
|
|
@@ -2943,7 +2943,42 @@ var DEFAULT_PATH_HIGHLIGHT_WIDTH = 8;
|
|
|
2943
2943
|
var DEFAULT_SPHERE_HIT_RADIUS = DEFAULT_SPHERE_RADIUS + 8;
|
|
2944
2944
|
var DEFAULT_PATH_HIT_STROKE_WIDTH = DEFAULT_PATH_EDGE_WIDTH + 8;
|
|
2945
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";
|
|
2946
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
|
+
}
|
|
2947
2982
|
var TREE_SPHERE_IDS = [...TREE_TOPOLOGY_SPHERE_IDS];
|
|
2948
2983
|
var TREE_PATH_IDS = [...TREE_TOPOLOGY_PATH_IDS];
|
|
2949
2984
|
var CANONICAL_SPHERE_PERCENTAGES = {
|
|
@@ -3195,21 +3230,44 @@ function generateTreeSvg(options = {}) {
|
|
|
3195
3230
|
`<clipPath id="clip-${slug}"><circle cx="${point.x}" cy="${point.y}" r="${radius}"/></clipPath>`
|
|
3196
3231
|
);
|
|
3197
3232
|
}
|
|
3198
|
-
|
|
3199
|
-
|
|
3200
|
-
|
|
3201
|
-
|
|
3202
|
-
|
|
3203
|
-
|
|
3204
|
-
|
|
3205
|
-
|
|
3206
|
-
|
|
3207
|
-
|
|
3208
|
-
|
|
3209
|
-
|
|
3210
|
-
|
|
3211
|
-
|
|
3212
|
-
|
|
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
|
+
}
|
|
3213
3271
|
push(`</defs>`);
|
|
3214
3272
|
const background = options.background ?? "white";
|
|
3215
3273
|
if (background !== "transparent") {
|
|
@@ -3255,22 +3313,31 @@ function generateTreeSvg(options = {}) {
|
|
|
3255
3313
|
activation: activationMap.get(currentPathId),
|
|
3256
3314
|
canonicalColor
|
|
3257
3315
|
});
|
|
3258
|
-
const
|
|
3259
|
-
|
|
3260
|
-
|
|
3261
|
-
}) :
|
|
3262
|
-
const
|
|
3263
|
-
|
|
3264
|
-
|
|
3265
|
-
|
|
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
|
+
}
|
|
3266
3328
|
push(
|
|
3267
|
-
`<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"${
|
|
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}/>`
|
|
3268
3330
|
);
|
|
3269
3331
|
if (activation?.visible && activation.emphasis > 0) {
|
|
3270
3332
|
push(
|
|
3271
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"/>`
|
|
3272
3334
|
);
|
|
3273
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
|
+
}
|
|
3274
3341
|
push(
|
|
3275
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"/>`
|
|
3276
3343
|
);
|
|
@@ -3385,6 +3452,16 @@ function renderSphere(push, params) {
|
|
|
3385
3452
|
push(
|
|
3386
3453
|
`<circle cx="${point.x}" cy="${point.y}" r="${params.radius}" fill="none" stroke="${escapeAttr3(params.palette.sphereStrokeColor)}" stroke-width="${params.sphereStrokeWidth}"/>`
|
|
3387
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
|
+
);
|
|
3388
3465
|
}
|
|
3389
3466
|
}
|
|
3390
3467
|
function buildLayoutMap(tree, spherePositions) {
|
|
@@ -3471,6 +3548,40 @@ function resolveTargetActivation(params) {
|
|
|
3471
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
|
|
3472
3549
|
};
|
|
3473
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
|
+
}
|
|
3474
3585
|
function resolveSphereCanonicalColor(params) {
|
|
3475
3586
|
const override = params.palette.sphereFills[params.sphereId];
|
|
3476
3587
|
if (override) {
|
|
@@ -3718,33 +3829,18 @@ function arcPath2(cx, cy, radius, startDegrees, endDegrees) {
|
|
|
3718
3829
|
const largeArc = endDegrees - startDegrees <= 180 ? 0 : 1;
|
|
3719
3830
|
return `M ${cx} ${cy} L ${start.x} ${start.y} A ${radius} ${radius} 0 ${largeArc} 1 ${end.x} ${end.y} Z`;
|
|
3720
3831
|
}
|
|
3721
|
-
function renderKether(push, point, radius, baseFill =
|
|
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
|
+
}
|
|
3722
3838
|
push(
|
|
3723
|
-
`<circle cx="${
|
|
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)}"/>`
|
|
3724
3843
|
);
|
|
3725
|
-
push(`<circle cx="${point.x}" cy="${point.y}" r="${radius}" fill="url(#kether-glow)"/>`);
|
|
3726
|
-
const spokes = 16;
|
|
3727
|
-
const innerRadius = round3(radius * 0.18);
|
|
3728
|
-
const outerRadius = round3(radius * 0.92);
|
|
3729
|
-
const innerWidth = round3(radius * 0.04);
|
|
3730
|
-
const angleStep = 360 / spokes;
|
|
3731
|
-
push(`<g opacity="0.85">`);
|
|
3732
|
-
for (let index = 0; index < spokes; index++) {
|
|
3733
|
-
const angle = index * angleStep;
|
|
3734
|
-
push(`<g transform="rotate(${angle} ${point.x} ${point.y})">`);
|
|
3735
|
-
const x0 = round3(point.x - innerWidth);
|
|
3736
|
-
const y0 = round3(point.y - innerRadius);
|
|
3737
|
-
const x1 = point.x;
|
|
3738
|
-
const y1 = round3(point.y - outerRadius);
|
|
3739
|
-
const x2 = round3(point.x + innerWidth);
|
|
3740
|
-
const y2 = round3(point.y - innerRadius);
|
|
3741
|
-
push(
|
|
3742
|
-
`<polygon points="${x0},${y0} ${x1},${y1} ${x2},${y2} ${point.x},${point.y}" fill="url(#kether-facet)"/>`
|
|
3743
|
-
);
|
|
3744
|
-
push(`</g>`);
|
|
3745
|
-
}
|
|
3746
|
-
push(`</g>`);
|
|
3747
|
-
push(`<circle cx="${point.x}" cy="${point.y}" r="${radius}" fill="url(#kether-rim)"/>`);
|
|
3748
3844
|
}
|
|
3749
3845
|
function renderSlicedSphere(push, point, radius, colors, startAngle) {
|
|
3750
3846
|
const segmentCount = colors.length;
|
|
@@ -3756,18 +3852,28 @@ function renderSlicedSphere(push, point, radius, colors, startAngle) {
|
|
|
3756
3852
|
currentAngle += step;
|
|
3757
3853
|
}
|
|
3758
3854
|
}
|
|
3759
|
-
|
|
3760
|
-
|
|
3761
|
-
|
|
3762
|
-
|
|
3763
|
-
|
|
3764
|
-
|
|
3765
|
-
|
|
3766
|
-
|
|
3767
|
-
|
|
3768
|
-
|
|
3769
|
-
|
|
3770
|
-
|
|
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) {
|
|
3771
3877
|
const slices = 72;
|
|
3772
3878
|
const sphereRadius = round3(radius * 0.96);
|
|
3773
3879
|
for (let index = 0; index < slices; index++) {
|
|
@@ -3847,4 +3953,4 @@ function escapeAttr3(value) {
|
|
|
3847
3953
|
|
|
3848
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 };
|
|
3849
3955
|
//# sourceMappingURL=out.js.map
|
|
3850
|
-
//# sourceMappingURL=chunk-
|
|
3956
|
+
//# sourceMappingURL=chunk-SLB2NLWI.mjs.map
|