eyecite-ts 0.11.3 → 0.13.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.
@@ -1,4 +1,4 @@
1
- import { t as Citation } from "../citation-B_8m5AcV.cjs";
1
+ import { t as Citation } from "../citation-DL2BQTYK.cjs";
2
2
 
3
3
  //#region src/annotate/types.d.ts
4
4
  /**
@@ -1,4 +1,4 @@
1
- import { t as Citation } from "../citation-CIVlt9QA.mjs";
1
+ import { t as Citation } from "../citation-CWBCicCr.mjs";
2
2
 
3
3
  //#region src/annotate/types.d.ts
4
4
  /**
@@ -201,9 +201,28 @@ interface NeutralComponentSpans {
201
201
  year?: Span;
202
202
  court?: Span;
203
203
  documentNumber?: Span;
204
+ pincite?: Span;
204
205
  signal?: Span;
205
206
  }
206
207
  /**
208
+ * Component spans for Id./Ibid. citations (type: "id").
209
+ */
210
+ interface IdComponentSpans {
211
+ pincite?: Span;
212
+ }
213
+ /**
214
+ * Component spans for supra citations (type: "supra").
215
+ */
216
+ interface SupraComponentSpans {
217
+ pincite?: Span;
218
+ }
219
+ /**
220
+ * Component spans for short-form case citations (type: "shortFormCase").
221
+ */
222
+ interface ShortFormCaseComponentSpans {
223
+ pincite?: Span;
224
+ }
225
+ /**
207
226
  * Component spans for public law citations (type: "publicLaw").
208
227
  *
209
228
  * Note: `signal` is included for future extensibility but is currently only
@@ -243,7 +262,7 @@ interface StatutesAtLargeComponentSpans {
243
262
  /**
244
263
  * Citation type discriminator for type-safe pattern matching.
245
264
  */
246
- type CitationType = "case" | "statute" | "journal" | "neutral" | "publicLaw" | "federalRegister" | "statutesAtLarge" | "constitutional" | "id" | "supra" | "shortFormCase";
265
+ type CitationType = "case" | "docket" | "statute" | "journal" | "neutral" | "publicLaw" | "federalRegister" | "statutesAtLarge" | "constitutional" | "id" | "supra" | "shortFormCase";
247
266
  /**
248
267
  * Warning generated during citation parsing.
249
268
  */
@@ -648,6 +667,57 @@ interface StatutesAtLargeCitation extends CitationBase {
648
667
  spans?: StatutesAtLargeComponentSpans;
649
668
  }
650
669
  /**
670
+ * Docket-number-only case citation (no traditional reporter assignment).
671
+ *
672
+ * Used for very recent decisions identified by docket/slip number, common for:
673
+ * - NY Court of Appeals slip opinions: `IKB Int'l v. Wells Fargo, No. 51 (N.Y. 2023)`
674
+ * - Federal district court decisions before reporter assignment: `Smith v. Jones, No. 12-3456 (S.D.N.Y. 2024)`
675
+ * - Some unreported state-court orders
676
+ *
677
+ * Disambiguation: a bare `No. 51 (N.Y. 2023)` is too generic to extract on its
678
+ * own — extraction only emits a DocketCitation when a preceding case-name
679
+ * anchor (e.g. `Party v. Party,`) is present.
680
+ *
681
+ * @example "IKB Int'l, S.A. v. Wells Fargo Bank, N.A., No. 51 (N.Y. 2023)"
682
+ */
683
+ interface DocketCitation extends CitationBase {
684
+ type: "docket";
685
+ /** Docket / slip-opinion number (string to preserve hyphens, e.g. "12-3456") */
686
+ docketNumber: string;
687
+ /** Court abbreviation extracted from the parenthetical (e.g. "N.Y.", "S.D.N.Y.") */
688
+ court?: string;
689
+ /** Normalized court string: spaces collapsed, trailing period ensured */
690
+ normalizedCourt?: string;
691
+ /** Year of decision */
692
+ year?: number;
693
+ /** Date information when the parenthetical includes month/day */
694
+ date?: {
695
+ iso: string;
696
+ parsed?: {
697
+ year: number;
698
+ month?: number;
699
+ day?: number;
700
+ };
701
+ };
702
+ /** Extracted case name (party names around "v.") */
703
+ caseName?: string;
704
+ /** Plaintiff party name */
705
+ plaintiff?: string;
706
+ /** Defendant party name */
707
+ defendant?: string;
708
+ /** Normalized plaintiff name for matching (lowercase, stripped of noise) */
709
+ plaintiffNormalized?: string;
710
+ /** Normalized defendant name for matching (lowercase, stripped of noise) */
711
+ defendantNormalized?: string;
712
+ /** Procedural prefix for non-adversarial cases (e.g. "In re") */
713
+ proceduralPrefix?: string;
714
+ /**
715
+ * Full span covering citation from case name through closing parenthetical.
716
+ * @example For "Smith v. Jones, No. 51 (N.Y. 2023)", fullSpan covers the entire text.
717
+ */
718
+ fullSpan?: Span;
719
+ }
720
+ /**
651
721
  * Constitutional citation (U.S. or state constitution).
652
722
  *
653
723
  * @example "U.S. Const. art. III, § 2"
@@ -680,6 +750,8 @@ interface IdCitation extends CitationBase {
680
750
  pincite?: number;
681
751
  /** Structured pincite information (page, range, footnote, star-pagination). */
