metanorma-document 0.2.12 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CLAUDE.md +3 -2
- data/README.adoc +1 -1
- data/Rakefile +30 -5
- data/frontend/dist/app.css +1 -0
- data/frontend/dist/app.iife.js +24 -0
- data/frontend/package-lock.json +7 -505
- data/frontend/tailwind.config.js +5 -0
- data/lib/metanorma/csa_document/root.rb +27 -0
- data/lib/metanorma/csa_document.rb +9 -0
- data/lib/metanorma/document/cli.rb +52 -0
- data/lib/metanorma/document/components/ancillary_blocks/sourcecode_body.rb +14 -0
- data/lib/metanorma/document/components/inline/comma_element.rb +3 -0
- data/lib/metanorma/document/components/inline/enum_comma_element.rb +3 -0
- data/lib/metanorma/document/components/inline/eref_element.rb +4 -1
- data/lib/metanorma/document/components/inline/fmt_termsource_element.rb +4 -2
- data/lib/metanorma/document/components/inline/math_element.rb +13 -7
- data/lib/metanorma/document/components/inline/semx_element.rb +7 -8
- data/lib/metanorma/document/components/inline/vocabulary.rb +4 -0
- data/lib/metanorma/document/components/multi_paragraph/admonition_block.rb +6 -1
- data/lib/metanorma/document/components/paragraphs/paragraph_block.rb +3 -0
- data/lib/metanorma/document/components/reference_elements/callout.rb +3 -2
- data/lib/metanorma/document/components/tables/table_cell.rb +3 -0
- data/lib/metanorma/document/elements/input.rb +44 -0
- data/lib/metanorma/document/elements.rb +1 -0
- data/lib/metanorma/document/relaton/address.rb +5 -0
- data/lib/metanorma/document/relaton/affiliation.rb +3 -0
- data/lib/metanorma/document/relaton/bib_item_size.rb +8 -9
- data/lib/metanorma/document/relaton/bib_item_type.rb +3 -0
- data/lib/metanorma/document/relaton/bibliographic_date.rb +5 -0
- data/lib/metanorma/document/relaton/contact_method.rb +5 -0
- data/lib/metanorma/document/relaton/contribution_info.rb +6 -2
- data/lib/metanorma/document/relaton/contributor.rb +4 -0
- data/lib/metanorma/document/relaton/contributor_role.rb +3 -0
- data/lib/metanorma/document/relaton/copyright_association.rb +3 -0
- data/lib/metanorma/document/relaton/copyright_owner.rb +3 -0
- data/lib/metanorma/document/relaton/date_time.rb +3 -0
- data/lib/metanorma/document/relaton/document_identifier.rb +4 -0
- data/lib/metanorma/document/relaton/document_relation.rb +8 -0
- data/lib/metanorma/document/relaton/document_status.rb +4 -0
- data/lib/metanorma/document/relaton/formatted_address.rb +4 -0
- data/lib/metanorma/document/relaton/full_name.rb +14 -3
- data/lib/metanorma/document/relaton/keyword_type.rb +3 -0
- data/lib/metanorma/document/relaton/locality_stack.rb +6 -9
- data/lib/metanorma/document/relaton/localized_name.rb +8 -5
- data/lib/metanorma/document/relaton/logo_element.rb +5 -0
- data/lib/metanorma/document/relaton/medium_type.rb +5 -16
- data/lib/metanorma/document/relaton/org_identifier.rb +2 -0
- data/lib/metanorma/document/relaton/org_subdivision.rb +2 -0
- data/lib/metanorma/document/relaton/org_subdivision_identifier.rb +2 -0
- data/lib/metanorma/document/relaton/organization.rb +3 -0
- data/lib/metanorma/document/relaton/person.rb +7 -1
- data/lib/metanorma/document/relaton/person_identifier.rb +3 -0
- data/lib/metanorma/document/relaton/place_type.rb +5 -0
- data/lib/metanorma/document/relaton/region_element.rb +3 -9
- data/lib/metanorma/document/relaton/relaton_collection.rb +2 -0
- data/lib/metanorma/document/relaton/series_type.rb +7 -0
- data/lib/metanorma/document/relaton/typed_note.rb +4 -0
- data/lib/metanorma/document/relaton/typed_title_string.rb +4 -0
- data/lib/metanorma/document/relaton/typed_uri.rb +3 -8
- data/lib/metanorma/document/relaton/validity_type.rb +8 -10
- data/lib/metanorma/document/relaton/variant_full_name.rb +3 -0
- data/lib/metanorma/document/relaton/variant_org_name.rb +3 -0
- data/lib/metanorma/document/relaton/version_info.rb +5 -0
- data/lib/metanorma/document/relaton/vocab_id_type.rb +6 -12
- data/lib/metanorma/document/relaton.rb +0 -14
- data/lib/metanorma/document/version.rb +1 -1
- data/lib/metanorma/document.rb +1 -0
- data/lib/metanorma/html/base_renderer.rb +133 -307
- data/lib/metanorma/html/component/base.rb +2 -9
- data/lib/metanorma/html/concerns/metadata_extraction.rb +61 -0
- data/lib/metanorma/html/concerns/presentation_validation.rb +61 -0
- data/lib/metanorma/html/concerns/svg_processing.rb +32 -0
- data/lib/metanorma/html/concerns/text_extraction.rb +93 -0
- data/lib/metanorma/html/concerns/toc_registry.rb +47 -0
- data/lib/metanorma/html/csa_renderer.rb +9 -0
- data/lib/metanorma/html/drops/figure_drop.rb +33 -10
- data/lib/metanorma/html/drops/sourcecode_drop.rb +3 -6
- data/lib/metanorma/html/flavor.rb +50 -0
- data/lib/metanorma/html/flavor_registry.rb +49 -0
- data/lib/metanorma/html/generator.rb +113 -29
- data/lib/metanorma/html/iso_renderer.rb +0 -142
- data/lib/metanorma/html/renderer_delegation.rb +21 -0
- data/lib/metanorma/html/renderers/block_renderer.rb +10 -0
- data/lib/metanorma/html/renderers/element_order_traversal.rb +48 -0
- data/lib/metanorma/html/renderers/inline_renderer.rb +49 -124
- data/lib/metanorma/html/renderers/pubid_renderer.rb +4 -26
- data/lib/metanorma/html/renderers.rb +2 -0
- data/lib/metanorma/html/standard_renderer.rb +198 -36
- data/lib/metanorma/html.rb +4 -51
- data/lib/metanorma/iso_document/sections/iso_preface.rb +27 -13
- data/lib/metanorma/mirror/default_registry.rb +21 -0
- data/lib/metanorma/mirror/handlers/inline/catalog.rb +52 -0
- data/lib/metanorma/mirror/handlers/inline/rich_html_renderer.rb +34 -35
- data/lib/metanorma/mirror/handlers/inline.rb +1 -0
- data/lib/metanorma/mirror/handlers/sourcecode.rb +1 -1
- data/lib/metanorma/mirror/model/guide.rb +3 -2
- data/lib/metanorma/mirror/output/formats/inline_format.rb +64 -3
- data/lib/metanorma/mirror/output/pipeline.rb +1 -0
- data/lib/metanorma/mirror/output.rb +0 -2
- data/lib/metanorma/mirror/rewriter.rb +3 -1
- data/lib/metanorma/mirror/transformer.rb +91 -3
- data/lib/metanorma/mirror.rb +0 -1
- data/lib/metanorma/registers/setup.rb +10 -0
- data/lib/metanorma/standard_document/annotation_container.rb +2 -0
- data/lib/metanorma/standard_document/elements/input.rb +4 -25
- data/lib/metanorma/standard_document/metadata/metanorma_extension.rb +12 -2
- data/lib/metanorma/standard_document/metadata/presentation_metadata.rb +107 -0
- data/lib/metanorma/standard_document/metadata/semantic_metadata.rb +18 -0
- data/lib/metanorma/standard_document/metadata/unitsml/amount_of_substance.rb +19 -0
- data/lib/metanorma/standard_document/metadata/unitsml/base_quantity.rb +34 -0
- data/lib/metanorma/standard_document/metadata/unitsml/dimension.rb +39 -0
- data/lib/metanorma/standard_document/metadata/unitsml/dimension_set.rb +19 -0
- data/lib/metanorma/standard_document/metadata/unitsml/electric_current.rb +19 -0
- data/lib/metanorma/standard_document/metadata/unitsml/enumerated_root_unit.rb +23 -0
- data/lib/metanorma/standard_document/metadata/unitsml/length.rb +19 -0
- data/lib/metanorma/standard_document/metadata/unitsml/luminous_intensity.rb +19 -0
- data/lib/metanorma/standard_document/metadata/unitsml/mass.rb +19 -0
- data/lib/metanorma/standard_document/metadata/unitsml/namespace.rb +17 -0
- data/lib/metanorma/standard_document/metadata/unitsml/plane_angle.rb +19 -0
- data/lib/metanorma/standard_document/metadata/unitsml/prefix.rb +30 -0
- data/lib/metanorma/standard_document/metadata/unitsml/prefix_name.rb +21 -0
- data/lib/metanorma/standard_document/metadata/unitsml/prefix_set.rb +19 -0
- data/lib/metanorma/standard_document/metadata/unitsml/prefix_symbol.rb +21 -0
- data/lib/metanorma/standard_document/metadata/unitsml/quantity.rb +28 -0
- data/lib/metanorma/standard_document/metadata/unitsml/quantity_name.rb +21 -0
- data/lib/metanorma/standard_document/metadata/unitsml/quantity_set.rb +19 -0
- data/lib/metanorma/standard_document/metadata/unitsml/root_units.rb +19 -0
- data/lib/metanorma/standard_document/metadata/unitsml/thermodynamic_temperature.rb +19 -0
- data/lib/metanorma/standard_document/metadata/unitsml/time.rb +19 -0
- data/lib/metanorma/standard_document/metadata/unitsml/unit.rb +32 -0
- data/lib/metanorma/standard_document/metadata/unitsml/unit_name.rb +21 -0
- data/lib/metanorma/standard_document/metadata/unitsml/unit_set.rb +19 -0
- data/lib/metanorma/standard_document/metadata/unitsml/unit_symbol.rb +36 -0
- data/lib/metanorma/standard_document/metadata/unitsml/unit_system.rb +23 -0
- data/lib/metanorma/standard_document/metadata/unitsml/unitsml_root.rb +28 -0
- data/lib/metanorma/standard_document/metadata/unitsml.rb +39 -0
- data/lib/metanorma/standard_document/metadata.rb +4 -0
- data/lib/metanorma/standard_document/sections/misc_container.rb +8 -6
- data/lib/metanorma/standard_document/sections/sections.rb +7 -0
- data/lib/metanorma/un_document/blocks/un_admonition_block.rb +86 -0
- data/lib/metanorma/un_document/blocks.rb +9 -0
- data/lib/metanorma/un_document/root.rb +8 -0
- data/lib/metanorma/un_document/sections/un_abstract_section.rb +48 -0
- data/lib/metanorma/un_document/sections/un_preface.rb +19 -2
- data/lib/metanorma/un_document/sections.rb +1 -0
- data/lib/metanorma/un_document/un_text_element.rb +116 -0
- data/lib/metanorma/un_document.rb +2 -0
- data/script/benchmark_render.rb +35 -0
- data/tasks/roundtrip_samples.rake +1 -1
- metadata +78 -50
- data/.rubocop_todo.yml +0 -327
- 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/docs/html-renderer.adoc +0 -261
- data/lib/data/dist/iso_document/frontend/assets/index-mwzbzmnK.js +0 -22
- data/lib/data/dist/iso_document/frontend/assets/index-pGvKTNid.css +0 -1
- data/lib/data/dist/iso_document/frontend/assets/iso-red.svg +0 -53
- data/lib/data/dist/iso_document/frontend/index.html +0 -13
- data/lib/metanorma/document/relaton/bib_item_size_type.rb +0 -21
- data/lib/metanorma/document/relaton/bibliographic_date_type.rb +0 -22
- data/lib/metanorma/document/relaton/document_relation_type.rb +0 -31
- data/lib/metanorma/document/relaton/iso4217_code.rb +0 -17
- data/lib/metanorma/document/relaton/iso8601_date.rb +0 -17
- data/lib/metanorma/document/relaton/personal_identifier_type.rb +0 -21
- data/lib/metanorma/document/relaton/region_type.rb +0 -20
- data/lib/metanorma/document/relaton/series_type_type.rb +0 -21
- data/lib/metanorma/document/relaton/specific_locality_type.rb +0 -25
- data/lib/metanorma/document/relaton/title_type.rb +0 -21
- data/lib/metanorma/mirror/metanorma_to_mirror.rb +0 -101
- 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/standard_document/annotation.rb +0 -37
|
@@ -1 +0,0 @@
|
|
|
1
|
-
*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:JetBrains Mono,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]:where(:not([hidden=until-found])){display:none}body{background-color:var(--color-background);color:var(--color-text);font-family:"Source Sans 3",system-ui,sans-serif}h1,h2,h3,h4,h5,h6{font-family:Crimson Pro,Georgia,serif}code,pre,.font-mono{font-family:JetBrains Mono,monospace}.mx-auto{margin-left:auto;margin-right:auto}.my-4{margin-top:1rem;margin-bottom:1rem}.my-6{margin-top:1.5rem;margin-bottom:1.5rem}.mb-12{margin-bottom:3rem}.mb-2{margin-bottom:.5rem}.mb-3{margin-bottom:.75rem}.mb-4{margin-bottom:1rem}.mb-8{margin-bottom:2rem}.ml-2{margin-left:.5rem}.mr-1{margin-right:.25rem}.mr-2{margin-right:.5rem}.mt-1{margin-top:.25rem}.mt-2{margin-top:.5rem}.mt-3{margin-top:.75rem}.mt-4{margin-top:1rem}.mt-6{margin-top:1.5rem}.mt-8{margin-top:2rem}.block{display:block}.flex{display:flex}.table{display:table}.contents{display:contents}.h-5{height:1.25rem}.h-6{height:1.5rem}.h-64{height:16rem}.h-8{height:2rem}.h-auto{height:auto}.h-full{height:100%}.min-h-screen{min-height:100vh}.w-5{width:1.25rem}.w-64{width:16rem}.w-auto{width:auto}.w-full{width:100%}.min-w-full{min-width:100%}.max-w-4xl{max-width:56rem}.max-w-md{max-width:28rem}.max-w-none{max-width:none}.flex-1{flex:1 1 0%}.flex-shrink-0{flex-shrink:0}.list-decimal{list-style-type:decimal}.list-disc{list-style-type:disc}.flex-col{flex-direction:column}.items-start{align-items:flex-start}.items-center{align-items:center}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-2{gap:.5rem}.gap-4{gap:1rem}.space-y-1>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.25rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.25rem * var(--tw-space-y-reverse))}.space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.5rem * var(--tw-space-y-reverse))}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.rounded-lg{border-radius:.5rem}.rounded-r{border-top-right-radius:.25rem;border-bottom-right-radius:.25rem}.border{border-width:1px}.border-b{border-bottom-width:1px}.border-l-2{border-left-width:2px}.border-l-4{border-left-width:4px}.border-r{border-right-width:1px}.border-t{border-top-width:1px}.border-\[var\(--color-accent\)\]{border-color:var(--color-accent)}.border-\[var\(--color-border\)\]{border-color:var(--color-border)}.border-blue-500{--tw-border-opacity: 1;border-color:rgb(59 130 246 / var(--tw-border-opacity, 1))}.border-yellow-500{--tw-border-opacity: 1;border-color:rgb(234 179 8 / var(--tw-border-opacity, 1))}.bg-\[var\(--color-background\)\]{background-color:var(--color-background)}.bg-\[var\(--color-surface\)\]{background-color:var(--color-surface)}.bg-blue-50{--tw-bg-opacity: 1;background-color:rgb(239 246 255 / var(--tw-bg-opacity, 1))}.bg-gray-50{--tw-bg-opacity: 1;background-color:rgb(249 250 251 / var(--tw-bg-opacity, 1))}.bg-gray-900{--tw-bg-opacity: 1;background-color:rgb(17 24 39 / var(--tw-bg-opacity, 1))}.bg-yellow-50{--tw-bg-opacity: 1;background-color:rgb(254 252 232 / var(--tw-bg-opacity, 1))}.p-2{padding:.5rem}.p-4{padding:1rem}.px-4{padding-left:1rem;padding-right:1rem}.px-8{padding-left:2rem;padding-right:2rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-12{padding-top:3rem;padding-bottom:3rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.pb-2{padding-bottom:.5rem}.pl-3{padding-left:.75rem}.pl-4{padding-left:1rem}.pl-6{padding-left:1.5rem}.text-left{text-align:left}.text-center{text-align:center}.font-heading{font-family:Crimson Pro,Georgia,serif}.font-mono{font-family:JetBrains Mono,monospace}.text-2xl{font-size:1.5rem;line-height:2rem}.text-3xl{font-size:1.875rem;line-height:2.25rem}.text-4xl{font-size:2.25rem;line-height:2.5rem}.text-base{font-size:1rem;line-height:1.5rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.text-xs{font-size:.75rem;line-height:1rem}.font-bold{font-weight:700}.font-medium{font-weight:500}.font-semibold{font-weight:600}.italic{font-style:italic}.leading-relaxed{line-height:1.625}.text-\[var\(--color-accent\)\]{color:var(--color-accent)}.text-\[var\(--color-primary\)\]{color:var(--color-primary)}.text-\[var\(--color-text\)\]{color:var(--color-text)}.text-\[var\(--color-text-secondary\)\]{color:var(--color-text-secondary)}.text-blue-600{--tw-text-opacity: 1;color:rgb(37 99 235 / var(--tw-text-opacity, 1))}.text-blue-700{--tw-text-opacity: 1;color:rgb(29 78 216 / var(--tw-text-opacity, 1))}.text-blue-900{--tw-text-opacity: 1;color:rgb(30 58 138 / var(--tw-text-opacity, 1))}.text-gray-100{--tw-text-opacity: 1;color:rgb(243 244 246 / var(--tw-text-opacity, 1))}.text-yellow-800{--tw-text-opacity: 1;color:rgb(133 77 14 / var(--tw-text-opacity, 1))}.text-yellow-900{--tw-text-opacity: 1;color:rgb(113 63 18 / var(--tw-text-opacity, 1))}.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}:root{--color-primary: #1e3a5f;--color-accent: #c9a227;--color-background: #fafafa;--color-surface: #ffffff;--color-text: #374151;--color-text-secondary: #6b7280;--color-border: #e5e7eb;--color-error: #dc2626;--color-warning: #d97706;--color-success: #059669}::-webkit-scrollbar{width:8px;height:8px}::-webkit-scrollbar-track{--tw-bg-opacity: 1;background-color:rgb(243 244 246 / var(--tw-bg-opacity, 1))}::-webkit-scrollbar-thumb{border-radius:.25rem;--tw-bg-opacity: 1;background-color:rgb(209 213 219 / var(--tw-bg-opacity, 1))}::-webkit-scrollbar-thumb:hover{--tw-bg-opacity: 1;background-color:rgb(156 163 175 / var(--tw-bg-opacity, 1))}@media print{body{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1));--tw-text-opacity: 1;color:rgb(0 0 0 / var(--tw-text-opacity, 1))}.no-print{display:none!important}}.hover\:bg-\[var\(--color-border\)\]:hover{background-color:var(--color-border)}.hover\:bg-gray-50:hover{--tw-bg-opacity: 1;background-color:rgb(249 250 251 / var(--tw-bg-opacity, 1))}.hover\:text-\[var\(--color-primary\)\]:hover{color:var(--color-primary)}.hover\:underline:hover{text-decoration-line:underline}
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
<?xml version="1.0" encoding="utf-8"?>
|
|
2
|
-
<!-- Generator: Adobe Illustrator 28.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
|
3
|
-
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
|
4
|
-
viewBox="0 0 217.3 200" style="enable-background:new 0 0 217.3 200;" xml:space="preserve">
|
|
5
|
-
<style type="text/css">
|
|
6
|
-
.st0{fill:#FFFFFF;}
|
|
7
|
-
.st1{fill:#E30613;}
|
|
8
|
-
</style>
|
|
9
|
-
<rect class="st0" width="217.2" height="200"/>
|
|
10
|
-
<g>
|
|
11
|
-
<path class="st1" d="M0,100v100h108.6h108.6V100V0H108.6H0V100z M112.7,23.1c5.2,0.2,11.4,1.2,16.9,2.8c17,4.9,31.5,15.4,42,30.4
|
|
12
|
-
c0.6,0.8,1,1.6,1,1.7c0,0.1-0.8,0.2-2.6,0.2h-2.6l-0.8-1.2c-2.3-3.2-6.9-8.3-9.9-11l-1.3-1.1l-3.1,0.8c-5.6,1.4-11.8,2.5-18,3.3
|
|
13
|
-
c-1.4,0.2-2.5,0.4-2.5,0.4c0,0.1,0.3,1,0.6,2c0.7,2.4,1.8,6.3,1.8,6.6c0,0.2-0.6,0.2-2.3,0.2h-2.3l-0.3-1.1
|
|
14
|
-
c-0.1-0.6-0.5-1.6-0.6-2.3c-0.6-2-1.5-4.8-1.6-4.9c-0.1-0.1-1.3-0.1-2.7,0c-1.4,0.1-5.3,0.3-8.7,0.4c-6.5,0.2-15.6,0-21.7-0.5
|
|
15
|
-
c-1.6-0.1-2.9-0.2-3-0.1c-0.1,0.1-1.5,4.3-2.1,6.6l-0.5,1.9h-2.3c-2.1,0-2.3,0-2.3-0.3c0-0.4,1-4.3,1.8-6.8c0.3-1,0.5-1.8,0.4-1.9
|
|
16
|
-
c-0.1-0.1-1-0.2-2.1-0.3c-5-0.6-12.3-1.9-17.9-3.3l-3.4-0.8l-1,0.8c-3,2.5-7.7,7.8-10.2,11.1l-1.1,1.5h-2.7c-1.5,0-2.7-0.1-2.7-0.1
|
|
17
|
-
c0-0.2,2.9-4.3,4.6-6.4c7.1-8.9,15.7-15.8,25.9-20.9c7.8-3.9,15.4-6.1,24.4-7.3c2.3-0.3,8.3-0.6,9.7-0.5
|
|
18
|
-
C109.6,23,111.2,23,112.7,23.1L112.7,23.1z M104,65.2c2.9,0.3,4.5,0.4,12.2,0.5l8.9,0.1v9.9v9.9h-7.9h-7.9l-0.1-2.2l-0.1-2.2
|
|
19
|
-
l-1.1-0.4c-3.2-1.3-7.4-1.9-12.1-2c-4.7,0-6.8,0.4-8.8,1.7c-2.1,1.3-2.4,4.1-0.6,5.8c1.8,1.8,4,2.4,13.7,3.6
|
|
20
|
-
c8.4,1.1,11.7,1.7,15.8,3.3c2,0.8,4.5,2.2,6,3.5c2.3,1.9,4.2,5,5,8.3c0.6,2.5,0.8,7.2,0.4,9.7c-0.8,4.3-2.4,7.4-5.4,10.2
|
|
21
|
-
c-3.2,3.1-7.3,5.1-13,6.3c-6.3,1.4-15.2,1.6-24.1,0.6c-3.1-0.3-4.8-0.4-12.2-0.5l-8.6-0.1v-9.8v-9.8H72h8v2v2l0.7,0.4
|
|
22
|
-
c2.3,1.2,7.1,2,12.2,2.2c8.7,0.2,12.6-1.3,12.7-5c0-1.4-0.4-2.2-1.6-3.1c-1.8-1.3-4.3-1.8-12.2-2.8c-9.5-1.2-13.3-2.1-17.4-4
|
|
23
|
-
c-6.6-3.1-9.9-7.9-10.5-15.4c-0.4-4,0.3-7.7,1.8-10.9c3.5-7.3,11.6-11.4,24-12.5C92.2,64.5,100.8,64.8,104,65.2L104,65.2z
|
|
24
|
-
M173.7,65c8.2,1.2,14.7,4.3,19.8,9.4c6.2,6.2,9.1,14.1,9.1,24.2c0,4.9-0.5,8.5-1.8,12.3c-4.3,13-15.5,20.8-31.3,21.7
|
|
25
|
-
c-8.3,0.5-16.7-1.2-22.7-4.4c-4.1-2.2-8.4-6.1-10.7-9.6c-2.8-4.3-4.6-9.2-5.3-15c-0.3-2.3-0.2-8.1,0.1-10.5
|
|
26
|
-
c1.5-11.4,7.6-20.1,17.4-24.7c4.1-1.9,8.5-3.1,14-3.7C164.2,64.5,171.7,64.7,173.7,65L173.7,65z M59.4,74.1v8.2h-5.3h-5.3v16.6
|
|
27
|
-
v16.6h5.3h5.3v8.2v8.2H38.2L17,131.6l-0.1-8.2v-8.1h5.3h5.3V98.8V82.2h-5.3H17V74v-8.1h21.3h21.3v8.2H59.4z M50.8,140.3
|
|
28
|
-
c2.3,3.3,7.5,9,10.3,11.5l1,0.9l3-0.7c5.8-1.4,11.5-2.5,17.4-3.2c1.8-0.2,3.3-0.4,3.4-0.4s-0.2-0.8-0.5-1.9
|
|
29
|
-
c-0.8-2.4-1.8-6.3-1.8-6.7c0-0.3,0.2-0.3,2.3-0.3h2.3l0.5,1.8c0.3,1,0.8,2.9,1.3,4.3l0.8,2.4l1-0.1c5.9-0.6,21.4-0.8,28.7-0.3
|
|
30
|
-
c2.3,0.1,4.7,0.3,5.3,0.3h1.2l0.6-1.9c0.3-1.1,0.9-2.9,1.2-4.1l0.6-2.2l2.3-0.1c1.5,0,2.3,0,2.3,0.1c0,0.3-1.6,6.1-2.1,7.5
|
|
31
|
-
l-0.5,1.3l0.6,0.1c0.3,0.1,1.6,0.2,2.9,0.4c5.4,0.7,12.1,2,17.2,3.2c2.6,0.7,2.9,0.7,3.3,0.5c0.9-0.6,4.9-4.5,6.8-6.7
|
|
32
|
-
c1.1-1.3,2.7-3.2,3.6-4.4l1.6-2.1h2.6c1.5,0,2.6,0.1,2.6,0.1c0,0.2-2.4,3.7-3.8,5.6c-12.7,16.4-31.4,26.8-52.2,29.1
|
|
33
|
-
c-3.4,0.4-13.3,0.3-16.6-0.1c-16.8-2.2-31-8.8-43.3-20.2c-4.2-3.9-9.5-10.3-11.8-14.3c-0.1-0.2,0.5-0.2,2.6-0.2h2.7L50.8,140.3z"/>
|
|
34
|
-
<path class="st1" d="M106.1,27.7c-4.3,1.5-8.3,6.1-12,13.7c-0.8,1.7-1.6,3.3-1.6,3.4c-0.1,0.3,0.1,0.3,0.8,0.4
|
|
35
|
-
c4.6,0.5,16.5,0.8,23,0.5c7.8-0.3,8.6-0.4,8.6-0.7c0-0.5-2.8-6-3.9-7.9c-2.4-3.9-4.8-6.6-7.2-8.2C111.2,27.2,108.6,26.8,106.1,27.7
|
|
36
|
-
L106.1,27.7z"/>
|
|
37
|
-
<path class="st1" d="M95.9,28.4C86,30.5,78,33.8,69.6,39.3c-2.1,1.3-2.7,1.9-2.2,1.9c0.1,0,1.3,0.3,2.6,0.6c4.5,1,13.7,2.5,17,2.8
|
|
38
|
-
l0.7,0.1l0.8-1.8c2.2-5.2,5.7-11,8.6-13.9c0.6-0.7,0.6-0.7,0.2-0.7C96.9,28.2,96.3,28.3,95.9,28.4L95.9,28.4z"/>
|
|
39
|
-
<path class="st1" d="M120.6,28.9c1.3,1.5,3.4,4.4,4.4,6.1c1.3,2.1,3.3,6,4.1,8.1l0.6,1.6l1.2-0.1c5.8-0.6,19.5-3,19.5-3.4
|
|
40
|
-
c0-0.1-1.2-0.9-2.6-1.9c-7.8-5.2-16.5-8.9-25.2-10.7C119.8,28,119.8,28,120.6,28.9z"/>
|
|
41
|
-
<path class="st1" d="M164.1,80.2c-6.1,0.9-9.7,5.3-10.8,13.2c-0.4,3.1-0.3,9.7,0.3,12.3c1.7,8.1,6.3,11.8,13.7,11.5
|
|
42
|
-
c3.9-0.2,6-1,8.3-3.3c3.2-3.2,4.5-7.6,4.5-15.2c0-6.2-0.9-10.2-3.1-13.5c-1.5-2.3-4-4-6.7-4.7C168.9,80.1,165.7,80,164.1,80.2
|
|
43
|
-
L164.1,80.2z"/>
|
|
44
|
-
<path class="st1" d="M100.8,151.9c-5,0.3-8.4,0.5-8.4,0.5c-0.1,0.1,2.2,4.9,3.4,7c2.6,4.5,5.2,7.5,7.8,9.2c1.7,1.1,2.8,1.5,4.5,1.6
|
|
45
|
-
s2.9-0.1,4.8-1.1c2.1-1.1,5.2-4.2,7.2-7.3c1.4-2.1,4.8-8.6,4.8-9.2c0-0.3-0.4-0.3-4-0.6C118,152,103.3,151.8,100.8,151.9
|
|
46
|
-
L100.8,151.9z"/>
|
|
47
|
-
<path class="st1" d="M85.6,153c-0.3,0-2.1,0.3-3.9,0.5c-4.4,0.6-7.9,1.2-11.8,2c-2.5,0.5-3.1,0.7-3,0.9c0.3,0.4,5.2,3.5,7.6,4.9
|
|
48
|
-
c6.3,3.5,13.1,6.1,20,7.5c1.4,0.3,2.7,0.6,2.8,0.6s-0.2-0.5-0.8-1.2c-3-3.4-5.8-8-8.1-13.3l-0.9-2h-0.7C86.5,153,86,153,85.6,153
|
|
49
|
-
L85.6,153z"/>
|
|
50
|
-
<path class="st1" d="M129.4,154.1c-0.7,1.7-3,6.3-4.2,8.2c-1.3,2.1-2.9,4.3-4.2,5.9c-0.6,0.7-1,1.2-1,1.3c0.2,0.2,6.5-1.3,9.8-2.4
|
|
51
|
-
c6-1.9,13.6-5.7,19.1-9.4l1.6-1.1l-1-0.2c-4.9-1.1-10.8-2.2-15.5-2.8c-1.6-0.2-3.2-0.4-3.6-0.5L129.4,154.1L129.4,154.1z"/>
|
|
52
|
-
</g>
|
|
53
|
-
</svg>
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
<!DOCTYPE html>
|
|
2
|
-
<html lang="en">
|
|
3
|
-
<head>
|
|
4
|
-
<meta charset="UTF-8">
|
|
5
|
-
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
6
|
-
<title>ISO Document</title>
|
|
7
|
-
<script type="module" crossorigin src="/assets/index-mwzbzmnK.js"></script>
|
|
8
|
-
<link rel="stylesheet" crossorigin href="/assets/index-pGvKTNid.css">
|
|
9
|
-
</head>
|
|
10
|
-
<body>
|
|
11
|
-
<div id="iso-document-app"></div>
|
|
12
|
-
</body>
|
|
13
|
-
</html>
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
module Metanorma
|
|
4
|
-
module Document
|
|
5
|
-
module Relaton
|
|
6
|
-
# Type of size of a bibliographic item.
|
|
7
|
-
class BibItemSizeType < Lutaml::Model::Serializable
|
|
8
|
-
attribute :value, :string
|
|
9
|
-
|
|
10
|
-
xml do
|
|
11
|
-
element "bib-item-size-type"
|
|
12
|
-
map_content to: :value
|
|
13
|
-
end
|
|
14
|
-
|
|
15
|
-
def self.values
|
|
16
|
-
%w[page volume time data value]
|
|
17
|
-
end
|
|
18
|
-
end
|
|
19
|
-
end
|
|
20
|
-
end
|
|
21
|
-
end
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
module Metanorma
|
|
4
|
-
module Document
|
|
5
|
-
module Relaton
|
|
6
|
-
# Indicates type of date within a bibliographic lifecycle.
|
|
7
|
-
class BibliographicDateType < Lutaml::Model::Serializable
|
|
8
|
-
attribute :value, :string
|
|
9
|
-
|
|
10
|
-
xml do
|
|
11
|
-
element "bibliographic-date-type"
|
|
12
|
-
map_content to: :value
|
|
13
|
-
end
|
|
14
|
-
|
|
15
|
-
def self.values
|
|
16
|
-
%w[published accessed created implemented obsoleted confirmed updated issued
|
|
17
|
-
transmitted copied unchanged circulated adapted voteStarted voteEnded announced]
|
|
18
|
-
end
|
|
19
|
-
end
|
|
20
|
-
end
|
|
21
|
-
end
|
|
22
|
-
end
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
module Metanorma
|
|
4
|
-
module Document
|
|
5
|
-
module Relaton
|
|
6
|
-
# Type of the relationship between a main document (described in `BibliographicItem`)
|
|
7
|
-
# and a target document.
|
|
8
|
-
class DocumentRelationType < Lutaml::Model::Serializable
|
|
9
|
-
attribute :value, :string
|
|
10
|
-
|
|
11
|
-
xml do
|
|
12
|
-
element "document-relation-type"
|
|
13
|
-
map_content to: :value
|
|
14
|
-
end
|
|
15
|
-
|
|
16
|
-
def self.values
|
|
17
|
-
%w[includes includedIn hasPart partOf merges mergedInto splits splitInto
|
|
18
|
-
instanceOf hasInstance exemplarOf hasExemplar manifestationOf hasManifestation
|
|
19
|
-
reproductionOf hasReproduction reprintOf hasReprint expressionOf hasExpression
|
|
20
|
-
translatedFrom hasTranslation arrangementOf hasArrangement abridgementOf
|
|
21
|
-
hasAbridgement annotationOf hasAnnotation draftOf hasDraft editionOf
|
|
22
|
-
hasEdition updates updatedBy derivedFrom derives describes describedBy
|
|
23
|
-
catalogues cataloguedBy hasSuccessor successorOf adaptedFrom hasAdaptation
|
|
24
|
-
adoptedFrom adoptedAs reviewOf hasReview commentaryOf hasCommentary
|
|
25
|
-
identical nonequivalent equivalent related complements complementOf
|
|
26
|
-
obsoletes obsoletedBy cites isCitedIn]
|
|
27
|
-
end
|
|
28
|
-
end
|
|
29
|
-
end
|
|
30
|
-
end
|
|
31
|
-
end
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
module Metanorma
|
|
4
|
-
module Document
|
|
5
|
-
module Relaton
|
|
6
|
-
# Code for currencies, as specified in <<iso4217>>.
|
|
7
|
-
class Iso4217Code < Lutaml::Model::Serializable
|
|
8
|
-
attribute :value, :string
|
|
9
|
-
|
|
10
|
-
xml do
|
|
11
|
-
element "iso4217-code"
|
|
12
|
-
map_content to: :value
|
|
13
|
-
end
|
|
14
|
-
end
|
|
15
|
-
end
|
|
16
|
-
end
|
|
17
|
-
end
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
module Metanorma
|
|
4
|
-
module Document
|
|
5
|
-
module Relaton
|
|
6
|
-
# Gregorian date, as specified in <<iso8601>>.
|
|
7
|
-
class Iso8601Date < Lutaml::Model::Serializable
|
|
8
|
-
attribute :value, :string
|
|
9
|
-
|
|
10
|
-
xml do
|
|
11
|
-
element "iso8601-date"
|
|
12
|
-
map_content to: :value
|
|
13
|
-
end
|
|
14
|
-
end
|
|
15
|
-
end
|
|
16
|
-
end
|
|
17
|
-
end
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
module Metanorma
|
|
4
|
-
module Document
|
|
5
|
-
module Relaton
|
|
6
|
-
# The international identifier scheme for the identifier of a person.
|
|
7
|
-
class PersonalIdentifierType < Lutaml::Model::Serializable
|
|
8
|
-
attribute :value, :string
|
|
9
|
-
|
|
10
|
-
xml do
|
|
11
|
-
element "personal-identifier-type"
|
|
12
|
-
map_content to: :value
|
|
13
|
-
end
|
|
14
|
-
|
|
15
|
-
def self.values
|
|
16
|
-
%w[Isni Orcid Uri]
|
|
17
|
-
end
|
|
18
|
-
end
|
|
19
|
-
end
|
|
20
|
-
end
|
|
21
|
-
end
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
module Metanorma
|
|
4
|
-
module Document
|
|
5
|
-
module Relaton
|
|
6
|
-
# Encoding of region with ISO 3166 encoding.
|
|
7
|
-
class RegionType < Lutaml::Model::Serializable
|
|
8
|
-
attribute :iso, :string
|
|
9
|
-
attribute :recommended, :boolean
|
|
10
|
-
attribute :content, :string
|
|
11
|
-
|
|
12
|
-
xml do
|
|
13
|
-
map_attribute "iso", to: :iso
|
|
14
|
-
map_attribute "recommended", to: :recommended
|
|
15
|
-
map_content to: :content
|
|
16
|
-
end
|
|
17
|
-
end
|
|
18
|
-
end
|
|
19
|
-
end
|
|
20
|
-
end
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
module Metanorma
|
|
4
|
-
module Document
|
|
5
|
-
module Relaton
|
|
6
|
-
# The type of series description given.
|
|
7
|
-
class SeriesTypeType < Lutaml::Model::Serializable
|
|
8
|
-
attribute :value, :string
|
|
9
|
-
|
|
10
|
-
xml do
|
|
11
|
-
element "series-type-type"
|
|
12
|
-
map_content to: :value
|
|
13
|
-
end
|
|
14
|
-
|
|
15
|
-
def self.values
|
|
16
|
-
%w[main alt]
|
|
17
|
-
end
|
|
18
|
-
end
|
|
19
|
-
end
|
|
20
|
-
end
|
|
21
|
-
end
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
module Metanorma
|
|
4
|
-
module Document
|
|
5
|
-
module Relaton
|
|
6
|
-
# Type of indicator of a location or extent within a bibliographic item.
|
|
7
|
-
#
|
|
8
|
-
# When the value `whole` or `title` is used, the corresponding `BibItemLocality`
|
|
9
|
-
# attribute `identifier` should be empty.
|
|
10
|
-
class SpecificLocalityType < Lutaml::Model::Serializable
|
|
11
|
-
attribute :value, :string
|
|
12
|
-
|
|
13
|
-
xml do
|
|
14
|
-
element "specific-locality-type"
|
|
15
|
-
map_content to: :value
|
|
16
|
-
end
|
|
17
|
-
|
|
18
|
-
def self.values
|
|
19
|
-
%w[section clause part paragraph chapter page whole table annex figure
|
|
20
|
-
note list example volume issue time anchor title line localityString]
|
|
21
|
-
end
|
|
22
|
-
end
|
|
23
|
-
end
|
|
24
|
-
end
|
|
25
|
-
end
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
module Metanorma
|
|
4
|
-
module Document
|
|
5
|
-
module Relaton
|
|
6
|
-
# Type of title given to a bibliographic item.
|
|
7
|
-
class TitleType < Lutaml::Model::Serializable
|
|
8
|
-
attribute :value, :string
|
|
9
|
-
|
|
10
|
-
xml do
|
|
11
|
-
element "title-type"
|
|
12
|
-
map_content to: :value
|
|
13
|
-
end
|
|
14
|
-
|
|
15
|
-
def self.values
|
|
16
|
-
%w[alternative original unofficial subtitle main]
|
|
17
|
-
end
|
|
18
|
-
end
|
|
19
|
-
end
|
|
20
|
-
end
|
|
21
|
-
end
|
|
@@ -1,101 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
module Metanorma
|
|
4
|
-
module Mirror
|
|
5
|
-
class MetanormaToMirror
|
|
6
|
-
attr_reader :registry, :id_strategy
|
|
7
|
-
|
|
8
|
-
def initialize(registry: Mirror.default_registry,
|
|
9
|
-
id_strategy: Mirror.DEFAULT_ID_STRATEGY)
|
|
10
|
-
@registry = registry
|
|
11
|
-
@id_strategy = id_strategy
|
|
12
|
-
end
|
|
13
|
-
|
|
14
|
-
def call(root)
|
|
15
|
-
attrs = {}
|
|
16
|
-
attrs[:flavor] = root.flavor if root.flavor
|
|
17
|
-
attrs[:type] = root.type if root.type
|
|
18
|
-
attrs[:schema_version] = root.schema_version if root.schema_version
|
|
19
|
-
|
|
20
|
-
title = extract_root_title(root)
|
|
21
|
-
attrs[:title] = title if title
|
|
22
|
-
|
|
23
|
-
content = []
|
|
24
|
-
|
|
25
|
-
preface = root.preface
|
|
26
|
-
if preface
|
|
27
|
-
result = @registry.handle(preface, context: self)
|
|
28
|
-
result.append_to(content)
|
|
29
|
-
end
|
|
30
|
-
|
|
31
|
-
sections = root.sections
|
|
32
|
-
if sections
|
|
33
|
-
result = @registry.handle(sections, context: self)
|
|
34
|
-
result.append_to(content)
|
|
35
|
-
end
|
|
36
|
-
|
|
37
|
-
annex = root.annex
|
|
38
|
-
annex&.each do |a|
|
|
39
|
-
result = @registry.handle(a, context: self)
|
|
40
|
-
result.append_to(content)
|
|
41
|
-
end
|
|
42
|
-
|
|
43
|
-
bibliography = root.bibliography
|
|
44
|
-
if bibliography
|
|
45
|
-
result = @registry.handle(bibliography, context: self)
|
|
46
|
-
result.append_to(content)
|
|
47
|
-
end
|
|
48
|
-
|
|
49
|
-
Handlers.build_node("doc", attrs: attrs, content: content)
|
|
50
|
-
end
|
|
51
|
-
|
|
52
|
-
def extract_blocks(element)
|
|
53
|
-
content = []
|
|
54
|
-
|
|
55
|
-
element.each_mixed_content do |node|
|
|
56
|
-
next if node.is_a?(String)
|
|
57
|
-
|
|
58
|
-
result = @registry.handle(node, context: self)
|
|
59
|
-
result.append_to(content)
|
|
60
|
-
end
|
|
61
|
-
content
|
|
62
|
-
end
|
|
63
|
-
|
|
64
|
-
def extract_section_children(element)
|
|
65
|
-
content = []
|
|
66
|
-
%i[clause terms definitions references floating_title].each do |attr|
|
|
67
|
-
collection = SafeAttr.read(element, attr)
|
|
68
|
-
next unless collection
|
|
69
|
-
|
|
70
|
-
collection.each do |child|
|
|
71
|
-
result = @registry.handle(child, context: self)
|
|
72
|
-
result.append_to(content)
|
|
73
|
-
end
|
|
74
|
-
end
|
|
75
|
-
content
|
|
76
|
-
end
|
|
77
|
-
|
|
78
|
-
def extract_named_collections(element, collection_attrs)
|
|
79
|
-
content = []
|
|
80
|
-
collection_attrs.each do |attr|
|
|
81
|
-
collection = SafeAttr.read(element, attr)
|
|
82
|
-
next unless collection
|
|
83
|
-
|
|
84
|
-
collection.each do |child|
|
|
85
|
-
result = @registry.handle(child, context: self)
|
|
86
|
-
result.append_to(content)
|
|
87
|
-
end
|
|
88
|
-
end
|
|
89
|
-
content
|
|
90
|
-
end
|
|
91
|
-
|
|
92
|
-
def text_node(text, marks: [])
|
|
93
|
-
Handlers.build_text(text, marks: marks)
|
|
94
|
-
end
|
|
95
|
-
|
|
96
|
-
def extract_root_title(root)
|
|
97
|
-
Metadata.title_from_bibdata(SafeAttr.read(root, :bibdata))
|
|
98
|
-
end
|
|
99
|
-
end
|
|
100
|
-
end
|
|
101
|
-
end
|
|
@@ -1,95 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
module Metanorma
|
|
4
|
-
module Mirror
|
|
5
|
-
module Output
|
|
6
|
-
class HtmlRenderer
|
|
7
|
-
include HtmlRenderers::StructuralRenderers
|
|
8
|
-
include HtmlRenderers::SectionRenderers
|
|
9
|
-
include HtmlRenderers::BlockRenderers
|
|
10
|
-
include HtmlRenderers::ListRenderers
|
|
11
|
-
include HtmlRenderers::TableRenderers
|
|
12
|
-
include HtmlRenderers::InlineRenderer
|
|
13
|
-
include HtmlRenderers::MarkRenderers
|
|
14
|
-
|
|
15
|
-
class << self
|
|
16
|
-
def node_handlers
|
|
17
|
-
@node_handlers ||= {}
|
|
18
|
-
end
|
|
19
|
-
|
|
20
|
-
def mark_handlers
|
|
21
|
-
@mark_handlers ||= {}
|
|
22
|
-
end
|
|
23
|
-
|
|
24
|
-
def register_node_handler(type, unbound_method)
|
|
25
|
-
node_handlers[type] = unbound_method
|
|
26
|
-
end
|
|
27
|
-
|
|
28
|
-
def register_mark_handler(mark_type, handler)
|
|
29
|
-
mark_handlers[mark_type] = handler
|
|
30
|
-
end
|
|
31
|
-
end
|
|
32
|
-
|
|
33
|
-
def initialize(guide, numbering: {})
|
|
34
|
-
@content = extract_content(guide)
|
|
35
|
-
@numbering = numbering
|
|
36
|
-
end
|
|
37
|
-
|
|
38
|
-
def render
|
|
39
|
-
render_nodes(@content)
|
|
40
|
-
end
|
|
41
|
-
|
|
42
|
-
def render_nodes(nodes, depth: 0)
|
|
43
|
-
nodes.filter_map { |node| render_node(node, depth:) }.join("\n")
|
|
44
|
-
end
|
|
45
|
-
|
|
46
|
-
def render_node(node, depth: 0)
|
|
47
|
-
case node
|
|
48
|
-
when String
|
|
49
|
-
HtmlRenderers.escape_text(node)
|
|
50
|
-
when Model::Text
|
|
51
|
-
render_text_node(node)
|
|
52
|
-
when Model::Container, Model::Leaf, Model::SoftBreak
|
|
53
|
-
render_typed_node(node, depth:)
|
|
54
|
-
else
|
|
55
|
-
""
|
|
56
|
-
end
|
|
57
|
-
end
|
|
58
|
-
|
|
59
|
-
def render_typed_node(node, depth: 0)
|
|
60
|
-
unbound = self.class.node_handlers[node.type]
|
|
61
|
-
return unbound.bind_call(self, node, depth:) if unbound
|
|
62
|
-
|
|
63
|
-
render_generic(node, depth:)
|
|
64
|
-
end
|
|
65
|
-
|
|
66
|
-
def render_generic(node, depth: 0)
|
|
67
|
-
children = node.content if node.is_a?(Model::Container)
|
|
68
|
-
return "" unless children && !children.empty?
|
|
69
|
-
|
|
70
|
-
render_children(node, depth:)
|
|
71
|
-
end
|
|
72
|
-
|
|
73
|
-
def render_children(node, depth: 0)
|
|
74
|
-
children = node.is_a?(Model::Container) ? node.content : []
|
|
75
|
-
render_nodes(children, depth:)
|
|
76
|
-
end
|
|
77
|
-
|
|
78
|
-
private
|
|
79
|
-
|
|
80
|
-
def extract_content(guide)
|
|
81
|
-
case guide
|
|
82
|
-
when Model::Guide
|
|
83
|
-
guide.content.is_a?(Model::Container) ? guide.content.content : Array(guide.content)
|
|
84
|
-
when Model::Container
|
|
85
|
-
guide.content
|
|
86
|
-
else
|
|
87
|
-
raise ArgumentError, "Unsupported guide type: #{guide.class}"
|
|
88
|
-
end
|
|
89
|
-
end
|
|
90
|
-
end
|
|
91
|
-
|
|
92
|
-
HtmlRenderers.register_all(HtmlRenderer)
|
|
93
|
-
end
|
|
94
|
-
end
|
|
95
|
-
end
|