eyecite-ts 0.20.0 → 0.21.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/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
@@ -801,5 +792,152 @@ declare function resolveCitations(citations: Citation[], text: string, options?:
801
792
  */
802
793
  declare function detectFootnotes(text: string): FootnoteMap;
803
794
  //#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 };
795
+ //#region src/document/types.d.ts
796
+ /**
797
+ * Attribution mode for a quoted-text zone. Reflects the structural
798
+ * relationship between the quote and the citation that vouches for it.
799
+ *
800
+ * - "block-quote": Bluebook Rule 5 — quote set off as an indented block or
801
+ * marked with markdown `>`, with the citation immediately following.
802
+ * - "adjacent": inline quote in the same sentence as the citation.
803
+ * - "parenthetical": quote inside an explanatory parenthetical
804
+ * (e.g. `(quoting "..." Smith, 1 U.S. 1)`).
805
+ */
806
+ type AttributionKind = "block-quote" | "adjacent" | "parenthetical";
807
+ /**
808
+ * A quoted-text zone paired with the citation (if any) that vouches for it.
809
+ * Produced by the document analyzer; one entry per detected quote zone.
810
+ * Unattributed zones surface with `citationIndex` undefined.
811
+ */
812
+ interface QuoteAttribution {
813
+ /** The quoted-text span in original-text coordinates. */
814
+ quoteSpan: Span;
815
+ /** Verbatim quoted text (chars between the marks, exclusive of the marks). */
816
+ quoteText: string;
817
+ /** Citation index that vouches for the quote; undefined when none found. */
818
+ citationIndex?: number;
819
+ /** How the attribution was inferred; undefined iff citationIndex is. */
820
+ attributionKind?: AttributionKind;
821
+ /**
822
+ * Confidence (0-1). See `quoteAttribution.ts` for the stratification:
823
+ * block-quote, citation within 50 chars: 0.98
824
+ * block-quote, citation within 200 chars: 0.90
825
+ * adjacent inline, same sentence: 0.85
826
+ * parenthetical-internal: 0.95
827
+ * unattributed: undefined
828
+ */
829
+ confidence?: number;
830
+ }
831
+ /**
832
+ * A typed edge in the citation graph. `from` and `to` are indices into
833
+ * the `Document.citations` array. `type` discriminates the union.
834
+ *
835
+ * See `docs/superpowers/specs/2026-05-19-document-understanding-api-design.md`
836
+ * for the source-map describing which existing citation fields drive each kind.
837
+ */
838
+ type Edge = {
839
+ type: "resolves-to";
840
+ from: number;
841
+ to: number;
842
+ confidence: number;
843
+ warnings?: string[];
844
+ } | {
845
+ type: "antecedent";
846
+ from: number;
847
+ to: number;
848
+ } | {
849
+ type: "parallel";
850
+ from: number;
851
+ to: number;
852
+ groupId: string;
853
+ } | {
854
+ type: "history-of";
855
+ from: number;
856
+ to: number;
857
+ signal: HistorySignal;
858
+ } | {
859
+ type: "pincite-inherit";
860
+ from: number;
861
+ to: number;
862
+ } | {
863
+ type: "string-cite";
864
+ from: number;
865
+ to: number;
866
+ groupId: string;
867
+ position: number;
868
+ } | {
869
+ type: "in-parenthetical-of";
870
+ from: number;
871
+ to: number;
872
+ };
873
+ /**
874
+ * The graph of relationships between citations in a document.
875
+ *
876
+ * - `nodes.length === citations.length` always; isolated nodes
877
+ * (no edges) are still included so consumers iterating nodes don't
878
+ * miss anything.
879
+ * - `edges` is sorted by from-index, then type (alphabetical), then
880
+ * to-index for deterministic iteration and test assertions.
881
+ * - No self-edges. No duplicate edges of the same type+from+to.
882
+ * Undirected relationships (parallel groups) emit one edge per pair.
883
+ */
884
+ interface CitationGraph {
885
+ nodes: number[];
886
+ edges: Edge[];
887
+ }
888
+ /**
889
+ * A footnote zone with the citations it contains. Populated only when
890
+ * input citations carry footnote tagging (extractCitations was called
891
+ * with `detectFootnotes: true`).
892
+ */
893
+ interface AnalyzedFootnoteZone {
894
+ start: number;
895
+ end: number;
896
+ footnoteNumber: number;
897
+ /** Indices of citations whose span falls inside this footnote. */
898
+ citationIndices: number[];
899
+ }
900
+ /**
901
+ * The document analysis result. Returned by `analyzeDocument(text, citations)`.
902
+ *
903
+ * Produced as a pure projection over `text + citations[]` — no new
904
+ * tokenization or extraction. See the design doc for the algorithm rationale.
905
+ */
906
+ interface Document {
907
+ /** The citations that were analyzed. Same array reference as the input. */
908
+ citations: Citation[];
909
+ /** Prose between citations (+ before-first + after-last). Sorted by
910
+ * originalStart. Uses `fullSpan` (when available) to bound citations,
911
+ * so case-name text is not mislabeled as prose. */
912
+ proseSpans: Span[];
913
+ /** Per-citation view: prose span ending at this citation. */
914
+ precedingProse: Map<number, Span>;
915
+ /** Per-citation view: prose span starting after this citation. */
916
+ followingProse: Map<number, Span>;
917
+ /** Detected quoted-text zones with attempted attribution. Includes
918
+ * unattributed zones (citationIndex undefined). */
919
+ quoteAttributions: QuoteAttribution[];
920
+ /** All relationships between citations as typed edges. */
921
+ citationGraph: CitationGraph;
922
+ /** Footnote zones with citation members. Optional — only present when
923
+ * citations carry footnote tagging. */
924
+ footnoteZones?: AnalyzedFootnoteZone[];
925
+ }
926
+ //#endregion
927
+ //#region src/document/analyzer.d.ts
928
+ /**
929
+ * Project an existing extraction result into a Document view with prose
930
+ * offsets, quote attribution, citation graph, and (optionally) footnote
931
+ * zones.
932
+ *
933
+ * Pure projection — reads existing fields, re-shapes; no new tokenization
934
+ * or extraction. Cheap (sub-millisecond per call for typical brief sizes).
935
+ *
936
+ * See `docs/superpowers/specs/2026-05-19-document-understanding-api-design.md`.
937
+ */
938
+ declare function analyzeDocument(text: string, citations: Citation[], opts?: {
939
+ transformationMap?: TransformationMap;
940
+ }): Document;
941
+ //#endregion
942
+ 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
943
  //# 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;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gB,cAAA,CAAe,KAAA;;;;AdiB/B;;;ceyMa,gBAAA;EAAA,iBACM,SAAA;EAAA,iBACA,IAAA;EAAA,iBACA,OAAA;EAAA,iBAGA,OAAA;EAAA,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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A;EAChE,IAAA;EAA6B,IAAA;EAAc,EAAA;AAAA;;;;;;;;;;;;UAahC,aAAA;EACf,KAAA;EACA,KAAA,EAAO,IAAA;AAAA;;;;;AhBuIT;UgB/HiB,oBAAA;EACf,KAAA;EACA,GAAA;EACA,cAAA;;EAEA,eAAA;AAAA;;;;AhB8HF;;;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
@@ -801,5 +792,152 @@ declare function resolveCitations(citations: Citation[], text: string, options?:
801
792
  */
802
793
  declare function detectFootnotes(text: string): FootnoteMap;
803
794
  //#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 };
795
+ //#region src/document/types.d.ts
796
+ /**
797
+ * Attribution mode for a quoted-text zone. Reflects the structural
798
+ * relationship between the quote and the citation that vouches for it.
799
+ *
800
+ * - "block-quote": Bluebook Rule 5 — quote set off as an indented block or
801
+ * marked with markdown `>`, with the citation immediately following.
802
+ * - "adjacent": inline quote in the same sentence as the citation.
803
+ * - "parenthetical": quote inside an explanatory parenthetical
804
+ * (e.g. `(quoting "..." Smith, 1 U.S. 1)`).
805
+ */
806
+ type AttributionKind = "block-quote" | "adjacent" | "parenthetical";
807
+ /**
808
+ * A quoted-text zone paired with the citation (if any) that vouches for it.
809
+ * Produced by the document analyzer; one entry per detected quote zone.
810
+ * Unattributed zones surface with `citationIndex` undefined.
811
+ */
812
+ interface QuoteAttribution {
813
+ /** The quoted-text span in original-text coordinates. */
814
+ quoteSpan: Span;
815
+ /** Verbatim quoted text (chars between the marks, exclusive of the marks). */
816
+ quoteText: string;
817
+ /** Citation index that vouches for the quote; undefined when none found. */
818
+ citationIndex?: number;
819
+ /** How the attribution was inferred; undefined iff citationIndex is. */
820
+ attributionKind?: AttributionKind;
821
+ /**
822
+ * Confidence (0-1). See `quoteAttribution.ts` for the stratification:
823
+ * block-quote, citation within 50 chars: 0.98
824
+ * block-quote, citation within 200 chars: 0.90
825
+ * adjacent inline, same sentence: 0.85
826
+ * parenthetical-internal: 0.95
827
+ * unattributed: undefined
828
+ */
829
+ confidence?: number;
830
+ }
831
+ /**
832
+ * A typed edge in the citation graph. `from` and `to` are indices into
833
+ * the `Document.citations` array. `type` discriminates the union.
834
+ *
835
+ * See `docs/superpowers/specs/2026-05-19-document-understanding-api-design.md`
836
+ * for the source-map describing which existing citation fields drive each kind.
837
+ */
838
+ type Edge = {
839
+ type: "resolves-to";
840
+ from: number;
841
+ to: number;
842
+ confidence: number;
843
+ warnings?: string[];
844
+ } | {
845
+ type: "antecedent";
846
+ from: number;
847
+ to: number;
848
+ } | {
849
+ type: "parallel";
850
+ from: number;
851
+ to: number;
852
+ groupId: string;
853
+ } | {
854
+ type: "history-of";
855
+ from: number;
856
+ to: number;
857
+ signal: HistorySignal;
858
+ } | {
859
+ type: "pincite-inherit";
860
+ from: number;
861
+ to: number;
862
+ } | {
863
+ type: "string-cite";
864
+ from: number;
865
+ to: number;
866
+ groupId: string;
867
+ position: number;
868
+ } | {
869
+ type: "in-parenthetical-of";
870
+ from: number;
871
+ to: number;
872
+ };
873
+ /**
874
+ * The graph of relationships between citations in a document.
875
+ *
876
+ * - `nodes.length === citations.length` always; isolated nodes
877
+ * (no edges) are still included so consumers iterating nodes don't
878
+ * miss anything.
879
+ * - `edges` is sorted by from-index, then type (alphabetical), then
880
+ * to-index for deterministic iteration and test assertions.
881
+ * - No self-edges. No duplicate edges of the same type+from+to.
882
+ * Undirected relationships (parallel groups) emit one edge per pair.
883
+ */
884
+ interface CitationGraph {
885
+ nodes: number[];
886
+ edges: Edge[];
887
+ }
888
+ /**
889
+ * A footnote zone with the citations it contains. Populated only when
890
+ * input citations carry footnote tagging (extractCitations was called
891
+ * with `detectFootnotes: true`).
892
+ */
893
+ interface AnalyzedFootnoteZone {
894
+ start: number;
895
+ end: number;
896
+ footnoteNumber: number;
897
+ /** Indices of citations whose span falls inside this footnote. */
898
+ citationIndices: number[];
899
+ }
900
+ /**
901
+ * The document analysis result. Returned by `analyzeDocument(text, citations)`.
902
+ *
903
+ * Produced as a pure projection over `text + citations[]` — no new
904
+ * tokenization or extraction. See the design doc for the algorithm rationale.
905
+ */
906
+ interface Document {
907
+ /** The citations that were analyzed. Same array reference as the input. */
908
+ citations: Citation[];
909
+ /** Prose between citations (+ before-first + after-last). Sorted by
910
+ * originalStart. Uses `fullSpan` (when available) to bound citations,
911
+ * so case-name text is not mislabeled as prose. */
912
+ proseSpans: Span[];
913
+ /** Per-citation view: prose span ending at this citation. */
914
+ precedingProse: Map<number, Span>;
915
+ /** Per-citation view: prose span starting after this citation. */
916
+ followingProse: Map<number, Span>;
917
+ /** Detected quoted-text zones with attempted attribution. Includes
918
+ * unattributed zones (citationIndex undefined). */
919
+ quoteAttributions: QuoteAttribution[];
920
+ /** All relationships between citations as typed edges. */
921
+ citationGraph: CitationGraph;
922
+ /** Footnote zones with citation members. Optional — only present when
923
+ * citations carry footnote tagging. */
924
+ footnoteZones?: AnalyzedFootnoteZone[];
925
+ }
926
+ //#endregion
927
+ //#region src/document/analyzer.d.ts
928
+ /**
929
+ * Project an existing extraction result into a Document view with prose
930
+ * offsets, quote attribution, citation graph, and (optionally) footnote
931
+ * zones.
932
+ *
933
+ * Pure projection — reads existing fields, re-shapes; no new tokenization
934
+ * or extraction. Cheap (sub-millisecond per call for typical brief sizes).
935
+ *
936
+ * See `docs/superpowers/specs/2026-05-19-document-understanding-api-design.md`.
937
+ */
938
+ declare function analyzeDocument(text: string, citations: Citation[], opts?: {
939
+ transformationMap?: TransformationMap;
940
+ }): Document;
941
+ //#endregion
942
+ 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
943
  //# 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/resol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;;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.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,KA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