metanorma-document 0.2.9 → 0.2.12

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 (390) hide show
  1. checksums.yaml +4 -4
  2. data/.rubocop_todo.yml +164 -66
  3. data/CLAUDE.md +26 -0
  4. data/README.adoc +144 -0
  5. data/Rakefile +14 -2
  6. data/TODO.finalize/01-split-multi-class-files.md +8 -0
  7. data/TODO.finalize/02-remove-data-dist-iso-document-frontend.md +6 -0
  8. data/TODO.finalize/03-align-frontend-iife-and-gha-build.md +11 -0
  9. data/TODO.finalize/04-theme-per-flavor-config-driven.md +9 -0
  10. data/TODO.finalize/05-migrate-all-html-to-liquid.md +16 -0
  11. data/TODO.finalize/06-integrate-pubid-library.md +16 -0
  12. data/TODO.finalize/07-replace-relaton-models-with-relaton-bib.md +39 -0
  13. data/TODO.finalize/08-refactor-renderer-architecture.md +25 -0
  14. data/TODO.finalize/09-eliminate-code-smells.md +14 -0
  15. data/TODO.finalize/10-comprehensive-spec-coverage.md +24 -0
  16. data/TODO.finalize/11-config-driven-flavor-metadata.md +20 -0
  17. data/TODO.finalize/12-add-frozen-string-literal.md +6 -0
  18. data/TODO.finalize/13-extract-composition-from-god-class.md +96 -0
  19. data/TODO.finalize/14-config-driven-section-ordering.md +31 -0
  20. data/TODO.finalize/15-theme-directories-per-flavor.md +46 -0
  21. data/TODO.finalize/16-theme-lutaml-model-schema.md +44 -0
  22. data/data/javascripts/components/mn-footnotes.js +68 -0
  23. data/data/javascripts/components/mn-lightbox.js +18 -2
  24. data/data/javascripts/components/mn-shortcuts.js +2 -0
  25. data/data/javascripts/core/mn-navigation.js +8 -0
  26. data/data/javascripts/core/mn-theme.js +9 -9
  27. data/data/logos/oiml-logo-full-dark.svg +1 -0
  28. data/data/logos/oiml-logo-full-light.svg +1 -0
  29. data/data/logos/oiml-logo-icon-dark.svg +1 -0
  30. data/data/logos/oiml-logo-icon-light.svg +1 -0
  31. data/data/logos/oiml-logo.svg +1 -0
  32. data/data/logos/pdfa-logo.svg +31 -94
  33. data/data/stylesheets/base/_layout.css +3 -0
  34. data/data/stylesheets/base/_reset.css +3 -3
  35. data/data/stylesheets/base/_typography.css +0 -5
  36. data/data/stylesheets/components/bibliography.css +3 -3
  37. data/data/stylesheets/components/cover.css +3 -1
  38. data/data/stylesheets/components/figure.css +13 -1
  39. data/data/stylesheets/components/footnote.css +65 -5
  40. data/data/stylesheets/components/formula.css +44 -0
  41. data/data/stylesheets/components/header.css +17 -2
  42. data/data/stylesheets/components/inline.css +1 -1
  43. data/data/stylesheets/components/table.css +15 -2
  44. data/data/stylesheets/components/term.css +0 -1
  45. data/data/themes/bipm.yaml +60 -0
  46. data/data/themes/cc.yaml +43 -0
  47. data/data/themes/icc.yaml +39 -0
  48. data/data/themes/iec.yaml +44 -0
  49. data/data/themes/ieee.yaml +43 -0
  50. data/data/themes/ietf.yaml +45 -0
  51. data/data/themes/iho.yaml +46 -0
  52. data/data/themes/iso.yaml +40 -0
  53. data/data/themes/itu.yaml +45 -0
  54. data/data/themes/ogc.yaml +51 -0
  55. data/data/themes/oiml.yaml +56 -0
  56. data/data/themes/pdfa.yaml +44 -0
  57. data/data/themes/ribose.yaml +43 -0
  58. data/exe/metanorma-document +11 -0
  59. data/frontend/e2e/sample-html.test.ts +256 -0
  60. data/frontend/index.html +12 -0
  61. data/frontend/package-lock.json +4725 -0
  62. data/frontend/package.json +32 -0
  63. data/frontend/postcss.config.js +6 -0
  64. data/frontend/src/App.vue +79 -0
  65. data/frontend/src/app.ts +21 -0
  66. data/frontend/src/components/AppSidebar.vue +77 -0
  67. data/frontend/src/components/DocumentReader.vue +180 -0
  68. data/frontend/src/components/MirrorRenderer.vue +23 -0
  69. data/frontend/src/components/ReadingProgressBar.vue +29 -0
  70. data/frontend/src/components/TextRenderer.vue +131 -0
  71. data/frontend/src/components/TocItem.vue +57 -0
  72. data/frontend/src/components/TopBar.vue +49 -0
  73. data/frontend/src/components/__tests__/MirrorRenderer.test.ts +178 -0
  74. data/frontend/src/components/blocks/AdmonitionBlock.vue +74 -0
  75. data/frontend/src/components/blocks/ClauseBlock.vue +53 -0
  76. data/frontend/src/components/blocks/ExampleBlock.vue +21 -0
  77. data/frontend/src/components/blocks/FallbackBlock.vue +18 -0
  78. data/frontend/src/components/blocks/FigureBlock.vue +26 -0
  79. data/frontend/src/components/blocks/FootnotesBlock.vue +25 -0
  80. data/frontend/src/components/blocks/ListBlocks.vue +62 -0
  81. data/frontend/src/components/blocks/NoteBlock.vue +21 -0
  82. data/frontend/src/components/blocks/ParagraphBlock.vue +25 -0
  83. data/frontend/src/components/blocks/QuoteBlock.vue +25 -0
  84. data/frontend/src/components/blocks/ReviewBlock.vue +39 -0
  85. data/frontend/src/components/blocks/SourcecodeBlock.vue +52 -0
  86. data/frontend/src/components/blocks/TableBlock.vue +48 -0
  87. data/frontend/src/components/blocks/index.ts +36 -0
  88. data/frontend/src/stores/__tests__/documentStore.fixture.test.ts +272 -0
  89. data/frontend/src/stores/__tests__/documentStore.test.ts +143 -0
  90. data/frontend/src/stores/__tests__/ebookStore.test.ts +145 -0
  91. data/frontend/src/stores/__tests__/uiStore.test.ts +42 -0
  92. data/frontend/src/stores/documentStore.ts +153 -0
  93. data/frontend/src/stores/ebookStore.ts +179 -0
  94. data/frontend/src/stores/uiStore.ts +32 -0
  95. data/frontend/src/styles.css +156 -0
  96. data/frontend/src/types/__tests__/rendering-contract.test.ts +172 -0
  97. data/frontend/src/types/rendering-contract.ts +209 -0
  98. data/frontend/src/utils/__tests__/typeMetadata.test.ts +102 -0
  99. data/frontend/src/utils/typeMetadata.ts +121 -0
  100. data/frontend/tailwind.config.js +18 -0
  101. data/frontend/test/fixtures/iso-document.json +271 -0
  102. data/frontend/tmp/debug_e2e.cjs +46 -0
  103. data/frontend/tsconfig.json +25 -0
  104. data/frontend/tsconfig.node.json +11 -0
  105. data/frontend/vite.config.ts +37 -0
  106. data/frontend/vitest.e2e.config.ts +9 -0
  107. data/lib/metanorma/bipm_document/metadata/bipm_bibliographic_item.rb +0 -14
  108. data/lib/metanorma/bipm_document/metadata/depiction_element.rb +18 -0
  109. data/lib/metanorma/bipm_document/metadata.rb +1 -1
  110. data/lib/metanorma/document/cli.rb +116 -0
  111. data/lib/metanorma/document/components/ancillary_blocks/callout_annotation.rb +27 -0
  112. data/lib/metanorma/document/components/ancillary_blocks/sourcecode_block.rb +0 -65
  113. data/lib/metanorma/document/components/ancillary_blocks/sourcecode_body.rb +18 -0
  114. data/lib/metanorma/document/components/ancillary_blocks.rb +4 -0
  115. data/lib/metanorma/document/components/bib_data/bib_data.rb +7 -0
  116. data/lib/metanorma/document/components/blocks/classification_value.rb +21 -0
  117. data/lib/metanorma/document/components/blocks/permission_model.rb +28 -0
  118. data/lib/metanorma/document/components/blocks/recommendation_model.rb +28 -0
  119. data/lib/metanorma/document/components/blocks/requirement_base.rb +30 -0
  120. data/lib/metanorma/document/components/blocks/requirement_classification.rb +20 -0
  121. data/lib/metanorma/document/components/blocks/requirement_description.rb +43 -0
  122. data/lib/metanorma/document/components/blocks/requirement_inherit.rb +24 -0
  123. data/lib/metanorma/document/components/blocks/requirement_model.rb +0 -131
  124. data/lib/metanorma/document/components/blocks.rb +8 -7
  125. data/lib/metanorma/document/components/id_elements/image.rb +2 -0
  126. data/lib/metanorma/document/components/inline/asciimath_element.rb +2 -0
  127. data/lib/metanorma/document/components/inline/attribution_element.rb +2 -0
  128. data/lib/metanorma/document/components/inline/bcp14_element.rb +2 -0
  129. data/lib/metanorma/document/components/inline/biblio_tag_element.rb +2 -0
  130. data/lib/metanorma/document/components/inline/br_element.rb +2 -0
  131. data/lib/metanorma/document/components/inline/comma_element.rb +2 -0
  132. data/lib/metanorma/document/components/inline/concept_element.rb +2 -0
  133. data/lib/metanorma/document/components/inline/display_text_element.rb +2 -0
  134. data/lib/metanorma/document/components/inline/em_raw_element.rb +2 -0
  135. data/lib/metanorma/document/components/inline/enum_comma_element.rb +2 -0
  136. data/lib/metanorma/document/components/inline/eref_element.rb +2 -0
  137. data/lib/metanorma/document/components/inline/fmt_admitted_element.rb +4 -0
  138. data/lib/metanorma/document/components/inline/fmt_annotation_body_element.rb +4 -0
  139. data/lib/metanorma/document/components/inline/fmt_annotation_end_element.rb +4 -0
  140. data/lib/metanorma/document/components/inline/fmt_annotation_start_element.rb +4 -0
  141. data/lib/metanorma/document/components/inline/fmt_concept_element.rb +4 -0
  142. data/lib/metanorma/document/components/inline/fmt_definition_element.rb +4 -0
  143. data/lib/metanorma/document/components/inline/fmt_fn_body_element.rb +4 -0
  144. data/lib/metanorma/document/components/inline/fmt_fn_label_element.rb +4 -0
  145. data/lib/metanorma/document/components/inline/fmt_footnote_container_element.rb +4 -0
  146. data/lib/metanorma/document/components/inline/fmt_identifier_element.rb +4 -0
  147. data/lib/metanorma/document/components/inline/fmt_name_element.rb +4 -0
  148. data/lib/metanorma/document/components/inline/fmt_preferred_element.rb +4 -0
  149. data/lib/metanorma/document/components/inline/fmt_sourcecode_element.rb +4 -0
  150. data/lib/metanorma/document/components/inline/fmt_stem_element.rb +10 -0
  151. data/lib/metanorma/document/components/inline/fmt_termsource_element.rb +4 -0
  152. data/lib/metanorma/document/components/inline/fmt_title_element.rb +4 -0
  153. data/lib/metanorma/document/components/inline/fmt_xref_element.rb +4 -0
  154. data/lib/metanorma/document/components/inline/fmt_xref_label_element.rb +4 -0
  155. data/lib/metanorma/document/components/inline/fn_element.rb +2 -0
  156. data/lib/metanorma/document/components/inline/link_element.rb +2 -0
  157. data/lib/metanorma/document/components/inline/localized_string_element.rb +2 -0
  158. data/lib/metanorma/document/components/inline/localized_strings_element.rb +2 -0
  159. data/lib/metanorma/document/components/inline/location_element.rb +24 -0
  160. data/lib/metanorma/document/components/inline/math_element.rb +2 -0
  161. data/lib/metanorma/document/components/inline/name_with_id_element.rb +4 -0
  162. data/lib/metanorma/document/components/inline/rendered_display.rb +23 -0
  163. data/lib/metanorma/document/components/inline/rendered_math_element.rb +21 -0
  164. data/lib/metanorma/document/components/inline/semantic_content.rb +51 -0
  165. data/lib/metanorma/document/components/inline/semantic_math_element.rb +20 -0
  166. data/lib/metanorma/document/components/inline/semx_child_element.rb +2 -0
  167. data/lib/metanorma/document/components/inline/semx_element.rb +13 -1
  168. data/lib/metanorma/document/components/inline/small_cap_element.rb +2 -0
  169. data/lib/metanorma/document/components/inline/span_element.rb +10 -15
  170. data/lib/metanorma/document/components/inline/stem_inline_element.rb +7 -1
  171. data/lib/metanorma/document/components/inline/strong_raw_element.rb +2 -0
  172. data/lib/metanorma/document/components/inline/sub_element.rb +2 -0
  173. data/lib/metanorma/document/components/inline/sup_element.rb +2 -0
  174. data/lib/metanorma/document/components/inline/tab_element.rb +2 -0
  175. data/lib/metanorma/document/components/inline/title_with_annotation_element.rb +4 -0
  176. data/lib/metanorma/document/components/inline/tt_element.rb +2 -0
  177. data/lib/metanorma/document/components/inline/variant_title_element.rb +2 -0
  178. data/lib/metanorma/document/components/inline/vocabulary.rb +184 -0
  179. data/lib/metanorma/document/components/inline/xref_element.rb +10 -0
  180. data/lib/metanorma/document/components/inline.rb +12 -0
  181. data/lib/metanorma/document/components/multi_paragraph/quote_author_element.rb +20 -0
  182. data/lib/metanorma/document/components/multi_paragraph/quote_block.rb +0 -29
  183. data/lib/metanorma/document/components/multi_paragraph.rb +2 -0
  184. data/lib/metanorma/document/components/reference_elements/source_element.rb +0 -31
  185. data/lib/metanorma/document/components/reference_elements/source_modification.rb +21 -0
  186. data/lib/metanorma/document/components/reference_elements/source_origin.rb +28 -0
  187. data/lib/metanorma/document/components/reference_elements.rb +2 -2
  188. data/lib/metanorma/document/components/tables/col_element.rb +18 -0
  189. data/lib/metanorma/document/components/tables/col_group_element.rb +18 -0
  190. data/lib/metanorma/document/components/tables/table_block.rb +0 -22
  191. data/lib/metanorma/document/components/tables/table_body_section.rb +16 -0
  192. data/lib/metanorma/document/components/tables/table_foot_section.rb +16 -0
  193. data/lib/metanorma/document/components/tables/table_head_section.rb +16 -0
  194. data/lib/metanorma/document/components/tables/table_section.rb +0 -25
  195. data/lib/metanorma/document/components/tables.rb +5 -3
  196. data/lib/metanorma/document/relaton/address.rb +0 -27
  197. data/lib/metanorma/document/relaton/bib_item_locality.rb +3 -12
  198. data/lib/metanorma/document/relaton/copyright_association.rb +0 -10
  199. data/lib/metanorma/document/relaton/copyright_owner.rb +16 -0
  200. data/lib/metanorma/document/relaton/edition.rb +4 -7
  201. data/lib/metanorma/document/relaton/formatted_address.rb +29 -0
  202. data/lib/metanorma/document/relaton/logo_element.rb +18 -0
  203. data/lib/metanorma/document/relaton/organization.rb +0 -14
  204. data/lib/metanorma/document/relaton/phone.rb +3 -9
  205. data/lib/metanorma/document/relaton/place_type.rb +0 -13
  206. data/lib/metanorma/document/relaton/price_type.rb +3 -9
  207. data/lib/metanorma/document/relaton/region_element.rb +18 -0
  208. data/lib/metanorma/document/relaton.rb +6 -1
  209. data/lib/metanorma/document/version.rb +1 -1
  210. data/lib/metanorma/document.rb +2 -0
  211. data/lib/metanorma/html/asset_pipeline.rb +1 -0
  212. data/lib/metanorma/html/base_renderer.rb +261 -1008
  213. data/lib/metanorma/html/bipm_renderer.rb +15 -144
  214. data/lib/metanorma/html/cc_renderer.rb +1 -45
  215. data/lib/metanorma/html/component/base.rb +2 -7
  216. data/lib/metanorma/html/component/index_section.rb +41 -43
  217. data/lib/metanorma/html/drops/admonition_drop.rb +1 -4
  218. data/lib/metanorma/html/drops/biblio_entry_drop.rb +50 -0
  219. data/lib/metanorma/html/drops/block_element_drop.rb +7 -2
  220. data/lib/metanorma/html/drops/example_drop.rb +1 -4
  221. data/lib/metanorma/html/drops/figure_drop.rb +31 -22
  222. data/lib/metanorma/html/drops/footnote_drop.rb +1 -1
  223. data/lib/metanorma/html/drops/formula_drop.rb +45 -16
  224. data/lib/metanorma/html/drops/note_drop.rb +9 -7
  225. data/lib/metanorma/html/drops/sourcecode_drop.rb +12 -5
  226. data/lib/metanorma/html/drops.rb +2 -0
  227. data/lib/metanorma/html/generator.rb +2 -2
  228. data/lib/metanorma/html/icc_renderer.rb +0 -39
  229. data/lib/metanorma/html/iec_renderer.rb +1 -44
  230. data/lib/metanorma/html/ieee_renderer.rb +1 -45
  231. data/lib/metanorma/html/ietf_renderer.rb +1 -48
  232. data/lib/metanorma/html/iho_renderer.rb +1 -46
  233. data/lib/metanorma/html/iso_renderer.rb +290 -343
  234. data/lib/metanorma/html/itu_renderer.rb +1 -45
  235. data/lib/metanorma/html/ogc_renderer.rb +15 -76
  236. data/lib/metanorma/html/oiml_renderer.rb +18 -38
  237. data/lib/metanorma/html/pdfa_renderer.rb +0 -39
  238. data/lib/metanorma/html/renderers/block_renderer.rb +372 -0
  239. data/lib/metanorma/html/renderers/inline_renderer.rb +655 -0
  240. data/lib/metanorma/html/renderers/pubid_renderer.rb +69 -0
  241. data/lib/metanorma/html/renderers/section_renderer.rb +193 -0
  242. data/lib/metanorma/html/renderers.rb +8 -0
  243. data/lib/metanorma/html/ribose_renderer.rb +1 -45
  244. data/lib/metanorma/html/standard_renderer.rb +341 -229
  245. data/lib/metanorma/html/templates/_audio.html.liquid +1 -0
  246. data/lib/metanorma/html/templates/_biblio_entry.html.liquid +1 -0
  247. data/lib/metanorma/html/templates/_bipm_cover.html.liquid +27 -0
  248. data/lib/metanorma/html/templates/_boilerplate.html.liquid +1 -0
  249. data/lib/metanorma/html/templates/_bookmark.html.liquid +1 -0
  250. data/lib/metanorma/html/templates/_br.html.liquid +1 -0
  251. data/lib/metanorma/html/templates/_definition_list.html.liquid +6 -0
  252. data/lib/metanorma/html/templates/_element.html.liquid +1 -0
  253. data/lib/metanorma/html/templates/_fn_marker.html.liquid +1 -0
  254. data/lib/metanorma/html/templates/_footnotes.html.liquid +6 -6
  255. data/lib/metanorma/html/templates/_formula.html.liquid +1 -1
  256. data/lib/metanorma/html/templates/_header.html.liquid +1 -1
  257. data/lib/metanorma/html/templates/_heading.html.liquid +1 -0
  258. data/lib/metanorma/html/templates/_image.html.liquid +1 -0
  259. data/lib/metanorma/html/templates/_inline_span.html.liquid +1 -0
  260. data/lib/metanorma/html/templates/_iso_cover.html.liquid +1 -1
  261. data/lib/metanorma/html/templates/_link.html.liquid +1 -0
  262. data/lib/metanorma/html/templates/_list.html.liquid +3 -0
  263. data/lib/metanorma/html/templates/_list_item.html.liquid +1 -0
  264. data/lib/metanorma/html/templates/_main_content.html.liquid +1 -0
  265. data/lib/metanorma/html/templates/_math_container.html.liquid +1 -0
  266. data/lib/metanorma/html/templates/_paragraph.html.liquid +1 -0
  267. data/lib/metanorma/html/templates/_prefatory_section.html.liquid +1 -0
  268. data/lib/metanorma/html/templates/_pubid_identifier.html.liquid +1 -0
  269. data/lib/metanorma/html/templates/_quote.html.liquid +4 -0
  270. data/lib/metanorma/html/templates/_ref_date.html.liquid +1 -0
  271. data/lib/metanorma/html/templates/_ref_title.html.liquid +1 -0
  272. data/lib/metanorma/html/templates/_section.html.liquid +5 -0
  273. data/lib/metanorma/html/templates/_standard_cover.html.liquid +31 -0
  274. data/lib/metanorma/html/templates/_standard_doc_title.html.liquid +3 -0
  275. data/lib/metanorma/html/templates/_stem_span.html.liquid +1 -0
  276. data/lib/metanorma/html/templates/_table.html.liquid +9 -0
  277. data/lib/metanorma/html/templates/_term_domain.html.liquid +1 -0
  278. data/lib/metanorma/html/templates/_term_example.html.liquid +1 -0
  279. data/lib/metanorma/html/templates/_term_note.html.liquid +1 -0
  280. data/lib/metanorma/html/templates/_term_number.html.liquid +1 -0
  281. data/lib/metanorma/html/templates/_term_source.html.liquid +1 -0
  282. data/lib/metanorma/html/templates/_term_text_note.html.liquid +1 -0
  283. data/lib/metanorma/html/templates/_video.html.liquid +1 -0
  284. data/lib/metanorma/html/templates/_wrapped_preface.html.liquid +1 -0
  285. data/lib/metanorma/html/templates/document.html.liquid +4 -0
  286. data/lib/metanorma/html/theme.rb +180 -107
  287. data/lib/metanorma/html.rb +13 -0
  288. data/lib/metanorma/ietf_document/metadata/ietf_bib_data_extension_type.rb +0 -25
  289. data/lib/metanorma/ietf_document/metadata/pi_settings.rb +32 -0
  290. data/lib/metanorma/ietf_document/metadata.rb +2 -0
  291. data/lib/metanorma/iso_document/metadata/doctype_element.rb +20 -0
  292. data/lib/metanorma/iso_document/metadata/iso_bib_data_extension_type.rb +0 -48
  293. data/lib/metanorma/iso_document/metadata/iso_bibliographic_item.rb +0 -72
  294. data/lib/metanorma/iso_document/metadata/iso_document_status.rb +0 -30
  295. data/lib/metanorma/iso_document/metadata/iso_localized_title.rb +4 -1
  296. data/lib/metanorma/iso_document/metadata/language_element.rb +18 -0
  297. data/lib/metanorma/iso_document/metadata/project_number.rb +22 -0
  298. data/lib/metanorma/iso_document/metadata/script_element.rb +18 -0
  299. data/lib/metanorma/iso_document/metadata/stage_element.rb +26 -0
  300. data/lib/metanorma/iso_document/metadata/stagename_element.rb +18 -0
  301. data/lib/metanorma/iso_document/metadata/structured_identifier.rb +0 -17
  302. data/lib/metanorma/iso_document/metadata/title_collection.rb +1 -0
  303. data/lib/metanorma/iso_document/metadata.rb +9 -4
  304. data/lib/metanorma/iso_document/terms/iso_term.rb +0 -13
  305. data/lib/metanorma/iso_document/terms/term_domain_element.rb +18 -0
  306. data/lib/metanorma/iso_document/terms.rb +1 -0
  307. data/lib/metanorma/itu_document/metadata/itu_bib_data_extension_type.rb +0 -37
  308. data/lib/metanorma/itu_document/metadata/meeting_date.rb +18 -0
  309. data/lib/metanorma/itu_document/metadata/meeting_element.rb +18 -0
  310. data/lib/metanorma/itu_document/metadata/study_period.rb +18 -0
  311. data/lib/metanorma/itu_document/metadata.rb +3 -4
  312. data/lib/metanorma/mirror/default_registry.rb +170 -0
  313. data/lib/metanorma/mirror/handler_registry.rb +60 -0
  314. data/lib/metanorma/mirror/handler_result.rb +37 -0
  315. data/lib/metanorma/mirror/handlers/admonition.rb +18 -0
  316. data/lib/metanorma/mirror/handlers/example.rb +21 -0
  317. data/lib/metanorma/mirror/handlers/figure.rb +53 -0
  318. data/lib/metanorma/mirror/handlers/formula.rb +35 -0
  319. data/lib/metanorma/mirror/handlers/inline/rich_html_renderer.rb +159 -0
  320. data/lib/metanorma/mirror/handlers/inline/text_extractor.rb +116 -0
  321. data/lib/metanorma/mirror/handlers/inline.rb +225 -0
  322. data/lib/metanorma/mirror/handlers/list.rb +110 -0
  323. data/lib/metanorma/mirror/handlers/note.rb +26 -0
  324. data/lib/metanorma/mirror/handlers/paragraph.rb +19 -0
  325. data/lib/metanorma/mirror/handlers/quote.rb +16 -0
  326. data/lib/metanorma/mirror/handlers/review.rb +19 -0
  327. data/lib/metanorma/mirror/handlers/section.rb +149 -0
  328. data/lib/metanorma/mirror/handlers/sourcecode.rb +27 -0
  329. data/lib/metanorma/mirror/handlers/structural.rb +68 -0
  330. data/lib/metanorma/mirror/handlers/table.rb +81 -0
  331. data/lib/metanorma/mirror/handlers/term.rb +100 -0
  332. data/lib/metanorma/mirror/handlers.rb +60 -0
  333. data/lib/metanorma/mirror/id_strategy/positional.rb +166 -0
  334. data/lib/metanorma/mirror/id_strategy/preserve.rb +12 -0
  335. data/lib/metanorma/mirror/id_strategy.rb +34 -0
  336. data/lib/metanorma/mirror/math_util.rb +53 -0
  337. data/lib/metanorma/mirror/metadata.rb +37 -0
  338. data/lib/metanorma/mirror/metanorma_to_mirror.rb +101 -0
  339. data/lib/metanorma/mirror/model/container.rb +47 -0
  340. data/lib/metanorma/mirror/model/factory.rb +52 -0
  341. data/lib/metanorma/mirror/model/guide.rb +25 -0
  342. data/lib/metanorma/mirror/model/leaf.rb +17 -0
  343. data/lib/metanorma/mirror/model/mark.rb +53 -0
  344. data/lib/metanorma/mirror/model/node.rb +47 -0
  345. data/lib/metanorma/mirror/model/soft_break.rb +33 -0
  346. data/lib/metanorma/mirror/model/text.rb +34 -0
  347. data/lib/metanorma/mirror/model.rb +16 -0
  348. data/lib/metanorma/mirror/output/builder.rb +39 -0
  349. data/lib/metanorma/mirror/output/formats/base_format.rb +90 -0
  350. data/lib/metanorma/mirror/output/formats/inline_format.rb +81 -0
  351. data/lib/metanorma/mirror/output/formats.rb +53 -0
  352. data/lib/metanorma/mirror/output/html_renderer.rb +95 -0
  353. data/lib/metanorma/mirror/output/html_renderers/block_renderers.rb +178 -0
  354. data/lib/metanorma/mirror/output/html_renderers/inline_renderer.rb +61 -0
  355. data/lib/metanorma/mirror/output/html_renderers/list_renderers.rb +96 -0
  356. data/lib/metanorma/mirror/output/html_renderers/mark_renderers.rb +64 -0
  357. data/lib/metanorma/mirror/output/html_renderers/section_renderers.rb +129 -0
  358. data/lib/metanorma/mirror/output/html_renderers/structural_renderers.rb +80 -0
  359. data/lib/metanorma/mirror/output/html_renderers/table_renderers.rb +87 -0
  360. data/lib/metanorma/mirror/output/html_renderers.rb +76 -0
  361. data/lib/metanorma/mirror/output/pipeline.rb +92 -0
  362. data/lib/metanorma/mirror/output/pipeline_context.rb +22 -0
  363. data/lib/metanorma/mirror/output.rb +14 -0
  364. data/lib/metanorma/mirror/rewriter.rb +121 -0
  365. data/lib/metanorma/mirror/safe_attr.rb +16 -0
  366. data/lib/metanorma/mirror/serialization/json_serializer.rb +25 -0
  367. data/lib/metanorma/mirror/serialization/yaml_serializer.rb +20 -0
  368. data/lib/metanorma/mirror/serialization.rb +10 -0
  369. data/lib/metanorma/mirror/transformer.rb +22 -0
  370. data/lib/metanorma/mirror.rb +32 -0
  371. data/lib/metanorma/standard_document/annotation.rb +37 -0
  372. data/lib/metanorma/standard_document/block_attributes.rb +15 -2
  373. data/lib/metanorma/standard_document/blocks/block_source.rb +0 -23
  374. data/lib/metanorma/standard_document/blocks/source_origin_element.rb +23 -0
  375. data/lib/metanorma/standard_document/blocks.rb +1 -1
  376. data/lib/metanorma/standard_document/terms/term_expression.rb +0 -31
  377. data/lib/metanorma/standard_document/terms/term_name_element.rb +29 -0
  378. data/lib/metanorma/standard_document/terms.rb +1 -0
  379. data/script/render_both.rb +18 -0
  380. metadata +262 -13
  381. data/.github/workflows/rake.yml +0 -21
  382. data/.github/workflows/release.yml +0 -25
  383. data/.github/workflows/roundtrip-samples.yml +0 -132
  384. data/.gitignore +0 -19
  385. data/.rspec +0 -3
  386. data/.rubocop.yml +0 -22
  387. data/Gemfile +0 -28
  388. data/bin/console +0 -15
  389. data/bin/setup +0 -8
  390. data/metanorma-document.gemspec +0 -35
