@baiyibai-antora/extensions 1.14.0 → 1.15.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/CHANGELOG.adoc +21 -0
- package/README.adoc +1 -1
- package/dist/extensions/cite-it/asciidoc.d.ts +2 -2
- package/dist/extensions/cite-it/asciidoc.js +2 -2
- package/dist/extensions/cite-it/assembly-numbering.d.ts +7 -7
- package/dist/extensions/cite-it/assembly-numbering.d.ts.map +1 -1
- package/dist/extensions/cite-it/assembly-numbering.js +17 -17
- package/dist/extensions/cite-it/assembly-numbering.js.map +1 -1
- package/dist/extensions/cite-it/csl.d.ts +4 -13
- package/dist/extensions/cite-it/csl.d.ts.map +1 -1
- package/dist/extensions/cite-it/csl.js +38 -5
- package/dist/extensions/cite-it/csl.js.map +1 -1
- package/dist/extensions/cite-it/index.d.ts +18 -17
- package/dist/extensions/cite-it/index.d.ts.map +1 -1
- package/dist/extensions/cite-it/index.js +162 -69
- package/dist/extensions/cite-it/index.js.map +1 -1
- package/dist/extensions/cite-it/macro.d.ts +13 -8
- package/dist/extensions/cite-it/macro.d.ts.map +1 -1
- package/dist/extensions/cite-it/macro.js +32 -15
- package/dist/extensions/cite-it/macro.js.map +1 -1
- package/dist/extensions/cite-it/registry.d.ts +1 -1
- package/dist/extensions/cite-it/registry.js +1 -1
- package/dist/extensions/trademark-it/index.d.ts +1 -1
- package/dist/extensions/trademark-it/index.js +1 -1
- package/dist/lib/asciidoc-indexterms.d.ts +3 -37
- package/dist/lib/asciidoc-indexterms.d.ts.map +1 -1
- package/dist/lib/asciidoc-indexterms.js +23 -4
- package/dist/lib/asciidoc-indexterms.js.map +1 -1
- package/package.json +2 -2
package/CHANGELOG.adoc
CHANGED
|
@@ -3,6 +3,27 @@
|
|
|
3
3
|
|
|
4
4
|
All notable changes to this project will be documented in this file.
|
|
5
5
|
|
|
6
|
+
== [1.15.1] - 2026-08-28
|
|
7
|
+
|
|
8
|
+
=== Fixed
|
|
9
|
+
|
|
10
|
+
* cite-it: exact-pinned `@asciidoctor/core` to `2.2.9` instead of `^2.2.4`; a caret range let this package and a consumer's own `@asciidoctor/core` install resolve to different patch versions of the same `~2.2` line, loading two separate Opal runtime instances in one process and crashing Antora's own document conversion (`Object.setPrototypeOf called on null or undefined` in `Opal.bridge`) the first time cite-it's real page-scanning ran alongside a real page-conversion pass in the same build
|
|
11
|
+
* docs/antora.yml still used the retired `ref_section` field name after the 1.15.0 rename to `ref_category`, so this package's own docs component never actually exercised the citation feature it demonstrates
|
|
12
|
+
|
|
13
|
+
== [1.15.0] - 2026-08-28
|
|
14
|
+
|
|
15
|
+
=== Added
|
|
16
|
+
|
|
17
|
+
* cite-it: `blanket_pubstate` config option, playbook and component level, showing an entry's BibLaTeX pubstate ("In preparation", "Forthcoming", "In press") for every entry type, in both the generated bibliography and the ordinary HTML citation, not only the two IEEE style branches that already render it by default
|
|
18
|
+
|
|
19
|
+
=== Fixed
|
|
20
|
+
|
|
21
|
+
* cite-it: renamed the `citeit:[key]` macro to `cite:[key]`, a breaking change with no backward-compatibility alias; the `ext.cite_it` playbook and component-level config namespace is unchanged, only the macro syntax authors type changed
|
|
22
|
+
* cite-it: a cross-component `include::` of a page citing an entry shipped literal `citeit:[key]` text in PDF/assembled output; every other participating component-version's cited pages are now rewritten during assembly, not only the loaded page's own
|
|
23
|
+
* autoterm, cite-it: `sanitizeForScan` blanked a `=`-level-0 title by its ordinal position rather than by whether it sat inside the document header, missing a wrapper page whose title arrives through an `include::` after a page break; fixed 12 "level 0 sections can only be used when doctype is book" errors from such pages
|
|
24
|
+
* cite-it: a bare backtick-quoted `cite:[key]` documentation example corrupted the live docs page, since bare backtick monospace does not suppress real Asciidoctor macro substitution the way backtick-plus does, and silently consumed a PDF citation-number slot
|
|
25
|
+
* cite-it: renamed the category config field `ref_section` to `ref_category`, a breaking change with no backward-compatibility alias; a category is not an AsciiDoc section, and the earlier name suggested a connection that does not exist
|
|
26
|
+
|
|
6
27
|
== [1.14.0] - 2026-08-26
|
|
7
28
|
|
|
8
29
|
=== Added
|
package/README.adoc
CHANGED
|
@@ -23,7 +23,7 @@ This package provides eleven Antora extensions:
|
|
|
23
23
|
|Scans catalog source files for marked terms and generates Terminology and Index partials
|
|
24
24
|
|
|
25
25
|
|<<user-content-cite-it,cite-it>>
|
|
26
|
-
|Resolves
|
|
26
|
+
|Resolves `+cite:[key]+` citations against BibTeX/BibLaTeX `.bib` files and generates categorized bibliography partials
|
|
27
27
|
|
|
28
28
|
|<<user-content-assembler-ruby-preflight,assembler-ruby-preflight>>
|
|
29
29
|
|Validates Ruby/Ghostscript versions and manages gem dependencies for PDF generation
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* cite-it: Asciidoctor extension entry point.
|
|
3
3
|
*
|
|
4
|
-
* Registers the real, rendering `
|
|
4
|
+
* Registers the real, rendering `cite:[key]` inline macro for actual page
|
|
5
5
|
* conversion, both ordinary per-page HTML and Antora Assembler-flattened
|
|
6
6
|
* PDF. Wired into a playbook's `asciidoc.extensions` list as a plain file
|
|
7
7
|
* path, not a `{require: ...}` object; this codebase's other asciidoc-level
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
* computes the `.bib` registry and populates the shared cache (macro.ts)
|
|
18
18
|
* before any page converts; this module only renders, reading that cache.
|
|
19
19
|
* Both registrations are required for cite-it to work.
|
|
20
|
-
* Omitting this entry point leaves `
|
|
20
|
+
* Omitting this entry point leaves `cite:[key]` unprocessed literal text
|
|
21
21
|
* in the rendered output.
|
|
22
22
|
* Omitting the Antora extension leaves every citation reporting an unknown
|
|
23
23
|
* key, since the cache would never be populated.
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
/**
|
|
3
3
|
* cite-it: Asciidoctor extension entry point.
|
|
4
4
|
*
|
|
5
|
-
* Registers the real, rendering `
|
|
5
|
+
* Registers the real, rendering `cite:[key]` inline macro for actual page
|
|
6
6
|
* conversion, both ordinary per-page HTML and Antora Assembler-flattened
|
|
7
7
|
* PDF. Wired into a playbook's `asciidoc.extensions` list as a plain file
|
|
8
8
|
* path, not a `{require: ...}` object; this codebase's other asciidoc-level
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
* computes the `.bib` registry and populates the shared cache (macro.ts)
|
|
19
19
|
* before any page converts; this module only renders, reading that cache.
|
|
20
20
|
* Both registrations are required for cite-it to work.
|
|
21
|
-
* Omitting this entry point leaves `
|
|
21
|
+
* Omitting this entry point leaves `cite:[key]` unprocessed literal text
|
|
22
22
|
* in the rendered output.
|
|
23
23
|
* Omitting the Antora extension leaves every citation reporting an unknown
|
|
24
24
|
* key, since the cache would never be populated.
|
|
@@ -4,13 +4,13 @@
|
|
|
4
4
|
*
|
|
5
5
|
* `@antora/pdf-extension` shells the stitched document out to the real Ruby
|
|
6
6
|
* `asciidoctor-pdf` CLI as a subprocess. Ruby never loads this package's JS
|
|
7
|
-
* `
|
|
7
|
+
* `cite:[key]` macro (asciidoc.ts), so a live-macro-only design silently
|
|
8
8
|
* fails for PDF output: the macro simply never runs. The fix needs no Ruby
|
|
9
9
|
* code at all: `@antora/assembler`'s own `produceAssemblyFile` builds the
|
|
10
10
|
* stitched document from `doc.getSourceLines()` on a Document `loadAsciiDoc`
|
|
11
11
|
* (Asciidoctor.js) just parsed, so whatever text is fed into `loadAsciiDoc`
|
|
12
12
|
* is exactly what ends up in Ruby's stdin. This module rewrites
|
|
13
|
-
* `
|
|
13
|
+
* `cite:[key]` to its final number in the page's own text before calling
|
|
14
14
|
* the real `loadAsciiDoc`, using Antora's own `replaceFunctions` extension-
|
|
15
15
|
* cooperation point (`@antora/site-generator`'s `GeneratorContext`).
|
|
16
16
|
*
|
|
@@ -80,11 +80,11 @@ export interface ScanContext {
|
|
|
80
80
|
* includes which category's own partial. Citations correctly cross-link
|
|
81
81
|
* to whichever page actually hosts the cited entry, not just a single
|
|
82
82
|
* hardcoded bibliography page. Needed both to rewrite each partial's own
|
|
83
|
-
*
|
|
83
|
+
* cite:[key] row labels for assembled output (rewritePartialForAssembly)
|
|
84
84
|
* and to resolve each key's own host page (findBibliographyScopes).
|
|
85
85
|
*/
|
|
86
86
|
categoryPartials: Array<{
|
|
87
|
-
|
|
87
|
+
category: string;
|
|
88
88
|
relative: string;
|
|
89
89
|
}>;
|
|
90
90
|
}
|
|
@@ -92,7 +92,7 @@ export interface ScanContext {
|
|
|
92
92
|
* True first-appearance citation numbers for one component-version's
|
|
93
93
|
* assembled output: walks its pages in real assembly order, scans each in
|
|
94
94
|
* turn (comments/unset-conditionals stripped first, includes resolved,
|
|
95
|
-
* mirroring index.ts's own per-page scan exactly) for
|
|
95
|
+
* mirroring index.ts's own per-page scan exactly) for cite:[key]
|
|
96
96
|
* occurrences in encounter order, and assigns each distinct key the next
|
|
97
97
|
* number on its first appearance across the whole ordered sequence.
|
|
98
98
|
*/
|
|
@@ -173,7 +173,7 @@ export declare function findBibliographyScopes(navigation: NavigationEntry[] | u
|
|
|
173
173
|
export declare function rewriteCiteMarkers(text: string, numbers: Map<string, number>, asLink?: boolean, scopes?: Map<string, string> | null): string;
|
|
174
174
|
export declare function reorderBibliographyRows(text: string, numbers: Map<string, number>): string;
|
|
175
175
|
/**
|
|
176
|
-
* Rewrites the generated bibliography partial's OWN `
|
|
176
|
+
* Rewrites the generated bibliography partial's OWN `cite:[key]` row
|
|
177
177
|
* labels to their final `[N]` numbers, mutating the file directly in the
|
|
178
178
|
* content catalog.
|
|
179
179
|
*
|
|
@@ -184,7 +184,7 @@ export declare function reorderBibliographyRows(text: string, numbers: Map<strin
|
|
|
184
184
|
* content. That means the loadAsciiDoc wrapper (index.ts), which only sees
|
|
185
185
|
* each page's own raw text before it is parsed, never gets a chance to
|
|
186
186
|
* rewrite text that arrives via an include inside that parse; a citing
|
|
187
|
-
* page's own `
|
|
187
|
+
* page's own `cite:[key]` usage rewrites correctly, but the generated
|
|
188
188
|
* partial's own row labels, pulled in during the same parse, would
|
|
189
189
|
* otherwise reach Ruby unrewritten. Called once per component-version,
|
|
190
190
|
* before any assembly-time loadAsciiDoc call can run (synchronous within
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"assembly-numbering.d.ts","sourceRoot":"","sources":["../../../src/extensions/cite-it/assembly-numbering.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AAcH,UAAU,eAAe;IACvB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,KAAK,CAAC,EAAE,eAAe,EAAE,CAAC;CAC3B;AAED,UAAU,cAAc;IACtB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAKlB,QAAQ,CAAC,EAAE,MAAM,GAAG,UAAU,GAAG,MAAM,CAAC;CACzC;AAED,UAAU,WAAW;IACnB,GAAG,EAAE,cAAc,CAAC;IACpB,QAAQ,EAAE,MAAM,GAAG,UAAU,CAAC;IAC9B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,GAAG,CAAC,EAAE;QAAE,GAAG,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;CACxB;AAED,UAAU,cAAc;IACtB,QAAQ,EAAE,MAAM,WAAW,EAAE,CAAC;IAC9B,eAAe,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,aAAa,CAAC,EAAE,MAAM,EAAE,iBAAiB,CAAC,EAAE,MAAM,EAAE,KAAK,WAAW,GAAG,SAAS,CAAC;IACrJ,SAAS,CAAC,EA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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwDG;AACH,wBAAgB,kBAAkB,CAChC,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,EAC5B,MAAM,UAAO,EACb,MAAM,GAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,IAAW,GACxC,MAAM,CA4BR;AA0BD,wBAAgB,uBAAuB,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,MAAM,CA2B1F;AAED;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,wBAAgB,yBAAyB,CAAC,GAAG,EAAE,WAAW,EAAE,OAAO,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,IAAI,CAiB9F"}
|
|
@@ -5,13 +5,13 @@
|
|
|
5
5
|
*
|
|
6
6
|
* `@antora/pdf-extension` shells the stitched document out to the real Ruby
|
|
7
7
|
* `asciidoctor-pdf` CLI as a subprocess. Ruby never loads this package's JS
|
|
8
|
-
* `
|
|
8
|
+
* `cite:[key]` macro (asciidoc.ts), so a live-macro-only design silently
|
|
9
9
|
* fails for PDF output: the macro simply never runs. The fix needs no Ruby
|
|
10
10
|
* code at all: `@antora/assembler`'s own `produceAssemblyFile` builds the
|
|
11
11
|
* stitched document from `doc.getSourceLines()` on a Document `loadAsciiDoc`
|
|
12
12
|
* (Asciidoctor.js) just parsed, so whatever text is fed into `loadAsciiDoc`
|
|
13
13
|
* is exactly what ends up in Ruby's stdin. This module rewrites
|
|
14
|
-
* `
|
|
14
|
+
* `cite:[key]` to its final number in the page's own text before calling
|
|
15
15
|
* the real `loadAsciiDoc`, using Antora's own `replaceFunctions` extension-
|
|
16
16
|
* cooperation point (`@antora/site-generator`'s `GeneratorContext`).
|
|
17
17
|
*
|
|
@@ -94,7 +94,7 @@ function pagesInNavigationOrder(navigation, files) {
|
|
|
94
94
|
* True first-appearance citation numbers for one component-version's
|
|
95
95
|
* assembled output: walks its pages in real assembly order, scans each in
|
|
96
96
|
* turn (comments/unset-conditionals stripped first, includes resolved,
|
|
97
|
-
* mirroring index.ts's own per-page scan exactly) for
|
|
97
|
+
* mirroring index.ts's own per-page scan exactly) for cite:[key]
|
|
98
98
|
* occurrences in encounter order, and assigns each distinct key the next
|
|
99
99
|
* number on its first appearance across the whole ordered sequence.
|
|
100
100
|
*/
|
|
@@ -113,7 +113,7 @@ function computeCitationNumbers(navigation, ctx) {
|
|
|
113
113
|
// their own here, only ever reached via include. Pre-populating from
|
|
114
114
|
// `files` (every page or partial) used to mark partials visited before
|
|
115
115
|
// any page's include was ever resolved, silently and permanently
|
|
116
|
-
// excluding their content, and any
|
|
116
|
+
// excluding their content, and any cite:[key] inside it, from the
|
|
117
117
|
// scan on first encounter rather than deduping a real prior resolution.
|
|
118
118
|
const includeVisited = new Set();
|
|
119
119
|
for (const page of pages) {
|
|
@@ -174,14 +174,14 @@ function findBibliographyScopes(navigation, ctx) {
|
|
|
174
174
|
const scopes = new Map();
|
|
175
175
|
const files = ctx.contentCatalog.getFiles().filter((f) => f.src.component === ctx.component && f.src.version === ctx.version);
|
|
176
176
|
const pages = pagesInNavigationOrder(navigation, files);
|
|
177
|
-
const remaining = new Map(ctx.categoryPartials.map((cp) => [cp.relative, cp.
|
|
177
|
+
const remaining = new Map(ctx.categoryPartials.map((cp) => [cp.relative, cp.category]));
|
|
178
178
|
for (const page of pages) {
|
|
179
179
|
if (remaining.size === 0)
|
|
180
180
|
break;
|
|
181
181
|
const raw = (page.src.contents ?? page.contents).toString('utf8');
|
|
182
|
-
for (const [relative,
|
|
182
|
+
for (const [relative, category] of [...remaining]) {
|
|
183
183
|
if ((0, index_2.includesPartial)(raw, relative)) {
|
|
184
|
-
scopes.set(
|
|
184
|
+
scopes.set(category, (page.src.relative ?? '').replace(/\.[^./]+$/, ''));
|
|
185
185
|
remaining.delete(relative);
|
|
186
186
|
}
|
|
187
187
|
}
|
|
@@ -189,19 +189,19 @@ function findBibliographyScopes(navigation, ctx) {
|
|
|
189
189
|
return scopes;
|
|
190
190
|
}
|
|
191
191
|
// ---------------------------------------------------------------------------
|
|
192
|
-
// Text rewrite: replace
|
|
192
|
+
// Text rewrite: replace cite:[key] with its final [N] number, applied
|
|
193
193
|
// only to assembly-time page loads (loader-assembler present), before the
|
|
194
194
|
// real loadAsciiDoc parses the page. NOT a blind regex substitution: skips
|
|
195
195
|
// occurrences inside // and //// comments (mirrors trademark-it's own
|
|
196
196
|
// stripComments logic) and occurrences wrapped in a monospace span
|
|
197
|
-
// (`
|
|
198
|
-
// showing
|
|
197
|
+
// (`cite:[key]` or `+cite:[key]+`), the two shapes documentation
|
|
198
|
+
// showing cite:[key] as literal example syntax would realistically use.
|
|
199
199
|
// Deliberately narrower than a full Asciidoctor-parse-based substitution:
|
|
200
|
-
// the
|
|
200
|
+
// the cite:[key] syntax is simple and fixed enough that this scoped guard
|
|
201
201
|
// covers the realistic false-positive shapes without the cost of a second
|
|
202
202
|
// real parse on every assembly-time page load.
|
|
203
203
|
// ---------------------------------------------------------------------------
|
|
204
|
-
const CITE_MARKER_RE = /
|
|
204
|
+
const CITE_MARKER_RE = /cite:\[([a-zA-Z0-9][\w.:/-]*)\]/g;
|
|
205
205
|
/**
|
|
206
206
|
* `asLink: true` (the default, used for citing pages' own body text)
|
|
207
207
|
* rewrites a citation to a real, clickable `xref:<scope>.adoc#cite-<key>[[N\]]`
|
|
@@ -274,8 +274,8 @@ function rewriteCiteMarkers(text, numbers, asLink = true, scopes = null) {
|
|
|
274
274
|
return line.replace(CITE_MARKER_RE, (match, key, offset) => {
|
|
275
275
|
const before = line.slice(Math.max(0, offset - 1), offset);
|
|
276
276
|
const after = line.slice(offset + match.length, offset + match.length + 1);
|
|
277
|
-
// Skip a
|
|
278
|
-
// or a passthrough (+
|
|
277
|
+
// Skip a cite:[key] wrapped in a monospace span (`cite:[key]`)
|
|
278
|
+
// or a passthrough (+cite:[key]+): both are how documentation
|
|
279
279
|
// shows the macro as literal example syntax, not a real citation.
|
|
280
280
|
if ((before === '`' && after === '`') || (before === '+' && after === '+'))
|
|
281
281
|
return match;
|
|
@@ -303,7 +303,7 @@ function rewriteCiteMarkers(text, numbers, asLink = true, scopes = null) {
|
|
|
303
303
|
*
|
|
304
304
|
* A row is recognized by its leading `[[cite-<key>]]` anchor.
|
|
305
305
|
* `generateCategoryPartial` always emits one immediately before each row's
|
|
306
|
-
* label, so this matches on the anchor rather than the
|
|
306
|
+
* label, so this matches on the anchor rather than the cite:[key] token
|
|
307
307
|
* itself, meaning it still works whether called before or after
|
|
308
308
|
* rewriteCiteMarkers has already turned that token into its final `[N]`
|
|
309
309
|
* form. A row whose key never received a number, a ref_force entry
|
|
@@ -340,7 +340,7 @@ function reorderBibliographyRows(text, numbers) {
|
|
|
340
340
|
return out.join('\n');
|
|
341
341
|
}
|
|
342
342
|
/**
|
|
343
|
-
* Rewrites the generated bibliography partial's OWN `
|
|
343
|
+
* Rewrites the generated bibliography partial's OWN `cite:[key]` row
|
|
344
344
|
* labels to their final `[N]` numbers, mutating the file directly in the
|
|
345
345
|
* content catalog.
|
|
346
346
|
*
|
|
@@ -351,7 +351,7 @@ function reorderBibliographyRows(text, numbers) {
|
|
|
351
351
|
* content. That means the loadAsciiDoc wrapper (index.ts), which only sees
|
|
352
352
|
* each page's own raw text before it is parsed, never gets a chance to
|
|
353
353
|
* rewrite text that arrives via an include inside that parse; a citing
|
|
354
|
-
* page's own `
|
|
354
|
+
* page's own `cite:[key]` usage rewrites correctly, but the generated
|
|
355
355
|
* partial's own row labels, pulled in during the same parse, would
|
|
356
356
|
* otherwise reach Ruby unrewritten. Called once per component-version,
|
|
357
357
|
* before any assembly-time loadAsciiDoc call can run (synchronous within
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"assembly-numbering.js","sourceRoot":"","sources":["../../../src/extensions/cite-it/assembly-numbering.ts"],"names":[],"mappings":";AAAA;;;;;;;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|
|
|
5
5
|
* for the generated partial. citeproc's own citation-cluster numbering is
|
|
6
6
|
* not used: `processCitationCluster` needs the full running cluster
|
|
7
7
|
* history passed back on every call to number correctly, making it the
|
|
8
|
-
* wrong tool for `
|
|
8
|
+
* wrong tool for `cite:[key]`'s per-Document counter, which already
|
|
9
9
|
* solves numbering by walking the document in natural order (see
|
|
10
10
|
* assembly-numbering.ts and macro.ts's own render-mode numbering).
|
|
11
11
|
* citeproc here formats bibliography-entry text only; the entry's
|
|
12
|
-
* number/label comes from `
|
|
12
|
+
* number/label comes from `cite:[key]` itself, reused as the generated
|
|
13
13
|
* partial's row label (macro.ts), so the two numbering sources agree by
|
|
14
14
|
* construction rather than by cross-checking two independent counters.
|
|
15
15
|
*
|
|
@@ -27,19 +27,10 @@ import type { CslJsonItem } from './registry';
|
|
|
27
27
|
* Convert one citeproc bibliography entry's raw HTML fragment into AsciiDoc
|
|
28
28
|
* inline text. citeproc's output shape is two sibling <div>s per entry:
|
|
29
29
|
* `csl-left-margin` (the [N] bracket, citeproc's own numbering, discarded
|
|
30
|
-
* here since
|
|
30
|
+
* here since cite:[key] supplies the real number) and `csl-right-inline`
|
|
31
31
|
* (the formatted entry text, kept). Only `csl-right-inline`'s content is
|
|
32
32
|
* used.
|
|
33
33
|
*/
|
|
34
34
|
export declare function htmlEntryToAsciiDoc(entryHtml: string): string;
|
|
35
|
-
|
|
36
|
-
* Format bibliography-entry text for a set of CSL-JSON items, keyed by
|
|
37
|
-
* citation key. `items` is the full merged registry (used for
|
|
38
|
-
* `retrieveItem` cross-references between entries, for example a
|
|
39
|
-
* `container-title` shared across a collection); `keys` selects and orders
|
|
40
|
-
* which items are actually formatted and returned: order does not need to
|
|
41
|
-
* match true citation order, since citeproc's own numbering is discarded
|
|
42
|
-
* (see the module docblock).
|
|
43
|
-
*/
|
|
44
|
-
export declare function formatBibliographyEntries(styleName: string, items: Map<string, CslJsonItem>, keys: string[]): Map<string, string>;
|
|
35
|
+
export declare function formatBibliographyEntries(styleName: string, items: Map<string, CslJsonItem>, keys: string[], blanketPubstate?: boolean): Map<string, string>;
|
|
45
36
|
//# sourceMappingURL=csl.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"csl.d.ts","sourceRoot":"","sources":["../../../src/extensions/cite-it/csl.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAKH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AA4C9C;;;;;;;GAOG;AACH,wBAAgB,mBAAmB,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,CAU7D;
|
|
1
|
+
{"version":3,"file":"csl.d.ts","sourceRoot":"","sources":["../../../src/extensions/cite-it/csl.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAKH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AA4C9C;;;;;;;GAOG;AACH,wBAAgB,mBAAmB,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,CAU7D;AAwBD,wBAAgB,yBAAyB,CACvC,SAAS,EAAE,MAAM,EACjB,KAAK,EAAE,GAAG,CAAC,MAAM,EAAE,WAAW,CAAC,EAC/B,IAAI,EAAE,MAAM,EAAE,EACd,eAAe,UAAQ,GACtB,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAsCrB"}
|
|
@@ -6,11 +6,11 @@
|
|
|
6
6
|
* for the generated partial. citeproc's own citation-cluster numbering is
|
|
7
7
|
* not used: `processCitationCluster` needs the full running cluster
|
|
8
8
|
* history passed back on every call to number correctly, making it the
|
|
9
|
-
* wrong tool for `
|
|
9
|
+
* wrong tool for `cite:[key]`'s per-Document counter, which already
|
|
10
10
|
* solves numbering by walking the document in natural order (see
|
|
11
11
|
* assembly-numbering.ts and macro.ts's own render-mode numbering).
|
|
12
12
|
* citeproc here formats bibliography-entry text only; the entry's
|
|
13
|
-
* number/label comes from `
|
|
13
|
+
* number/label comes from `cite:[key]` itself, reused as the generated
|
|
14
14
|
* partial's row label (macro.ts), so the two numbering sources agree by
|
|
15
15
|
* construction rather than by cross-checking two independent counters.
|
|
16
16
|
*
|
|
@@ -99,7 +99,7 @@ function decodeEntities(s) {
|
|
|
99
99
|
* Convert one citeproc bibliography entry's raw HTML fragment into AsciiDoc
|
|
100
100
|
* inline text. citeproc's output shape is two sibling <div>s per entry:
|
|
101
101
|
* `csl-left-margin` (the [N] bracket, citeproc's own numbering, discarded
|
|
102
|
-
* here since
|
|
102
|
+
* here since cite:[key] supplies the real number) and `csl-right-inline`
|
|
103
103
|
* (the formatted entry text, kept). Only `csl-right-inline`'s content is
|
|
104
104
|
* used.
|
|
105
105
|
*/
|
|
@@ -120,8 +120,20 @@ function htmlEntryToAsciiDoc(entryHtml) {
|
|
|
120
120
|
* which items are actually formatted and returned: order does not need to
|
|
121
121
|
* match true citation order, since citeproc's own numbering is discarded
|
|
122
122
|
* (see the module docblock).
|
|
123
|
+
*
|
|
124
|
+
* `blanketPubstate`: cite-it's `blanket_pubstate` config option (index.ts),
|
|
125
|
+
* threaded through so an entry's BibLaTeX `pubstate` (CSL `status`) shows
|
|
126
|
+
* for every entry type, not only the two style branches that already
|
|
127
|
+
* render it.
|
|
123
128
|
*/
|
|
124
|
-
|
|
129
|
+
/** "in preparation" -> "In preparation", matching the style's own
|
|
130
|
+
* `text-case="capitalize-first"` treatment of the same CSL `status`
|
|
131
|
+
* value where the style DOES render it (see formatBibliographyEntries's
|
|
132
|
+
* own docblock). */
|
|
133
|
+
function capitalizeFirst(s) {
|
|
134
|
+
return s.length === 0 ? s : s[0].toUpperCase() + s.slice(1);
|
|
135
|
+
}
|
|
136
|
+
function formatBibliographyEntries(styleName, items, keys, blanketPubstate = false) {
|
|
125
137
|
const result = new Map();
|
|
126
138
|
if (keys.length === 0)
|
|
127
139
|
return result;
|
|
@@ -132,7 +144,28 @@ function formatBibliographyEntries(styleName, items, keys) {
|
|
|
132
144
|
const html = entryHtmlList[i];
|
|
133
145
|
if (html === undefined)
|
|
134
146
|
return;
|
|
135
|
-
|
|
147
|
+
let text = htmlEntryToAsciiDoc(html);
|
|
148
|
+
// blanket_pubstate: the bundled ieee-bracket.csl only renders `status`
|
|
149
|
+
// (BibLaTeX's `pubstate`, "in preparation"/"forthcoming"/"in press")
|
|
150
|
+
// from its journal-article and conference-paper branches, and only
|
|
151
|
+
// when no volume/issue/page is present there either; every other
|
|
152
|
+
// entry type's branch (report, book, chapter, generic article, ...)
|
|
153
|
+
// has no status slot at all and silently drops it. Rather than edit
|
|
154
|
+
// every branch of the style file, the status is appended here, after
|
|
155
|
+
// formatting, uniformly across every entry type ("blanket"), with a
|
|
156
|
+
// substring check against the entry's own status text so a branch
|
|
157
|
+
// that already rendered it (via the style's own status macro) never
|
|
158
|
+
// gets it twice.
|
|
159
|
+
if (blanketPubstate) {
|
|
160
|
+
const status = items.get(key)?.['status'];
|
|
161
|
+
if (typeof status === 'string' && status) {
|
|
162
|
+
const display = capitalizeFirst(status);
|
|
163
|
+
if (!text.toLowerCase().includes(status.toLowerCase())) {
|
|
164
|
+
text = `${text} *${display}*.`;
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
result.set(key, text);
|
|
136
169
|
});
|
|
137
170
|
return result;
|
|
138
171
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"csl.js","sourceRoot":"","sources":["../../../src/extensions/cite-it/csl.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAyDH,kDAUC;
|
|
1
|
+
{"version":3,"file":"csl.js","sourceRoot":"","sources":["../../../src/extensions/cite-it/csl.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAyDH,kDAUC;AAwBD,8DA2CC;AApID,4CAA8B;AAC9B,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I,CAAC,CAAC;IACzB,MAAM,CAAC,EAAE,aAAa,CAAC,GAAG,MAAM,CAAC,gBAAgB,EAAE,CAAC;IAEpD,IAAI,CAAC,OAAO,CAAC,CAAC,GAAG,EAAE,CAAC,EAAE,EAAE;QACtB,MAAM,IAAI,GAAG,aAAa,CAAC,CAAC,CAAC,CAAC;QAC9B,IAAI,IAAI,KAAK,SAAS;YAAE,OAAO;QAC/B,IAAI,IAAI,GAAG,mBAAmB,CAAC,IAAI,CAAC,CAAC;QAErC,uEAAuE;QACvE,qEAAqE;QACrE,mEAAmE;QACnE,iEAAiE;QACjE,oEAAoE;QACpE,oEAAoE;QACpE,qEAAqE;QACrE,oEAAoE;QACpE,kEAAkE;QAClE,oEAAoE;QACpE,iBAAiB;QACjB,IAAI,eAAe,EAAE,CAAC;YACpB,MAAM,MAAM,GAAG,KAAK,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,CAAC,QAAQ,CAAC,CAAC;YAC1C,IAAI,OAAO,MAAM,KAAK,QAAQ,IAAI,MAAM,EAAE,CAAC;gBACzC,MAAM,OAAO,GAAG,eAAe,CAAC,MAAM,CAAC,CAAC;gBACxC,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE,CAAC,QAAQ,CAAC,MAAM,CAAC,WAAW,EAAE,CAAC,EAAE,CAAC;oBACvD,IAAI,GAAG,GAAG,IAAI,KAAK,OAAO,IAAI,CAAC;gBACjC,CAAC;YACH,CAAC;QACH,CAAC;QAED,MAAM,CAAC,GAAG,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC;IACxB,CAAC,CAAC,CAAC;IAEH,OAAO,MAAM,CAAC;AAChB,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @baiyibai-antora/extensions - cite-it
|
|
3
3
|
*
|
|
4
|
-
* Resolves `
|
|
4
|
+
* Resolves `cite:[key]` citations against BibTeX/BibLaTeX `.bib` files and
|
|
5
5
|
* generates a categorized bibliography partial. Numbering is a PDF/Antora
|
|
6
6
|
* Assembler-flattened-output concept only; ordinary, non-assembled HTML
|
|
7
7
|
* citations render a templated author/year fragment instead, carrying no
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
* autoterm's `mergeTerminology` already establishes.
|
|
17
17
|
*
|
|
18
18
|
* Each category generates its OWN partial (`categoryPartialName`,
|
|
19
|
-
* `<output_partial>-<
|
|
19
|
+
* `<output_partial>-<ref_category>.adoc`). A component author routes a
|
|
20
20
|
* category to whichever page they choose, simply by including that
|
|
21
21
|
* category's own partial there; different categories may genuinely live
|
|
22
22
|
* on different pages, and citations correctly cross-link to whichever
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
* generated-partial injection are real per-build cost, so a component
|
|
41
41
|
* shouldn't pay it just because a sibling component happens to use
|
|
42
42
|
* cite-it). In practice this produced a bad failure mode: a page citing
|
|
43
|
-
* a key with `
|
|
43
|
+
* a key with `cite:[key]` in a component-version that forgot the
|
|
44
44
|
* `ext.cite_it` block either silently rendered an unrelated component's
|
|
45
45
|
* entry (if the key happened to collide) or a generic "unknown key"
|
|
46
46
|
* message that read like a typo rather than "this component-version
|
|
@@ -57,10 +57,10 @@
|
|
|
57
57
|
* for trademark-it/autoterm: declared once, inherited by every
|
|
58
58
|
* component-version automatically. A component-version's own
|
|
59
59
|
* `ext.cite_it.categories`, if present at all, is entirely optional and
|
|
60
|
-
* purely additive to the scaffold, matched by `
|
|
61
|
-
* mergeCategoriesConfig): naming a
|
|
60
|
+
* purely additive to the scaffold, matched by `ref_category` (see
|
|
61
|
+
* mergeCategoriesConfig): naming a category already in the scaffold
|
|
62
62
|
* extends it (its `ref_files`/`ref_force` append to the scaffold's),
|
|
63
|
-
* and naming a new
|
|
63
|
+
* and naming a new category adds one local to that component
|
|
64
64
|
* alone. A component-version with
|
|
65
65
|
* genuinely no categories anywhere, no playbook scaffold and no local
|
|
66
66
|
* `ext.cite_it.categories`, is still skipped: there is nothing to scan
|
|
@@ -76,7 +76,7 @@
|
|
|
76
76
|
* # Only 'ieee-bracket' is bundled and supported in this version.
|
|
77
77
|
* style: 'ieee-bracket'
|
|
78
78
|
* # Base filename for each category's own generated partial
|
|
79
|
-
* # (e.g.
|
|
79
|
+
* # (e.g. category "standards" -> generated-bibliography-
|
|
80
80
|
* # standards.adoc), one per category, injected into each
|
|
81
81
|
* # participating component-version.
|
|
82
82
|
* output_partial: 'generated-bibliography.adoc'
|
|
@@ -87,12 +87,12 @@
|
|
|
87
87
|
* write_to_disk: false
|
|
88
88
|
* # The global scaffold: every participating component-version
|
|
89
89
|
* # inherits these categories as-is unless it names the same
|
|
90
|
-
* #
|
|
90
|
+
* # ref_category itself, in which case its own entry extends this
|
|
91
91
|
* # one rather than replacing it.
|
|
92
92
|
* categories:
|
|
93
|
-
* -
|
|
93
|
+
* - ref_category: standards
|
|
94
94
|
* ref_files: ['cite-it-data:ROOT:partial$standards.bib']
|
|
95
|
-
* -
|
|
95
|
+
* - ref_category: literature
|
|
96
96
|
* ref_files: ['cite-it-data:ROOT:partial$literature-shared.bib']
|
|
97
97
|
* ref_force: ['rfc2119']
|
|
98
98
|
*
|
|
@@ -111,19 +111,19 @@
|
|
|
111
111
|
* ext:
|
|
112
112
|
* cite_it: {}
|
|
113
113
|
*
|
|
114
|
-
* A component needing a local-only addition to an existing
|
|
114
|
+
* A component needing a local-only addition to an existing category, or a
|
|
115
115
|
* wholly local category the scaffold does not define, adds only that:
|
|
116
116
|
*
|
|
117
117
|
* ext:
|
|
118
118
|
* cite_it:
|
|
119
119
|
* categories:
|
|
120
|
-
* # Extends the scaffold's own "literature"
|
|
120
|
+
* # Extends the scaffold's own "literature" category (above) with one
|
|
121
121
|
* # more file, appended after the scaffold's own ref_files.
|
|
122
|
-
* -
|
|
122
|
+
* - ref_category: literature
|
|
123
123
|
* ref_files: ['literature-local.bib']
|
|
124
|
-
* # A
|
|
124
|
+
* # A category the scaffold does not define at all: local to this
|
|
125
125
|
* # component only.
|
|
126
|
-
* -
|
|
126
|
+
* - ref_category: internal-notes
|
|
127
127
|
* ref_files: ['internal-notes.bib']
|
|
128
128
|
*
|
|
129
129
|
* `.bib` files are resolved from the content catalog's `partial` family,
|
|
@@ -171,13 +171,13 @@
|
|
|
171
171
|
* reading the `.bib` file directly. Bibtex itself carries no native
|
|
172
172
|
* concept of an outdated reference; this is a cite-it-specific convention,
|
|
173
173
|
* not a standard `.bib` field any external tool is expected to recognize.
|
|
174
|
-
* Deliberately not raised again at each `
|
|
174
|
+
* Deliberately not raised again at each `cite:[key]` use site in prose,
|
|
175
175
|
* one signal per generated partial is enough; managing `.bib` data itself,
|
|
176
176
|
* including deciding when an entry is superseded, stays outside cite-it's
|
|
177
177
|
* own scope (see the docs page's own "Scope" section).
|
|
178
178
|
*/
|
|
179
179
|
interface RawCategoryConfig {
|
|
180
|
-
|
|
180
|
+
ref_category: string;
|
|
181
181
|
ref_files: string[];
|
|
182
182
|
ref_force: string[];
|
|
183
183
|
}
|
|
@@ -188,6 +188,7 @@ interface CiteItConfig {
|
|
|
188
188
|
output_partial: string;
|
|
189
189
|
suppress_events: boolean;
|
|
190
190
|
write_to_disk: boolean;
|
|
191
|
+
blanket_pubstate: boolean;
|
|
191
192
|
categories: RawCategoryConfig[];
|
|
192
193
|
}
|
|
193
194
|
interface AntoraLogger {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/extensions/cite-it/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiLG;AAuCH,UAAU,iBAAiB;IACzB,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/extensions/cite-it/index.ts"],"names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