@tricoteuses/tisseuse 0.16.1 → 0.17.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/{html-BTeBbxJE.js → html-UaTiLfCR.js} +948 -843
- package/dist/index.js +55 -55
- package/dist/server.js +744 -747
- package/dist/src/lib/extractors/article_portions.d.ts +6 -0
- package/dist/src/lib/index.d.ts +1 -1
- package/dist/src/lib/text_parsers/table_row_targets.d.ts +2 -0
- package/dist/src/lib/text_parsers/table_unit_notes.d.ts +1 -0
- package/package.json +1 -1
|
@@ -77,6 +77,12 @@ export declare const BARE_ITEM_PREFIX_RE: RegExp;
|
|
|
77
77
|
export declare function isRomanNumeral(token: string): boolean;
|
|
78
78
|
export declare function isArticlePortionStructuralStart(text: string): boolean;
|
|
79
79
|
export declare function parseArticleSubdivisionMarker(text: string): ArticleSubdivisionMarker | undefined;
|
|
80
|
+
/** A standalone unit caption immediately preceding a table describes that table,
|
|
81
|
+
* rather than introducing another legislative alinéa. Keep its source HTML intact. */
|
|
82
|
+
export declare function getTableUnitNoteRanges(html: string): Array<{
|
|
83
|
+
start: number;
|
|
84
|
+
stop: number;
|
|
85
|
+
}>;
|
|
80
86
|
export declare function buildArticlePortionTreeFromHtml(html: string): ArticlePortionArticle;
|
|
81
87
|
export declare function extractPortionSelectors(reference: TextAstReference): PortionSelector[];
|
|
82
88
|
export declare function resolvePortionSelector(article: ArticlePortionArticle, selector: PortionSelector): ArticlePortionMatch | null;
|
package/dist/src/lib/index.d.ts
CHANGED
|
@@ -7,7 +7,7 @@ export { extractBillDefinitions } from './extractors/definitions.js';
|
|
|
7
7
|
export { extractActionDirectivesFromHtml, extractActionDirectiveAstsFromText, extractActionDirectivesFromText, resolveActionDirectivesFromHtml, resolveActionDirectivesFromText, type ActionCitation, type ActionDirective, type ActionOperation, type ActionReplacement, type ActionTableTarget, type ResolvedActionDirective, } from './extractors/action_directives.js';
|
|
8
8
|
export { extractTextLinks, iterReferenceLinks, type ArticleDefinition, type ArticleExternalLink, type ArticleInternalLink, type ArticleLink, type DefinitionOrLink, type DivisionExternalLink, type DivisionLink, type ExtractedLinkDb, type TextEuropeanLink, type TextExternalLink, type TextLink, type TextLinksParserState, } from './extractors/links.js';
|
|
9
9
|
export { extractCitationReferences, extractReferences, extractReferencesWithOriginalTransformations, getExtractedReferences, getExtractedReferencesWithOriginalTransformations, } from './extractors/references.js';
|
|
10
|
-
export { buildArticlePortionTreeFromHtml, extractPortionSelectors, isArticlePortionStructuralStart, parseArticleSubdivisionMarker, resolvePortionSelector, type ArticlePortionArticle, type ArticlePortionDivision, type ArticlePortionItem, type ArticlePortionAlinea, type ArticlePortionPhrase, type ArticlePortionMatch, type ArticlePortionNode, type ArticleSubdivisionMarker, type PortionSelector, type PortionSelectorStep, } from './extractors/article_portions.js';
|
|
10
|
+
export { buildArticlePortionTreeFromHtml, extractPortionSelectors, getTableUnitNoteRanges, isArticlePortionStructuralStart, parseArticleSubdivisionMarker, resolvePortionSelector, type ArticlePortionArticle, type ArticlePortionDivision, type ArticlePortionItem, type ArticlePortionAlinea, type ArticlePortionPhrase, type ArticlePortionMatch, type ArticlePortionNode, type ArticleSubdivisionMarker, type PortionSelector, type PortionSelectorStep, } from './extractors/article_portions.js';
|
|
11
11
|
export { addPositionsToTableOfContentsItems, getExtractedTableOfContentsFromTextBill, getTableOfContentsItems, walkTableOfContents, type TableOfContents, type TableOfContentsArticle, type TableOfContentsArticlePositioned, type TableOfContentsDivision, type TableOfContentsDivisionPositioned, type TableOfContentsItem, type TableOfContentsItemPositioned, type TableOfContentsPositioned, } from './extractors/table_of_contents.js';
|
|
12
12
|
export { jsonReplacer } from './json.js';
|
|
13
13
|
export { LegiResolver, type LegiArticleInfo, type LegiSectionInfo, type PreloadActiveArticlesByTextIdsOptions, type PreloadTextTitlesInfosOptions, type PreloadTextTitlesInfosProgress, } from './legi/resolver.js';
|
|
@@ -7,4 +7,6 @@ export type TableRowTarget = {
|
|
|
7
7
|
rowEndIndex: number;
|
|
8
8
|
position: FragmentPosition;
|
|
9
9
|
};
|
|
10
|
+
export type TableRowRange = Pick<TableRowTarget, "rowIndex" | "rowEndIndex" | "position">;
|
|
11
|
+
export declare function extractTableRowRanges(text: string): TableRowRange[];
|
|
10
12
|
export declare function extractTableRowTargets(text: string): TableRowTarget[];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function isTableUnitNote(text: string): boolean;
|