@ca-plant-list/ca-plant-list 0.3.3 → 0.3.5

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.
Files changed (51) hide show
  1. package/data/glossary/calyx.md +1 -0
  2. package/data/glossary/pedicel.md +1 -0
  3. package/data/glossary/sepal.md +1 -0
  4. package/data/synonyms.csv +6 -4
  5. package/data/taxa.csv +293 -291
  6. package/data/text/Agoseris-grandiflora-var-grandiflora.md +1 -0
  7. package/data/text/Agoseris-heterophylla-var-cryptopleura.md +1 -0
  8. package/data/text/Calochortus-argillosus.md +1 -0
  9. package/data/text/Calochortus-luteus.md +1 -0
  10. package/data/text/Calochortus-venustus.md +1 -0
  11. package/data/text/Claytonia-parviflora-subsp-parviflora.md +1 -0
  12. package/data/text/Claytonia-perfoliata-subsp-perfoliata.md +1 -0
  13. package/data/text/Collinsia-heterophylla-var-heterophylla.md +1 -0
  14. package/data/text/Galium-aparine.md +1 -0
  15. package/data/text/Galium-triflorum.md +1 -0
  16. package/data/text/Hypochaeris-glabra.md +1 -1
  17. package/data/text/Hypochaeris-radicata.md +1 -1
  18. package/data/text/Leptosiphon-ambiguus.md +1 -0
  19. package/data/text/Leptosiphon-androsaceus.md +1 -0
  20. package/data/text/Leptosiphon-bicolor.md +1 -1
  21. package/data/text/Leptosiphon-parviflorus.md +1 -0
  22. package/data/text/Lithophragma-affine.md +1 -1
  23. package/data/text/Lupinus-formosus-var-formosus.md +1 -1
  24. package/data/text/Lupinus-latifolius-var-latifolius.md +1 -1
  25. package/data/text/Lupinus-microcarpus-var-densiflorus.md +1 -1
  26. package/data/text/Lupinus-microcarpus-var-microcarpus.md +1 -1
  27. package/data/text/Lupinus-succulentus.md +1 -1
  28. package/data/text/Pinus-ponderosa-var-pacifica.md +1 -0
  29. package/data/text/Pinus-sabiniana.md +1 -0
  30. package/data/text/Quercus-douglasii.md +1 -0
  31. package/data/text/Quercus-kelloggii.md +1 -0
  32. package/data/text/Quercus-lobata.md +1 -0
  33. package/data/text/Sidalcea-diploscypha.md +1 -1
  34. package/ebook/css/main.css +6 -1
  35. package/jekyll/assets/css/main.css +6 -1
  36. package/lib/basepagerenderer.js +1 -2
  37. package/lib/ebook/image.js +6 -4
  38. package/lib/ebook/pages/page_list_families.js +15 -9
  39. package/lib/ebook/pages/taxonpage.js +9 -36
  40. package/lib/ebook/plantbook.js +82 -48
  41. package/lib/families.js +5 -8
  42. package/lib/genera.js +40 -26
  43. package/lib/html.js +70 -41
  44. package/lib/htmltaxon.js +51 -0
  45. package/lib/index.js +2 -1
  46. package/lib/taxa.js +14 -5
  47. package/lib/taxon.js +16 -5
  48. package/lib/textutils.js +10 -0
  49. package/lib/web/pagetaxon.js +107 -82
  50. package/package.json +3 -3
  51. package/scripts/build-ebook.js +3 -0
