eyecite-ts 0.26.0 → 0.28.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/dist/annotate/index.d.cts +1 -1
- package/dist/annotate/index.d.mts +1 -1
- package/dist/{citation-B8IB2eC6.d.mts → citation-CC26NIPR.d.cts} +141 -9
- package/dist/citation-CC26NIPR.d.cts.map +1 -0
- package/dist/{citation-_lNG83rc.d.cts → citation-ag6I-jIx.d.mts} +141 -9
- package/dist/citation-ag6I-jIx.d.mts.map +1 -0
- package/dist/data/index.cjs +1 -1
- package/dist/data/index.cjs.map +1 -1
- package/dist/data/index.mjs +1 -1
- package/dist/data/index.mjs.map +1 -1
- package/dist/index.cjs +6 -6
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +17 -12
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.mts +17 -12
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +6 -6
- package/dist/index.mjs.map +1 -1
- package/dist/knownCodes-Cf-QBqyM.mjs +2 -0
- package/dist/knownCodes-Cf-QBqyM.mjs.map +1 -0
- package/dist/knownCodes-exb5VIWR.cjs +2 -0
- package/dist/knownCodes-exb5VIWR.cjs.map +1 -0
- package/dist/reporters.gen-CjY2GNBF.mjs +28760 -0
- package/dist/reporters.gen-VFW44Ywx.cjs +28760 -0
- package/dist/{types-DPhytyc8.d.cts → types-BcFwx-j6.d.cts} +2 -2
- package/dist/{types-DPhytyc8.d.cts.map → types-BcFwx-j6.d.cts.map} +1 -1
- package/dist/{types-J9-lnmev.d.mts → types-BxTRgDes.d.mts} +2 -2
- package/dist/{types-J9-lnmev.d.mts.map → types-BxTRgDes.d.mts.map} +1 -1
- package/dist/utils/index.cjs +1 -1
- package/dist/utils/index.cjs.map +1 -1
- package/dist/utils/index.d.cts +2 -2
- package/dist/utils/index.d.mts +2 -2
- package/dist/utils/index.mjs +1 -1
- package/dist/utils/index.mjs.map +1 -1
- package/package.json +7 -2
- package/dist/citation-B8IB2eC6.d.mts.map +0 -1
- package/dist/citation-_lNG83rc.d.cts.map +0 -1
- package/dist/knownCodes-BO5bT4lZ.cjs +0 -2
- package/dist/knownCodes-BO5bT4lZ.cjs.map +0 -1
- package/dist/knownCodes-Ch2Jfq-m.mjs +0 -2
- package/dist/knownCodes-Ch2Jfq-m.mjs.map +0 -1
- package/dist/reporters-CtCZyH5W.mjs +0 -2
- package/dist/reporters-CtCZyH5W.mjs.map +0 -1
- package/dist/reporters-Wob0oyD9.cjs +0 -2
- package/dist/reporters-Wob0oyD9.cjs.map +0 -1
|
@@ -354,7 +354,7 @@ interface AnnotationComponentSpans {
|
|
|
354
354
|
/**
|
|
355
355
|
* Citation type discriminator for type-safe pattern matching.
|
|
356
356
|
*/
|
|
357
|
-
type CitationType = "case" | "docket" | "statute" | "regulation" | "stateRule" | "journal" | "neutral" | "publicLaw" | "federalRegister" | "statutesAtLarge" | "constitutional" | "federalRule" | "restatement" | "treatise" | "annotation" | "id" | "supra" | "shortFormCase";
|
|
357
|
+
type CitationType = "case" | "docket" | "statute" | "regulation" | "stateRule" | "journal" | "neutral" | "publicLaw" | "federalRegister" | "statutesAtLarge" | "sessionLaw" | "treaty" | "legislativeMaterial" | "localOrdinance" | "canon" | "constitutional" | "federalRule" | "restatement" | "treatise" | "annotation" | "id" | "supra" | "shortFormCase";
|
|
358
358
|
/**
|
|
359
359
|
* Warning generated during citation parsing.
|
|
360
360
|
*/
|
|
@@ -527,9 +527,16 @@ interface FullCaseCitation extends CitationBase {
|
|
|
527
527
|
*/
|
|
528
528
|
parentheticals?: Parenthetical[];
|
|
529
529
|
/**
|
|
530
|
-
* Subsequent history entries
|
|
530
|
+
* Subsequent history entries attached to this citation.
|
|
531
|
+
*
|
|
532
|
+
* Populated on every chain link that received a history clause from the
|
|
533
|
+
* scanner — not just the chain's root (#619, post-#527 contract change).
|
|
534
|
+
* For `Smith, aff'd, X, cert. denied, Y`, both `Smith` (carrying
|
|
535
|
+
* `[affirmed]` linking to `X`) and `X` (carrying `[cert_denied]`
|
|
536
|
+
* linking to `Y`) populate this field. Walk `subsequentHistoryOf`
|
|
537
|
+
* back-pointers from child→parent to traverse the chain in reverse.
|
|
538
|
+
*
|
|
531
539
|
* Each entry describes a procedural event (affirmed, reversed, etc.).
|
|
532
|
-
* Only populated on the parent (original) citation.
|
|
533
540
|
* @example [{ signal: "affirmed", rawSignal: "aff'd", signalSpan: {...}, order: 0 }]
|
|
534
541
|
*/
|
|
535
542
|
subsequentHistoryEntries?: SubsequentHistoryEntry[];
|
|
@@ -954,6 +961,127 @@ interface StatutesAtLargeCitation extends CitationBase {
|
|
|
954
961
|
spans?: StatutesAtLargeComponentSpans;
|
|
955
962
|
}
|
|
956
963
|
/**
|
|
964
|
+
* Session-law citation (#350, #779).
|
|
965
|
+
*
|
|
966
|
+
* State session laws — chronological compilations cited by year + chapter:
|
|
967
|
+
* California Statutes (`Stats. 1992, ch. 726, § 2, p. 3523`) and Nevada session
|
|
968
|
+
* laws (`2003 Nev. Stat., ch. 427, §§ 25-26, at 2590-95`). The federal analogue
|
|
969
|
+
* is `statutesAtLarge`; this jurisdiction-general type covers the state forms.
|
|
970
|
+
*/
|
|
971
|
+
interface SessionLawCitation extends CitationBase {
|
|
972
|
+
type: "sessionLaw";
|
|
973
|
+
/** Two-letter jurisdiction code (e.g. "CA", "NV") */
|
|
974
|
+
jurisdiction: string;
|
|
975
|
+
/** Session-law compilation label (e.g. "Stats." for CA, "Nev. Stat." for NV) */
|
|
976
|
+
code: string;
|
|
977
|
+
/** Session year */
|
|
978
|
+
year: number;
|
|
979
|
+
/** Chapter / bill number within that session */
|
|
980
|
+
chapter: string;
|
|
981
|
+
/** Single cited section, or the first of a list/range */
|
|
982
|
+
section?: string;
|
|
983
|
+
/** Multiple cited sections (`§§ 6, 7, 8` → `["6","7","8"]`) */
|
|
984
|
+
sections?: string[];
|
|
985
|
+
/** Section range (`§§ 25-26` → `{ start: "25", end: "26" }`) */
|
|
986
|
+
sectionRange?: {
|
|
987
|
+
start: string;
|
|
988
|
+
end: string;
|
|
989
|
+
};
|
|
990
|
+
/** Single cited page, or the first of a range */
|
|
991
|
+
page?: string;
|
|
992
|
+
/** Page range (`pp. 3038-3039`, `at 2590-95`) */
|
|
993
|
+
pageRange?: {
|
|
994
|
+
start: string;
|
|
995
|
+
end: string;
|
|
996
|
+
};
|
|
997
|
+
}
|
|
998
|
+
/**
|
|
999
|
+
* Treaty citation (#309).
|
|
1000
|
+
*
|
|
1001
|
+
* Treaty-series citations: "No."-style series (`T.I.A.S. No. 1502`, spacing-
|
|
1002
|
+
* tolerant) and volume-series-page forms (`1155 U.N.T.S. 331`, `123 U.S.T. 456`).
|
|
1003
|
+
* Named-treaty metadata (`treatyName` / `article` / `paragraph`) is reserved for
|
|
1004
|
+
* a follow-up and not yet populated.
|
|
1005
|
+
*/
|
|
1006
|
+
interface TreatyCitation extends CitationBase {
|
|
1007
|
+
type: "treaty";
|
|
1008
|
+
/** Treaty series identifier (e.g. "T.I.A.S.", "U.N.T.S.", "U.S.T.") */
|
|
1009
|
+
series?: string;
|
|
1010
|
+
/** Series number for "No."-style series (e.g. `T.I.A.S. No. 1502` → "1502") */
|
|
1011
|
+
seriesNumber?: string;
|
|
1012
|
+
/** Volume for volume-series-page forms (e.g. `1155 U.N.T.S. 331` → 1155) */
|
|
1013
|
+
volume?: number;
|
|
1014
|
+
/** Page for volume-series-page forms */
|
|
1015
|
+
page?: number;
|
|
1016
|
+
/** Named treaty title (reserved; not yet populated) */
|
|
1017
|
+
treatyName?: string;
|
|
1018
|
+
/** Cited article (reserved) */
|
|
1019
|
+
article?: string;
|
|
1020
|
+
/** Cited paragraph (reserved) */
|
|
1021
|
+
paragraph?: string;
|
|
1022
|
+
/** Publication year (reserved) */
|
|
1023
|
+
year?: number;
|
|
1024
|
+
}
|
|
1025
|
+
/**
|
|
1026
|
+
* Legislative-material citation (#308).
|
|
1027
|
+
*
|
|
1028
|
+
* House/Senate committee reports (`H.R. Rep. No. 94-1487, p. 16 (1976)`) and the
|
|
1029
|
+
* Congressional Record (`112 Cong. Rec. 1234`), unified via the `kind`
|
|
1030
|
+
* discriminator. The "U.S. Code Cong. & Admin. News" form is reserved for a
|
|
1031
|
+
* follow-up.
|
|
1032
|
+
*/
|
|
1033
|
+
interface LegislativeMaterialCitation extends CitationBase {
|
|
1034
|
+
type: "legislativeMaterial";
|
|
1035
|
+
/** Distinguishes a committee/conference report from a Congressional Record cite */
|
|
1036
|
+
kind: "report" | "congressionalRecord";
|
|
1037
|
+
/** Chamber for reports */
|
|
1038
|
+
chamber?: "House" | "Senate";
|
|
1039
|
+
/** Report number, e.g. "94-1487" or "595" */
|
|
1040
|
+
reportNumber?: string;
|
|
1041
|
+
/** Congress number when stated, e.g. 95 */
|
|
1042
|
+
congress?: number;
|
|
1043
|
+
/** Session ordinal when stated, e.g. "1st", "2d" */
|
|
1044
|
+
session?: string;
|
|
1045
|
+
/** Volume for Congressional Record cites */
|
|
1046
|
+
volume?: number;
|
|
1047
|
+
/** Page (report page or Congressional Record page) */
|
|
1048
|
+
page?: number;
|
|
1049
|
+
/** Year, from a trailing `(YYYY)` parenthetical */
|
|
1050
|
+
year?: number;
|
|
1051
|
+
}
|
|
1052
|
+
/**
|
|
1053
|
+
* Local / municipal ordinance citation (#778).
|
|
1054
|
+
*
|
|
1055
|
+
* Clark County Code/Ordinance (`CCCO § 2.12.010(1)`) is the first member of this
|
|
1056
|
+
* jurisdiction-general type (designed to also fit Cook County, L.A. County, and
|
|
1057
|
+
* Miami-Dade municipal codes).
|
|
1058
|
+
*/
|
|
1059
|
+
interface LocalOrdinanceCitation extends CitationBase {
|
|
1060
|
+
type: "localOrdinance";
|
|
1061
|
+
/** Ordinance code abbreviation (e.g. "CCCO" — Clark County Code/Ordinance) */
|
|
1062
|
+
code: string;
|
|
1063
|
+
/** Locality the code belongs to (e.g. "Clark County, NV") */
|
|
1064
|
+
locality?: string;
|
|
1065
|
+
/** Cited section (e.g. "2.12.010(1)") */
|
|
1066
|
+
section: string;
|
|
1067
|
+
}
|
|
1068
|
+
/**
|
|
1069
|
+
* Judicial-conduct canon citation (#310).
|
|
1070
|
+
*
|
|
1071
|
+
* Code of Judicial Conduct canons: `Canon 7(B)(1)`, `Canon 2(A) of the Code of
|
|
1072
|
+
* Judicial Conduct`. Distinct from attorney disciplinary/model rules (#295) —
|
|
1073
|
+
* this is judicial conduct.
|
|
1074
|
+
*/
|
|
1075
|
+
interface CanonCitation extends CitationBase {
|
|
1076
|
+
type: "canon";
|
|
1077
|
+
/** Canon number, e.g. "7", "2" */
|
|
1078
|
+
canon: string;
|
|
1079
|
+
/** Subsection chain, e.g. "(B)(1)", "(A)" */
|
|
1080
|
+
subsection?: string;
|
|
1081
|
+
/** Rule set when stated explicitly, e.g. "Code of Judicial Conduct" */
|
|
1082
|
+
ruleSet?: string;
|
|
1083
|
+
}
|
|
1084
|
+
/**
|
|
957
1085
|
* Federal Rules of Procedure citation (#576).
|
|
958
1086
|
*
|
|
959
1087
|
* Covers the four primary federal rule sets (civil, criminal, evidence,
|
|
@@ -1145,10 +1273,14 @@ interface ConstitutionalCitation extends CitationBase {
|
|
|
1145
1273
|
type: "constitutional";
|
|
1146
1274
|
/** Jurisdiction code: "US", 2-letter state code, or undefined for bare "Const." */
|
|
1147
1275
|
jurisdiction?: string;
|
|
1148
|
-
/** Article number (parsed from Roman numerals) — mutually exclusive with amendment */
|
|
1276
|
+
/** Article number (parsed from Roman numerals) — mutually exclusive with amendment / preamble */
|
|
1149
1277
|
article?: number;
|
|
1150
|
-
/** Amendment number (parsed from Roman numerals) — mutually exclusive with article */
|
|
1278
|
+
/** Amendment number (parsed from Roman numerals) — mutually exclusive with article / preamble */
|
|
1151
1279
|
amendment?: number;
|
|
1280
|
+
/** True when the citation references the Preamble (`U.S. Const. pmbl.`,
|
|
1281
|
+
* `U.S. Const. preamble`). Mutually exclusive with article / amendment.
|
|
1282
|
+
* Section and clause are not applicable to preamble. #321 */
|
|
1283
|
+
preamble?: boolean;
|
|
1152
1284
|
/** Section identifier (string to handle non-numeric like "3-a") */
|
|
1153
1285
|
section?: string;
|
|
1154
1286
|
/** Clause number (always numeric) */
|
|
@@ -1329,16 +1461,16 @@ interface ShortFormCaseCitation extends CitationBase {
|
|
|
1329
1461
|
* // ...
|
|
1330
1462
|
* }
|
|
1331
1463
|
*/
|
|
1332
|
-
type Citation = FullCaseCitation | DocketCitation | StatuteCitation | RegulationCitation | JournalCitation | NeutralCitation | PublicLawCitation | FederalRegisterCitation | StatutesAtLargeCitation | ConstitutionalCitation | FederalRuleCitation | StateRuleCitation | RestatementCitation | TreatiseCitation | AnnotationCitation | IdCitation | SupraCitation | ShortFormCaseCitation;
|
|
1464
|
+
type Citation = FullCaseCitation | DocketCitation | StatuteCitation | RegulationCitation | JournalCitation | NeutralCitation | PublicLawCitation | FederalRegisterCitation | StatutesAtLargeCitation | ConstitutionalCitation | FederalRuleCitation | StateRuleCitation | RestatementCitation | TreatiseCitation | AnnotationCitation | SessionLawCitation | TreatyCitation | LegislativeMaterialCitation | LocalOrdinanceCitation | CanonCitation | IdCitation | SupraCitation | ShortFormCaseCitation;
|
|
1333
1465
|
/**
|
|
1334
1466
|
* Citation type discriminators grouped by category.
|
|
1335
1467
|
*/
|
|
1336
|
-
type FullCitationType = "case" | "docket" | "statute" | "journal" | "neutral" | "publicLaw" | "federalRegister" | "statutesAtLarge" | "constitutional" | "federalRule" | "stateRule" | "restatement" | "treatise" | "annotation";
|
|
1468
|
+
type FullCitationType = "case" | "docket" | "statute" | "journal" | "neutral" | "publicLaw" | "federalRegister" | "statutesAtLarge" | "sessionLaw" | "treaty" | "legislativeMaterial" | "localOrdinance" | "canon" | "constitutional" | "federalRule" | "stateRule" | "restatement" | "treatise" | "annotation";
|
|
1337
1469
|
type ShortFormCitationType = "id" | "supra" | "shortFormCase";
|
|
1338
1470
|
/**
|
|
1339
1471
|
* Union of all full citation types (not short-form references).
|
|
1340
1472
|
*/
|
|
1341
|
-
type FullCitation = FullCaseCitation | DocketCitation | StatuteCitation | JournalCitation | NeutralCitation | PublicLawCitation | FederalRegisterCitation | StatutesAtLargeCitation | ConstitutionalCitation | FederalRuleCitation | StateRuleCitation | RestatementCitation | TreatiseCitation | AnnotationCitation;
|
|
1473
|
+
type FullCitation = FullCaseCitation | SessionLawCitation | TreatyCitation | LegislativeMaterialCitation | LocalOrdinanceCitation | CanonCitation | DocketCitation | StatuteCitation | JournalCitation | NeutralCitation | PublicLawCitation | FederalRegisterCitation | StatutesAtLargeCitation | ConstitutionalCitation | FederalRuleCitation | StateRuleCitation | RestatementCitation | TreatiseCitation | AnnotationCitation;
|
|
1342
1474
|
/**
|
|
1343
1475
|
* Union of all short-form citation types (Id., supra, short-form case).
|
|
1344
1476
|
*/
|
|
@@ -1362,4 +1494,4 @@ type CitationOfType<T extends CitationType> = Extract<Citation, {
|
|
|
1362
1494
|
type ExtractorMap = { [K in FullCitationType]: CitationOfType<K> };
|
|
1363
1495
|
//#endregion
|
|
1364
1496
|
export { SubsequentHistoryEntry as A, NeutralComponentSpans as B, RegulationCitation as C, ShortFormCitationType as D, ShortFormCitation as E, CaseComponentSpans as F, TreatiseComponentSpans as G, RestatementComponentSpans as H, ConstitutionalComponentSpans as I, spanFromGroupIndex as J, Span as K, FederalRegisterComponentSpans as L, TreatiseCitation as M, Warning as N, StatuteCitation as O, AnnotationComponentSpans as P, FederalRuleComponentSpans as R, PublicLawCitation as S, ShortFormCaseCitation as T, StatuteComponentSpans as U, PublicLawComponentSpans as V, StatutesAtLargeComponentSpans as W, parsePincite as X, PinciteInfo as Y, IdCitation as _, CitationSignal as a, Parenthetical as b, CourtInference as c, FederalRegisterCitation as d, FederalRuleCitation as f, HistorySignal as g, FullCitationType as h, CitationOfType as i, SupraCitation as j, StatutesAtLargeCitation as k, DocketCitation as l, FullCitation as m, Citation as n, CitationType as o, FullCaseCitation as p, TransformationMap as q, CitationBase as r, ConstitutionalCitation as s, AnnotationCitation as t, ExtractorMap as u, JournalCitation as v, RestatementCitation as w, ParentheticalType as x, NeutralCitation as y, JournalComponentSpans as z };
|
|
1365
|
-
//# sourceMappingURL=citation-
|
|
1497
|
+
//# sourceMappingURL=citation-CC26NIPR.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"citation-CC26NIPR.d.cts","names":[],"sources":["../src/extract/pincite.ts","../src/extract/dates.ts","../src/clean/segmentMap.ts","../src/types/span.ts","../src/types/componentSpans.ts","../src/types/citation.ts"],"mappings":";;AAUA;;;;;;;;;UAAiB,WAAA;;EAEf,IAAA;;EAEA,OAAA;;;EAGA,QAAA;EA+DF;EA7DE,WAAA;;EAEA,OAAA;EA2DyC;;;EAvDzC,QAAA;ECNF;EDQE,SAAA;;EAEA,YAAA;;;;;;ACDF;;EDSE,kBAAA,GAAqB,WAAA;ECLb;EDOR,GAAA;AAAA;;;;;;;AE/BF;;;;;;;iBFwEgB,YAAA,CAAa,GAAA,WAAc,WAAA;;;;AAtE3C;;;;;;;;;;;;;;;;;UCSiB,UAAA;EACf,IAAA;EACA,KAAA;EACA,GAAA;AAAA;;;;UAMe,cAAA;EATA;EAWf,GAAA;EAXe;EAaf,MAAA,EAAQ,UAAA;AAAA;;;;ADtBV;;;;;;UEFiB,OAAA;;EAEf,QAAA;;EAEA,OAAA;;EAEA,GAAA;AAAA;AAAA,cAGW,UAAA;EAAA,SACF,QAAA,WAAmB,OAAA;EAE5B,WAAA,CAAY,QAAA,EAAU,OAAA;EF4DxB;;;EAAA,OErDS,QAAA,CAAS,MAAA,WAAiB,UAAA;EFqDQ;;;;AC7D3C;ED6D2C,OE5ClC,OAAA,CAAQ,GAAA,EAAK,GAAA,mBAAsB,UAAA;;;;;EAkC1C,MAAA,CAAO,QAAA;AAAA;;;;AF5DT;;;;;;;;;;;;;;;;UGOiB,IAAA;EH+DjB;EG7DE,UAAA;;EAGA,QAAA;EH0DyC;EGvDzC,aAAA;;EAGA,WAAA;AAAA;;;;;;;UASe,iBAAA;EFff;EEi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GF;;;;;;;;;;;;;AAWA;KAxFY,QAAA,GACR,gBAAA,GACA,cAAA,GACA,eAAA,GACA,kBAAA,GACA,eAAA,GACA,eAAA,GACA,iBAAA,GACA,uBAAA,GACA,uBAAA,GACA,sBAAA,GACA,mBAAA,GACA,iBAAA,GACA,mBAAA,GACA,gBAAA,GACA,kBAAA,GACA,kBAAA,GACA,cAAA,GACA,2BAAA,GACA,sBAAA,GACA,aAAA,GACA,UAAA,GACA,aAAA,GACA,qBAAA;;;;KAKQ,gBAAA;AAAA,KAoBA,qBAAA;;;;KAKA,YAAA,GACR,gBAAA,GACA,kBAAA,GACA,cAAA,GACA,2BAAA,GACA,sBAAA,GACA,aAAA,GACA,cAAA,GACA,eAAA,GACA,eAAA,GACA,eAAA,GACA,iBAAA,GACA,uBAAA,GACA,uBAAA,GACA,sBAAA,GACA,mBAAA,GACA,iBAAA,GACA,mBAAA,GACA,gBAAA,GACA,kBAAA;;;;KAKQ,iBAAA,GAAoB,UAAA,GAAa,aAAA,GAAgB,qBAAA;;;AAiB7D;;;;;;;KANY,cAAA,WAAyB,YAAA,IAAgB,OAAA,CAAQ,QAAA;EAAY,IAAA,EAAM,CAAA;AAAA;;;;;KAMnE,YAAA,WACJ,gBAAA,GAAmB,cAAA,CAAe,CAAA"}
|
|
@@ -354,7 +354,7 @@ interface AnnotationComponentSpans {
|
|
|
354
354
|
/**
|
|
355
355
|
* Citation type discriminator for type-safe pattern matching.
|
|
356
356
|
*/
|
|
357
|
-
type CitationType = "case" | "docket" | "statute" | "regulation" | "stateRule" | "journal" | "neutral" | "publicLaw" | "federalRegister" | "statutesAtLarge" | "constitutional" | "federalRule" | "restatement" | "treatise" | "annotation" | "id" | "supra" | "shortFormCase";
|
|
357
|
+
type CitationType = "case" | "docket" | "statute" | "regulation" | "stateRule" | "journal" | "neutral" | "publicLaw" | "federalRegister" | "statutesAtLarge" | "sessionLaw" | "treaty" | "legislativeMaterial" | "localOrdinance" | "canon" | "constitutional" | "federalRule" | "restatement" | "treatise" | "annotation" | "id" | "supra" | "shortFormCase";
|
|
358
358
|
/**
|
|
359
359
|
* Warning generated during citation parsing.
|
|
360
360
|
*/
|
|
@@ -527,9 +527,16 @@ interface FullCaseCitation extends CitationBase {
|
|
|
527
527
|
*/
|
|
528
528
|
parentheticals?: Parenthetical[];
|
|
529
529
|
/**
|
|
530
|
-
* Subsequent history entries
|
|
530
|
+
* Subsequent history entries attached to this citation.
|
|
531
|
+
*
|
|
532
|
+
* Populated on every chain link that received a history clause from the
|
|
533
|
+
* scanner — not just the chain's root (#619, post-#527 contract change).
|
|
534
|
+
* For `Smith, aff'd, X, cert. denied, Y`, both `Smith` (carrying
|
|
535
|
+
* `[affirmed]` linking to `X`) and `X` (carrying `[cert_denied]`
|
|
536
|
+
* linking to `Y`) populate this field. Walk `subsequentHistoryOf`
|
|
537
|
+
* back-pointers from child→parent to traverse the chain in reverse.
|
|
538
|
+
*
|
|
531
539
|
* Each entry describes a procedural event (affirmed, reversed, etc.).
|
|
532
|
-
* Only populated on the parent (original) citation.
|
|
533
540
|
* @example [{ signal: "affirmed", rawSignal: "aff'd", signalSpan: {...}, order: 0 }]
|
|
534
541
|
*/
|
|
535
542
|
subsequentHistoryEntries?: SubsequentHistoryEntry[];
|
|
@@ -954,6 +961,127 @@ interface StatutesAtLargeCitation extends CitationBase {
|
|
|
954
961
|
spans?: StatutesAtLargeComponentSpans;
|
|
955
962
|
}
|
|
956
963
|
/**
|
|
964
|
+
* Session-law citation (#350, #779).
|
|
965
|
+
*
|
|
966
|
+
* State session laws — chronological compilations cited by year + chapter:
|
|
967
|
+
* California Statutes (`Stats. 1992, ch. 726, § 2, p. 3523`) and Nevada session
|
|
968
|
+
* laws (`2003 Nev. Stat., ch. 427, §§ 25-26, at 2590-95`). The federal analogue
|
|
969
|
+
* is `statutesAtLarge`; this jurisdiction-general type covers the state forms.
|
|
970
|
+
*/
|
|
971
|
+
interface SessionLawCitation extends CitationBase {
|
|
972
|
+
type: "sessionLaw";
|
|
973
|
+
/** Two-letter jurisdiction code (e.g. "CA", "NV") */
|
|
974
|
+
jurisdiction: string;
|
|
975
|
+
/** Session-law compilation label (e.g. "Stats." for CA, "Nev. Stat." for NV) */
|
|
976
|
+
code: string;
|
|
977
|
+
/** Session year */
|
|
978
|
+
year: number;
|
|
979
|
+
/** Chapter / bill number within that session */
|
|
980
|
+
chapter: string;
|
|
981
|
+
/** Single cited section, or the first of a list/range */
|
|
982
|
+
section?: string;
|
|
983
|
+
/** Multiple cited sections (`§§ 6, 7, 8` → `["6","7","8"]`) */
|
|
984
|
+
sections?: string[];
|
|
985
|
+
/** Section range (`§§ 25-26` → `{ start: "25", end: "26" }`) */
|
|
986
|
+
sectionRange?: {
|
|
987
|
+
start: string;
|
|
988
|
+
end: string;
|
|
989
|
+
};
|
|
990
|
+
/** Single cited page, or the first of a range */
|
|
991
|
+
page?: string;
|
|
992
|
+
/** Page range (`pp. 3038-3039`, `at 2590-95`) */
|
|
993
|
+
pageRange?: {
|
|
994
|
+
start: string;
|
|
995
|
+
end: string;
|
|
996
|
+
};
|
|
997
|
+
}
|
|
998
|
+
/**
|
|
999
|
+
* Treaty citation (#309).
|
|
1000
|
+
*
|
|
1001
|
+
* Treaty-series citations: "No."-style series (`T.I.A.S. No. 1502`, spacing-
|
|
1002
|
+
* tolerant) and volume-series-page forms (`1155 U.N.T.S. 331`, `123 U.S.T. 456`).
|
|
1003
|
+
* Named-treaty metadata (`treatyName` / `article` / `paragraph`) is reserved for
|
|
1004
|
+
* a follow-up and not yet populated.
|
|
1005
|
+
*/
|
|
1006
|
+
interface TreatyCitation extends CitationBase {
|
|
1007
|
+
type: "treaty";
|
|
1008
|
+
/** Treaty series identifier (e.g. "T.I.A.S.", "U.N.T.S.", "U.S.T.") */
|
|
1009
|
+
series?: string;
|
|
1010
|
+
/** Series number for "No."-style series (e.g. `T.I.A.S. No. 1502` → "1502") */
|
|
1011
|
+
seriesNumber?: string;
|
|
1012
|
+
/** Volume for volume-series-page forms (e.g. `1155 U.N.T.S. 331` → 1155) */
|
|
1013
|
+
volume?: number;
|
|
1014
|
+
/** Page for volume-series-page forms */
|
|
1015
|
+
page?: number;
|
|
1016
|
+
/** Named treaty title (reserved; not yet populated) */
|
|
1017
|
+
treatyName?: string;
|
|
1018
|
+
/** Cited article (reserved) */
|
|
1019
|
+
article?: string;
|
|
1020
|
+
/** Cited paragraph (reserved) */
|
|
1021
|
+
paragraph?: string;
|
|
1022
|
+
/** Publication year (reserved) */
|
|
1023
|
+
year?: number;
|
|
1024
|
+
}
|
|
1025
|
+
/**
|
|
1026
|
+
* Legislative-material citation (#308).
|
|
1027
|
+
*
|
|
1028
|
+
* House/Senate committee reports (`H.R. Rep. No. 94-1487, p. 16 (1976)`) and the
|
|
1029
|
+
* Congressional Record (`112 Cong. Rec. 1234`), unified via the `kind`
|
|
1030
|
+
* discriminator. The "U.S. Code Cong. & Admin. News" form is reserved for a
|
|
1031
|
+
* follow-up.
|
|
1032
|
+
*/
|
|
1033
|
+
interface LegislativeMaterialCitation extends CitationBase {
|
|
1034
|
+
type: "legislativeMaterial";
|
|
1035
|
+
/** Distinguishes a committee/conference report from a Congressional Record cite */
|
|
1036
|
+
kind: "report" | "congressionalRecord";
|
|
1037
|
+
/** Chamber for reports */
|
|
1038
|
+
chamber?: "House" | "Senate";
|
|
1039
|
+
/** Report number, e.g. "94-1487" or "595" */
|
|
1040
|
+
reportNumber?: string;
|
|
1041
|
+
/** Congress number when stated, e.g. 95 */
|
|
1042
|
+
congress?: number;
|
|
1043
|
+
/** Session ordinal when stated, e.g. "1st", "2d" */
|
|
1044
|
+
session?: string;
|
|
1045
|
+
/** Volume for Congressional Record cites */
|
|
1046
|
+
volume?: number;
|
|
1047
|
+
/** Page (report page or Congressional Record page) */
|
|
1048
|
+
page?: number;
|
|
1049
|
+
/** Year, from a trailing `(YYYY)` parenthetical */
|
|
1050
|
+
year?: number;
|
|
1051
|
+
}
|
|
1052
|
+
/**
|
|
1053
|
+
* Local / municipal ordinance citation (#778).
|
|
1054
|
+
*
|
|
1055
|
+
* Clark County Code/Ordinance (`CCCO § 2.12.010(1)`) is the first member of this
|
|
1056
|
+
* jurisdiction-general type (designed to also fit Cook County, L.A. County, and
|
|
1057
|
+
* Miami-Dade municipal codes).
|
|
1058
|
+
*/
|
|
1059
|
+
interface LocalOrdinanceCitation extends CitationBase {
|
|
1060
|
+
type: "localOrdinance";
|
|
1061
|
+
/** Ordinance code abbreviation (e.g. "CCCO" — Clark County Code/Ordinance) */
|
|
1062
|
+
code: string;
|
|
1063
|
+
/** Locality the code belongs to (e.g. "Clark County, NV") */
|
|
1064
|
+
locality?: string;
|
|
1065
|
+
/** Cited section (e.g. "2.12.010(1)") */
|
|
1066
|
+
section: string;
|
|
1067
|
+
}
|
|
1068
|
+
/**
|
|
1069
|
+
* Judicial-conduct canon citation (#310).
|
|
1070
|
+
*
|
|
1071
|
+
* Code of Judicial Conduct canons: `Canon 7(B)(1)`, `Canon 2(A) of the Code of
|
|
1072
|
+
* Judicial Conduct`. Distinct from attorney disciplinary/model rules (#295) —
|
|
1073
|
+
* this is judicial conduct.
|
|
1074
|
+
*/
|
|
1075
|
+
interface CanonCitation extends CitationBase {
|
|
1076
|
+
type: "canon";
|
|
1077
|
+
/** Canon number, e.g. "7", "2" */
|
|
1078
|
+
canon: string;
|
|
1079
|
+
/** Subsection chain, e.g. "(B)(1)", "(A)" */
|
|
1080
|
+
subsection?: string;
|
|
1081
|
+
/** Rule set when stated explicitly, e.g. "Code of Judicial Conduct" */
|
|
1082
|
+
ruleSet?: string;
|
|
1083
|
+
}
|
|
1084
|
+
/**
|
|
957
1085
|
* Federal Rules of Procedure citation (#576).
|
|
958
1086
|
*
|
|
959
1087
|
* Covers the four primary federal rule sets (civil, criminal, evidence,
|
|
@@ -1145,10 +1273,14 @@ interface ConstitutionalCitation extends CitationBase {
|
|
|
1145
1273
|
type: "constitutional";
|
|
1146
1274
|
/** Jurisdiction code: "US", 2-letter state code, or undefined for bare "Const." */
|
|
1147
1275
|
jurisdiction?: string;
|
|
1148
|
-
/** Article number (parsed from Roman numerals) — mutually exclusive with amendment */
|
|
1276
|
+
/** Article number (parsed from Roman numerals) — mutually exclusive with amendment / preamble */
|
|
1149
1277
|
article?: number;
|
|
1150
|
-
/** Amendment number (parsed from Roman numerals) — mutually exclusive with article */
|
|
1278
|
+
/** Amendment number (parsed from Roman numerals) — mutually exclusive with article / preamble */
|
|
1151
1279
|
amendment?: number;
|
|
1280
|
+
/** True when the citation references the Preamble (`U.S. Const. pmbl.`,
|
|
1281
|
+
* `U.S. Const. preamble`). Mutually exclusive with article / amendment.
|
|
1282
|
+
* Section and clause are not applicable to preamble. #321 */
|
|
1283
|
+
preamble?: boolean;
|
|
1152
1284
|
/** Section identifier (string to handle non-numeric like "3-a") */
|
|
1153
1285
|
section?: string;
|
|
1154
1286
|
/** Clause number (always numeric) */
|
|
@@ -1329,16 +1461,16 @@ interface ShortFormCaseCitation extends CitationBase {
|
|
|
1329
1461
|
* // ...
|
|
1330
1462
|
* }
|
|
1331
1463
|
*/
|
|
1332
|
-
type Citation = FullCaseCitation | DocketCitation | StatuteCitation | RegulationCitation | JournalCitation | NeutralCitation | PublicLawCitation | FederalRegisterCitation | StatutesAtLargeCitation | ConstitutionalCitation | FederalRuleCitation | StateRuleCitation | RestatementCitation | TreatiseCitation | AnnotationCitation | IdCitation | SupraCitation | ShortFormCaseCitation;
|
|
1464
|
+
type Citation = FullCaseCitation | DocketCitation | StatuteCitation | RegulationCitation | JournalCitation | NeutralCitation | PublicLawCitation | FederalRegisterCitation | StatutesAtLargeCitation | ConstitutionalCitation | FederalRuleCitation | StateRuleCitation | RestatementCitation | TreatiseCitation | AnnotationCitation | SessionLawCitation | TreatyCitation | LegislativeMaterialCitation | LocalOrdinanceCitation | CanonCitation | IdCitation | SupraCitation | ShortFormCaseCitation;
|
|
1333
1465
|
/**
|
|
1334
1466
|
* Citation type discriminators grouped by category.
|
|
1335
1467
|
*/
|
|
1336
|
-
type FullCitationType = "case" | "docket" | "statute" | "journal" | "neutral" | "publicLaw" | "federalRegister" | "statutesAtLarge" | "constitutional" | "federalRule" | "stateRule" | "restatement" | "treatise" | "annotation";
|
|
1468
|
+
type FullCitationType = "case" | "docket" | "statute" | "journal" | "neutral" | "publicLaw" | "federalRegister" | "statutesAtLarge" | "sessionLaw" | "treaty" | "legislativeMaterial" | "localOrdinance" | "canon" | "constitutional" | "federalRule" | "stateRule" | "restatement" | "treatise" | "annotation";
|
|
1337
1469
|
type ShortFormCitationType = "id" | "supra" | "shortFormCase";
|
|
1338
1470
|
/**
|
|
1339
1471
|
* Union of all full citation types (not short-form references).
|
|
1340
1472
|
*/
|
|
1341
|
-
type FullCitation = FullCaseCitation | DocketCitation | StatuteCitation | JournalCitation | NeutralCitation | PublicLawCitation | FederalRegisterCitation | StatutesAtLargeCitation | ConstitutionalCitation | FederalRuleCitation | StateRuleCitation | RestatementCitation | TreatiseCitation | AnnotationCitation;
|
|
1473
|
+
type FullCitation = FullCaseCitation | SessionLawCitation | TreatyCitation | LegislativeMaterialCitation | LocalOrdinanceCitation | CanonCitation | DocketCitation | StatuteCitation | JournalCitation | NeutralCitation | PublicLawCitation | FederalRegisterCitation | StatutesAtLargeCitation | ConstitutionalCitation | FederalRuleCitation | StateRuleCitation | RestatementCitation | TreatiseCitation | AnnotationCitation;
|
|
1342
1474
|
/**
|
|
1343
1475
|
* Union of all short-form citation types (Id., supra, short-form case).
|
|
1344
1476
|
*/
|
|
@@ -1362,4 +1494,4 @@ type CitationOfType<T extends CitationType> = Extract<Citation, {
|
|
|
1362
1494
|
type ExtractorMap = { [K in FullCitationType]: CitationOfType<K> };
|
|
1363
1495
|
//#endregion
|
|
1364
1496
|
export { SubsequentHistoryEntry as A, NeutralComponentSpans as B, RegulationCitation as C, ShortFormCitationType as D, ShortFormCitation as E, CaseComponentSpans as F, TreatiseComponentSpans as G, RestatementComponentSpans as H, ConstitutionalComponentSpans as I, spanFromGroupIndex as J, Span as K, FederalRegisterComponentSpans as L, TreatiseCitation as M, Warning as N, StatuteCitation as O, AnnotationComponentSpans as P, FederalRuleComponentSpans as R, PublicLawCitation as S, ShortFormCaseCitation as T, StatuteComponentSpans as U, PublicLawComponentSpans as V, StatutesAtLargeComponentSpans as W, parsePincite as X, PinciteInfo as Y, IdCitation as _, CitationSignal as a, Parenthetical as b, CourtInference as c, FederalRegisterCitation as d, FederalRuleCitation as f, HistorySignal as g, FullCitationType as h, CitationOfType as i, SupraCitation as j, StatutesAtLargeCitation as k, DocketCitation as l, FullCitation as m, Citation as n, CitationType as o, FullCaseCitation as p, TransformationMap as q, CitationBase as r, ConstitutionalCitation as s, AnnotationCitation as t, ExtractorMap as u, JournalCitation as v, RestatementCitation as w, ParentheticalType as x, NeutralCitation as y, JournalComponentSpans as z };
|
|
1365
|
-
//# sourceMappingURL=citation-
|
|
1497
|
+
//# sourceMappingURL=citation-ag6I-jIx.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"citation-ag6I-jIx.d.mts","names":[],"sources":["../src/extract/pincite.ts","../src/extract/dates.ts","../src/clean/segmentMap.ts","../src/types/span.ts","../src/types/componentSpans.ts","../src/types/citation.ts"],"mappings":";;AAUA;;;;;;;;;UAAiB,WAAA;;EAEf,IAAA;;EAEA,OAAA;;;EAGA,QAAA;EA+DF;EA7DE,WAAA;;EAEA,OAAA;EA2DyC;;;EAvDzC,QAAA;ECNF;EDQE,SAAA;;EAEA,YAAA;;;;;;ACDF;;EDSE,kBAAA,GAAqB,WAAA;ECLb;EDOR,GAAA;AAAA;;;;;;;AE/BF;;;;;;;iBFwEgB,YAAA,CAAa,GAAA,WAAc,WAAA;;;;AAtE3C;;;;;;;;;;;;;;;;;UCSiB,UAAA;EACf,IAAA;EACA,KAAA;EACA,GAAA;AAAA;;;;UAMe,cAAA;EATA;EAWf,GAAA;EAXe;EAaf,MAAA,EAAQ,UAAA;AAAA;;;;ADtBV;;;;;;UEFiB,OAAA;;EAEf,QAAA;;EA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
package/dist/data/index.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`../knownCodes-
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`../knownCodes-exb5VIWR.cjs`);async function t(){let t=e.s();if(t)return t;let n=await Promise.resolve().then(()=>require(`../reporters.gen-VFW44Ywx.cjs`)),r=new Map,i=[],a=n.default;for(let[e,t]of Object.entries(a))for(let e of t){i.push(e);for(let t of Object.keys(e.editions)){let n=t.toLowerCase();r.has(n)||r.set(n,[]),r.get(n)?.push(e)}for(let[t,n]of Object.entries(e.variations||{})){let n=t.toLowerCase();r.has(n)||r.set(n,[]),r.get(n)?.push(e)}}let o={byAbbreviation:r,all:i};return e.c(o),o}function n(){return e.s()}async function r(e){return(await t()).byAbbreviation.get(e.toLowerCase())??[]}exports.abbreviatedCodes=e.t,exports.findAbbreviatedCode=e.n,exports.findNamedCode=e.r,exports.findReportersByAbbreviation=r,exports.getReportersSync=n,exports.loadReporters=t,exports.namedCodes=e.i,exports.stateStatuteEntries=e.o;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
package/dist/data/index.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","names":["_getReportersSync"],"sources":["../../src/data/reporters.ts"],"sourcesContent":["/**\n * Reporter database integration for citation validation\n *\n * This module provides lazy-loadable access to the reporters-db database,\n * containing 1200+ court reporters with variant forms. The library works\n * in degraded mode (pattern-based extraction only) if reporters are not loaded.\n *\n * @example\n * // Degraded mode: extraction works without reporter data\n * const citations = await extract(text)\n *\n * @example\n * // Full mode: load reporters for validation\n * await loadReporters()\n * const citations = await extract(text) // Now with reporter validation\n */\n\n/**\n * Edition entry from reporters-db\n *\n * Represents a specific edition of a reporter with start/end dates.\n */\nexport interface ReporterEdition {\n /** Start date in ISO 8601 format */\n start: string | null\n /** End date in ISO 8601 format (null if ongoing) */\n end: string | null\n}\n\n/**\n * Reporter entry from reporters-db\n *\n * Represents a single court reporter with all metadata needed for\n * citation validation and enrichment.\n *\n * Note: The reporters-db structure has the actual data; this interface\n * represents it flexibly to handle all variations in the JSON.\n */\nexport interface ReporterEntry {\n /** Full reporter name (e.g., \"Federal Reporter\") */\n name: string\n /** Citation type: state, federal, specialty, neutral, state_regional, etc. */\n cite_type: string\n /** Editions keyed by abbreviation (e.g., {\"F.2d\": {...}, \"F.3d\": {...}}) */\n editions: Record<string, ReporterEdition>\n /** Variant forms mapped to canonical form (e.g., {\"F. 2d\": \"F.2d\"}) */\n variations?: Record<string, string | undefined>\n /** MLZ jurisdiction identifiers (optional) */\n mlz_jurisdiction?: string[]\n /** Publisher (optional) */\n publisher?: string\n /** Notes (optional) */\n notes?: string\n}\n\n/**\n * In-memory reporter database with fast O(1) lookup\n *\n * Uses Map-based indexing for case-insensitive abbreviation lookup.\n * All variant forms are indexed to support fuzzy matching.\n */\nexport interface ReportersDatabase {\n /** Fast O(1) lookup by abbreviation (lowercase normalized keys) */\n byAbbreviation: Map<string, ReporterEntry[]>\n /** All reporters (for iteration/filtering) */\n all: ReporterEntry[]\n}\n\nimport {\n getReportersSync as _getReportersSync,\n setReportersCache,\n} from \"./reportersCache\"\n\n/**\n * Load reporter database asynchronously with lazy loading\n *\n * Dynamic import prevents loading 1200+ reporters until explicitly requested.\n * Result is cached after first load for subsequent calls.\n *\n * @returns Promise resolving to indexed reporter database\n *\n * @example\n * const db = await loadReporters()\n * const reporters = db.byAbbreviation.get('f.2d') // Fast O(1) lookup\n */\nexport async function loadReporters(): Promise<ReportersDatabase> {\n const existing = _getReportersSync()\n if (existing) return existing\n\n // Dynamic import
|
|
1
|
+
{"version":3,"file":"index.cjs","names":["_getReportersSync"],"sources":["../../src/data/reporters.ts"],"sourcesContent":["/**\n * Reporter database integration for citation validation\n *\n * This module provides lazy-loadable access to the reporters-db database,\n * containing 1200+ court reporters with variant forms. The library works\n * in degraded mode (pattern-based extraction only) if reporters are not loaded.\n *\n * @example\n * // Degraded mode: extraction works without reporter data\n * const citations = await extract(text)\n *\n * @example\n * // Full mode: load reporters for validation\n * await loadReporters()\n * const citations = await extract(text) // Now with reporter validation\n */\n\n/**\n * Edition entry from reporters-db\n *\n * Represents a specific edition of a reporter with start/end dates.\n */\nexport interface ReporterEdition {\n /** Start date in ISO 8601 format */\n start: string | null\n /** End date in ISO 8601 format (null if ongoing) */\n end: string | null\n}\n\n/**\n * Reporter entry from reporters-db\n *\n * Represents a single court reporter with all metadata needed for\n * citation validation and enrichment.\n *\n * Note: The reporters-db structure has the actual data; this interface\n * represents it flexibly to handle all variations in the JSON.\n */\nexport interface ReporterEntry {\n /** Full reporter name (e.g., \"Federal Reporter\") */\n name: string\n /** Citation type: state, federal, specialty, neutral, state_regional, etc. */\n cite_type: string\n /** Editions keyed by abbreviation (e.g., {\"F.2d\": {...}, \"F.3d\": {...}}) */\n editions: Record<string, ReporterEdition>\n /** Variant forms mapped to canonical form (e.g., {\"F. 2d\": \"F.2d\"}) */\n variations?: Record<string, string | undefined>\n /** MLZ jurisdiction identifiers (optional) */\n mlz_jurisdiction?: string[]\n /** Publisher (optional) */\n publisher?: string\n /** Notes (optional) */\n notes?: string\n}\n\n/**\n * In-memory reporter database with fast O(1) lookup\n *\n * Uses Map-based indexing for case-insensitive abbreviation lookup.\n * All variant forms are indexed to support fuzzy matching.\n */\nexport interface ReportersDatabase {\n /** Fast O(1) lookup by abbreviation (lowercase normalized keys) */\n byAbbreviation: Map<string, ReporterEntry[]>\n /** All reporters (for iteration/filtering) */\n all: ReporterEntry[]\n}\n\nimport {\n getReportersSync as _getReportersSync,\n setReportersCache,\n} from \"./reportersCache\"\n\n/**\n * Load reporter database asynchronously with lazy loading\n *\n * Dynamic import prevents loading 1200+ reporters until explicitly requested.\n * Result is cached after first load for subsequent calls.\n *\n * @returns Promise resolving to indexed reporter database\n *\n * @example\n * const db = await loadReporters()\n * const reporters = db.byAbbreviation.get('f.2d') // Fast O(1) lookup\n */\nexport async function loadReporters(): Promise<ReportersDatabase> {\n const existing = _getReportersSync()\n if (existing) return existing\n\n // Dynamic import of a codegenned TS module. Rolldown auto-splits this into\n // a separate ESM + CJS chunk in dist/, preserving lazy loading without the\n // import-attribute syntax that was deprecated in Node 22+. See #642.\n const mod = await import(\"./reporters.gen.js\")\n\n const byAbbreviation = new Map<string, ReporterEntry[]>()\n const all: ReporterEntry[] = []\n\n // reporters.json structure: { \"A.\": [...], \"F.2d\": [...], ... }\n const reportersData = mod.default as Record<string, ReporterEntry[]>\n\n // Build fast lookup index with lowercase normalization\n for (const [_canonicalAbbr, reporters] of Object.entries(reportersData)) {\n for (const reporter of reporters) {\n all.push(reporter)\n\n // Index by all edition abbreviations\n for (const editionAbbr of Object.keys(reporter.editions)) {\n const key = editionAbbr.toLowerCase()\n if (!byAbbreviation.has(key)) {\n byAbbreviation.set(key, [])\n }\n byAbbreviation.get(key)?.push(reporter)\n }\n\n // Index all variations for fuzzy matching\n for (const [variant, _canonical] of Object.entries(reporter.variations || {})) {\n const variantKey = variant.toLowerCase()\n if (!byAbbreviation.has(variantKey)) {\n byAbbreviation.set(variantKey, [])\n }\n byAbbreviation.get(variantKey)?.push(reporter)\n }\n }\n }\n\n const db: ReportersDatabase = { byAbbreviation, all }\n setReportersCache(db)\n return db\n}\n\n/**\n * Get cached reporter database synchronously (degraded mode support)\n *\n * Returns null if reporters not loaded yet. This enables the library to\n * work in degraded mode without reporter validation.\n *\n * @returns Cached database or null if not loaded\n *\n * @example\n * const db = getReportersSync()\n * if (db) {\n * // Full mode: validate citations\n * } else {\n * // Degraded mode: extract without validation\n * }\n */\nexport function getReportersSync(): ReportersDatabase | null {\n return _getReportersSync()\n}\n\n/**\n * Find reporters by abbreviation (case-insensitive)\n *\n * Loads reporter database if not already loaded. Returns all reporters\n * matching the abbreviation (including variant forms).\n *\n * @param abbr - Reporter abbreviation to look up\n * @returns Promise resolving to matching reporters (empty array if none)\n *\n * @example\n * const reporters = await findReportersByAbbreviation('F.2d')\n * // [{ abbreviation: 'F.2d', name: 'Federal Reporter, Second Series', ... }]\n *\n * @example\n * const unknown = await findReportersByAbbreviation('NONEXISTENT')\n * // [] (empty array, not error)\n */\nexport async function findReportersByAbbreviation(abbr: string): Promise<ReporterEntry[]> {\n const db = await loadReporters()\n return db.byAbbreviation.get(abbr.toLowerCase()) ?? []\n}\n"],"mappings":"iHAqFA,eAAsB,GAA4C,CAChE,IAAM,EAAWA,EAAAA,GAAmB,CACpC,GAAI,EAAU,OAAO,EAKrB,IAAM,EAAM,MAAA,QAAA,SAAA,CAAA,SAAA,QAAM,gCAAA,CAAA,CAEZ,EAAiB,IAAI,IACrB,EAAuB,EAAE,CAGzB,EAAgB,EAAI,QAG1B,IAAK,GAAM,CAAC,EAAgB,KAAc,OAAO,QAAQ,EAAc,CACrE,IAAK,IAAM,KAAY,EAAW,CAChC,EAAI,KAAK,EAAS,CAGlB,IAAK,IAAM,KAAe,OAAO,KAAK,EAAS,SAAS,CAAE,CACxD,IAAM,EAAM,EAAY,aAAa,CAChC,EAAe,IAAI,EAAI,EAC1B,EAAe,IAAI,EAAK,EAAE,CAAC,CAE7B,EAAe,IAAI,EAAI,EAAE,KAAK,EAAS,CAIzC,IAAK,GAAM,CAAC,EAAS,KAAe,OAAO,QAAQ,EAAS,YAAc,EAAE,CAAC,CAAE,CAC7E,IAAM,EAAa,EAAQ,aAAa,CACnC,EAAe,IAAI,EAAW,EACjC,EAAe,IAAI,EAAY,EAAE,CAAC,CAEpC,EAAe,IAAI,EAAW,EAAE,KAAK,EAAS,EAKpD,IAAM,EAAwB,CAAE,iBAAgB,MAAK,CAErD,OADA,EAAA,EAAkB,EAAG,CACd,EAmBT,SAAgB,GAA6C,CAC3D,OAAOA,EAAAA,GAAmB,CAoB5B,eAAsB,EAA4B,EAAwC,CAExF,OADW,MAAM,GAAe,EACtB,eAAe,IAAI,EAAK,aAAa,CAAC,EAAI,EAAE"}
|
package/dist/data/index.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{c as e,i as t,n,o as r,r as i,s as a,t as o}from"../knownCodes-
|
|
1
|
+
import{c as e,i as t,n,o as r,r as i,s as a,t as o}from"../knownCodes-Cf-QBqyM.mjs";async function s(){let t=a();if(t)return t;let n=await import(`../reporters.gen-CjY2GNBF.mjs`),r=new Map,i=[],o=n.default;for(let[e,t]of Object.entries(o))for(let e of t){i.push(e);for(let t of Object.keys(e.editions)){let n=t.toLowerCase();r.has(n)||r.set(n,[]),r.get(n)?.push(e)}for(let[t,n]of Object.entries(e.variations||{})){let n=t.toLowerCase();r.has(n)||r.set(n,[]),r.get(n)?.push(e)}}let s={byAbbreviation:r,all:i};return e(s),s}function c(){return a()}async function l(e){return(await s()).byAbbreviation.get(e.toLowerCase())??[]}export{o as abbreviatedCodes,n as findAbbreviatedCode,i as findNamedCode,l as findReportersByAbbreviation,c as getReportersSync,s as loadReporters,t as namedCodes,r as stateStatuteEntries};
|
|
2
2
|
//# sourceMappingURL=index.mjs.map
|
package/dist/data/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","names":["_getReportersSync"],"sources":["../../src/data/reporters.ts"],"sourcesContent":["/**\n * Reporter database integration for citation validation\n *\n * This module provides lazy-loadable access to the reporters-db database,\n * containing 1200+ court reporters with variant forms. The library works\n * in degraded mode (pattern-based extraction only) if reporters are not loaded.\n *\n * @example\n * // Degraded mode: extraction works without reporter data\n * const citations = await extract(text)\n *\n * @example\n * // Full mode: load reporters for validation\n * await loadReporters()\n * const citations = await extract(text) // Now with reporter validation\n */\n\n/**\n * Edition entry from reporters-db\n *\n * Represents a specific edition of a reporter with start/end dates.\n */\nexport interface ReporterEdition {\n /** Start date in ISO 8601 format */\n start: string | null\n /** End date in ISO 8601 format (null if ongoing) */\n end: string | null\n}\n\n/**\n * Reporter entry from reporters-db\n *\n * Represents a single court reporter with all metadata needed for\n * citation validation and enrichment.\n *\n * Note: The reporters-db structure has the actual data; this interface\n * represents it flexibly to handle all variations in the JSON.\n */\nexport interface ReporterEntry {\n /** Full reporter name (e.g., \"Federal Reporter\") */\n name: string\n /** Citation type: state, federal, specialty, neutral, state_regional, etc. */\n cite_type: string\n /** Editions keyed by abbreviation (e.g., {\"F.2d\": {...}, \"F.3d\": {...}}) */\n editions: Record<string, ReporterEdition>\n /** Variant forms mapped to canonical form (e.g., {\"F. 2d\": \"F.2d\"}) */\n variations?: Record<string, string | undefined>\n /** MLZ jurisdiction identifiers (optional) */\n mlz_jurisdiction?: string[]\n /** Publisher (optional) */\n publisher?: string\n /** Notes (optional) */\n notes?: string\n}\n\n/**\n * In-memory reporter database with fast O(1) lookup\n *\n * Uses Map-based indexing for case-insensitive abbreviation lookup.\n * All variant forms are indexed to support fuzzy matching.\n */\nexport interface ReportersDatabase {\n /** Fast O(1) lookup by abbreviation (lowercase normalized keys) */\n byAbbreviation: Map<string, ReporterEntry[]>\n /** All reporters (for iteration/filtering) */\n all: ReporterEntry[]\n}\n\nimport {\n getReportersSync as _getReportersSync,\n setReportersCache,\n} from \"./reportersCache\"\n\n/**\n * Load reporter database asynchronously with lazy loading\n *\n * Dynamic import prevents loading 1200+ reporters until explicitly requested.\n * Result is cached after first load for subsequent calls.\n *\n * @returns Promise resolving to indexed reporter database\n *\n * @example\n * const db = await loadReporters()\n * const reporters = db.byAbbreviation.get('f.2d') // Fast O(1) lookup\n */\nexport async function loadReporters(): Promise<ReportersDatabase> {\n const existing = _getReportersSync()\n if (existing) return existing\n\n // Dynamic import
|
|
1
|
+
{"version":3,"file":"index.mjs","names":["_getReportersSync"],"sources":["../../src/data/reporters.ts"],"sourcesContent":["/**\n * Reporter database integration for citation validation\n *\n * This module provides lazy-loadable access to the reporters-db database,\n * containing 1200+ court reporters with variant forms. The library works\n * in degraded mode (pattern-based extraction only) if reporters are not loaded.\n *\n * @example\n * // Degraded mode: extraction works without reporter data\n * const citations = await extract(text)\n *\n * @example\n * // Full mode: load reporters for validation\n * await loadReporters()\n * const citations = await extract(text) // Now with reporter validation\n */\n\n/**\n * Edition entry from reporters-db\n *\n * Represents a specific edition of a reporter with start/end dates.\n */\nexport interface ReporterEdition {\n /** Start date in ISO 8601 format */\n start: string | null\n /** End date in ISO 8601 format (null if ongoing) */\n end: string | null\n}\n\n/**\n * Reporter entry from reporters-db\n *\n * Represents a single court reporter with all metadata needed for\n * citation validation and enrichment.\n *\n * Note: The reporters-db structure has the actual data; this interface\n * represents it flexibly to handle all variations in the JSON.\n */\nexport interface ReporterEntry {\n /** Full reporter name (e.g., \"Federal Reporter\") */\n name: string\n /** Citation type: state, federal, specialty, neutral, state_regional, etc. */\n cite_type: string\n /** Editions keyed by abbreviation (e.g., {\"F.2d\": {...}, \"F.3d\": {...}}) */\n editions: Record<string, ReporterEdition>\n /** Variant forms mapped to canonical form (e.g., {\"F. 2d\": \"F.2d\"}) */\n variations?: Record<string, string | undefined>\n /** MLZ jurisdiction identifiers (optional) */\n mlz_jurisdiction?: string[]\n /** Publisher (optional) */\n publisher?: string\n /** Notes (optional) */\n notes?: string\n}\n\n/**\n * In-memory reporter database with fast O(1) lookup\n *\n * Uses Map-based indexing for case-insensitive abbreviation lookup.\n * All variant forms are indexed to support fuzzy matching.\n */\nexport interface ReportersDatabase {\n /** Fast O(1) lookup by abbreviation (lowercase normalized keys) */\n byAbbreviation: Map<string, ReporterEntry[]>\n /** All reporters (for iteration/filtering) */\n all: ReporterEntry[]\n}\n\nimport {\n getReportersSync as _getReportersSync,\n setReportersCache,\n} from \"./reportersCache\"\n\n/**\n * Load reporter database asynchronously with lazy loading\n *\n * Dynamic import prevents loading 1200+ reporters until explicitly requested.\n * Result is cached after first load for subsequent calls.\n *\n * @returns Promise resolving to indexed reporter database\n *\n * @example\n * const db = await loadReporters()\n * const reporters = db.byAbbreviation.get('f.2d') // Fast O(1) lookup\n */\nexport async function loadReporters(): Promise<ReportersDatabase> {\n const existing = _getReportersSync()\n if (existing) return existing\n\n // Dynamic import of a codegenned TS module. Rolldown auto-splits this into\n // a separate ESM + CJS chunk in dist/, preserving lazy loading without the\n // import-attribute syntax that was deprecated in Node 22+. See #642.\n const mod = await import(\"./reporters.gen.js\")\n\n const byAbbreviation = new Map<string, ReporterEntry[]>()\n const all: ReporterEntry[] = []\n\n // reporters.json structure: { \"A.\": [...], \"F.2d\": [...], ... }\n const reportersData = mod.default as Record<string, ReporterEntry[]>\n\n // Build fast lookup index with lowercase normalization\n for (const [_canonicalAbbr, reporters] of Object.entries(reportersData)) {\n for (const reporter of reporters) {\n all.push(reporter)\n\n // Index by all edition abbreviations\n for (const editionAbbr of Object.keys(reporter.editions)) {\n const key = editionAbbr.toLowerCase()\n if (!byAbbreviation.has(key)) {\n byAbbreviation.set(key, [])\n }\n byAbbreviation.get(key)?.push(reporter)\n }\n\n // Index all variations for fuzzy matching\n for (const [variant, _canonical] of Object.entries(reporter.variations || {})) {\n const variantKey = variant.toLowerCase()\n if (!byAbbreviation.has(variantKey)) {\n byAbbreviation.set(variantKey, [])\n }\n byAbbreviation.get(variantKey)?.push(reporter)\n }\n }\n }\n\n const db: ReportersDatabase = { byAbbreviation, all }\n setReportersCache(db)\n return db\n}\n\n/**\n * Get cached reporter database synchronously (degraded mode support)\n *\n * Returns null if reporters not loaded yet. This enables the library to\n * work in degraded mode without reporter validation.\n *\n * @returns Cached database or null if not loaded\n *\n * @example\n * const db = getReportersSync()\n * if (db) {\n * // Full mode: validate citations\n * } else {\n * // Degraded mode: extract without validation\n * }\n */\nexport function getReportersSync(): ReportersDatabase | null {\n return _getReportersSync()\n}\n\n/**\n * Find reporters by abbreviation (case-insensitive)\n *\n * Loads reporter database if not already loaded. Returns all reporters\n * matching the abbreviation (including variant forms).\n *\n * @param abbr - Reporter abbreviation to look up\n * @returns Promise resolving to matching reporters (empty array if none)\n *\n * @example\n * const reporters = await findReportersByAbbreviation('F.2d')\n * // [{ abbreviation: 'F.2d', name: 'Federal Reporter, Second Series', ... }]\n *\n * @example\n * const unknown = await findReportersByAbbreviation('NONEXISTENT')\n * // [] (empty array, not error)\n */\nexport async function findReportersByAbbreviation(abbr: string): Promise<ReporterEntry[]> {\n const db = await loadReporters()\n return db.byAbbreviation.get(abbr.toLowerCase()) ?? []\n}\n"],"mappings":"oFAqFA,eAAsB,GAA4C,CAChE,IAAM,EAAWA,GAAmB,CACpC,GAAI,EAAU,OAAO,EAKrB,IAAM,EAAM,MAAM,OAAO,iCAEnB,EAAiB,IAAI,IACrB,EAAuB,EAAE,CAGzB,EAAgB,EAAI,QAG1B,IAAK,GAAM,CAAC,EAAgB,KAAc,OAAO,QAAQ,EAAc,CACrE,IAAK,IAAM,KAAY,EAAW,CAChC,EAAI,KAAK,EAAS,CAGlB,IAAK,IAAM,KAAe,OAAO,KAAK,EAAS,SAAS,CAAE,CACxD,IAAM,EAAM,EAAY,aAAa,CAChC,EAAe,IAAI,EAAI,EAC1B,EAAe,IAAI,EAAK,EAAE,CAAC,CAE7B,EAAe,IAAI,EAAI,EAAE,KAAK,EAAS,CAIzC,IAAK,GAAM,CAAC,EAAS,KAAe,OAAO,QAAQ,EAAS,YAAc,EAAE,CAAC,CAAE,CAC7E,IAAM,EAAa,EAAQ,aAAa,CACnC,EAAe,IAAI,EAAW,EACjC,EAAe,IAAI,EAAY,EAAE,CAAC,CAEpC,EAAe,IAAI,EAAW,EAAE,KAAK,EAAS,EAKpD,IAAM,EAAwB,CAAE,iBAAgB,MAAK,CAErD,OADA,EAAkB,EAAG,CACd,EAmBT,SAAgB,GAA6C,CAC3D,OAAOA,GAAmB,CAoB5B,eAAsB,EAA4B,EAAwC,CAExF,OADW,MAAM,GAAe,EACtB,eAAe,IAAI,EAAK,aAAa,CAAC,EAAI,EAAE"}
|