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
|
@@ -2,8 +2,52 @@
|
|
|
2
2
|
|
|
3
3
|
module Metanorma
|
|
4
4
|
module Html
|
|
5
|
+
# ITU brand: #0e99d5 blue from logo
|
|
5
6
|
class ItuRenderer < IsoRenderer
|
|
6
|
-
|
|
7
|
+
def flavor_publishers(_doc_id)
|
|
8
|
+
["ITU"]
|
|
9
|
+
end
|
|
10
|
+
|
|
11
|
+
def flavor_publisher_name
|
|
12
|
+
"ITU"
|
|
13
|
+
end
|
|
14
|
+
|
|
15
|
+
def publisher_logo_map
|
|
16
|
+
{ "ITU" => "itu-logo.svg" }
|
|
17
|
+
end
|
|
18
|
+
|
|
19
|
+
def theme
|
|
20
|
+
@theme ||= Theme.new.tap do |t|
|
|
21
|
+
t.primary = "#0a7bac"
|
|
22
|
+
t.accent = "#0e99d5"
|
|
23
|
+
t.accent_deep = "#0a7bac"
|
|
24
|
+
t.gradient = "linear-gradient(135deg, #065a83 0%, #0a7bac 50%, #0e99d5 100%)"
|
|
25
|
+
t.primary_light = "#e8f4fa"
|
|
26
|
+
t.accent_light = "#daedf8"
|
|
27
|
+
t.warm = "#b8860b"
|
|
28
|
+
t.warm_light = "#fdf5e6"
|
|
29
|
+
t.sidebar_bg = "#f2f6fa"
|
|
30
|
+
t.font_body = '"Noto Serif", "Georgia", serif'
|
|
31
|
+
t.font_sans = '"Noto Sans", "Helvetica Neue", Arial, sans-serif'
|
|
32
|
+
t.font_mono = '"Noto Sans Mono", "Menlo", monospace'
|
|
33
|
+
t.font_url = "https://fonts.googleapis.com/css2?family=Noto+Sans:wght@400;500;600;700&family=Noto+Serif:ital,wght@0,400;0,500;0,600;1,400&family=Noto+Sans+Mono:wght@400;500&display=swap"
|
|
34
|
+
t.header_background = "linear-gradient(135deg, #065a83 0%, #0a7bac 40%, #0e99d5 100%)"
|
|
35
|
+
t.cover_background = "linear-gradient(175deg, #043d5c 0%, #065a83 25%, #0a7bac 55%, #0e99d5 85%, #47b5e3 100%)"
|
|
36
|
+
t.cover_before_bg = "background: radial-gradient(ellipse at 30% 15%, rgba(14,153,213,0.2) 0%, transparent 50%), radial-gradient(ellipse at 70% 80%, rgba(184,134,11,0.1) 0%, transparent 40%)"
|
|
37
|
+
t.cover_after_bg = "height: 3px; background: linear-gradient(90deg, transparent, #0e99d5, #b8860b, transparent)"
|
|
38
|
+
t.progress_bar_color = "#0e99d5"
|
|
39
|
+
t.note_border = "#0e99d5"
|
|
40
|
+
t.note_bg = "#daedf8"
|
|
41
|
+
t.note_color = "#0e99d5"
|
|
42
|
+
t.example_border = "#0a7bac"
|
|
43
|
+
t.example_bg = "#e8f4fa"
|
|
44
|
+
t.example_color = "#0a7bac"
|
|
45
|
+
t.admonition_border = "#b8860b"
|
|
46
|
+
t.admonition_color = "#b8860b"
|
|
47
|
+
t.footer_border_color = "#0e99d5"
|
|
48
|
+
t.cover_separator_color = "rgba(14,153,213,0.25)"
|
|
49
|
+
end
|
|
50
|
+
end
|
|
7
51
|
end
|
|
8
52
|
end
|
|
9
53
|
end
|
|
@@ -2,22 +2,83 @@
|
|
|
2
2
|
|
|
3
3
|
module Metanorma
|
|
4
4
|
module Html
|
|
5
|
+
# Renders OgcDocument components to HTML.
|
|
6
|
+
# Extends IsoRenderer with OGC-specific branding (geospatial, OGC cyan-blue #00b1ff).
|
|
5
7
|
class OgcRenderer < IsoRenderer
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
8
|
+
def flavor_publishers(_doc_id)
|
|
9
|
+
["OGC"]
|
|
10
|
+
end
|
|
11
|
+
|
|
12
|
+
def flavor_publisher_name
|
|
13
|
+
"OGC"
|
|
14
|
+
end
|
|
15
|
+
|
|
16
|
+
def publisher_logo_map
|
|
17
|
+
{ "OGC" => "ogc-logo.svg" }
|
|
18
|
+
end
|
|
19
|
+
|
|
20
|
+
def theme
|
|
21
|
+
@theme ||= Theme.new.tap do |t|
|
|
22
|
+
t.primary = "#0077b3"
|
|
23
|
+
t.accent = "#00b1ff"
|
|
24
|
+
t.gradient = "linear-gradient(135deg, #003d5c 0%, #0077b3 50%, #00b1ff 100%)"
|
|
25
|
+
t.accent_deep = "#006699"
|
|
26
|
+
t.primary_light = "#e8f4fa"
|
|
27
|
+
t.accent_light = "#e0f4ff"
|
|
28
|
+
t.warm = "#e8812e"
|
|
29
|
+
t.warm_light = "#fff5eb"
|
|
30
|
+
t.sidebar_bg = "#f2f8fc"
|
|
31
|
+
t.font_body = '"Space Grotesk", "Helvetica Neue", Arial, sans-serif'
|
|
32
|
+
t.font_sans = '"Space Grotesk", "Helvetica Neue", Arial, sans-serif'
|
|
33
|
+
t.font_mono = '"JetBrains Mono", "Fira Code", monospace'
|
|
34
|
+
t.font_url = "https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap"
|
|
35
|
+
t.header_background = "linear-gradient(135deg, #003d5c 0%, #0077b3 40%, #00b1ff 100%)"
|
|
36
|
+
t.cover_background = "linear-gradient(175deg, #001f30 0%, #003d5c 25%, #0077b3 55%, #00b1ff 85%, #66d9ff 100%)"
|
|
37
|
+
t.cover_before_bg = "background: radial-gradient(ellipse at 25% 15%, rgba(0,177,255,0.2) 0%, transparent 45%), radial-gradient(ellipse at 75% 85%, rgba(0,119,179,0.25) 0%, transparent 40%)"
|
|
38
|
+
t.cover_after_bg = "height: 4px; background: linear-gradient(90deg, transparent, #00b1ff 30%, #0077b3 50%, #00b1ff 70%, transparent)"
|
|
39
|
+
t.progress_bar_color = "#00b1ff"
|
|
40
|
+
t.note_border = "#00b1ff"
|
|
41
|
+
t.note_bg = "#e0f4ff"
|
|
42
|
+
t.note_color = "#0077b3"
|
|
43
|
+
t.example_border = "#0077b3"
|
|
44
|
+
t.example_bg = "#e8f4fa"
|
|
45
|
+
t.example_color = "#004d73"
|
|
46
|
+
t.admonition_border = "#e8812e"
|
|
47
|
+
t.admonition_bg = "#fff5eb"
|
|
48
|
+
t.admonition_color = "#c06a1a"
|
|
49
|
+
t.footer_border_color = "#00b1ff"
|
|
50
|
+
t.cover_separator_color = "rgba(0,177,255,0.25)"
|
|
51
|
+
t.dark_primary_light = "#0a2538"
|
|
52
|
+
t.dark_accent_light = "#0d2030"
|
|
53
|
+
t.extra_css = <<~CSS
|
|
54
|
+
.sourcecode pre { background: #0a1a28; border-color: #1a3050; }
|
|
55
|
+
.reading-progress { box-shadow: 0 0 10px rgba(0,177,255,0.3); }
|
|
56
|
+
mark.search-match { background: #e0f4ff; box-shadow: 0 0 0 1px rgba(0,177,255,0.3); }
|
|
57
|
+
mark.search-match.search-current { background: #00b1ff; color: #fff; }
|
|
58
|
+
[data-theme="dark"] .sourcecode pre { background: #060e18; border-color: #0d2030; }
|
|
59
|
+
CSS
|
|
60
|
+
end
|
|
61
|
+
end
|
|
62
|
+
|
|
63
|
+
# OGC preface: wrap all preface clauses (except ToC) under a "Preface" heading.
|
|
64
|
+
# OGC documents have no foreword/introduction — their preface clauses are
|
|
65
|
+
# security, submitting_orgs, submission contacts, etc.
|
|
66
|
+
def render_preface(preface, **_opts)
|
|
67
|
+
preface_clauses = preface.clause&.reject { |cl| cl.type == "toc" } || []
|
|
68
|
+
|
|
69
|
+
return if preface_clauses.empty? &&
|
|
70
|
+
!preface.foreword && !preface.introduction &&
|
|
71
|
+
!preface.abstract && !preface.acknowledgements &&
|
|
72
|
+
!preface.executivesummary
|
|
73
|
+
|
|
74
|
+
@output << "<div id=\"preface\" class=\"preface-section\">"
|
|
75
|
+
register_toc_entry(id: "preface", level: 1, text: "Preface")
|
|
76
|
+
@output << "<h1 class=\"foreword-title\">Preface</h1>"
|
|
77
|
+
|
|
78
|
+
preface_clauses.each { |cl| render(cl, level: 2) }
|
|
79
|
+
|
|
80
|
+
@output << "</div>"
|
|
81
|
+
end
|
|
21
82
|
end
|
|
22
83
|
end
|
|
23
84
|
end
|
|
@@ -2,30 +2,50 @@
|
|
|
2
2
|
|
|
3
3
|
module Metanorma
|
|
4
4
|
module Html
|
|
5
|
+
# Renders OimlDocument (OIML) components to HTML.
|
|
6
|
+
# Extends IsoRenderer with OIML branding.
|
|
5
7
|
class OimlRenderer < IsoRenderer
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
DOCTYPE_ID_PATTERN = /\b([RGBDEVS])\s*\d/
|
|
9
|
-
|
|
10
|
-
def extract_doctype(bibdata)
|
|
11
|
-
oiml_doctype_from_doc_id(bibdata) || super
|
|
8
|
+
def flavor_publishers(_doc_id)
|
|
9
|
+
["OIML"]
|
|
12
10
|
end
|
|
13
11
|
|
|
14
|
-
def
|
|
15
|
-
|
|
12
|
+
def flavor_publisher_name
|
|
13
|
+
"OIML"
|
|
16
14
|
end
|
|
17
15
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
labels = theme.doctype_labels
|
|
22
|
-
return nil if labels.empty?
|
|
23
|
-
|
|
24
|
-
doc_id = formatted_doc_id(bibdata).to_s
|
|
25
|
-
return nil if doc_id.empty?
|
|
16
|
+
def publisher_logo_map
|
|
17
|
+
{}
|
|
18
|
+
end
|
|
26
19
|
|
|
27
|
-
|
|
28
|
-
|
|
20
|
+
def theme
|
|
21
|
+
@theme ||= Theme.new.tap do |t|
|
|
22
|
+
t.font_body = '"Merriweather", "Georgia", serif'
|
|
23
|
+
t.font_sans = '"Montserrat", "Helvetica Neue", Arial, sans-serif'
|
|
24
|
+
t.font_mono = '"JetBrains Mono", "Fira Code", monospace'
|
|
25
|
+
t.font_url = "https://fonts.googleapis.com/css2?family=Merriweather:ital,wght@0,300;0,400;0,700;1,400&family=Montserrat:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap"
|
|
26
|
+
t.primary = "#1a5c3a"
|
|
27
|
+
t.accent = "#2e8b57"
|
|
28
|
+
t.accent_deep = "#247049"
|
|
29
|
+
t.gradient = "linear-gradient(135deg, #0d3d22 0%, #1a5c3a 50%, #2e8b57 100%)"
|
|
30
|
+
t.primary_light = "#edf7f1"
|
|
31
|
+
t.accent_light = "#e0f5e8"
|
|
32
|
+
t.warm = "#d4a017"
|
|
33
|
+
t.warm_light = "#fdf6e8"
|
|
34
|
+
t.header_background = "linear-gradient(135deg, #0d3d22 0%, #1a5c3a 50%, #2e8b57 100%)"
|
|
35
|
+
t.cover_background = "linear-gradient(175deg, #071f14 0%, #0d3d22 30%, #1a5c3a 65%, #2e8b57 100%)"
|
|
36
|
+
t.cover_before_bg = "background: radial-gradient(ellipse at 30% 20%, rgba(46,139,87,0.2) 0%, transparent 50%), radial-gradient(ellipse at 70% 80%, rgba(212,160,23,0.15) 0%, transparent 40%)"
|
|
37
|
+
t.cover_after_bg = "height: 3px; background: linear-gradient(90deg, transparent, #d4a017, transparent)"
|
|
38
|
+
t.progress_bar_color = "#2e8b57"
|
|
39
|
+
t.note_border = "#2e8b57"
|
|
40
|
+
t.note_bg = "#e0f5e8"
|
|
41
|
+
t.note_color = "#2e8b57"
|
|
42
|
+
t.example_border = "#1a5c3a"
|
|
43
|
+
t.example_bg = "#edf7f1"
|
|
44
|
+
t.example_color = "#1a5c3a"
|
|
45
|
+
t.admonition_border = "#d4a017"
|
|
46
|
+
t.admonition_color = "#d4a017"
|
|
47
|
+
t.footer_border_color = "#2e8b57"
|
|
48
|
+
t.cover_separator_color = "rgba(46,139,87,0.25)"
|
|
29
49
|
end
|
|
30
50
|
end
|
|
31
51
|
end
|
|
@@ -5,6 +5,45 @@ module Metanorma
|
|
|
5
5
|
# Renders PDF Association (PDFA) taste documents to HTML.
|
|
6
6
|
# PDFA brand: #cf9c1d gold + #d03544 red + #4992b2 steel blue from logo
|
|
7
7
|
class PdfaRenderer < IsoRenderer
|
|
8
|
+
def flavor_publishers(_doc_id)
|
|
9
|
+
["PDF Association"]
|
|
10
|
+
end
|
|
11
|
+
|
|
12
|
+
def flavor_publisher_name
|
|
13
|
+
"PDF Association"
|
|
14
|
+
end
|
|
15
|
+
|
|
16
|
+
def publisher_logo_map
|
|
17
|
+
{ "PDF Association" => "pdfa-logo.svg" }
|
|
18
|
+
end
|
|
19
|
+
|
|
20
|
+
def theme
|
|
21
|
+
@theme ||= Theme.new.tap do |t|
|
|
22
|
+
t.primary = "#3a6e85"
|
|
23
|
+
t.accent = "#cf9c1d"
|
|
24
|
+
t.accent_deep = "#b08518"
|
|
25
|
+
t.gradient = "linear-gradient(135deg, #2a5268 0%, #3a6e85 50%, #4992b2 100%)"
|
|
26
|
+
t.primary_light = "#eef5f8"
|
|
27
|
+
t.accent_light = "#fdf6e6"
|
|
28
|
+
t.warm = "#d03544"
|
|
29
|
+
t.warm_light = "#fdeef0"
|
|
30
|
+
t.header_background = "linear-gradient(135deg, #2a5268 0%, #3a6e85 40%, #4992b2 100%)"
|
|
31
|
+
t.cover_background = "linear-gradient(175deg, #1a3848 0%, #2a5268 25%, #3a6e85 55%, #4992b2 85%, #cf9c1d 100%)"
|
|
32
|
+
t.cover_before_bg = "background: radial-gradient(ellipse at 25% 20%, rgba(207,156,29,0.15) 0%, transparent 50%), radial-gradient(ellipse at 70% 80%, rgba(73,146,178,0.2) 0%, transparent 40%)"
|
|
33
|
+
t.cover_after_bg = "height: 3px; background: linear-gradient(90deg, transparent, #cf9c1d, #d03544, transparent)"
|
|
34
|
+
t.progress_bar_color = "#cf9c1d"
|
|
35
|
+
t.note_border = "#4992b2"
|
|
36
|
+
t.note_bg = "#eef5f8"
|
|
37
|
+
t.note_color = "#4992b2"
|
|
38
|
+
t.example_border = "#3a6e85"
|
|
39
|
+
t.example_bg = "#eef5f8"
|
|
40
|
+
t.example_color = "#3a6e85"
|
|
41
|
+
t.admonition_border = "#d03544"
|
|
42
|
+
t.admonition_color = "#d03544"
|
|
43
|
+
t.footer_border_color = "#cf9c1d"
|
|
44
|
+
t.cover_separator_color = "rgba(207,156,29,0.25)"
|
|
45
|
+
end
|
|
46
|
+
end
|
|
8
47
|
end
|
|
9
48
|
end
|
|
10
49
|
end
|
|
@@ -2,8 +2,52 @@
|
|
|
2
2
|
|
|
3
3
|
module Metanorma
|
|
4
4
|
module Html
|
|
5
|
+
# Renders RiboseDocument components to HTML.
|
|
6
|
+
# Extends IsoRenderer with Ribose branding.
|
|
5
7
|
class RiboseRenderer < IsoRenderer
|
|
6
|
-
|
|
8
|
+
def flavor_publishers(_doc_id)
|
|
9
|
+
["Ribose"]
|
|
10
|
+
end
|
|
11
|
+
|
|
12
|
+
def flavor_publisher_name
|
|
13
|
+
"Ribose"
|
|
14
|
+
end
|
|
15
|
+
|
|
16
|
+
def publisher_logo_map
|
|
17
|
+
{}
|
|
18
|
+
end
|
|
19
|
+
|
|
20
|
+
def theme
|
|
21
|
+
@theme ||= Theme.new.tap do |t|
|
|
22
|
+
t.font_body = '"Noto Serif", "Georgia", serif'
|
|
23
|
+
t.font_sans = '"Noto Sans", "Helvetica Neue", Arial, sans-serif'
|
|
24
|
+
t.font_mono = '"JetBrains Mono", "Fira Code", monospace'
|
|
25
|
+
t.font_url = "https://fonts.googleapis.com/css2?family=Noto+Serif:ital,wght@0,400;0,500;0,600;0,700;1,400&family=Noto+Sans:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap"
|
|
26
|
+
t.primary = "#2d1b69"
|
|
27
|
+
t.accent = "#7c3aed"
|
|
28
|
+
t.accent_deep = "#5b21b6"
|
|
29
|
+
t.gradient = "linear-gradient(135deg, #1a0e3e 0%, #2d1b69 50%, #5b21b6 100%)"
|
|
30
|
+
t.primary_light = "#f3eeff"
|
|
31
|
+
t.accent_light = "#ede5ff"
|
|
32
|
+
t.warm = "#e8912e"
|
|
33
|
+
t.warm_light = "#fef4e8"
|
|
34
|
+
t.header_background = "linear-gradient(135deg, #1a0e3e 0%, #2d1b69 50%, #5b21b6 100%)"
|
|
35
|
+
t.cover_background = "linear-gradient(175deg, #0f0826 0%, #1a0e3e 25%, #2d1b69 55%, #5b21b6 80%, #7c3aed 100%)"
|
|
36
|
+
t.cover_before_bg = "background: radial-gradient(ellipse at 30% 20%, rgba(124,58,237,0.2) 0%, transparent 50%), radial-gradient(ellipse at 70% 80%, rgba(232,145,46,0.15) 0%, transparent 40%)"
|
|
37
|
+
t.cover_after_bg = "height: 3px; background: linear-gradient(90deg, transparent, #7c3aed, transparent)"
|
|
38
|
+
t.progress_bar_color = "#7c3aed"
|
|
39
|
+
t.note_border = "#7c3aed"
|
|
40
|
+
t.note_bg = "#ede5ff"
|
|
41
|
+
t.note_color = "#7c3aed"
|
|
42
|
+
t.example_border = "#2d1b69"
|
|
43
|
+
t.example_bg = "#f3eeff"
|
|
44
|
+
t.example_color = "#2d1b69"
|
|
45
|
+
t.admonition_border = "#e8912e"
|
|
46
|
+
t.admonition_color = "#e8912e"
|
|
47
|
+
t.footer_border_color = "#7c3aed"
|
|
48
|
+
t.cover_separator_color = "rgba(124,58,237,0.25)"
|
|
49
|
+
end
|
|
50
|
+
end
|
|
7
51
|
end
|
|
8
52
|
end
|
|
9
53
|
end
|