@@ -4,88 +4,23 @@ module Metanorma
4
4
  module Document
5
5
  module Components
6
6
  module AncillaryBlocks
7
- # Body of sourcecode block, containing code text with embedded callout elements.
8
- # Uses map_all_content to preserve mixed content.
9
- class SourcecodeBody < Lutaml::Model::Serializable
10
- attribute :content, :string
11
-
12
- xml do
13
- element "body"
14
- map_all_content to: :content
15
- end
16
- end
17
-
18
- # Callout annotation in sourcecode, containing id, anchor, and paragraphs.
19
- class CalloutAnnotation < Lutaml::Model::Serializable
20
- attribute :id, :string
21
- attribute :anchor, :string
22
- attribute :semx_id, :string
23
- attribute :original_id, :string
24
- attribute :p, Metanorma::Document::Components::Paragraphs::ParagraphBlock,
25
- collection: true
26
-
27
- xml do
28
- element "callout-annotation"
29
- map_attribute "id", to: :id
30
- map_attribute "anchor", to: :anchor
31
- map_attribute "semx-id", to: :semx_id
32
- map_attribute "original-id", to: :original_id
33
- map_element "p", to: :p
34
- end
35
- end
36
-
37
- # Block containing computer code or comparable text.
38
7
  class SourcecodeBlock < Metanorma::Document::Components::Blocks::BasicBlockNoNotes
