@ca-plant-list/ca-plant-list 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.
Files changed (70) hide show
  1. package/.vscode/settings.json +4 -2
  2. package/data/exceptions.json +0 -3
  3. package/data/glossary/calyx.md +1 -0
  4. package/data/glossary/ovary.md +3 -0
  5. package/data/glossary/pedicel.md +1 -0
  6. package/data/glossary/pistil.md +3 -0
  7. package/data/glossary/sepal.md +1 -0
  8. package/data/glossary/stigma.md +3 -0
  9. package/data/glossary/style.md +3 -0
  10. package/data/illustrations/inkscape/pistil.svg +156 -0
  11. package/data/synonyms.csv +8 -3
  12. package/data/taxa.csv +77 -72
  13. package/data/text/Calochortus-argillosus.md +1 -0
  14. package/data/text/Calochortus-luteus.md +1 -0
  15. package/data/text/Calochortus-venustus.md +1 -0
  16. package/data/text/Ceanothus-cuneatus-var-cuneatus.md +1 -0
  17. package/data/text/Ceanothus-leucodermis.md +1 -0
  18. package/data/text/Claytonia-parviflora.md +1 -0
  19. package/data/text/Claytonia-perfoliata.md +1 -0
  20. package/data/text/Collinsia-heterophylla-var-heterophylla.md +1 -0
  21. package/data/text/Delphinium-californicum-subsp-californicum.md +1 -0
  22. package/data/text/Delphinium-decorum-subsp-decorum.md +1 -0
  23. package/data/text/Delphinium-hesperium-subsp-hesperium.md +1 -0
  24. package/data/text/Delphinium-patens-subsp-patens.md +1 -0
  25. package/data/text/Galium-andrewsii-subsp-gatense.md +1 -0
  26. package/data/text/Helianthella-californica-var-californica.md +1 -0
  27. package/data/text/Helianthella-castanea.md +1 -0
  28. package/data/text/Iris-macrosiphon.md +1 -0
  29. package/data/text/Lasthenia-californica-subsp-californica.md +1 -0
  30. package/data/text/Lasthenia-gracilis.md +1 -0
  31. package/data/text/Leptosiphon-ambiguus.md +1 -0
  32. package/data/text/Leptosiphon-androsaceus.md +1 -0
  33. package/data/text/Leptosiphon-bicolor.md +1 -1
  34. package/data/text/Leptosiphon-parviflorus.md +1 -0
  35. package/data/text/Lithophragma-affine.md +1 -1
  36. package/data/text/Lithophragma-parviflorum-var-parviflorum.md +1 -1
  37. package/data/text/Lomatium-californicum.md +0 -0
  38. package/data/text/Lomatium-dasycarpum-subsp-dasycarpum.md +1 -0
  39. package/data/text/Lomatium-utriculatum.md +1 -0
  40. package/data/text/Nemophila-heterophylla.md +1 -0
  41. package/data/text/Nemophila-parviflora-var-parviflora.md +1 -0
  42. package/data/text/Plectritis-ciliosa.md +1 -0
  43. package/data/text/Plectritis-macrocera.md +1 -0
  44. package/data/text/Primula-clevelandii-var-patula.md +1 -0
  45. package/data/text/Primula-hendersonii.md +1 -0
  46. package/data/text/Sidalcea-diploscypha.md +1 -0
  47. package/data/text/Thysanocarpus-curvipes.md +1 -0
  48. package/data/text/Thysanocarpus-laciniatus.md +1 -0
  49. package/data/text/Viola-douglasii.md +1 -0
  50. package/data/text/Viola-pedunculata.md +1 -0
  51. package/data/text/Viola-purpurea-subsp-quercetorum.md +1 -0
  52. package/ebook/css/main.css +5 -0
  53. package/lib/basepagerenderer.js +30 -29
  54. package/lib/dateutils.js +36 -16
  55. package/lib/ebook/pages/page_list_families.js +15 -9
  56. package/lib/ebook/pages/taxonpage.js +63 -36
  57. package/lib/ebook/plantbook.js +82 -48
  58. package/lib/errorlog.js +16 -11
  59. package/lib/families.js +109 -74
  60. package/lib/files.js +103 -45
  61. package/lib/genera.js +40 -26
  62. package/lib/generictaxaloader.js +15 -7
  63. package/lib/index.js +38 -3
  64. package/lib/taxa.js +174 -87
  65. package/lib/taxaloader.js +28 -15
  66. package/lib/taxaprocessor.js +6 -8
  67. package/lib/taxon.js +115 -57
  68. package/package.json +4 -6
  69. package/scripts/build-ebook.js +33 -25
  70. package/lib/index.d.ts +0 -345
