@tricoteuses/tisseuse 0.16.0 → 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 +650 -600
- 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/linkers/html.d.ts +2 -1
- package/dist/src/lib/server/parsed_bills.d.ts +1 -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;
|
|
@@ -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;
|
|
@@ -104,6 +104,7 @@ export type ParsedBillInternalArticleDefinition = ParsedBillInternalArticleTarge
|
|
|
104
104
|
export type ParseBillRawOptions = {
|
|
105
105
|
canutesDb?: Sql;
|
|
106
106
|
date?: string;
|
|
107
|
+
includeInternalArticleLinks?: boolean;
|
|
107
108
|
includeDirectiveAnalysis?: boolean;
|
|
108
109
|
legiResolver?: LegiResolver;
|
|
109
110
|
linkBaseUrl: string;
|
|
@@ -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[];
|