39
- # The caption of the block.
40
8
  attribute :name, Metanorma::Document::Components::Inline::NameWithIdElement
41
-
42
- # The block should be excluded from any automatic numbering of blocks of this class in the document.
43
9
  attribute :unnumbered, :boolean
44
-
45
- # Anchor attribute for cross-references
46
10
  attribute :anchor, :string
47
-
48
- # Define a subsequence for numbering of this block; e.g. if this block would be numbered
49
- # as 7, but it has a subsequence value of XYZ, this block, and all consecutive blocks
50
- # of the same class and with the same subsequence value, will be numbered consecutively
51
- # with the same number and in a subsequence: 7a, 7b, 7c etc.
52
11
  attribute :subsequence, :string
53
-
54
- # A file name associated with the source code (and which could be used to extract the source code
55
- # fragment to from the document, or to populate the source code fragment with from the external file,
56
- # in automated processing of the document).
57
12
  attribute :filename, :string
58
-
59
- # The computer language or other notational convention that the source code is expressed in.
60
13
  attribute :lang, :string
61
-
62
- # Whether callout markers are displayed
63
14
  attribute :markers, :string
64
15
  attribute :alt, :string
65
-
66
- # The computer code or other such text presented in the block, as a single unformatted string. (The
67
- # string should be treated as pre-formatted text, with whitespace treated as significant.)
68
16
  attribute :content, :string
