eyecite-ts 0.20.1 → 0.21.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.cts CHANGED
@@ -619,15 +619,6 @@ declare class DocumentResolver {
619
619
  */
620
620
  private inheritPincites;
621
621
  /**
622
- * Compute parenthesis depth at the start position of each citation.
623
- * Walks the raw text once, counting `(` and `)` and recording the
624
- * running depth at every citation's `span.cleanStart`. Depth > 0
625
- * indicates the citation is nested inside an open parenthetical
626
- * block (typically an explanatory `(quoting X)` / `(citing Y)`
627
- * following an earlier citation).
628
- */
629
- private computeParenDepths;
630
- /**
631
622
  * Find the immediate-preceding citation index for `antecedentIndex`
632
623
  * purposes. Bluebook Rule 4.1: `Id.` anchors to "the immediately
633
624
  * preceding cited authority" — unlike `resolveId`'s primary chase
@@ -641,8 +632,10 @@ declare class DocumentResolver {
641
632
  private findImmediatePredecessor;
642
633
  /**
643
634
  * Resolves `Id.` to the most recent preceding *cited authority*, respecting
644
- * Bluebook signal categories, block-/inline-quote zones, and the family
645
- * (case vs. statute) implied by `Id.`'s pincite shape (#480).
635
+ * block-/inline-quote zones and the family (case vs. statute) implied by
636
+ * `Id.`'s pincite shape (#480). Per Bluebook Rule 4.1, signal phrase is
637
+ * NOT a filter — `Id.` anchors to the immediately preceding cited
638
+ * authority regardless of whether it carries `See`, `Cf.`, etc. (#498).
646
639
  *
647
640
  * Algorithm:
648
641
  * 1. Walk backward from `currentIndex`, normalizing short-form citations
@@ -651,9 +644,8 @@ declare class DocumentResolver {
651
644
  * doesn't get double-counted with its full-cite further back.
652
645
  * 2. Filter candidates that are parenthetical children (existing #214
653
646
  * behavior) or in a quote zone outside `Id.`'s own zone.
654
- * 3. Score remaining candidates: family-match dominates, then signal
655
- * strength, then (implicitly) recency (first-added = most recent
656
- * effective mention).
647
+ * 3. Score remaining candidates: family-match dominates, then (implicitly)
648
+ * recency (first-added = most recent effective mention).
657
649
  * 4. Apply the case-name window check to surface ambiguity when the prose
658
650
  * immediately before `Id.` mentions a different case name.
659
651
  */
@@ -667,14 +659,6 @@ declare class DocumentResolver {
667
659
  */
668
660
  private getIdPreferredFamily;
669
661
  /**
670
- * Computes the "effective" signal for a citation. Citations inside a
671
- * string-cite group inherit the leading signal of the group's first
672
- * member when they have no signal of their own — the Bluebook rule that
673
- * a leading signal governs the entire string cite.
674
- */
675
- private getEffectiveSignal;
676
- private isCandidateWeakSignal;
677
- /**
678
662
  * `(citing X)` / `(quoting Y)` detection (#214). Two strategies in OR:
679
663
  * - paren depth > 0 at the citation's start (works for any prior
680
664
  * citation type — statute, journal, etc.);
@@ -801,5 +785,152 @@ declare function resolveCitations(citations: Citation[], text: string, options?:
801
785
  */
802
786
  declare function detectFootnotes(text: string): FootnoteMap;
803
787
  //#endregion
804
- export { type CaseComponentSpans, type Citation, type CitationBase, type CitationOfType, type CitationSignal, type CitationType, type CleanTextResult, type ConstitutionalCitation, type ConstitutionalComponentSpans, type CourtInference, type DocketCitation, DocumentResolver, type ExtractOptions, type ExtractorMap, type FederalRegisterCitation, type FederalRegisterComponentSpans, type FootnoteMap, type FootnoteZone, type FullCaseCitation, type FullCitation, type FullCitationType, type HistorySignal, type IdCitation, type JournalCitation, type JournalComponentSpans, type NeutralCitation, type NeutralComponentSpans, type Parenthetical, type ParentheticalType, type PinciteInfo, type PublicLawCitation, type PublicLawComponentSpans, type ResolutionOptions, type ResolutionResult, type ResolvedCitation, type ScopeStrategy, type ShortFormCaseCitation, type ShortFormCitation, type ShortFormCitationType, type Span, type StatuteCitation, type StatuteComponentSpans, type StatutesAtLargeCitation, type StatutesAtLargeComponentSpans, type SubsequentHistoryEntry, type SupraCitation, type Token, type TransformationMap, type Warning, applyFalsePositiveFilters, assertUnreachable, cleanText, detectFootnotes, extractCase, extractCitations, extractCitationsAsync, extractConstitutional, extractFederalRegister, extractJournal, extractNeutral, extractPublicLaw, extractStatute, extractStatutesAtLarge, isCaseCitation, isCitationType, isFullCitation, isShortFormCitation, normalizeCourt, parsePincite, resolveCitations, spanFromGroupIndex, tokenize };
788
+ //#region src/document/types.d.ts
789
+ /**
790
+ * Attribution mode for a quoted-text zone. Reflects the structural
791
+ * relationship between the quote and the citation that vouches for it.
792
+ *
793
+ * - "block-quote": Bluebook Rule 5 — quote set off as an indented block or
794
+ * marked with markdown `>`, with the citation immediately following.
795
+ * - "adjacent": inline quote in the same sentence as the citation.
796
+ * - "parenthetical": quote inside an explanatory parenthetical
797
+ * (e.g. `(quoting "..." Smith, 1 U.S. 1)`).
798
+ */
799
+ type AttributionKind = "block-quote" | "adjacent" | "parenthetical";
800
+ /**
801
+ * A quoted-text zone paired with the citation (if any) that vouches for it.
802
+ * Produced by the document analyzer; one entry per detected quote zone.
803
+ * Unattributed zones surface with `citationIndex` undefined.
804
+ */
805
+ interface QuoteAttribution {
806
+ /** The quoted-text span in original-text coordinates. */
807
+ quoteSpan: Span;
808
+ /** Verbatim quoted text (chars between the marks, exclusive of the marks). */
809
+ quoteText: string;
810
+ /** Citation index that vouches for the quote; undefined when none found. */
811
+ citationIndex?: number;
812
+ /** How the attribution was inferred; undefined iff citationIndex is. */
813
+ attributionKind?: AttributionKind;
814
+ /**
815
+ * Confidence (0-1). See `quoteAttribution.ts` for the stratification:
816
+ * block-quote, citation within 50 chars: 0.98
817
+ * block-quote, citation within 200 chars: 0.90
818
+ * adjacent inline, same sentence: 0.85
819
+ * parenthetical-internal: 0.95
820
+ * unattributed: undefined
821
+ */
822
+ confidence?: number;
823
+ }
824
+ /**
825
+ * A typed edge in the citation graph. `from` and `to` are indices into
826
+ * the `Document.citations` array. `type` discriminates the union.
827
+ *
828
+ * See `docs/superpowers/specs/2026-05-19-document-understanding-api-design.md`
829
+ * for the source-map describing which existing citation fields drive each kind.
830
+ */
831
+ type Edge = {
832
+ type: "resolves-to";
833
+ from: number;
834
+ to: number;
835
+ confidence: number;
836
+ warnings?: string[];
837
+ } | {
838
+ type: "antecedent";
839
+ from: number;
840
+ to: number;
841
+ } | {
842
+ type: "parallel";
843
+ from: number;
844
+ to: number;
845
+ groupId: string;
846
+ } | {
847
+ type: "history-of";
848
+ from: number;
849
+ to: number;
850
+ signal: HistorySignal;
851
+ } | {
852
+ type: "pincite-inherit";
853
+ from: number;
854
+ to: number;
855
+ } | {
856
+ type: "string-cite";
857
+ from: number;
858
+ to: number;
859
+ groupId: string;
860
+ position: number;
861
+ } | {
862
+ type: "in-parenthetical-of";
863
+ from: number;
864
+ to: number;
865
+ };
866
+ /**
867
+ * The graph of relationships between citations in a document.
868
+ *
869
+ * - `nodes.length === citations.length` always; isolated nodes
870
+ * (no edges) are still included so consumers iterating nodes don't
871
+ * miss anything.
872
+ * - `edges` is sorted by from-index, then type (alphabetical), then
873
+ * to-index for deterministic iteration and test assertions.
874
+ * - No self-edges. No duplicate edges of the same type+from+to.
875
+ * Undirected relationships (parallel groups) emit one edge per pair.
876
+ */
877
+ interface CitationGraph {
878
+ nodes: number[];
879
+ edges: Edge[];
880
+ }
881
+ /**
882
+ * A footnote zone with the citations it contains. Populated only when
883
+ * input citations carry footnote tagging (extractCitations was called
884
+ * with `detectFootnotes: true`).
885
+ */
886
+ interface AnalyzedFootnoteZone {
887
+ start: number;
888
+ end: number;
889
+ footnoteNumber: number;
890
+ /** Indices of citations whose span falls inside this footnote. */
891
+ citationIndices: number[];
892
+ }
893
+ /**
894
+ * The document analysis result. Returned by `analyzeDocument(text, citations)`.
895
+ *
896
+ * Produced as a pure projection over `text + citations[]` — no new
897
+ * tokenization or extraction. See the design doc for the algorithm rationale.
898
+ */
899
+ interface Document {
900
+ /** The citations that were analyzed. Same array reference as the input. */
901
+ citations: Citation[];
902
+ /** Prose between citations (+ before-first + after-last). Sorted by
903
+ * originalStart. Uses `fullSpan` (when available) to bound citations,
904
+ * so case-name text is not mislabeled as prose. */
905
+ proseSpans: Span[];
906
+ /** Per-citation view: prose span ending at this citation. */
907
+ precedingProse: Map<number, Span>;
908
+ /** Per-citation view: prose span starting after this citation. */
909
+ followingProse: Map<number, Span>;
910
+ /** Detected quoted-text zones with attempted attribution. Includes
911
+ * unattributed zones (citationIndex undefined). */
912
+ quoteAttributions: QuoteAttribution[];
913
+ /** All relationships between citations as typed edges. */
914
+ citationGraph: CitationGraph;
915
+ /** Footnote zones with citation members. Optional — only present when
916
+ * citations carry footnote tagging. */
917
+ footnoteZones?: AnalyzedFootnoteZone[];
918
+ }
919
+ //#endregion
920
+ //#region src/document/analyzer.d.ts
921
+ /**
922
+ * Project an existing extraction result into a Document view with prose
923
+ * offsets, quote attribution, citation graph, and (optionally) footnote
924
+ * zones.
925
+ *
926
+ * Pure projection — reads existing fields, re-shapes; no new tokenization
927
+ * or extraction. Cheap (sub-millisecond per call for typical brief sizes).
928
+ *
929
+ * See `docs/superpowers/specs/2026-05-19-document-understanding-api-design.md`.
930
+ */
931
+ declare function analyzeDocument(text: string, citations: Citation[], opts?: {
932
+ transformationMap?: TransformationMap;
933
+ }): Document;
934
+ //#endregion
935
+ export { type AnalyzedFootnoteZone, type AttributionKind, type CaseComponentSpans, type Citation, type CitationBase, type CitationGraph, type CitationOfType, type CitationSignal, type CitationType, type CleanTextResult, type ConstitutionalCitation, type ConstitutionalComponentSpans, type CourtInference, type DocketCitation, type Document, DocumentResolver, type Edge, type ExtractOptions, type ExtractorMap, type FederalRegisterCitation, type FederalRegisterComponentSpans, type FootnoteMap, type FootnoteZone, type FullCaseCitation, type FullCitation, type FullCitationType, type HistorySignal, type IdCitation, type JournalCitation, type JournalComponentSpans, type NeutralCitation, type NeutralComponentSpans, type Parenthetical, type ParentheticalType, type PinciteInfo, type PublicLawCitation, type PublicLawComponentSpans, type QuoteAttribution, type ResolutionOptions, type ResolutionResult, type ResolvedCitation, type ScopeStrategy, type ShortFormCaseCitation, type ShortFormCitation, type ShortFormCitationType, type Span, type StatuteCitation, type StatuteComponentSpans, type StatutesAtLargeCitation, type StatutesAtLargeComponentSpans, type SubsequentHistoryEntry, type SupraCitation, type Token, type TransformationMap, type Warning, analyzeDocument, applyFalsePositiveFilters, assertUnreachable, cleanText, detectFootnotes, extractCase, extractCitations, extractCitationsAsync, extractConstitutional, extractFederalRegister, extractJournal, extractNeutral, extractPublicLaw, extractStatute, extractStatutesAtLarge, isCaseCitation, isCitationType, isFullCitation, isShortFormCitation, normalizeCourt, parsePincite, resolveCitations, spanFromGroupIndex, tokenize };
805
936
  //# sourceMappingURL=index.d.cts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.cts","names":[],"sources":["../src/types/guards.ts","../src/patterns/casePatterns.ts","../src/extract/extractCitations.ts","../src/extract/filterFalsePositives.ts","../src/clean/cleanText.ts","../src/tokenize/tokenizer.ts","../src/extract/extractCase.ts","../src/extract/extractConstitutional.ts","../src/extract/extractFederalRegister.ts","../src/extract/extractJournal.ts","../src/extract/extractNeutral.ts","../src/extract/extractPublicLaw.ts","../src/extract/extractStatute.ts","../src/extract/extractStatutesAtLarge.ts","../src/extract/courtNormalization.ts","../src/resolve/DocumentResolver.ts","../src/resolve/index.ts","../src/footnotes/detectFootnotes.ts"],"mappings":";;;;;;;iBAYgB,cAAA,CAAe,QAAA,EAAU,QAAA,GAAW,QAAA,IAAY,YAAA;;;;iBAiBhD,mBAAA,CAAoB,QAAA,EAAU,QAAA,GAAW,QAAA,IAAY,iBAAA;;;;iBAOrD,cAAA,CAAe,QAAA,EAAU,QAAA,GAAW,QAAA,IAAY,gBAAA;;AAPhE;;;iBAegB,cAAA,WAAyB,YAAA,CAAA,CACvC,QAAA,EAAU,QAAA,EACV,IAAA,EAAM,CAAA,GACL,QAAA,IAAY,cAAA,CAAe,CAAA;;;;;;;AAX9B;;;;;;;;;;iBA+BgB,iBAAA,CAAkB,CAAA;;;UCnDjB,OAAA;EACf,EAAA;EACA,KAAA,EAAO,MAAA;EACP,WAAA;EACA,IAAA,EAAM,gBAAA;AAAA;;;;ADRR;;UEgDiB,cAAA;EFhD+C;;;;;;;AAiBhE;;;;;;;EE8CE,QAAA,GAAW,KAAA,EAAO,IAAA;;;AFv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iBACA,aAAA;EAAA,iBACA,UAAA;Ef1MnB;EAAA,Qe4MU,WAAA;;UAEA,WAAA;;;UAGA,aAAA;;;;AfzMV;;;;EekNE,WAAA,CAAY,SAAA,EAAW,QAAA,IAAY,IAAA,UAAc,OAAA,GAAS,iBAAA;;;;;;EA+C1D,OAAA,CAAA,GAAW,gBAAA;;;;;;;;;UA2FH,uBAAA;EfzVoB;AAoB9B;;;;;;;;ACnDA;;ED+B8B,QewWpB,eAAA;EdnYF;;;;;;;;EAAA,Qc4bE,kBAAA;;;;AbpZV;;;;;;;;UakbU,wBAAA;;;;;;;;;;;;AblSV;;;;;;;UasUU,SAAA;;;;AblUV;;;;Ua+bU,oBAAA;;;;;;AbvIV;UasJU,kBAAA;EAAA,QAaA,qBAAA;;;;;;;;;UAaA,oBAAA;;;;;Ab5KV;;;;UasMU,wBAAA;;;;UA0GA,YAAA;;;;;;;;;;AZ/aV;;;;;;UYyfU,oBAAA;;;;;;;AXn3BV;;;;;;;;;;;AA2BA;;;;;;;;;UW07BU,uBAAA;EX56BP;;;;AChCH;EDgCG,QWghCO,iBAAA;;;;;UA8BA,gBAAA;EVtkCF;;;;;EAAA,QUsmCE,gBAAA;;;;UAWA,kBAAA;EVvkCV;;;EAAA,QUilCU,iBAAA;;;;UAUA,aAAA;;;;UAiBA,mBAAA;AAAA;;;;;;;AftpCV;;;;;;iBgBHgB,gBAAA,CACd,SAAA,EAAW,QAAA,IACX,IAAA,UACA,OAAA,GAAU,iBAAA,GACT,gBAAA;;;;;;AhBzBH;;;;;;;;iBiBKgB,eAAA,CAAgB,IAAA,WAAe,WAAA"}
1
+ {"version":3,"file":"index.d.cts","names":[],"sources":["../src/types/guards.ts","../src/patterns/casePatterns.ts","../src/extract/extractCitations.ts","../src/extract/filterFalsePositives.ts","../src/clean/cleanText.ts","../src/tokenize/tokenizer.ts","../src/extract/extractCase.ts","../src/extract/extractConstitutional.ts","../src/extract/extractFederalRegister.ts","../src/extract/extractJournal.ts","../src/extract/extractNeutral.ts","../src/extract/extractPublicLaw.ts","../src/extract/extractStatute.ts","../src/extract/extractStatutesAtLarge.ts","../src/extract/courtNormalization.ts","../src/resolve/DocumentResolver.ts","../src/resolve/index.ts","../src/footnotes/detectFootnotes.ts","../src/document/types.ts","../src/document/analyzer.ts"],"mappings":";;;;;;;iBAYgB,cAAA,CAAe,QAAA,EAAU,QAAA,GAAW,QAAA,IAAY,YAAA;;;;iBAiBhD,mBAAA,CAAoB,QAAA,EAAU,QAAA,GAAW,QAAA,IAAY,iBAAA;;;;iBAOrD,cAAA,CAAe,QAAA,EAAU,QAAA,GAAW,QAAA,IAAY,gBAAA;;AAPhE;;;iBAegB,cAAA,WAAyB,YAAA,CAAA,CACvC,QAAA,EAAU,QAAA,EACV,IAAA,EAAM,CAAA,GACL,QAAA,IAAY,cAAA,CAAe,CAAA;;;;;;;AAX9B;;;;;;;;;;iBA+BgB,iBAAA,CAAkB,CAAA;;;UCnDjB,OAAA;EACf,EAAA;EACA,KAAA,EAAO,MAAA;EACP,WAAA;EACA,IAAA,EAAM,gBAAA;AAAA;;;;ADRR;;UEgDiB,cAAA;EFhD+C;;;;;;;AAiBhE;;;;;;;EE8CE,QAAA,GAAW,KAAA,EAAO,IAAA;;;AFvCpB;;;;;;;;;;AAQA;;EE+CE,QAAA,GAAW,OAAA;;;;;;;;;;;;;;EAeX,OAAA;;;;;AFvCF;;;;;;;;ACnDA;;EC0GE,iBAAA,GAAoB,iBAAA;EDtGd;;;;;;;;;;;;ACwCR;;;;EAgFE,oBAAA;;EAGA,eAAA;AAAA;;;;;;;;;;;;;AA6DF;;;;;;;;;;;AAIA;;;;;;;;;;AAwTA;;;;;;;;;;;;;;;;AAIA;;;;;;;;;iBAhUgB,gBAAA,CACd,IAAA,UACA,OAAA,EAAS,cAAA;EAAmB,OAAA;AAAA,IAC3B,gBAAA;AAAA,iBACa,gBAAA,CAAiB,IAAA,UAAc,OAAA,GAAU,cAAA,GAAiB,QAAA;;;;;;AC6L1E;;;;;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8HF;;;UgBrHiB,QAAA;;EAEf,SAAA,EAAW,QAAA;;;;EAKX,UAAA,EAAY,IAAA;EhBsad;EgBnaE,cAAA,EAAgB,GAAA,SAAY,IAAA;;EAG5B,cAAA,EAAgB,GAAA,SAAY,IAAA;;;EAI5B,iBAAA,EAAmB,gBAAA;EhB+ZlB;EgB5ZD,aAAA,EAAe,aAAA;;;EAIf,aAAA,GAAgB,oBAAA;AAAA;;;;AlBvGlB;;;;;;;;;iBmBQgB,eAAA,CACd,IAAA,UACA,SAAA,EAAW,QAAA,IACX,IAAA;EAAS,iBAAA,GAAoB,iBAAA;AAAA,IAC5B,QAAA"}
package/dist/index.d.mts CHANGED
@@ -619,15 +619,6 @@ declare class DocumentResolver {
619
619
  */
620
620
  private inheritPincites;
621
621
  /**
622
- * Compute parenthesis depth at the start position of each citation.
623
- * Walks the raw text once, counting `(` and `)` and recording the
624
- * running depth at every citation's `span.cleanStart`. Depth > 0
625
- * indicates the citation is nested inside an open parenthetical
626
- * block (typically an explanatory `(quoting X)` / `(citing Y)`
627
- * following an earlier citation).
628
- */
629
- private computeParenDepths;
630
- /**
631
622
  * Find the immediate-preceding citation index for `antecedentIndex`
632
623
  * purposes. Bluebook Rule 4.1: `Id.` anchors to "the immediately
633
624
  * preceding cited authority" — unlike `resolveId`'s primary chase
@@ -641,8 +632,10 @@ declare class DocumentResolver {
641
632
  private findImmediatePredecessor;
642
633
  /**
643
634
  * Resolves `Id.` to the most recent preceding *cited authority*, respecting
644
- * Bluebook signal categories, block-/inline-quote zones, and the family
645
- * (case vs. statute) implied by `Id.`'s pincite shape (#480).
635
+ * block-/inline-quote zones and the family (case vs. statute) implied by
636
+ * `Id.`'s pincite shape (#480). Per Bluebook Rule 4.1, signal phrase is
637
+ * NOT a filter — `Id.` anchors to the immediately preceding cited
638
+ * authority regardless of whether it carries `See`, `Cf.`, etc. (#498).
646
639
  *
647
640
  * Algorithm:
648
641
  * 1. Walk backward from `currentIndex`, normalizing short-form citations
@@ -651,9 +644,8 @@ declare class DocumentResolver {
651
644
  * doesn't get double-counted with its full-cite further back.
652
645
  * 2. Filter candidates that are parenthetical children (existing #214
653
646
  * behavior) or in a quote zone outside `Id.`'s own zone.
654
- * 3. Score remaining candidates: family-match dominates, then signal
655
- * strength, then (implicitly) recency (first-added = most recent
656
- * effective mention).
647
+ * 3. Score remaining candidates: family-match dominates, then (implicitly)
648
+ * recency (first-added = most recent effective mention).
657
649
  * 4. Apply the case-name window check to surface ambiguity when the prose
658
650
  * immediately before `Id.` mentions a different case name.
659
651
  */
@@ -667,14 +659,6 @@ declare class DocumentResolver {
667
659
  */
668
660
  private getIdPreferredFamily;
669
661
  /**
670
- * Computes the "effective" signal for a citation. Citations inside a
671
- * string-cite group inherit the leading signal of the group's first
672
- * member when they have no signal of their own — the Bluebook rule that
673
- * a leading signal governs the entire string cite.
674
- */
675
- private getEffectiveSignal;
676
- private isCandidateWeakSignal;
677
- /**
678
662
  * `(citing X)` / `(quoting Y)` detection (#214). Two strategies in OR:
679
663
  * - paren depth > 0 at the citation's start (works for any prior
680
664
  * citation type — statute, journal, etc.);
@@ -801,5 +785,152 @@ declare function resolveCitations(citations: Citation[], text: string, options?:
801
785
  */
802
786
  declare function detectFootnotes(text: string): FootnoteMap;
803
787
  //#endregion
804
- export { type CaseComponentSpans, type Citation, type CitationBase, type CitationOfType, type CitationSignal, type CitationType, type CleanTextResult, type ConstitutionalCitation, type ConstitutionalComponentSpans, type CourtInference, type DocketCitation, DocumentResolver, type ExtractOptions, type ExtractorMap, type FederalRegisterCitation, type FederalRegisterComponentSpans, type FootnoteMap, type FootnoteZone, type FullCaseCitation, type FullCitation, type FullCitationType, type HistorySignal, type IdCitation, type JournalCitation, type JournalComponentSpans, type NeutralCitation, type NeutralComponentSpans, type Parenthetical, type ParentheticalType, type PinciteInfo, type PublicLawCitation, type PublicLawComponentSpans, type ResolutionOptions, type ResolutionResult, type ResolvedCitation, type ScopeStrategy, type ShortFormCaseCitation, type ShortFormCitation, type ShortFormCitationType, type Span, type StatuteCitation, type StatuteComponentSpans, type StatutesAtLargeCitation, type StatutesAtLargeComponentSpans, type SubsequentHistoryEntry, type SupraCitation, type Token, type TransformationMap, type Warning, applyFalsePositiveFilters, assertUnreachable, cleanText, detectFootnotes, extractCase, extractCitations, extractCitationsAsync, extractConstitutional, extractFederalRegister, extractJournal, extractNeutral, extractPublicLaw, extractStatute, extractStatutesAtLarge, isCaseCitation, isCitationType, isFullCitation, isShortFormCitation, normalizeCourt, parsePincite, resolveCitations, spanFromGroupIndex, tokenize };
788
+ //#region src/document/types.d.ts
789
+ /**
790
+ * Attribution mode for a quoted-text zone. Reflects the structural
791
+ * relationship between the quote and the citation that vouches for it.
792
+ *
793
+ * - "block-quote": Bluebook Rule 5 — quote set off as an indented block or
794
+ * marked with markdown `>`, with the citation immediately following.
795
+ * - "adjacent": inline quote in the same sentence as the citation.
796
+ * - "parenthetical": quote inside an explanatory parenthetical
797
+ * (e.g. `(quoting "..." Smith, 1 U.S. 1)`).
798
+ */
799
+ type AttributionKind = "block-quote" | "adjacent" | "parenthetical";
800
+ /**
801
+ * A quoted-text zone paired with the citation (if any) that vouches for it.
802
+ * Produced by the document analyzer; one entry per detected quote zone.
803
+ * Unattributed zones surface with `citationIndex` undefined.
804
+ */
805
+ interface QuoteAttribution {
806
+ /** The quoted-text span in original-text coordinates. */
807
+ quoteSpan: Span;
808
+ /** Verbatim quoted text (chars between the marks, exclusive of the marks). */
809
+ quoteText: string;
810
+ /** Citation index that vouches for the quote; undefined when none found. */
811
+ citationIndex?: number;
812
+ /** How the attribution was inferred; undefined iff citationIndex is. */
813
+ attributionKind?: AttributionKind;
814
+ /**
815
+ * Confidence (0-1). See `quoteAttribution.ts` for the stratification:
816
+ * block-quote, citation within 50 chars: 0.98
817
+ * block-quote, citation within 200 chars: 0.90
818
+ * adjacent inline, same sentence: 0.85
819
+ * parenthetical-internal: 0.95
820
+ * unattributed: undefined
821
+ */
822
+ confidence?: number;
823
+ }
824
+ /**
825
+ * A typed edge in the citation graph. `from` and `to` are indices into
826
+ * the `Document.citations` array. `type` discriminates the union.
827
+ *
828
+ * See `docs/superpowers/specs/2026-05-19-document-understanding-api-design.md`
829
+ * for the source-map describing which existing citation fields drive each kind.
830
+ */
831
+ type Edge = {
832
+ type: "resolves-to";
833
+ from: number;
834
+ to: number;
835
+ confidence: number;
836
+ warnings?: string[];
837
+ } | {
838
+ type: "antecedent";
839
+ from: number;
840
+ to: number;
841
+ } | {
842
+ type: "parallel";
843
+ from: number;
844
+ to: number;
845
+ groupId: string;
846
+ } | {
847
+ type: "history-of";
848
+ from: number;
849
+ to: number;
850
+ signal: HistorySignal;
851
+ } | {
852
+ type: "pincite-inherit";
853
+ from: number;
854
+ to: number;
855
+ } | {
856
+ type: "string-cite";
857
+ from: number;
858
+ to: number;
859
+ groupId: string;
860
+ position: number;
861
+ } | {
862
+ type: "in-parenthetical-of";
863
+ from: number;
864
+ to: number;
865
+ };
866
+ /**
867
+ * The graph of relationships between citations in a document.
868
+ *
869
+ * - `nodes.length === citations.length` always; isolated nodes
870
+ * (no edges) are still included so consumers iterating nodes don't
871
+ * miss anything.
872
+ * - `edges` is sorted by from-index, then type (alphabetical), then
873
+ * to-index for deterministic iteration and test assertions.
874
+ * - No self-edges. No duplicate edges of the same type+from+to.
875
+ * Undirected relationships (parallel groups) emit one edge per pair.
876
+ */
877
+ interface CitationGraph {
878
+ nodes: number[];
879
+ edges: Edge[];
880
+ }
881
+ /**
882
+ * A footnote zone with the citations it contains. Populated only when
883
+ * input citations carry footnote tagging (extractCitations was called
884
+ * with `detectFootnotes: true`).
885
+ */
886
+ interface AnalyzedFootnoteZone {
887
+ start: number;
888
+ end: number;
889
+ footnoteNumber: number;
890
+ /** Indices of citations whose span falls inside this footnote. */
891
+ citationIndices: number[];
892
+ }
893
+ /**
894
+ * The document analysis result. Returned by `analyzeDocument(text, citations)`.
895
+ *
896
+ * Produced as a pure projection over `text + citations[]` — no new
897
+ * tokenization or extraction. See the design doc for the algorithm rationale.
898
+ */
899
+ interface Document {
900
+ /** The citations that were analyzed. Same array reference as the input. */
901
+ citations: Citation[];
902
+ /** Prose between citations (+ before-first + after-last). Sorted by
903
+ * originalStart. Uses `fullSpan` (when available) to bound citations,
904
+ * so case-name text is not mislabeled as prose. */
905
+ proseSpans: Span[];
906
+ /** Per-citation view: prose span ending at this citation. */
907
+ precedingProse: Map<number, Span>;
908
+ /** Per-citation view: prose span starting after this citation. */
909
+ followingProse: Map<number, Span>;
910
+ /** Detected quoted-text zones with attempted attribution. Includes
911
+ * unattributed zones (citationIndex undefined). */
912
+ quoteAttributions: QuoteAttribution[];
913
+ /** All relationships between citations as typed edges. */
914
+ citationGraph: CitationGraph;
915
+ /** Footnote zones with citation members. Optional — only present when
916
+ * citations carry footnote tagging. */
917
+ footnoteZones?: AnalyzedFootnoteZone[];
918
+ }
919
+ //#endregion
920
+ //#region src/document/analyzer.d.ts
921
+ /**
922
+ * Project an existing extraction result into a Document view with prose
923
+ * offsets, quote attribution, citation graph, and (optionally) footnote
924
+ * zones.
925
+ *
926
+ * Pure projection — reads existing fields, re-shapes; no new tokenization
927
+ * or extraction. Cheap (sub-millisecond per call for typical brief sizes).
928
+ *
929
+ * See `docs/superpowers/specs/2026-05-19-document-understanding-api-design.md`.
930
+ */
931
+ declare function analyzeDocument(text: string, citations: Citation[], opts?: {
932
+ transformationMap?: TransformationMap;
933
+ }): Document;
934
+ //#endregion
935
+ export { type AnalyzedFootnoteZone, type AttributionKind, type CaseComponentSpans, type Citation, type CitationBase, type CitationGraph, type CitationOfType, type CitationSignal, type CitationType, type CleanTextResult, type ConstitutionalCitation, type ConstitutionalComponentSpans, type CourtInference, type DocketCitation, type Document, DocumentResolver, type Edge, type ExtractOptions, type ExtractorMap, type FederalRegisterCitation, type FederalRegisterComponentSpans, type FootnoteMap, type FootnoteZone, type FullCaseCitation, type FullCitation, type FullCitationType, type HistorySignal, type IdCitation, type JournalCitation, type JournalComponentSpans, type NeutralCitation, type NeutralComponentSpans, type Parenthetical, type ParentheticalType, type PinciteInfo, type PublicLawCitation, type PublicLawComponentSpans, type QuoteAttribution, type ResolutionOptions, type ResolutionResult, type ResolvedCitation, type ScopeStrategy, type ShortFormCaseCitation, type ShortFormCitation, type ShortFormCitationType, type Span, type StatuteCitation, type StatuteComponentSpans, type StatutesAtLargeCitation, type StatutesAtLargeComponentSpans, type SubsequentHistoryEntry, type SupraCitation, type Token, type TransformationMap, type Warning, analyzeDocument, applyFalsePositiveFilters, assertUnreachable, cleanText, detectFootnotes, extractCase, extractCitations, extractCitationsAsync, extractConstitutional, extractFederalRegister, extractJournal, extractNeutral, extractPublicLaw, extractStatute, extractStatutesAtLarge, isCaseCitation, isCitationType, isFullCitation, isShortFormCitation, normalizeCourt, parsePincite, resolveCitations, spanFromGroupIndex, tokenize };
805
936
  //# sourceMappingURL=index.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.mts","names":[],"sources":["../src/types/guards.ts","../src/patterns/casePatterns.ts","../src/extract/extractCitations.ts","../src/extract/filterFalsePositives.ts","../src/clean/cleanText.ts","../src/tokenize/tokenizer.ts","../src/extract/extractCase.ts","../src/extract/extractConstitutional.ts","../src/extract/extractFederalRegister.ts","../src/extract/extractJournal.ts","../src/extract/extractNeutral.ts","../src/extract/extractPublicLaw.ts","../src/extract/extractStatute.ts","../src/extract/extractStatutesAtLarge.ts","../src/extract/courtNormalization.ts","../src/resolve/DocumentResolver.ts","../src/resolve/index.ts","../src/footnotes/detectFootnotes.ts"],"mappings":";;;;;;;iBAYgB,cAAA,CAAe,QAAA,EAAU,QAAA,GAAW,QAAA,IAAY,YAAA;;;;iBAiBhD,mBAAA,CAAoB,QAAA,EAAU,QAAA,GAAW,QAAA,IAAY,iBAAA;;;;iBAOrD,cAAA,CAAe,QAAA,EAAU,QAAA,GAAW,QAAA,IAAY,gBAAA;;AAPhE;;;iBAegB,cAAA,WAAyB,YAAA,CAAA,CACvC,QAAA,EAAU,QAAA,EACV,IAAA,EAA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BzBH;;;;;;;;iBiBKgB,eAAA,CAAgB,IAAA,WAAe,WAAA"}
1
+ {"version":3,"file":"index.d.mts","names":[],"sources":["../src/types/guards.ts","../src/patterns/casePatterns.ts","../src/extract/extractCitations.ts","../src/extract/filterFalsePositives.ts","../src/clean/cleanText.ts","../src/tokenize/tokenizer.ts","../src/extract/extractCase.ts","../src/extract/extractConstitutional.ts","../src/extract/extractFederalRegister.ts","../src/extract/extractJournal.ts","../src/extract/extractNeutral.ts","../src/extract/extractPublicLaw.ts","../src/extract/extractStatute.ts","../src/extract/extractStatutesAtLarge.ts","../src/extract/courtNormalization.ts","../src/resolve/DocumentResolver.ts","../src/resolve/index.ts","../src/footnotes/detectFootnotes.ts","../src/document/types.ts","../src/document/analyzer.ts"],"mappings":";;;;;;;iBAYgB,cAAA,CAAe,QAAA,EAAU,QAAA,GAAW,QAAA,IAAY,YAAA;;;;iBAiBhD,mBAAA,CAAoB,QAAA,EAAU,QAAA,GAAW,QAAA,IAAY,iBAAA;;;;iBAOrD,cAAA,CAAe,QAAA,EAAU,QAAA,GAAW,QAAA,IAAY,gBAAA;;AAPhE;;;iBAegB,cAAA,WAAyB,YAAA,CAAA,CACvC,QAAA,EAAU,QAAA,EACV,IAAA,EAAM,CAAA,GACL,QAAA,IAAY,cAAA,CAAe,CAAA;;;;;;;AAX9B;;;;;;;;;;iBA+BgB,iBAAA,CAAkB,CAAA;;;UCnDjB,OAAA;EACf,EAAA;EACA,KAAA,EAAO,MAAA;EACP,WAAA;EACA,IAAA,EAAM,gBAAA;AAAA;;;;ADRR;;UEgDiB,cAAA;EFhD+C;;;;;;;AAiBhE;;;;;;;EE8CE,QAAA,GAAW,KAAA,EAAO,IAAA;;;AFvCpB;;;;;;;;;;AAQA;;EE+CE,QAAA,GAAW,OAAA;;;;;;;;;;;;;;EAeX,OAAA;;;;;AFvCF;;;;;;;;ACnDA;;EC0GE,iBAAA,GAAoB,iBAAA;EDtGd;;;;;;;;;;;;ACwCR;;;;EAgFE,o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