@tricoteuses/tisseuse 0.21.2 → 0.22.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.
Files changed (308) hide show
  1. package/README.md +18 -0
  2. package/dist/{html-DWNF_0Ek.js → html-BTaoaqX5.js} +6688 -5737
  3. package/dist/index.js +72 -72
  4. package/dist/{src/lib → lib}/extractors/article_portions.d.ts +14 -0
  5. package/dist/{src/lib → lib}/extractors/links.d.ts +117 -3
  6. package/dist/{src/lib → lib}/f_legi/resolver.d.ts +23 -4
  7. package/dist/lib/legi/article_abrogation.d.ts +25 -0
  8. package/dist/lib/legi/article_history.d.ts +11 -0
  9. package/dist/lib/legi/article_structure.d.ts +9 -0
  10. package/dist/{src/lib → lib}/legi/canutes_resolver.d.ts +17 -16
  11. package/dist/lib/legi/law_article.d.ts +13 -0
  12. package/dist/lib/legi/named_text_article.d.ts +22 -0
  13. package/dist/lib/legi/publication_components.d.ts +22 -0
  14. package/dist/lib/legi/publication_components.fixture.d.ts +3 -0
  15. package/dist/{src/lib → lib}/legi/resolver.d.ts +40 -0
  16. package/dist/lib/linkers/enumeration_scope.fixture.d.ts +19 -0
  17. package/dist/{src/lib → lib}/linkers/html.d.ts +16 -3
  18. package/dist/lib/linkers/html_decision_capture.d.ts +18 -0
  19. package/dist/lib/linkers/link_decision_html.d.ts +4 -0
  20. package/dist/lib/linkers/link_decision_metadata.d.ts +15 -0
  21. package/dist/{src/lib → lib}/linkers/markdown.d.ts +7 -1
  22. package/dist/lib/linkers/named_text_article.d.ts +1 -0
  23. package/dist/lib/linkers/quoted_section.fixture.d.ts +1 -0
  24. package/dist/lib/linkers/table_column_texts.d.ts +4 -0
  25. package/dist/{src/lib → lib}/server/parsed_bills.d.ts +19 -0
  26. package/dist/{src/lib → lib}/text_parsers/ast.d.ts +13 -3
  27. package/dist/lib/text_parsers/historical_versions.d.ts +18 -0
  28. package/dist/{src/lib → lib}/text_parsers/parsers.d.ts +2 -0
  29. package/dist/{src/lib → lib}/text_parsers/repeated_actions.d.ts +1 -0
  30. package/dist/{src/lib → lib}/text_parsers/texts.d.ts +12 -0
  31. package/dist/link-decision-metadata.js +32 -0
  32. package/dist/{resolver-BBrU9oGB.js → resolver-GT7457lQ.js} +316 -127
  33. package/dist/scripts/enrich_assemblee_documents.d.ts +1 -0
  34. package/dist/scripts/enrich_senat_documents.d.ts +1 -0
  35. package/dist/scripts/html_document_to_text.d.ts +1 -0
  36. package/dist/scripts/index_postgres_assemblee_amendments.d.ts +1 -0
  37. package/dist/scripts/index_postgres_assemblee_texts.d.ts +1 -0
  38. package/dist/scripts/index_postgres_judilibre.d.ts +1 -0
  39. package/dist/scripts/index_postgres_legifrance_articles.d.ts +1 -0
  40. package/dist/scripts/index_postgres_legifrance_jurisprudence.d.ts +1 -0
  41. package/dist/scripts/index_postgres_senat_amendments.d.ts +1 -0
  42. package/dist/scripts/index_postgres_senat_texts.d.ts +1 -0
  43. package/dist/scripts/parse_akoma_ntoso_bill_raw.d.ts +1 -0
  44. package/dist/scripts/parse_assemblee_bill_raw.d.ts +1 -0
  45. package/dist/scripts/profile_assemblee_document_parsing.d.ts +1 -0
  46. package/dist/scripts/profile_canutes_bill.d.ts +1 -0
  47. package/dist/scripts/replay_linker_scope.d.ts +1 -0
  48. package/dist/scripts/shared/assemblee_legislature.test.d.ts +1 -0
  49. package/dist/scripts/shared/checkpoint_cli_options.test.d.ts +1 -0
  50. package/dist/scripts/simplified_html_bill_to_table_of_contents.d.ts +1 -0
  51. package/dist/scripts/simplify_word_html.d.ts +1 -0
  52. package/dist/scripts/sync_postgres_assemblee_document_content.d.ts +1 -0
  53. package/dist/scripts/sync_postgres_senat_document_content.d.ts +1 -0
  54. package/dist/scripts/test_canutes_titles_cache.d.ts +1 -0
  55. package/dist/scripts/warm_canutes_text_titles_cache.d.ts +1 -0
  56. package/dist/server-f-legi.js +200 -94
  57. package/dist/server.js +1080 -959
  58. package/package.json +9 -4
  59. package/dist/{src/lib → lib}/alineas/alineas_numbers.d.ts +0 -0
  60. package/dist/{src/lib → lib}/article_temporal_status.test.d.ts +0 -0
  61. package/dist/{src/lib → lib}/articles.d.ts +0 -0
  62. package/dist/{src/lib → lib}/articles.test.d.ts +0 -0
  63. package/dist/{src/lib → lib}/assemblee_document_date.d.ts +0 -0
  64. package/dist/{src/lib → lib}/assemblee_document_date.test.d.ts +0 -0
  65. package/dist/{src/lib → lib}/asserts.d.ts +0 -0
  66. package/dist/{src/lib → lib}/cache.d.ts +0 -0
  67. package/dist/{src/lib → lib}/dates.d.ts +0 -0
  68. package/dist/{src/lib → lib}/extractors/action_directives.d.ts +0 -0
  69. package/dist/{src/lib → lib}/extractors/action_directives.test.d.ts +0 -0
  70. package/dist/{src/lib → lib}/extractors/action_directives_cpu.test.d.ts +0 -0
  71. package/dist/{src/lib → lib}/extractors/article_action_effects.d.ts +0 -0
  72. package/dist/{src/lib → lib}/extractors/article_action_effects.test.d.ts +0 -0
  73. package/dist/{src/lib → lib}/extractors/article_action_effects_long.test.d.ts +0 -0
  74. package/dist/{src/lib → lib}/extractors/article_action_targets.d.ts +0 -0
  75. package/dist/{src/lib → lib}/extractors/article_action_targets.test.d.ts +0 -0
  76. package/dist/{src/lib → lib}/extractors/article_portions.test.d.ts +0 -0
  77. package/dist/{src/lib → lib}/extractors/definitions.d.ts +0 -0
  78. package/dist/{src/lib/extractors/links.citation_scope.test.d.ts → lib/extractors/link_decisions.test.d.ts} +0 -0
  79. package/dist/{src/lib/extractors/links.code_titles.test.d.ts → lib/extractors/links.citation_scope.test.d.ts} +0 -0
  80. package/dist/{src/lib/extractors/links.doctrinal.test.d.ts → lib/extractors/links.code_titles.test.d.ts} +0 -0
  81. package/dist/{src/lib/extractors/links.european.test.d.ts → lib/extractors/links.doctrinal.test.d.ts} +0 -0
  82. package/dist/{src/lib/extractors/links.test.d.ts → lib/extractors/links.european.test.d.ts} +0 -0
  83. package/dist/{src/lib/extractors/portion_references.test.d.ts → lib/extractors/links.test.d.ts} +0 -0
  84. package/dist/{src/lib → lib}/extractors/portion_references.d.ts +0 -0
  85. package/dist/{src/lib/extractors/portion_references_cpu.test.d.ts → lib/extractors/portion_references.test.d.ts} +0 -0
  86. package/dist/{src/lib/extractors/qualified_versions.test.d.ts → lib/extractors/portion_references_cpu.test.d.ts} +0 -0
  87. package/dist/{src/lib → lib}/extractors/qualified_versions.d.ts +0 -0
  88. package/dist/{src/lib/extractors/references.test.d.ts → lib/extractors/qualified_versions.test.d.ts} +0 -0
  89. package/dist/{src/lib → lib}/extractors/quoted_text.d.ts +0 -0
  90. package/dist/{src/lib → lib}/extractors/references.d.ts +0 -0
  91. package/dist/{src/lib/text_parsers → lib/extractors}/references.test.d.ts +0 -0
  92. package/dist/{src/lib → lib}/extractors/table_of_contents.d.ts +0 -0
  93. package/dist/{src/lib → lib}/extractors/table_of_contents.test.d.ts +0 -0
  94. package/dist/{src/lib → lib}/f_legi/resolver.test.d.ts +0 -0
  95. package/dist/{src/lib → lib}/index.d.ts +0 -0
  96. package/dist/{src/lib → lib}/json.d.ts +0 -0
  97. package/dist/{src/lib/legi/canutes_article_preload.test.d.ts → lib/legi/article_abrogation.test.d.ts} +0 -0
  98. package/dist/{src/lib/legi/canutes_candidates.test.d.ts → lib/legi/article_history.test.d.ts} +0 -0
  99. package/dist/{src/lib/legi/canutes_resolver.test.d.ts → lib/legi/canutes_article_preload.test.d.ts} +0 -0
  100. package/dist/{src/lib/legi/canutes_resolver_cache.test.d.ts → lib/legi/canutes_candidates.test.d.ts} +0 -0
  101. package/dist/{src/lib/legi/canutes_resolver_europe.test.d.ts → lib/legi/canutes_resolver.test.d.ts} +0 -0
  102. package/dist/{src/lib/legi/canutes_root_cid_index.integration.test.d.ts → lib/legi/canutes_resolver_cache.test.d.ts} +0 -0
  103. package/dist/{src/lib/legi/canutes_section_roots.test.d.ts → lib/legi/canutes_resolver_europe.test.d.ts} +0 -0
  104. package/dist/{src/lib/legi/canutes_text_titles_cache.integration.test.d.ts → lib/legi/canutes_root_cid_index.integration.test.d.ts} +0 -0
  105. package/dist/{src/lib/legi/resolver.test.d.ts → lib/legi/canutes_section_roots.test.d.ts} +0 -0
  106. package/dist/{src/lib → lib}/legi/canutes_sql.d.ts +0 -0
  107. package/dist/{src/lib → lib}/legi/canutes_text_titles_cache.d.ts +0 -0
  108. package/dist/{src/lib/linkers/cited-article.test.d.ts → lib/legi/canutes_text_titles_cache.integration.test.d.ts} +0 -0
  109. package/dist/{src/lib → lib}/legi/canutes_titles_metrics.d.ts +0 -0
  110. package/dist/{src/lib/linkers/reference-mode.test.d.ts → lib/legi/modifying_act_article_real.test.d.ts} +0 -0
  111. package/dist/{src/lib/server/administrative_acts_autocompletion.test.d.ts → lib/legi/publication_components.test.d.ts} +0 -0
  112. package/dist/{src/lib/server/akn_rendering.test.d.ts → lib/legi/resolver.test.d.ts} +0 -0
  113. package/dist/{src/lib → lib}/legi/text_titles_infos.d.ts +0 -0
  114. package/dist/{src/lib/server/ameli_autocompletion.test.d.ts → lib/linkers/ambiguous_publication.test.d.ts} +0 -0
  115. package/dist/{src/lib/server/assemblee_amendment_search.test.d.ts → lib/linkers/cited-article.test.d.ts} +0 -0
  116. package/dist/{src/lib/server/assemblee_document_search.test.d.ts → lib/linkers/enumeration_scope.test.d.ts} +0 -0
  117. package/dist/{src/lib/server/atomic_files.test.d.ts → lib/linkers/html_decision_capture.test.d.ts} +0 -0
  118. package/dist/{src/lib/server/bill_action_resolver_invariance.test.d.ts → lib/linkers/html_named_text_article.test.d.ts} +0 -0
  119. package/dist/{src/lib/server/bill_citation_anaphora.test.d.ts → lib/linkers/html_publication_93_859_real.test.d.ts} +0 -0
  120. package/dist/{src/lib/server/bill_comparison.test.d.ts → lib/linkers/html_structure_real.test.d.ts} +0 -0
  121. package/dist/{src/lib/server/bill_target_scope.test.d.ts → lib/linkers/html_undecidable_real.test.d.ts} +0 -0
  122. package/dist/{src/lib/server/bofip_autocompletion.test.d.ts → lib/linkers/link_decision_html.test.d.ts} +0 -0
  123. package/dist/{src/lib/server/boss_autocompletion.test.d.ts → lib/linkers/named_text_article.test.d.ts} +0 -0
  124. package/dist/{src/lib/server/canutes_only_compatibility.test.d.ts → lib/linkers/quoted_section_scope.test.d.ts} +0 -0
  125. package/dist/{src/lib/server/document_git_checkpoint.test.d.ts → lib/linkers/reference-mode.test.d.ts} +0 -0
  126. package/dist/{src/lib → lib}/links.d.ts +6 -6
  127. /package/dist/{src/lib/server/enriched_document_checkpoint.test.d.ts → lib/links.test.d.ts} +0 -0
  128. /package/dist/{src/lib → lib}/loaders/assemblee.d.ts +0 -0
  129. /package/dist/{src/lib → lib}/loaders/legifrance.d.ts +0 -0
  130. /package/dist/{src/lib → lib}/markdown.d.ts +0 -0
  131. /package/dist/{src/lib → lib}/server/administrative_acts_autocompletion.d.ts +0 -0
  132. /package/dist/{src/lib/server/europe_autocompletion.test.d.ts → lib/server/administrative_acts_autocompletion.test.d.ts} +0 -0
  133. /package/dist/{src/lib/server/flegi_profiling.test.d.ts → lib/server/akn_rendering.test.d.ts} +0 -0
  134. /package/dist/{src/lib → lib}/server/alineas/alineas_images_utils.d.ts +0 -0
  135. /package/dist/{src/lib → lib}/server/ameli_autocompletion.d.ts +0 -0
  136. /package/dist/{src/lib/server/html_simplifier.test.d.ts → lib/server/ameli_autocompletion.test.d.ts} +0 -0
  137. /package/dist/{src/lib → lib}/server/assemblee_amendment_search.d.ts +0 -0
  138. /package/dist/{src/lib/server/international_treaties_autocompletion.test.d.ts → lib/server/assemblee_amendment_search.test.d.ts} +0 -0
  139. /package/dist/{src/lib → lib}/server/assemblee_document_search.d.ts +0 -0
  140. /package/dist/{src/lib/server/judilibre_search.test.d.ts → lib/server/assemblee_document_search.test.d.ts} +0 -0
  141. /package/dist/{src/lib → lib}/server/atomic_files.d.ts +0 -0
  142. /package/dist/{src/lib/server/jurisprudence_citations.test.d.ts → lib/server/atomic_files.test.d.ts} +0 -0
  143. /package/dist/{src/lib → lib}/server/auditors/config.d.ts +0 -0
  144. /package/dist/{src/lib/server/jurisprudence_jade.test.d.ts → lib/server/bill_action_resolver_invariance.test.d.ts} +0 -0
  145. /package/dist/{src/lib → lib}/server/bill_action_target_fixtures.d.ts +0 -0
  146. /package/dist/{src/lib/server/jurisprudence_store.integration.test.d.ts → lib/server/bill_citation_anaphora.test.d.ts} +0 -0
  147. /package/dist/{src/lib → lib}/server/bill_comparison.d.ts +0 -0
  148. /package/dist/{src/lib/server/jurisprudence_store_closed.test.d.ts → lib/server/bill_comparison.test.d.ts} +0 -0
  149. /package/dist/{src/lib/server/legifrance_article_search.test.d.ts → lib/server/bill_target_scope.test.d.ts} +0 -0
  150. /package/dist/{src/lib → lib}/server/bofip_autocompletion.d.ts +0 -0
  151. /package/dist/{src/lib/server/legifrance_jurisprudence_search.test.d.ts → lib/server/bofip_autocompletion.test.d.ts} +0 -0
  152. /package/dist/{src/lib → lib}/server/boss_autocompletion.d.ts +0 -0
  153. /package/dist/{src/lib/server/local_acts_autocompletion.test.d.ts → lib/server/boss_autocompletion.test.d.ts} +0 -0
  154. /package/dist/{src/lib → lib}/server/canutes_legacy_candidates.d.ts +0 -0
  155. /package/dist/{src/lib/server/masquage-typesense.test.d.ts → lib/server/canutes_only_compatibility.test.d.ts} +0 -0
  156. /package/dist/{src/lib → lib}/server/config.d.ts +0 -0
  157. /package/dist/{src/lib → lib}/server/databases/canutes_root_cid_index.d.ts +0 -0
  158. /package/dist/{src/lib → lib}/server/databases/canutes_text_titles_cache.d.ts +0 -0
  159. /package/dist/{src/lib → lib}/server/databases/index.d.ts +0 -0
  160. /package/dist/{src/lib → lib}/server/document_git_checkpoint.d.ts +0 -0
  161. /package/dist/{src/lib/server/parsed_amendments.test.d.ts → lib/server/document_git_checkpoint.test.d.ts} +0 -0
  162. /package/dist/{src/lib → lib}/server/enriched_document_checkpoint.d.ts +0 -0
  163. /package/dist/{src/lib/server/parsed_bills.test.d.ts → lib/server/enriched_document_checkpoint.test.d.ts} +0 -0
  164. /package/dist/{src/lib → lib}/server/europe_autocompletion.d.ts +0 -0
  165. /package/dist/{src/lib/server/raa_autocompletion.test.d.ts → lib/server/europe_autocompletion.test.d.ts} +0 -0
  166. /package/dist/{src/lib → lib}/server/f_legi/index.d.ts +0 -0
  167. /package/dist/{src/lib → lib}/server/flegi_profiling.d.ts +0 -0
  168. /package/dist/{src/lib/server/senat_amendment_search.test.d.ts → lib/server/flegi_profiling.test.d.ts} +0 -0
  169. /package/dist/{src/lib → lib}/server/html_simplifier.d.ts +0 -0
  170. /package/dist/{src/lib/server/senat_document_search.test.d.ts → lib/server/html_simplifier.test.d.ts} +0 -0
  171. /package/dist/{src/lib → lib}/server/index.d.ts +0 -0
  172. /package/dist/{src/lib → lib}/server/international_treaties_autocompletion.d.ts +0 -0
  173. /package/dist/{src/lib/server/shared_legal_text_sections.test.d.ts → lib/server/international_treaties_autocompletion.test.d.ts} +0 -0
  174. /package/dist/{src/lib → lib}/server/judilibre_search.d.ts +0 -0
  175. /package/dist/{src/lib/server/sql_profiling.test.d.ts → lib/server/judilibre_search.test.d.ts} +0 -0
  176. /package/dist/{src/lib → lib}/server/jurisprudence_citations.d.ts +0 -0
  177. /package/dist/{src/lib/server/sync_administrative_act_titles.test.d.ts → lib/server/jurisprudence_citations.test.d.ts} +0 -0
  178. /package/dist/{src/lib → lib}/server/jurisprudence_consultation.d.ts +0 -0
  179. /package/dist/{src/lib → lib}/server/jurisprudence_jade.d.ts +0 -0
  180. /package/dist/{src/lib/server/sync_assemblee_legal_texts.test.d.ts → lib/server/jurisprudence_jade.test.d.ts} +0 -0
  181. /package/dist/{src/lib → lib}/server/jurisprudence_store.d.ts +0 -0
  182. /package/dist/{src/lib/server/sync_local_act_titles.test.d.ts → lib/server/jurisprudence_store.integration.test.d.ts} +0 -0
  183. /package/dist/{src/lib/server/typesense_blue_green.test.d.ts → lib/server/jurisprudence_store_closed.test.d.ts} +0 -0
  184. /package/dist/{src/lib → lib}/server/legi/resolvers.d.ts +0 -0
  185. /package/dist/{src/lib → lib}/server/legifrance_article_search.d.ts +0 -0
  186. /package/dist/{src/lib/server/typesense_index_lock.test.d.ts → lib/server/legifrance_article_search.test.d.ts} +0 -0
  187. /package/dist/{src/lib → lib}/server/legifrance_jurisprudence_search.d.ts +0 -0
  188. /package/dist/{src/lib/text_parsers/action_citation_patterns.test.d.ts → lib/server/legifrance_jurisprudence_search.test.d.ts} +0 -0
  189. /package/dist/{src/lib → lib}/server/linkers/html.d.ts +0 -0
  190. /package/dist/{src/lib → lib}/server/local_acts_autocompletion.d.ts +0 -0
  191. /package/dist/{src/lib/text_parsers/action_directives.test.d.ts → lib/server/local_acts_autocompletion.test.d.ts} +0 -0
  192. /package/dist/{src/lib/text_parsers/action_occurrences.test.d.ts → lib/server/masquage-typesense.test.d.ts} +0 -0
  193. /package/dist/{src/lib → lib}/server/masquage_typesense.d.ts +0 -0
  194. /package/dist/{src/lib/text_parsers/action_position_cues.test.d.ts → lib/server/named_text_article_decisions.test.d.ts} +0 -0
  195. /package/dist/{src/lib → lib}/server/parsed_amendments.d.ts +0 -0
  196. /package/dist/{src/lib/text_parsers/action_words.test.d.ts → lib/server/parsed_amendments.test.d.ts} +0 -0
  197. /package/dist/{src/lib/text_parsers/actions.test.d.ts → lib/server/parsed_bill_abrogation.test.d.ts} +0 -0
  198. /package/dist/{src/lib/text_parsers/articles.test.d.ts → lib/server/parsed_bill_future_consultation.test.d.ts} +0 -0
  199. /package/dist/{src/lib/text_parsers/citations.test.d.ts → lib/server/parsed_bill_link_decisions.test.d.ts} +0 -0
  200. /package/dist/{src/lib/text_parsers/dates.test.d.ts → lib/server/parsed_bills.test.d.ts} +0 -0
  201. /package/dist/{src/lib → lib}/server/raa_autocompletion.d.ts +0 -0
  202. /package/dist/{src/lib/text_parsers/divisions.test.d.ts → lib/server/raa_autocompletion.test.d.ts} +0 -0
  203. /package/dist/{src/lib → lib}/server/senat_amendment_search.d.ts +0 -0
  204. /package/dist/{src/lib/text_parsers/doctrinal_references.test.d.ts → lib/server/senat_amendment_search.test.d.ts} +0 -0
  205. /package/dist/{src/lib → lib}/server/senat_document_search.d.ts +0 -0
  206. /package/dist/{src/lib/text_parsers/numbers.test.d.ts → lib/server/senat_document_search.test.d.ts} +0 -0
  207. /package/dist/{src/lib → lib}/server/senat_document_sources.d.ts +0 -0
  208. /package/dist/{src/lib → lib}/server/shared_legal_text_sections.d.ts +0 -0
  209. /package/dist/{src/lib/text_parsers/parsers.test.d.ts → lib/server/shared_legal_text_sections.test.d.ts} +0 -0
  210. /package/dist/{src/lib → lib}/server/sql_profiling.d.ts +0 -0
  211. /package/dist/{src/lib/text_parsers/portions.test.d.ts → lib/server/sql_profiling.test.d.ts} +0 -0
  212. /package/dist/{src/lib → lib}/server/sync_administrative_act_titles.d.ts +0 -0
  213. /package/dist/{src/lib/text_parsers/prepositions.test.d.ts → lib/server/sync_administrative_act_titles.test.d.ts} +0 -0
  214. /package/dist/{src/lib → lib}/server/sync_ameli_titles.d.ts +0 -0
  215. /package/dist/{src/lib → lib}/server/sync_assemblee_legal_texts.d.ts +0 -0
  216. /package/dist/{src/lib/text_parsers/relative_locations.test.d.ts → lib/server/sync_assemblee_legal_texts.test.d.ts} +0 -0
  217. /package/dist/{src/lib → lib}/server/sync_boss_titles.d.ts +0 -0
  218. /package/dist/{src/lib → lib}/server/sync_europe_titles.d.ts +0 -0
  219. /package/dist/{src/lib → lib}/server/sync_international_treaty_titles.d.ts +0 -0
  220. /package/dist/{src/lib → lib}/server/sync_local_act_titles.d.ts +0 -0
  221. /package/dist/{src/lib/text_parsers/repeated_actions.test.d.ts → lib/server/sync_local_act_titles.test.d.ts} +0 -0
  222. /package/dist/{src/lib → lib}/server/sync_raa_titles.d.ts +0 -0
  223. /package/dist/{src/lib → lib}/server/tables_of_contents.d.ts +0 -0
  224. /package/dist/{src/lib → lib}/server/text_parsers/transformers.d.ts +0 -0
  225. /package/dist/{src/lib → lib}/server/typesense_blue_green.d.ts +0 -0
  226. /package/dist/{src/lib/text_parsers/search_queries.test.d.ts → lib/server/typesense_blue_green.test.d.ts} +0 -0
  227. /package/dist/{src/lib → lib}/server/typesense_index_lock.d.ts +0 -0
  228. /package/dist/{src/lib/text_parsers/simplifiers.test.d.ts → lib/server/typesense_index_lock.test.d.ts} +0 -0
  229. /package/dist/{src/lib → lib}/test/text_titles_infos.d.ts +0 -0
  230. /package/dist/{src/lib → lib}/text_parsers/action_citation_patterns.d.ts +0 -0
  231. /package/dist/{src/lib/text_parsers/texts.test.d.ts → lib/text_parsers/action_citation_patterns.test.d.ts} +0 -0
  232. /package/dist/{src/lib → lib}/text_parsers/action_directives.d.ts +0 -0
  233. /package/dist/{src/lib/text_parsers/typography.test.d.ts → lib/text_parsers/action_directives.test.d.ts} +0 -0
  234. /package/dist/{src/lib → lib}/text_parsers/action_occurrences.d.ts +0 -0
  235. /package/dist/{src/scripts/add_links_to_assemblee_parsed_documents.d.ts → lib/text_parsers/action_occurrences.test.d.ts} +0 -0
  236. /package/dist/{src/lib → lib}/text_parsers/action_position_cues.d.ts +0 -0
  237. /package/dist/{src/scripts/add_links_to_html_document.d.ts → lib/text_parsers/action_position_cues.test.d.ts} +0 -0
  238. /package/dist/{src/lib → lib}/text_parsers/action_target_scopes.d.ts +0 -0
  239. /package/dist/{src/lib → lib}/text_parsers/action_words.d.ts +0 -0
  240. /package/dist/{src/scripts/add_links_to_legifrance.d.ts → lib/text_parsers/action_words.test.d.ts} +0 -0
  241. /package/dist/{src/lib → lib}/text_parsers/actions.d.ts +0 -0
  242. /package/dist/{src/scripts/add_links_to_senat_comptes_rendus.d.ts → lib/text_parsers/actions.test.d.ts} +0 -0
  243. /package/dist/{src/lib → lib}/text_parsers/amendment_action_directives.d.ts +0 -0
  244. /package/dist/{src/lib → lib}/text_parsers/articles.d.ts +0 -0
  245. /package/dist/{src/scripts/add_links_to_senat_parsed_documents.d.ts → lib/text_parsers/articles.test.d.ts} +0 -0
  246. /package/dist/{src/lib → lib}/text_parsers/citations.d.ts +0 -0
  247. /package/dist/{src/scripts/alimenter_jurisprudence_pilote.d.ts → lib/text_parsers/citations.test.d.ts} +0 -0
  248. /package/dist/{src/scripts/associate_jorf_textes_with_assemblee_commissions.d.ts → lib/text_parsers/code_annexes.test.d.ts} +0 -0
  249. /package/dist/{src/lib → lib}/text_parsers/dates.d.ts +0 -0
  250. /package/dist/{src/scripts/associate_jorf_textes_with_dossiers_legislatifs_assemblee.d.ts → lib/text_parsers/dates.test.d.ts} +0 -0
  251. /package/dist/{src/lib → lib}/text_parsers/divisions.d.ts +0 -0
  252. /package/dist/{src/scripts/compare_legi_bills.d.ts → lib/text_parsers/divisions.test.d.ts} +0 -0
  253. /package/dist/{src/lib → lib}/text_parsers/doctrinal_references.d.ts +0 -0
  254. /package/dist/{src/scripts/configure_postgres_assemblee_document_triggers.d.ts → lib/text_parsers/doctrinal_references.test.d.ts} +0 -0
  255. /package/dist/{src/lib → lib}/text_parsers/fragments.d.ts +0 -0
  256. /package/dist/{src/lib → lib}/text_parsers/helpers.d.ts +0 -0
  257. /package/dist/{src/scripts/configure_postgres_legi_resolver.d.ts → lib/text_parsers/historical_versions.test.d.ts} +0 -0
  258. /package/dist/{src/lib → lib}/text_parsers/legal_text_aliases.d.ts +0 -0
  259. /package/dist/{src/lib → lib}/text_parsers/numbers.d.ts +0 -0
  260. /package/dist/{src/scripts/configure_postgres_root_cid_index.d.ts → lib/text_parsers/numbers.test.d.ts} +0 -0
  261. /package/dist/{src/scripts/configure_postgres_senat_document_triggers.d.ts → lib/text_parsers/parsers.test.d.ts} +0 -0
  262. /package/dist/{src/lib → lib}/text_parsers/portions.d.ts +0 -0
  263. /package/dist/{src/scripts/enrich_assemblee_documents.d.ts → lib/text_parsers/portions.test.d.ts} +0 -0
  264. /package/dist/{src/lib → lib}/text_parsers/prepositions.d.ts +0 -0
  265. /package/dist/{src/scripts/enrich_senat_documents.d.ts → lib/text_parsers/prepositions.test.d.ts} +0 -0
  266. /package/dist/{src/lib → lib}/text_parsers/qualified_versions.d.ts +0 -0
  267. /package/dist/{src/lib → lib}/text_parsers/references.d.ts +0 -0
  268. /package/dist/{src/scripts/html_document_to_text.d.ts → lib/text_parsers/references.test.d.ts} +0 -0
  269. /package/dist/{src/lib → lib}/text_parsers/relative_locations.d.ts +0 -0
  270. /package/dist/{src/scripts/index_postgres_assemblee_amendments.d.ts → lib/text_parsers/relative_locations.test.d.ts} +0 -0
  271. /package/dist/{src/scripts/index_postgres_assemblee_texts.d.ts → lib/text_parsers/repeated_actions.test.d.ts} +0 -0
  272. /package/dist/{src/lib → lib}/text_parsers/search_queries.d.ts +0 -0
  273. /package/dist/{src/scripts/index_postgres_judilibre.d.ts → lib/text_parsers/search_queries.test.d.ts} +0 -0
  274. /package/dist/{src/lib → lib}/text_parsers/separators.d.ts +0 -0
  275. /package/dist/{src/lib → lib}/text_parsers/simplifiers.d.ts +0 -0
  276. /package/dist/{src/scripts/index_postgres_legifrance_articles.d.ts → lib/text_parsers/simplifiers.test.d.ts} +0 -0
  277. /package/dist/{src/lib → lib}/text_parsers/table_row_targets.d.ts +0 -0
  278. /package/dist/{src/lib → lib}/text_parsers/table_unit_notes.d.ts +0 -0
  279. /package/dist/{src/scripts/index_postgres_legifrance_jurisprudence.d.ts → lib/text_parsers/texts.test.d.ts} +0 -0
  280. /package/dist/{src/lib → lib}/text_parsers/transformers.d.ts +0 -0
  281. /package/dist/{src/lib → lib}/text_parsers/typography.d.ts +0 -0
  282. /package/dist/{src/scripts/index_postgres_senat_amendments.d.ts → lib/text_parsers/typography.test.d.ts} +0 -0
  283. /package/dist/{src/lib → lib}/textes.d.ts +0 -0
  284. /package/dist/{src/lib → lib}/timings.d.ts +0 -0
  285. /package/dist/{src/scripts/index_postgres_senat_texts.d.ts → scripts/add_links_to_assemblee_parsed_documents.d.ts} +0 -0
  286. /package/dist/{src/scripts/parse_akoma_ntoso_bill_raw.d.ts → scripts/add_links_to_html_document.d.ts} +0 -0
  287. /package/dist/{src/scripts/parse_assemblee_bill_raw.d.ts → scripts/add_links_to_legifrance.d.ts} +0 -0
  288. /package/dist/{src/scripts/profile_assemblee_document_parsing.d.ts → scripts/add_links_to_senat_comptes_rendus.d.ts} +0 -0
  289. /package/dist/{src/scripts/profile_canutes_bill.d.ts → scripts/add_links_to_senat_parsed_documents.d.ts} +0 -0
  290. /package/dist/{src/scripts → scripts}/add_positions_to_table_of_contents.d.ts +0 -0
  291. /package/dist/{src/scripts → scripts}/add_references_to_html_document.d.ts +0 -0
  292. /package/dist/{src/scripts/shared/assemblee_legislature.test.d.ts → scripts/alimenter_jurisprudence_pilote.d.ts} +0 -0
  293. /package/dist/{src/scripts/shared/checkpoint_cli_options.test.d.ts → scripts/associate_jorf_textes_with_assemblee_commissions.d.ts} +0 -0
  294. /package/dist/{src/scripts/simplified_html_bill_to_table_of_contents.d.ts → scripts/associate_jorf_textes_with_dossiers_legislatifs_assemblee.d.ts} +0 -0
  295. /package/dist/{src/scripts → scripts}/audit_doctrinal_references.d.ts +0 -0
  296. /package/dist/{src/scripts/simplify_word_html.d.ts → scripts/compare_legi_bills.d.ts} +0 -0
  297. /package/dist/{src/scripts → scripts}/configure.d.ts +0 -0
  298. /package/dist/{src/scripts/sync_postgres_assemblee_document_content.d.ts → scripts/configure_postgres_assemblee_document_triggers.d.ts} +0 -0
  299. /package/dist/{src/scripts/sync_postgres_senat_document_content.d.ts → scripts/configure_postgres_legi_resolver.d.ts} +0 -0
  300. /package/dist/{src/scripts/test_canutes_titles_cache.d.ts → scripts/configure_postgres_root_cid_index.d.ts} +0 -0
  301. /package/dist/{src/scripts/warm_canutes_text_titles_cache.d.ts → scripts/configure_postgres_senat_document_triggers.d.ts} +0 -0
  302. /package/dist/{src/scripts → scripts}/extract_alineas_images.d.ts +0 -0
  303. /package/dist/{src/scripts → scripts}/generate_alineas_numbers_review.d.ts +0 -0
  304. /package/dist/{src/scripts → scripts}/index_typesense.d.ts +0 -0
  305. /package/dist/{src/scripts → scripts}/merge_reviewed_alineas_numbers.d.ts +0 -0
  306. /package/dist/{src/scripts → scripts}/set_articles_missing_num.d.ts +0 -0
  307. /package/dist/{src/scripts → scripts}/shared/assemblee_legislature.d.ts +0 -0
  308. /package/dist/{src/scripts → scripts}/shared/checkpoint_cli_options.d.ts +0 -0