69
-
70
- # The source code body, containing code text with embedded callout references.
71
17
  attribute :body, SourcecodeBody
72
-
73
- # Zero or more cross-references; these are intended to be embedded within the `content` string, and
74
- # link to annotations.
75
18
  attribute :callouts,
76
19
  Metanorma::Document::Components::ReferenceElements::ReferenceToIdElement, collection: true
77
-
78
- # Annotations to the source code; each annotation consists of zero or more paragraphs, and is intended
79
- # to be referenced by a callout within the source code.
80
20
  attribute :callout_annotations,
81
21
  CalloutAnnotation, collection: true
82
-
83
- # Presentation-specific elements
84
22
  attribute :fmt_sourcecode, Metanorma::Document::Components::Inline::FmtSourcecodeElement
85
-
86
- # Presentation-specific: semx-id for round-trip fidelity
87
23
  attribute :semx_id, :string
88
-
89
24
  attribute :json_type, :string
90
25
 
91
26
  def json_type
@@ -0,0 +1,18 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Metanorma
4
+ module Document
5
+ module Components
6
+ module AncillaryBlocks
7
+ class SourcecodeBody < Lutaml::Model::Serializable
8
+ attribute :content, :string
9
+
10
+ xml do
11
+ element "body"
12
+ map_all_content to: :content
13
+ end
14
+ end
15
+ end
16
+ end
17
+ end
18
+ end
@@ -4,6 +4,8 @@ module Metanorma
4
4
  module Document