package/lib/index.d.ts DELETED
@@ -1,345 +0,0 @@
1
- export class BasePageRenderer {
2
- static render(outputDir: any, taxa: any, familyCols: any): void;
3
- static renderTools(outputDir: any, taxa: any): void;
4
- }
5
- export class CommandAndTaxaProcessor extends CommandProcessor {
6
- constructor(commandName: any, commandDesc: any, optionDefs: any[], optionHelp: any[], commandHelp: any[], taxaLoaderClass: any);
7
- process(commandRunner: any): Promise<void>;
8
- #private;
9
- }
10
- import { CommandProcessor } from "./commandprocessor.js";
11
- export class CommandProcessor {
12
- /**
13
- * @param {String} commandName
14
- * @param {String} commandDesc
15
- * @param {*} optionDefs An array of command line options to be added to the standard options.
16
- * @param {*} optionHelp An array of help descriptions to be added to the standard options in the first section.
17
- * @param {*} commandHelp An array of help sections to be appended to the first option section in the help display.
18
- */
19
- constructor(commandName: string, commandDesc: string, optionDefs?: any, optionHelp?: any, commandHelp?: any);
20
- getOptions(): any;
21
- helpShown(): boolean;
22
- showHelp(): void;
23
- #private;
24
- }
25
- export class Config {
26
- static "__#1@#packageDir": string;
27
- static getPackageDir(): string;
28
- constructor(dataDir: any);
29
- getConfigValue(prefix: any, name: any, subcat: any, dflt: any): any;
30
- getCountyCodes(): any;
31
- getLabel(name: any, dflt: any): any;
32
- #private;
33
- }
34
- export class CSV {
35
- static getMap(dir: any, fileName: any): {};
36
- static "__#8@#getOptions"(fileName: any, columns: any, delimiter: any): {
37
- relax_column_count_less: boolean;
38
- };
39
- /**
40
- * @param {string} dir
41
- * @param {string} fileName
42
- * @param {boolean|undefined} [columns]
43
- * @param {string|undefined} [delimiter]
44
- */
45
- static parseFile(dir: string, fileName: string, columns?: boolean | undefined, delimiter?: string | undefined): any;
46
- /**
47
- * @param {string} dir
48
- * @param {string} fileName
49
- * @param {boolean|undefined} columns
50
- * @param {string|undefined} delimiter
51
- * @param {*} callback
52
- */
53
- static parseStream(dir: string, fileName: string, columns: boolean | undefined, delimiter: string | undefined, callback: any): Promise<void>;
54
- }
55
- export class DateUtils {
56
- static getMonthName(monthNum: any): string;
57
- static monthRangesOverlap(r1: any, r2: any): any;
58
- }
59
- export class ErrorLog {
60
- constructor(fileName: any, echo?: boolean);
61
- log(...args: any[]): void;
62
- write(): void;
63
- #private;
64
- }
65
- export class Exceptions {
66
- constructor(dir: any);
67
- getExceptions(): [string, any][];
68
- getValue(name: any, cat: any, subcat: any, defaultValue: any): any;
69
- hasException(name: any, cat: any, subcat: any): boolean;
70
- #private;
71
- }
72
- export class Families {
73
- static "__#12@#families": any;
74
- static getFamilies(): any[];
75
- static getFamily(familyName: any): any;
76
- static renderPages(outputDir: any, taxaColumns: any): void;
77
- }
78
- export class Files {
79
- static copyDir(srcDir: any, targetDir: any): void;
80
- static createFileFromStream(fileName: any, inStream: any): Promise<any>;
81
- static exists(path: any): boolean;
82
- /**
83
- * Retrieve data from a URL and write it to a file. If the response status is anything other than 200, an Error is thrown.
84
- * @param {string|URL} url
85
- * @param {string|undefined} targetFileName If targetFileName is undefined, the data will be retrieved but not written to a file.
86
- * @param {Object} [headers={}] Request Headers.
87
- * @returns {Promise<Headers>} The Response headers.
88
- */
89
- static fetch(url: string | URL, targetFileName: string | undefined, headers?: any): Promise<Headers>;
90
- static getDirEntries(path: any): string[];
91
- static isDir(path: any): boolean;
92
- static join(...paths: any[]): any;
93
- static mkdir(path: any): void;
94
- static read(path: any): string;
95
- static rmDir(dir: any): void;
96
- static write(path: any, data: any, overwrite?: boolean): void;
97
- static zipFileExtract(zipFilePath: any, fileNameToUnzip: any, targetFilePath: any): Promise<void>;
98
- }
99
- export class Genera {
100
- static "__#5@#genera": any;
101
- static addTaxon(taxon: any): void;
102
- static getGenus(genusName: any): Genus;
103
- static getFamily(genusName: any): any;
104
- }
105
- declare class Genus {
106
- constructor(data: any);
107
- getTaxa(): any;
108
- #private;
109
- }
110
- export {};
111
- export class GenericPage {
112
- constructor(outputDir: any, title: any, baseFileName: any, js: any);
113
- getBaseFileName(): any;
114
- getDefaultIntro(): string;
115
- getFrontMatter(): string;
116
- getMarkdown(): any;
117
- getOutputDir(): any;
118
- getTitle(): any;
119
- writeFile(html: any): void;
120
- #private;
121
- }
122
- export class GenericTaxaLoader {
123
- constructor(options: any);
124
- getErrorLog(): ErrorLog;
125
- getOptions(): any;
126
- getTaxa(): any;
127
- load(): Promise<void>;
128
- loadTaxa(): Promise<void>;
129
- writeErrorLog(): void;
130
- #private;
131
- }
132
- import { ErrorLog } from "./errorlog.js";
133
- export namespace HTML_OPTIONS {
134
- let OPEN_NEW: number;
135
- let NO_ESCAPE: number;
136
- }
137
- /** HTML utility functions. */
138
- export class HTML {
139
- static arrayToLI(items: any): any;
140
- static escapeAttribute(value: any): any;
141
- static escapeText(text: any): any;
142
- /**
143
- * @deprecated
144
- */
145
- static getElement(elName: any, text: any, attributes?: {}, options?: number): string;
146
- static "__#4@#getElement"(elName: any, text: any, attributes: any, escape: any): string;
147
- /**
148
- * Generate HTML for an &lt;a> element.
149
- * @param {string|undefined} href
150
- * @param {string} linkText
151
- * @param {Object} [attributes]
152
- * @param {boolean} [openInNewWindow] true if the link should open in a new window.
153
- * @returns {string} an HTML &lt;a> element.
154
- */
155
- static getLink(href: string | undefined, linkText: string, attributes?: any, openInNewWindow?: boolean): string;
156
- /**
157
- * Get a Bootstrap formatted tooltip element.
158
- * @param {string} text - The text or HTML that should trigger the tooltip on hover.
159
- * @param {string} tooltip - The tooltip text or HTML.
160
- * @param {Object} options
161
- * @param {boolean} options.icon [true] display an icon after the text
162
- * @returns {string} A &lt;span> element to be used as a Bootstrap tooltip.
163
- */
164
- static getToolTip(text: string, tooltip: string, options?: {
165
- icon: boolean;
166
- }): string;
167
- static renderAttribute(n: any, v: any): string;
168
- static renderAttributes(attributes: any): string;
169
- static textElement(elName: any, text: any, attributes?: {}): string;
170
- static wrap(elName: any, text: any, attributes?: {}): string;
171
- }
172
- import { BasePageRenderer } from "./basepagerenderer.js";
173
- import { CommandProcessor } from "./commandprocessor.js";
174
- import { CommandAndTaxaProcessor } from "./commandandtaxaprocessor.js";
175
- import { Config } from "./config.js";
176
- import { CSV } from "./csv.js";
177
- import { ErrorLog } from "./errorlog.js";
178
- import { Exceptions } from "./exceptions.js";
179
- import { Families } from "./families.js";
180
- import { Files } from "./files.js";
181
- import { GenericTaxaLoader } from "./generictaxaloader.js";
182
- import { HTML } from "./html.js";
183
- import { Jekyll } from "./jekyll.js";
184
- import { PlantBook } from "./ebook/plantbook.js";
185
- import { Taxa } from "./taxa.js";
186
- import { TaxaLoader } from "./taxaloader.js";
187
- import { TaxaProcessor } from "./taxaprocessor.js";
188
- import { TAXA_COLNAMES } from "./taxon.js";
189
- import { Taxon } from "./taxon.js";
190
- export { BasePageRenderer, CommandProcessor, CommandAndTaxaProcessor, Config, CSV, ErrorLog, Exceptions, Families, Files, GenericTaxaLoader, HTML, Jekyll, PlantBook, Taxa, TaxaLoader, TaxaProcessor, TAXA_COLNAMES, Taxon };
191
- export class Jekyll extends SiteGenerator {
192
- static getFrontMatter(atts: any): string;
193
- static hasInclude(baseDir: any, path: any): boolean;
194
- static include(path: any): string;
195
- static writeInclude(baseDir: any, path: any, data: any): void;
196
- writeTemplate(content: any, attributes: any, filename: any): void;
197
- }
198
- import { SiteGenerator } from "./sitegenerator.js";
199
- export class Jepson {
200
- static getEFloraLink(id: any): string;
201
- }
202
- export class Markdown {
203
- static "__#2@#md": any;
204
- static fileToHTML(filePath: any): any;
205
- static strToHTML(str: any): any;
206
- }
207
- export class RarePlants {
208
- static getCESADescription(cesa: any): any;
209
- static getFESADescription(fesa: any): any;
210
- static getRPIRankDescription(rank: any): any;
211
- static getRPIRankAndThreatDescriptions(rank: any): any[];
212
- }
213
- export class SiteGenerator {
214
- constructor(baseDir: any);
215
- copyIllustrations(flowerColors: any): void;
216
- getBaseDir(): any;
217
- mkdir(path: any): void;
218
- #private;
219
- }
220
- export class Taxa {
221
- static getHTMLTable(taxa: any, columns?: {
222
- title: string;
223
- data: (t: any) => any;
224
- }[]): string;
225
- static getFlowerColorNames(): string[];
226
- static getFlowerColors(): {
227
- name: string;
228
- color: string;
229
- }[];
230
- constructor(inclusionList: any, errorLog: any, showFlowerErrors: any, taxaMeta?: {}, taxonClass?: typeof Taxon, extraTaxa?: any[], extraSynonyms?: any[]);
231
- getFlowerColor(name: any): any;
232
- getTaxon(name: any): any;
233
- getTaxonList(): any[];
234
- hasSynonym(formerName: any): boolean;
235
- /**
236
- * true if an inclusion list was supplied when reading the taxa.
237
- * @returns {boolean}
238
- */
239
- isSubset(): boolean;
240
- #private;
241
- }
242
- export namespace TAXA_LIST_COLS {
243
- namespace CESA {
244
- let title: string;
245
- function data(t: any): any;
246
- }
247
- namespace COMMON_NAME {
248
- let title_1: string;
249
- export { title_1 as title };
250
- export function data_1(t: any): any;
251
- export { data_1 as data };
252
- }
253
- namespace CNPS_RANK {
254
- let title_2: string;
255
- export { title_2 as title };
256
- export function data_2(t: any): string;
257
- export { data_2 as data };
258
- }
259
- namespace FESA {
260
- let title_3: string;
261
- export { title_3 as title };
262
- export function data_3(t: any): any;
263
- export { data_3 as data };
264
- }
265
- namespace SPECIES {
266
- let title_4: string;
267
- export { title_4 as title };
268
- export function data_4(t: any): any;
269
- export { data_4 as data };
270
- }
271
- namespace SPECIES_BARE {
272
- let title_5: string;
273
- export { title_5 as title };
274
- export function data_5(t: any): any;
275
- export { data_5 as data };
276
- }
277
- }
278
- import { Taxon } from "./taxon.js";
279
- export class TaxaLoader extends GenericTaxaLoader {
280
- loadTaxa(): Promise<Taxa>;
281
- }
282
- import { GenericTaxaLoader } from "./generictaxaloader.js";
283
- import { Taxa } from "./taxa.js";
284
- export class TaxaProcessor {
285
- constructor(options: any, taxaLoaderClass?: typeof TaxaLoader);
286
- getErrorLog(): any;
287
- getOptions(): any;
288
- getTaxa(): any;
289
- process(commandRunner: any): Promise<void>;
290
- #private;
291
- }
292
- import { TaxaLoader } from "./taxaloader.js";
293
- export namespace TAXA_COLNAMES {
294
- let BLOOM_START: string;
295
- let BLOOM_END: string;
296
- let COMMON_NAME: string;
297
- let FLOWER_COLOR: string;
298
- }
299
- export class Taxon {
300
- constructor(data: any);
301
- addSynonym(syn: any, type: any): void;
302
- getBaseFileName(): any;
303
- getBloomEnd(): any;
304
- getBloomStart(): any;
305
- getCalfloraName(): any;
306
- getCalfloraID(): any;
307
- getCalfloraTaxonLink(): string;
308
- getCESA(): any;
309
- getCNDDBRank(): any;
310
- getCommonNames(): any;
311
- getFamily(): any;
312
- getFESA(): any;
313
- getFileName(ext?: string): string;
314
- getFlowerColors(): any;
315
- getGenus(): {
316
- "__#6@#data": any;
317
- getTaxa(): any;
318
- };
319
- getGenusName(): any;
320
- getGlobalRank(): any;
321
- getHTMLLink(href?: boolean, includeRPI?: boolean): string;
322
- getINatID(): any;
323
- getINatName(): any;
324
- getINatSyn(): any;
325
- getINatTaxonLink(): string;
326
- getJepsonID(): any;
327
- getName(): any;
328
- getRPIID(): any;
329
- getRPIRank(): any;
330
- getRPIRankAndThreat(): any;
331
- getRPIRankAndThreatTooltip(): string;
332
- getRPITaxonLink(): string;
333
- getStatus(): any;
334
- getStatusDescription(config: any): any;
335
- getSynonyms(): any[];
336
- isCANative(): boolean;
337
- /**
338
- * Determine whether a species is a local native.
339
- * @returns {boolean} true if taxon is a local native; false if not a CA native, or native elsewhere in CA.
340
- */
341
- isNative(): boolean;
342
- isRare(): boolean;
343
- shouldHaveFlowers(): boolean;
344
- #private;
345
- }