@@ -1,24 +1,10 @@
1
1
  import { CanutesSql } from './canutes_sql.js';
2
- import { LegiResolver, LegiArticleHistoryInfo, LegiArticleInfo, LegiSectionInfo, PreloadActiveArticlesByTextIdsOptions, PreloadTextTitlesInfosOptions } from './resolver.js';
2
+ import { LegiResolver, LegiArticleAbrogationProof, LegiArticleHistoryInfo, LegiArticleInfo, LegiArticleStructureProof, LegiSectionInfo, PreloadActiveArticlesByTextIdsOptions, PreloadTextTitlesInfosOptions } from './resolver.js';
3
3
  /**
4
4
  * Minimal structural view of a Légifrance article row needed to compute an
5
5
  * article history entry point; shared with the audit preload.
6
6
  */
7
- export interface ArticleHistorySourceRow {
8
- dateDebut: string | null;
9
- id: string;
10
- versions: {
11
- VERSION?: unknown;
12
- } | null;
13
- }
14
- /**
15
- * Group article rows by version chain (the set of ids listed in their
16
- * VERSIONS section, always including the row's own id) and return the latest
17
- * version of the chain, but only when exactly one chain exists for the
18
- * requested number. Several chains mean the number was reused by distinct
19
- * articles: the history would then be ambiguous.
20
- */
21
- export declare function articleHistoryInfoFromRows(rows: ArticleHistorySourceRow[]): LegiArticleHistoryInfo | undefined;
7
+ export { articleHistoryInfoFromRows, type ArticleHistorySourceRow, } from './article_history.js';
22
8
  export declare class CanutesResolver extends LegiResolver {
23
9
  private readonly canutesDb;
24
10
  private readonly articleHistoryInfoByTextAndNum;
@@ -34,6 +20,21 @@ export declare class CanutesResolver extends LegiResolver {
34
20
  num: string | undefined;
35
21
  textId: string;
36
22
  }): Promise<LegiArticleInfo[]>;