@@ -0,0 +1 @@
1
+ Height 25-100 cm. Leaf petiole usually purple.
@@ -0,0 +1 @@
1
+ Height 5-60 cm. Leaf petiole usually not purple.
@@ -0,0 +1 @@
1
+ Nectary crescent-shaped and densely hairy. Generally a dark reddish spot surrounded by pale yellow at base of petals (above nectary).
@@ -0,0 +1 @@
1
+ Petals deep yellow, usually with brown streaking. Nectary generally crescent-shaped.
@@ -0,0 +1 @@
1
+ Nectary almost square. Generally a dark reddish spot at base of petals (above nectary) and a paler spot above.
@@ -0,0 +1 @@
1
+ Basal leaf blades at least 3 times longer than wide; base tapered gradually to petiole.
@@ -0,0 +1 @@
1
+ Basal leaf blades less than 3 times longer than wide; base not tapered gradually to petiole.
@@ -0,0 +1 @@
1
+ Flower whorls dense. [Pedicels](./g/pedicel.html) on lower flowers shorter than [calyx](./g/calyx.html).
@@ -0,0 +1 @@
1
+ Leaves in whorls of 6 to 8. Similar to _G. triflorum_, but _G. aparine_ has hooked prickles.
@@ -0,0 +1 @@
1
+ Leaves in whorls of 6. Similar to _G. aparine_, but _G. triflorum_ does not have hooked prickles.
@@ -1 +1 @@
1
- Annual. [Peduncle](g/peduncle.html) has bracts. Ligules extend only slightly beyond involucre. Leaves hairless or very nearly so. Leaves basal.
1
+ [Peduncle](g/peduncle.html) has bracts. Ligules extend only slightly beyond involucre. Leaves hairless or very nearly so. Leaves basal.
@@ -1 +1 @@
1
- Perennial. [Peduncle](g/peduncle.html) has bracts. Ligules extend much beyond involucre. Leaves bristly and rough to touch. Leaves basal.
1
+ [Peduncle](g/peduncle.html) has bracts. Ligules extend much beyond involucre. Leaves bristly and rough to touch. Leaves basal.
@@ -0,0 +1 @@
1
+ Flowers pedicelled. Sepals just below lobes (throat is short). Throat of tube usually purple.
@@ -0,0 +1 @@
1
+ Flowers pedicelled. Corolla tube at least twice as long as [calyx](./g/calyx.html). Corolla lobes 8-14 mm. Calyx membrane much narrower than lobes. Calyx hairs sparse or not present (except on margins).
@@ -1 +1 @@
1
- Flowers pedicelled. Corolla tube at least twice as long as calyx. Calyx membrane much narrower than lobes.
1
+ Flowers pedicelled. Corolla tube at least twice as long as [calyx](./g/calyx.html); threadlike - no sepals at base of lobes. Corolla lobes less than 4 mm. Calyx membrane much narrower than lobes. Calyx hairs sparse or not present (except on margins).
@@ -0,0 +1 @@
1
+ Corolla lobes at least 4 mm long, corolla tube at least 14 mm. Calyx hairs dense.
@@ -1 +1 @@
1
- Pedicel 3-10 mm, floral tube conical at base. In open, grassy areas. Similar to [_L. parviflorum_ var. _parviflorum_](./Lithophragma-parviflorum-var-parviflorum.html).
1
+ Pedicel 3-10 mm, floral tube conical at base. In open, grassy areas. Similar to _L. parviflorum_ var. _parviflorum_.
@@ -1 +1 @@
1
- Perennial. Keel margins not hairy.
1
+ Keel margins not hairy.
@@ -1 +1 @@
1
- Perennial. Fruit densely hairy. Upper keel margin hairy from base to middle, not hairy from middle to tip
1
+ Fruit densely hairy. Upper keel margin hairy from base to middle, not hairy from middle to tip
@@ -1 +1 @@
1
- Annual. At least lower part of stem clearly hollow. Lower keel margins usually not hairy or less hairy than upper. Flowers generally yellow or white.
1
+ At least lower part of stem clearly hollow. Lower keel margins usually not hairy or less hairy than upper. Flowers generally yellow or white.
@@ -1 +1 @@
1
- Annual. At least lower part of stem clearly hollow. Lower keel margins usually not hairy or less hairy than upper. Flowers generally pink or purple.
1
+ At least lower part of stem clearly hollow. Lower keel margins usually not hairy or less hairy than upper. Flowers generally pink or purple.
@@ -1 +1 @@
1
- Annual. Fruit not densely hairy.
1
+ Fruit not densely hairy.
@@ -0,0 +1 @@
1
+ 3 needles, deep green and shiny. Mature bark light to medium yellow-brown, with shallow furrows. Cone stalk less than 2cm long.
@@ -0,0 +1 @@
1
+ 3 gray-green needles; needles flexible and usually drooping. Bark dark gray with irregular furrows. Bark on older trees in yellow plates. Cone stalk less than 7 cm.
@@ -0,0 +1 @@
1
+ Leaves usually shallowly lobed; upper sides generally dull and blue-green.
@@ -0,0 +1 @@
1
+ Leaf moderately to deeply lobed. Each lobe with 1-4 teeth, which are usually bristle-tipped.
@@ -0,0 +1 @@
1
+ Leaves usually deeply lobed; upper sides generally shiny and dark green.
@@ -1 +1 @@
1
- Annual. Stipules on upper stem having two or more linear lobes.
1
+ Stipules on upper stem having two or more linear lobes.
@@ -12,11 +12,16 @@ div.section {
12
12
  margin-bottom: .5rem;
13
13
  }
