@baiyibai-antora/extensions 1.18.5 → 1.19.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/CHANGELOG.adoc CHANGED
@@ -3,6 +3,25 @@
3
3
 
4
4
  All notable changes to this project will be documented in this file.
5
5
 
6
+ == [1.19.0] - 2026-08-31
7
+
8
+ === Added
9
+
10
+ * cite-it: a new `author-date` `style`, a real, complete, unmodified APA 7th edition CSL style (`resources/cite-it/author-date.csl`, fetched from the official `citation-style-language/styles` repository, same CC-BY-SA licensing convention `ieee-bracket.csl` already carries), alongside the existing `ieee-bracket` (numeric). `csl.ts` exposes `citationFormatFor(style)`, reading each bundled style's own real CSL `<category citation-format="...">` metadata rather than a hand-maintained parallel table.
11
+ * cite-it: the citation-format `style` selects now drives the inline `cite:[key]` marker's own shape in BOTH ordinary HTML and PDF/assembled output, not just the bibliography list. `ieee-bracket` (numeric, the default) means true first-appearance `[N]` markers, linked, on HTML too now, reusing the exact same real, navigation-order numbering PDF output has always used, not a fresh per-page count: a key cited from page to page carries one consistent number everywhere. `author-date` is new for PDF/assembled output: Ruby's `asciidoctor-pdf` subprocess never loads this package's live macro, so its markers, and the bibliography partial's own row label, get the same pre-rewrite-before-parse treatment numeric markers always needed.
12
+ * cite-it: the generated bibliography partial's row order now matches what each citation-format's reader actually needs to look an entry up: ascending citation-number order for `numeric` (unchanged), first-author-name alphabetical order for `author-date` (previously always sorted by internal citation key, an identifier a reader never sees).
13
+
14
+ === Changed
15
+
16
+ * cite-it: `style` is now a playbook-wide setting only, applied identically to every participating component version's HTML, PDF, and Confluence/ADF output. It is no longer overridable per component version: a component version's own `ext.cite_it.style`, if still present, is ignored, with a build warning naming the ignored value. The inline citation marker and the bibliography entry it points at must share one citation-format convention for a reader to look an entry up at all (a numeric marker needs a numerically ordered list; an author-date marker needs an author-ordered one), a constraint that holds site-wide, not per component version.
17
+ * cite-it: with the playbook-wide default (`ieee-bracket`, unchanged), ordinary HTML output now renders `[N]` citation markers by default, matching PDF output, instead of the previous `(Author, Year)` fallback. This changes default rendered HTML output for every existing site using cite-it with no `style` configured; set `style: 'author-date'` to keep the previous look.
18
+ * cite-it: the generated bibliography partial's row-label rewrite for a `numeric`-style citation is no longer restored before the next ordinary (HTML, or Confluence/ADF export) `loadAsciiDoc` call reads it. `style` being playbook-wide means every consumer wants the identical rewritten partial now; the restore mechanism 1.18.4 added specifically because PDF and ordinary output used to want different content for the same partial no longer has a scenario to guard against.
19
+ * cite-it: `formatBibliographyEntries`'s underlying citeproc `Engine` is now constructed once per style and reused for every later call, instead of being rebuilt (recompiling the whole CSL style document) on every call. Confirmed to be the entire real cost of a `formatBibliographyEntries` call, independent of item count: ~76ms to construct for `ieee-bracket.csl`, ~1.3s for the real, complete `author-date.csl` (99 macros, 252 conditional branches against `ieee-bracket.csl`'s 15 and 36), profiled directly to `CSL.XmlJSON.getNodesByName`, citeproc-js's own unindexed full-tree-rescan on every macro-name lookup, not the actual formatting work (`updateItems`/`makeBibliography` alone are consistently single-digit milliseconds regardless of style). Reuse safety (no disambiguation-state leakage between two component-versions sharing one cached engine) verified directly, not assumed, and locked in with a test.
20
+
21
+ === Fixed
22
+
23
+ * cite-it: `loadAsciiDocWrapper`'s own assembled-output detection checked only whether `asciidocConfig.attributes` carried the key `'loader-assembler'`, not its value, unlike `registerCiteMacro`'s equivalent, correct `doc.hasAttribute('loader-assembler')` check, which treats an attribute explicitly set to `false` as unset. A toolchain that declares `loader-assembler` as a default `asciidoc.attributes` entry, even set to `false`, satisfied the old check on every single page load, assembled or not, independent of whether Antora Assembler ever actually ran, reported directly with a reproduction.
24
+
6
25
  == [1.18.5] - 2026-08-31
