react-cheminfo 0.140.1 → 0.141.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +14 -8
- package/lib/citation/core/citationMarkup.d.ts +14 -0
- package/lib/citation/core/citationMarkup.d.ts.map +1 -0
- package/lib/citation/core/citationMarkup.js +27 -0
- package/lib/citation/core/citationMarkup.js.map +1 -0
- package/lib/citation/core/clipboard.d.ts +7 -6
- package/lib/citation/core/clipboard.d.ts.map +1 -1
- package/lib/citation/core/clipboard.js +19 -14
- package/lib/citation/core/clipboard.js.map +1 -1
- package/lib/citation/core/download.d.ts +4 -2
- package/lib/citation/core/download.d.ts.map +1 -1
- package/lib/citation/core/download.js +5 -3
- package/lib/citation/core/download.js.map +1 -1
- package/lib/citation/core/formats.d.ts +14 -3
- package/lib/citation/core/formats.d.ts.map +1 -1
- package/lib/citation/core/formats.js +31 -13
- package/lib/citation/core/formats.js.map +1 -1
- package/lib/citation/core/index.d.ts +3 -3
- package/lib/citation/core/index.d.ts.map +1 -1
- package/lib/citation/core/index.js +2 -2
- package/lib/citation/core/index.js.map +1 -1
- package/lib/citation/core/reference.d.ts +15 -0
- package/lib/citation/core/reference.d.ts.map +1 -1
- package/lib/citation/core/reference.js +24 -0
- package/lib/citation/core/reference.js.map +1 -1
- package/lib/citation/core/styles.d.ts +35 -0
- package/lib/citation/core/styles.d.ts.map +1 -0
- package/lib/citation/core/styles.js +21 -0
- package/lib/citation/core/styles.js.map +1 -0
- package/lib/citation/core/works.d.ts +2 -3
- package/lib/citation/core/works.d.ts.map +1 -1
- package/lib/citation/core/works.js +5 -6
- package/lib/citation/core/works.js.map +1 -1
- package/lib/citation/ui/CitationHtml.d.ts +13 -0
- package/lib/citation/ui/CitationHtml.d.ts.map +1 -0
- package/lib/citation/ui/CitationHtml.js +42 -0
- package/lib/citation/ui/CitationHtml.js.map +1 -0
- package/lib/citation/ui/CitationPreview.d.ts +7 -4
- package/lib/citation/ui/CitationPreview.d.ts.map +1 -1
- package/lib/citation/ui/CitationPreview.js +17 -21
- package/lib/citation/ui/CitationPreview.js.map +1 -1
- package/lib/citation/ui/CopyFormatEntries.js +1 -1
- package/lib/citation/ui/CopyFormatEntries.js.map +1 -1
- package/lib/citation/ui/entries.d.ts +1 -1
- package/lib/citation/ui/entries.d.ts.map +1 -1
- package/lib/citation/ui/entries.js +1 -1
- package/lib/citation/ui/entries.js.map +1 -1
- package/lib/citation/ui/useCopyFeedback.d.ts +1 -2
- package/lib/citation/ui/useCopyFeedback.d.ts.map +1 -1
- package/lib/citation/ui/useCopyFeedback.js.map +1 -1
- package/lib/credits/core/credits.d.ts +13 -0
- package/lib/credits/core/credits.d.ts.map +1 -1
- package/lib/credits/core/credits.js +17 -0
- package/lib/credits/core/credits.js.map +1 -1
- package/lib/csl/core/cslItems.d.ts +97 -0
- package/lib/csl/core/cslItems.d.ts.map +1 -0
- package/lib/csl/core/cslItems.js +166 -0
- package/lib/csl/core/cslItems.js.map +1 -0
- package/lib/csl/core/cslStyles.d.ts +30 -0
- package/lib/csl/core/cslStyles.d.ts.map +1 -0
- package/lib/csl/core/cslStyles.js +48 -0
- package/lib/csl/core/cslStyles.js.map +1 -0
- package/lib/csl/core/formatCsl.d.ts +35 -0
- package/lib/csl/core/formatCsl.d.ts.map +1 -0
- package/lib/csl/core/formatCsl.js +100 -0
- package/lib/csl/core/formatCsl.js.map +1 -0
- package/lib/csl/core/referenceItem.d.ts +14 -0
- package/lib/csl/core/referenceItem.d.ts.map +1 -0
- package/lib/csl/core/referenceItem.js +60 -0
- package/lib/csl/core/referenceItem.js.map +1 -0
- package/lib/csl/core/styles/americanChemicalSociety.d.ts +8 -0
- package/lib/csl/core/styles/americanChemicalSociety.d.ts.map +1 -0
- package/lib/csl/core/styles/americanChemicalSociety.js +311 -0
- package/lib/csl/core/styles/americanChemicalSociety.js.map +1 -0
- package/lib/csl/core/styles/americanInstituteOfPhysics.d.ts +8 -0
- package/lib/csl/core/styles/americanInstituteOfPhysics.d.ts.map +1 -0
- package/lib/csl/core/styles/americanInstituteOfPhysics.js +172 -0
- package/lib/csl/core/styles/americanInstituteOfPhysics.js.map +1 -0
- package/lib/csl/core/styles/americanMathematicalSocietyNumeric.d.ts +8 -0
- package/lib/csl/core/styles/americanMathematicalSocietyNumeric.d.ts.map +1 -0
- package/lib/csl/core/styles/americanMathematicalSocietyNumeric.js +174 -0
- package/lib/csl/core/styles/americanMathematicalSocietyNumeric.js.map +1 -0
- package/lib/csl/core/styles/americanPhysicsSociety.d.ts +8 -0
- package/lib/csl/core/styles/americanPhysicsSociety.d.ts.map +1 -0
- package/lib/csl/core/styles/americanPhysicsSociety.js +227 -0
- package/lib/csl/core/styles/americanPhysicsSociety.js.map +1 -0
- package/lib/csl/core/styles/angewandteChemie.d.ts +8 -0
- package/lib/csl/core/styles/angewandteChemie.d.ts.map +1 -0
- package/lib/csl/core/styles/angewandteChemie.js +187 -0
- package/lib/csl/core/styles/angewandteChemie.js.map +1 -0
- package/lib/csl/core/styles/beilsteinJournalOfOrganicChemistry.d.ts +8 -0
- package/lib/csl/core/styles/beilsteinJournalOfOrganicChemistry.d.ts.map +1 -0
- package/lib/csl/core/styles/beilsteinJournalOfOrganicChemistry.js +280 -0
- package/lib/csl/core/styles/beilsteinJournalOfOrganicChemistry.js.map +1 -0
- package/lib/csl/core/styles/elsevierWithTitles.d.ts +8 -0
- package/lib/csl/core/styles/elsevierWithTitles.d.ts.map +1 -0
- package/lib/csl/core/styles/elsevierWithTitles.js +156 -0
- package/lib/csl/core/styles/elsevierWithTitles.js.map +1 -0
- package/lib/csl/core/styles/helveticaChimicaActa.d.ts +8 -0
- package/lib/csl/core/styles/helveticaChimicaActa.d.ts.map +1 -0
- package/lib/csl/core/styles/helveticaChimicaActa.js +189 -0
- package/lib/csl/core/styles/helveticaChimicaActa.js.map +1 -0
- package/lib/csl/core/styles/ieee.d.ts +8 -0
- package/lib/csl/core/styles/ieee.d.ts.map +1 -0
- package/lib/csl/core/styles/ieee.js +527 -0
- package/lib/csl/core/styles/ieee.js.map +1 -0
- package/lib/csl/core/styles/instituteOfPhysicsNumeric.d.ts +8 -0
- package/lib/csl/core/styles/instituteOfPhysicsNumeric.d.ts.map +1 -0
- package/lib/csl/core/styles/instituteOfPhysicsNumeric.js +135 -0
- package/lib/csl/core/styles/instituteOfPhysicsNumeric.js.map +1 -0
- package/lib/csl/core/styles/localeEnUs.d.ts +8 -0
- package/lib/csl/core/styles/localeEnUs.d.ts.map +1 -0
- package/lib/csl/core/styles/localeEnUs.js +872 -0
- package/lib/csl/core/styles/localeEnUs.js.map +1 -0
- package/lib/csl/core/styles/nature.d.ts +8 -0
- package/lib/csl/core/styles/nature.d.ts.map +1 -0
- package/lib/csl/core/styles/nature.js +197 -0
- package/lib/csl/core/styles/nature.js.map +1 -0
- package/lib/csl/core/styles/royalSocietyOfChemistry.d.ts +8 -0
- package/lib/csl/core/styles/royalSocietyOfChemistry.d.ts.map +1 -0
- package/lib/csl/core/styles/royalSocietyOfChemistry.js +267 -0
- package/lib/csl/core/styles/royalSocietyOfChemistry.js.map +1 -0
- package/lib/csl/core/styles/springerMathphysBrackets.d.ts +8 -0
- package/lib/csl/core/styles/springerMathphysBrackets.d.ts.map +1 -0
- package/lib/csl/core/styles/springerMathphysBrackets.js +159 -0
- package/lib/csl/core/styles/springerMathphysBrackets.js.map +1 -0
- package/lib/csl/core/styles/springerPhysicsBrackets.d.ts +8 -0
- package/lib/csl/core/styles/springerPhysicsBrackets.d.ts.map +1 -0
- package/lib/csl/core/styles/springerPhysicsBrackets.js +166 -0
- package/lib/csl/core/styles/springerPhysicsBrackets.js.map +1 -0
- package/lib/csl/core/styles/styleLoaders.d.ts +6 -0
- package/lib/csl/core/styles/styleLoaders.d.ts.map +1 -0
- package/lib/csl/core/styles/styleLoaders.js +23 -0
- package/lib/csl/core/styles/styleLoaders.js.map +1 -0
- package/lib/csl/core/styles/synthesis.d.ts +8 -0
- package/lib/csl/core/styles/synthesis.d.ts.map +1 -0
- package/lib/csl/core/styles/synthesis.js +196 -0
- package/lib/csl/core/styles/synthesis.js.map +1 -0
- package/lib/csl/core/styles/tetrahedron.d.ts +8 -0
- package/lib/csl/core/styles/tetrahedron.d.ts.map +1 -0
- package/lib/csl/core/styles/tetrahedron.js +22 -0
- package/lib/csl/core/styles/tetrahedron.js.map +1 -0
- package/lib/csl.d.ts +17 -0
- package/lib/csl.d.ts.map +1 -0
- package/lib/csl.js +15 -0
- package/lib/csl.js.map +1 -0
- package/package.json +3 -1
- package/src/citation/core/citationMarkup.ts +28 -0
- package/src/citation/core/clipboard.ts +26 -17
- package/src/citation/core/download.ts +7 -5
- package/src/citation/core/formats.ts +41 -16
- package/src/citation/core/index.ts +3 -6
- package/src/citation/core/reference.ts +25 -0
- package/src/citation/core/styles.ts +34 -0
- package/src/citation/core/works.ts +7 -9
- package/src/citation/ui/CitationHtml.tsx +42 -0
- package/src/citation/ui/CitationPreview.tsx +36 -35
- package/src/citation/ui/CopyFormatEntries.tsx +1 -1
- package/src/citation/ui/entries.tsx +2 -2
- package/src/citation/ui/useCopyFeedback.ts +1 -2
- package/src/credits/core/credits.ts +17 -0
- package/src/csl/core/citeproc.d.ts +43 -0
- package/src/csl/core/cslItems.ts +208 -0
- package/src/csl/core/cslStyles.ts +52 -0
- package/src/csl/core/formatCsl.ts +135 -0
- package/src/csl/core/referenceItem.ts +75 -0
- package/src/csl/core/styles/americanChemicalSociety.ts +310 -0
- package/src/csl/core/styles/americanInstituteOfPhysics.ts +171 -0
- package/src/csl/core/styles/americanMathematicalSocietyNumeric.ts +173 -0
- package/src/csl/core/styles/americanPhysicsSociety.ts +226 -0
- package/src/csl/core/styles/angewandteChemie.ts +186 -0
- package/src/csl/core/styles/beilsteinJournalOfOrganicChemistry.ts +279 -0
- package/src/csl/core/styles/elsevierWithTitles.ts +155 -0
- package/src/csl/core/styles/helveticaChimicaActa.ts +188 -0
- package/src/csl/core/styles/ieee.ts +526 -0
- package/src/csl/core/styles/instituteOfPhysicsNumeric.ts +134 -0
- package/src/csl/core/styles/localeEnUs.ts +871 -0
- package/src/csl/core/styles/nature.ts +196 -0
- package/src/csl/core/styles/royalSocietyOfChemistry.ts +266 -0
- package/src/csl/core/styles/springerMathphysBrackets.ts +158 -0
- package/src/csl/core/styles/springerPhysicsBrackets.ts +165 -0
- package/src/csl/core/styles/styleLoaders.ts +38 -0
- package/src/csl/core/styles/synthesis.ts +195 -0
- package/src/csl/core/styles/tetrahedron.ts +21 -0
- package/src/csl.ts +31 -0
- package/lib/citation/core/render.d.ts +0 -21
- package/lib/citation/core/render.d.ts.map +0 -1
- package/lib/citation/core/render.js +0 -74
- package/lib/citation/core/render.js.map +0 -1
- package/lib/citation/core/segments.d.ts +0 -62
- package/lib/citation/core/segments.d.ts.map +0 -1
- package/lib/citation/core/segments.js +0 -210
- package/lib/citation/core/segments.js.map +0 -1
- package/src/citation/core/render.ts +0 -78
- package/src/citation/core/segments.ts +0 -254
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The CSL style `springer-physics-brackets`, as the Citation Style Language project publishes it
|
|
3
|
+
* (styles repository, commit 15ea57496883). Its `<rights>`
|
|
4
|
+
* element states its licence.
|
|
5
|
+
* Written by scripts/csl-styles.mjs: change the script, not this file.
|
|
6
|
+
*/
|
|
7
|
+
export const STYLE = `<?xml version="1.0" encoding="utf-8"?>
|
|
8
|
+
<style xmlns="http://purl.org/net/xbiblio/csl" class="in-text" version="1.0" demote-non-dropping-particle="sort-only" default-locale="en-US">
|
|
9
|
+
<info>
|
|
10
|
+
<title>Springer - Physics (numeric, brackets)</title>
|
|
11
|
+
<id>https://www.zotero.org/styles/springer-physics-brackets</id>
|
|
12
|
+
<link href="https://www.zotero.org/styles/springer-physics-brackets" rel="self"/>
|
|
13
|
+
<link href="https://www.zotero.org/styles/american-physics-society" rel="template"/>
|
|
14
|
+
<link href="https://www.springer.com/cda/content/document/cda_downloaddocument/manuscript-guidelines-1.0.pdf" rel="documentation"/>
|
|
15
|
+
<!-- This style corresponds to 'Springer Vancouver' in the pdf document 'Key Style Points' at this url -->
|
|
16
|
+
<link href="https://www.springer.com/cda/content/document/cda_downloaddocument/Key_Style_Points_1.0.pdf" rel="documentation"/>
|
|
17
|
+
<author>
|
|
18
|
+
<name>Charles Parnot</name>
|
|
19
|
+
<email>charles.parnot@gmail.com</email>
|
|
20
|
+
<uri>https://twitter.com/cparnot</uri>
|
|
21
|
+
</author>
|
|
22
|
+
<category citation-format="numeric"/>
|
|
23
|
+
<category field="physics"/>
|
|
24
|
+
<summary>This style is similar to American Physical Society (APS) and is used by a number of Springer publications.</summary>
|
|
25
|
+
<updated>2013-05-10T12:00:00+00:00</updated>
|
|
26
|
+
<rights license="https://creativecommons.org/licenses/by-sa/3.0/">This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 License</rights>
|
|
27
|
+
</info>
|
|
28
|
+
<macro name="author">
|
|
29
|
+
<names variable="author">
|
|
30
|
+
<name delimiter=", " initialize-with=". " and="text"/>
|
|
31
|
+
<label form="long" prefix=", " suffix=" "/>
|
|
32
|
+
<substitute>
|
|
33
|
+
<names variable="editor"/>
|
|
34
|
+
<names variable="translator"/>
|
|
35
|
+
</substitute>
|
|
36
|
+
</names>
|
|
37
|
+
</macro>
|
|
38
|
+
<macro name="editor">
|
|
39
|
+
<names variable="editor">
|
|
40
|
+
<label form="verb" suffix=" "/>
|
|
41
|
+
<name delimiter=", " initialize-with=". " and="text"/>
|
|
42
|
+
</names>
|
|
43
|
+
</macro>
|
|
44
|
+
<macro name="year-date">
|
|
45
|
+
<choose>
|
|
46
|
+
<if variable="issued">
|
|
47
|
+
<date variable="issued">
|
|
48
|
+
<date-part name="year"/>
|
|
49
|
+
</date>
|
|
50
|
+
</if>
|
|
51
|
+
<else>
|
|
52
|
+
<text term="no date" form="short"/>
|
|
53
|
+
</else>
|
|
54
|
+
</choose>
|
|
55
|
+
</macro>
|
|
56
|
+
<macro name="day-date">
|
|
57
|
+
<choose>
|
|
58
|
+
<if variable="issued">
|
|
59
|
+
<date variable="issued">
|
|
60
|
+
<date-part name="day" suffix=" "/>
|
|
61
|
+
<date-part name="month" form="long" suffix=" "/>
|
|
62
|
+
<date-part name="year"/>
|
|
63
|
+
</date>
|
|
64
|
+
</if>
|
|
65
|
+
<else>
|
|
66
|
+
<text term="no date" form="short"/>
|
|
67
|
+
</else>
|
|
68
|
+
</choose>
|
|
69
|
+
</macro>
|
|
70
|
+
<macro name="publisher">
|
|
71
|
+
<group prefix="(" suffix=")" delimiter=", ">
|
|
72
|
+
<text variable="publisher"/>
|
|
73
|
+
<text variable="publisher-place" text-case="title"/>
|
|
74
|
+
<text macro="year-date"/>
|
|
75
|
+
</group>
|
|
76
|
+
</macro>
|
|
77
|
+
<macro name="edition">
|
|
78
|
+
<choose>
|
|
79
|
+
<if is-numeric="edition">
|
|
80
|
+
<group delimiter=" ">
|
|
81
|
+
<number variable="edition" form="ordinal"/>
|
|
82
|
+
<text term="edition" form="short"/>
|
|
83
|
+
</group>
|
|
84
|
+
</if>
|
|
85
|
+
<else>
|
|
86
|
+
<text variable="edition"/>
|
|
87
|
+
</else>
|
|
88
|
+
</choose>
|
|
89
|
+
</macro>
|
|
90
|
+
<citation collapse="citation-number">
|
|
91
|
+
<sort>
|
|
92
|
+
<key variable="citation-number"/>
|
|
93
|
+
</sort>
|
|
94
|
+
<layout delimiter="," prefix="[" suffix="]">
|
|
95
|
+
<text variable="citation-number"/>
|
|
96
|
+
</layout>
|
|
97
|
+
</citation>
|
|
98
|
+
<bibliography entry-spacing="0">
|
|
99
|
+
<layout suffix=".">
|
|
100
|
+
<text variable="citation-number" suffix=". "/>
|
|
101
|
+
<text macro="author" suffix=", "/>
|
|
102
|
+
<choose>
|
|
103
|
+
<if type="bill book graphic legal_case legislation motion_picture report song" match="any">
|
|
104
|
+
<group delimiter=" ">
|
|
105
|
+
<group delimiter=", ">
|
|
106
|
+
<text variable="title" text-case="title" font-style="italic"/>
|
|
107
|
+
<text macro="edition"/>
|
|
108
|
+
</group>
|
|
109
|
+
<group delimiter=", ">
|
|
110
|
+
<text macro="publisher"/>
|
|
111
|
+
<group delimiter=" ">
|
|
112
|
+
<label variable="page" form="short"/>
|
|
113
|
+
<text variable="page"/>
|
|
114
|
+
</group>
|
|
115
|
+
</group>
|
|
116
|
+
</group>
|
|
117
|
+
</if>
|
|
118
|
+
<else-if type="chapter paper-conference" match="any">
|
|
119
|
+
<group delimiter=" ">
|
|
120
|
+
<text term="in"/>
|
|
121
|
+
<group delimiter=", ">
|
|
122
|
+
<text variable="container-title" form="short" text-case="title" font-style="italic"/>
|
|
123
|
+
<text macro="editor"/>
|
|
124
|
+
<text macro="edition"/>
|
|
125
|
+
</group>
|
|
126
|
+
<group delimiter=", ">
|
|
127
|
+
<text macro="publisher"/>
|
|
128
|
+
<group delimiter=" ">
|
|
129
|
+
<label variable="page" form="short"/>
|
|
130
|
+
<text variable="page"/>
|
|
131
|
+
</group>
|
|
132
|
+
</group>
|
|
133
|
+
</group>
|
|
134
|
+
</else-if>
|
|
135
|
+
<else-if type="patent">
|
|
136
|
+
<group delimiter=" ">
|
|
137
|
+
<text variable="number"/>
|
|
138
|
+
<text macro="day-date" prefix="(" suffix=")"/>
|
|
139
|
+
</group>
|
|
140
|
+
</else-if>
|
|
141
|
+
<else-if type="thesis">
|
|
142
|
+
<group delimiter=", ">
|
|
143
|
+
<text variable="title" text-case="title"/>
|
|
144
|
+
<text variable="genre"/>
|
|
145
|
+
<text variable="publisher"/>
|
|
146
|
+
<text macro="year-date"/>
|
|
147
|
+
</group>
|
|
148
|
+
</else-if>
|
|
149
|
+
<else>
|
|
150
|
+
<group delimiter=" ">
|
|
151
|
+
<text variable="container-title" form="short" text-case="title"/>
|
|
152
|
+
<group delimiter=", ">
|
|
153
|
+
<text variable="volume" font-weight="bold"/>
|
|
154
|
+
<group delimiter=" ">
|
|
155
|
+
<text variable="page-first" form="short"/>
|
|
156
|
+
<text macro="year-date" prefix="(" suffix=")"/>
|
|
157
|
+
</group>
|
|
158
|
+
</group>
|
|
159
|
+
</group>
|
|
160
|
+
</else>
|
|
161
|
+
</choose>
|
|
162
|
+
</layout>
|
|
163
|
+
</bibliography>
|
|
164
|
+
</style>
|
|
165
|
+
`;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Each style there is, loaded only when asked for.
|
|
3
|
+
* Written by scripts/csl-styles.mjs: change the script, not this file.
|
|
4
|
+
*/
|
|
5
|
+
export const STYLE_LOADERS: Readonly<Record<string, () => Promise<string>>> = {
|
|
6
|
+
'american-chemical-society': () =>
|
|
7
|
+
import('./americanChemicalSociety.ts').then((module) => module.STYLE),
|
|
8
|
+
'american-institute-of-physics': () =>
|
|
9
|
+
import('./americanInstituteOfPhysics.ts').then((module) => module.STYLE),
|
|
10
|
+
'american-mathematical-society-numeric': () =>
|
|
11
|
+
import('./americanMathematicalSocietyNumeric.ts').then(
|
|
12
|
+
(module) => module.STYLE,
|
|
13
|
+
),
|
|
14
|
+
'american-physics-society': () =>
|
|
15
|
+
import('./americanPhysicsSociety.ts').then((module) => module.STYLE),
|
|
16
|
+
'angewandte-chemie': () =>
|
|
17
|
+
import('./angewandteChemie.ts').then((module) => module.STYLE),
|
|
18
|
+
'beilstein-journal-of-organic-chemistry': () =>
|
|
19
|
+
import('./beilsteinJournalOfOrganicChemistry.ts').then(
|
|
20
|
+
(module) => module.STYLE,
|
|
21
|
+
),
|
|
22
|
+
'elsevier-with-titles': () =>
|
|
23
|
+
import('./elsevierWithTitles.ts').then((module) => module.STYLE),
|
|
24
|
+
'helvetica-chimica-acta': () =>
|
|
25
|
+
import('./helveticaChimicaActa.ts').then((module) => module.STYLE),
|
|
26
|
+
ieee: () => import('./ieee.ts').then((module) => module.STYLE),
|
|
27
|
+
'institute-of-physics-numeric': () =>
|
|
28
|
+
import('./instituteOfPhysicsNumeric.ts').then((module) => module.STYLE),
|
|
29
|
+
nature: () => import('./nature.ts').then((module) => module.STYLE),
|
|
30
|
+
'royal-society-of-chemistry': () =>
|
|
31
|
+
import('./royalSocietyOfChemistry.ts').then((module) => module.STYLE),
|
|
32
|
+
'springer-mathphys-brackets': () =>
|
|
33
|
+
import('./springerMathphysBrackets.ts').then((module) => module.STYLE),
|
|
34
|
+
'springer-physics-brackets': () =>
|
|
35
|
+
import('./springerPhysicsBrackets.ts').then((module) => module.STYLE),
|
|
36
|
+
synthesis: () => import('./synthesis.ts').then((module) => module.STYLE),
|
|
37
|
+
tetrahedron: () => import('./tetrahedron.ts').then((module) => module.STYLE),
|
|
38
|
+
};
|
|
@@ -0,0 +1,195 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The CSL style `synthesis`, as the Citation Style Language project publishes it
|
|
3
|
+
* (styles repository, commit 15ea57496883). Its `<rights>`
|
|
4
|
+
* element states its licence.
|
|
5
|
+
* Written by scripts/csl-styles.mjs: change the script, not this file.
|
|
6
|
+
*/
|
|
7
|
+
export const STYLE = `<?xml version="1.0" encoding="utf-8"?>
|
|
8
|
+
<style xmlns="http://purl.org/net/xbiblio/csl" class="in-text" version="1.0" demote-non-dropping-particle="sort-only" default-locale="en-US">
|
|
9
|
+
<info>
|
|
10
|
+
<title>Synthesis</title>
|
|
11
|
+
<id>https://www.zotero.org/styles/synthesis</id>
|
|
12
|
+
<link href="https://www.zotero.org/styles/synthesis" rel="self"/>
|
|
13
|
+
<link href="https://www.thieme.de/de/synthesis/author-guidelines-58874.htm" rel="documentation"/>
|
|
14
|
+
<author>
|
|
15
|
+
<name>Rodolpho C. Braga</name>
|
|
16
|
+
<email>rodolpho.braga@icloud.com</email>
|
|
17
|
+
</author>
|
|
18
|
+
<contributor>
|
|
19
|
+
<name>Kuldeep Singh</name>
|
|
20
|
+
<email>kuldeep@orgsyn.in</email>
|
|
21
|
+
</contributor>
|
|
22
|
+
<contributor>
|
|
23
|
+
<name>Patrick O'Brien</name>
|
|
24
|
+
</contributor>
|
|
25
|
+
<category citation-format="numeric"/>
|
|
26
|
+
<category field="chemistry"/>
|
|
27
|
+
<issn>0039-7881</issn>
|
|
28
|
+
<eissn>1437-210X</eissn>
|
|
29
|
+
<updated>2018-08-22T13:31:08+00:00</updated>
|
|
30
|
+
<rights license="https://creativecommons.org/licenses/by-sa/3.0/">This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 License</rights>
|
|
31
|
+
</info>
|
|
32
|
+
<macro name="editor">
|
|
33
|
+
<names variable="editor">
|
|
34
|
+
<name sort-separator=", " initialize-with=". " name-as-sort-order="all" delimiter="; " delimiter-precedes-last="always"/>
|
|
35
|
+
<label form="short" prefix=", " text-case="capitalize-first"/>
|
|
36
|
+
</names>
|
|
37
|
+
</macro>
|
|
38
|
+
<macro name="author">
|
|
39
|
+
<names variable="author">
|
|
40
|
+
<name delimiter="; " delimiter-precedes-last="always" initialize-with=". " name-as-sort-order="all"/>
|
|
41
|
+
<label form="short" prefix=", " text-case="capitalize-first"/>
|
|
42
|
+
</names>
|
|
43
|
+
</macro>
|
|
44
|
+
<macro name="publisher">
|
|
45
|
+
<group delimiter=": ">
|
|
46
|
+
<text variable="publisher"/>
|
|
47
|
+
<text variable="publisher-place"/>
|
|
48
|
+
</group>
|
|
49
|
+
</macro>
|
|
50
|
+
<macro name="volume">
|
|
51
|
+
<group delimiter=" ">
|
|
52
|
+
<text term="volume" form="short" text-case="capitalize-first"/>
|
|
53
|
+
<text variable="volume"/>
|
|
54
|
+
</group>
|
|
55
|
+
</macro>
|
|
56
|
+
<macro name="series">
|
|
57
|
+
<text variable="collection-title"/>
|
|
58
|
+
</macro>
|
|
59
|
+
<macro name="pages">
|
|
60
|
+
<text variable="page-first"/>
|
|
61
|
+
</macro>
|
|
62
|
+
<macro name="book-container">
|
|
63
|
+
<group delimiter=" ">
|
|
64
|
+
<text term="in" text-case="capitalize-first"/>
|
|
65
|
+
<text variable="container-title" font-style="italic"/>
|
|
66
|
+
</group>
|
|
67
|
+
</macro>
|
|
68
|
+
<macro name="issued">
|
|
69
|
+
<date variable="issued" delimiter=" ">
|
|
70
|
+
<date-part name="year"/>
|
|
71
|
+
</date>
|
|
72
|
+
</macro>
|
|
73
|
+
<macro name="full-issued">
|
|
74
|
+
<date variable="issued" delimiter=" ">
|
|
75
|
+
<date-part name="month" form="long" suffix=" "/>
|
|
76
|
+
<date-part name="day" suffix=", "/>
|
|
77
|
+
<date-part name="year"/>
|
|
78
|
+
</date>
|
|
79
|
+
</macro>
|
|
80
|
+
<macro name="edition">
|
|
81
|
+
<choose>
|
|
82
|
+
<if is-numeric="edition">
|
|
83
|
+
<group delimiter=" ">
|
|
84
|
+
<number variable="edition" form="ordinal"/>
|
|
85
|
+
<text term="edition" form="short"/>
|
|
86
|
+
</group>
|
|
87
|
+
</if>
|
|
88
|
+
<else>
|
|
89
|
+
<text variable="edition" suffix="."/>
|
|
90
|
+
</else>
|
|
91
|
+
</choose>
|
|
92
|
+
</macro>
|
|
93
|
+
<citation collapse="citation-number">
|
|
94
|
+
<sort>
|
|
95
|
+
<key variable="citation-number"/>
|
|
96
|
+
</sort>
|
|
97
|
+
<layout delimiter="," vertical-align="sup">
|
|
98
|
+
<text variable="citation-number"/>
|
|
99
|
+
</layout>
|
|
100
|
+
</citation>
|
|
101
|
+
<bibliography second-field-align="flush" entry-spacing="0">
|
|
102
|
+
<layout suffix=".">
|
|
103
|
+
<text variable="citation-number" prefix="(" suffix=")"/>
|
|
104
|
+
<text macro="author" suffix=" "/>
|
|
105
|
+
<choose>
|
|
106
|
+
<if type="article-magazine">
|
|
107
|
+
<group delimiter=" ">
|
|
108
|
+
<text variable="container-title" font-style="italic" suffix="."/>
|
|
109
|
+
<text macro="edition"/>
|
|
110
|
+
<text macro="publisher"/>
|
|
111
|
+
<text macro="full-issued" suffix=","/>
|
|
112
|
+
<text macro="pages"/>
|
|
113
|
+
</group>
|
|
114
|
+
</if>
|
|
115
|
+
<else-if type="thesis">
|
|
116
|
+
<group delimiter=", ">
|
|
117
|
+
<group delimiter=". ">
|
|
118
|
+
<text variable="title"/>
|
|
119
|
+
<text variable="genre"/>
|
|
120
|
+
</group>
|
|
121
|
+
<text macro="publisher"/>
|
|
122
|
+
<text macro="issued"/>
|
|
123
|
+
<text macro="volume"/>
|
|
124
|
+
<text macro="pages"/>
|
|
125
|
+
</group>
|
|
126
|
+
</else-if>
|
|
127
|
+
<else-if type="bill book graphic legal_case legislation motion_picture report song" match="any">
|
|
128
|
+
<group delimiter="; ">
|
|
129
|
+
<text variable="title" font-style="italic"/>
|
|
130
|
+
<text macro="editor" prefix=" "/>
|
|
131
|
+
<text macro="series"/>
|
|
132
|
+
<text macro="edition"/>
|
|
133
|
+
<group delimiter=", ">
|
|
134
|
+
<text macro="publisher"/>
|
|
135
|
+
<text macro="issued" font-weight="bold"/>
|
|
136
|
+
</group>
|
|
137
|
+
<group delimiter=", ">
|
|
138
|
+
<text macro="volume"/>
|
|
139
|
+
<text macro="pages"/>
|
|
140
|
+
</group>
|
|
141
|
+
</group>
|
|
142
|
+
</else-if>
|
|
143
|
+
<else-if type="chapter paper-conference" match="any">
|
|
144
|
+
<group delimiter="; ">
|
|
145
|
+
<text macro="book-container"/>
|
|
146
|
+
<text macro="editor"/>
|
|
147
|
+
<text macro="series"/>
|
|
148
|
+
<group delimiter=", ">
|
|
149
|
+
<text macro="publisher"/>
|
|
150
|
+
<text macro="issued" font-weight="bold"/>
|
|
151
|
+
</group>
|
|
152
|
+
<group delimiter=", ">
|
|
153
|
+
<text macro="volume"/>
|
|
154
|
+
<text macro="pages"/>
|
|
155
|
+
</group>
|
|
156
|
+
</group>
|
|
157
|
+
</else-if>
|
|
158
|
+
<else-if type="webpage post-weblog" match="any">
|
|
159
|
+
<group delimiter=" ">
|
|
160
|
+
<text variable="title"/>
|
|
161
|
+
<text variable="URL"/>
|
|
162
|
+
<group delimiter=" " prefix="(" suffix=")">
|
|
163
|
+
<text term="accessed"/>
|
|
164
|
+
<date variable="accessed">
|
|
165
|
+
<date-part name="month" form="short" strip-periods="true" suffix=" "/>
|
|
166
|
+
<date-part name="day" suffix=", "/>
|
|
167
|
+
<date-part name="year"/>
|
|
168
|
+
</date>
|
|
169
|
+
</group>
|
|
170
|
+
</group>
|
|
171
|
+
</else-if>
|
|
172
|
+
<else-if type="patent">
|
|
173
|
+
<group delimiter=", ">
|
|
174
|
+
<group delimiter=" ">
|
|
175
|
+
<text variable="authority" form="short" font-style="italic"/>
|
|
176
|
+
<text variable="number"/>
|
|
177
|
+
</group>
|
|
178
|
+
<text macro="issued" font-weight="bold"/>
|
|
179
|
+
</group>
|
|
180
|
+
</else-if>
|
|
181
|
+
<else>
|
|
182
|
+
<group delimiter=" ">
|
|
183
|
+
<text variable="container-title" form="short"/>
|
|
184
|
+
<group delimiter=", ">
|
|
185
|
+
<text macro="issued" font-weight="bold"/>
|
|
186
|
+
<text variable="volume" font-style="italic"/>
|
|
187
|
+
<text macro="pages"/>
|
|
188
|
+
</group>
|
|
189
|
+
</group>
|
|
190
|
+
</else>
|
|
191
|
+
</choose>
|
|
192
|
+
</layout>
|
|
193
|
+
</bibliography>
|
|
194
|
+
</style>
|
|
195
|
+
`;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The CSL style `tetrahedron`, as the Citation Style Language project publishes it
|
|
3
|
+
* (styles repository, commit 15ea57496883). Its `<rights>`
|
|
4
|
+
* element states its licence.
|
|
5
|
+
* Written by scripts/csl-styles.mjs: change the script, not this file.
|
|
6
|
+
*/
|
|
7
|
+
export const STYLE = `<?xml version="1.0" encoding="utf-8"?>
|
|
8
|
+
<style xmlns="http://purl.org/net/xbiblio/csl" version="1.0" default-locale="en-US">
|
|
9
|
+
<!-- Elsevier, generated from "elsevier" metadata at https://github.com/citation-style-language/journals -->
|
|
10
|
+
<info>
|
|
11
|
+
<title>Tetrahedron</title>
|
|
12
|
+
<id>https://www.zotero.org/styles/tetrahedron</id>
|
|
13
|
+
<link href="https://www.zotero.org/styles/tetrahedron" rel="self"/>
|
|
14
|
+
<link href="https://www.zotero.org/styles/elsevier-with-titles" rel="independent-parent"/>
|
|
15
|
+
<category citation-format="numeric"/>
|
|
16
|
+
<issn>0040-4020</issn>
|
|
17
|
+
<updated>2017-06-04T12:00:00+00:00</updated>
|
|
18
|
+
<rights license="https://creativecommons.org/licenses/by-sa/3.0/">This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 License</rights>
|
|
19
|
+
</info>
|
|
20
|
+
</style>
|
|
21
|
+
`;
|
package/src/csl.ts
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* References formatted as the journals print them, by citeproc-js — the
|
|
3
|
+
* processor Zotero runs — in the CSL styles of the journals the family writes
|
|
4
|
+
* for: CSL JSON read from Zotero, Mendeley or doi.org, the family's own
|
|
5
|
+
* references turned into it, and citations and reference lists formatted from
|
|
6
|
+
* it.
|
|
7
|
+
*
|
|
8
|
+
* Its own door because the processor and the styles weigh several hundred
|
|
9
|
+
* kilobytes: they load only when something is formatted.
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
export type { CslDate, CslItem, CslName } from './csl/core/cslItems.ts';
|
|
13
|
+
export {
|
|
14
|
+
itemLabel,
|
|
15
|
+
itemSearchText,
|
|
16
|
+
itemVenue,
|
|
17
|
+
itemYear,
|
|
18
|
+
readCslItem,
|
|
19
|
+
readCslItems,
|
|
20
|
+
readCslText,
|
|
21
|
+
textVariable,
|
|
22
|
+
} from './csl/core/cslItems.ts';
|
|
23
|
+
export {
|
|
24
|
+
CSL_STYLE_IDS,
|
|
25
|
+
hasCslStyle,
|
|
26
|
+
loadCslLocale,
|
|
27
|
+
loadCslStyle,
|
|
28
|
+
} from './csl/core/cslStyles.ts';
|
|
29
|
+
export type { CslOutput, FormattedCslCitations } from './csl/core/formatCsl.ts';
|
|
30
|
+
export { formatCslCitations, formatCslEntries } from './csl/core/formatCsl.ts';
|
|
31
|
+
export { referenceToCsl } from './csl/core/referenceItem.ts';
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import type { CitationSegment } from './segments.ts';
|
|
2
|
-
/**
|
|
3
|
-
* Write the segments as they read in an email or a manuscript.
|
|
4
|
-
* @param segments - Segments of the citation.
|
|
5
|
-
* @returns The citation, with no markup at all.
|
|
6
|
-
*/
|
|
7
|
-
export declare function renderText(segments: readonly CitationSegment[]): string;
|
|
8
|
-
/**
|
|
9
|
-
* Write the segments as HTML, so a paste into Word or a web page keeps the
|
|
10
|
-
* italics and the bold the style asks for.
|
|
11
|
-
* @param segments - Segments of the citation.
|
|
12
|
-
* @returns The citation as one line of HTML.
|
|
13
|
-
*/
|
|
14
|
-
export declare function renderHtml(segments: readonly CitationSegment[]): string;
|
|
15
|
-
/**
|
|
16
|
-
* Write the segments as Markdown, for a README or an issue.
|
|
17
|
-
* @param segments - Segments of the citation.
|
|
18
|
-
* @returns The citation as one line of Markdown.
|
|
19
|
-
*/
|
|
20
|
-
export declare function renderMarkdown(segments: readonly CitationSegment[]): string;
|
|
21
|
-
//# sourceMappingURL=render.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"render.d.ts","sourceRoot":"","sources":["../../../src/citation/core/render.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAErD;;;;GAIG;AACH,wBAAgB,UAAU,CAAC,QAAQ,EAAE,SAAS,eAAe,EAAE,GAAG,MAAM,CAMvE;AAED;;;;;GAKG;AACH,wBAAgB,UAAU,CAAC,QAAQ,EAAE,SAAS,eAAe,EAAE,GAAG,MAAM,CAqBvE;AAED;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,QAAQ,EAAE,SAAS,eAAe,EAAE,GAAG,MAAM,CAqB3E"}
|
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Write the segments as they read in an email or a manuscript.
|
|
3
|
-
* @param segments - Segments of the citation.
|
|
4
|
-
* @returns The citation, with no markup at all.
|
|
5
|
-
*/
|
|
6
|
-
export function renderText(segments) {
|
|
7
|
-
let result = '';
|
|
8
|
-
for (const segment of segments) {
|
|
9
|
-
result += segment.kind === 'link' ? segment.href : segment.text;
|
|
10
|
-
}
|
|
11
|
-
return result;
|
|
12
|
-
}
|
|
13
|
-
/**
|
|
14
|
-
* Write the segments as HTML, so a paste into Word or a web page keeps the
|
|
15
|
-
* italics and the bold the style asks for.
|
|
16
|
-
* @param segments - Segments of the citation.
|
|
17
|
-
* @returns The citation as one line of HTML.
|
|
18
|
-
*/
|
|
19
|
-
export function renderHtml(segments) {
|
|
20
|
-
let result = '';
|
|
21
|
-
for (const segment of segments) {
|
|
22
|
-
switch (segment.kind) {
|
|
23
|
-
case 'italic':
|
|
24
|
-
result += `<em>${escapeHtml(segment.text)}</em>`;
|
|
25
|
-
break;
|
|
26
|
-
case 'bold':
|
|
27
|
-
result += `<strong>${escapeHtml(segment.text)}</strong>`;
|
|
28
|
-
break;
|
|
29
|
-
case 'link':
|
|
30
|
-
result += `<a href="${escapeHtml(segment.href)}">${escapeHtml(segment.text)}</a>`;
|
|
31
|
-
break;
|
|
32
|
-
case 'text':
|
|
33
|
-
result += escapeHtml(segment.text);
|
|
34
|
-
break;
|
|
35
|
-
default:
|
|
36
|
-
break;
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
return result;
|
|
40
|
-
}
|
|
41
|
-
/**
|
|
42
|
-
* Write the segments as Markdown, for a README or an issue.
|
|
43
|
-
* @param segments - Segments of the citation.
|
|
44
|
-
* @returns The citation as one line of Markdown.
|
|
45
|
-
*/
|
|
46
|
-
export function renderMarkdown(segments) {
|
|
47
|
-
let result = '';
|
|
48
|
-
for (const segment of segments) {
|
|
49
|
-
switch (segment.kind) {
|
|
50
|
-
case 'italic':
|
|
51
|
-
result += `*${segment.text}*`;
|
|
52
|
-
break;
|
|
53
|
-
case 'bold':
|
|
54
|
-
result += `**${segment.text}**`;
|
|
55
|
-
break;
|
|
56
|
-
case 'link':
|
|
57
|
-
result += `[${segment.text}](${segment.href})`;
|
|
58
|
-
break;
|
|
59
|
-
case 'text':
|
|
60
|
-
result += segment.text;
|
|
61
|
-
break;
|
|
62
|
-
default:
|
|
63
|
-
break;
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
return result;
|
|
67
|
-
}
|
|
68
|
-
function escapeHtml(value) {
|
|
69
|
-
return value
|
|
70
|
-
.replaceAll('&', '&')
|
|
71
|
-
.replaceAll('<', '<')
|
|
72
|
-
.replaceAll('>', '>');
|
|
73
|
-
}
|
|
74
|
-
//# sourceMappingURL=render.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"render.js","sourceRoot":"","sources":["../../../src/citation/core/render.ts"],"names":[],"mappings":"AAEA;;;;GAIG;AACH,MAAM,UAAU,UAAU,CAAC,QAAoC;IAC7D,IAAI,MAAM,GAAG,EAAE,CAAC;IAChB,KAAK,MAAM,OAAO,IAAI,QAAQ,EAAE,CAAC;QAC/B,MAAM,IAAI,OAAO,CAAC,IAAI,KAAK,MAAM,CAAC,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC;IAClE,CAAC;IACD,OAAO,MAAM,CAAC;AAChB,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,UAAU,CAAC,QAAoC;IAC7D,IAAI,MAAM,GAAG,EAAE,CAAC;IAChB,KAAK,MAAM,OAAO,IAAI,QAAQ,EAAE,CAAC;QAC/B,QAAQ,OAAO,CAAC,IAAI,EAAE,CAAC;YACrB,KAAK,QAAQ;gBACX,MAAM,IAAI,OAAO,UAAU,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC;gBACjD,MAAM;YACR,KAAK,MAAM;gBACT,MAAM,IAAI,WAAW,UAAU,CAAC,OAAO,CAAC,IAAI,CAAC,WAAW,CAAC;gBACzD,MAAM;YACR,KAAK,MAAM;gBACT,MAAM,IAAI,YAAY,UAAU,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,UAAU,CAAC,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC;gBAClF,MAAM;YACR,KAAK,MAAM;gBACT,MAAM,IAAI,UAAU,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;gBACnC,MAAM;YACR;gBACE,MAAM;QACV,CAAC;IACH,CAAC;IACD,OAAO,MAAM,CAAC;AAChB,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,cAAc,CAAC,QAAoC;IACjE,IAAI,MAAM,GAAG,EAAE,CAAC;IAChB,KAAK,MAAM,OAAO,IAAI,QAAQ,EAAE,CAAC;QAC/B,QAAQ,OAAO,CAAC,IAAI,EAAE,CAAC;YACrB,KAAK,QAAQ;gBACX,MAAM,IAAI,IAAI,OAAO,CAAC,IAAI,GAAG,CAAC;gBAC9B,MAAM;YACR,KAAK,MAAM;gBACT,MAAM,IAAI,KAAK,OAAO,CAAC,IAAI,IAAI,CAAC;gBAChC,MAAM;YACR,KAAK,MAAM;gBACT,MAAM,IAAI,IAAI,OAAO,CAAC,IAAI,KAAK,OAAO,CAAC,IAAI,GAAG,CAAC;gBAC/C,MAAM;YACR,KAAK,MAAM;gBACT,MAAM,IAAI,OAAO,CAAC,IAAI,CAAC;gBACvB,MAAM;YACR;gBACE,MAAM;QACV,CAAC;IACH,CAAC;IACD,OAAO,MAAM,CAAC;AAChB,CAAC;AAED,SAAS,UAAU,CAAC,KAAa;IAC/B,OAAO,KAAK;SACT,UAAU,CAAC,GAAG,EAAE,OAAO,CAAC;SACxB,UAAU,CAAC,GAAG,EAAE,MAAM,CAAC;SACvB,UAAU,CAAC,GAAG,EAAE,MAAM,CAAC,CAAC;AAC7B,CAAC"}
|
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
import type { ArticleReference, Reference, ReferenceAuthor } from './reference.ts';
|
|
2
|
-
/** One piece of a written reference, with the emphasis its style asks for. */
|
|
3
|
-
export type CitationSegment = {
|
|
4
|
-
kind: 'text' | 'italic' | 'bold';
|
|
5
|
-
text: string;
|
|
6
|
-
} | {
|
|
7
|
-
kind: 'link';
|
|
8
|
-
text: string;
|
|
9
|
-
href: string;
|
|
10
|
-
};
|
|
11
|
-
/** The journal styles the reference can be written in. */
|
|
12
|
-
export type CitationStyleId = 'acs' | 'nature' | 'rsc' | 'wiley';
|
|
13
|
-
/** One entry of the style submenu. */
|
|
14
|
-
export interface CitationStyle {
|
|
15
|
-
id: CitationStyleId;
|
|
16
|
-
/** Name of the style. */
|
|
17
|
-
label: string;
|
|
18
|
-
/** Journals that ask for it, shown on the right of the entry. */
|
|
19
|
-
hint: string;
|
|
20
|
-
}
|
|
21
|
-
/** Every style offered, in the order the menu lists them. */
|
|
22
|
-
export declare const CITATION_STYLES: readonly [{
|
|
23
|
-
readonly id: "acs";
|
|
24
|
-
readonly label: "ACS";
|
|
25
|
-
readonly hint: "JACS, Org. Lett.";
|
|
26
|
-
}, {
|
|
27
|
-
readonly id: "nature";
|
|
28
|
-
readonly label: "Nature";
|
|
29
|
-
readonly hint: "Nature, Nat. Chem.";
|
|
30
|
-
}, {
|
|
31
|
-
readonly id: "rsc";
|
|
32
|
-
readonly label: "RSC";
|
|
33
|
-
readonly hint: "Chem. Sci., Green Chem.";
|
|
34
|
-
}, {
|
|
35
|
-
readonly id: "wiley";
|
|
36
|
-
readonly label: "Wiley";
|
|
37
|
-
readonly hint: "Angew. Chem., Chem. Eur. J.";
|
|
38
|
-
}];
|
|
39
|
-
/**
|
|
40
|
-
* Write a reference in one journal style, as the pieces every output format
|
|
41
|
-
* then renders with its own emphasis.
|
|
42
|
-
* @param reference - Reference to write.
|
|
43
|
-
* @param style - Style to write it in.
|
|
44
|
-
* @returns The segments of the citation, in reading order.
|
|
45
|
-
*/
|
|
46
|
-
export declare function citationSegments(reference: Reference, style: CitationStyleId): CitationSegment[];
|
|
47
|
-
/**
|
|
48
|
-
* The pages of a work, as its styles write them.
|
|
49
|
-
* @param reference - The work being written.
|
|
50
|
-
* @param dash - What joins the two ends, an en dash in every style but BibTeX.
|
|
51
|
-
* @returns One number for a journal that paginates by article number, the
|
|
52
|
-
* range otherwise.
|
|
53
|
-
*/
|
|
54
|
-
export declare function pageRange(reference: ArticleReference, dash?: string): string;
|
|
55
|
-
/**
|
|
56
|
-
* An author with the family name first, `Vanderveen, J. R.`, or the name of an
|
|
57
|
-
* organisation alone.
|
|
58
|
-
* @param author - The author.
|
|
59
|
-
* @returns The name, as a reference list writes it.
|
|
60
|
-
*/
|
|
61
|
-
export declare function nameFamilyFirst(author: ReferenceAuthor): string;
|
|
62
|
-
//# sourceMappingURL=segments.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"segments.d.ts","sourceRoot":"","sources":["../../../src/citation/core/segments.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,gBAAgB,EAEhB,SAAS,EACT,eAAe,EAChB,MAAM,gBAAgB,CAAC;AAGxB,8EAA8E;AAC9E,MAAM,MAAM,eAAe,GACvB;IAAE,IAAI,EAAE,MAAM,GAAG,QAAQ,GAAG,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,GAClD;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,CAAC;AAEjD,0DAA0D;AAC1D,MAAM,MAAM,eAAe,GAAG,KAAK,GAAG,QAAQ,GAAG,KAAK,GAAG,OAAO,CAAC;AAEjE,sCAAsC;AACtC,MAAM,WAAW,aAAa;IAC5B,EAAE,EAAE,eAAe,CAAC;IACpB,yBAAyB;IACzB,KAAK,EAAE,MAAM,CAAC;IACd,iEAAiE;IACjE,IAAI,EAAE,MAAM,CAAC;CACd;AAED,6DAA6D;AAC7D,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;EAKiB,CAAC;AAE9C;;;;;;GAMG;AACH,wBAAgB,gBAAgB,CAC9B,SAAS,EAAE,SAAS,EACpB,KAAK,EAAE,eAAe,GACrB,eAAe,EAAE,CAcnB;AA6KD;;;;;;GAMG;AACH,wBAAgB,SAAS,CAAC,SAAS,EAAE,gBAAgB,EAAE,IAAI,SAAM,GAAG,MAAM,CAIzE;AAED;;;;;GAKG;AACH,wBAAgB,eAAe,CAAC,MAAM,EAAE,eAAe,GAAG,MAAM,CAI/D"}
|