682
752
  pinciteInfo?: PinciteInfo;
753
+ /** Component-level spans (currently just `pincite`; extend when needed). */
754
+ spans?: IdComponentSpans;
683
755
  }
684
756
  /**
685
757
  * Supra citation (refers to earlier citation by party name).
@@ -695,6 +767,8 @@ interface SupraCitation extends CitationBase {
695
767
  pincite?: number;
696
768
  /** Structured pincite information (page, range, footnote, star-pagination). */
697
769
  pinciteInfo?: PinciteInfo;
770
+ /** Component-level spans (currently just `pincite`; extend when needed). */
771
+ spans?: SupraComponentSpans;
698
772
  }
699
773
  /**
700
774
  * Short-form case citation (abbreviated reference to earlier full citation).
@@ -710,6 +784,8 @@ interface ShortFormCaseCitation extends CitationBase {
710
784
  pincite?: number;
711
785
  /** Structured pincite information (page, range, footnote, star-pagination). */
712
786
  pinciteInfo?: PinciteInfo;
787
+ /** Component-level spans (currently just `pincite`; extend when needed). */
788
+ spans?: ShortFormCaseComponentSpans;
713
789
  }
714
790
  /**
715
791
  * Union type of all citation types.
@@ -728,16 +804,16 @@ interface ShortFormCaseCitation extends CitationBase {
728
804
  * // ...
729
805
  * }
730
806
  */
731
- type Citation = FullCaseCitation | StatuteCitation | JournalCitation | NeutralCitation | PublicLawCitation | FederalRegisterCitation | StatutesAtLargeCitation | ConstitutionalCitation | IdCitation | SupraCitation | ShortFormCaseCitation;
807
+ type Citation = FullCaseCitation | DocketCitation | StatuteCitation | JournalCitation | NeutralCitation | PublicLawCitation | FederalRegisterCitation | StatutesAtLargeCitation | ConstitutionalCitation | IdCitation | SupraCitation | ShortFormCaseCitation;
732
808
  /**
733
809
  * Citation type discriminators grouped by category.
734
810
  */
735
- type FullCitationType = "case" | "statute" | "journal" | "neutral" | "publicLaw" | "federalRegister" | "statutesAtLarge" | "constitutional";
811
+ type FullCitationType = "case" | "docket" | "statute" | "journal" | "neutral" | "publicLaw" | "federalRegister" | "statutesAtLarge" | "constitutional";
736
812
  type ShortFormCitationType = "id" | "supra" | "shortFormCase";
737
813
  /**
738
814
  * Union of all full citation types (not short-form references).
739
815
  */
740
- type FullCitation = FullCaseCitation | StatuteCitation | JournalCitation | NeutralCitation | PublicLawCitation | FederalRegisterCitation | StatutesAtLargeCitation | ConstitutionalCitation;
816
+ type FullCitation = FullCaseCitation | DocketCitation | StatuteCitation | JournalCitation | NeutralCitation | PublicLawCitation | FederalRegisterCitation | StatutesAtLargeCitation | ConstitutionalCitation;
741
817
  /**
742
818
  * Union of all short-form citation types (Id., supra, short-form case).
743
819
  */