23
+ getLawArticleType({ articleId, textId, }: {
24
+ articleId: string;
25
+ textId: string;
26
+ }): Promise<"AUTONOME" | "ENTIEREMENT_MODIF" | "PARTIELLEMENT_MODIF" | undefined>;
27
+ getVerifiedPublicationComponents(candidateCids: string[]): Promise<import('./resolver.js').LegiPublicationComponentsProof | undefined>;
28
+ getVerifiedArticleAbrogation({ date, num, textId, }: {
29
+ date: string;
30
+ num: string;
31
+ textId: string;
32
+ }): Promise<LegiArticleAbrogationProof | undefined>;
33
+ getVerifiedArticleStructure({ date, num, textId, }: {
34
+ date: string;
35
+ num: string;
36
+ textId: string;
37
+ }): Promise<LegiArticleStructureProof | undefined>;
37
38
  preloadActiveArticlesByTextIds({ date, nums, textIds, }: PreloadActiveArticlesByTextIdsOptions): Promise<void>;
38
39
  getArticleHistoryInfo({ num, textId, }: {
39
40
  num: string | undefined;
@@ -0,0 +1,13 @@
1
+ import { LegiArticleInfo, LegiResolver } from './resolver.js';
2
+ export declare function supportsModifyingArticleRule(nature: string | undefined): boolean;
3
+ /** Select the consultation article of a law, ordinance or decree, never a code.
4
+ * Sentinel LEGI periods do not prove validity, but the version still counts
5
+ * when testing the unique modificative-version exception. Historical API
6
+ * names are retained for resolver compatibility.
7
+ */
8
+ export declare function selectLawArticle({ candidates, date, legiResolver, textId, }: {
9
+ candidates: LegiArticleInfo[];
10
+ date: string;
11
+ legiResolver: LegiResolver;
12
+ textId: string;
13
+ }): Promise<LegiArticleInfo | undefined>;
@@ -0,0 +1,22 @@
1
+ import { LegiArticleInfo, LegiResolver } from './resolver.js';
2
+ export interface NamedTextArticleTarget {
3
+ articleId?: string;
4
+ historyArticleId?: string;
5
+ }
6
+ /** Keep the resolver evidence with the rendering target so extraction and
7
+ * rendering cannot independently choose different versions of a citation.
8
+ */
9
+ export declare function resolveNamedTextArticle({ date, isLaw, legiResolver, num, textId, }: {
10
+ date: string;
11
+ /** Historical option name: includes ordinances and decrees. */
12
+ isLaw?: boolean;
13
+ legiResolver: LegiResolver;
14
+ num: string;
15
+ textId: string;
16
+ }): Promise<{
17
+ candidates: (LegiArticleInfo & {
18
+ textId: string;
19
+ })[];
20
+ target: NamedTextArticleTarget;
21
+ }>;
22
+ export declare function getNamedTextArticleTarget(options: Parameters<typeof resolveNamedTextArticle>[0]): Promise<NamedTextArticleTarget>;
@@ -0,0 +1,22 @@
1
+ import { LegiPublicationComponentsProof } from './resolver.js';
2
+ /** Published JORF components, NOT dated LEGI structure or article validity. */
3
+ export interface PublicationComponentRow {
4
+ cid: string;
5
+ nature: string | null;
6
+ num: string | null;
7
+ dateTexte: string | null;
8
+ datePubli: string | null;
9
+ nor: string | null;
10
+ hasVisas: boolean;
11
+ hasSignataires: boolean;
12
+ children: Array<{
13
+ id: string;
14
+ kind: string;
15
+ title: string | null;
16
+ }> | null;
17
+ }
18
+ /** Deliberately bounded domain: one signed body of direct articles and one
19
+ * separately published, unnumbered Annex root in the very same JORF issue.
20
+ * Neither the title, NOR, absent signatures nor sentinel dates alone is proof.
21
+ */
22
+ export declare function verifyPublicationComponents(candidateCids: string[], rows: PublicationComponentRow[]): LegiPublicationComponentsProof | undefined;
@@ -0,0 +1,3 @@
1
+ import { PublicationComponentRow } from './publication_components.js';
2
+ export declare const ordinanceComponentRows: PublicationComponentRow[];
3
+ export declare const ordinanceCorrectionRow: PublicationComponentRow;
@@ -1,3 +1,9 @@
1
+ import { PublicationComponentRow } from './publication_components.js';
2
+ export interface LegiPublicationComponentsProof {
3
+ candidates: PublicationComponentRow[];
4
+ bodyCid: string;
5
+ annexCid: string;
6
+ }
1
7
  export interface LegiArticleInfo {
2
8
  dateDebut: string;
3
9
  dateFin: string;
@@ -5,6 +11,20 @@ export interface LegiArticleInfo {
5
11
  num: string | null;
6
12
  textId: string | null;
7
13
  }
14
+ export type LawArticleType = "AUTONOME" | "ENTIEREMENT_MODIF" | "PARTIELLEMENT_MODIF";
15
+ /** An abrogation proof must travel with the exact version set read in its
16
+ * snapshot. Consumers must compare it with the candidates already resolved
17
+ * for the occurrence before using the terminal version for consultation.
18
+ */
19
+ export interface LegiArticleAbrogationProof {
20
+ candidates: LegiArticleInfo[];
21
+ terminalId: string;
22
+ }
23
+ /** Verified edges and candidates from one read-only snapshot, for a collision only. */
24
+ export interface LegiArticleStructureProof {
25
+ candidates: LegiArticleInfo[];
26
+ structures: Record<string, "valable" | "invalide">;
27
+ }
8
28
  /**
9
29
  * Entry point to the history of an article: the latest version of the unique
10
30
  * version chain known for a cited article number within a cited text.
@@ -34,11 +54,31 @@ export type PreloadActiveArticlesByTextIdsOptions = {
34
54
  textIds: Iterable<string | undefined>;
35
55
  };
36
56
  export declare abstract class LegiResolver {
57
+ /** Collision only; all metadata and root children read in one stable snapshot. */
58
+ getVerifiedPublicationComponents(candidateCids: string[]): Promise<LegiPublicationComponentsProof | undefined>;
37
59
  abstract getActiveArticlesByTextAndNum(options: {
38
60
  date: string;
39
61
  num: string | undefined;
40
62
  textId: string;
41
63
  }): Promise<LegiArticleInfo[]>;
64
+ /** Law, ordinance or decree TYPE; historical name retained for compatibility.
65
+ * Only consulted for a single LEGI version competing with its JORF original.
66
+ */
67
+ getLawArticleType(options: {
68
+ articleId: string;
69
+ textId: string;
70
+ }): Promise<LawArticleType | undefined>;
71
+ /** Optional, collision-only proof; no proof is safer than a stale one. */
72
+ getVerifiedArticleAbrogation(options: {
73
+ date: string;
74
+ num: string;
75
+ textId: string;
76
+ }): Promise<LegiArticleAbrogationProof | undefined>;
77
+ getVerifiedArticleStructure(options: {
78
+ date: string;
79
+ num: string;
80
+ textId: string;
81
+ }): Promise<LegiArticleStructureProof | undefined>;
42
82
  /**
43
83
  * Latest version of the unique version chain of an article number within a
44
84
  * text, or `undefined` when the number is unknown, ambiguous (several
@@ -0,0 +1,19 @@
1
+ export declare const enumerationParagraphs: {
2
+ cid: string;
3
+ title: string;
4
+ nums: string[];
5
+ html: string;
6
+ }[];
7
+ export declare const historicalEnumerationParagraph: {
8
+ html: string;
9
+ cid: string;
10
+ title: string;
11
+ nums: string[];
12
+ };
13
+ export declare const constructionEnumerationParagraph: {
14
+ cid: string;
15
+ title: string;
16
+ nums: string[];
17
+ html: string;
18
+ };
19
+ export declare const quotedAmendmentWithPastilles: string;
@@ -1,19 +1,23 @@
1
1
  import { CanutesSql } from '../legi/canutes_sql.js';
2
- import { DefinitionOrLink, TextLinksParserState } from '../extractors/links.js';
2
+ import { DefinitionOrLink, LinkDecision, LinkDecisionObserver, TextLinksParserState } from '../extractors/links.js';
3
3
  import { ReferenceParsingMode } from '../extractors/references.js';
4
4
  import { LegiResolver } from '../legi/resolver.js';
5
5
  import { LinkType } from '../links.js';
6
6
  import { FragmentPosition } from '../text_parsers/fragments.js';
7
7
  import { TextParserContext } from '../text_parsers/parsers.js';
8
8
  import { Transformation } from '../text_parsers/transformers.js';
9
- export declare function addLinksToHtml({ canutesDb, excludedHtmlRanges, includeInternalArticleLinks, legiResolver: providedLegiResolver, date, html, linkBaseUrl, linkType, logIgnoredReferencesTypes, logPartialReferences, logReferences, onLink, parsingMode, previousContext, state, }: {
9
+ export declare function addLinksToHtml({ canutesDb, callerDate, excludedHtmlRanges, includeInternalArticleLinks, legiResolver: providedLegiResolver, date, decisionObserver, html, linkBaseUrl, linkDecisionDocumentId, linkType, logIgnoredReferencesTypes, logPartialReferences, logReferences, onLink, parsingMode, previousContext, renderLinkDecisions, state, }: {
10
10
  canutesDb?: CanutesSql;
11
+ /** Explicit resolution date, distinct from the document date. */
12
+ callerDate?: string;
11
13
  excludedHtmlRanges?: FragmentPosition[];
12
14
  includeInternalArticleLinks?: boolean;
13
15
  legiResolver?: LegiResolver;
14
16
  date: string;
17
+ decisionObserver?: LinkDecisionObserver;
15
18
  html: string;
16
19
  linkBaseUrl: string;
20
+ linkDecisionDocumentId?: string;
17
21
  linkType: LinkType;
18
22
  logIgnoredReferencesTypes?: boolean;
19
23
  logPartialReferences?: boolean;
@@ -21,10 +25,13 @@ export declare function addLinksToHtml({ canutesDb, excludedHtmlRanges, includeI
21
25
  onLink?: (link: DefinitionOrLink, index: number) => Promise<boolean | void>;
22
26
  parsingMode?: ReferenceParsingMode;
23
27
  previousContext?: TextParserContext;
28
+ /** Render captured decisions; requires linkDecisionDocumentId. */
29
+ renderLinkDecisions?: boolean;
24
30
  state?: TextLinksParserState;
25
31
  }): Promise<{
26
32
  context: TextParserContext;
27
33
  output: string | null;
34
+ linkDecisions?: LinkDecision[];
28
35
  }>;
29
36
  export type OutputByType = Partial<Record<OutputType, {
30
37
  html: string;
@@ -38,22 +45,28 @@ interface HtmlReplacement {
38
45
  start: number;
39
46
  stop: number;
40
47
  }
41
- export declare function addLinksOrReferencesToHtmlPage({ canutesDb, legiResolver: providedLegiResolver, date, defaultTextId, htmlTransformation, inputHtml, linkBaseUrl, linkType, logIgnoredReferencesTypes, logPartialReferences, logReferences, outputTypes: requestedOutputTypes, referredLegifranceTextsInfos, }: {
48
+ export declare function addLinksOrReferencesToHtmlPage({ canutesDb, callerDate, legiResolver: providedLegiResolver, date, defaultTextId, htmlTransformation, inputHtml, linkBaseUrl, linkDecisionDocumentId, linkType, logIgnoredReferencesTypes, logPartialReferences, logReferences, outputTypes: requestedOutputTypes, referredLegifranceTextsInfos, renderLinkDecisions, }: {
42
49
  canutesDb?: CanutesSql;
50
+ /** Explicit resolution date, distinct from the document date. */
51
+ callerDate?: string;
43
52
  legiResolver?: LegiResolver;
44
53
  date: string;
45
54
  defaultTextId?: string;
46
55
  htmlTransformation: Transformation;
47
56
  inputHtml: string;
48
57
  linkBaseUrl: string;
58
+ linkDecisionDocumentId?: string;
49
59
  linkType: LinkType;
50
60
  logIgnoredReferencesTypes?: boolean;
51
61
  logPartialReferences?: boolean;
52
62
  logReferences?: boolean;
53
63
  outputTypes: OutputType[];
54
64
  referredLegifranceTextsInfos?: boolean;
65
+ /** Render captured decisions in link outputs; requires linkDecisionDocumentId. */
66
+ renderLinkDecisions?: boolean;
55
67
  }): Promise<{
56
68
  outputByType: OutputByType;
57
69
  referredLegifranceTextCountByCid: Record<string, number>;
70
+ linkDecisions?: LinkDecision[];
58
71
  }>;
59
72
  export {};
@@ -0,0 +1,18 @@
1
+ import { LinkDecision, LinkDecisionObserver } from '../extractors/links.js';
2
+ import { FragmentReverseTransformation } from '../text_parsers/fragments.js';
3
+ /** Keep capture and source-span matching identical in both HTML renderers. */
4
+ export declare function createHtmlDecisionCapture({ captureAbrogation, captureAmbiguity, captureStructure, documentId, render, observer, }: {
5
+ captureAbrogation?: boolean;
6
+ captureAmbiguity?: boolean;
7
+ captureStructure?: boolean;
8
+ documentId?: string;
9
+ render: boolean;
10
+ observer?: LinkDecisionObserver;
11
+ }): {
12
+ decisions: LinkDecision[] | undefined;
13
+ observer: LinkDecisionObserver | undefined;
14
+ findDecision: (original: FragmentReverseTransformation | undefined) => LinkDecision | undefined;
15
+ findAbrogationDecision: (original: FragmentReverseTransformation | undefined) => LinkDecision | undefined;
16
+ findAmbiguityDecision: (original: FragmentReverseTransformation | undefined) => LinkDecision | undefined;
17
+ findStructureDecision: (original: FragmentReverseTransformation | undefined) => LinkDecision | undefined;
18
+ };
@@ -0,0 +1,4 @@
1
+ import { LinkDecision } from '../extractors/links.js';
2
+ import { LinkType } from '../links.js';
3
+ /** Serialize only consultation and uncertainty; projection rights stay structured. */
4
+ export declare function linkDecisionHtmlAttributes(decision: LinkDecision, linkType: LinkType, linkBaseUrl: string): string | undefined;
@@ -0,0 +1,15 @@
1
+ /** Public HTML consultation metadata; projection rights are never serialized here. */
2
+ export declare const linkDecisionMetadataAttributes: readonly ["data-tisseuse-warning", "data-tisseuse-candidates"];
3
+ export declare const linkDecisionReferenceClasses: {
4
+ readonly article: {
5
+ readonly linked: "lien_article_externe";
6
+ readonly undecidable: "reference_article_indecidable";
7
+ };
8
+ readonly text: {
9
+ readonly linked: "lien_texte_externe";
10
+ readonly undecidable: "reference_texte_indecidable";
11
+ };
12
+ };
13
+ export type LinkDecisionReferenceKind = keyof typeof linkDecisionReferenceClasses;
14
+ export declare function isLinkDecisionWarning(code: string): boolean;
15
+ export declare function isLinkDecisionCandidateId(kind: LinkDecisionReferenceKind, id: string): boolean;
@@ -1,13 +1,18 @@
1
1
  import { CanutesSql } from '../legi/canutes_sql.js';
2
+ import { LinkDecision } from '../extractors/links.js';
2
3
  import { ReferenceParsingMode } from '../extractors/references.js';
3
4
  import { LegiResolver } from '../legi/resolver.js';
4
5
  import { LinkType } from '../links.js';
5
6
  import { TextParserContext } from '../text_parsers/parsers.js';
6
- export declare function addLinksToMarkdown({ canutesDb, legiResolver: providedLegiResolver, date, linkBaseUrl, linkType, parsingMode, previousContext, text, }: {
7
+ export declare function addLinksToMarkdown({ canutesDb, callerDate, legiResolver: providedLegiResolver, date, linkBaseUrl, linkDecisionDocumentId, linkType, parsingMode, previousContext, text, }: {
7
8
  canutesDb?: CanutesSql;
9
+ /** Explicit resolution date, distinct from the document date. */
10
+ callerDate?: string;
8
11
  legiResolver?: LegiResolver;
9
12
  date: string;
10
13
  linkBaseUrl: string;
14
+ /** Capture decisions at original source offsets, independently of Markdown links. */
15
+ linkDecisionDocumentId?: string;
11
16
  linkType: LinkType;
12
17
  parsingMode?: ReferenceParsingMode;
13
18
  previousContext?: TextParserContext;
@@ -15,4 +20,5 @@ export declare function addLinksToMarkdown({ canutesDb, legiResolver: providedLe
15
20
  }): Promise<{
16
21
  context: TextParserContext;
17
22
  output: string | null;
23
+ linkDecisions?: LinkDecision[];
18
24
  }>;
@@ -0,0 +1 @@
1
+ export { getNamedTextArticleTarget } from '../legi/named_text_article.js';
@@ -0,0 +1 @@
1
+ export declare const quotedSectionWithVersionProvenance = "<h6>Article 11</h6>\n<p>I. \u2013 Le chapitre V du titre Ier du livre Ier de la premi\u00E8re partie du code des transports, tel qu\u2019il r\u00E9sulte du I de l\u2019article 9 de la pr\u00E9sente loi, est compl\u00E9t\u00E9 par une section 3 ainsi r\u00E9dig\u00E9e :</p>\n<p>\u00AB Section 3</p>\n<p>\u00AB Services d\u2019information et de billettique multimodales</p>\n<p>\u00AB <i>Art. L. 1115\u20117</i>. \u2013 Les autorit\u00E9s organisatrices d\u00E9sign\u00E9es aux articles L. 1231\u20113 et L. 1241\u20111 veillent \u00E0 l\u2019existence de services d\u2019information, \u00E0 l\u2019intention des usagers, sur l\u2019ensemble des modes de d\u00E9placements dans leur ressort de comp\u00E9tence.</p>\n<p>\u00AB Un num\u00E9ro unique d\u2019appel national est cr\u00E9\u00E9 pour la r\u00E9servation et l\u2019accompagnement des personnes \u00E0 besoins sp\u00E9cifiques dans le transport ferroviaire.</p>\n<p>\u00AB <i>Art. L. 1115\u20118</i>. \u2013 Lorsqu\u2019un service num\u00E9rique multimodal proposant la vente ou la r\u00E9servation de services de transport ou de stationnement pr\u00E9sente une ou plusieurs solutions de d\u00E9placement en r\u00E9ponse \u00E0 la requ\u00EAte de l\u2019usager, celles\u2011ci sont pr\u00E9sent\u00E9es de mani\u00E8re claire et insusceptible d\u2019induire l\u2019usager en erreur. Les crit\u00E8res utilis\u00E9s pour leur s\u00E9lection et leur classement sont explicites. Ils sont appliqu\u00E9s sans discrimination \u00E0 tous les services de transport ou de stationnement int\u00E9gr\u00E9s au service num\u00E9rique multimodal et ne se fondent sur aucun \u00E9l\u00E9ment directement ou indirectement li\u00E9 \u00E0 l\u2019identit\u00E9 de l\u2019usager ou \u00E0 une consid\u00E9ration commerciale.</p>\n<p>\u00AB Lorsque les autorit\u00E9s organisatrices de la mobilit\u00E9 fournissent un service num\u00E9rique multimodal proposant la vente ou la r\u00E9servation de plusieurs services de transport ou de stationnement, les fournisseurs de services de transport et de stationnement op\u00E9rant sur leur territoire leur octroient, sur demande, un acc\u00E8s \u00E0 leurs services num\u00E9riques de vente ou de r\u00E9servation. Les conditions techniques et financi\u00E8res de cet acc\u00E8s sont d\u00E9finies par contrat. Elles doivent \u00EAtre raisonnables, proportionn\u00E9es et non discriminatoires.</p>\n<p>\u00AB Un d\u00E9cret en Conseil d\u2019\u00C9tat pr\u00E9cise les conditions d\u2019application du pr\u00E9sent article. \u00BB</p>\n<p>II. \u2013 L\u2019article L. 1115\u20117 du code des transports dans sa r\u00E9daction r\u00E9sultant du I du pr\u00E9sent article entre en vigueur le 1er d\u00E9cembre 2021.</p>";
@@ -0,0 +1,4 @@
1
+ import { TextAstReference } from '../text_parsers/ast.js';
2
+ import { Transformation } from '../text_parsers/transformers.js';
3
+ /** Attach an unambiguous table-column heading to number-only cells. */
4
+ export declare function tableColumnTextReferences(transformation: Transformation): TextAstReference[];
@@ -1,6 +1,7 @@
1
1
  import { Sql } from 'postgres';
2
2
  import { ResolvedActionDirective } from '../extractors/action_directives.js';
3
3
  import { ArticleActionEffect, ArticleActionSourceAnnotation } from '../extractors/article_action_effects.js';
4
+ import { LinkDecision } from '../extractors/links.js';
4
5
  import { TableOfContents } from '../extractors/table_of_contents.js';
5
6
  import { LegiResolver } from '../legi/resolver.js';
6
7
  import { LinkType } from '../links.js';
@@ -34,6 +35,8 @@ export type ParsedBillBlock = {
34
35
  articleId: string;
35
36
  kind: ParsedBillBlockKind;
36
37
  links: ParsedBillLink[];
38
+ /** Decisions keyed by positions in the unlinked source, including citations without href. */
39
+ linkDecisions?: LinkDecision[];
37
40
  qualifiedVersion?: ParsedBillQualifiedVersion;
38
41
  text: string;
39
42
  html: string;
@@ -46,6 +49,8 @@ export type ParsedBillQualifiedVersion = {
46
49
  };
47
50
  export type ParsedBillLink = {
48
51
  id: string;
52
+ /** A warned consultation URL cannot become an affirmative directive target. */
53
+ consultationOnly?: boolean;
49
54
  insideFrenchQuotes?: boolean;
50
55
  text?: string;
51
56
  type: "article" | "division" | "text";
@@ -89,6 +94,10 @@ export type ParsedBillDirective = {
89
94
  /** Explicitly cited article numbers defined in this bill; external projection is unavailable. */
90
95
  internallyCreatedTargetNums?: string[];
91
96
  targetIds?: string[];
97
+ /** Possible projection targets, never affirmative targetIds. */
98
+ indicativeTargetIds?: string[];
99
+ /** Occurrences in this directive's own source blocks, not inherited context. */
100
+ linkDecisions?: LinkDecision[];
92
101
  qualifiedVersion?: ParsedBillQualifiedVersion;
93
102
  };
94
103
  export type ParsedBillInternalArticleTarget = {
@@ -106,6 +115,8 @@ export type ParsedBillInternalArticleDefinition = ParsedBillInternalArticleTarge
106
115
  };
107
116
  export type ParseBillRawOptions = {
108
117
  canutesDb?: Sql;
118
+ /** Explicit resolution date; `date` remains the source document date. */
119
+ callerDate?: string;
109
120
  date?: string;
110
121
  includeInternalArticleLinks?: boolean;
111
122
  includeDirectiveAnalysis?: boolean;
@@ -113,6 +124,12 @@ export type ParseBillRawOptions = {
113
124
  linkBaseUrl: string;
114
125
  linkType: LinkType;
115
126
  linkedHtml?: string;
127
+ /** Enable structured decisions when linking, using this stable source document ID. */
128
+ linkDecisionDocumentId?: string;
129
+ /** Supply decisions when linkedHtml was produced in an earlier step. */
130
+ linkDecisions?: LinkDecision[];
131
+ /** Opt in to rendering consultation decisions in newly linked HTML. */
132
+ renderLinkDecisions?: boolean;
116
133
  logIgnoredReferencesTypes?: boolean;
117
134
  logPartialReferences?: boolean;
118
135
  logReferences?: boolean;
@@ -122,6 +139,7 @@ export type LinkedBillDocument = {
122
139
  documentDate?: string;
123
140
  html: string;
124
141
  linkedHtml: string;
142
+ linkDecisions?: LinkDecision[];
125
143
  };
126
144
  export type ParsedBillDocument = {
127
145
  sourceFormat: ParsedBillSourceFormat;
@@ -133,6 +151,7 @@ export type ParsedBillDocument = {
133
151
  globalApplicabilityDate?: string;
134
152
  internalArticleDefinitions?: ParsedBillInternalArticleDefinition[];
135
153
  directives: ParsedBillDirective[];
154
+ linkDecisions?: LinkDecision[];
136
155
  annotations?: ParsedBillAnnotation[];
137
156
  diagnostics?: ParsedBillDiagnostic[];
138
157
  };
@@ -78,6 +78,8 @@ export type TextAstArticle = {
78
78
  localizationAdverb?: LocalizationAdverb;
79
79
  newOrOld?: "new" | "old";
80
80
  ofTheSaid?: boolean;
81
+ /** Explicit article recall ("article 289 précité"), not a bare amended-text reference. */
82
+ previouslyCited?: boolean;
81
83
  type: "article";
82
84
  } & TextAstLocalization & TextAstPosition;
83
85
  export type TextAstAtomicReference = TextAstArticle | TextAstDivision | TextAstIncompleteHeader | TextAstPortion | (TextAstText & TextAstPosition);
@@ -167,8 +169,16 @@ export type TextAstText = {
167
169
  * Légifrance CID of the text.
168
170
  */
169
171
  cid?: string;
170
- /** Candidate code CIDs for a title shared by historical code editions. */
172
+ /** Competing publications or code-title CIDs, including excluded alternatives. */
171
173
  candidateCids?: string[];
174
+ /** Publications whose otherwise identical title says "(rectificatif)". */
175
+ rectificatifCids?: string[];
176
+ /** Annex qualifier applied to this code, not to the preceding article group. */
177
+ annex?: string;
178
+ /** Annex explicitly qualifying a named non-code text; not proof of a separate CID. */
179
+ publicationAnnex?: string;
180
+ /** Anaphoric annex ("même annexe"), distinct from "même code". */
181
+ sameAnnex?: boolean;
172
182
  nature: LawNature;
173
183
  legislation?: "international" | "UE";
174
184
  ofTheSaid?: boolean;
@@ -191,11 +201,11 @@ export type TextInfosByWordsTreeNode = {
191
201
  [word: string]: TextInfosByWordsTree;
192
202
  };
193
203
  export declare const compoundReferencesSeparators: readonly [",", "à", "et", "ou", "sauf"];
194
- export declare const europeanLawNatures: readonly ["ARRETEEURO", "ARRETEURO", "AVISEURO", "DECISION_EURO", "DECLARATIONEURO", "DELIBERATIONEURO", "DIRECTIVE_EURO", "INFORMATIONEURO", "INSTRUCTIONEURO", "LETTREEURO", "REGLEMENTEUROPEEN"];
204
+ export declare const europeanLawNatures: readonly ["ARRETEEURO", "ARRETEURO", "AVISEURO", "DECISION_EURO", "DECLARATIONEURO", "DELIBERATIONEURO", "DIRECTIVE_EURO", "INFORMATIONEURO", "INSTRUCTIONEURO", "LETTREEURO", "RECOMMANDATIONEURO", "REGLEMENTEUROPEEN"];
195
205
  export declare const frenchLawNatures: readonly ["ARRETE", "CIRCULAIRE", "CODE", "CONSTITUTION", "DECRET", "DECRET_LOI", "LOI", "LOI_CONSTIT", "LOI_ORGANIQUE", "ORDONNANCE"];
196
206
  export declare const internationalLawNatures: readonly ["CONVENTION"];
197
207
  export declare const divisionTypes: readonly ["partie", "livre", "titre", "sous-titre", "chapitre", "section", "sous-section", "paragraphe", "sous-paragraphe", "sous-sous-paragraphe"];
198
- export declare const lawNatures: readonly ["ARRETEEURO", "ARRETEURO", "AVISEURO", "DECISION_EURO", "DECLARATIONEURO", "DELIBERATIONEURO", "DIRECTIVE_EURO", "INFORMATIONEURO", "INSTRUCTIONEURO", "LETTREEURO", "REGLEMENTEUROPEEN", "ARRETE", "CIRCULAIRE", "CODE", "CONSTITUTION", "DECRET", "DECRET_LOI", "LOI", "LOI_CONSTIT", "LOI_ORGANIQUE", "ORDONNANCE", "CONVENTION"];
208
+ export declare const lawNatures: readonly ["ARRETEEURO", "ARRETEURO", "AVISEURO", "DECISION_EURO", "DECLARATIONEURO", "DELIBERATIONEURO", "DIRECTIVE_EURO", "INFORMATIONEURO", "INSTRUCTIONEURO", "LETTREEURO", "RECOMMANDATIONEURO", "REGLEMENTEUROPEEN", "ARRETE", "CIRCULAIRE", "CODE", "CONSTITUTION", "DECRET", "DECRET_LOI", "LOI", "LOI_CONSTIT", "LOI_ORGANIQUE", "ORDONNANCE", "CONVENTION"];
199
209
  /**
200
210
  * Portions are elements of an article.
201
211
  * "items" is a generic term for lines preceded with a number.
@@ -0,0 +1,18 @@
1
+ import { TextAstReference } from './ast.js';
2
+ export interface HistoricalVersionQualifier {
3
+ date: string;
4
+ range: {
5
+ start: number;
6
+ stop: number;
7
+ };
8
+ scope: {
9
+ start: number;
10
+ stop: number;
11
+ };
12
+ /** Preserved when the public scope is mapped back to the source HTML. */
13
+ transformedScope?: {
14
+ start: number;
15
+ stop: number;
16
+ };
17
+ }
18
+ export declare function historicalVersionQualifiers(input: string, references: TextAstReference[]): Map<TextAstReference, HistoricalVersionQualifier>;
@@ -35,6 +35,8 @@ export type FastPathExtractCandidate = {
35
35
  export declare class TextParserContext {
36
36
  input: string;
37
37
  offset: number;
38
+ /** Only reference/link search may skip parenthesized repetition qualifiers. */
39
+ ignoreReferenceRepetitionQualifiers: boolean;
38
40
  currentArticle: TextAstArticle | undefined;
39
41
  currentText: TextAstText | undefined;
40
42
  length: number;
@@ -1,4 +1,5 @@
1
1
  import { TextParser } from './parsers.js';
2
+ export declare const referenceRepetitionQualifier: TextParser;
2
3
  export declare const repeatedActionQualifier: TextParser<number>;
3
4
  export declare function findRepeatedActionCount(text: string): number | null;
4
5
  export declare function findRepeatedTargetOccurrenceCount(text: string, position: number): number | null;
@@ -1,5 +1,7 @@
1
1
  export declare function getTextTitlesInfosInstallationVersion(): number;
2
2
  export declare function setTextTitlesInfos(textTitlesInfos: unknown): void;
3
+ /** Code titles actually in force on the date of the citation. */
4
+ export declare function activeCodeTitleCids(cids: string[], date: string): string[];
3
5
  /** Keep the successive titles of one CID together when ranking code editions. */
4
6
  export declare function rankCodeTitleCids(cids: string[], date: string): string[];
5
7
  /**
@@ -53,3 +55,13 @@ export declare const natureTexteEuropeen: import('./parsers.js').TextParser<impo
53
55
  export declare const texteEuropeen: import('./parsers.js').TextParser<import('./ast.js').TextAst>;
54
56
  export declare const texteInternational: import('./parsers.js').TextParser<import('./ast.js').TextAst>;
55
57
  export declare const texte: import('./parsers.js').TextParser<import('./ast.js').TextAst>;
58
+ /** Annex labels share the existing number, typography and liaison grammars. */
59
+ export declare const designationAnnexe: import('./parsers.js').TextParser<import('./ast.js').TextAst>;
60
+ /** A postposed annex qualifier is a text parent, never an article of the code. */
61
+ export declare const annexeCode: import('./parsers.js').TextParser<import('./ast.js').TextAst>;
62
+ /** Preserve the named text's annex qualifier independently of its storage:
63
+ * it can be an article of the text or a separately published component. */
64
+ export declare const annexeTexte: import('./parsers.js').TextParser<import('./ast.js').TextAst>;
65
+ /** Only a complete catalogue title proves an autonomous annex CID. An annex
66
+ * stored inside its code must not silently become the principal code's CID. */
67
+ export declare function codeAnnexCids(codeCid: string | undefined, annex: string): string[];
@@ -0,0 +1,32 @@
1
+ //#region src/lib/linkers/link_decision_metadata.ts
2
+ var e = ["data-tisseuse-warning", "data-tisseuse-candidates"], t = {
3
+ article: {
4
+ linked: "lien_article_externe",
5
+ undecidable: "reference_article_indecidable"
6
+ },
7
+ text: {
8
+ linked: "lien_texte_externe",
9
+ undecidable: "reference_texte_indecidable"
10
+ }
11
+ }, n = new Set([
12
+ "article_futur_a_date_reference",
13
+ "article_abroge_avant_date_reference",
14
+ "indice_structurel",
15
+ "composant_publication",
16
+ "structure_absente",
17
+ "reference_historique_explicite",
18
+ "plusieurs_candidats_indepartageables",
19
+ "cid_non_etabli",
20
+ "donnees_insuffisantes"
21
+ ]), r = {
22
+ article: /^(?:LEGIARTI|JORFARTI)\d{12}$/,
23
+ text: /^(?:LEGITEXT|JORFTEXT)\d{12}$/
24
+ };
25
+ function i(e) {
26
+ return n.has(e);
27
+ }
28
+ function a(e, t) {
29
+ return r[e].test(t);
30
+ }
31
+ //#endregion
32
+ export { a as isLinkDecisionCandidateId, i as isLinkDecisionWarning, e as linkDecisionMetadataAttributes, t as linkDecisionReferenceClasses };