7
26
 
8
27
  === Fixed
@@ -182,8 +182,7 @@ export declare function reorderBibliographyRows(text: string, numbers: Map<strin
182
182
  /**
183
183
  * Rewrites the generated bibliography partial's OWN `cite:[key]` row
184
184
  * labels to their final `[N]` numbers, mutating the file directly in the
185
- * content catalog, and returns one restore function per partial actually
186
- * changed.
185
+ * content catalog.
187
186
  *
188
187
  * Needed for a reason distinct from rewriteCiteMarkers' normal call site:
189
188
  * Antora's own include processor resolves an `include::partial$...[]`
@@ -194,31 +193,49 @@ export declare function reorderBibliographyRows(text: string, numbers: Map<strin
194
193
  * rewrite text that arrives via an include inside that parse; a citing
195
194
  * page's own `cite:[key]` usage rewrites correctly, but the generated
196
195
  * partial's own row labels, pulled in during the same parse, would
197
- * otherwise reach Ruby unrewritten. Called once per component-version,
198
- * before any assembly-time loadAsciiDoc call can run (synchronous within
199
- * the same navigationBuilt handler that computes `numbers`), so the
200
- * partial is already correct by the time anything tries to include it.
196
+ * otherwise reach Ruby unrewritten (for PDF) or reach registerCiteMacro's
197
+ * own live rendering, which has no reliable way to know the true,
198
+ * cross-page-computed number a per-document counter alone would not
199
+ * necessarily match. Called once per component-version, before any
200
+ * loadAsciiDoc call that needs `numbers` can run (synchronous, from
201
+ * ensureAssemblyDataComputed), so the partial is already correct by the
202
+ * time anything tries to include it.
201
203
  *
202
- * The mutation MUST be undone before anything outside this one assembly
203
- * pass reads the same partial: it is a genuinely shared, site-wide catalog
204
- * object, not a private copy. Antora's own event lifecycle guarantees
205
- * navigationBuilt (which drives @antora/assembler, hence this function)
206
- * fully completes before beforePublish (which drives Confluence export,
207
- * and any future single-page HTML or other exporter reading the same
208
- * catalog after assembly) begins, so a caller that restores at the start
209
- * of the next ordinary, non-assembled loadAsciiDoc call is always in time.
210
- * Confirmed live: without a restore, the demo site's own published
211
- * Confluence page showed this partial's assembled `[1]` label instead of
212
- * its ordinary-HTML `(Author, Year)` one, since the mutation this function
213
- * makes had already happened by the time Confluence export read it, no
214
- * later than the caller's own restore made it into a release.
204
+ * The mutation is never restored, deliberately, as of the `style`-is-
205
+ * playbook-wide-only redesign: `style` (and therefore, via
206
+ * citationFormatFor, whether numeric numbering applies at all) is now the
207
+ * SAME single value for every consumer of this partial, ordinary HTML,
208
+ * PDF/assembled, and Confluence/ADF export alike, so there is no longer a
209
+ * competing "the next reader wants something different" case to guard
210
+ * against. An EARLIER version of this function returned a restore
211
+ * function per changed partial, undone at the start of the next ordinary
212
+ * loadAsciiDoc call specifically because PDF assembly used to always want
213
+ * `[N]` while ordinary/Confluence output always wanted `(Author, Year)`
214
+ * for the exact same partial; confirmed live, without that restore, the
215
+ * demo site's own published Confluence page once showed the assembled
216
+ * `[1]` label instead. That divergence cannot happen anymore: whichever
217
+ * citation-format `style` resolves to, every consumer wants the identical
218
+ * rewritten (or, for a non-numeric style, entirely untouched, since this
219
+ * function is only ever called when numeric numbering applies) partial
220
+ * content.
215
221
  *
216
- * Also reorders the partial's rows into ascending citation-number order
217
- * (reorderBibliographyRows) before rewriting labels: the order the partial
218
- * was generated in has no relationship to citation number (Node does not
219
- * know numbers yet at generation time), and a numbered bibliography listed
220
- * out of number order reads as broken to anyone looking at it.
222
+ * For the `numeric` citation-format only, also reorders the partial's rows
223
+ * into ascending citation-number order (reorderBibliographyRows) before
224
+ * rewriting labels: the order the partial was generated in has no
225
+ * relationship to citation number (Node does not know numbers yet at
226
+ * generation time), and a numbered bibliography listed out of number order
227
+ * reads as broken to anyone looking at it. A non-numeric citation-format
228
+ * needs no second reorder pass here: index.ts's own row-generation already
229
+ * sorts by author for that case, a real ordering known at generation time,
230
+ * unlike citation number.
231
+ *
232
+ * `labelFor` decouples this function from numeric numbering specifically:
233
+ * the caller supplies whichever label shape the active `style`'s citation-
234
+ * format implies (numberLabels for `numeric`, formatHtmlLabels-shaped
235
+ * author/year text for `author-date`), the same function it uses to
236
+ * rewrite the CITING page's own markers, so the row label and the marker
237
+ * pointing at it always agree.
221
238
  */
222
- export declare function rewritePartialForAssembly(ctx: ScanContext, numbers: Map<string, number>): Array<() => void>;
239
+ export declare function rewritePartialForAssembly(ctx: ScanContext, numbers: Map<string, number>, reorderByNumber: boolean, labelFor: (key: string) => string | undefined): void;
223
240
  export {};
224
241
  //# sourceMappingURL=assembly-numbering.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file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C7C,MAAM,UAAO,EACb,MAAM,GAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,IAAW,GACxC,MAAM,CAsCR;AAED;;;;;mDAKmD;AACnD,wBAAgB,YAAY,CAAC,OAAO,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,CAAC,GAAG,EAAE,MAAM,KAAK,MAAM,GAAG,SAAS,CAK9F;AA0BD,wBAAgB,uBAAuB,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,MAAM,CA2B1F;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwDG;AACH,wBAAgB,yBAAyB,CACvC,GAAG,EAAE,WAAW,EAChB,OAAO,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,EAC5B,eAAe,EAAE,OAAO,EACxB,QAAQ,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,MAAM,GAAG,SAAS,GAC5C,IAAI,CAiBN"}
@@ -365,8 +365,7 @@ function reorderBibliographyRows(text, numbers) {
365
365
  /**
366
366
  * Rewrites the generated bibliography partial's OWN `cite:[key]` row
367
367
  * labels to their final `[N]` numbers, mutating the file directly in the
368
- * content catalog, and returns one restore function per partial actually
369
- * changed.
368
+ * content catalog.
370
369
  *
371
370
  * Needed for a reason distinct from rewriteCiteMarkers' normal call site:
372
371
  * Antora's own include processor resolves an `include::partial$...[]`
@@ -377,35 +376,50 @@ function reorderBibliographyRows(text, numbers) {
377
376
  * rewrite text that arrives via an include inside that parse; a citing
378
377
  * page's own `cite:[key]` usage rewrites correctly, but the generated
379
378
  * partial's own row labels, pulled in during the same parse, would
380
- * otherwise reach Ruby unrewritten. Called once per component-version,
381
- * before any assembly-time loadAsciiDoc call can run (synchronous within
382
- * the same navigationBuilt handler that computes `numbers`), so the
383
- * partial is already correct by the time anything tries to include it.
379
+ * otherwise reach Ruby unrewritten (for PDF) or reach registerCiteMacro's
380
+ * own live rendering, which has no reliable way to know the true,
381
+ * cross-page-computed number a per-document counter alone would not
382
+ * necessarily match. Called once per component-version, before any
383
+ * loadAsciiDoc call that needs `numbers` can run (synchronous, from
384
+ * ensureAssemblyDataComputed), so the partial is already correct by the
385
+ * time anything tries to include it.
384
386
  *
385
- * The mutation MUST be undone before anything outside this one assembly
386
- * pass reads the same partial: it is a genuinely shared, site-wide catalog
387
- * object, not a private copy. Antora's own event lifecycle guarantees
388
- * navigationBuilt (which drives @antora/assembler, hence this function)
389
- * fully completes before beforePublish (which drives Confluence export,
390
- * and any future single-page HTML or other exporter reading the same
391
- * catalog after assembly) begins, so a caller that restores at the start
392
- * of the next ordinary, non-assembled loadAsciiDoc call is always in time.
393
- * Confirmed live: without a restore, the demo site's own published
394
- * Confluence page showed this partial's assembled `[1]` label instead of
395
- * its ordinary-HTML `(Author, Year)` one, since the mutation this function
396
- * makes had already happened by the time Confluence export read it, no
397
- * later than the caller's own restore made it into a release.
387
+ * The mutation is never restored, deliberately, as of the `style`-is-
388
+ * playbook-wide-only redesign: `style` (and therefore, via
389
+ * citationFormatFor, whether numeric numbering applies at all) is now the
390
+ * SAME single value for every consumer of this partial, ordinary HTML,
391
+ * PDF/assembled, and Confluence/ADF export alike, so there is no longer a
392
+ * competing "the next reader wants something different" case to guard
393
+ * against. An EARLIER version of this function returned a restore
394
+ * function per changed partial, undone at the start of the next ordinary
395
+ * loadAsciiDoc call specifically because PDF assembly used to always want
396
+ * `[N]` while ordinary/Confluence output always wanted `(Author, Year)`
397
+ * for the exact same partial; confirmed live, without that restore, the
398
+ * demo site's own published Confluence page once showed the assembled
399
+ * `[1]` label instead. That divergence cannot happen anymore: whichever
400
+ * citation-format `style` resolves to, every consumer wants the identical
401
+ * rewritten (or, for a non-numeric style, entirely untouched, since this
402
+ * function is only ever called when numeric numbering applies) partial
403
+ * content.
398
404
  *
399
- * Also reorders the partial's rows into ascending citation-number order
400
- * (reorderBibliographyRows) before rewriting labels: the order the partial
401
- * was generated in has no relationship to citation number (Node does not
402
- * know numbers yet at generation time), and a numbered bibliography listed
403
- * out of number order reads as broken to anyone looking at it.
405
+ * For the `numeric` citation-format only, also reorders the partial's rows
406
+ * into ascending citation-number order (reorderBibliographyRows) before
407
+ * rewriting labels: the order the partial was generated in has no
408
+ * relationship to citation number (Node does not know numbers yet at
409
+ * generation time), and a numbered bibliography listed out of number order
410
+ * reads as broken to anyone looking at it. A non-numeric citation-format
411
+ * needs no second reorder pass here: index.ts's own row-generation already
412
+ * sorts by author for that case, a real ordering known at generation time,
413
+ * unlike citation number.
414
+ *
415
+ * `labelFor` decouples this function from numeric numbering specifically:
416
+ * the caller supplies whichever label shape the active `style`'s citation-
417
+ * format implies (numberLabels for `numeric`, formatHtmlLabels-shaped
418
+ * author/year text for `author-date`), the same function it uses to
419
+ * rewrite the CITING page's own markers, so the row label and the marker
420
+ * pointing at it always agree.
404
421
  */
405
- function rewritePartialForAssembly(ctx, numbers) {
406
- const restores = [];
407
- if (numbers.size === 0)
408
- return restores;
422
+ function rewritePartialForAssembly(ctx, numbers, reorderByNumber, labelFor) {
409
423
  for (const cp of ctx.categoryPartials) {
410
424
  const partial = ctx.contentCatalog.getFiles().find((f) => f.src.component === ctx.component &&
411
425
  f.src.version === ctx.version &&
@@ -415,13 +429,11 @@ function rewritePartialForAssembly(ctx, numbers) {
415
429
  if (!partial)
416
430
  continue;
417
431
  const before = partial.contents.toString('utf8');
418
- const reordered = reorderBibliographyRows(before, numbers);
419
- const after = rewriteCiteMarkers(reordered, numberLabels(numbers), false);
432
+ const reordered = reorderByNumber ? reorderBibliographyRows(before, numbers) : before;
433
+ const after = rewriteCiteMarkers(reordered, labelFor, false);
420
434
  if (after === before)
421
435
  continue;
422
436
  partial.contents = Buffer.from(after, 'utf8');
423
- restores.push(() => { partial.contents = Buffer.from(before, 'utf8'); });
424
437
  }
425
- return restores;
426
438
  }
427
439
  //# sourceMappingURL=assembly-numbering.js.map
@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G,MAAM,CAAC,IAAI,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC;IAChD,CAAC;AACH,CAAC"}
@@ -13,16 +13,44 @@
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
  *
16
- * `STYLES` currently bundles one entry, `ieee-bracket`. This is a scope
17
- * limit, not an architectural one: `loadEngine` takes any CSL style/locale
18
- * pair placed under `resources/cite-it/` and registered in `STYLES` below,
19
- * so adding a style is a matter of shipping its `.csl`/`.xml` files and one
20
- * new `STYLES` entry, not a design change. A `style` value not present in
21
- * `STYLES` is rejected with a clear error rather than silently falling
22
- * back, since a silently wrong citation style is a worse failure than a
23
- * build error naming the actual gap.
16
+ * `STYLES` bundles two real, unmodified, standard CSL styles fetched from
17
+ * the official citation-style-language/styles repository, the same CC-BY-SA
18
+ * licensing convention both files carry in their own `<info><rights>`:
19
+ * `ieee-bracket` (numeric) and `author-date` (a real, complete APA 7th
20
+ * edition style, not a hand-authored approximation of "an author-date
21
+ * style" - CSL's own `author-date` category covers several genuinely
22
+ * different concrete conventions, APA chosen as the most broadly
23
+ * recognized one). Adding a style is a matter of shipping its `.csl` file
24
+ * under `resources/cite-it/` and one new `STYLES` entry (`citationFormat`
25
+ * included, see `CitationFormat`/`citationFormatFor` below), not a design
26
+ * change. A `style` value not present in `STYLES` is rejected with a clear
27
+ * error rather than silently falling back, since a silently wrong citation
28
+ * style is a worse failure than a build error naming the actual gap.
24
29
  */
25
30
  import type { CslJsonItem } from './registry';
31
+ /**
32
+ * `citationFormat` mirrors each style's own real CSL `<category
33
+ * citation-format="...">` metadata (confirmed directly in both bundled
34
+ * files: `ieee-bracket.csl` declares `numeric`, `author-date.csl` declares
35
+ * `author-date`), declared here rather than parsed from the XML at load
36
+ * time: the value drives real branching elsewhere in cite-it (which inline
37
+ * marker shape a style produces, how the generated bibliography partial's
38
+ * own rows are ordered), so it needs to be known synchronously, cheaply,
39
+ * and without adding an XML-attribute-extraction dependency for one field.
40
+ * A style bundled here always keeps its own XML `<category>` tag in sync,
41
+ * the normal CSL-authoring convention, but that tag itself is descriptive
42
+ * metadata only; this declaration is what code actually reads.
43
+ */
44
+ export type CitationFormat = 'numeric' | 'author-date';
45
+ /**
46
+ * The citation-format a `style` config value resolves to, for callers that
47
+ * need to know which inline-marker/bibliography-ordering rules to apply
48
+ * without loading the full citeproc Engine. Throws the same clear,
49
+ * unsupported-style error `loadEngine` does, rather than defaulting
50
+ * silently: an unrecognized style name is a real misconfiguration either
51
+ * way, whichever entry point first notices it.
52
+ */
53
+ export declare function citationFormatFor(styleName: string): CitationFormat;
26
54
  /**
27
55
  * Convert one citeproc bibliography entry's raw HTML fragment into AsciiDoc
28
56
  * inline text. citeproc's output shape is two sibling <div>s per entry:
@@ -1 +1 @@
1
- {"version":3,"file":"csl.d.ts","sourceRoot":"","sources":["../../../src/extensions/cite-it/csl.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAMH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AA6C9C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,wBAAgB,mBAAmB,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,CAY7D;AA4GD,wBAAgB,yBAAyB,CACvC,SAAS,EAAE,MAAM,EACjB,KAAK,EAAE,GAAG,CAAC,MAAM,EAAE,WAAW,CAAC,EAC/B,IAAI,EAAE,MAAM,EAAE,EACd,eAAe,UAAQ,EACvB,kBAAkB,UAAQ,EAC1B,UAAU,SAAK,GACd,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CA2CrB"}
1
+ {"version":3,"file":"csl.d.ts","sourceRoot":"","sources":["../../../src/extensions/cite-it/csl.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AAMH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAK9C;;;;;;;;;;;;GAYG;AACH,MAAM,MAAM,cAAc,GAAG,SAAS,GAAG,aAAa,CAAC;AAOvD;;;;;;;GAOG;AACH,wBAAgB,iBAAiB,CAAC,SAAS,EAAE,MAAM,GAAG,cAAc,CAQnE;AAqFD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,wBAAgB,mBAAmB,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,CAY7D;AA4GD,wBAAgB,yBAAyB,CACvC,SAAS,EAAE,MAAM,EACjB,KAAK,EAAE,GAAG,CAAC,MAAM,EAAE,WAAW,CAAC,EAC/B,IAAI,EAAE,MAAM,EAAE,EACd,eAAe,UAAQ,EACvB,kBAAkB,UAAQ,EAC1B,UAAU,SAAK,GACd,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CA2CrB"}
@@ -14,14 +14,19 @@
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
  *
17
- * `STYLES` currently bundles one entry, `ieee-bracket`. This is a scope
18
- * limit, not an architectural one: `loadEngine` takes any CSL style/locale
19
- * pair placed under `resources/cite-it/` and registered in `STYLES` below,
20
- * so adding a style is a matter of shipping its `.csl`/`.xml` files and one
21
- * new `STYLES` entry, not a design change. A `style` value not present in
22
- * `STYLES` is rejected with a clear error rather than silently falling
23
- * back, since a silently wrong citation style is a worse failure than a
24
- * build error naming the actual gap.
17
+ * `STYLES` bundles two real, unmodified, standard CSL styles fetched from
18
+ * the official citation-style-language/styles repository, the same CC-BY-SA
19
+ * licensing convention both files carry in their own `<info><rights>`:
20
+ * `ieee-bracket` (numeric) and `author-date` (a real, complete APA 7th
21
+ * edition style, not a hand-authored approximation of "an author-date
22
+ * style" - CSL's own `author-date` category covers several genuinely
23
+ * different concrete conventions, APA chosen as the most broadly
24
+ * recognized one). Adding a style is a matter of shipping its `.csl` file
25
+ * under `resources/cite-it/` and one new `STYLES` entry (`citationFormat`
26
+ * included, see `CitationFormat`/`citationFormatFor` below), not a design
27
+ * change. A `style` value not present in `STYLES` is rejected with a clear
28
+ * error rather than silently falling back, since a silently wrong citation
29
+ * style is a worse failure than a build error naming the actual gap.
25
30
  */
26
31
  var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
27
32
  if (k2 === undefined) k2 = k;
@@ -57,6 +62,7 @@ var __importStar = (this && this.__importStar) || (function () {
57
62
  };
58
63
  })();
59
64
  Object.defineProperty(exports, "__esModule", { value: true });
65
+ exports.citationFormatFor = citationFormatFor;
60
66
  exports.htmlEntryToAsciiDoc = htmlEntryToAsciiDoc;
61
67
  exports.formatBibliographyEntries = formatBibliographyEntries;
62
68
  const fs = __importStar(require("node:fs"));
@@ -66,27 +72,87 @@ const date_fns_1 = require("date-fns");
66
72
  const asciidoc_replacements_1 = require("../../lib/asciidoc-replacements");
67
73
  const RESOURCES_DIR = path.join(__dirname, '..', '..', '..', 'resources', 'cite-it');
68
74
  const STYLES = {
69
- 'ieee-bracket': { style: 'ieee-bracket.csl', locale: 'locale-en-US.xml' },
75
+ 'ieee-bracket': { style: 'ieee-bracket.csl', locale: 'locale-en-US.xml', citationFormat: 'numeric' },
76
+ 'author-date': { style: 'author-date.csl', locale: 'locale-en-US.xml', citationFormat: 'author-date' },
70
77
  };
78
+ /**
79
+ * The citation-format a `style` config value resolves to, for callers that
80
+ * need to know which inline-marker/bibliography-ordering rules to apply
81
+ * without loading the full citeproc Engine. Throws the same clear,
82
+ * unsupported-style error `loadEngine` does, rather than defaulting
83
+ * silently: an unrecognized style name is a real misconfiguration either
84
+ * way, whichever entry point first notices it.
85
+ */
86
+ function citationFormatFor(styleName) {
87
+ const spec = STYLES[styleName];
88
+ if (!spec) {
89
+ throw new Error(`cite-it: unknown style "${styleName}"; supported styles: ${Object.keys(STYLES).join(', ')}`);
90
+ }
91
+ return spec.citationFormat;
92
+ }
93
+ /**
94
+ * One real `Engine` per style, constructed once and reused for every
95
+ * subsequent `formatBibliographyEntries` call in the same process,
96
+ * regardless of which component-version or item set is being formatted.
97
+ * `new Engine(sys, styleXml)` is where citeproc-js actually compiles the
98
+ * CSL style document into its own internal execution form, confirmed
99
+ * directly to be the entire real cost (timed independently of
100
+ * `updateItems`/`makeBibliography`, both consistently single-digit
101
+ * milliseconds regardless of style): ~76ms for `ieee-bracket.csl` (18KB),
102
+ * ~1.3s for the real, complete `author-date.csl` (86KB, over 100 macros).
103
+ * Reconstructing that from scratch per call, once per participating
104
+ * component-version, was real, avoidable per-build cost.
105
+ *
106
+ * Reuse is safe, not just fast, confirmed directly against citeproc-js's
107
+ * own real behavior, not assumed from its documentation: `engine.
108
+ * updateItems(keys)` fully replaces the engine's active item set on every
109
+ * call, including its disambiguation/registry state, byte-for-byte
110
+ * identical output to a fresh `Engine` given the same keys, verified by
111
+ * alternating between two different, independently colliding item sets on
112
+ * one shared engine and diffing against two separate fresh engines (no
113
+ * leakage of one component-version's disambiguation suffixes into
114
+ * another's, in either order). `itemsRef` exists only so each cached
115
+ * engine's own `retrieveItem` closure can be redirected to the CURRENT
116
+ * caller's items map on every call, since the closure itself is fixed at
117
+ * construction time but the underlying data is not.
118
+ */
119
+ const engineCache = new Map();
71
120
  function loadEngine(styleName, items) {
72
121
  const spec = STYLES[styleName];
73
122
  if (!spec) {
74
123
  throw new Error(`cite-it: unknown style "${styleName}"; supported styles: ${Object.keys(STYLES).join(', ')}`);
75
124
  }
125
+ const cached = engineCache.get(styleName);
126
+ if (cached) {
127
+ cached.itemsRef.current = items;
128
+ return cached.engine;
129
+ }
76
130
  const styleXml = fs.readFileSync(path.join(RESOURCES_DIR, spec.style), 'utf8');
77
131
  const localeXml = fs.readFileSync(path.join(RESOURCES_DIR, spec.locale), 'utf8');
132
+ const itemsRef = { current: items };
78
133
  const sys = {
79
134
  retrieveLocale: () => localeXml,
80
- retrieveItem: (id) => items.get(id),
135
+ retrieveItem: (id) => itemsRef.current.get(id),
81
136
  };
82
- return new citeproc_1.Engine(sys, styleXml);
137
+ const engine = new citeproc_1.Engine(sys, styleXml);
138
+ engineCache.set(styleName, { engine, itemsRef });
139
+ return engine;
83
140
  }
84
141
  /**
85
- * Decode the small set of HTML entities citeproc's own output uses.
86
- * citeproc escapes text it renders (author names, titles) as HTML, since
87
- * its native output target is a browser DOM; the generated partial is
88
- * AsciiDoc, not HTML, so entities are decoded back to literal characters
89
- * rather than left for AsciiDoc to interpret as markup.
142
+ * Decode the HTML entities citeproc's own output uses. citeproc escapes
143
+ * text it renders (author names, titles) as HTML, since its native output
144
+ * target is a browser DOM; the generated partial is AsciiDoc, not HTML, so
145
+ * entities are decoded back to literal characters rather than left for
146
+ * AsciiDoc to interpret as markup.
147
+ *
148
+ * The small named-entity list was sufficient for `ieee-bracket.csl` alone
149
+ * (`and="text"` between co-authors, never a literal "&"), but a style using
150
+ * `and="symbol"` renders "&" as the NUMERIC entity `&#38;`, not `&amp;`
151
+ * (confirmed directly loading a real APA-style bibliography entry through
152
+ * citeproc: "Smith, J. A., &#38; Nakamura, K."). Decimal and hex numeric
153
+ * character references are decoded generically, not just the one citeproc
154
+ * happens to emit today, so a future style choosing a different one still
155
+ * works without another silent gap.
90
156
  */
91
157
  function decodeEntities(s) {
92
158
  return s
@@ -94,8 +160,9 @@ function decodeEntities(s) {
94
160
  .replace(/&lt;/g, '<')
95
161
  .replace(/&gt;/g, '>')
96
162
  .replace(/&quot;/g, '"')
97
- .replace(/&#39;/g, "'")
98
- .replace(/&nbsp;/g, ' ');
163
+ .replace(/&nbsp;/g, ' ')
164
+ .replace(/&#(\d+);/g, (_, dec) => String.fromCodePoint(Number(dec)))
165
+ .replace(/&#x([0-9a-fA-F]+);/g, (_, hex) => String.fromCodePoint(Number.parseInt(hex, 16)));
99
166
  }
100
167
  /**
101
168
  * Convert one citeproc bibliography entry's raw HTML fragment into AsciiDoc
@@ -1 +1 @@
1
- {"version":3,"file":"csl.js","sourceRoot":"","sources":["../../../src/extensions/cite-it/csl.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;;;;;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IAAI,kBAAkB;YAAE,IAAI,GAAG,2BAA2B,CAAC,IAAI,CAAC,CAAC;QAEjE,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,mEAAmE;gBACnE,kEAAkE;gBAClE,mEAAmE;gBACnE,aAAa;gBACb,MAAM,OAAO,GAAG,IAAA,kDAA0B,EAAC,eAAe,CAAC,MAAM,CAAC,CAAC,CAAC;gBACpE,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE,CAAC,QAAQ,CAAC,MAAM,CAAC,WAAW,EAAE,CAAC,EAAE,CAAC;oBACvD,IAAI,GAAG,GAAG,IAAI,IAAI,OAAO,GAAG,CAAC;gBAC/B,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"}
@@ -2,11 +2,23 @@
2
2
  * @baiyibai-antora/extensions - cite-it
3
3
  *
4
4
  * Resolves `cite:[key]` citations against BibTeX/BibLaTeX `.bib` files and
5
- * generates a categorized bibliography partial. Numbering is a PDF/Antora
6
- * Assembler-flattened-output concept only; ordinary, non-assembled HTML
7
- * citations render a templated author/year fragment instead, carrying no
8
- * number. See macro.ts and assembly-numbering.ts for the two rendering
9
- * paths this splits into.
5
+ * generates a categorized bibliography partial. The playbook-wide `style`
6
+ * (below) picks one of two citation-formats, applied identically across
7
+ * ordinary HTML, PDF/Antora Assembler-flattened output, and Confluence/ADF
8
+ * export: `ieee-bracket` (numeric, the default) renders a true
9
+ * first-appearance `[N]` marker, linked to the bibliography row it
10
+ * numbers, everywhere citation numbering historically was a PDF-only
11
+ * concept, since Ruby's own `asciidoctor-pdf` subprocess never loads this
12
+ * package's live macro (see assembly-numbering.ts's own module docblock),
13
+ * so every marker, in every mode, needs the same pre-rewrite-before-parse
14
+ * treatment; `author-date` renders a templated author/year fragment
15
+ * instead (`renderHtmlFallback`, macro.ts), matching how ordinary HTML
16
+ * rendered by default before this design existed. The inline marker and
17
+ * the bibliography entry it points at always share the SAME
18
+ * citation-format: a reader has no way to look an entry up otherwise (a
19
+ * numeric marker needs a numerically ordered list; an author-date marker
20
+ * needs an author-ordered one), which is also why `style` is playbook-wide
21
+ * only, not overridable per component-version.
10
22
  *
11
23
  * A category is defined entirely by which `.bib` file(s) an entry lives in,
12
24
  * never by a data field inside the entry. Each category is an ordered list
@@ -29,10 +41,16 @@
29
41
  * component-version at least one category, it is scanned and gets its
30
42
  * generated partial(s), whether or not its own antora.yml mentions
31
43
  * cite-it at all. `ext.cite_it` in a component-version's antora.yml is
32
- * purely an OPTIONAL override, the same standing as `enabled`, `style`,
44
+ * purely an OPTIONAL override, the same standing as `enabled`,
33
45
  * `output_partial`, and `write_to_disk`: present only when a component
34
46
  * needs to diverge from the playbook default, never required just to
35
- * take part.
47
+ * take part. `style` is the one exception: playbook-wide only, never a
48
+ * per-component-version override (a component-version still setting
49
+ * `ext.cite_it.style` warns once, naming the ignored value, rather than
50
+ * silently doing nothing). See the module docblock above for why: the
51
+ * inline marker and the bibliography entry it points at must share one
52
+ * citation-format convention for a reader to look an entry up at all, a
53
+ * constraint that does not hold per-component-version, only site-wide.
36
54
  *
37
55
  * EARLIER DESIGN, REPLACED: this extension originally required an
38
56
  * explicit `ext.cite_it` block, even an empty one, mirroring
@@ -73,7 +91,9 @@
73
91
  * - require: '@baiyibai-antora/extensions/cite-it'
74
92
  * cite_it:
75
93
  * enabled: true
76
- * # Only 'ieee-bracket' is bundled and supported in this version.
94
+ * # Playbook-wide only, applied identically to every participating
95
+ * # component-version's HTML, PDF, and Confluence/ADF output alike:
96
+ * # 'ieee-bracket' (numeric, the default) or 'author-date'.
77
97
  * style: 'ieee-bracket'
78
98
  * # Base filename for each category's own generated partial
79
99
  * # (e.g. category "standards" -> generated-bibliography-
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/extensions/cite-it/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiLG;AAwCH,UAAU,iBAAiB;IACzB,YAAY,EAAE,MAAM,CAAC;IACrB,SAAS,EAAE,MAAM,EAAE,CAAC;IACpB,SAAS,EAAE,MAAM,EAAE,CAAC;CACrB;AAaD,UAAU,YAAY;IACpB,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,EAAE,OAAO,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IACd,cAAc,EAAE,MAAM,CAAC;IACvB,eAAe,EAAE,OAAO,CAAC;IACzB,aAAa,EAAE,OAAO,CAAC;IAQvB,gBAAgB,EAAE,OAAO,CAAC;IAS1B,mBAAmB,EAAE,OAAO,CAAC;IAY7B,WAAW,EAAE,MAAM,CAAC;IAQpB,UAAU,EAAE,iBAAiB,EAAE,CAAC;CACjC;AAED,UAAU,YAAY;IACpB,KAAK,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAC;IAC9B,IAAI,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAC;IAC7B,IAAI,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAC;IAC7B,KAA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