@@ -761,4 +837,4 @@ type CitationOfType<T extends CitationType> = Extract<Citation, {
761
837
  type ExtractorMap = { [K in FullCitationType]: CitationOfType<K> };
762
838
  //#endregion
763
839
  export { FederalRegisterComponentSpans as A, parsePincite as B, StatuteCitation as C, Warning as D, SupraCitation as E, StatutesAtLargeComponentSpans as F, Span as I, TransformationMap as L, NeutralComponentSpans as M, PublicLawComponentSpans as N, CaseComponentSpans as O, StatuteComponentSpans as P, spanFromGroupIndex as R, ShortFormCitationType as S, SubsequentHistoryEntry as T, Parenthetical as _, CitationType as a, ShortFormCaseCitation as b, ExtractorMap as c, FullCitation as d, FullCitationType as f, NeutralCitation as g, JournalCitation as h, CitationSignal as i, JournalComponentSpans as j, ConstitutionalComponentSpans as k, FederalRegisterCitation as l, IdCitation as m, CitationBase as n, ConstitutionalCitation as o, HistorySignal as p, CitationOfType as r, CourtInference as s, Citation as t, FullCaseCitation as u, ParentheticalType as v, StatutesAtLargeCitation as w, ShortFormCitation as x, PublicLawCitation as y, PinciteInfo as z };
764
- //# sourceMappingURL=citation-B_8m5AcV.d.cts.map
840
+ //# sourceMappingURL=citation-CWBCicCr.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"citation-CWBCicCr.d.mts","names":[],"sources":["../src/extract/pincite.ts","../src/clean/segmentMap.ts","../src/types/span.ts","../src/types/componentSpans.ts","../src/types/citation.ts"],"mappings":";;AAGA;;UAAiB,WAAA;EAAA;EAEf,IAAA;;EAEA,OAAA;;;EAGA,QAAA;;EAEA,WAAA;EAQA;EANA,OAAA;EA2Bc;;;EAvBd,QAAA;;EAEA,GAAA;AAAA;ACZF;;;;;;;;;AASA;;;;AATA,iBDiCgB,YAAA,CAAa,GAAA,WAAc,WAAA;;;;AAtC3C;;;;;;UCKiB,OAAA;;EAEf,QAAA;;EAEA,OAAA;;EAEA,GAAA;AAAA;AAAA,cAGW,UAAA;EAAA,SACF,QAAA,WAAmB,OAAA;EAE5B,WAAA,CAAY,QAAA,EAAU,OAAA;EDqBmB;;;EAAA,OCdlC,QAAA,CAAS,MAAA,WAAiB,UAAA;EAnBnC;;;;;EAAA,OA4BS,OAAA,CAAQ,GAAA,EAAK,GAAA,mBAAsB,UAAA;;;;AAnB5C;EAqDE,MAAA,CAAO,QAAA;AAAA;;;;ADnET;;;;;;;;;;;;;AAsCA;;;UExBiB,IAAA;EFwB0B;EEtBzC,UAAA;;EAGA,QAAA;EDdF;ECiBE,aAAA;;EAGA,WAAA;AAAA;;;;;ADXF;;UCoBiB,iBAAA;;EAEf,eAAA,EAAiB,GAAA;;EAGjB,eAAA,EAAiB,GAAA;;EAGjB,uBAAA,GAHiB,UAAA;AAAA;;;;;;;;;;;;;;iBAmBH,kBAAA,CACd,eAAA,UACA,OAAA,oBACA,GAAA,EAAK,iBAAA,GACJ,IAAA;;;AF9DH;;;;;;;AAAA,UGMiB,kBAAA;EACf,QAAA,GAAW,IAAA;EACX,SAAA,GAAY,IAAA;EACZ,SAAA,GAAY,IAAA;EACZ,MAAA,GAAS,IAAA;EACT,QAAA,GAAW,IAAA;EACX,IAAA,GAAO,IAAA;EACP,OAAA,GAAU,IAAA;EACV,KAAA,GAAQ,IAAA;EACR,IAAA,GA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BAAA;;;;KAKA,YAAA,GACR,gBAAA,GACA,cAAA,GACA,eAAA,GACA,eAAA,GACA,eAAA,GACA,iBAAA,GACA,uBAAA,GACA,uBAAA,GACA,sBAAA;;;;KAKQ,iBAAA,GAAoB,UAAA,GAAa,aAAA,GAAgB,qBAAA;;;AA5K7D;;;;;;;KAuLY,cAAA,WAAyB,YAAA,IAAgB,OAAA,CAAQ,QAAA;EAAY,IAAA,EAAM,CAAA;AAAA;;;;;KAMnE,YAAA,WACJ,gBAAA,GAAmB,cAAA,CAAe,CAAA"}
@@ -201,9 +201,28 @@ interface NeutralComponentSpans {
201
201
  year?: Span;
202
202
  court?: Span;
203
203
  documentNumber?: Span;
204
+ pincite?: Span;
204
205
  signal?: Span;
205
206
  }
206
207
  /**
208
+ * Component spans for Id./Ibid. citations (type: "id").
209
+ */
210
+ interface IdComponentSpans {
211
+ pincite?: Span;
212
+ }
213
+ /**
214
+ * Component spans for supra citations (type: "supra").
215
+ */
216
+ interface SupraComponentSpans {
217
+ pincite?: Span;
218
+ }
219
+ /**
220
+ * Component spans for short-form case citations (type: "shortFormCase").
221
+ */
222
+ interface ShortFormCaseComponentSpans {
223
+ pincite?: Span;
224
+ }
225
+ /**
207
226
  * Component spans for public law citations (type: "publicLaw").
208
227
  *
209
228
  * Note: `signal` is included for future extensibility but is currently only
@@ -243,7 +262,7 @@ interface StatutesAtLargeComponentSpans {
243
262
  /**
244
263
  * Citation type discriminator for type-safe pattern matching.
245
264
  */
246
- type CitationType = "case" | "statute" | "journal" | "neutral" | "publicLaw" | "federalRegister" | "statutesAtLarge" | "constitutional" | "id" | "supra" | "shortFormCase";
265
+ type CitationType = "case" | "docket" | "statute" | "journal" | "neutral" | "publicLaw" | "federalRegister" | "statutesAtLarge" | "constitutional" | "id" | "supra" | "shortFormCase";
247
266
  /**
248
267
  * Warning generated during citation parsing.
249
268
  */
@@ -648,6 +667,57 @@ interface StatutesAtLargeCitation extends CitationBase {
648
667
  spans?: StatutesAtLargeComponentSpans;
649
668
  }
650
669
  /**
670
+ * Docket-number-only case citation (no traditional reporter assignment).
671
+ *
672
+ * Used for very recent decisions identified by docket/slip number, common for:
673
+ * - NY Court of Appeals slip opinions: `IKB Int'l v. Wells Fargo, No. 51 (N.Y. 2023)`
674
+ * - Federal district court decisions before reporter assignment: `Smith v. Jones, No. 12-3456 (S.D.N.Y. 2024)`
675
+ * - Some unreported state-court orders
676
+ *
677
+ * Disambiguation: a bare `No. 51 (N.Y. 2023)` is too generic to extract on its
678
+ * own — extraction only emits a DocketCitation when a preceding case-name
679
+ * anchor (e.g. `Party v. Party,`) is present.
680
+ *
681
+ * @example "IKB Int'l, S.A. v. Wells Fargo Bank, N.A., No. 51 (N.Y. 2023)"
682
+ */
683
+ interface DocketCitation extends CitationBase {
684
+ type: "docket";
685
+ /** Docket / slip-opinion number (string to preserve hyphens, e.g. "12-3456") */
686
+ docketNumber: string;
687
+ /** Court abbreviation extracted from the parenthetical (e.g. "N.Y.", "S.D.N.Y.") */
688
+ court?: string;
689
+ /** Normalized court string: spaces collapsed, trailing period ensured */
690
+ normalizedCourt?: string;
691
+ /** Year of decision */
692
+ year?: number;
693
+ /** Date information when the parenthetical includes month/day */
694
+ date?: {
695
+ iso: string;
696
+ parsed?: {
697
+ year: number;
698
+ month?: number;
699
+ day?: number;
700
+ };
701
+ };
702
+ /** Extracted case name (party names around "v.") */
703
+ caseName?: string;
704
+ /** Plaintiff party name */
705
+ plaintiff?: string;
706
+ /** Defendant party name */
707
+ defendant?: string;
708
+ /** Normalized plaintiff name for matching (lowercase, stripped of noise) */
709
+ plaintiffNormalized?: string;
710
+ /** Normalized defendant name for matching (lowercase, stripped of noise) */
711
+ defendantNormalized?: string;
712
+ /** Procedural prefix for non-adversarial cases (e.g. "In re") */
713
+ proceduralPrefix?: string;
714
+ /**
715
+ * Full span covering citation from case name through closing parenthetical.
716
+ * @example For "Smith v. Jones, No. 51 (N.Y. 2023)", fullSpan covers the entire text.
717
+ */
718
+ fullSpan?: Span;
719
+ }
720
+ /**
651
721
  * Constitutional citation (U.S. or state constitution).
652
722
  *
653
723
  * @example "U.S. Const. art. III, § 2"
@@ -680,6 +750,8 @@ interface IdCitation extends CitationBase {
680
750
  pincite?: number;
681
751
  /** Structured pincite information (page, range, footnote, star-pagination). */
682
752
  pinciteInfo?: PinciteInfo;
753
+ /** Component-level spans (currently just `pincite`; extend when needed). */
754
+ spans?: IdComponentSpans;
683
755
  }