5
5
  module Components
6
6
  module AncillaryBlocks
7
+ autoload :CalloutAnnotation,
8
+ "#{__dir__}/ancillary_blocks/callout_annotation"
7
9
  autoload :ExampleBlock, "#{__dir__}/ancillary_blocks/example_block"
8
10
  autoload :FigureBlock, "#{__dir__}/ancillary_blocks/figure_block"
9
11
  autoload :FormulaBlock, "#{__dir__}/ancillary_blocks/formula_block"
@@ -11,6 +13,8 @@ module Metanorma
11
13
  autoload :LiteralBlock, "#{__dir__}/ancillary_blocks/literal_block"
12
14
  autoload :SourcecodeBlock,
13
15
  "#{__dir__}/ancillary_blocks/sourcecode_block"
16
+ autoload :SourcecodeBody,
17
+ "#{__dir__}/ancillary_blocks/sourcecode_body"
14
18
  autoload :Subfigure, "#{__dir__}/ancillary_blocks/subfigure"
15
19
  end
16
20
  end
@@ -60,6 +60,13 @@ module Metanorma
60
60
  map_element "keyword", to: :keyword
61
61
  map_element "classification", to: :classification
62
62
  end
63
+
64
+ def title_for(language = "en")
65
+ return nil unless title && !title.empty?
66
+
67
+ found = title.find { |t| t.language == language }
68
+ found || title.first
69
+ end
63
70
  end