14
14
 
15
- img.flr {
15
+ img.flr-color {
16
16
  padding-right: .25rem;
17
17
  width: 1rem;
18
18
  }
19
19
 
20
+ span.flr-time,
21
+ span.lc {
22
+ font-weight: bold;
23
+ }
24
+
20
25
  /* Glossary */
21
26
  div.glossary img {
22
27
  max-height: 300px;
@@ -131,12 +131,17 @@ div.section ul.indent {
131
131
  padding-left: 1rem;
132
132
  }
133
133
 
134
- img.flower-color {
134
+ img.flr-color {
135
135
  margin-bottom: .2rem;
136
136
  margin-right: .5rem;
137
137
  width: 1rem;
138
138
  }
139
139
 
140
+ span.flr-time,
141
+ span.lc {
142
+ font-weight: bold;
143
+ }
144
+
140
145
  /* Forms */
141
146
  input {
142
147
  margin-right: .5em;
@@ -1,5 +1,4 @@
1
1
  import { Config } from "./config.js";
2
- import { Families } from "./families.js";
3
2
  import { Files } from "./files.js";
4
3
  import { Jekyll } from "./jekyll.js";
5
4
  import { Taxa } from "./taxa.js";
@@ -23,7 +22,7 @@ class BasePageRenderer {
23
22
  // Copy illustrations.
24
23
  siteGenerator.copyIllustrations(Taxa.getFlowerColors());
25
24
 
26
- Families.renderPages(outputDir, familyCols);
25
+ taxa.getFamilies().renderPages(outputDir, familyCols);
27
26
 
28
27
  new GlossaryPages(siteGenerator).renderPages();
29
28
 
@@ -1,9 +1,12 @@
1
1
  class Image {
2
-
3
2
  #src;
4
3
  #credit;
5
4
 
6
- constructor( src, credit ) {
5
+ /**
6
+ * @param {string} src
7
+ * @param {string} credit
8
+ */
9
+ constructor(src, credit) {
7
10
  this.#src = src;
8
11
  this.#credit = credit;
9
12
  }
@@ -15,7 +18,6 @@ class Image {
15
18
  getSrc() {
16
19
  return this.#src;
17
20
  }
18
-
19
21
  }
20
22
 
21
- export { Image };
23
+ export { Image };
@@ -1,27 +1,33 @@
1
1
  import { EBookPage } from "../ebookpage.js";
2
2
  import { XHTML } from "../xhtml.js";
3
+ // eslint-disable-next-line no-unused-vars
3
4
  import { Families } from "../../families.js";
4
5
 
5
6
  class PageListFamilies extends EBookPage {
7
+ #families;
6
8
 
7
- constructor( outputDir ) {
8
- super( outputDir + "/list_families.html", "All Families" );
9
+ /**
10
+ * @param {string} outputDir
11
+ * @param {Families} families
12
+ */
13
+ constructor(outputDir, families) {
14
+ super(outputDir + "/list_families.html", "All Families");
15
+ this.#families = families;
9
16
  }
10
17
 
11
18
  renderPageBody() {
12
-
13
- const html = XHTML.textElement( "h1", this.getTitle() );
19
+ const html = XHTML.textElement("h1", this.getTitle());
14
20
 
15
21
  const links = [];
16
- for ( const family of Families.getFamilies() ) {
17
- if ( !family.getTaxa() ) {
22
+ for (const family of this.#families.getFamilies()) {
23
+ if (!family.getTaxa()) {
18
24
  continue;
19
25
  }
20
- links.push( XHTML.getLink( family.getFileName(), family.getName() ) );
26
+ links.push(XHTML.getLink(family.getFileName(), family.getName()));
21
27
  }
22
28
 
23
- return html + XHTML.wrap( "ol", XHTML.arrayToLI( links ) );
29
+ return html + XHTML.wrap("ol", XHTML.arrayToLI(links));
24
30
  }
25
31
  }
26
32
 
27
- export { PageListFamilies };
33
+ export { PageListFamilies };
@@ -1,11 +1,13 @@
1
- import sizeOf from "image-size";
1
+ import imageSize from "image-size";
2
2
  import { Config, Files } from "@ca-plant-list/ca-plant-list";
3
3
  import { EBookPage } from "../ebookpage.js";
4
4
  import { XHTML } from "../xhtml.js";
5
5
  import { Markdown } from "../../markdown.js";
6
- import { DateUtils } from "../../dateutils.js";
7
6
  // eslint-disable-next-line no-unused-vars
8
7
  import { Taxon } from "../../taxon.js";
8
+ // eslint-disable-next-line no-unused-vars
9
+ import { Image } from "../image.js";
10
+ import { HTMLTaxon } from "../../htmltaxon.js";
9
11
 
10
12
  class TaxonPage extends EBookPage {
11
13
  #outputDir;
@@ -13,10 +15,9 @@ class TaxonPage extends EBookPage {
13
15
  #photos;
14
16
 
15
17
  /**
16
- *
17
18
  * @param {string} outputDir
18
19
  * @param {Taxon} taxon
19
- * @param {*} photos
20
+ * @param {Image[]} photos
20
21
  */
21
22
  constructor(outputDir, taxon, photos) {
22
23
  super(outputDir + "/" + taxon.getFileName(), taxon.getName());
@@ -26,36 +27,6 @@ class TaxonPage extends EBookPage {
26
27
  }
27
28
 
28
29
  renderPageBody() {
29
- /**
30
- * @param {Taxon} taxon
31
- */
32
- function renderBloomInfo(taxon) {
33
- const colors = taxon.getFlowerColors();
34
- const monthStart = taxon.getBloomStart();
35
- const monthEnd = taxon.getBloomEnd();
36
- if (!colors && !monthStart) {
37
- return "";
38
- }
39
- let html = "";
40
- if (colors) {
41
- for (const color of colors) {
42
- html += XHTML.textElement("img", "", {
43
- src: "./i/f-" + color + ".svg",
44
- class: "flr",
45
- });
46
- }
47
- }
48
- if (monthStart && monthEnd) {
49
- html += XHTML.textElement(
50
- "div",
51
- DateUtils.getMonthName(monthStart) +
52
- "-" +
53
- DateUtils.getMonthName(monthEnd)
54
- );
55
- }
56
- return XHTML.wrap("div", html, { class: "section flr" });
57
- }
58
-
59
30
  /**
60
31
  * @param {string} name
61
32
  */
@@ -87,7 +58,7 @@ class TaxonPage extends EBookPage {
87
58
  });
88
59
  }
89
60
 
90
- html += renderBloomInfo(this.#taxon);
61
+ html += HTMLTaxon.getFlowerInfo(this.#taxon);
91
62
 
92
63
  html += renderCustomText(this.#taxon.getBaseFileName());
93
64
 
@@ -95,7 +66,9 @@ class TaxonPage extends EBookPage {
95
66
  let photoHTML = "";
96
67
  for (const photo of this.#photos) {
97
68
  const src = photo.getSrc();
98
- const dimensions = sizeOf(this.#outputDir + "/" + src);
69
+ const dimensions = imageSize.imageSize(
70
+ this.#outputDir + "/" + src
71
+ );
99
72
  let img = XHTML.textElement("img", "", {
100
73
  src: src,
101
74
  style: "max-width:" + dimensions.width + "px",
@@ -1,4 +1,3 @@
1
- import { Families } from "@ca-plant-list/ca-plant-list";
2
1
  import { EBook } from "./ebook.js";
3
2
  import { EBookSiteGenerator } from "./ebooksitegenerator.js";
4
3
  import { GlossaryPages } from "./glossarypages.js";
@@ -12,89 +11,124 @@ import { TOCPage } from "./pages/tocpage.js";
12
11
  import { Taxa } from "../taxa.js";
13
12
 
14
13
  class PlantBook extends EBook {
15
-
16
14
  #taxa;
17
15
  #glossary;
18
16
  #images;
19
17
 
20
- constructor( outputDir, config, taxa ) {
21
-
18
+ /**
19
+ *
20
+ * @param {string} outputDir
21
+ * @param {*} config
22
+ * @param {Taxa} taxa
23
+ */
24
+ constructor(outputDir, config, taxa) {
22
25
  super(
23
26
  outputDir,
24
- config.getConfigValue( "ebook", "filename" ),
25
- config.getConfigValue( "ebook", "pub_id" ),
26
- config.getConfigValue( "ebook", "title" )
27
+ config.getConfigValue("ebook", "filename"),
28
+ config.getConfigValue("ebook", "pub_id"),
29
+ config.getConfigValue("ebook", "title")
27
30
  );
28
31
 
29
32
  this.#taxa = taxa;
30
- const generator = new EBookSiteGenerator( this.getContentDir() );
31
- this.#glossary = new GlossaryPages( generator );
32
- this.#images = new Images( generator, this.getContentDir(), taxa );
33
-
33
+ const generator = new EBookSiteGenerator(this.getContentDir());
34
+ this.#glossary = new GlossaryPages(generator);
35
+ this.#images = new Images(generator, this.getContentDir(), taxa);
34
36
  }
35
37
 
36
38
  async createPages() {
37
-
38
39
  const contentDir = this.getContentDir();
39
40
 
40
- await this.#images.createImages( contentDir );
41
+ await this.#images.createImages();
41
42
 
42
- console.log( "creating taxon pages" );
43
+ console.log("creating taxon pages");
43
44
  const taxonList = this.#taxa.getTaxonList();
44
- for ( const taxon of taxonList ) {
45
+ for (const taxon of taxonList) {
45
46
  const name = taxon.getName();
46
- new TaxonPage( contentDir, taxon, this.#images.getTaxonImages( name ) ).create();
47
+ new TaxonPage(
48
+ contentDir,
49
+ taxon,
50
+ this.#images.getTaxonImages(name)
51
+ ).create();
47
52
  }
48
53
 
49
54
  // Create lists.
50
- for ( const colorName of Taxa.getFlowerColorNames() ) {
51
- new PageListFlowerColor( contentDir, this.#taxa.getFlowerColor( colorName ) ).create();
55
+ for (const colorName of Taxa.getFlowerColorNames()) {
56
+ new PageListFlowerColor(
57
+ contentDir,
58
+ this.#taxa.getFlowerColor(colorName)
59
+ ).create();
52
60
  }
53
61
 
54
- PageListFlowers.createPages( contentDir, this.#taxa );
62
+ PageListFlowers.createPages(contentDir, this.#taxa);
55
63
 
56
- new PageListFamilies( contentDir ).create();
57
- for ( const family of Families.getFamilies() ) {
64
+ new PageListFamilies(contentDir, this.#taxa.getFamilies()).create();
65
+ for (const family of this.#taxa.getFamilies().getFamilies()) {
58
66
  const taxa = family.getTaxa();
59
- if ( !taxa ) {
67
+ if (!taxa) {
60
68
  continue;
61
69
  }
62
70
  const name = family.getName();
63
- new PageListSpecies( contentDir, taxa, name + ".html", name ).create();
71
+ new PageListSpecies(
72
+ contentDir,
73
+ taxa,
74
+ name + ".html",
75
+ name
76
+ ).create();
64
77
  }
65
- new PageListSpecies( contentDir, taxonList, "list_species.html", "All Species" ).create();
78
+ new PageListSpecies(
79
+ contentDir,
80
+ taxonList,
81
+ "list_species.html",
82
+ "All Species"
83
+ ).create();
66
84
 
67
85
  this.#glossary.renderPages();
68
86
 
69
- new TOCPage( contentDir ).create();
87
+ new TOCPage(contentDir).create();
70
88
  }
71
89
 
72
90
  renderManifestEntries() {
73
-
74
91
  let xml = "";
75
92
 
76
93
  // Add lists.
77
- xml += "<item id=\"lspecies\" href=\"list_species.html\" media-type=\"application/xhtml+xml\" />";
78
- xml += "<item id=\"lfamilies\" href=\"list_families.html\" media-type=\"application/xhtml+xml\" />";
79
- for ( const colorName of Taxa.getFlowerColorNames() ) {
80
- const color = this.#taxa.getFlowerColor( colorName );
81
- xml += "<item id=\"l" + color.getColorName() + "\" href=\"" + color.getFileName() + "\" media-type=\"application/xhtml+xml\" />";
94
+ xml +=
95
+ '<item id="lspecies" href="list_species.html" media-type="application/xhtml+xml" />';
96
+ xml +=
97
+ '<item id="lfamilies" href="list_families.html" media-type="application/xhtml+xml" />';
98
+ for (const colorName of Taxa.getFlowerColorNames()) {
99
+ const color = this.#taxa.getFlowerColor(colorName);
100
+ xml +=
101
+ '<item id="l' +
102
+ color.getColorName() +
103
+ '" href="' +
104
+ color.getFileName() +
105
+ '" media-type="application/xhtml+xml" />';
82
106
  }
83
107
 
84
108
  // Add family pages.
85
- for ( const family of Families.getFamilies() ) {
109
+ for (const family of this.#taxa.getFamilies().getFamilies()) {
86
110
  const taxa = family.getTaxa();
87
- if ( !taxa ) {
111
+ if (!taxa) {
88
112
  continue;
89
113
  }
90
- xml += "<item id=\"fam" + family.getName() + "\" href=\"" + family.getFileName() + "\" media-type=\"application/xhtml+xml\" />";
114
+ xml +=
115
+ '<item id="fam' +
116
+ family.getName() +
117
+ '" href="' +
118
+ family.getFileName() +
119
+ '" media-type="application/xhtml+xml" />';
91
120
  }
92
121
 
93
122
  // Add taxon pages.
94
123
  const taxa = this.#taxa.getTaxonList();
95
- for ( let index = 0; index < taxa.length; index++ ) {
96
- const taxon = taxa[ index ];
97
- xml += "<item id=\"t" + index + "\" href=\"" + taxon.getFileName() + "\" media-type=\"application/xhtml+xml\" />";
124
+ for (let index = 0; index < taxa.length; index++) {
125
+ const taxon = taxa[index];
126
+ xml +=
127
+ '<item id="t' +
128
+ index +
129
+ '" href="' +
130
+ taxon.getFileName() +
131
+ '" media-type="application/xhtml+xml" />';
98
132
  }
99
133
 
100
134
  xml += PageListFlowers.getManifestEntries();
@@ -108,27 +142,27 @@ class PlantBook extends EBook {
108
142
  let xml = "";
109
143
 
110
144
  // Add lists.
111
- for ( const colorName of Taxa.getFlowerColorNames() ) {
112
- const color = this.#taxa.getFlowerColor( colorName );
113
- xml += "<itemref idref=\"l" + color.getColorName() + "\"/>";
145
+ for (const colorName of Taxa.getFlowerColorNames()) {
146
+ const color = this.#taxa.getFlowerColor(colorName);
147
+ xml += '<itemref idref="l' + color.getColorName() + '"/>';
114
148
  }
115
149
  xml += PageListFlowers.getSpineEntries();
116
150
 
117
- xml += "<itemref idref=\"lfamilies\"/>";
118
- xml += "<itemref idref=\"lspecies\"/>";
151
+ xml += '<itemref idref="lfamilies"/>';
152
+ xml += '<itemref idref="lspecies"/>';
119
153
 
120
154
  // Add families.
121
- for ( const family of Families.getFamilies() ) {
155
+ for (const family of this.#taxa.getFamilies().getFamilies()) {
122
156
  const taxa = family.getTaxa();
123
- if ( !taxa ) {
157
+ if (!taxa) {
124
158
  continue;
125
159
  }
126
- xml += "<itemref idref=\"fam" + family.getName() + "\"/>";
160
+ xml += '<itemref idref="fam' + family.getName() + '"/>';
127
161
  }
128
162
 
129
163
  // Add taxa.
130
- for ( let index = 0; index < this.#taxa.getTaxonList().length; index++ ) {
131
- xml += "<itemref idref=\"t" + index + "\"/>";
164
+ for (let index = 0; index < this.#taxa.getTaxonList().length; index++) {
165
+ xml += '<itemref idref="t' + index + '"/>';
132
166
  }
133
167
 
134
168
  xml += this.#glossary.getSpineEntries();
@@ -137,4 +171,4 @@ class PlantBook extends EBook {
137
171
  }
138
172
  }
139
173
 
140
- export { PlantBook };
174
+ export { PlantBook };
package/lib/families.js CHANGED
@@ -57,9 +57,9 @@ class Family {
57
57
  }
58
58
 
59
59
  class Families {
60
- static #families;
60
+ #families;
61
61
 
62
- static {
62
+ constructor() {
63
63
  const dataDir = Config.getPackageDir() + "/data";
64
64
 
65
65
  this.#families = JSON.parse(Files.read(dataDir + "/families.json"));
@@ -68,7 +68,7 @@ class Families {
68
68
  }
69
69
  }
70
70
 
71
- static getFamilies() {
71
+ getFamilies() {
72
72
  return Object.values(this.#families).sort((a, b) =>
73
73
  a.getName().localeCompare(b.getName())
74
74
  );
@@ -77,7 +77,7 @@ class Families {
77
77
  /**
78
78
  * @param {string} familyName
79
79
  */
80
- static getFamily(familyName) {
80
+ getFamily(familyName) {
81
81
  return this.#families[familyName];
82
82
  }
83
83
 
@@ -85,7 +85,7 @@ class Families {
85
85
  * @param {string} outputDir
86
86
  * @param {import("./index.js").TaxaCol[]} taxaColumns
87
87
  */
88
- static renderPages(outputDir, taxaColumns) {
88
+ renderPages(outputDir, taxaColumns) {
89
89
  new PageFamilyList(outputDir, this.#families).render(taxaColumns);
90
90
 
91
91
  const names = Object.keys(this.#families);
@@ -209,9 +209,6 @@ class PageSection extends GenericPage {
209
209
  this.#taxa = taxa;
210
210
  }
211
211
 
212
- /**
213
- * @param {import("./index.js").TaxaCol[]} columns
214
- */
215
212
  render(columns) {
216
213
  let html = this.getDefaultIntro();
217
214