684
756
  /**
685
757
  * Supra citation (refers to earlier citation by party name).
@@ -695,6 +767,8 @@ interface SupraCitation extends CitationBase {
695
767
  pincite?: number;
696
768
  /** Structured pincite information (page, range, footnote, star-pagination). */
697
769
  pinciteInfo?: PinciteInfo;
770
+ /** Component-level spans (currently just `pincite`; extend when needed). */
771
+ spans?: SupraComponentSpans;
698
772
  }
699
773
  /**
700
774
  * Short-form case citation (abbreviated reference to earlier full citation).
@@ -710,6 +784,8 @@ interface ShortFormCaseCitation extends CitationBase {
710
784
  pincite?: number;
711
785
  /** Structured pincite information (page, range, footnote, star-pagination). */
712
786
  pinciteInfo?: PinciteInfo;
787
+ /** Component-level spans (currently just `pincite`; extend when needed). */
788
+ spans?: ShortFormCaseComponentSpans;
713
789
  }
714
790
  /**
715
791
  * Union type of all citation types.
@@ -728,16 +804,16 @@ interface ShortFormCaseCitation extends CitationBase {
728
804
  * // ...
729
805
  * }
730
806
  */
731
- type Citation = FullCaseCitation | StatuteCitation | JournalCitation | NeutralCitation | PublicLawCitation | FederalRegisterCitation | StatutesAtLargeCitation | ConstitutionalCitation | IdCitation | SupraCitation | ShortFormCaseCitation;
807
+ type Citation = FullCaseCitation | DocketCitation | StatuteCitation | JournalCitation | NeutralCitation | PublicLawCitation | FederalRegisterCitation | StatutesAtLargeCitation | ConstitutionalCitation | IdCitation | SupraCitation | ShortFormCaseCitation;
732
808
  /**
733
809
  * Citation type discriminators grouped by category.
734
810
  */
