metanorma-document 0.2.12 → 0.2.13
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.
- checksums.yaml +4 -4
- data/.github/workflows/rake.yml +21 -0
- data/.github/workflows/release.yml +25 -0
- data/.github/workflows/roundtrip-samples.yml +132 -0
- data/.gitignore +19 -0
- data/.rspec +3 -0
- data/.rubocop.yml +22 -0
- data/.rubocop_todo.yml +66 -164
- data/CHANGELOG.md +1 -0
- data/Gemfile +32 -0
- data/README.adoc +0 -144
- data/Rakefile +2 -14
- data/bin/console +15 -0
- data/bin/setup +8 -0
- data/data/javascripts/components/mn-lightbox.js +2 -18
- data/data/javascripts/components/mn-shortcuts.js +0 -2
- data/data/javascripts/core/mn-navigation.js +0 -8
- data/data/javascripts/core/mn-theme.js +9 -9
- data/data/logos/pdfa-logo.svg +94 -31
- data/data/stylesheets/base/_layout.css +0 -3
- data/data/stylesheets/base/_reset.css +3 -3
- data/data/stylesheets/base/_typography.css +5 -0
- data/data/stylesheets/components/bibliography.css +3 -3
- data/data/stylesheets/components/cover.css +1 -3
- data/data/stylesheets/components/figure.css +1 -13
- data/data/stylesheets/components/footnote.css +5 -65
- data/data/stylesheets/components/formula.css +0 -44
- data/data/stylesheets/components/header.css +2 -17
- data/data/stylesheets/components/inline.css +1 -1
- data/data/stylesheets/components/table.css +2 -15
- data/data/stylesheets/components/term.css +1 -0
- data/lib/metanorma/bipm_document/metadata/bipm_bibliographic_item.rb +14 -0
- data/lib/metanorma/bipm_document/metadata.rb +1 -1
- data/lib/metanorma/document/components/ancillary_blocks/sourcecode_block.rb +65 -0
- data/lib/metanorma/document/components/ancillary_blocks.rb +0 -4
- data/lib/metanorma/document/components/bib_data/bib_data.rb +0 -7
- data/lib/metanorma/document/components/blocks/requirement_model.rb +131 -0
- data/lib/metanorma/document/components/blocks.rb +7 -8
- data/lib/metanorma/document/components/id_elements/image.rb +0 -2
- data/lib/metanorma/document/components/inline/asciimath_element.rb +0 -2
- data/lib/metanorma/document/components/inline/attribution_element.rb +0 -2
- data/lib/metanorma/document/components/inline/bcp14_element.rb +0 -2
- data/lib/metanorma/document/components/inline/biblio_tag_element.rb +0 -2
- data/lib/metanorma/document/components/inline/br_element.rb +0 -2
- data/lib/metanorma/document/components/inline/comma_element.rb +0 -2
- data/lib/metanorma/document/components/inline/concept_element.rb +0 -2
- data/lib/metanorma/document/components/inline/display_text_element.rb +0 -2
- data/lib/metanorma/document/components/inline/em_raw_element.rb +0 -2
- data/lib/metanorma/document/components/inline/enum_comma_element.rb +0 -2
- data/lib/metanorma/document/components/inline/eref_element.rb +0 -2
- data/lib/metanorma/document/components/inline/fmt_admitted_element.rb +0 -4
- data/lib/metanorma/document/components/inline/fmt_annotation_body_element.rb +0 -4
- data/lib/metanorma/document/components/inline/fmt_annotation_end_element.rb +0 -4
- data/lib/metanorma/document/components/inline/fmt_annotation_start_element.rb +0 -4
- data/lib/metanorma/document/components/inline/fmt_concept_element.rb +0 -4
- data/lib/metanorma/document/components/inline/fmt_definition_element.rb +0 -4
- data/lib/metanorma/document/components/inline/fmt_fn_body_element.rb +0 -4
- data/lib/metanorma/document/components/inline/fmt_fn_label_element.rb +0 -4
- data/lib/metanorma/document/components/inline/fmt_footnote_container_element.rb +0 -4
- data/lib/metanorma/document/components/inline/fmt_identifier_element.rb +0 -4
- data/lib/metanorma/document/components/inline/fmt_name_element.rb +0 -4
- data/lib/metanorma/document/components/inline/fmt_preferred_element.rb +0 -4
- data/lib/metanorma/document/components/inline/fmt_sourcecode_element.rb +0 -4
- data/lib/metanorma/document/components/inline/fmt_stem_element.rb +0 -10
- data/lib/metanorma/document/components/inline/fmt_termsource_element.rb +0 -4
- data/lib/metanorma/document/components/inline/fmt_title_element.rb +0 -4
- data/lib/metanorma/document/components/inline/fmt_xref_element.rb +0 -4
- data/lib/metanorma/document/components/inline/fmt_xref_label_element.rb +0 -4
- data/lib/metanorma/document/components/inline/fn_element.rb +0 -2
- data/lib/metanorma/document/components/inline/link_element.rb +0 -2
- data/lib/metanorma/document/components/inline/localized_string_element.rb +0 -2
- data/lib/metanorma/document/components/inline/localized_strings_element.rb +0 -2
- data/lib/metanorma/document/components/inline/math_element.rb +0 -2
- data/lib/metanorma/document/components/inline/name_with_id_element.rb +0 -4
- data/lib/metanorma/document/components/inline/semx_child_element.rb +0 -2
- data/lib/metanorma/document/components/inline/semx_element.rb +1 -13
- data/lib/metanorma/document/components/inline/small_cap_element.rb +0 -2
- data/lib/metanorma/document/components/inline/span_element.rb +15 -10
- data/lib/metanorma/document/components/inline/stem_inline_element.rb +1 -7
- data/lib/metanorma/document/components/inline/strong_raw_element.rb +0 -2
- data/lib/metanorma/document/components/inline/sub_element.rb +0 -2
- data/lib/metanorma/document/components/inline/sup_element.rb +0 -2
- data/lib/metanorma/document/components/inline/tab_element.rb +0 -2
- data/lib/metanorma/document/components/inline/title_with_annotation_element.rb +0 -4
- data/lib/metanorma/document/components/inline/tt_element.rb +0 -2
- data/lib/metanorma/document/components/inline/variant_title_element.rb +0 -2
- data/lib/metanorma/document/components/inline/xref_element.rb +0 -10
- data/lib/metanorma/document/components/inline.rb +0 -12
- data/lib/metanorma/document/components/multi_paragraph/quote_block.rb +29 -0
- data/lib/metanorma/document/components/multi_paragraph.rb +0 -2
- data/lib/metanorma/document/components/reference_elements/source_element.rb +31 -0
- data/lib/metanorma/document/components/reference_elements.rb +2 -2
- data/lib/metanorma/document/components/tables/table_block.rb +22 -0
- data/lib/metanorma/document/components/tables/table_section.rb +25 -0
- data/lib/metanorma/document/components/tables.rb +3 -5
- data/lib/metanorma/document/relaton/address.rb +27 -0
- data/lib/metanorma/document/relaton/bib_item_locality.rb +12 -3
- data/lib/metanorma/document/relaton/copyright_association.rb +10 -0
- data/lib/metanorma/document/relaton/edition.rb +7 -4
- data/lib/metanorma/document/relaton/organization.rb +14 -0
- data/lib/metanorma/document/relaton/phone.rb +9 -3
- data/lib/metanorma/document/relaton/place_type.rb +13 -0
- data/lib/metanorma/document/relaton/price_type.rb +9 -3
- data/lib/metanorma/document/relaton.rb +1 -6
- data/lib/metanorma/document/version.rb +1 -1
- data/lib/metanorma/document.rb +0 -2
- data/lib/metanorma/html/asset_pipeline.rb +0 -1
- data/lib/metanorma/html/base_renderer.rb +1008 -261
- data/lib/metanorma/html/bipm_renderer.rb +144 -15
- data/lib/metanorma/html/cc_renderer.rb +45 -1
- data/lib/metanorma/html/component/base.rb +7 -2
- data/lib/metanorma/html/component/index_section.rb +43 -41
- data/lib/metanorma/html/drops/admonition_drop.rb +4 -1
- data/lib/metanorma/html/drops/block_element_drop.rb +2 -7
- data/lib/metanorma/html/drops/example_drop.rb +4 -1
- data/lib/metanorma/html/drops/figure_drop.rb +22 -31
- data/lib/metanorma/html/drops/footnote_drop.rb +1 -1
- data/lib/metanorma/html/drops/formula_drop.rb +16 -45
- data/lib/metanorma/html/drops/note_drop.rb +7 -9
- data/lib/metanorma/html/drops/sourcecode_drop.rb +5 -12
- data/lib/metanorma/html/drops.rb +0 -2
- data/lib/metanorma/html/generator.rb +2 -2
- data/lib/metanorma/html/icc_renderer.rb +39 -0
- data/lib/metanorma/html/iec_renderer.rb +44 -1
- data/lib/metanorma/html/ieee_renderer.rb +45 -1
- data/lib/metanorma/html/ietf_renderer.rb +48 -1
- data/lib/metanorma/html/iho_renderer.rb +46 -1
- data/lib/metanorma/html/iso_renderer.rb +343 -290
- data/lib/metanorma/html/itu_renderer.rb +45 -1
- data/lib/metanorma/html/ogc_renderer.rb +76 -15
- data/lib/metanorma/html/oiml_renderer.rb +38 -18
- data/lib/metanorma/html/pdfa_renderer.rb +39 -0
- data/lib/metanorma/html/ribose_renderer.rb +45 -1
- data/lib/metanorma/html/standard_renderer.rb +229 -341
- data/lib/metanorma/html/templates/_footnotes.html.liquid +6 -6
- data/lib/metanorma/html/templates/_formula.html.liquid +1 -1
- data/lib/metanorma/html/templates/_header.html.liquid +1 -1
- data/lib/metanorma/html/templates/_iso_cover.html.liquid +1 -1
- data/lib/metanorma/html/templates/document.html.liquid +0 -4
- data/lib/metanorma/html/theme.rb +107 -180
- data/lib/metanorma/html.rb +3 -14
- data/lib/metanorma/ietf_document/metadata/ietf_bib_data_extension_type.rb +25 -0
- data/lib/metanorma/ietf_document/metadata.rb +0 -2
- data/lib/metanorma/iso_document/metadata/iso_bib_data_extension_type.rb +48 -0
- data/lib/metanorma/iso_document/metadata/iso_bibliographic_item.rb +72 -0
- data/lib/metanorma/iso_document/metadata/iso_document_status.rb +30 -0
- data/lib/metanorma/iso_document/metadata/iso_localized_title.rb +1 -4
- data/lib/metanorma/iso_document/metadata/structured_identifier.rb +17 -0
- data/lib/metanorma/iso_document/metadata/title_collection.rb +0 -1
- data/lib/metanorma/iso_document/metadata.rb +4 -9
- data/lib/metanorma/iso_document/terms/iso_term.rb +13 -0
- data/lib/metanorma/iso_document/terms.rb +0 -1
- data/lib/metanorma/itu_document/metadata/itu_bib_data_extension_type.rb +37 -0
- data/lib/metanorma/itu_document/metadata.rb +4 -3
- data/lib/metanorma/standard_document/block_attributes.rb +9 -5
- data/lib/metanorma/standard_document/blocks/block_source.rb +23 -0
- data/lib/metanorma/standard_document/blocks.rb +1 -1
- data/lib/metanorma/standard_document/terms/term_expression.rb +31 -0
- data/lib/metanorma/standard_document/terms.rb +0 -1
- data/metanorma-document.gemspec +35 -0
- metadata +13 -262
- data/CLAUDE.md +0 -26
- data/TODO.finalize/01-split-multi-class-files.md +0 -8
- data/TODO.finalize/02-remove-data-dist-iso-document-frontend.md +0 -6
- data/TODO.finalize/03-align-frontend-iife-and-gha-build.md +0 -11
- data/TODO.finalize/04-theme-per-flavor-config-driven.md +0 -9
- data/TODO.finalize/05-migrate-all-html-to-liquid.md +0 -16
- data/TODO.finalize/06-integrate-pubid-library.md +0 -16
- data/TODO.finalize/07-replace-relaton-models-with-relaton-bib.md +0 -39
- data/TODO.finalize/08-refactor-renderer-architecture.md +0 -25
- data/TODO.finalize/09-eliminate-code-smells.md +0 -14
- data/TODO.finalize/10-comprehensive-spec-coverage.md +0 -24
- data/TODO.finalize/11-config-driven-flavor-metadata.md +0 -20
- data/TODO.finalize/12-add-frozen-string-literal.md +0 -6
- data/TODO.finalize/13-extract-composition-from-god-class.md +0 -96
- data/TODO.finalize/14-config-driven-section-ordering.md +0 -31
- data/TODO.finalize/15-theme-directories-per-flavor.md +0 -46
- data/TODO.finalize/16-theme-lutaml-model-schema.md +0 -44
- data/data/javascripts/components/mn-footnotes.js +0 -68
- data/data/logos/oiml-logo-full-dark.svg +0 -1
- data/data/logos/oiml-logo-full-light.svg +0 -1
- data/data/logos/oiml-logo-icon-dark.svg +0 -1
- data/data/logos/oiml-logo-icon-light.svg +0 -1
- data/data/logos/oiml-logo.svg +0 -1
- data/data/themes/bipm.yaml +0 -60
- data/data/themes/cc.yaml +0 -43
- data/data/themes/icc.yaml +0 -39
- data/data/themes/iec.yaml +0 -44
- data/data/themes/ieee.yaml +0 -43
- data/data/themes/ietf.yaml +0 -45
- data/data/themes/iho.yaml +0 -46
- data/data/themes/iso.yaml +0 -40
- data/data/themes/itu.yaml +0 -45
- data/data/themes/ogc.yaml +0 -51
- data/data/themes/oiml.yaml +0 -56
- data/data/themes/pdfa.yaml +0 -44
- data/data/themes/ribose.yaml +0 -43
- data/exe/metanorma-document +0 -11
- data/frontend/e2e/sample-html.test.ts +0 -256
- data/frontend/index.html +0 -12
- data/frontend/package-lock.json +0 -4725
- data/frontend/package.json +0 -32
- data/frontend/postcss.config.js +0 -6
- data/frontend/src/App.vue +0 -79
- data/frontend/src/app.ts +0 -21
- data/frontend/src/components/AppSidebar.vue +0 -77
- data/frontend/src/components/DocumentReader.vue +0 -180
- data/frontend/src/components/MirrorRenderer.vue +0 -23
- data/frontend/src/components/ReadingProgressBar.vue +0 -29
- data/frontend/src/components/TextRenderer.vue +0 -131
- data/frontend/src/components/TocItem.vue +0 -57
- data/frontend/src/components/TopBar.vue +0 -49
- data/frontend/src/components/__tests__/MirrorRenderer.test.ts +0 -178
- data/frontend/src/components/blocks/AdmonitionBlock.vue +0 -74
- data/frontend/src/components/blocks/ClauseBlock.vue +0 -53
- data/frontend/src/components/blocks/ExampleBlock.vue +0 -21
- data/frontend/src/components/blocks/FallbackBlock.vue +0 -18
- data/frontend/src/components/blocks/FigureBlock.vue +0 -26
- data/frontend/src/components/blocks/FootnotesBlock.vue +0 -25
- data/frontend/src/components/blocks/ListBlocks.vue +0 -62
- data/frontend/src/components/blocks/NoteBlock.vue +0 -21
- data/frontend/src/components/blocks/ParagraphBlock.vue +0 -25
- data/frontend/src/components/blocks/QuoteBlock.vue +0 -25
- data/frontend/src/components/blocks/ReviewBlock.vue +0 -39
- data/frontend/src/components/blocks/SourcecodeBlock.vue +0 -52
- data/frontend/src/components/blocks/TableBlock.vue +0 -48
- data/frontend/src/components/blocks/index.ts +0 -36
- data/frontend/src/stores/__tests__/documentStore.fixture.test.ts +0 -272
- data/frontend/src/stores/__tests__/documentStore.test.ts +0 -143
- data/frontend/src/stores/__tests__/ebookStore.test.ts +0 -145
- data/frontend/src/stores/__tests__/uiStore.test.ts +0 -42
- data/frontend/src/stores/documentStore.ts +0 -153
- data/frontend/src/stores/ebookStore.ts +0 -179
- data/frontend/src/stores/uiStore.ts +0 -32
- data/frontend/src/styles.css +0 -156
- data/frontend/src/types/__tests__/rendering-contract.test.ts +0 -172
- data/frontend/src/types/rendering-contract.ts +0 -209
- data/frontend/src/utils/__tests__/typeMetadata.test.ts +0 -102
- data/frontend/src/utils/typeMetadata.ts +0 -121
- data/frontend/tailwind.config.js +0 -18
- data/frontend/test/fixtures/iso-document.json +0 -271
- data/frontend/tmp/debug_e2e.cjs +0 -46
- data/frontend/tsconfig.json +0 -25
- data/frontend/tsconfig.node.json +0 -11
- data/frontend/vite.config.ts +0 -37
- data/frontend/vitest.e2e.config.ts +0 -9
- data/lib/metanorma/bipm_document/metadata/depiction_element.rb +0 -18
- data/lib/metanorma/document/cli.rb +0 -116
- data/lib/metanorma/document/components/ancillary_blocks/callout_annotation.rb +0 -27
- data/lib/metanorma/document/components/ancillary_blocks/sourcecode_body.rb +0 -18
- data/lib/metanorma/document/components/blocks/classification_value.rb +0 -21
- data/lib/metanorma/document/components/blocks/permission_model.rb +0 -28
- data/lib/metanorma/document/components/blocks/recommendation_model.rb +0 -28
- data/lib/metanorma/document/components/blocks/requirement_base.rb +0 -30
- data/lib/metanorma/document/components/blocks/requirement_classification.rb +0 -20
- data/lib/metanorma/document/components/blocks/requirement_description.rb +0 -43
- data/lib/metanorma/document/components/blocks/requirement_inherit.rb +0 -24
- data/lib/metanorma/document/components/inline/location_element.rb +0 -24
- data/lib/metanorma/document/components/inline/rendered_display.rb +0 -23
- data/lib/metanorma/document/components/inline/rendered_math_element.rb +0 -21
- data/lib/metanorma/document/components/inline/semantic_content.rb +0 -51
- data/lib/metanorma/document/components/inline/semantic_math_element.rb +0 -20
- data/lib/metanorma/document/components/inline/vocabulary.rb +0 -184
- data/lib/metanorma/document/components/multi_paragraph/quote_author_element.rb +0 -20
- data/lib/metanorma/document/components/reference_elements/source_modification.rb +0 -21
- data/lib/metanorma/document/components/reference_elements/source_origin.rb +0 -28
- data/lib/metanorma/document/components/tables/col_element.rb +0 -18
- data/lib/metanorma/document/components/tables/col_group_element.rb +0 -18
- data/lib/metanorma/document/components/tables/table_body_section.rb +0 -16
- data/lib/metanorma/document/components/tables/table_foot_section.rb +0 -16
- data/lib/metanorma/document/components/tables/table_head_section.rb +0 -16
- data/lib/metanorma/document/relaton/copyright_owner.rb +0 -16
- data/lib/metanorma/document/relaton/formatted_address.rb +0 -29
- data/lib/metanorma/document/relaton/logo_element.rb +0 -18
- data/lib/metanorma/document/relaton/region_element.rb +0 -18
- data/lib/metanorma/html/drops/biblio_entry_drop.rb +0 -50
- data/lib/metanorma/html/renderers/block_renderer.rb +0 -372
- data/lib/metanorma/html/renderers/inline_renderer.rb +0 -655
- data/lib/metanorma/html/renderers/pubid_renderer.rb +0 -69
- data/lib/metanorma/html/renderers/section_renderer.rb +0 -193
- data/lib/metanorma/html/renderers.rb +0 -8
- data/lib/metanorma/html/templates/_audio.html.liquid +0 -1
- data/lib/metanorma/html/templates/_biblio_entry.html.liquid +0 -1
- data/lib/metanorma/html/templates/_bipm_cover.html.liquid +0 -27
- data/lib/metanorma/html/templates/_boilerplate.html.liquid +0 -1
- data/lib/metanorma/html/templates/_bookmark.html.liquid +0 -1
- data/lib/metanorma/html/templates/_br.html.liquid +0 -1
- data/lib/metanorma/html/templates/_definition_list.html.liquid +0 -6
- data/lib/metanorma/html/templates/_element.html.liquid +0 -1
- data/lib/metanorma/html/templates/_fn_marker.html.liquid +0 -1
- data/lib/metanorma/html/templates/_heading.html.liquid +0 -1
- data/lib/metanorma/html/templates/_image.html.liquid +0 -1
- data/lib/metanorma/html/templates/_inline_span.html.liquid +0 -1
- data/lib/metanorma/html/templates/_link.html.liquid +0 -1
- data/lib/metanorma/html/templates/_list.html.liquid +0 -3
- data/lib/metanorma/html/templates/_list_item.html.liquid +0 -1
- data/lib/metanorma/html/templates/_main_content.html.liquid +0 -1
- data/lib/metanorma/html/templates/_math_container.html.liquid +0 -1
- data/lib/metanorma/html/templates/_paragraph.html.liquid +0 -1
- data/lib/metanorma/html/templates/_prefatory_section.html.liquid +0 -1
- data/lib/metanorma/html/templates/_pubid_identifier.html.liquid +0 -1
- data/lib/metanorma/html/templates/_quote.html.liquid +0 -4
- data/lib/metanorma/html/templates/_ref_date.html.liquid +0 -1
- data/lib/metanorma/html/templates/_ref_title.html.liquid +0 -1
- data/lib/metanorma/html/templates/_section.html.liquid +0 -5
- data/lib/metanorma/html/templates/_standard_cover.html.liquid +0 -31
- data/lib/metanorma/html/templates/_standard_doc_title.html.liquid +0 -3
- data/lib/metanorma/html/templates/_stem_span.html.liquid +0 -1
- data/lib/metanorma/html/templates/_table.html.liquid +0 -9
- data/lib/metanorma/html/templates/_term_domain.html.liquid +0 -1
- data/lib/metanorma/html/templates/_term_example.html.liquid +0 -1
- data/lib/metanorma/html/templates/_term_note.html.liquid +0 -1
- data/lib/metanorma/html/templates/_term_number.html.liquid +0 -1
- data/lib/metanorma/html/templates/_term_source.html.liquid +0 -1
- data/lib/metanorma/html/templates/_term_text_note.html.liquid +0 -1
- data/lib/metanorma/html/templates/_video.html.liquid +0 -1
- data/lib/metanorma/html/templates/_wrapped_preface.html.liquid +0 -1
- data/lib/metanorma/ietf_document/metadata/pi_settings.rb +0 -32
- data/lib/metanorma/iso_document/metadata/doctype_element.rb +0 -20
- data/lib/metanorma/iso_document/metadata/language_element.rb +0 -18
- data/lib/metanorma/iso_document/metadata/project_number.rb +0 -22
- data/lib/metanorma/iso_document/metadata/script_element.rb +0 -18
- data/lib/metanorma/iso_document/metadata/stage_element.rb +0 -26
- data/lib/metanorma/iso_document/metadata/stagename_element.rb +0 -18
- data/lib/metanorma/iso_document/terms/term_domain_element.rb +0 -18
- data/lib/metanorma/itu_document/metadata/meeting_date.rb +0 -18
- data/lib/metanorma/itu_document/metadata/meeting_element.rb +0 -18
- data/lib/metanorma/itu_document/metadata/study_period.rb +0 -18
- data/lib/metanorma/mirror/default_registry.rb +0 -170
- data/lib/metanorma/mirror/handler_registry.rb +0 -60
- data/lib/metanorma/mirror/handler_result.rb +0 -37
- data/lib/metanorma/mirror/handlers/admonition.rb +0 -18
- data/lib/metanorma/mirror/handlers/example.rb +0 -21
- data/lib/metanorma/mirror/handlers/figure.rb +0 -53
- data/lib/metanorma/mirror/handlers/formula.rb +0 -35
- data/lib/metanorma/mirror/handlers/inline/rich_html_renderer.rb +0 -159
- data/lib/metanorma/mirror/handlers/inline/text_extractor.rb +0 -116
- data/lib/metanorma/mirror/handlers/inline.rb +0 -225
- data/lib/metanorma/mirror/handlers/list.rb +0 -110
- data/lib/metanorma/mirror/handlers/note.rb +0 -26
- data/lib/metanorma/mirror/handlers/paragraph.rb +0 -19
- data/lib/metanorma/mirror/handlers/quote.rb +0 -16
- data/lib/metanorma/mirror/handlers/review.rb +0 -19
- data/lib/metanorma/mirror/handlers/section.rb +0 -149
- data/lib/metanorma/mirror/handlers/sourcecode.rb +0 -27
- data/lib/metanorma/mirror/handlers/structural.rb +0 -68
- data/lib/metanorma/mirror/handlers/table.rb +0 -81
- data/lib/metanorma/mirror/handlers/term.rb +0 -100
- data/lib/metanorma/mirror/handlers.rb +0 -60
- data/lib/metanorma/mirror/id_strategy/positional.rb +0 -166
- data/lib/metanorma/mirror/id_strategy/preserve.rb +0 -12
- data/lib/metanorma/mirror/id_strategy.rb +0 -34
- data/lib/metanorma/mirror/math_util.rb +0 -53
- data/lib/metanorma/mirror/metadata.rb +0 -37
- data/lib/metanorma/mirror/metanorma_to_mirror.rb +0 -101
- data/lib/metanorma/mirror/model/container.rb +0 -47
- data/lib/metanorma/mirror/model/factory.rb +0 -52
- data/lib/metanorma/mirror/model/guide.rb +0 -25
- data/lib/metanorma/mirror/model/leaf.rb +0 -17
- data/lib/metanorma/mirror/model/mark.rb +0 -53
- data/lib/metanorma/mirror/model/node.rb +0 -47
- data/lib/metanorma/mirror/model/soft_break.rb +0 -33
- data/lib/metanorma/mirror/model/text.rb +0 -34
- data/lib/metanorma/mirror/model.rb +0 -16
- data/lib/metanorma/mirror/output/builder.rb +0 -39
- data/lib/metanorma/mirror/output/formats/base_format.rb +0 -90
- data/lib/metanorma/mirror/output/formats/inline_format.rb +0 -81
- data/lib/metanorma/mirror/output/formats.rb +0 -53
- data/lib/metanorma/mirror/output/html_renderer.rb +0 -95
- data/lib/metanorma/mirror/output/html_renderers/block_renderers.rb +0 -178
- data/lib/metanorma/mirror/output/html_renderers/inline_renderer.rb +0 -61
- data/lib/metanorma/mirror/output/html_renderers/list_renderers.rb +0 -96
- data/lib/metanorma/mirror/output/html_renderers/mark_renderers.rb +0 -64
- data/lib/metanorma/mirror/output/html_renderers/section_renderers.rb +0 -129
- data/lib/metanorma/mirror/output/html_renderers/structural_renderers.rb +0 -80
- data/lib/metanorma/mirror/output/html_renderers/table_renderers.rb +0 -87
- data/lib/metanorma/mirror/output/html_renderers.rb +0 -76
- data/lib/metanorma/mirror/output/pipeline.rb +0 -92
- data/lib/metanorma/mirror/output/pipeline_context.rb +0 -22
- data/lib/metanorma/mirror/output.rb +0 -14
- data/lib/metanorma/mirror/rewriter.rb +0 -121
- data/lib/metanorma/mirror/safe_attr.rb +0 -16
- data/lib/metanorma/mirror/serialization/json_serializer.rb +0 -25
- data/lib/metanorma/mirror/serialization/yaml_serializer.rb +0 -20
- data/lib/metanorma/mirror/serialization.rb +0 -10
- data/lib/metanorma/mirror/transformer.rb +0 -22
- data/lib/metanorma/mirror.rb +0 -32
- data/lib/metanorma/standard_document/annotation.rb +0 -37
- data/lib/metanorma/standard_document/blocks/source_origin_element.rb +0 -23
- data/lib/metanorma/standard_document/terms/term_name_element.rb +0 -29
- data/script/render_both.rb +0 -18
|
@@ -8,11 +8,7 @@
|
|
|
8
8
|
box-shadow: none;
|
|
9
9
|
display: block;
|
|
10
10
|
text-align: center;
|
|
11
|
-
}
|
|
12
|
-
.formula > math {
|
|
13
|
-
display: block;
|
|
14
11
|
overflow-x: auto;
|
|
15
|
-
padding: 0.2em 0;
|
|
16
12
|
}
|
|
17
13
|
.formula .stem { font-style: italic; font-size: 1.05em; }
|
|
18
14
|
.formula-number {
|
|
@@ -24,46 +20,6 @@
|
|
|
24
20
|
float: right;
|
|
25
21
|
}
|
|
26
22
|
|
|
27
|
-
/* where clause: "where" label + definition table */
|
|
28
|
-
.formula .formula-where {
|
|
29
|
-
text-align: left;
|
|
30
|
-
font-size: 0.95em;
|
|
31
|
-
margin: 0.5em 0 0;
|
|
32
|
-
}
|
|
33
|
-
.formula dl {
|
|
34
|
-
display: grid;
|
|
35
|
-
grid-template-columns: auto 1fr;
|
|
36
|
-
column-gap: 1em;
|
|
37
|
-
row-gap: 0.2em;
|
|
38
|
-
text-align: left;
|
|
39
|
-
margin: 0.5em 0 0;
|
|
40
|
-
padding: 0;
|
|
41
|
-
border: none;
|
|
42
|
-
}
|
|
43
|
-
.formula dl dt {
|
|
44
|
-
padding: 0.15em 0;
|
|
45
|
-
color: inherit;
|
|
46
|
-
font-weight: inherit;
|
|
47
|
-
margin: 0;
|
|
48
|
-
white-space: nowrap;
|
|
49
|
-
}
|
|
50
|
-
.formula dl dd {
|
|
51
|
-
margin: 0;
|
|
52
|
-
padding: 0.15em 0;
|
|
53
|
-
border: none;
|
|
54
|
-
}
|
|
55
|
-
.formula dl dd > p:first-child { margin-top: 0; }
|
|
56
|
-
.formula dl dd > p:last-child { margin-bottom: 0; }
|
|
57
|
-
.formula dl dd + dt { margin-top: 0; }
|
|
58
|
-
|
|
59
|
-
/* Paragraph "where" content inside formulas (no dl) */
|
|
60
|
-
.formula > p:not(.formula-where):not(.formula-number) {
|
|
61
|
-
text-align: left;
|
|
62
|
-
font-size: 0.92em;
|
|
63
|
-
margin: 0.3em 0 0;
|
|
64
|
-
padding-left: 1em;
|
|
65
|
-
}
|
|
66
|
-
|
|
67
23
|
@media (max-width: 767px) {
|
|
68
24
|
.formula .formula-number { float: none; display: block; text-align: center; margin-top: 0.5em; }
|
|
69
25
|
}
|
|
@@ -32,27 +32,12 @@
|
|
|
32
32
|
.brand-logo {
|
|
33
33
|
display: inline-flex; align-items: center; justify-content: center;
|
|
34
34
|
height: 26px; border-radius: var(--radius-sm); overflow: hidden;
|
|
35
|
-
margin-left: 0.3em; background: rgba(255,255,255,0.
|
|
35
|
+
margin-left: 0.3em; background: rgba(255,255,255,0.12);
|
|
36
36
|
padding: 0 0.3em; flex-shrink: 0;
|
|
37
37
|
}
|
|
38
38
|
.brand-logo svg { height: 22px; width: auto; max-width: none; }
|
|
39
|
+
.brand-logo svg path { fill: #fff; }
|
|
39
40
|
.brand-logo + .brand-logo { margin-left: 0.2em; }
|
|
40
|
-
|
|
41
|
-
/* Light/dark logo switching */
|
|
42
|
-
.brand-logo-dark { display: none !important; }
|
|
43
|
-
.brand-logo-light { display: inline-flex; }
|
|
44
|
-
[data-theme="dark"] .brand-logo-light,
|
|
45
|
-
[data-theme="oled"] .brand-logo-light { display: none !important; }
|
|
46
|
-
[data-theme="dark"] .brand-logo-dark,
|
|
47
|
-
[data-theme="oled"] .brand-logo-dark { display: inline-flex !important; }
|
|
48
|
-
|
|
49
|
-
/* Cover logo light/dark switching */
|
|
50
|
-
.cover-logo-dark { display: none !important; }
|
|
51
|
-
.cover-logo-light { display: inline-flex; }
|
|
52
|
-
[data-theme="dark"] .cover-logo-light,
|
|
53
|
-
[data-theme="oled"] .cover-logo-light { display: none !important; }
|
|
54
|
-
[data-theme="dark"] .cover-logo-dark,
|
|
55
|
-
[data-theme="oled"] .cover-logo-dark { display: inline-flex !important; }
|
|
56
41
|
.header-doc-id {
|
|
57
42
|
font-family: var(--font-sans); font-size: 0.82em; opacity: 0.85;
|
|
58
43
|
font-weight: 600; letter-spacing: 0.02em;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/* === Inline Elements === */
|
|
2
2
|
.fn-marker { vertical-align: super; font-size: 0.78em; color: var(--mn-primary); font-family: var(--font-sans); }
|
|
3
3
|
.small-caps { font-variant: small-caps; letter-spacing: 0.03em; }
|
|
4
|
-
.obligation-text { font-style: italic; color: var(--
|
|
4
|
+
.obligation-text { font-style: italic; color: var(--mn-accent); }
|
|
5
5
|
.title-text { font-weight: 700; }
|
|
6
6
|
|
|
7
7
|
/* Math container — hover dropdown for source formats */
|
|
@@ -36,26 +36,13 @@ tr:hover td { background: var(--mn-primary-light); }
|
|
|
36
36
|
|
|
37
37
|
.table-scroll-wrapper {
|
|
38
38
|
margin: 1.4em 0;
|
|
39
|
-
overflow: auto;
|
|
39
|
+
overflow-x: auto;
|
|
40
40
|
-webkit-overflow-scrolling: touch;
|
|
41
41
|
border-radius: var(--radius-sm);
|
|
42
42
|
box-shadow: var(--shadow-sm);
|
|
43
43
|
position: relative;
|
|
44
44
|
max-height: 70vh;
|
|
45
45
|
}
|
|
46
|
-
.table-caption {
|
|
47
|
-
position: sticky;
|
|
48
|
-
top: 0;
|
|
49
|
-
z-index: 2;
|
|
50
|
-
background: var(--color-bg-light);
|
|
51
|
-
padding: 0.7em 1em;
|
|
52
|
-
font-weight: 600;
|
|
53
|
-
font-family: var(--font-sans);
|
|
54
|
-
font-size: 0.92em;
|
|
55
|
-
text-align: left;
|
|
56
|
-
color: var(--color-text);
|
|
57
|
-
border-bottom: 1px solid var(--color-border);
|
|
58
|
-
}
|
|
59
46
|
.table-scroll-wrapper table { margin: 0; box-shadow: none; }
|
|
60
47
|
.table-scroll-wrapper::after {
|
|
61
48
|
content: "";
|
|
@@ -67,4 +54,4 @@ tr:hover td { background: var(--mn-primary-light); }
|
|
|
67
54
|
}
|
|
68
55
|
.table-scroll-wrapper:has(table:not([style*="width: 100%"]))::after { display: block; }
|
|
69
56
|
.table-notes { border: none; padding: 0.4em 0.9em; background: none; }
|
|
70
|
-
.table-notes .note-block { background: none; border-left: none; padding: 0.3em 0
|
|
57
|
+
.table-notes .note-block { background: none; border-left: none; padding: 0.3em 0; font-size: 0.9em; }
|
|
@@ -23,6 +23,7 @@ div[id^="term-"] + div[id^="term-"] { margin-top: 0; }
|
|
|
23
23
|
.term-domain { font-style: italic; color: var(--mn-accent); font-size: 0.92em; margin-top: 0.3em; }
|
|
24
24
|
.term-source {
|
|
25
25
|
font-size: 0.85em;
|
|
26
|
+
text-align: right;
|
|
26
27
|
color: var(--color-text-muted);
|
|
27
28
|
margin-top: 0.8em;
|
|
28
29
|
border-top: none;
|
|
@@ -3,6 +3,20 @@
|
|
|
3
3
|
module Metanorma
|
|
4
4
|
module BipmDocument
|
|
5
5
|
module Metadata
|
|
6
|
+
# Depiction element containing image/SVG content.
|
|
7
|
+
class DepictionElement < Lutaml::Model::Serializable
|
|
8
|
+
attribute :type, :string
|
|
9
|
+
attribute :content, :string
|
|
10
|
+
|
|
11
|
+
xml do
|
|
12
|
+
element "depiction"
|
|
13
|
+
map_attribute "type", to: :type
|
|
14
|
+
map_all_content to: :content
|
|
15
|
+
end
|
|
16
|
+
end
|
|
17
|
+
|
|
18
|
+
# The bibliographical description of a BIPM document.
|
|
19
|
+
# Inherits all ISO bibdata fields; BIPM adds depiction.
|
|
6
20
|
class BipmBibliographicItem < Metanorma::IsoDocument::Metadata::IsoBibliographicItem
|
|
7
21
|
attribute :ext, BipmBibDataExtensionType
|
|
8
22
|
attribute :depiction, DepictionElement
|
|
@@ -9,7 +9,7 @@ module Metanorma
|
|
|
9
9
|
"#{__dir__}/metadata/bipm_bibliographic_item"
|
|
10
10
|
autoload :BipmStructuredIdentifier,
|
|
11
11
|
"#{__dir__}/metadata/bipm_structured_identifier"
|
|
12
|
-
autoload :DepictionElement, "#{__dir__}/metadata/
|
|
12
|
+
autoload :DepictionElement, "#{__dir__}/metadata/bipm_bibliographic_item"
|
|
13
13
|
end
|
|
14
14
|
end
|
|
15
15
|
end
|
|
@@ -4,23 +4,88 @@ 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.
|
|
7
38
|
class SourcecodeBlock < Metanorma::Document::Components::Blocks::BasicBlockNoNotes
|
|
39
|
+
# The caption of the block.
|
|
8
40
|
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.
|
|
9
43
|
attribute :unnumbered, :boolean
|
|
44
|
+
|
|
45
|
+
# Anchor attribute for cross-references
|
|
10
46
|
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.
|
|
11
52
|
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).
|
|
12
57
|
attribute :filename, :string
|
|
58
|
+
|
|
59
|
+
# The computer language or other notational convention that the source code is expressed in.
|
|
13
60
|
attribute :lang, :string
|
|
61
|
+
|
|
62
|
+
# Whether callout markers are displayed
|
|
14
63
|
attribute :markers, :string
|
|
15
64
|
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.)
|
|
16
68
|
attribute :content, :string
|
|
69
|
+
|
|
70
|
+
# The source code body, containing code text with embedded callout references.
|
|
17
71
|
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.
|
|
18
75
|
attribute :callouts,
|
|
19
76
|
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.
|
|
20
80
|
attribute :callout_annotations,
|
|
21
81
|
CalloutAnnotation, collection: true
|
|
82
|
+
|
|
83
|
+
# Presentation-specific elements
|
|
22
84
|
attribute :fmt_sourcecode, Metanorma::Document::Components::Inline::FmtSourcecodeElement
|
|
85
|
+
|
|
86
|
+
# Presentation-specific: semx-id for round-trip fidelity
|
|
23
87
|
attribute :semx_id, :string
|
|
88
|
+
|
|
24
89
|
attribute :json_type, :string
|
|
25
90
|
|
|
26
91
|
def json_type
|
|
@@ -4,8 +4,6 @@ module Metanorma
|
|
|
4
4
|
module Document
|
|
5
5
|
module Components
|
|
6
6
|
module AncillaryBlocks
|
|
7
|
-
autoload :CalloutAnnotation,
|
|
8
|
-
"#{__dir__}/ancillary_blocks/callout_annotation"
|
|
9
7
|
autoload :ExampleBlock, "#{__dir__}/ancillary_blocks/example_block"
|
|
10
8
|
autoload :FigureBlock, "#{__dir__}/ancillary_blocks/figure_block"
|
|
11
9
|
autoload :FormulaBlock, "#{__dir__}/ancillary_blocks/formula_block"
|
|
@@ -13,8 +11,6 @@ module Metanorma
|
|
|
13
11
|
autoload :LiteralBlock, "#{__dir__}/ancillary_blocks/literal_block"
|
|
14
12
|
autoload :SourcecodeBlock,
|
|
15
13
|
"#{__dir__}/ancillary_blocks/sourcecode_block"
|
|
16
|
-
autoload :SourcecodeBody,
|
|
17
|
-
"#{__dir__}/ancillary_blocks/sourcecode_body"
|
|
18
14
|
autoload :Subfigure, "#{__dir__}/ancillary_blocks/subfigure"
|
|
19
15
|
end
|
|
20
16
|
end
|
|
@@ -60,13 +60,6 @@ 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
|
|
70
63
|
end
|
|
71
64
|
end
|
|
72
65
|
end
|
|
@@ -4,6 +4,99 @@ 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
|
+
|
|
7
100
|
class RequirementModel < RequirementBase
|
|
8
101
|
xml do
|
|
9
102
|
element "requirement"
|
|
@@ -22,6 +115,44 @@ module Metanorma
|
|
|
22
115
|
map_element "example", to: :example
|
|
23
116
|
end
|
|
24
117
|
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
|
|
25
156
|
end
|
|
26
157
|
end
|
|
27
158
|
end
|
|
@@ -6,18 +6,17 @@ 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"
|
|
10
9
|
autoload :NoteBlock, "#{__dir__}/blocks/note_block"
|
|
11
10
|
autoload :Passthrough, "#{__dir__}/blocks/passthrough"
|
|
12
|
-
autoload :
|
|
13
|
-
autoload :RecommendationModel, "#{__dir__}/blocks/recommendation_model"
|
|
14
|
-
autoload :RequirementBase, "#{__dir__}/blocks/requirement_base"
|
|
11
|
+
autoload :ClassificationValue, "#{__dir__}/blocks/requirement_model"
|
|
15
12
|
autoload :RequirementClassification,
|
|
16
|
-
"#{__dir__}/blocks/
|
|
17
|
-
autoload :RequirementDescription,
|
|
18
|
-
|
|
19
|
-
autoload :
|
|
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"
|
|
20
17
|
autoload :RequirementModel, "#{__dir__}/blocks/requirement_model"
|
|
18
|
+
autoload :RecommendationModel, "#{__dir__}/blocks/requirement_model"
|
|
19
|
+
autoload :PermissionModel, "#{__dir__}/blocks/requirement_model"
|
|
21
20
|
end
|
|
22
21
|
end
|
|
23
22
|
end
|
|
@@ -10,7 +10,6 @@ module Metanorma
|
|
|
10
10
|
attribute :width, :string
|
|
11
11
|
attribute :align, :string
|
|
12
12
|
attribute :semx_id, :string
|
|
13
|
-
attribute :inline_svg, :string
|
|
14
13
|
|
|
15
14
|
xml do
|
|
16
15
|
element "image"
|
|
@@ -18,7 +17,6 @@ module Metanorma
|
|
|
18
17
|
map_attribute "width", to: :width, render_empty: true
|
|
19
18
|
map_attribute "align", to: :align
|
|
20
19
|
map_attribute "semx-id", to: :semx_id
|
|
21
|
-
map_element "svg", to: :inline_svg, raw: :element
|
|
22
20
|
end
|
|
23
21
|
end
|
|
24
22
|
end
|
|
@@ -1,12 +1,8 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
1
|
module Metanorma
|
|
4
2
|
module Document
|
|
5
3
|
module Components
|
|
6
4
|
module Inline
|
|
7
5
|
class FmtAdmittedElement < Lutaml::Model::Serializable
|
|
8
|
-
include RenderedDisplay
|
|
9
|
-
|
|
10
6
|
attribute :p, "Metanorma::Document::Components::Paragraphs::ParagraphBlock",
|
|
11
7
|
collection: true
|
|
12
8
|
|
|
@@ -1,12 +1,8 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
1
|
module Metanorma
|
|
4
2
|
module Document
|
|
5
3
|
module Components
|
|
6
4
|
module Inline
|
|
7
5
|
class FmtAnnotationBodyElement < Lutaml::Model::Serializable
|
|
8
|
-
include RenderedDisplay
|
|
9
|
-
|
|
10
6
|
attribute :id, :string
|
|
11
7
|
attribute :date, :string
|
|
12
8
|
attribute :from, :string
|
|
@@ -1,12 +1,8 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
1
|
module Metanorma
|
|
4
2
|
module Document
|
|
5
3
|
module Components
|
|
6
4
|
module Inline
|
|
7
5
|
class FmtAnnotationEndElement < Lutaml::Model::Serializable
|
|
8
|
-
include RenderedDisplay
|
|
9
|
-
|
|
10
6
|
attribute :id, :string
|
|
11
7
|
attribute :date, :string
|
|
12
8
|
attribute :source, :string
|
|
@@ -1,12 +1,8 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
1
|
module Metanorma
|
|
4
2
|
module Document
|
|
5
3
|
module Components
|
|
6
4
|
module Inline
|
|
7
5
|
class FmtAnnotationStartElement < Lutaml::Model::Serializable
|
|
8
|
-
include RenderedDisplay
|
|
9
|
-
|
|
10
6
|
attribute :id, :string
|
|
11
7
|
attribute :date, :string
|
|
12
8
|
attribute :source, :string
|
|
@@ -1,12 +1,8 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
1
|
module Metanorma
|
|
4
2
|
module Document
|
|
5
3
|
module Components
|
|
6
4
|
module Inline
|
|
7
5
|
class FmtConceptElement < Lutaml::Model::Serializable
|
|
8
|
-
include RenderedDisplay
|
|
9
|
-
|
|
10
6
|
attribute :text, :string, collection: true
|
|
11
7
|
attribute :semx, SemxElement, collection: true
|
|
12
8
|
attribute :eref, ErefElement, collection: true
|
|
@@ -1,12 +1,8 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
1
|
module Metanorma
|
|
4
2
|
module Document
|
|
5
3
|
module Components
|
|
6
4
|
module Inline
|
|
7
5
|
class FmtDefinitionElement < Lutaml::Model::Serializable
|
|
8
|
-
include RenderedDisplay
|
|
9
|
-
|
|
10
6
|
attribute :id, :string
|
|
11
7
|
attribute :semx, SemxElement, collection: true
|
|
12
8
|
|
|
@@ -1,12 +1,8 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
1
|
module Metanorma
|
|
4
2
|
module Document
|
|
5
3
|
module Components
|
|
6
4
|
module Inline
|
|
7
5
|
class FmtFnBodyElement < Lutaml::Model::Serializable
|
|
8
|
-
include RenderedDisplay
|
|
9
|
-
|
|
10
6
|
attribute :id, :string
|
|
11
7
|
attribute :target, :string
|
|
12
8
|
attribute :reference, :string
|