64
71
  end
65
72
  end
@@ -0,0 +1,21 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Metanorma
4
+ module Document
5
+ module Components
6
+ module Blocks
7
+ class ClassificationValue < Lutaml::Model::Serializable
8
+ attribute :text, :string, collection: true
9
+ attribute :link, Metanorma::Document::Components::Inline::LinkElement,
10
+ collection: true
11
+
12
+ xml do
13
+ mixed_content
14
+ map_content to: :text
15
+ map_element "link", to: :link
16
+ end
17
+ end
18
+ end
19
+ end
20
+ end
21
+ end
@@ -0,0 +1,28 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Metanorma
4
+ module Document
5
+ module Components
6
+ module Blocks
7
+ class PermissionModel < RequirementBase
8
+ xml do
9
+ element "permission"
10
+ map_attribute "id", to: :id
11
+ map_attribute "model", to: :model
12
+ map_attribute "obligation", to: :obligation
13
+ map_attribute "type", to: :type
14
+ map_attribute "anchor", to: :anchor
15
+ map_element "subject", to: :subject
16
+ map_element "classification", to: :classification
17
+ map_element "description", to: :description
18
+ map_element "inherit", to: :inherit
19
+ map_element "requirement", to: :requirement
20
+ map_element "recommendation", to: :recommendation
21
+ map_element "permission", to: :permission
22
+ map_element "example", to: :example
23
+ end
24
+ end
25
+ end
26
+ end
27
+ end
28
+ end
@@ -0,0 +1,28 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Metanorma
4
+ module Document
5
+ module Components
6
+ module Blocks
7
+ class RecommendationModel < RequirementBase
8
+ xml do
9
+ element "recommendation"
10
+ map_attribute "id", to: :id
11
+ map_attribute "model", to: :model
12
+ map_attribute "obligation", to: :obligation
13
+ map_attribute "type", to: :type
14
+ map_attribute "anchor", to: :anchor
15
+ map_element "subject", to: :subject
16
+ map_element "classification", to: :classification
17
+ map_element "description", to: :description
18
+ map_element "inherit", to: :inherit
19
+ map_element "requirement", to: :requirement
20
+ map_element "recommendation", to: :recommendation
21
+ map_element "permission", to: :permission
22
+ map_element "example", to: :example
23
+ end
24
+ end
25
+ end
26
+ end
27
+ end
28
+ end
@@ -0,0 +1,30 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Metanorma
4
+ module Document
5
+ module Components
6
+ module Blocks
7
+ class RequirementBase < Lutaml::Model::Serializable
8
+ attribute :id, :string
9
+ attribute :model, :string
10
+ attribute :obligation, :string
11
+ attribute :type, :string
12
+ attribute :anchor, :string
13
+ attribute :subject, :string
14
+ attribute :classification, RequirementClassification, collection: true
15
+ attribute :description, RequirementDescription, collection: true
16
+ attribute :inherit, RequirementInherit, collection: true
17
+ attribute :requirement, "Metanorma::Document::Components::Blocks::RequirementModel",
18
+ collection: true
19
+ attribute :recommendation, "Metanorma::Document::Components::Blocks::RecommendationModel",
20
+ collection: true
21
+ attribute :permission, "Metanorma::Document::Components::Blocks::PermissionModel",
22
+ collection: true
23
+ attribute :example,
24
+ Metanorma::Document::Components::AncillaryBlocks::ExampleBlock,
25
+ collection: true
26
+ end
27
+ end
28
+ end
29
+ end
30
+ end
@@ -0,0 +1,20 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Metanorma
4
+ module Document
5
+ module Components
6
+ module Blocks
7
+ class RequirementClassification < Lutaml::Model::Serializable
8
+ attribute :tag, :string
9
+ attribute :value, ClassificationValue
10
+
11
+ xml do
12
+ element "classification"
13
+ map_element "tag", to: :tag
14
+ map_element "value", to: :value
15
+ end
16
+ end
17
+ end
18
+ end
19
+ end
20
+ end
@@ -0,0 +1,43 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Metanorma
4
+ module Document
5
+ module Components
6
+ module Blocks
7
+ class RequirementDescription < Lutaml::Model::Serializable
8
+ attribute :p, Metanorma::Document::Components::Paragraphs::ParagraphBlock,
9
+ collection: true
10
+ attribute :ul, Metanorma::Document::Components::Lists::UnorderedList,
11
+ collection: true
12
+ attribute :ol, Metanorma::Document::Components::Lists::OrderedList,
13
+ collection: true
14
+ attribute :sourcecode,
15
+ Metanorma::Document::Components::AncillaryBlocks::SourcecodeBlock,
16
+ collection: true
17
+ attribute :table, Metanorma::Document::Components::Tables::TableBlock,
18
+ collection: true
19
+ attribute :example,
20
+ Metanorma::Document::Components::AncillaryBlocks::ExampleBlock,
21
+ collection: true
22
+ attribute :note, Metanorma::Document::Components::Blocks::NoteBlock,
23
+ collection: true
24
+ attribute :figure,
25
+ Metanorma::Document::Components::AncillaryBlocks::FigureBlock,
26
+ collection: true
27
+
28
+ xml do
29
+ element "description"
30
+ map_element "p", to: :p
31
+ map_element "ul", to: :ul
32
+ map_element "ol", to: :ol
33
+ map_element "sourcecode", to: :sourcecode
34
+ map_element "table", to: :table
35
+ map_element "example", to: :example
36
+ map_element "note", to: :note
37
+ map_element "figure", to: :figure
38
+ end
39
+ end
40
+ end
41
+ end
42
+ end
43
+ end
@@ -0,0 +1,24 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Metanorma
4
+ module Document
5
+ module Components
6
+ module Blocks
7
+ class RequirementInherit < Lutaml::Model::Serializable
8
+ attribute :text, :string, collection: true
9
+ attribute :eref, Metanorma::Document::Components::Inline::ErefElement,
10
+ collection: true
11
+ attribute :xref, Metanorma::Document::Components::Inline::XrefElement,
12
+ collection: true
13
+
14
+ xml do
15
+ mixed_content
16
+ map_content to: :text
17
+ map_element "eref", to: :eref
18
+ map_element "xref", to: :xref
19
+ end
20
+ end
21
+ end
22
+ end
23
+ end
24
+ end
@@ -4,99 +4,6 @@ module Metanorma
4
4
  module Document
