compasso 0.4.0 → 0.4.1
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 +29 -0
- package/dist/{chunk-RWPGGWO5.js → chunk-FYBABYC7.js} +34 -10
- package/dist/chunk-FYBABYC7.js.map +1 -0
- package/dist/{chunk-F47C6ZEB.js → chunk-IPE7JZO5.js} +3 -3
- package/dist/{chunk-F47C6ZEB.js.map → chunk-IPE7JZO5.js.map} +1 -1
- package/dist/{chunk-Q6DVTCXD.js → chunk-LR7BXUWM.js} +18 -6
- package/dist/chunk-LR7BXUWM.js.map +1 -0
- package/dist/{chunk-LRHHUJFZ.js → chunk-M4WA6ME7.js} +3 -3
- package/dist/{chunk-LRHHUJFZ.js.map → chunk-M4WA6ME7.js.map} +1 -1
- package/dist/{chunk-JP4N42AY.js → chunk-PGUMLTIM.js} +3 -3
- package/dist/{chunk-JP4N42AY.js.map → chunk-PGUMLTIM.js.map} +1 -1
- package/dist/{chunk-O3BT2O42.js → chunk-SD4NTRBM.js} +29 -3
- package/dist/chunk-SD4NTRBM.js.map +1 -0
- package/dist/{chunk-UJVU7B44.js → chunk-TAE2UB7D.js} +30 -14
- package/dist/chunk-TAE2UB7D.js.map +1 -0
- package/dist/{chunk-ZBDABVIO.js → chunk-WJYYBGZW.js} +3 -3
- package/dist/{chunk-ZBDABVIO.js.map → chunk-WJYYBGZW.js.map} +1 -1
- package/dist/core/index.cjs +30 -0
- package/dist/core/index.cjs.map +1 -1
- package/dist/core/index.d.cts +18 -2
- package/dist/core/index.d.ts +18 -2
- package/dist/core/index.js +1 -1
- package/dist/ecomap/index.cjs +34 -11
- package/dist/ecomap/index.cjs.map +1 -1
- package/dist/ecomap/index.d.cts +12 -0
- package/dist/ecomap/index.d.ts +12 -0
- package/dist/ecomap/index.js +2 -2
- package/dist/fault-tree/index.js +2 -2
- package/dist/fishbone/index.js +2 -2
- package/dist/genogram/index.cjs +57 -7
- package/dist/genogram/index.cjs.map +1 -1
- package/dist/genogram/index.d.cts +20 -4
- package/dist/genogram/index.d.ts +20 -4
- package/dist/genogram/index.js +2 -2
- package/dist/index.cjs +325 -243
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +5 -5
- package/dist/index.d.ts +5 -5
- package/dist/index.js +8 -8
- package/dist/{kinship-DqEklrDN.d.ts → kinship-BF90HyyS.d.ts} +1 -1
- package/dist/{kinship-Dy_ijjJV.d.cts → kinship-BOUss5cT.d.cts} +1 -1
- package/dist/{labels-RtFw9tX1.d.cts → labels-B0aOMbHy.d.cts} +12 -0
- package/dist/{labels-RtFw9tX1.d.ts → labels-B0aOMbHy.d.ts} +12 -0
- package/dist/{labels-DNqRkWuI.d.ts → labels-CuLbFyrz.d.ts} +1 -1
- package/dist/{labels-CBQ_3Ec9.d.cts → labels-DhQe7I8m.d.cts} +1 -1
- package/dist/locales/pt-br.d.cts +4 -4
- package/dist/locales/pt-br.d.ts +4 -4
- package/dist/org-chart/index.cjs +100 -58
- package/dist/org-chart/index.cjs.map +1 -1
- package/dist/org-chart/index.d.cts +19 -2
- package/dist/org-chart/index.d.ts +19 -2
- package/dist/org-chart/index.js +2 -2
- package/dist/pedigree/index.d.cts +4 -4
- package/dist/pedigree/index.d.ts +4 -4
- package/dist/pedigree/index.js +2 -2
- package/dist/phylo/index.js +2 -2
- package/dist/{types-BnMG7TCd.d.cts → types-jE2fdM1t.d.cts} +8 -0
- package/dist/{types-BnMG7TCd.d.ts → types-jE2fdM1t.d.ts} +8 -0
- package/package.json +1 -1
- package/dist/chunk-O3BT2O42.js.map +0 -1
- package/dist/chunk-Q6DVTCXD.js.map +0 -1
- package/dist/chunk-RWPGGWO5.js.map +0 -1
- package/dist/chunk-UJVU7B44.js.map +0 -1
package/dist/index.d.cts
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
export { x as xmlEscape } from './xml-DDae1eUr.cjs';
|
|
2
|
-
export { LEGEND_FONT, LEGEND_GAP, LEGEND_PAD, LEGEND_ROW_H, LEGEND_SWATCH_W, LegendBlock, LegendEntry, legendBlock, romanNumeral } from './core/index.cjs';
|
|
2
|
+
export { ANNOTATION_INK, LEGEND_FONT, LEGEND_GAP, LEGEND_PAD, LEGEND_ROW_H, LEGEND_SWATCH_W, LegendBlock, LegendEntry, annotationDot, annotationSwatch, annotationTick, legendBlock, romanNumeral } from './core/index.cjs';
|
|
3
3
|
export { C as CHAR_W, F as FONT_FAMILY, P as Point, c as clampLabel, e as estimateTextWidth, p as pathData, w as wrapLabel, a as wrapLabelBalanced } from './text-DuO_PwYw.cjs';
|
|
4
4
|
export { E as EDGE_STROKE, a as EdgeLineStyle, b as EdgeStroke, Q as QUALITY_LEXICON_EN, c as QualityLexicon, n as normalizeText, q as qualityLineStyle } from './stroke-MQ427drt.cjs';
|
|
5
|
-
export { G as GenogramInput, N as NodeShape, P as ParentLink, a as Person, b as PersonSex, R as Relationship, U as UNION_STATUSES, c as Union, d as UnionStatus } from './types-
|
|
6
|
-
export { G as GENOGRAM_SVG_LABELS_EN, a as GENOGRAM_TITLE_LABELS_EN, b as GenogramSvgLabels, c as GenogramTitleLabels, K as KINSHIP_EN, d as KinshipLexicon, R as RelationshipMapClass, e as classifyRelationshipType, r as relationshipTypeTokens } from './kinship-
|
|
5
|
+
export { G as GenogramInput, N as NodeShape, P as ParentLink, a as Person, b as PersonSex, R as Relationship, U as UNION_STATUSES, c as Union, d as UnionStatus } from './types-jE2fdM1t.cjs';
|
|
6
|
+
export { G as GENOGRAM_SVG_LABELS_EN, a as GENOGRAM_TITLE_LABELS_EN, b as GenogramSvgLabels, c as GenogramTitleLabels, K as KINSHIP_EN, d as KinshipLexicon, R as RelationshipMapClass, e as classifyRelationshipType, r as relationshipTypeTokens } from './kinship-BOUss5cT.cjs';
|
|
7
7
|
export { EDGE_FONT, GenogramElement, GenogramElementKind, GenogramLayout, GenogramLayoutOptions, GenogramNode, GenogramRenderOptions, GenogramRenderResult, GenogramSvgOptions, LABEL_FONT, LABEL_LINE_H, NODE_SIZE, PARENT_REL_ID_BASE, PROMOTED_REL_ID_BASE, UNION_NOTATION, UNION_REL_ID_BASE, UnionEdgeStyle, computeGenogramLayout, genogramLayoutSvg, genogramSvg, latestUnionPerPair } from './genogram/index.cjs';
|
|
8
8
|
export { ECOMAP_LABELS_EN, EcomapDirection, EcomapInput, EcomapLabels, EcomapSvgOptions, EcomapTie, ecomapSvg } from './ecomap/index.cjs';
|
|
9
9
|
export { A as AndGate, F as FAULT_TREE_EVENT_KINDS, a as FAULT_TREE_SVG_LABELS_EN, b as FAULT_TREE_TITLE_LABELS_EN, c as FaultTreeEvent, d as FaultTreeEventKind, e as FaultTreeGate, f as FaultTreeInput, g as FaultTreeSvgLabels, h as FaultTreeTitleLabels, G as GATE_TYPES, i as GateType, I as InhibitGate, O as OrGate, V as VoteGate, X as XorGate } from './labels-CYbM5XV7.cjs';
|
|
10
10
|
export { CODE_FONT, FT_BUS_ID_BASE, FT_CONDITION_ID_BASE, FT_DROP_ID_BASE, FT_LABEL_FONT, FT_LABEL_LINE_H, FT_RISER_ID_BASE, FT_STEM_ID_BASE, FaultTreeElement, FaultTreeElementKind, FaultTreeGateNode, FaultTreeIssue, FaultTreeIssueCode, FaultTreeLayout, FaultTreeLayoutOptions, FaultTreeNode, FaultTreeRenderOptions, FaultTreeRenderResult, FaultTreeSvgOptions, FaultTreeValidationError, LABEL_GAP, computeFaultTreeLayout, faultTreeIssues, faultTreeLayoutSvg, faultTreeSvg, validateFaultTree } from './fault-tree/index.cjs';
|
|
11
11
|
export { FISHBONE_LABELS_EN, FishboneCategory, FishboneCause, FishboneInput, FishboneLabels, FishboneSubCause, FishboneSvgOptions, FishboneValidationCode, FishboneValidationError, FishboneValidationIssue, fishboneSvg } from './fishbone/index.cjs';
|
|
12
|
-
export { C as Condition, I as Individual, L as LIFE_STATUSES, a as LifeStatus, M as Mating, P as PEDIGREE_SVG_LABELS_EN, b as PEDIGREE_TITLE_LABELS_EN, c as PedigreeInput, d as PedigreeRole, e as PedigreeSvgLabels, f as PedigreeTitleLabels, S as Sibship, T as TwinGroup, Z as Zygosity } from './labels-
|
|
12
|
+
export { C as Condition, I as Individual, L as LIFE_STATUSES, a as LifeStatus, M as Mating, P as PEDIGREE_SVG_LABELS_EN, b as PEDIGREE_TITLE_LABELS_EN, c as PedigreeInput, d as PedigreeRole, e as PedigreeSvgLabels, f as PedigreeTitleLabels, S as Sibship, T as TwinGroup, Z as Zygosity } from './labels-DhQe7I8m.cjs';
|
|
13
13
|
export { MAX_CONDITIONS_PER_INDIVIDUAL, PED_ADDRESS_FONT, PED_CONDITION_FILLS, PED_DESCENT_ID_BASE, PED_GLYPH, PED_LABEL_FONT, PED_LABEL_GAP, PED_LABEL_LINE_H, PED_MATING_ID_BASE, PED_RISER_ID_BASE, PED_SIBBAR_ID_BASE, PED_TWINBAR_ID_BASE, PedigreeElement, PedigreeElementKind, PedigreeGenerationLabel, PedigreeIssue, PedigreeIssueCode, PedigreeLayout, PedigreeLayoutOptions, PedigreeNode, PedigreeRenderOptions, PedigreeRenderResult, PedigreeSvgOptions, PedigreeValidationError, computePedigreeLayout, pedigreeIssues, pedigreeLayoutSvg, pedigreeSvg, validatePedigree } from './pedigree/index.cjs';
|
|
14
14
|
export { P as PHYLO_SVG_LABELS_EN, a as PHYLO_TITLE_LABELS_EN, b as PhyloEdge, c as PhyloInput, d as PhyloMode, e as PhyloNode, f as PhyloSvgLabels, g as PhyloTitleLabels } from './labels-iZjijjtK.cjs';
|
|
15
15
|
export { PHYLO_BRANCH_ID_BASE, PHYLO_CLADEBAR_ID_BASE, PHYLO_EXTENSION_ID_BASE, PHYLO_LABEL_FONT, PHYLO_LABEL_GAP, PHYLO_ROOTSTUB_ID_BASE, PHYLO_ROW_SLOT, PHYLO_SCALEBAR_ID, PHYLO_SUPPORT_FONT, PhyloElement, PhyloElementKind, PhyloIssue, PhyloIssueCode, PhyloLayout, PhyloLayoutNode, PhyloLayoutOptions, PhyloRenderOptions, PhyloRenderResult, PhyloScaleBar, PhyloSvgOptions, PhyloValidationError, computePhyloLayout, niceScaleStep, phyloIssues, phyloLayoutSvg, phyloSvg, validatePhylo } from './phylo/index.cjs';
|
|
16
|
-
export { O as ORG_CHART_SVG_LABELS_EN, a as ORG_CHART_TITLE_LABELS_EN, b as ORG_REPORT_KINDS, c as ORG_VACANCIES, d as OrgBoxStyle, e as OrgChartInput, f as OrgChartSvgLabels, g as OrgChartTitleLabels, h as OrgPosition, i as OrgReport, j as OrgReportKind, k as OrgVacancy } from './labels-
|
|
16
|
+
export { O as ORG_CHART_SVG_LABELS_EN, a as ORG_CHART_TITLE_LABELS_EN, b as ORG_REPORT_KINDS, c as ORG_VACANCIES, d as OrgBoxStyle, e as OrgChartInput, f as OrgChartSvgLabels, g as OrgChartTitleLabels, h as OrgPosition, i as OrgReport, j as OrgReportKind, k as OrgVacancy } from './labels-B0aOMbHy.cjs';
|
|
17
17
|
export { ORG_ASSIST_ID_BASE, ORG_BUS_ID_BASE, ORG_DOTTED_ID_BASE, ORG_DROP_ID_BASE, ORG_LABEL_FONT, ORG_LABEL_LINE_H, ORG_MAX_MATRIX_EDGES_PER_NODE, ORG_STEM_ID_BASE, ORG_TITLE_FONT, OrgChartIssue, OrgChartIssueCode, OrgChartLayout, OrgChartLayoutOptions, OrgChartRenderOptions, OrgChartRenderResult, OrgChartSvgOptions, OrgChartValidationError, OrgElement, OrgElementKind, OrgNode, PackGaps, PackNode, PackResult, computeOrgChartLayout, orgChartIssues, orgChartLayoutSvg, orgChartSvg, packSubtree, validateOrgChart } from './org-chart/index.cjs';
|
package/dist/index.d.ts
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
export { x as xmlEscape } from './xml-DDae1eUr.js';
|
|
2
|
-
export { LEGEND_FONT, LEGEND_GAP, LEGEND_PAD, LEGEND_ROW_H, LEGEND_SWATCH_W, LegendBlock, LegendEntry, legendBlock, romanNumeral } from './core/index.js';
|
|
2
|
+
export { ANNOTATION_INK, LEGEND_FONT, LEGEND_GAP, LEGEND_PAD, LEGEND_ROW_H, LEGEND_SWATCH_W, LegendBlock, LegendEntry, annotationDot, annotationSwatch, annotationTick, legendBlock, romanNumeral } from './core/index.js';
|
|
3
3
|
export { C as CHAR_W, F as FONT_FAMILY, P as Point, c as clampLabel, e as estimateTextWidth, p as pathData, w as wrapLabel, a as wrapLabelBalanced } from './text-DuO_PwYw.js';
|
|
4
4
|
export { E as EDGE_STROKE, a as EdgeLineStyle, b as EdgeStroke, Q as QUALITY_LEXICON_EN, c as QualityLexicon, n as normalizeText, q as qualityLineStyle } from './stroke-MQ427drt.js';
|
|
5
|
-
export { G as GenogramInput, N as NodeShape, P as ParentLink, a as Person, b as PersonSex, R as Relationship, U as UNION_STATUSES, c as Union, d as UnionStatus } from './types-
|
|
6
|
-
export { G as GENOGRAM_SVG_LABELS_EN, a as GENOGRAM_TITLE_LABELS_EN, b as GenogramSvgLabels, c as GenogramTitleLabels, K as KINSHIP_EN, d as KinshipLexicon, R as RelationshipMapClass, e as classifyRelationshipType, r as relationshipTypeTokens } from './kinship-
|
|
5
|
+
export { G as GenogramInput, N as NodeShape, P as ParentLink, a as Person, b as PersonSex, R as Relationship, U as UNION_STATUSES, c as Union, d as UnionStatus } from './types-jE2fdM1t.js';
|
|
6
|
+
export { G as GENOGRAM_SVG_LABELS_EN, a as GENOGRAM_TITLE_LABELS_EN, b as GenogramSvgLabels, c as GenogramTitleLabels, K as KINSHIP_EN, d as KinshipLexicon, R as RelationshipMapClass, e as classifyRelationshipType, r as relationshipTypeTokens } from './kinship-BF90HyyS.js';
|
|
7
7
|
export { EDGE_FONT, GenogramElement, GenogramElementKind, GenogramLayout, GenogramLayoutOptions, GenogramNode, GenogramRenderOptions, GenogramRenderResult, GenogramSvgOptions, LABEL_FONT, LABEL_LINE_H, NODE_SIZE, PARENT_REL_ID_BASE, PROMOTED_REL_ID_BASE, UNION_NOTATION, UNION_REL_ID_BASE, UnionEdgeStyle, computeGenogramLayout, genogramLayoutSvg, genogramSvg, latestUnionPerPair } from './genogram/index.js';
|
|
8
8
|
export { ECOMAP_LABELS_EN, EcomapDirection, EcomapInput, EcomapLabels, EcomapSvgOptions, EcomapTie, ecomapSvg } from './ecomap/index.js';
|
|
9
9
|
export { A as AndGate, F as FAULT_TREE_EVENT_KINDS, a as FAULT_TREE_SVG_LABELS_EN, b as FAULT_TREE_TITLE_LABELS_EN, c as FaultTreeEvent, d as FaultTreeEventKind, e as FaultTreeGate, f as FaultTreeInput, g as FaultTreeSvgLabels, h as FaultTreeTitleLabels, G as GATE_TYPES, i as GateType, I as InhibitGate, O as OrGate, V as VoteGate, X as XorGate } from './labels-CYbM5XV7.js';
|
|
10
10
|
export { CODE_FONT, FT_BUS_ID_BASE, FT_CONDITION_ID_BASE, FT_DROP_ID_BASE, FT_LABEL_FONT, FT_LABEL_LINE_H, FT_RISER_ID_BASE, FT_STEM_ID_BASE, FaultTreeElement, FaultTreeElementKind, FaultTreeGateNode, FaultTreeIssue, FaultTreeIssueCode, FaultTreeLayout, FaultTreeLayoutOptions, FaultTreeNode, FaultTreeRenderOptions, FaultTreeRenderResult, FaultTreeSvgOptions, FaultTreeValidationError, LABEL_GAP, computeFaultTreeLayout, faultTreeIssues, faultTreeLayoutSvg, faultTreeSvg, validateFaultTree } from './fault-tree/index.js';
|
|
11
11
|
export { FISHBONE_LABELS_EN, FishboneCategory, FishboneCause, FishboneInput, FishboneLabels, FishboneSubCause, FishboneSvgOptions, FishboneValidationCode, FishboneValidationError, FishboneValidationIssue, fishboneSvg } from './fishbone/index.js';
|
|
12
|
-
export { C as Condition, I as Individual, L as LIFE_STATUSES, a as LifeStatus, M as Mating, P as PEDIGREE_SVG_LABELS_EN, b as PEDIGREE_TITLE_LABELS_EN, c as PedigreeInput, d as PedigreeRole, e as PedigreeSvgLabels, f as PedigreeTitleLabels, S as Sibship, T as TwinGroup, Z as Zygosity } from './labels-
|
|
12
|
+
export { C as Condition, I as Individual, L as LIFE_STATUSES, a as LifeStatus, M as Mating, P as PEDIGREE_SVG_LABELS_EN, b as PEDIGREE_TITLE_LABELS_EN, c as PedigreeInput, d as PedigreeRole, e as PedigreeSvgLabels, f as PedigreeTitleLabels, S as Sibship, T as TwinGroup, Z as Zygosity } from './labels-CuLbFyrz.js';
|
|
13
13
|
export { MAX_CONDITIONS_PER_INDIVIDUAL, PED_ADDRESS_FONT, PED_CONDITION_FILLS, PED_DESCENT_ID_BASE, PED_GLYPH, PED_LABEL_FONT, PED_LABEL_GAP, PED_LABEL_LINE_H, PED_MATING_ID_BASE, PED_RISER_ID_BASE, PED_SIBBAR_ID_BASE, PED_TWINBAR_ID_BASE, PedigreeElement, PedigreeElementKind, PedigreeGenerationLabel, PedigreeIssue, PedigreeIssueCode, PedigreeLayout, PedigreeLayoutOptions, PedigreeNode, PedigreeRenderOptions, PedigreeRenderResult, PedigreeSvgOptions, PedigreeValidationError, computePedigreeLayout, pedigreeIssues, pedigreeLayoutSvg, pedigreeSvg, validatePedigree } from './pedigree/index.js';
|
|
14
14
|
export { P as PHYLO_SVG_LABELS_EN, a as PHYLO_TITLE_LABELS_EN, b as PhyloEdge, c as PhyloInput, d as PhyloMode, e as PhyloNode, f as PhyloSvgLabels, g as PhyloTitleLabels } from './labels-iZjijjtK.js';
|
|
15
15
|
export { PHYLO_BRANCH_ID_BASE, PHYLO_CLADEBAR_ID_BASE, PHYLO_EXTENSION_ID_BASE, PHYLO_LABEL_FONT, PHYLO_LABEL_GAP, PHYLO_ROOTSTUB_ID_BASE, PHYLO_ROW_SLOT, PHYLO_SCALEBAR_ID, PHYLO_SUPPORT_FONT, PhyloElement, PhyloElementKind, PhyloIssue, PhyloIssueCode, PhyloLayout, PhyloLayoutNode, PhyloLayoutOptions, PhyloRenderOptions, PhyloRenderResult, PhyloScaleBar, PhyloSvgOptions, PhyloValidationError, computePhyloLayout, niceScaleStep, phyloIssues, phyloLayoutSvg, phyloSvg, validatePhylo } from './phylo/index.js';
|
|
16
|
-
export { O as ORG_CHART_SVG_LABELS_EN, a as ORG_CHART_TITLE_LABELS_EN, b as ORG_REPORT_KINDS, c as ORG_VACANCIES, d as OrgBoxStyle, e as OrgChartInput, f as OrgChartSvgLabels, g as OrgChartTitleLabels, h as OrgPosition, i as OrgReport, j as OrgReportKind, k as OrgVacancy } from './labels-
|
|
16
|
+
export { O as ORG_CHART_SVG_LABELS_EN, a as ORG_CHART_TITLE_LABELS_EN, b as ORG_REPORT_KINDS, c as ORG_VACANCIES, d as OrgBoxStyle, e as OrgChartInput, f as OrgChartSvgLabels, g as OrgChartTitleLabels, h as OrgPosition, i as OrgReport, j as OrgReportKind, k as OrgVacancy } from './labels-B0aOMbHy.js';
|
|
17
17
|
export { ORG_ASSIST_ID_BASE, ORG_BUS_ID_BASE, ORG_DOTTED_ID_BASE, ORG_DROP_ID_BASE, ORG_LABEL_FONT, ORG_LABEL_LINE_H, ORG_MAX_MATRIX_EDGES_PER_NODE, ORG_STEM_ID_BASE, ORG_TITLE_FONT, OrgChartIssue, OrgChartIssueCode, OrgChartLayout, OrgChartLayoutOptions, OrgChartRenderOptions, OrgChartRenderResult, OrgChartSvgOptions, OrgChartValidationError, OrgElement, OrgElementKind, OrgNode, PackGaps, PackNode, PackResult, computeOrgChartLayout, orgChartIssues, orgChartLayoutSvg, orgChartSvg, packSubtree, validateOrgChart } from './org-chart/index.js';
|
package/dist/index.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
export { ORG_ASSIST_ID_BASE, ORG_BUS_ID_BASE, ORG_CHART_SVG_LABELS_EN, ORG_CHART_TITLE_LABELS_EN, ORG_DOTTED_ID_BASE, ORG_DROP_ID_BASE, ORG_LABEL_FONT, ORG_LABEL_LINE_H, ORG_MAX_MATRIX_EDGES_PER_NODE, ORG_REPORT_KINDS, ORG_STEM_ID_BASE, ORG_TITLE_FONT, ORG_VACANCIES, OrgChartValidationError, computeOrgChartLayout, orgChartIssues, orgChartLayoutSvg, orgChartSvg, packSubtree, validateOrgChart } from './chunk-
|
|
2
|
-
export { EDGE_FONT, GENOGRAM_SVG_LABELS_EN, GENOGRAM_TITLE_LABELS_EN, KINSHIP_EN, LABEL_FONT, LABEL_LINE_H, NODE_SIZE, PARENT_REL_ID_BASE, PROMOTED_REL_ID_BASE, UNION_NOTATION, UNION_REL_ID_BASE, UNION_STATUSES, classifyRelationshipType, computeGenogramLayout, genogramLayoutSvg, genogramSvg, latestUnionPerPair, relationshipTypeTokens } from './chunk-
|
|
3
|
-
export { ECOMAP_LABELS_EN, ecomapSvg } from './chunk-
|
|
4
|
-
export { CODE_FONT, FAULT_TREE_EVENT_KINDS, FAULT_TREE_SVG_LABELS_EN, FAULT_TREE_TITLE_LABELS_EN, FT_BUS_ID_BASE, FT_CONDITION_ID_BASE, FT_DROP_ID_BASE, FT_LABEL_FONT, FT_LABEL_LINE_H, FT_RISER_ID_BASE, FT_STEM_ID_BASE, FaultTreeValidationError, GATE_TYPES, LABEL_GAP, computeFaultTreeLayout, faultTreeIssues, faultTreeLayoutSvg, faultTreeSvg, validateFaultTree } from './chunk-
|
|
5
|
-
export { FISHBONE_LABELS_EN, FishboneValidationError, fishboneSvg } from './chunk-
|
|
6
|
-
export { LIFE_STATUSES, MAX_CONDITIONS_PER_INDIVIDUAL, PEDIGREE_SVG_LABELS_EN, PEDIGREE_TITLE_LABELS_EN, PED_ADDRESS_FONT, PED_CONDITION_FILLS, PED_DESCENT_ID_BASE, PED_GLYPH, PED_LABEL_FONT, PED_LABEL_GAP, PED_LABEL_LINE_H, PED_MATING_ID_BASE, PED_RISER_ID_BASE, PED_SIBBAR_ID_BASE, PED_TWINBAR_ID_BASE, PedigreeValidationError, computePedigreeLayout, pedigreeIssues, pedigreeLayoutSvg, pedigreeSvg, validatePedigree } from './chunk-
|
|
7
|
-
export { PHYLO_BRANCH_ID_BASE, PHYLO_CLADEBAR_ID_BASE, PHYLO_EXTENSION_ID_BASE, PHYLO_LABEL_FONT, PHYLO_LABEL_GAP, PHYLO_ROOTSTUB_ID_BASE, PHYLO_ROW_SLOT, PHYLO_SCALEBAR_ID, PHYLO_SUPPORT_FONT, PHYLO_SVG_LABELS_EN, PHYLO_TITLE_LABELS_EN, PhyloValidationError, computePhyloLayout, niceScaleStep, phyloIssues, phyloLayoutSvg, phyloSvg, validatePhylo } from './chunk-
|
|
8
|
-
export { CHAR_W, EDGE_STROKE, FONT_FAMILY, LEGEND_FONT, LEGEND_GAP, LEGEND_PAD, LEGEND_ROW_H, LEGEND_SWATCH_W, QUALITY_LEXICON_EN, clampLabel, estimateTextWidth, legendBlock, normalizeText, pathData, qualityLineStyle, romanNumeral, wrapLabel, wrapLabelBalanced, xmlEscape } from './chunk-
|
|
1
|
+
export { ORG_ASSIST_ID_BASE, ORG_BUS_ID_BASE, ORG_CHART_SVG_LABELS_EN, ORG_CHART_TITLE_LABELS_EN, ORG_DOTTED_ID_BASE, ORG_DROP_ID_BASE, ORG_LABEL_FONT, ORG_LABEL_LINE_H, ORG_MAX_MATRIX_EDGES_PER_NODE, ORG_REPORT_KINDS, ORG_STEM_ID_BASE, ORG_TITLE_FONT, ORG_VACANCIES, OrgChartValidationError, computeOrgChartLayout, orgChartIssues, orgChartLayoutSvg, orgChartSvg, packSubtree, validateOrgChart } from './chunk-TAE2UB7D.js';
|
|
2
|
+
export { EDGE_FONT, GENOGRAM_SVG_LABELS_EN, GENOGRAM_TITLE_LABELS_EN, KINSHIP_EN, LABEL_FONT, LABEL_LINE_H, NODE_SIZE, PARENT_REL_ID_BASE, PROMOTED_REL_ID_BASE, UNION_NOTATION, UNION_REL_ID_BASE, UNION_STATUSES, classifyRelationshipType, computeGenogramLayout, genogramLayoutSvg, genogramSvg, latestUnionPerPair, relationshipTypeTokens } from './chunk-FYBABYC7.js';
|
|
3
|
+
export { ECOMAP_LABELS_EN, ecomapSvg } from './chunk-LR7BXUWM.js';
|
|
4
|
+
export { CODE_FONT, FAULT_TREE_EVENT_KINDS, FAULT_TREE_SVG_LABELS_EN, FAULT_TREE_TITLE_LABELS_EN, FT_BUS_ID_BASE, FT_CONDITION_ID_BASE, FT_DROP_ID_BASE, FT_LABEL_FONT, FT_LABEL_LINE_H, FT_RISER_ID_BASE, FT_STEM_ID_BASE, FaultTreeValidationError, GATE_TYPES, LABEL_GAP, computeFaultTreeLayout, faultTreeIssues, faultTreeLayoutSvg, faultTreeSvg, validateFaultTree } from './chunk-M4WA6ME7.js';
|
|
5
|
+
export { FISHBONE_LABELS_EN, FishboneValidationError, fishboneSvg } from './chunk-WJYYBGZW.js';
|
|
6
|
+
export { LIFE_STATUSES, MAX_CONDITIONS_PER_INDIVIDUAL, PEDIGREE_SVG_LABELS_EN, PEDIGREE_TITLE_LABELS_EN, PED_ADDRESS_FONT, PED_CONDITION_FILLS, PED_DESCENT_ID_BASE, PED_GLYPH, PED_LABEL_FONT, PED_LABEL_GAP, PED_LABEL_LINE_H, PED_MATING_ID_BASE, PED_RISER_ID_BASE, PED_SIBBAR_ID_BASE, PED_TWINBAR_ID_BASE, PedigreeValidationError, computePedigreeLayout, pedigreeIssues, pedigreeLayoutSvg, pedigreeSvg, validatePedigree } from './chunk-IPE7JZO5.js';
|
|
7
|
+
export { PHYLO_BRANCH_ID_BASE, PHYLO_CLADEBAR_ID_BASE, PHYLO_EXTENSION_ID_BASE, PHYLO_LABEL_FONT, PHYLO_LABEL_GAP, PHYLO_ROOTSTUB_ID_BASE, PHYLO_ROW_SLOT, PHYLO_SCALEBAR_ID, PHYLO_SUPPORT_FONT, PHYLO_SVG_LABELS_EN, PHYLO_TITLE_LABELS_EN, PhyloValidationError, computePhyloLayout, niceScaleStep, phyloIssues, phyloLayoutSvg, phyloSvg, validatePhylo } from './chunk-PGUMLTIM.js';
|
|
8
|
+
export { ANNOTATION_INK, CHAR_W, EDGE_STROKE, FONT_FAMILY, LEGEND_FONT, LEGEND_GAP, LEGEND_PAD, LEGEND_ROW_H, LEGEND_SWATCH_W, QUALITY_LEXICON_EN, annotationDot, annotationSwatch, annotationTick, clampLabel, estimateTextWidth, legendBlock, normalizeText, pathData, qualityLineStyle, romanNumeral, wrapLabel, wrapLabelBalanced, xmlEscape } from './chunk-SD4NTRBM.js';
|
|
9
9
|
//# sourceMappingURL=index.js.map
|
|
10
10
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { a as EdgeLineStyle } from './stroke-MQ427drt.js';
|
|
2
|
-
import { N as NodeShape, d as UnionStatus } from './types-
|
|
2
|
+
import { N as NodeShape, d as UnionStatus } from './types-jE2fdM1t.js';
|
|
3
3
|
|
|
4
4
|
/** Labels woven into element <title>s by the LAYOUT (verbatim-preserving). */
|
|
5
5
|
interface GenogramTitleLabels {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { a as EdgeLineStyle } from './stroke-MQ427drt.cjs';
|
|
2
|
-
import { N as NodeShape, d as UnionStatus } from './types-
|
|
2
|
+
import { N as NodeShape, d as UnionStatus } from './types-jE2fdM1t.cjs';
|
|
3
3
|
|
|
4
4
|
/** Labels woven into element <title>s by the LAYOUT (verbatim-preserving). */
|
|
5
5
|
interface GenogramTitleLabels {
|
|
@@ -42,6 +42,12 @@ interface OrgPosition {
|
|
|
42
42
|
vacancy: OrgVacancy;
|
|
43
43
|
/** Verbatim <title> override; defaults below (see svg.ts). */
|
|
44
44
|
hover?: string;
|
|
45
|
+
/**
|
|
46
|
+
* Caller-asserted annotation flag. compasso never decides what "annotated" MEANS —
|
|
47
|
+
* it only draws a discreet dot at the box's upper-right when true. Default undefined
|
|
48
|
+
* === not annotated (backward-compatible).
|
|
49
|
+
*/
|
|
50
|
+
annotated?: boolean;
|
|
45
51
|
}
|
|
46
52
|
/**
|
|
47
53
|
* One row per DECLARED relationship, manager → report. There is no `order` column in
|
|
@@ -57,6 +63,12 @@ interface OrgReport {
|
|
|
57
63
|
kind: OrgReportKind;
|
|
58
64
|
/** Verbatim relationship label (e.g. "interim", "matrix") for the <title>; null = none. */
|
|
59
65
|
label?: string | null;
|
|
66
|
+
/**
|
|
67
|
+
* Caller-asserted annotation flag. compasso never decides what "annotated" MEANS —
|
|
68
|
+
* it only draws a discreet tick at the edge's midpoint when true. Default undefined
|
|
69
|
+
* === not annotated (backward-compatible).
|
|
70
|
+
*/
|
|
71
|
+
annotated?: boolean;
|
|
60
72
|
}
|
|
61
73
|
/** Input to the org-chart render pipeline — flat, id-referenced rows, never nested. */
|
|
62
74
|
interface OrgChartInput {
|
|
@@ -42,6 +42,12 @@ interface OrgPosition {
|
|
|
42
42
|
vacancy: OrgVacancy;
|
|
43
43
|
/** Verbatim <title> override; defaults below (see svg.ts). */
|
|
44
44
|
hover?: string;
|
|
45
|
+
/**
|
|
46
|
+
* Caller-asserted annotation flag. compasso never decides what "annotated" MEANS —
|
|
47
|
+
* it only draws a discreet dot at the box's upper-right when true. Default undefined
|
|
48
|
+
* === not annotated (backward-compatible).
|
|
49
|
+
*/
|
|
50
|
+
annotated?: boolean;
|
|
45
51
|
}
|
|
46
52
|
/**
|
|
47
53
|
* One row per DECLARED relationship, manager → report. There is no `order` column in
|
|
@@ -57,6 +63,12 @@ interface OrgReport {
|
|
|
57
63
|
kind: OrgReportKind;
|
|
58
64
|
/** Verbatim relationship label (e.g. "interim", "matrix") for the <title>; null = none. */
|
|
59
65
|
label?: string | null;
|
|
66
|
+
/**
|
|
67
|
+
* Caller-asserted annotation flag. compasso never decides what "annotated" MEANS —
|
|
68
|
+
* it only draws a discreet tick at the edge's midpoint when true. Default undefined
|
|
69
|
+
* === not annotated (backward-compatible).
|
|
70
|
+
*/
|
|
71
|
+
annotated?: boolean;
|
|
60
72
|
}
|
|
61
73
|
/** Input to the org-chart render pipeline — flat, id-referenced rows, never nested. */
|
|
62
74
|
interface OrgChartInput {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { b as PersonSex, N as NodeShape } from './types-
|
|
1
|
+
import { b as PersonSex, N as NodeShape } from './types-jE2fdM1t.js';
|
|
2
2
|
|
|
3
3
|
/** PSSC proband (filled arrow) / consultand (open arrow); null = neither. */
|
|
4
4
|
type PedigreeRole = "proband" | "consultand" | null;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { b as PersonSex, N as NodeShape } from './types-
|
|
1
|
+
import { b as PersonSex, N as NodeShape } from './types-jE2fdM1t.cjs';
|
|
2
2
|
|
|
3
3
|
/** PSSC proband (filled arrow) / consultand (open arrow); null = neither. */
|
|
4
4
|
type PedigreeRole = "proband" | "consultand" | null;
|
package/dist/locales/pt-br.d.cts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { c as QualityLexicon } from '../stroke-MQ427drt.cjs';
|
|
2
|
-
import { b as GenogramSvgLabels, c as GenogramTitleLabels, d as KinshipLexicon } from '../kinship-
|
|
2
|
+
import { b as GenogramSvgLabels, c as GenogramTitleLabels, d as KinshipLexicon } from '../kinship-BOUss5cT.cjs';
|
|
3
3
|
import { EcomapLabels } from '../ecomap/index.cjs';
|
|
4
4
|
import { g as FaultTreeSvgLabels, h as FaultTreeTitleLabels } from '../labels-CYbM5XV7.cjs';
|
|
5
5
|
import { FishboneLabels } from '../fishbone/index.cjs';
|
|
6
|
-
import { e as PedigreeSvgLabels, f as PedigreeTitleLabels } from '../labels-
|
|
6
|
+
import { e as PedigreeSvgLabels, f as PedigreeTitleLabels } from '../labels-DhQe7I8m.cjs';
|
|
7
7
|
import { f as PhyloSvgLabels, g as PhyloTitleLabels } from '../labels-iZjijjtK.cjs';
|
|
8
|
-
import { f as OrgChartSvgLabels, g as OrgChartTitleLabels } from '../labels-
|
|
9
|
-
import '../types-
|
|
8
|
+
import { f as OrgChartSvgLabels, g as OrgChartTitleLabels } from '../labels-B0aOMbHy.cjs';
|
|
9
|
+
import '../types-jE2fdM1t.cjs';
|
|
10
10
|
|
|
11
11
|
declare const QUALITY_LEXICON_PT_BR: QualityLexicon;
|
|
12
12
|
declare const KINSHIP_PT_BR: KinshipLexicon;
|
package/dist/locales/pt-br.d.ts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { c as QualityLexicon } from '../stroke-MQ427drt.js';
|
|
2
|
-
import { b as GenogramSvgLabels, c as GenogramTitleLabels, d as KinshipLexicon } from '../kinship-
|
|
2
|
+
import { b as GenogramSvgLabels, c as GenogramTitleLabels, d as KinshipLexicon } from '../kinship-BF90HyyS.js';
|
|
3
3
|
import { EcomapLabels } from '../ecomap/index.js';
|
|
4
4
|
import { g as FaultTreeSvgLabels, h as FaultTreeTitleLabels } from '../labels-CYbM5XV7.js';
|
|
5
5
|
import { FishboneLabels } from '../fishbone/index.js';
|
|
6
|
-
import { e as PedigreeSvgLabels, f as PedigreeTitleLabels } from '../labels-
|
|
6
|
+
import { e as PedigreeSvgLabels, f as PedigreeTitleLabels } from '../labels-CuLbFyrz.js';
|
|
7
7
|
import { f as PhyloSvgLabels, g as PhyloTitleLabels } from '../labels-iZjijjtK.js';
|
|
8
|
-
import { f as OrgChartSvgLabels, g as OrgChartTitleLabels } from '../labels-
|
|
9
|
-
import '../types-
|
|
8
|
+
import { f as OrgChartSvgLabels, g as OrgChartTitleLabels } from '../labels-B0aOMbHy.js';
|
|
9
|
+
import '../types-jE2fdM1t.js';
|
|
10
10
|
|
|
11
11
|
declare const QUALITY_LEXICON_PT_BR: QualityLexicon;
|
|
12
12
|
declare const KINSHIP_PT_BR: KinshipLexicon;
|
package/dist/org-chart/index.cjs
CHANGED
|
@@ -249,6 +249,32 @@ function legendBlock(entries, startY) {
|
|
|
249
249
|
var EDGE_STROKE = {
|
|
250
250
|
distant: { width: 1.5, dash: [4, 4], opacity: 0.55 }};
|
|
251
251
|
|
|
252
|
+
// src/core/annotation.ts
|
|
253
|
+
var round = (n) => Math.round(n * 100) / 100;
|
|
254
|
+
var ANNOTATION_INK = "#52525b";
|
|
255
|
+
var DOT_R = 3;
|
|
256
|
+
var TICK_HALF = 3;
|
|
257
|
+
function annotationDot(cx, cy) {
|
|
258
|
+
return `<circle cx="${round(cx)}" cy="${round(cy)}" r="${DOT_R}" fill="${ANNOTATION_INK}" fill-opacity="0.6"/>`;
|
|
259
|
+
}
|
|
260
|
+
function annotationTick(points) {
|
|
261
|
+
if (points.length < 2) return "";
|
|
262
|
+
const i = Math.floor((points.length - 1) / 2);
|
|
263
|
+
const a = points[i];
|
|
264
|
+
const b = points[i + 1] ?? points[i];
|
|
265
|
+
const mx = (a.x + b.x) / 2;
|
|
266
|
+
const my = (a.y + b.y) / 2;
|
|
267
|
+
const horizontal = Math.abs(a.y - b.y) <= Math.abs(a.x - b.x);
|
|
268
|
+
const x1 = horizontal ? mx : mx - TICK_HALF;
|
|
269
|
+
const x2 = horizontal ? mx : mx + TICK_HALF;
|
|
270
|
+
const y1 = horizontal ? my - TICK_HALF : my;
|
|
271
|
+
const y2 = horizontal ? my + TICK_HALF : my;
|
|
272
|
+
return `<line x1="${round(x1)}" y1="${round(y1)}" x2="${round(x2)}" y2="${round(y2)}" stroke="${ANNOTATION_INK}" stroke-width="1.5"/>`;
|
|
273
|
+
}
|
|
274
|
+
function annotationSwatch(x, yCenter) {
|
|
275
|
+
return annotationDot(x + LEGEND_SWATCH_W / 2, yCenter);
|
|
276
|
+
}
|
|
277
|
+
|
|
252
278
|
// src/org-chart/layout.ts
|
|
253
279
|
var ORG_LABEL_FONT = 12;
|
|
254
280
|
var ORG_TITLE_FONT = 10;
|
|
@@ -270,9 +296,9 @@ var ORG_BUS_ID_BASE = 2e6;
|
|
|
270
296
|
var ORG_DROP_ID_BASE = 3e6;
|
|
271
297
|
var ORG_ASSIST_ID_BASE = 4e6;
|
|
272
298
|
var ORG_DOTTED_ID_BASE = 5e6;
|
|
273
|
-
var
|
|
274
|
-
var drawnLeftEdge = (cx, boxW) =>
|
|
275
|
-
var drawnRightEdge = (cx, boxW) => drawnLeftEdge(cx, boxW) +
|
|
299
|
+
var round2 = (n) => Math.round(n * 100) / 100;
|
|
300
|
+
var drawnLeftEdge = (cx, boxW) => round2(round2(cx) - round2(boxW) / 2);
|
|
301
|
+
var drawnRightEdge = (cx, boxW) => drawnLeftEdge(cx, boxW) + round2(boxW);
|
|
276
302
|
function packSubtree(node, gaps) {
|
|
277
303
|
const { ownHalfL, ownHalfR, children } = node;
|
|
278
304
|
if (children.length === 0) {
|
|
@@ -440,10 +466,10 @@ function computeOrgChartLayout(input, opts = {}) {
|
|
|
440
466
|
const pushNode = (inst) => {
|
|
441
467
|
nodes.push({
|
|
442
468
|
positionId: inst.position.id,
|
|
443
|
-
cx:
|
|
444
|
-
top:
|
|
445
|
-
boxW:
|
|
446
|
-
boxH:
|
|
469
|
+
cx: round2(inst.cx),
|
|
470
|
+
top: round2(rowTop[inst.depth]),
|
|
471
|
+
boxW: round2(inst.m.boxW),
|
|
472
|
+
boxH: round2(inst.m.boxH),
|
|
447
473
|
style: inst.style,
|
|
448
474
|
nameLines: inst.m.nameLines,
|
|
449
475
|
titleLines: inst.m.titleLines,
|
|
@@ -451,7 +477,8 @@ function computeOrgChartLayout(input, opts = {}) {
|
|
|
451
477
|
vacantMarker: inst.m.vacantMarker,
|
|
452
478
|
isAssistant: inst.assistReport !== null,
|
|
453
479
|
depth: inst.depth,
|
|
454
|
-
title: inst.title
|
|
480
|
+
title: inst.title,
|
|
481
|
+
annotated: inst.position.annotated ?? false
|
|
455
482
|
});
|
|
456
483
|
};
|
|
457
484
|
const emit = (inst) => {
|
|
@@ -465,10 +492,10 @@ function computeOrgChartLayout(input, opts = {}) {
|
|
|
465
492
|
const assistMidY = assistTop + a.m.boxH / 2;
|
|
466
493
|
nodes.push({
|
|
467
494
|
positionId: a.position.id,
|
|
468
|
-
cx:
|
|
469
|
-
top:
|
|
470
|
-
boxW:
|
|
471
|
-
boxH:
|
|
495
|
+
cx: round2(a.cx),
|
|
496
|
+
top: round2(assistTop),
|
|
497
|
+
boxW: round2(a.m.boxW),
|
|
498
|
+
boxH: round2(a.m.boxH),
|
|
472
499
|
style: a.style,
|
|
473
500
|
nameLines: a.m.nameLines,
|
|
474
501
|
titleLines: a.m.titleLines,
|
|
@@ -476,17 +503,19 @@ function computeOrgChartLayout(input, opts = {}) {
|
|
|
476
503
|
vacantMarker: a.m.vacantMarker,
|
|
477
504
|
isAssistant: true,
|
|
478
505
|
depth: a.depth,
|
|
479
|
-
title: a.title
|
|
506
|
+
title: a.title,
|
|
507
|
+
annotated: a.position.annotated ?? false
|
|
480
508
|
});
|
|
481
509
|
elements.push({
|
|
482
510
|
edgeId: ORG_ASSIST_ID_BASE + report.reportId,
|
|
483
511
|
kind: "assist",
|
|
484
512
|
points: [
|
|
485
|
-
{ x:
|
|
486
|
-
{ x: drawnRightEdge(a.cx, a.m.boxW), y:
|
|
513
|
+
{ x: round2(inst.cx), y: round2(assistMidY) },
|
|
514
|
+
{ x: drawnRightEdge(a.cx, a.m.boxW), y: round2(assistMidY) }
|
|
487
515
|
],
|
|
488
516
|
dashed: false,
|
|
489
|
-
title: reportTitle("assistant", report.label)
|
|
517
|
+
title: reportTitle("assistant", report.label),
|
|
518
|
+
annotated: report.annotated ?? false
|
|
490
519
|
});
|
|
491
520
|
bandY += a.m.boxH + ORG_ASSIST_BAND_DROP;
|
|
492
521
|
}
|
|
@@ -498,11 +527,12 @@ function computeOrgChartLayout(input, opts = {}) {
|
|
|
498
527
|
edgeId: ORG_STEM_ID_BASE + inst.position.id,
|
|
499
528
|
kind: "stem",
|
|
500
529
|
points: [
|
|
501
|
-
{ x:
|
|
502
|
-
{ x:
|
|
530
|
+
{ x: round2(inst.cx), y: round2(boxBottom) },
|
|
531
|
+
{ x: round2(inst.cx), y: round2(by) }
|
|
503
532
|
],
|
|
504
533
|
dashed: false,
|
|
505
|
-
title: reportTitle("line", null)
|
|
534
|
+
title: reportTitle("line", null),
|
|
535
|
+
annotated: false
|
|
506
536
|
});
|
|
507
537
|
const childCxs = inst.lineChildren.map((c) => c.cx);
|
|
508
538
|
if (inst.lineChildren.length > 1) {
|
|
@@ -510,23 +540,28 @@ function computeOrgChartLayout(input, opts = {}) {
|
|
|
510
540
|
edgeId: ORG_BUS_ID_BASE + inst.position.id,
|
|
511
541
|
kind: "bus",
|
|
512
542
|
points: [
|
|
513
|
-
{ x:
|
|
514
|
-
{ x:
|
|
543
|
+
{ x: round2(Math.min(...childCxs)), y: round2(by) },
|
|
544
|
+
{ x: round2(Math.max(...childCxs)), y: round2(by) }
|
|
515
545
|
],
|
|
516
546
|
dashed: false,
|
|
517
|
-
title: reportTitle("line", null)
|
|
547
|
+
title: reportTitle("line", null),
|
|
548
|
+
annotated: false
|
|
518
549
|
});
|
|
519
550
|
}
|
|
551
|
+
const lineReports = lineChildIds.get(inst.position.id) ?? [];
|
|
552
|
+
const lineReportByChildId = new Map(lineReports.map((r) => [r.reportId, r]));
|
|
520
553
|
for (const c of inst.lineChildren) {
|
|
554
|
+
const lineReport = lineReportByChildId.get(c.position.id);
|
|
521
555
|
elements.push({
|
|
522
556
|
edgeId: ORG_DROP_ID_BASE + c.position.id,
|
|
523
557
|
kind: "drop",
|
|
524
558
|
points: [
|
|
525
|
-
{ x:
|
|
526
|
-
{ x:
|
|
559
|
+
{ x: round2(c.cx), y: round2(by) },
|
|
560
|
+
{ x: round2(c.cx), y: round2(rowTop[c.depth]) }
|
|
527
561
|
],
|
|
528
562
|
dashed: false,
|
|
529
|
-
title: reportTitle("line", null)
|
|
563
|
+
title: reportTitle("line", null),
|
|
564
|
+
annotated: lineReport?.annotated ?? false
|
|
530
565
|
});
|
|
531
566
|
}
|
|
532
567
|
for (const c of inst.lineChildren) emit(c);
|
|
@@ -596,13 +631,13 @@ function computeOrgChartLayout(input, opts = {}) {
|
|
|
596
631
|
return {
|
|
597
632
|
r,
|
|
598
633
|
i,
|
|
599
|
-
repMidY:
|
|
600
|
-
mgrMidY:
|
|
601
|
-
repBoxEdge:
|
|
602
|
-
mgrBoxEdge:
|
|
603
|
-
repChY:
|
|
604
|
-
mgrChY:
|
|
605
|
-
laneX:
|
|
634
|
+
repMidY: round2(nextExitY(r.reportId, rep.midY, rep.boxH)),
|
|
635
|
+
mgrMidY: round2(nextExitY(r.managerId, mgr.midY, mgr.boxH)),
|
|
636
|
+
repBoxEdge: round2(rep.boxEdge),
|
|
637
|
+
mgrBoxEdge: round2(mgr.boxEdge),
|
|
638
|
+
repChY: round2(channelTop + 2 * i * ORG_MATRIX_LANE_PITCH),
|
|
639
|
+
mgrChY: round2(channelTop + (2 * i + 1) * ORG_MATRIX_LANE_PITCH),
|
|
640
|
+
laneX: round2(canvasRight + ORG_MATRIX_GUTTER_GAP + laneOf.get(r.id) * ORG_MATRIX_LANE_PITCH),
|
|
606
641
|
repEscX: 0,
|
|
607
642
|
mgrEscX: 0
|
|
608
643
|
};
|
|
@@ -640,14 +675,14 @@ function computeOrgChartLayout(input, opts = {}) {
|
|
|
640
675
|
else if (v.side === -1 && bRight < v.escCol - VERT_EPS) band = Math.min(band, v.escCol - bRight);
|
|
641
676
|
}
|
|
642
677
|
let lane = 0;
|
|
643
|
-
let candidate =
|
|
678
|
+
let candidate = round2(v.escCol);
|
|
644
679
|
while (placed.some((p) => Math.abs(p.x - candidate) < VERT_EPS && yOverlap(p.lo, p.hi, v.lo, v.hi))) {
|
|
645
680
|
lane += 1;
|
|
646
|
-
candidate =
|
|
681
|
+
candidate = round2(v.escCol + v.side * lane * ORG_MATRIX_ESCAPE_STEP);
|
|
647
682
|
}
|
|
648
683
|
if (lane > 0 && lane * ORG_MATRIX_ESCAPE_STEP >= band - VERT_EPS) {
|
|
649
684
|
throw new Error(
|
|
650
|
-
`org-chart: escape-column-overflow \u2014 escape vertical nudged ${lane * ORG_MATRIX_ESCAPE_STEP}px from its base column exceeds the ${
|
|
685
|
+
`org-chart: escape-column-overflow \u2014 escape vertical nudged ${lane * ORG_MATRIX_ESCAPE_STEP}px from its base column exceeds the ${round2(band)}px box-free band`
|
|
651
686
|
);
|
|
652
687
|
}
|
|
653
688
|
placed.push({ x: candidate, lo: v.lo, hi: v.hi });
|
|
@@ -676,7 +711,8 @@ function computeOrgChartLayout(input, opts = {}) {
|
|
|
676
711
|
// → into the manager box's edge
|
|
677
712
|
]),
|
|
678
713
|
dashed: true,
|
|
679
|
-
title: reportTitle("dotted", g.r.label)
|
|
714
|
+
title: reportTitle("dotted", g.r.label),
|
|
715
|
+
annotated: g.r.annotated ?? false
|
|
680
716
|
});
|
|
681
717
|
}
|
|
682
718
|
}
|
|
@@ -719,25 +755,25 @@ var EDGE_INK = "#71717a";
|
|
|
719
755
|
var GLYPH_ATTRS = `fill="transparent" stroke="${GLYPH_STROKE}" stroke-width="2"`;
|
|
720
756
|
var VACANT_DASH = `stroke-dasharray="6,4"`;
|
|
721
757
|
var DOTTED = EDGE_STROKE.distant;
|
|
722
|
-
var
|
|
758
|
+
var round3 = (n) => Math.round(n * 100) / 100;
|
|
723
759
|
var ORG_BOX_PAD_Y2 = 9;
|
|
724
760
|
function boxSvg(n) {
|
|
725
|
-
const left =
|
|
761
|
+
const left = round3(n.cx - n.boxW / 2);
|
|
726
762
|
const pieces = [`<title>${xmlEscape(n.title)}</title>`];
|
|
727
763
|
if (n.style === "dashed") {
|
|
728
764
|
pieces.push(
|
|
729
765
|
`<rect x="${left}" y="${n.top}" width="${n.boxW}" height="${n.boxH}" rx="2" ${GLYPH_ATTRS} ${VACANT_DASH}/>`
|
|
730
766
|
);
|
|
731
|
-
const ix =
|
|
732
|
-
const iy =
|
|
733
|
-
const iw =
|
|
734
|
-
const ih =
|
|
767
|
+
const ix = round3(left + 3);
|
|
768
|
+
const iy = round3(n.top + 3);
|
|
769
|
+
const iw = round3(n.boxW - 6);
|
|
770
|
+
const ih = round3(n.boxH - 6);
|
|
735
771
|
pieces.push(`<rect x="${ix}" y="${iy}" width="${iw}" height="${ih}" rx="2" ${GLYPH_ATTRS} ${VACANT_DASH}/>`);
|
|
736
772
|
} else {
|
|
737
773
|
pieces.push(`<rect x="${left}" y="${n.top}" width="${n.boxW}" height="${n.boxH}" rx="2" ${GLYPH_ATTRS}/>`);
|
|
738
774
|
}
|
|
739
775
|
let lineIndex = 0;
|
|
740
|
-
const firstBaseline = (i) =>
|
|
776
|
+
const firstBaseline = (i) => round3(n.top + ORG_BOX_PAD_Y2 + ORG_LABEL_LINE_H / 2 + i * ORG_LABEL_LINE_H + ORG_LABEL_FONT * 0.32);
|
|
741
777
|
const textBlock = (lines, font) => {
|
|
742
778
|
if (lines.length === 0) return "";
|
|
743
779
|
const tspans = lines.map((line, i) => `<tspan x="${n.cx}" y="${firstBaseline(lineIndex + i)}">${xmlEscape(line)}</tspan>`).join("");
|
|
@@ -748,43 +784,45 @@ function boxSvg(n) {
|
|
|
748
784
|
pieces.push(textBlock(n.titleLines, ORG_TITLE_FONT));
|
|
749
785
|
pieces.push(textBlock(n.subtitleLines, ORG_TITLE_FONT));
|
|
750
786
|
if (n.vacantMarker !== null) pieces.push(textBlock([n.vacantMarker], ORG_TITLE_FONT));
|
|
787
|
+
if (n.annotated) pieces.push(annotationDot(round3(n.cx + n.boxW / 2) - 4, n.top + 4));
|
|
751
788
|
return `<g data-node-id="p${n.positionId}">${pieces.filter((p) => p !== "").join("")}</g>`;
|
|
752
789
|
}
|
|
753
790
|
function elementSvg(el) {
|
|
754
791
|
const head = `<g data-edge-id="${el.edgeId}"><title>${xmlEscape(el.title)}</title>`;
|
|
792
|
+
const tick = el.annotated ? annotationTick(el.points) : "";
|
|
755
793
|
if (el.dashed) {
|
|
756
794
|
const dash = DOTTED.dash === null ? "" : ` stroke-dasharray="${DOTTED.dash[0]},${DOTTED.dash[1]}"`;
|
|
757
|
-
return head + `<path d="${pathData(el.points)}" fill="none" stroke="${EDGE_INK}" stroke-width="${DOTTED.width}" stroke-opacity="${DOTTED.opacity}"${dash}
|
|
795
|
+
return head + `<path d="${pathData(el.points)}" fill="none" stroke="${EDGE_INK}" stroke-width="${DOTTED.width}" stroke-opacity="${DOTTED.opacity}"${dash}/>${tick}</g>`;
|
|
758
796
|
}
|
|
759
797
|
if (el.points.length === 2) {
|
|
760
798
|
const a = el.points[0];
|
|
761
799
|
const b = el.points[1];
|
|
762
|
-
return head + `<line x1="${a.x}" y1="${a.y}" x2="${b.x}" y2="${b.y}" stroke="${EDGE_INK}" stroke-width="1.5" stroke-opacity="0.75"
|
|
800
|
+
return head + `<line x1="${a.x}" y1="${a.y}" x2="${b.x}" y2="${b.y}" stroke="${EDGE_INK}" stroke-width="1.5" stroke-opacity="0.75"/>${tick}</g>`;
|
|
763
801
|
}
|
|
764
|
-
return head + `<path d="${pathData(el.points)}" fill="none" stroke="${EDGE_INK}" stroke-width="1.5" stroke-opacity="0.75"
|
|
802
|
+
return head + `<path d="${pathData(el.points)}" fill="none" stroke="${EDGE_INK}" stroke-width="1.5" stroke-opacity="0.75"/>${tick}</g>`;
|
|
765
803
|
}
|
|
766
804
|
var MINI_ATTRS = `fill="transparent" stroke="${GLYPH_STROKE}" stroke-width="1.5"`;
|
|
767
805
|
function lineSwatch(x, y) {
|
|
768
|
-
const x1 =
|
|
769
|
-
const x2 =
|
|
806
|
+
const x1 = round3(x + 2);
|
|
807
|
+
const x2 = round3(x + LEGEND_SWATCH_W - 2);
|
|
770
808
|
return `<line x1="${x1}" y1="${y}" x2="${x2}" y2="${y}" stroke="${EDGE_INK}" stroke-width="1.5" stroke-opacity="0.75"/>`;
|
|
771
809
|
}
|
|
772
810
|
function assistantSwatch(x, y) {
|
|
773
|
-
const stemX =
|
|
774
|
-
const boxX =
|
|
775
|
-
return `<line x1="${stemX}" y1="${
|
|
811
|
+
const stemX = round3(x + LEGEND_SWATCH_W - 4);
|
|
812
|
+
const boxX = round3(x + 1);
|
|
813
|
+
return `<line x1="${stemX}" y1="${round3(y - 4)}" x2="${stemX}" y2="${y}" stroke="${EDGE_INK}" stroke-width="1.5" stroke-opacity="0.75"/><line x1="${stemX}" y1="${y}" x2="${round3(boxX + 8)}" y2="${y}" stroke="${EDGE_INK}" stroke-width="1.5" stroke-opacity="0.75"/><rect x="${boxX}" y="${round3(y - 3.5)}" width="8" height="7" rx="1" ${MINI_ATTRS}/>`;
|
|
776
814
|
}
|
|
777
815
|
function dottedSwatch(x, y) {
|
|
778
|
-
const x1 =
|
|
779
|
-
const x2 =
|
|
816
|
+
const x1 = round3(x + 2);
|
|
817
|
+
const x2 = round3(x + LEGEND_SWATCH_W - 2);
|
|
780
818
|
const dash = DOTTED.dash === null ? "" : ` stroke-dasharray="${DOTTED.dash[0]},${DOTTED.dash[1]}"`;
|
|
781
819
|
return `<line x1="${x1}" y1="${y}" x2="${x2}" y2="${y}" stroke="${EDGE_INK}" stroke-width="${DOTTED.width}" stroke-opacity="${DOTTED.opacity}"${dash}/>`;
|
|
782
820
|
}
|
|
783
821
|
function vacantSwatch(x, y) {
|
|
784
|
-
const cx =
|
|
785
|
-
const bx =
|
|
786
|
-
const by =
|
|
787
|
-
return `<rect x="${bx}" y="${by}" width="16" height="10" rx="1" ${MINI_ATTRS} stroke-dasharray="3,2"/><rect x="${
|
|
822
|
+
const cx = round3(x + LEGEND_SWATCH_W / 2);
|
|
823
|
+
const bx = round3(cx - 8);
|
|
824
|
+
const by = round3(y - 5);
|
|
825
|
+
return `<rect x="${bx}" y="${by}" width="16" height="10" rx="1" ${MINI_ATTRS} stroke-dasharray="3,2"/><rect x="${round3(bx + 2)}" y="${round3(by + 2)}" width="12" height="6" rx="1" ${MINI_ATTRS} stroke-dasharray="3,2"/>`;
|
|
788
826
|
}
|
|
789
827
|
function orgChartLayoutSvg(layout, opts = {}) {
|
|
790
828
|
const labels = opts.labels ?? ORG_CHART_SVG_LABELS_EN;
|
|
@@ -803,6 +841,9 @@ function orgChartLayoutSvg(layout, opts = {}) {
|
|
|
803
841
|
if (hasAssistant) entries.push({ swatch: assistantSwatch, label: labels.legend.assistant });
|
|
804
842
|
if (hasDotted) entries.push({ swatch: dottedSwatch, label: labels.legend.dotted });
|
|
805
843
|
if (hasVacant) entries.push({ swatch: vacantSwatch, label: labels.legend.vacant });
|
|
844
|
+
if (opts.annotationLabel !== void 0 && (layout.nodes.some((n) => n.annotated) || layout.elements.some((e) => e.annotated))) {
|
|
845
|
+
entries.push({ swatch: annotationSwatch, label: opts.annotationLabel });
|
|
846
|
+
}
|
|
806
847
|
const block = legendBlock(entries, layout.height);
|
|
807
848
|
if (block.svg !== "") {
|
|
808
849
|
parts.push(block.svg);
|
|
@@ -823,7 +864,8 @@ function orgChartSvg(input, opts = {}) {
|
|
|
823
864
|
});
|
|
824
865
|
const svg = orgChartLayoutSvg(layout, {
|
|
825
866
|
...opts.legend === false ? { legend: false } : {},
|
|
826
|
-
...opts.svgLabels !== void 0 ? { labels: opts.svgLabels } : {}
|
|
867
|
+
...opts.svgLabels !== void 0 ? { labels: opts.svgLabels } : {},
|
|
868
|
+
...opts.annotationLabel !== void 0 ? { annotationLabel: opts.annotationLabel } : {}
|
|
827
869
|
});
|
|
828
870
|
return { svg, layout };
|
|
829
871
|
}
|