735
- type FullCitationType = "case" | "statute" | "journal" | "neutral" | "publicLaw" | "federalRegister" | "statutesAtLarge" | "constitutional";
811
+ type FullCitationType = "case" | "docket" | "statute" | "journal" | "neutral" | "publicLaw" | "federalRegister" | "statutesAtLarge" | "constitutional";
736
812
  type ShortFormCitationType = "id" | "supra" | "shortFormCase";
737
813
  /**
738
814
  * Union of all full citation types (not short-form references).
739
815
  */
740
- type FullCitation = FullCaseCitation | StatuteCitation | JournalCitation | NeutralCitation | PublicLawCitation | FederalRegisterCitation | StatutesAtLargeCitation | ConstitutionalCitation;
816
+ type FullCitation = FullCaseCitation | DocketCitation | StatuteCitation | JournalCitation | NeutralCitation | PublicLawCitation | FederalRegisterCitation | StatutesAtLargeCitation | ConstitutionalCitation;
741
817
  /**
742
818
  * Union of all short-form citation types (Id., supra, short-form case).
743
819
  */
@@ -761,4 +837,4 @@ type CitationOfType<T extends CitationType> = Extract<Citation, {
761
837
  type ExtractorMap = { [K in FullCitationType]: CitationOfType<K> };
762
838
  //#endregion
763
839
  export { FederalRegisterComponentSpans as A, parsePincite as B, StatuteCitation as C, Warning as D, SupraCitation as E, StatutesAtLargeComponentSpans as F, Span as I, TransformationMap as L, NeutralComponentSpans as M, PublicLawComponentSpans as N, CaseComponentSpans as O, StatuteComponentSpans as P, spanFromGroupIndex as R, ShortFormCitationType as S, SubsequentHistoryEntry as T, Parenthetical as _, CitationType as a, ShortFormCaseCitation as b, ExtractorMap as c, FullCitation as d, FullCitationType as f, NeutralCitation as g, JournalCitation as h, CitationSignal as i, JournalComponentSpans as j, ConstitutionalComponentSpans as k, FederalRegisterCitation as l, IdCitation as m, CitationBase as n, ConstitutionalCitation as o, HistorySignal as p, CitationOfType as r, CourtInference as s, Citation as t, FullCaseCitation as u, ParentheticalType as v, StatutesAtLargeCitation as w, ShortFormCitation as x, PublicLawCitation as y, PinciteInfo as z };
764
- //# sourceMappingURL=citation-CIVlt9QA.d.mts.map
840
+ //# sourceMappingURL=citation-DL2BQTYK.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"citation-DL2BQTYK.d.cts","names":[],"sources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