5
5
  module Components
6
6
  module Blocks
7
- class ClassificationValue < Lutaml::Model::Serializable
8
- attribute :text, :string, collection: true
9
- attribute :link, Metanorma::Document::Components::Inline::LinkElement,
10
- collection: true
11
-
12
- xml do
13
- mixed_content
14
- map_content to: :text
15
- map_element "link", to: :link
16
- end
17
- end
18
-
19
- class RequirementClassification < Lutaml::Model::Serializable
20
- attribute :tag, :string
21
- attribute :value, ClassificationValue
22
-
23
- xml do
24
- element "classification"
25
- map_element "tag", to: :tag
26
- map_element "value", to: :value
27
- end
28
- end
29
-
30
- class RequirementDescription < Lutaml::Model::Serializable
31
- attribute :p, Metanorma::Document::Components::Paragraphs::ParagraphBlock,
32
- collection: true
33
- attribute :ul, Metanorma::Document::Components::Lists::UnorderedList,
34
- collection: true
35
- attribute :ol, Metanorma::Document::Components::Lists::OrderedList,
36
- collection: true
37
- attribute :sourcecode,
38
- Metanorma::Document::Components::AncillaryBlocks::SourcecodeBlock,
39
- collection: true
40
- attribute :table, Metanorma::Document::Components::Tables::TableBlock,
41
- collection: true
42
- attribute :example,
43
- Metanorma::Document::Components::AncillaryBlocks::ExampleBlock,
44
- collection: true
45
- attribute :note, Metanorma::Document::Components::Blocks::NoteBlock,
46
- collection: true
47
- attribute :figure,
48
- Metanorma::Document::Components::AncillaryBlocks::FigureBlock,
49
- collection: true
50
-
51
- xml do
52
- element "description"
53
- map_element "p", to: :p
54
- map_element "ul", to: :ul
55
- map_element "ol", to: :ol
56
- map_element "sourcecode", to: :sourcecode
57
- map_element "table", to: :table
58
- map_element "example", to: :example
59
- map_element "note", to: :note
60
- map_element "figure", to: :figure
61
- end
62
- end
63
-
64
- class RequirementInherit < Lutaml::Model::Serializable
65
- attribute :text, :string, collection: true
66
- attribute :eref, Metanorma::Document::Components::Inline::ErefElement,
67
- collection: true
68
- attribute :xref, Metanorma::Document::Components::Inline::XrefElement,
69
- collection: true
70
-
71
- xml do
72
- mixed_content
73
- map_content to: :text
74
- map_element "eref", to: :eref
75
- map_element "xref", to: :xref
76
- end
77
- end
78
-
79
- class RequirementBase < Lutaml::Model::Serializable
80
- attribute :id, :string
81
- attribute :model, :string
82
- attribute :obligation, :string
83
- attribute :type, :string
84
- attribute :anchor, :string
85
- attribute :subject, :string
86
- attribute :classification, RequirementClassification, collection: true
87
- attribute :description, RequirementDescription, collection: true
88
- attribute :inherit, RequirementInherit, collection: true
89
- attribute :requirement, "Metanorma::Document::Components::Blocks::RequirementModel",
90
- collection: true
91
- attribute :recommendation, "Metanorma::Document::Components::Blocks::RecommendationModel",
92
- collection: true
93
- attribute :permission, "Metanorma::Document::Components::Blocks::PermissionModel",
94
- collection: true
95
- attribute :example,
96
- Metanorma::Document::Components::AncillaryBlocks::ExampleBlock,
97
- collection: true
98
- end
99
-
100
7
  class RequirementModel < RequirementBase
