@tricoteuses/tisseuse 0.15.3 → 0.16.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/{html-BDmDxEJF.js → html-BTeBbxJE.js} +2448 -2410
- package/dist/index.js +1 -1
- package/dist/server.js +869 -787
- package/dist/src/lib/extractors/action_directives.d.ts +1 -0
- package/dist/src/lib/extractors/article_action_effects.d.ts +1 -1
- package/dist/src/lib/extractors/links.d.ts +4 -2
- package/dist/src/lib/extractors/qualified_versions.d.ts +3 -0
- package/dist/src/lib/extractors/qualified_versions.test.d.ts +1 -0
- package/dist/src/lib/linkers/html.d.ts +2 -1
- package/dist/src/lib/server/index.d.ts +1 -1
- package/dist/src/lib/server/parsed_bills.d.ts +9 -0
- package/dist/src/lib/text_parsers/qualified_versions.d.ts +6 -0
- package/dist/src/lib/text_parsers/table_row_targets.d.ts +10 -0
- package/package.json +1 -1
|
@@ -14,4 +14,4 @@ export type ArticleActionEffect = {
|
|
|
14
14
|
/** Source ranges for distinct operations on the same article, from the grammar. */
|
|
15
15
|
export declare function extractActionOperationSourceAnnotations(sourceText: string, operationCount: number): ArticleActionSourceAnnotation[] | null;
|
|
16
16
|
/** Resolve linked article targets only when the grammar accounts for every link. */
|
|
17
|
-
export declare function extractArticleActionEffects(sourceText: string, targetIds: string[]): ArticleActionEffect[] | null;
|
|
17
|
+
export declare function extractArticleActionEffects(sourceText: string, targetIds: string[], sharedDirective?: ResolvedActionDirective): ArticleActionEffect[] | null;
|
|
@@ -146,10 +146,11 @@ type TextLinksIterationDiagnostics = {
|
|
|
146
146
|
textLinkCount: number;
|
|
147
147
|
textLinkMs: number;
|
|
148
148
|
};
|
|
149
|
-
export declare function extractTextLinks({ canutesDb, context, date, legiResolver: providedLegiResolver, logIgnoredReferencesTypes, logPartialReferences, logReferences, state: inputState, transformation, }: {
|
|
149
|
+
export declare function extractTextLinks({ canutesDb, context, date, includeInternalArticleLinks, legiResolver: providedLegiResolver, logIgnoredReferencesTypes, logPartialReferences, logReferences, state: inputState, transformation, }: {
|
|
150
150
|
canutesDb?: Sql;
|
|
151
151
|
context: TextParserContext;
|
|
152
152
|
date: string;
|
|
153
|
+
includeInternalArticleLinks?: boolean;
|
|
153
154
|
legiResolver?: LegiResolver;
|
|
154
155
|
logIgnoredReferencesTypes?: boolean;
|
|
155
156
|
logPartialReferences?: boolean;
|
|
@@ -162,8 +163,9 @@ export declare function extractTextLinks({ canutesDb, context, date, legiResolve
|
|
|
162
163
|
state?: TextLinksParserState;
|
|
163
164
|
transformation?: Transformation;
|
|
164
165
|
}): AsyncGenerator<DefinitionOrLink, void>;
|
|
165
|
-
export declare function iterReferenceLinks({ articleDefinitionByNumByTextId: articleDefinitionByNumByTextIdInput, legiResolver, context, date, logIgnoredReferencesTypes, logPartialReferences, originalPositionsFromTransformedIterator, reference, iterationDiagnostics: inputIterationDiagnostics, resolverDiagnostics: inputResolverDiagnostics, state: inputState, }: {
|
|
166
|
+
export declare function iterReferenceLinks({ articleDefinitionByNumByTextId: articleDefinitionByNumByTextIdInput, includeInternalArticleLinks, legiResolver, context, date, logIgnoredReferencesTypes, logPartialReferences, originalPositionsFromTransformedIterator, reference, iterationDiagnostics: inputIterationDiagnostics, resolverDiagnostics: inputResolverDiagnostics, state: inputState, }: {
|
|
166
167
|
articleDefinitionByNumByTextId?: Record<string, Record<string, ArticleDefinition>>;
|
|
168
|
+
includeInternalArticleLinks?: boolean;
|
|
167
169
|
legiResolver: LegiResolver;
|
|
168
170
|
context: TextParserContext;
|
|
169
171
|
date: string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -4,8 +4,9 @@ import { LegiResolver } from '../legi/resolver.js';
|
|
|
4
4
|
import { LinkType } from '../links.js';
|
|
5
5
|
import { TextParserContext } from '../text_parsers/parsers.js';
|
|
6
6
|
import { Transformation } from '../text_parsers/transformers.js';
|
|
7
|
-
export declare function addLinksToHtml({ canutesDb, legiResolver: providedLegiResolver, date, html, linkBaseUrl, linkType, logIgnoredReferencesTypes, logPartialReferences, logReferences, onLink, previousContext, state, }: {
|
|
7
|
+
export declare function addLinksToHtml({ canutesDb, includeInternalArticleLinks, legiResolver: providedLegiResolver, date, html, linkBaseUrl, linkType, logIgnoredReferencesTypes, logPartialReferences, logReferences, onLink, previousContext, state, }: {
|
|
8
8
|
canutesDb?: Sql;
|
|
9
|
+
includeInternalArticleLinks?: boolean;
|
|
9
10
|
legiResolver?: LegiResolver;
|
|
10
11
|
date: string;
|
|
11
12
|
html: string;
|
|
@@ -6,7 +6,7 @@ export { hashSenatSearchItem, parseSenatDocumentSearchContent, type SenatSearchI
|
|
|
6
6
|
export { isAkomaNtosoXml, resolveSenatAkomaNtosoSource, type SenatAkomaNtosoSource, } from './senat_document_sources.js';
|
|
7
7
|
export { simplifyWordHtml, simplifyWordHtmlToDocument, type SimplifyHtmlOptions, } from './html_simplifier.js';
|
|
8
8
|
export { addLinksOrReferencesToHtmlFile } from './linkers/html.js';
|
|
9
|
-
export { linkAkomaNtosoBillRaw, linkAssembleeBillRaw, parseAkomaNtosoBillRaw, parseAssembleeBillRaw, renderAkomaNtosoBillRaw, type LinkedBillDocument, type ParsedBillAnnotation, type ParsedBillAnnotationRange, type ParsedBillAnnotationSeverity, type ParsedBillArticle, type ParsedBillBlock, type ParsedBillBlockKind, type ParsedBillDiagnostic, type ParsedBillDirective, type ParsedBillDocument, type ParsedBillLink, type ParsedBillSourceFormat, type ParsedBillToc, type ParseBillRawOptions, } from './parsed_bills.js';
|
|
9
|
+
export { linkAkomaNtosoBillRaw, linkAssembleeBillRaw, parseAkomaNtosoBillRaw, parseAssembleeBillRaw, renderAkomaNtosoBillRaw, type LinkedBillDocument, type ParsedBillAnnotation, type ParsedBillAnnotationRange, type ParsedBillAnnotationSeverity, type ParsedBillArticle, type ParsedBillBlock, type ParsedBillBlockKind, type ParsedBillDiagnostic, type ParsedBillDirective, type ParsedBillDocument, type ParsedBillLink, type ParsedBillQualifiedVersion, type ParsedBillSourceFormat, type ParsedBillToc, type ParseBillRawOptions, } from './parsed_bills.js';
|
|
10
10
|
export { type LegiArticleInfo, LegiResolver, type LegiSectionInfo, type PreloadActiveArticlesByTextIdsOptions, type PreloadTextTitlesInfosOptions, type PreloadTextTitlesInfosProgress, } from '../legi/resolver.js';
|
|
11
11
|
export { buildAndInstallTextTitlesInfos, buildTextTitlesInfos, type BuildTextTitlesInfosProgress, type TextTitlesInfoRow, type TextTitlesInfos, } from '../legi/text_titles_infos.js';
|
|
12
12
|
export { addPositionsToTableOfContentsFile, simplifiedHtmlBillFileToTableOfContentsFile, } from './tables_of_contents.js';
|
|
@@ -33,9 +33,16 @@ export type ParsedBillBlock = {
|
|
|
33
33
|
articleId: string;
|
|
34
34
|
kind: ParsedBillBlockKind;
|
|
35
35
|
links: ParsedBillLink[];
|
|
36
|
+
qualifiedVersion?: ParsedBillQualifiedVersion;
|
|
36
37
|
text: string;
|
|
37
38
|
html: string;
|
|
38
39
|
};
|
|
40
|
+
/** A version qualified by an enacted law article, distinct from the article being amended. */
|
|
41
|
+
export type ParsedBillQualifiedVersion = {
|
|
42
|
+
targetArticleId?: string;
|
|
43
|
+
modifyingArticleId: string;
|
|
44
|
+
modifyingArticleLabel: string;
|
|
45
|
+
};
|
|
39
46
|
export type ParsedBillLink = {
|
|
40
47
|
id: string;
|
|
41
48
|
insideFrenchQuotes?: boolean;
|
|
@@ -79,6 +86,7 @@ export type ParsedBillDirective = {
|
|
|
79
86
|
};
|
|
80
87
|
internalTargetAmbiguity?: ParsedBillInternalArticleTarget;
|
|
81
88
|
targetIds?: string[];
|
|
89
|
+
qualifiedVersion?: ParsedBillQualifiedVersion;
|
|
82
90
|
};
|
|
83
91
|
export type ParsedBillInternalArticleTarget = {
|
|
84
92
|
definitionId: string;
|
|
@@ -96,6 +104,7 @@ export type ParsedBillInternalArticleDefinition = ParsedBillInternalArticleTarge
|
|
|
96
104
|
export type ParseBillRawOptions = {
|
|
97
105
|
canutesDb?: Sql;
|
|
98
106
|
date?: string;
|
|
107
|
+
includeInternalArticleLinks?: boolean;
|
|
99
108
|
includeDirectiveAnalysis?: boolean;
|
|
100
109
|
legiResolver?: LegiResolver;
|
|
101
110
|
linkBaseUrl: string;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { TextAstReference } from './ast.js';
|
|
2
|
+
import { TextParser } from './parsers.js';
|
|
3
|
+
/** Reusable grammatical introducer for the enacted source of a version. */
|
|
4
|
+
export declare const qualifiedVersionRedaction: TextParser<import('./ast.js').TextAst>;
|
|
5
|
+
/** Parse a version's provenance using the same legal-reference grammar as actions. */
|
|
6
|
+
export declare const qualifiedVersionReference: TextParser<TextAstReference>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { TextAstArticle } from './ast.js';
|
|
2
|
+
import { FragmentPosition } from './fragments.js';
|
|
3
|
+
export type TableRowTarget = {
|
|
4
|
+
article: TextAstArticle;
|
|
5
|
+
alineaIndex: number;
|
|
6
|
+
rowIndex: number;
|
|
7
|
+
rowEndIndex: number;
|
|
8
|
+
position: FragmentPosition;
|
|
9
|
+
};
|
|
10
|
+
export declare function extractTableRowTargets(text: string): TableRowTarget[];
|