@tricoteuses/tisseuse 0.14.2 → 0.14.3
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-_xYtGRXN.js → html-IERGWCi4.js} +689 -612
- package/dist/index.js +1 -1
- package/dist/server.js +790 -675
- package/dist/src/lib/extractors/action_directives.d.ts +4 -0
- package/dist/src/lib/server/index.d.ts +1 -1
- package/dist/src/lib/server/parsed_bills.d.ts +16 -0
- package/dist/src/lib/text_parsers/ast.d.ts +2 -0
- package/dist/src/lib/text_parsers/citations.d.ts +4 -4
- package/dist/src/lib/text_parsers/repeated_actions.d.ts +1 -0
- package/package.json +1 -1
|
@@ -52,6 +52,7 @@ export type ActionOperation = (ActionOperationTarget & {
|
|
|
52
52
|
targetText: string;
|
|
53
53
|
replacementText: string;
|
|
54
54
|
replacement: ActionReplacement;
|
|
55
|
+
targetOccurrenceCount?: number;
|
|
55
56
|
targetScope?: ActionTargetScope;
|
|
56
57
|
tableTarget?: ActionTableTarget;
|
|
57
58
|
}) | (ActionOperationTarget & {
|
|
@@ -59,6 +60,7 @@ export type ActionOperation = (ActionOperationTarget & {
|
|
|
59
60
|
targetText: string;
|
|
60
61
|
targetScope?: ActionTargetScope;
|
|
61
62
|
occurrenceIndex?: number;
|
|
63
|
+
targetOccurrenceCount?: number;
|
|
62
64
|
tableTarget?: ActionTableTarget;
|
|
63
65
|
}) | (ActionOperationTarget & {
|
|
64
66
|
kind: "delete_portion";
|
|
@@ -94,6 +96,7 @@ export type ResolvedActionDirective = (ActionDirectiveCommon & {
|
|
|
94
96
|
targetText: string;
|
|
95
97
|
replacementText: string;
|
|
96
98
|
replacement: ActionReplacement;
|
|
99
|
+
targetOccurrenceCount?: number;
|
|
97
100
|
targetScope?: ActionTargetScope;
|
|
98
101
|
tableTarget?: ActionTableTarget;
|
|
99
102
|
}) | (ActionDirectiveCommon & {
|
|
@@ -104,6 +107,7 @@ export type ResolvedActionDirective = (ActionDirectiveCommon & {
|
|
|
104
107
|
targetText: string;
|
|
105
108
|
targetScope?: ActionTargetScope;
|
|
106
109
|
occurrenceIndex?: number;
|
|
110
|
+
targetOccurrenceCount?: number;
|
|
107
111
|
tableTarget?: ActionTableTarget;
|
|
108
112
|
}) | (ActionDirectiveCommon & {
|
|
109
113
|
kind: "delete_portion";
|
|
@@ -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 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 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';
|
|
@@ -11,6 +11,21 @@ export type ParsedBillDiagnostic = {
|
|
|
11
11
|
message: string;
|
|
12
12
|
details?: unknown;
|
|
13
13
|
};
|
|
14
|
+
export type ParsedBillAnnotationSeverity = "warning";
|
|
15
|
+
export type ParsedBillAnnotationRange = {
|
|
16
|
+
blockId: string;
|
|
17
|
+
start: number;
|
|
18
|
+
stop: number;
|
|
19
|
+
text: string;
|
|
20
|
+
};
|
|
21
|
+
export type ParsedBillAnnotation = {
|
|
22
|
+
articleId: string;
|
|
23
|
+
code: string;
|
|
24
|
+
details?: unknown;
|
|
25
|
+
message: string;
|
|
26
|
+
ranges: ParsedBillAnnotationRange[];
|
|
27
|
+
severity: ParsedBillAnnotationSeverity;
|
|
28
|
+
};
|
|
14
29
|
export type ParsedBillBlock = {
|
|
15
30
|
id: string;
|
|
16
31
|
articleId: string;
|
|
@@ -100,6 +115,7 @@ export type ParsedBillDocument = {
|
|
|
100
115
|
globalApplicabilityDate?: string;
|
|
101
116
|
internalArticleDefinitions?: ParsedBillInternalArticleDefinition[];
|
|
102
117
|
directives: ParsedBillDirective[];
|
|
118
|
+
annotations?: ParsedBillAnnotation[];
|
|
103
119
|
diagnostics?: ParsedBillDiagnostic[];
|
|
104
120
|
};
|
|
105
121
|
export declare function parseAssembleeBillRaw(input: string, options: ParseBillRawOptions): Promise<ParsedBillDocument>;
|
|
@@ -19,6 +19,7 @@ export interface TextAstAction {
|
|
|
19
19
|
export type TextAstActionDirectiveOperation = {
|
|
20
20
|
kind: "delete";
|
|
21
21
|
occurrenceIndex?: number;
|
|
22
|
+
targetOccurrenceCount?: number;
|
|
22
23
|
targetCitation: TextAstCitation;
|
|
23
24
|
targetScope?: TextAstActionTargetScope;
|
|
24
25
|
} | {
|
|
@@ -28,6 +29,7 @@ export type TextAstActionDirectiveOperation = {
|
|
|
28
29
|
} | {
|
|
29
30
|
kind: "replace";
|
|
30
31
|
replacementCitation: TextAstCitation;
|
|
32
|
+
targetOccurrenceCount?: number;
|
|
31
33
|
targetCitation: TextAstCitation;
|
|
32
34
|
targetScope?: TextAstActionTargetScope;
|
|
33
35
|
} | {
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { TextAst, TextAstCitation } from './ast.js';
|
|
2
|
-
import { TextParserContext } from './parsers.js';
|
|
2
|
+
import { TextParserContext, TextParser } from './parsers.js';
|
|
3
3
|
import { TransformationLeaf } from './transformers.js';
|
|
4
4
|
type TextAstPositionRange = TextAstCitation["position"];
|
|
5
5
|
export declare function createTextAstCitation(contentPosition: TextAstPositionRange, position?: TextAstPositionRange): TextAstCitation;
|
|
6
|
-
export declare const citationLigne:
|
|
7
|
-
export declare const citationSimple:
|
|
8
|
-
export declare const citation:
|
|
6
|
+
export declare const citationLigne: TextParser<TextAst>;
|
|
7
|
+
export declare const citationSimple: TextParser<TextAst>;
|
|
8
|
+
export declare const citation: TextParser<TextAst>;
|
|
9
9
|
export declare function convertCitationToText(context: TextParserContext, citation: TextAstCitation): TransformationLeaf;
|
|
10
10
|
export declare function citationToText(sourceText: string, citation: TextAstCitation): string;
|
|
11
11
|
export {};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { TextParser } from './parsers.js';
|
|
2
2
|
export declare const repeatedActionQualifier: TextParser<number>;
|
|
3
3
|
export declare function findRepeatedActionCount(text: string): number | null;
|
|
4
|
+
export declare function findRepeatedTargetOccurrenceCount(text: string, position: number): number | null;
|
|
4
5
|
export declare function stripRepeatedActionQualifiers(text: string): string;
|