101
8
  xml do
102
9
  element "requirement"
@@ -115,44 +22,6 @@ module Metanorma
115
22
  map_element "example", to: :example
116
23
  end
117
24
  end
118
-
119
- class RecommendationModel < RequirementBase
120
- xml do
121
- element "recommendation"
122
- map_attribute "id", to: :id
123
- map_attribute "model", to: :model
124
- map_attribute "obligation", to: :obligation
125
- map_attribute "type", to: :type
126
- map_attribute "anchor", to: :anchor
127
- map_element "subject", to: :subject
128
- map_element "classification", to: :classification
129
- map_element "description", to: :description
130
- map_element "inherit", to: :inherit
131
- map_element "requirement", to: :requirement
132
- map_element "recommendation", to: :recommendation
133
- map_element "permission", to: :permission
134
- map_element "example", to: :example
135
- end
136
- end
137
-
138
- class PermissionModel < RequirementBase
139
- xml do
140
- element "permission"
141
- map_attribute "id", to: :id
142
- map_attribute "model", to: :model
143
- map_attribute "obligation", to: :obligation
144
- map_attribute "type", to: :type
145
- map_attribute "anchor", to: :anchor
146
- map_element "subject", to: :subject
147
- map_element "classification", to: :classification
148
- map_element "description", to: :description
149
- map_element "inherit", to: :inherit
150
- map_element "requirement", to: :requirement
151
- map_element "recommendation", to: :recommendation
152
- map_element "permission", to: :permission
153
- map_element "example", to: :example
154
- end
155
- end
156
25
  end
157
26
  end
158
27
  end
@@ -6,17 +6,18 @@ module Metanorma
6
6
  module Blocks
7
7
  autoload :BasicBlock, "#{__dir__}/blocks/basic_block"
8
8
  autoload :BasicBlockNoNotes, "#{__dir__}/blocks/basic_block_no_notes"
9
+ autoload :ClassificationValue, "#{__dir__}/blocks/classification_value"
9
10
  autoload :NoteBlock, "#{__dir__}/blocks/note_block"
10
11
  autoload :Passthrough, "#{__dir__}/blocks/passthrough"
11
- autoload :ClassificationValue, "#{__dir__}/blocks/requirement_model"
12
+ autoload :PermissionModel, "#{__dir__}/blocks/permission_model"
13
+ autoload :RecommendationModel, "#{__dir__}/blocks/recommendation_model"
14
+ autoload :RequirementBase, "#{__dir__}/blocks/requirement_base"
12
15
  autoload :RequirementClassification,
13
- "#{__dir__}/blocks/requirement_model"
14
- autoload :RequirementDescription, "#{__dir__}/blocks/requirement_model"
15
- autoload :RequirementInherit, "#{__dir__}/blocks/requirement_model"
16
- autoload :RequirementBase, "#{__dir__}/blocks/requirement_model"
16
+ "#{__dir__}/blocks/requirement_classification"
17
+ autoload :RequirementDescription,
18
+ "#{__dir__}/blocks/requirement_description"
19
+ autoload :RequirementInherit, "#{__dir__}/blocks/requirement_inherit"
17
20
  autoload :RequirementModel, "#{__dir__}/blocks/requirement_model"
18
- autoload :RecommendationModel, "#{__dir__}/blocks/requirement_model"
19
- autoload :PermissionModel, "#{__dir__}/blocks/requirement_model"
20
21
  end
21
22
  end
22
23
  end
@@ -10,6 +10,7 @@ module Metanorma
10
10
  attribute :width, :string
11
11
  attribute :align, :string
12
12
  attribute :semx_id, :string
13
+ attribute :inline_svg, :string
13
14
 
14
15
  xml do
15
16
  element "image"
@@ -17,6 +18,7 @@ module Metanorma
17
18
  map_attribute "width", to: :width, render_empty: true
18
19
  map_attribute "align", to: :align
19
20
  map_attribute "semx-id", to: :semx_id
21
+ map_element "svg", to: :inline_svg, raw: :element
20
22
  end
21
23
  end
22
24
  end
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Metanorma
2
4
  module Document
3
5
  module Components
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Metanorma
2
4
  module Document
3
5
  module Components
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Metanorma
2
4
  module Document
3
5
  module Components
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Metanorma
2
4
  module Document
3
5
  module Components
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Metanorma
2
4
  module Document
3
5
  module Components
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Metanorma
2
4
  module Document
3
5
  module Components
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Metanorma
2
4
  module Document
3
5
  module Components
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Metanorma
2
4
  module Document
3
5
  module Components
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Metanorma
2
4
  module Document
3
5
  module Components
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Metanorma
2
4
  module Document
3
5
  module Components
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Metanorma
2
4
  module Document
3
5
  module Components
@@ -1,8 +1,12 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Metanorma
2
4
  module Document
3
5
  module Components
4
6
  module Inline
5
7
  class FmtAdmittedElement < Lutaml::Model::Serializable
8
+ include RenderedDisplay
9
+
6
10
  attribute :p, "Metanorma::Document::Components::Paragraphs::ParagraphBlock",
7
11
  collection: true
8
12
 
@@ -1,8 +1,12 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Metanorma
2
4
  module Document
3
5
  module Components
4
6
  module Inline
5
7
  class FmtAnnotationBodyElement < Lutaml::Model::Serializable
8
+ include RenderedDisplay
9
+
6
10
  attribute :id, :string
7
11
  attribute :date, :string
8
12
  attribute :from, :string
@@ -1,8 +1,12 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Metanorma
2
4
  module Document
3
5
  module Components
4
6
  module Inline
5
7
  class FmtAnnotationEndElement < Lutaml::Model::Serializable
8
+ include RenderedDisplay
9
+
6
10
  attribute :id, :string
7
11
  attribute :date, :string
8
12
  attribute :source, :string
@@ -1,8 +1,12 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Metanorma
2
4
  module Document
3
5
  module Components
4
6
  module Inline
5
7
  class FmtAnnotationStartElement < Lutaml::Model::Serializable
8
+ include RenderedDisplay
9
+
6
10
  attribute :id, :string
7
11
  attribute :date, :string
8
12
  attribute :source, :string