schematex 0.3.2 → 0.3.4
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/README.md +20 -1
- package/dist/ai/ai-sdk.cjs +25 -25
- package/dist/ai/ai-sdk.d.cts +1 -1
- package/dist/ai/ai-sdk.d.ts +1 -1
- package/dist/ai/ai-sdk.js +20 -20
- package/dist/ai/index.cjs +28 -28
- package/dist/ai/index.d.cts +1 -1
- package/dist/ai/index.d.ts +1 -1
- package/dist/ai/index.js +20 -20
- package/dist/browser.cjs +22 -22
- package/dist/browser.js +20 -20
- package/dist/{chunk-UK7JF5QB.cjs → chunk-3MJKJX27.cjs} +37 -38
- package/dist/chunk-3MJKJX27.cjs.map +1 -0
- package/dist/{chunk-HIQPEAL7.js → chunk-3RAVPXLN.js} +4 -4
- package/dist/{chunk-HIQPEAL7.js.map → chunk-3RAVPXLN.js.map} +1 -1
- package/dist/{chunk-LFZZ4NCP.cjs → chunk-3WNW5Y7P.cjs} +48 -8
- package/dist/chunk-3WNW5Y7P.cjs.map +1 -0
- package/dist/{chunk-XUEROLSB.cjs → chunk-4THC4VUA.cjs} +17 -17
- package/dist/chunk-4THC4VUA.cjs.map +1 -0
- package/dist/{chunk-K5QG53GT.cjs → chunk-5COUZTVA.cjs} +27 -27
- package/dist/{chunk-K5QG53GT.cjs.map → chunk-5COUZTVA.cjs.map} +1 -1
- package/dist/{chunk-F6OROIHS.js → chunk-5CTERELC.js} +4 -4
- package/dist/{chunk-F6OROIHS.js.map → chunk-5CTERELC.js.map} +1 -1
- package/dist/{chunk-ZNLEUL7T.js → chunk-5SKT7RYR.js} +5 -5
- package/dist/chunk-5SKT7RYR.js.map +1 -0
- package/dist/{chunk-75BMFCP5.cjs → chunk-5UCXMYE7.cjs} +44 -44
- package/dist/{chunk-75BMFCP5.cjs.map → chunk-5UCXMYE7.cjs.map} +1 -1
- package/dist/{chunk-GYTWJ6VB.cjs → chunk-6ULC3UHJ.cjs} +68 -49
- package/dist/chunk-6ULC3UHJ.cjs.map +1 -0
- package/dist/{chunk-3YXXZ4LT.cjs → chunk-6WORZSL3.cjs} +34 -34
- package/dist/{chunk-3YXXZ4LT.cjs.map → chunk-6WORZSL3.cjs.map} +1 -1
- package/dist/{chunk-6BKUD5EJ.js → chunk-6XGSEG3K.js} +4 -5
- package/dist/chunk-6XGSEG3K.js.map +1 -0
- package/dist/{chunk-OK5RYX55.cjs → chunk-CQP5YHVK.cjs} +26 -27
- package/dist/chunk-CQP5YHVK.cjs.map +1 -0
- package/dist/{chunk-2UJAVPA4.cjs → chunk-CS67UBP3.cjs} +27 -27
- package/dist/{chunk-2UJAVPA4.cjs.map → chunk-CS67UBP3.cjs.map} +1 -1
- package/dist/{chunk-YTEEZV6J.cjs → chunk-DBMZEZLF.cjs} +425 -425
- package/dist/chunk-DBMZEZLF.cjs.map +1 -0
- package/dist/{chunk-NFT6VW73.js → chunk-DHKKDIVT.js} +4 -4
- package/dist/chunk-DHKKDIVT.js.map +1 -0
- package/dist/{chunk-H4CJTKEH.js → chunk-DNZV4V4R.js} +5 -5
- package/dist/{chunk-H4CJTKEH.js.map → chunk-DNZV4V4R.js.map} +1 -1
- package/dist/{chunk-ZTSO3S4P.js → chunk-FO7BLCEW.js} +3 -3
- package/dist/{chunk-ZTSO3S4P.js.map → chunk-FO7BLCEW.js.map} +1 -1
- package/dist/{chunk-EYHD7LV3.cjs → chunk-H5JYZ5YS.cjs} +130 -130
- package/dist/chunk-H5JYZ5YS.cjs.map +1 -0
- package/dist/{chunk-RNGYXGHS.js → chunk-HKJRHXGZ.js} +22 -22
- package/dist/chunk-HKJRHXGZ.js.map +1 -0
- package/dist/{chunk-X4F6VVEJ.js → chunk-I6VEXSUK.js} +3 -4
- package/dist/chunk-I6VEXSUK.js.map +1 -0
- package/dist/{chunk-MKKFIPKU.cjs → chunk-IFR34VTL.cjs} +47 -47
- package/dist/chunk-IFR34VTL.cjs.map +1 -0
- package/dist/{chunk-BJ65PKDU.js → chunk-IURM4ZWE.js} +4 -4
- package/dist/chunk-IURM4ZWE.js.map +1 -0
- package/dist/{chunk-M5ZC3LFJ.js → chunk-IZMAZOQI.js} +4 -4
- package/dist/chunk-IZMAZOQI.js.map +1 -0
- package/dist/{chunk-RODV6PC4.cjs → chunk-J3Y2QDJR.cjs} +7 -7
- package/dist/{chunk-RODV6PC4.cjs.map → chunk-J3Y2QDJR.cjs.map} +1 -1
- package/dist/{chunk-BUN3CRMP.cjs → chunk-K6RAUXRQ.cjs} +65 -66
- package/dist/chunk-K6RAUXRQ.cjs.map +1 -0
- package/dist/{chunk-IT2TVXC7.js → chunk-LPKVIRYT.js} +4 -5
- package/dist/chunk-LPKVIRYT.js.map +1 -0
- package/dist/{chunk-W7GIQTJV.cjs → chunk-MIKCKV27.cjs} +22 -22
- package/dist/chunk-MIKCKV27.cjs.map +1 -0
- package/dist/{chunk-KUXOHLGC.cjs → chunk-O5POCPXZ.cjs} +52 -53
- package/dist/chunk-O5POCPXZ.cjs.map +1 -0
- package/dist/{chunk-BJWMPPEA.js → chunk-PWI4NFYR.js} +4 -4
- package/dist/chunk-PWI4NFYR.js.map +1 -0
- package/dist/{chunk-WHJXRLFD.js → chunk-SYYBKDL7.js} +48 -8
- package/dist/chunk-SYYBKDL7.js.map +1 -0
- package/dist/{chunk-L2KUGWFR.cjs → chunk-T47A6XUK.cjs} +47 -47
- package/dist/chunk-T47A6XUK.cjs.map +1 -0
- package/dist/{chunk-SFSZUOFT.js → chunk-TWAC2IIS.js} +4 -4
- package/dist/chunk-TWAC2IIS.js.map +1 -0
- package/dist/{chunk-XI6JOG76.cjs → chunk-V4OVUBLA.cjs} +46 -46
- package/dist/chunk-V4OVUBLA.cjs.map +1 -0
- package/dist/{chunk-2J2QWNGI.js → chunk-VRE5VWDQ.js} +27 -8
- package/dist/chunk-VRE5VWDQ.js.map +1 -0
- package/dist/{chunk-SE23X5OE.js → chunk-WHNIK4LK.js} +4 -5
- package/dist/chunk-WHNIK4LK.js.map +1 -0
- package/dist/{chunk-C3IVD7DI.cjs → chunk-WIFGBWET.cjs} +25 -26
- package/dist/chunk-WIFGBWET.cjs.map +1 -0
- package/dist/{chunk-7MVDN5UC.cjs → chunk-XSNNGYXZ.cjs} +36 -36
- package/dist/chunk-XSNNGYXZ.cjs.map +1 -0
- package/dist/{chunk-7BEJHG43.js → chunk-YWDODCW2.js} +4 -4
- package/dist/{chunk-7BEJHG43.js.map → chunk-YWDODCW2.js.map} +1 -1
- package/dist/{chunk-M3R6RCXY.js → chunk-ZKDL6Y3O.js} +4 -4
- package/dist/chunk-ZKDL6Y3O.js.map +1 -0
- package/dist/{chunk-56LXBM45.js → chunk-ZQZNWAHH.js} +4 -5
- package/dist/chunk-ZQZNWAHH.js.map +1 -0
- package/dist/diagrams/blockdiagram/index.cjs +6 -6
- package/dist/diagrams/blockdiagram/index.d.cts +1 -1
- package/dist/diagrams/blockdiagram/index.d.ts +1 -1
- package/dist/diagrams/blockdiagram/index.js +2 -2
- package/dist/diagrams/circuit/index.cjs +8 -8
- package/dist/diagrams/circuit/index.d.cts +1 -1
- package/dist/diagrams/circuit/index.d.ts +1 -1
- package/dist/diagrams/circuit/index.js +2 -2
- package/dist/diagrams/ecomap/index.cjs +8 -8
- package/dist/diagrams/ecomap/index.d.cts +1 -1
- package/dist/diagrams/ecomap/index.d.ts +1 -1
- package/dist/diagrams/ecomap/index.js +3 -3
- package/dist/diagrams/entity/index.cjs +6 -6
- package/dist/diagrams/entity/index.d.cts +1 -1
- package/dist/diagrams/entity/index.d.ts +1 -1
- package/dist/diagrams/entity/index.js +2 -2
- package/dist/diagrams/fishbone/index.cjs +8 -8
- package/dist/diagrams/fishbone/index.d.cts +1 -1
- package/dist/diagrams/fishbone/index.d.ts +1 -1
- package/dist/diagrams/fishbone/index.js +2 -2
- package/dist/diagrams/flowchart/index.cjs +8 -8
- package/dist/diagrams/flowchart/index.d.cts +2 -2
- package/dist/diagrams/flowchart/index.d.ts +2 -2
- package/dist/diagrams/flowchart/index.js +2 -2
- package/dist/diagrams/genogram/index.cjs +10 -10
- package/dist/diagrams/genogram/index.d.cts +1 -1
- package/dist/diagrams/genogram/index.d.ts +1 -1
- package/dist/diagrams/genogram/index.js +3 -3
- package/dist/diagrams/ladder/index.cjs +6 -6
- package/dist/diagrams/ladder/index.d.cts +1 -1
- package/dist/diagrams/ladder/index.d.ts +1 -1
- package/dist/diagrams/ladder/index.js +2 -2
- package/dist/diagrams/logic/index.cjs +6 -6
- package/dist/diagrams/logic/index.d.cts +1 -1
- package/dist/diagrams/logic/index.d.ts +1 -1
- package/dist/diagrams/logic/index.js +2 -2
- package/dist/diagrams/orgchart/index.cjs +7 -7
- package/dist/diagrams/orgchart/index.d.cts +1 -1
- package/dist/diagrams/orgchart/index.d.ts +1 -1
- package/dist/diagrams/orgchart/index.js +2 -2
- package/dist/diagrams/pedigree/index.cjs +8 -8
- package/dist/diagrams/pedigree/index.d.cts +1 -1
- package/dist/diagrams/pedigree/index.d.ts +1 -1
- package/dist/diagrams/pedigree/index.js +3 -3
- package/dist/diagrams/phylo/index.cjs +7 -7
- package/dist/diagrams/phylo/index.d.cts +1 -1
- package/dist/diagrams/phylo/index.d.ts +1 -1
- package/dist/diagrams/phylo/index.js +2 -2
- package/dist/diagrams/sld/index.cjs +6 -6
- package/dist/diagrams/sld/index.d.cts +1 -1
- package/dist/diagrams/sld/index.d.ts +1 -1
- package/dist/diagrams/sld/index.js +2 -2
- package/dist/diagrams/sociogram/index.cjs +7 -7
- package/dist/diagrams/sociogram/index.d.cts +1 -1
- package/dist/diagrams/sociogram/index.d.ts +1 -1
- package/dist/diagrams/sociogram/index.js +3 -3
- package/dist/diagrams/timing/index.cjs +5 -5
- package/dist/diagrams/timing/index.d.cts +1 -1
- package/dist/diagrams/timing/index.d.ts +1 -1
- package/dist/diagrams/timing/index.js +2 -2
- package/dist/diagrams/venn/index.cjs +9 -9
- package/dist/diagrams/venn/index.d.cts +1 -1
- package/dist/diagrams/venn/index.d.ts +1 -1
- package/dist/diagrams/venn/index.js +2 -2
- package/dist/export.cjs +1 -1
- package/dist/export.cjs.map +1 -1
- package/dist/export.d.cts +1 -1
- package/dist/export.d.ts +1 -1
- package/dist/export.js +1 -1
- package/dist/export.js.map +1 -1
- package/dist/{index-dWDwG6BW.d.ts → index-D3u6vcA4.d.ts} +1 -1
- package/dist/{index-BrLxEzSQ.d.cts → index-bdfj6FpQ.d.cts} +1 -1
- package/dist/index.cjs +41 -41
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +19 -19
- package/dist/react.cjs +20 -20
- package/dist/react.js +19 -19
- package/dist/{types-BtiUg7Gx.d.cts → types-DnU2UlWz.d.cts} +2 -0
- package/dist/{types-BtiUg7Gx.d.ts → types-DnU2UlWz.d.ts} +2 -0
- package/package.json +1 -1
- package/dist/chunk-2J2QWNGI.js.map +0 -1
- package/dist/chunk-56LXBM45.js.map +0 -1
- package/dist/chunk-6BKUD5EJ.js.map +0 -1
- package/dist/chunk-7MVDN5UC.cjs.map +0 -1
- package/dist/chunk-BJ65PKDU.js.map +0 -1
- package/dist/chunk-BJWMPPEA.js.map +0 -1
- package/dist/chunk-BUN3CRMP.cjs.map +0 -1
- package/dist/chunk-C3IVD7DI.cjs.map +0 -1
- package/dist/chunk-EYHD7LV3.cjs.map +0 -1
- package/dist/chunk-GYTWJ6VB.cjs.map +0 -1
- package/dist/chunk-IT2TVXC7.js.map +0 -1
- package/dist/chunk-KUXOHLGC.cjs.map +0 -1
- package/dist/chunk-L2KUGWFR.cjs.map +0 -1
- package/dist/chunk-LFZZ4NCP.cjs.map +0 -1
- package/dist/chunk-M3R6RCXY.js.map +0 -1
- package/dist/chunk-M5ZC3LFJ.js.map +0 -1
- package/dist/chunk-MKKFIPKU.cjs.map +0 -1
- package/dist/chunk-NFT6VW73.js.map +0 -1
- package/dist/chunk-OK5RYX55.cjs.map +0 -1
- package/dist/chunk-RNGYXGHS.js.map +0 -1
- package/dist/chunk-SE23X5OE.js.map +0 -1
- package/dist/chunk-SFSZUOFT.js.map +0 -1
- package/dist/chunk-UK7JF5QB.cjs.map +0 -1
- package/dist/chunk-W7GIQTJV.cjs.map +0 -1
- package/dist/chunk-WHJXRLFD.js.map +0 -1
- package/dist/chunk-X4F6VVEJ.js.map +0 -1
- package/dist/chunk-XI6JOG76.cjs.map +0 -1
- package/dist/chunk-XUEROLSB.cjs.map +0 -1
- package/dist/chunk-YTEEZV6J.cjs.map +0 -1
- package/dist/chunk-ZNLEUL7T.js.map +0 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunk5UCXMYE7_cjs = require('./chunk-5UCXMYE7.cjs');
|
|
4
4
|
var chunkD7EHZFK4_cjs = require('./chunk-D7EHZFK4.cjs');
|
|
5
|
-
var
|
|
5
|
+
var chunk3WNW5Y7P_cjs = require('./chunk-3WNW5Y7P.cjs');
|
|
6
6
|
|
|
7
7
|
// src/diagrams/genogram/parser.ts
|
|
8
8
|
var ParseError = class extends Error {
|
|
@@ -128,7 +128,7 @@ function parseGenogram(text2) {
|
|
|
128
128
|
state.currentLine++;
|
|
129
129
|
continue;
|
|
130
130
|
}
|
|
131
|
-
if (
|
|
131
|
+
if (chunk5UCXMYE7_cjs.parseLegendDirective(trimmed, legendOverrides)) {
|
|
132
132
|
state.currentLine++;
|
|
133
133
|
continue;
|
|
134
134
|
}
|
|
@@ -1396,7 +1396,7 @@ function renderIndividualSymbol(individual, x, y, size) {
|
|
|
1396
1396
|
];
|
|
1397
1397
|
if (individual.status === "deceased") classes.push("schematex-genogram-deceased");
|
|
1398
1398
|
const titleText = formatTitle(individual);
|
|
1399
|
-
const children = [
|
|
1399
|
+
const children = [chunk3WNW5Y7P_cjs.title(titleText)];
|
|
1400
1400
|
const isIndex = individual.markers?.includes("index-person");
|
|
1401
1401
|
if (isIndex) {
|
|
1402
1402
|
children.push(indexBorder(individual.sex, half));
|
|
@@ -1414,7 +1414,7 @@ function renderIndividualSymbol(individual, x, y, size) {
|
|
|
1414
1414
|
const ageToShow = individual.age ?? calcAge(individual);
|
|
1415
1415
|
if (ageToShow !== void 0) {
|
|
1416
1416
|
children.push(
|
|
1417
|
-
|
|
1417
|
+
chunk3WNW5Y7P_cjs.text(
|
|
1418
1418
|
{
|
|
1419
1419
|
x: 0,
|
|
1420
1420
|
y: 5,
|
|
@@ -1430,7 +1430,7 @@ function renderIndividualSymbol(individual, x, y, size) {
|
|
|
1430
1430
|
if (isUnknownSiblings) {
|
|
1431
1431
|
classes.push("schematex-genogram-unknown-siblings");
|
|
1432
1432
|
children.push(
|
|
1433
|
-
|
|
1433
|
+
chunk3WNW5Y7P_cjs.text(
|
|
1434
1434
|
{
|
|
1435
1435
|
x: 0,
|
|
1436
1436
|
y: 5,
|
|
@@ -1443,7 +1443,7 @@ function renderIndividualSymbol(individual, x, y, size) {
|
|
|
1443
1443
|
)
|
|
1444
1444
|
);
|
|
1445
1445
|
}
|
|
1446
|
-
return
|
|
1446
|
+
return chunk3WNW5Y7P_cjs.group(
|
|
1447
1447
|
{
|
|
1448
1448
|
class: classes.join(" "),
|
|
1449
1449
|
"data-individual-id": individual.id,
|
|
@@ -1463,14 +1463,14 @@ function getRequiredDefs(individuals, includeArrowMarker = false) {
|
|
|
1463
1463
|
}
|
|
1464
1464
|
const children = [];
|
|
1465
1465
|
function quadClips(suffix, x, y, w, h) {
|
|
1466
|
-
const r =
|
|
1466
|
+
const r = chunk3WNW5Y7P_cjs.rect({ x, y, width: w, height: h });
|
|
1467
1467
|
children.push(
|
|
1468
|
-
|
|
1468
|
+
chunk3WNW5Y7P_cjs.el(
|
|
1469
1469
|
"clipPath",
|
|
1470
1470
|
{ id: `schematex-genogram-clip-${suffix}-rect`, clipPathUnits: "objectBoundingBox" },
|
|
1471
1471
|
[r]
|
|
1472
1472
|
),
|
|
1473
|
-
|
|
1473
|
+
chunk3WNW5Y7P_cjs.el(
|
|
1474
1474
|
"clipPath",
|
|
1475
1475
|
{ id: `schematex-genogram-clip-${suffix}-circle`, clipPathUnits: "objectBoundingBox" },
|
|
1476
1476
|
[r]
|
|
@@ -1488,7 +1488,7 @@ function getRequiredDefs(individuals, includeArrowMarker = false) {
|
|
|
1488
1488
|
if (neededFills.has("quad-br")) quadClips("quad-br", 0.5, 0.5, 0.5, 0.5);
|
|
1489
1489
|
if (neededFills.has("striped")) {
|
|
1490
1490
|
children.push(
|
|
1491
|
-
|
|
1491
|
+
chunk3WNW5Y7P_cjs.pattern(
|
|
1492
1492
|
{
|
|
1493
1493
|
id: "schematex-genogram-pattern-striped",
|
|
1494
1494
|
patternUnits: "userSpaceOnUse",
|
|
@@ -1496,7 +1496,7 @@ function getRequiredDefs(individuals, includeArrowMarker = false) {
|
|
|
1496
1496
|
height: "4"
|
|
1497
1497
|
},
|
|
1498
1498
|
[
|
|
1499
|
-
|
|
1499
|
+
chunk3WNW5Y7P_cjs.path({
|
|
1500
1500
|
d: "M-1,1 l2,-2 M0,4 l4,-4 M3,5 l2,-2",
|
|
1501
1501
|
stroke: "#333",
|
|
1502
1502
|
"stroke-width": "1"
|
|
@@ -1507,7 +1507,7 @@ function getRequiredDefs(individuals, includeArrowMarker = false) {
|
|
|
1507
1507
|
}
|
|
1508
1508
|
if (neededFills.has("dotted")) {
|
|
1509
1509
|
children.push(
|
|
1510
|
-
|
|
1510
|
+
chunk3WNW5Y7P_cjs.pattern(
|
|
1511
1511
|
{
|
|
1512
1512
|
id: "schematex-genogram-pattern-dotted",
|
|
1513
1513
|
patternUnits: "userSpaceOnUse",
|
|
@@ -1515,14 +1515,14 @@ function getRequiredDefs(individuals, includeArrowMarker = false) {
|
|
|
1515
1515
|
height: "6"
|
|
1516
1516
|
},
|
|
1517
1517
|
[
|
|
1518
|
-
|
|
1518
|
+
chunk3WNW5Y7P_cjs.circle({ cx: "3", cy: "3", r: "1", fill: "#333" })
|
|
1519
1519
|
]
|
|
1520
1520
|
)
|
|
1521
1521
|
);
|
|
1522
1522
|
}
|
|
1523
1523
|
if (includeArrowMarker) {
|
|
1524
1524
|
children.push(
|
|
1525
|
-
|
|
1525
|
+
chunk3WNW5Y7P_cjs.el("marker", {
|
|
1526
1526
|
id: "schematex-genogram-arrow",
|
|
1527
1527
|
viewBox: "0 0 10 10",
|
|
1528
1528
|
refX: "10",
|
|
@@ -1531,11 +1531,11 @@ function getRequiredDefs(individuals, includeArrowMarker = false) {
|
|
|
1531
1531
|
markerHeight: "6",
|
|
1532
1532
|
orient: "auto"
|
|
1533
1533
|
}, [
|
|
1534
|
-
|
|
1534
|
+
chunk3WNW5Y7P_cjs.path({ d: "M 0 0 L 10 5 L 0 10 z", fill: "#333" })
|
|
1535
1535
|
])
|
|
1536
1536
|
);
|
|
1537
1537
|
}
|
|
1538
|
-
return
|
|
1538
|
+
return chunk3WNW5Y7P_cjs.defs(children);
|
|
1539
1539
|
}
|
|
1540
1540
|
function capitalize(s) {
|
|
1541
1541
|
return s.charAt(0).toUpperCase() + s.slice(1);
|
|
@@ -1560,7 +1560,7 @@ function indexBorder(sex, half) {
|
|
|
1560
1560
|
const outer = half + 4;
|
|
1561
1561
|
switch (sex) {
|
|
1562
1562
|
case "male":
|
|
1563
|
-
return
|
|
1563
|
+
return chunk3WNW5Y7P_cjs.rect({
|
|
1564
1564
|
x: -outer,
|
|
1565
1565
|
y: -outer,
|
|
1566
1566
|
width: outer * 2,
|
|
@@ -1568,7 +1568,7 @@ function indexBorder(sex, half) {
|
|
|
1568
1568
|
class: "schematex-genogram-index-border"
|
|
1569
1569
|
});
|
|
1570
1570
|
case "female":
|
|
1571
|
-
return
|
|
1571
|
+
return chunk3WNW5Y7P_cjs.circle({
|
|
1572
1572
|
cx: 0,
|
|
1573
1573
|
cy: 0,
|
|
1574
1574
|
r: outer,
|
|
@@ -1578,7 +1578,7 @@ function indexBorder(sex, half) {
|
|
|
1578
1578
|
case "other":
|
|
1579
1579
|
case "nonbinary":
|
|
1580
1580
|
case "intersex":
|
|
1581
|
-
return
|
|
1581
|
+
return chunk3WNW5Y7P_cjs.polygon({
|
|
1582
1582
|
points: `0,${-outer} ${outer},0 0,${outer} ${-outer},0`,
|
|
1583
1583
|
class: "schematex-genogram-index-border"
|
|
1584
1584
|
});
|
|
@@ -1588,32 +1588,32 @@ function baseShape(sex, half, shape) {
|
|
|
1588
1588
|
const cls = "schematex-genogram-shape";
|
|
1589
1589
|
switch (shape) {
|
|
1590
1590
|
case "square":
|
|
1591
|
-
return
|
|
1591
|
+
return chunk3WNW5Y7P_cjs.rect({ x: -half, y: -half, width: half * 2, height: half * 2, class: cls });
|
|
1592
1592
|
case "circle":
|
|
1593
|
-
return
|
|
1593
|
+
return chunk3WNW5Y7P_cjs.circle({ cx: 0, cy: 0, r: half, class: cls });
|
|
1594
1594
|
case "diamond":
|
|
1595
|
-
return
|
|
1595
|
+
return chunk3WNW5Y7P_cjs.polygon({ points: `0,${-half} ${half},0 0,${half} ${-half},0`, class: cls });
|
|
1596
1596
|
case "triangle":
|
|
1597
|
-
return
|
|
1597
|
+
return chunk3WNW5Y7P_cjs.polygon({ points: `0,${-half} ${half},${half} ${-half},${half}`, class: cls });
|
|
1598
1598
|
case "triangle-down":
|
|
1599
|
-
return
|
|
1599
|
+
return chunk3WNW5Y7P_cjs.polygon({ points: `${-half},${-half} ${half},${-half} 0,${half}`, class: cls });
|
|
1600
1600
|
}
|
|
1601
1601
|
switch (sex) {
|
|
1602
1602
|
case "male":
|
|
1603
|
-
return
|
|
1603
|
+
return chunk3WNW5Y7P_cjs.rect({ x: -half, y: -half, width: half * 2, height: half * 2, class: cls });
|
|
1604
1604
|
case "female":
|
|
1605
|
-
return
|
|
1605
|
+
return chunk3WNW5Y7P_cjs.circle({ cx: 0, cy: 0, r: half, class: cls });
|
|
1606
1606
|
case "unknown":
|
|
1607
1607
|
case "other":
|
|
1608
1608
|
case "nonbinary":
|
|
1609
1609
|
case "intersex":
|
|
1610
|
-
return
|
|
1610
|
+
return chunk3WNW5Y7P_cjs.polygon({ points: `0,${-half} ${half},0 0,${half} ${-half},0`, class: cls });
|
|
1611
1611
|
}
|
|
1612
1612
|
}
|
|
1613
1613
|
function deceasedOverlay(sex, half) {
|
|
1614
1614
|
const extend = sex === "female" ? half * 0.707 : half;
|
|
1615
1615
|
return [
|
|
1616
|
-
|
|
1616
|
+
chunk3WNW5Y7P_cjs.line({
|
|
1617
1617
|
x1: -extend,
|
|
1618
1618
|
y1: -extend,
|
|
1619
1619
|
x2: extend,
|
|
@@ -1622,7 +1622,7 @@ function deceasedOverlay(sex, half) {
|
|
|
1622
1622
|
stroke: "#333",
|
|
1623
1623
|
"stroke-width": "2"
|
|
1624
1624
|
}),
|
|
1625
|
-
|
|
1625
|
+
chunk3WNW5Y7P_cjs.line({
|
|
1626
1626
|
x1: extend,
|
|
1627
1627
|
y1: -extend,
|
|
1628
1628
|
x2: -extend,
|
|
@@ -1650,15 +1650,15 @@ function conditionFillElement(sex, half, cond) {
|
|
|
1650
1650
|
attrs.class = `schematex-genogram-condition-fill schematex-genogram-condition-${cond.label}`;
|
|
1651
1651
|
switch (sex) {
|
|
1652
1652
|
case "male":
|
|
1653
|
-
return
|
|
1653
|
+
return chunk3WNW5Y7P_cjs.rect({ x: -half, y: -half, width: half * 2, height: half * 2, ...attrs });
|
|
1654
1654
|
case "female":
|
|
1655
|
-
return
|
|
1655
|
+
return chunk3WNW5Y7P_cjs.circle({ cx: 0, cy: 0, r: half, ...attrs });
|
|
1656
1656
|
case "unknown":
|
|
1657
1657
|
case "other":
|
|
1658
1658
|
case "nonbinary":
|
|
1659
1659
|
case "intersex":
|
|
1660
1660
|
default:
|
|
1661
|
-
return
|
|
1661
|
+
return chunk3WNW5Y7P_cjs.polygon({
|
|
1662
1662
|
points: `0,${-half} ${half},0 0,${half} ${-half},0`,
|
|
1663
1663
|
...attrs
|
|
1664
1664
|
});
|
|
@@ -2172,8 +2172,8 @@ function renderGenogram(layout, config, ast) {
|
|
|
2172
2172
|
const titleHeight = chartTitle ? 40 : 0;
|
|
2173
2173
|
const totalHeight = layout.height + titleHeight;
|
|
2174
2174
|
const layers = [
|
|
2175
|
-
|
|
2176
|
-
|
|
2175
|
+
chunk3WNW5Y7P_cjs.title(chartTitle ? `Genogram: ${chartTitle}` : "Genogram"),
|
|
2176
|
+
chunk3WNW5Y7P_cjs.desc(
|
|
2177
2177
|
`Genogram diagram with ${nodeCount} individuals across ${genCount} generations`
|
|
2178
2178
|
),
|
|
2179
2179
|
defsStr,
|
|
@@ -2182,7 +2182,7 @@ function renderGenogram(layout, config, ast) {
|
|
|
2182
2182
|
const chartContent = [];
|
|
2183
2183
|
if (chartTitle) {
|
|
2184
2184
|
chartContent.push(
|
|
2185
|
-
|
|
2185
|
+
chunk3WNW5Y7P_cjs.text(
|
|
2186
2186
|
{
|
|
2187
2187
|
x: layout.width / 2,
|
|
2188
2188
|
y: 28,
|
|
@@ -2197,7 +2197,7 @@ function renderGenogram(layout, config, ast) {
|
|
|
2197
2197
|
);
|
|
2198
2198
|
}
|
|
2199
2199
|
chartContent.push(
|
|
2200
|
-
|
|
2200
|
+
chunk3WNW5Y7P_cjs.group(
|
|
2201
2201
|
{ transform: titleHeight > 0 ? `translate(0, ${titleHeight})` : void 0 },
|
|
2202
2202
|
[edgeLayers, siblingOfLayer, emotionalLayer, ...nodeLayers, labelLayer, edgeLabelLayer]
|
|
2203
2203
|
)
|
|
@@ -2208,9 +2208,9 @@ function renderGenogram(layout, config, ast) {
|
|
|
2208
2208
|
if (ast) {
|
|
2209
2209
|
const themeBase = chunkD7EHZFK4_cjs.resolveGenogramTheme(config.theme);
|
|
2210
2210
|
const autoSpec = buildGenogramLegend(ast, themeBase);
|
|
2211
|
-
const finalSpec =
|
|
2211
|
+
const finalSpec = chunk5UCXMYE7_cjs.applyLegendOverrides(autoSpec, ast.legendOverrides);
|
|
2212
2212
|
if (finalSpec.mode === "on" && finalSpec.items.length > 0) {
|
|
2213
|
-
const { svg, bbox: lb } =
|
|
2213
|
+
const { svg, bbox: lb } = chunk5UCXMYE7_cjs.renderLegend(
|
|
2214
2214
|
finalSpec,
|
|
2215
2215
|
{
|
|
2216
2216
|
canvasWidth: layout.width,
|
|
@@ -2232,13 +2232,13 @@ function renderGenogram(layout, config, ast) {
|
|
|
2232
2232
|
}
|
|
2233
2233
|
const chartXOffset = Math.max(0, (finalWidth - layout.width) / 2);
|
|
2234
2234
|
layers.push(
|
|
2235
|
-
|
|
2235
|
+
chunk3WNW5Y7P_cjs.group(
|
|
2236
2236
|
{ transform: chartXOffset > 0 ? `translate(${chartXOffset}, 0)` : void 0 },
|
|
2237
2237
|
chartContent
|
|
2238
2238
|
)
|
|
2239
2239
|
);
|
|
2240
2240
|
if (legendSvg) layers.push(legendSvg);
|
|
2241
|
-
return
|
|
2241
|
+
return chunk3WNW5Y7P_cjs.svgRoot(
|
|
2242
2242
|
{
|
|
2243
2243
|
viewBox: `0 0 ${finalWidth} ${finalHeight}`,
|
|
2244
2244
|
class: "schematex-diagram schematex-genogram",
|
|
@@ -2252,7 +2252,6 @@ function buildStyles(config) {
|
|
|
2252
2252
|
const t = chunkD7EHZFK4_cjs.resolveGenogramTheme(config.theme);
|
|
2253
2253
|
const css = `
|
|
2254
2254
|
.schematex-genogram {${chunkD7EHZFK4_cjs.cssCustomProperties(t)}
|
|
2255
|
-
background: ${t.bg};
|
|
2256
2255
|
}
|
|
2257
2256
|
.schematex-genogram-shape { fill: ${t.fill}; stroke: ${t.stroke}; stroke-width: ${chunkD7EHZFK4_cjs.STROKE_WIDTH.normal}; stroke-linejoin: round; }
|
|
2258
2257
|
.schematex-genogram-male .schematex-genogram-shape { fill: ${t.maleFill}; }
|
|
@@ -2278,7 +2277,7 @@ function buildStyles(config) {
|
|
|
2278
2277
|
.schematex-genogram-edge-label { font-family: ${config.fontFamily}; fill: ${t.text}; }
|
|
2279
2278
|
.schematex-genogram-index-border { stroke: ${t.warn}; stroke-width: ${chunkD7EHZFK4_cjs.STROKE_WIDTH.thick}; fill: none; }
|
|
2280
2279
|
`;
|
|
2281
|
-
return
|
|
2280
|
+
return chunk3WNW5Y7P_cjs.el("style", {}, css);
|
|
2282
2281
|
}
|
|
2283
2282
|
var EMOTIONAL_REL_TYPES2 = /* @__PURE__ */ new Set([
|
|
2284
2283
|
"harmony",
|
|
@@ -2339,7 +2338,7 @@ function getEmotionalStrokeWidth(type) {
|
|
|
2339
2338
|
return 2;
|
|
2340
2339
|
}
|
|
2341
2340
|
function renderEmotionalEdges(edges) {
|
|
2342
|
-
if (edges.length === 0) return
|
|
2341
|
+
if (edges.length === 0) return chunk3WNW5Y7P_cjs.group({ class: "schematex-genogram-emotional-edges" }, []);
|
|
2343
2342
|
const children = [];
|
|
2344
2343
|
for (const edge of edges) {
|
|
2345
2344
|
const type = edge.relationship.type;
|
|
@@ -2348,7 +2347,7 @@ function renderEmotionalEdges(edges) {
|
|
|
2348
2347
|
const strokeWidth = getEmotionalStrokeWidth(type);
|
|
2349
2348
|
const directional = edge.relationship.directional;
|
|
2350
2349
|
const elements = [
|
|
2351
|
-
|
|
2350
|
+
chunk3WNW5Y7P_cjs.el("path", {
|
|
2352
2351
|
d: edge.path,
|
|
2353
2352
|
fill: "none",
|
|
2354
2353
|
stroke: color,
|
|
@@ -2361,7 +2360,7 @@ function renderEmotionalEdges(edges) {
|
|
|
2361
2360
|
const mid = pathMidpoint(edge.path);
|
|
2362
2361
|
if (mid) {
|
|
2363
2362
|
elements.push(
|
|
2364
|
-
|
|
2363
|
+
chunk3WNW5Y7P_cjs.text(
|
|
2365
2364
|
{
|
|
2366
2365
|
x: mid.x,
|
|
2367
2366
|
y: mid.y - 6,
|
|
@@ -2376,7 +2375,7 @@ function renderEmotionalEdges(edges) {
|
|
|
2376
2375
|
}
|
|
2377
2376
|
}
|
|
2378
2377
|
children.push(
|
|
2379
|
-
|
|
2378
|
+
chunk3WNW5Y7P_cjs.group(
|
|
2380
2379
|
{
|
|
2381
2380
|
class: `schematex-genogram-emotional schematex-genogram-emotional-${type}`,
|
|
2382
2381
|
"data-from": edge.from,
|
|
@@ -2387,7 +2386,7 @@ function renderEmotionalEdges(edges) {
|
|
|
2387
2386
|
)
|
|
2388
2387
|
);
|
|
2389
2388
|
}
|
|
2390
|
-
return
|
|
2389
|
+
return chunk3WNW5Y7P_cjs.group({ class: "schematex-genogram-emotional-edges" }, children);
|
|
2391
2390
|
}
|
|
2392
2391
|
function renderEdgeLabels(edges, config) {
|
|
2393
2392
|
const labels = [];
|
|
@@ -2396,7 +2395,7 @@ function renderEdgeLabels(edges, config) {
|
|
|
2396
2395
|
const mid = pathMidpoint(edge.path);
|
|
2397
2396
|
if (!mid) continue;
|
|
2398
2397
|
labels.push(
|
|
2399
|
-
|
|
2398
|
+
chunk3WNW5Y7P_cjs.text(
|
|
2400
2399
|
{
|
|
2401
2400
|
x: mid.x,
|
|
2402
2401
|
y: mid.y - 6,
|
|
@@ -2409,7 +2408,7 @@ function renderEdgeLabels(edges, config) {
|
|
|
2409
2408
|
)
|
|
2410
2409
|
);
|
|
2411
2410
|
}
|
|
2412
|
-
return
|
|
2411
|
+
return chunk3WNW5Y7P_cjs.group({ class: "schematex-genogram-edge-labels" }, labels);
|
|
2413
2412
|
}
|
|
2414
2413
|
function renderEdges(edges) {
|
|
2415
2414
|
const children = [];
|
|
@@ -2418,13 +2417,13 @@ function renderEdges(edges) {
|
|
|
2418
2417
|
const isSecondary = edge.relationship.secondary === true;
|
|
2419
2418
|
const cssClass = isSecondary ? `schematex-genogram-edge schematex-genogram-edge-secondary schematex-genogram-edge-secondary-${relType}` : `schematex-genogram-edge schematex-genogram-edge-${relType}`;
|
|
2420
2419
|
const elements = [
|
|
2421
|
-
|
|
2420
|
+
chunk3WNW5Y7P_cjs.el("path", { d: edge.path, class: "schematex-genogram-edge-path" })
|
|
2422
2421
|
];
|
|
2423
2422
|
if (relType === "cohabiting-ended" && !isSecondary) {
|
|
2424
2423
|
const mid = pathMidpoint(edge.path);
|
|
2425
2424
|
if (mid) {
|
|
2426
2425
|
elements.push(
|
|
2427
|
-
|
|
2426
|
+
chunk3WNW5Y7P_cjs.el("line", {
|
|
2428
2427
|
x1: mid.x - 4,
|
|
2429
2428
|
y1: mid.y - 6,
|
|
2430
2429
|
x2: mid.x + 4,
|
|
@@ -2440,7 +2439,7 @@ function renderEdges(edges) {
|
|
|
2440
2439
|
const mid = pathMidpoint(edge.path);
|
|
2441
2440
|
if (mid) {
|
|
2442
2441
|
elements.push(
|
|
2443
|
-
|
|
2442
|
+
chunk3WNW5Y7P_cjs.el("line", {
|
|
2444
2443
|
x1: mid.x - 4,
|
|
2445
2444
|
y1: mid.y - 6,
|
|
2446
2445
|
x2: mid.x + 4,
|
|
@@ -2449,7 +2448,7 @@ function renderEdges(edges) {
|
|
|
2449
2448
|
stroke: "#333",
|
|
2450
2449
|
"stroke-width": "2"
|
|
2451
2450
|
}),
|
|
2452
|
-
|
|
2451
|
+
chunk3WNW5Y7P_cjs.el("line", {
|
|
2453
2452
|
x1: mid.x - 4 + 6,
|
|
2454
2453
|
y1: mid.y - 6,
|
|
2455
2454
|
x2: mid.x + 4 + 6,
|
|
@@ -2465,7 +2464,7 @@ function renderEdges(edges) {
|
|
|
2465
2464
|
const mid = pathMidpoint(edge.path);
|
|
2466
2465
|
if (mid) {
|
|
2467
2466
|
elements.push(
|
|
2468
|
-
|
|
2467
|
+
chunk3WNW5Y7P_cjs.el("line", {
|
|
2469
2468
|
x1: mid.x - 4,
|
|
2470
2469
|
y1: mid.y - 6,
|
|
2471
2470
|
x2: mid.x + 4,
|
|
@@ -2478,7 +2477,7 @@ function renderEdges(edges) {
|
|
|
2478
2477
|
}
|
|
2479
2478
|
}
|
|
2480
2479
|
children.push(
|
|
2481
|
-
|
|
2480
|
+
chunk3WNW5Y7P_cjs.group(
|
|
2482
2481
|
{
|
|
2483
2482
|
class: cssClass,
|
|
2484
2483
|
"data-from": edge.from,
|
|
@@ -2488,7 +2487,7 @@ function renderEdges(edges) {
|
|
|
2488
2487
|
)
|
|
2489
2488
|
);
|
|
2490
2489
|
}
|
|
2491
|
-
return
|
|
2490
|
+
return chunk3WNW5Y7P_cjs.group({ class: "schematex-genogram-edges" }, children);
|
|
2492
2491
|
}
|
|
2493
2492
|
function pathMidpoint(pathData) {
|
|
2494
2493
|
const coords = pathData.match(/[\d.-]+/g);
|
|
@@ -2523,7 +2522,7 @@ function renderNodes(genGroups) {
|
|
|
2523
2522
|
);
|
|
2524
2523
|
}
|
|
2525
2524
|
layers.push(
|
|
2526
|
-
|
|
2525
|
+
chunk3WNW5Y7P_cjs.group(
|
|
2527
2526
|
{
|
|
2528
2527
|
class: `schematex-genogram-generation schematex-genogram-generation-${genIdx}`,
|
|
2529
2528
|
"data-generation": genIdx
|
|
@@ -2535,7 +2534,7 @@ function renderNodes(genGroups) {
|
|
|
2535
2534
|
return layers;
|
|
2536
2535
|
}
|
|
2537
2536
|
function renderSiblingOfBrackets(layout, ast) {
|
|
2538
|
-
if (!ast) return
|
|
2537
|
+
if (!ast) return chunk3WNW5Y7P_cjs.group({ class: "schematex-genogram-sibling-of-edges" }, []);
|
|
2539
2538
|
const elements = [];
|
|
2540
2539
|
const nodeById = new Map(layout.nodes.map((n) => [n.id, n]));
|
|
2541
2540
|
for (const ind of ast.individuals) {
|
|
@@ -2551,17 +2550,17 @@ function renderSiblingOfBrackets(layout, ast) {
|
|
|
2551
2550
|
const bracketY = Math.min(fromTopY, toTopY) - 12;
|
|
2552
2551
|
const path2 = `M ${fromCx} ${fromTopY} L ${fromCx} ${bracketY} L ${toCx} ${bracketY} L ${toCx} ${toTopY}`;
|
|
2553
2552
|
elements.push(
|
|
2554
|
-
|
|
2553
|
+
chunk3WNW5Y7P_cjs.group(
|
|
2555
2554
|
{
|
|
2556
2555
|
class: "schematex-genogram-sibling-of",
|
|
2557
2556
|
"data-from": ind.id,
|
|
2558
2557
|
"data-to": ind.siblingOf
|
|
2559
2558
|
},
|
|
2560
|
-
[
|
|
2559
|
+
[chunk3WNW5Y7P_cjs.el("path", { d: path2 })]
|
|
2561
2560
|
)
|
|
2562
2561
|
);
|
|
2563
2562
|
}
|
|
2564
|
-
return
|
|
2563
|
+
return chunk3WNW5Y7P_cjs.group({ class: "schematex-genogram-sibling-of-edges" }, elements);
|
|
2565
2564
|
}
|
|
2566
2565
|
function renderLabels(nodes, config) {
|
|
2567
2566
|
const labels = [];
|
|
@@ -2577,7 +2576,7 @@ function renderLabels(nodes, config) {
|
|
|
2577
2576
|
labelText += ` (b. ${ind.birthYear})`;
|
|
2578
2577
|
}
|
|
2579
2578
|
labels.push(
|
|
2580
|
-
|
|
2579
|
+
chunk3WNW5Y7P_cjs.text(
|
|
2581
2580
|
{
|
|
2582
2581
|
x: cx,
|
|
2583
2582
|
y: labelY,
|
|
@@ -2588,7 +2587,7 @@ function renderLabels(nodes, config) {
|
|
|
2588
2587
|
)
|
|
2589
2588
|
);
|
|
2590
2589
|
}
|
|
2591
|
-
return
|
|
2590
|
+
return chunk3WNW5Y7P_cjs.group({ class: "schematex-genogram-labels" }, labels);
|
|
2592
2591
|
}
|
|
2593
2592
|
|
|
2594
2593
|
// src/diagrams/genogram/index.ts
|
|
@@ -2625,5 +2624,5 @@ exports.layoutGenogram = layoutGenogram;
|
|
|
2625
2624
|
exports.parseGenogram = parseGenogram;
|
|
2626
2625
|
exports.renderGenogram = renderGenogram;
|
|
2627
2626
|
exports.renderIndividualSymbol = renderIndividualSymbol;
|
|
2628
|
-
//# sourceMappingURL=chunk-
|
|
2629
|
-
//# sourceMappingURL=chunk-
|
|
2627
|
+
//# sourceMappingURL=chunk-K6RAUXRQ.cjs.map
|
|
2628
|
+
//# sourceMappingURL=chunk-K6RAUXRQ.cjs.map
|