@driftsys/markspec 0.4.0 → 0.6.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.
- package/README.md +74 -20
- package/esm/ast/build.d.ts +60 -0
- package/esm/ast/build.d.ts.map +1 -0
- package/esm/ast/build.js +516 -0
- package/esm/ast/equivalence.d.ts +18 -0
- package/esm/ast/equivalence.d.ts.map +1 -0
- package/esm/ast/equivalence.js +56 -0
- package/esm/ast/nodes.d.ts +189 -0
- package/esm/ast/nodes.d.ts.map +1 -0
- package/esm/ast/nodes.js +17 -0
- package/esm/ast/normalize.d.ts +58 -0
- package/esm/ast/normalize.d.ts.map +1 -0
- package/esm/ast/normalize.js +197 -0
- package/esm/ast/render.d.ts +34 -0
- package/esm/ast/render.d.ts.map +1 -0
- package/esm/ast/render.js +215 -0
- package/esm/compiler/constants.d.ts +16 -0
- package/esm/compiler/constants.d.ts.map +1 -0
- package/esm/compiler/constants.js +26 -0
- package/esm/compiler/discipline_classifier.d.ts +55 -0
- package/esm/compiler/discipline_classifier.d.ts.map +1 -0
- package/esm/compiler/discipline_classifier.js +191 -0
- package/esm/compiler/inverses.d.ts +2 -1
- package/esm/compiler/inverses.d.ts.map +1 -1
- package/esm/compiler/inverses.js +33 -14
- package/esm/compiler/manifest.d.ts +59 -0
- package/esm/compiler/manifest.d.ts.map +1 -0
- package/esm/compiler/manifest.js +48 -0
- package/esm/compiler/mod.d.ts +38 -1
- package/esm/compiler/mod.d.ts.map +1 -1
- package/esm/compiler/mod.js +202 -50
- package/esm/compiler/ndjson_writer.d.ts +50 -0
- package/esm/compiler/ndjson_writer.d.ts.map +1 -0
- package/esm/compiler/ndjson_writer.js +73 -0
- package/esm/compiler/schema.d.ts +33 -1
- package/esm/compiler/schema.d.ts.map +1 -1
- package/esm/compiler/schema.js +30 -9
- package/esm/config/markspec.d.ts +5 -0
- package/esm/config/markspec.d.ts.map +1 -1
- package/esm/config/markspec.js +17 -2
- package/esm/config/mod.d.ts.map +1 -1
- package/esm/config/mod.js +54 -0
- package/esm/formatter/mod.d.ts +55 -4
- package/esm/formatter/mod.d.ts.map +1 -1
- package/esm/formatter/mod.js +423 -46
- package/esm/formatter/synth_ulid.d.ts +21 -0
- package/esm/formatter/synth_ulid.d.ts.map +1 -0
- package/esm/formatter/synth_ulid.js +64 -0
- package/esm/lexicons/loader.d.ts +35 -0
- package/esm/lexicons/loader.d.ts.map +1 -0
- package/esm/lexicons/loader.js +51 -0
- package/esm/lexicons/mod.d.ts +13 -0
- package/esm/lexicons/mod.d.ts.map +1 -0
- package/esm/lexicons/mod.js +12 -0
- package/esm/lint/glossary.d.ts +45 -0
- package/esm/lint/glossary.d.ts.map +1 -0
- package/esm/lint/glossary.js +85 -0
- package/esm/lint/mod.d.ts +14 -0
- package/esm/lint/mod.d.ts.map +1 -0
- package/esm/lint/mod.js +9 -0
- package/esm/lint/range_util.d.ts +25 -0
- package/esm/lint/range_util.d.ts.map +1 -0
- package/esm/lint/range_util.js +50 -0
- package/esm/lint/rules/ears.d.ts +39 -0
- package/esm/lint/rules/ears.d.ts.map +1 -0
- package/esm/lint/rules/ears.js +316 -0
- package/esm/lint/rules/incose_sentence.d.ts +46 -0
- package/esm/lint/rules/incose_sentence.d.ts.map +1 -0
- package/esm/lint/rules/incose_sentence.js +417 -0
- package/esm/lint/rules/lexicon.d.ts +24 -0
- package/esm/lint/rules/lexicon.d.ts.map +1 -0
- package/esm/lint/rules/lexicon.js +236 -0
- package/esm/lint/rules/modal_sentence.d.ts +46 -0
- package/esm/lint/rules/modal_sentence.d.ts.map +1 -0
- package/esm/lint/rules/modal_sentence.js +146 -0
- package/esm/lint/rules/passive.d.ts +64 -0
- package/esm/lint/rules/passive.d.ts.map +1 -0
- package/esm/lint/rules/passive.js +282 -0
- package/esm/lint/rules/struct.d.ts +17 -0
- package/esm/lint/rules/struct.d.ts.map +1 -0
- package/esm/lint/rules/struct.js +55 -0
- package/esm/lint/rules/suppression.d.ts +54 -0
- package/esm/lint/rules/suppression.d.ts.map +1 -0
- package/esm/lint/rules/suppression.js +129 -0
- package/esm/lint/rules/xref.d.ts +19 -0
- package/esm/lint/rules/xref.d.ts.map +1 -0
- package/esm/lint/rules/xref.js +248 -0
- package/esm/lint/runner.d.ts +59 -0
- package/esm/lint/runner.d.ts.map +1 -0
- package/esm/lint/runner.js +153 -0
- package/esm/lint/score.d.ts +64 -0
- package/esm/lint/score.d.ts.map +1 -0
- package/esm/lint/score.js +163 -0
- package/esm/lint/segmenter.d.ts +32 -0
- package/esm/lint/segmenter.d.ts.map +1 -0
- package/esm/lint/segmenter.js +79 -0
- package/esm/lint/types.d.ts +31 -0
- package/esm/lint/types.d.ts.map +1 -0
- package/esm/lint/types.js +9 -0
- package/esm/lock/canonical_edges.d.ts +31 -0
- package/esm/lock/canonical_edges.d.ts.map +1 -0
- package/esm/lock/canonical_edges.js +57 -0
- package/esm/lock/check.d.ts +24 -0
- package/esm/lock/check.d.ts.map +1 -0
- package/esm/lock/check.js +127 -0
- package/esm/lock/hash.d.ts +12 -0
- package/esm/lock/hash.d.ts.map +1 -0
- package/esm/lock/hash.js +32 -0
- package/esm/lock/mod.d.ts +19 -0
- package/esm/lock/mod.d.ts.map +1 -0
- package/esm/lock/mod.js +14 -0
- package/esm/lock/model.d.ts +81 -0
- package/esm/lock/model.d.ts.map +1 -0
- package/esm/lock/model.js +7 -0
- package/esm/lock/parser.d.ts +26 -0
- package/esm/lock/parser.d.ts.map +1 -0
- package/esm/lock/parser.js +195 -0
- package/esm/lock/resolve.d.ts +142 -0
- package/esm/lock/resolve.d.ts.map +1 -0
- package/esm/lock/resolve.js +389 -0
- package/esm/lock/serializer.d.ts +14 -0
- package/esm/lock/serializer.d.ts.map +1 -0
- package/esm/lock/serializer.js +104 -0
- package/esm/mod.d.ts +28 -8
- package/esm/mod.d.ts.map +1 -1
- package/esm/mod.js +23 -4
- package/esm/model/attributes.d.ts +6 -0
- package/esm/model/attributes.d.ts.map +1 -1
- package/esm/model/attributes.js +200 -2
- package/esm/model/discipline.d.ts +53 -0
- package/esm/model/discipline.d.ts.map +1 -0
- package/esm/model/discipline.js +50 -0
- package/esm/model/discriminating_attr.d.ts +33 -0
- package/esm/model/discriminating_attr.d.ts.map +1 -0
- package/esm/model/discriminating_attr.js +74 -0
- package/esm/model/mod.d.ts +267 -14
- package/esm/model/mod.d.ts.map +1 -1
- package/esm/model/mod.js +99 -3
- package/esm/model/profile.d.ts +102 -27
- package/esm/model/profile.d.ts.map +1 -1
- package/esm/model/source_introspection.d.ts +26 -0
- package/esm/model/source_introspection.d.ts.map +1 -0
- package/esm/model/source_introspection.js +77 -0
- package/esm/model/type_hierarchy.d.ts +51 -0
- package/esm/model/type_hierarchy.d.ts.map +1 -0
- package/esm/model/type_hierarchy.js +126 -0
- package/esm/model/uri_scheme_map.d.ts +21 -0
- package/esm/model/uri_scheme_map.d.ts.map +1 -0
- package/esm/model/uri_scheme_map.js +66 -0
- package/esm/parser/attributes.d.ts.map +1 -1
- package/esm/parser/attributes.js +10 -16
- package/esm/parser/body_tokens.d.ts +35 -0
- package/esm/parser/body_tokens.d.ts.map +1 -0
- package/esm/parser/body_tokens.js +232 -0
- package/esm/parser/glossary.d.ts +51 -0
- package/esm/parser/glossary.d.ts.map +1 -0
- package/esm/parser/glossary.js +219 -0
- package/esm/parser/grammars.d.ts +5 -3
- package/esm/parser/grammars.d.ts.map +1 -1
- package/esm/parser/grammars.js +12 -4
- package/esm/parser/language_spec.d.ts +55 -0
- package/esm/parser/language_spec.d.ts.map +1 -0
- package/esm/parser/language_spec.js +419 -0
- package/esm/parser/line_map.d.ts +60 -0
- package/esm/parser/line_map.d.ts.map +1 -0
- package/esm/parser/line_map.js +41 -0
- package/esm/parser/markdown.d.ts +9 -0
- package/esm/parser/markdown.d.ts.map +1 -1
- package/esm/parser/markdown.js +317 -25
- package/esm/parser/mod.d.ts +5 -0
- package/esm/parser/mod.d.ts.map +1 -1
- package/esm/parser/mod.js +31 -8
- package/esm/parser/source.d.ts +53 -2
- package/esm/parser/source.d.ts.map +1 -1
- package/esm/parser/source.js +158 -68
- package/esm/parser/translate.d.ts +24 -0
- package/esm/parser/translate.d.ts.map +1 -0
- package/esm/parser/translate.js +99 -0
- package/esm/profile/chain.d.ts +8 -0
- package/esm/profile/chain.d.ts.map +1 -1
- package/esm/profile/chain.js +32 -14
- package/esm/profile/colors.js +1 -1
- package/esm/profile/default_profile.d.ts +25 -0
- package/esm/profile/default_profile.d.ts.map +1 -0
- package/esm/profile/default_profile.js +43 -0
- package/esm/profile/discipline_mode.d.ts +64 -0
- package/esm/profile/discipline_mode.d.ts.map +1 -0
- package/esm/profile/discipline_mode.js +133 -0
- package/esm/profile/discipline_registry.d.ts +41 -0
- package/esm/profile/discipline_registry.d.ts.map +1 -0
- package/esm/profile/discipline_registry.js +67 -0
- package/esm/profile/introspect.d.ts +135 -0
- package/esm/profile/introspect.d.ts.map +1 -0
- package/esm/profile/introspect.js +378 -0
- package/esm/profile/load.d.ts +3 -1
- package/esm/profile/load.d.ts.map +1 -1
- package/esm/profile/load.js +91 -5
- package/esm/profile/manifest.d.ts.map +1 -1
- package/esm/profile/manifest.js +512 -90
- package/esm/profile/merge.d.ts.map +1 -1
- package/esm/profile/merge.js +251 -39
- package/esm/profile/mod.d.ts +4 -4
- package/esm/profile/mod.d.ts.map +1 -1
- package/esm/profile/mod.js +7 -2
- package/esm/reporter/mod.js +4 -4
- package/esm/sync/locked_attributes.d.ts +19 -0
- package/esm/sync/locked_attributes.d.ts.map +1 -0
- package/esm/sync/locked_attributes.js +27 -0
- package/esm/sync/log.d.ts +34 -0
- package/esm/sync/log.d.ts.map +1 -0
- package/esm/sync/log.js +48 -0
- package/esm/sync/mapping.d.ts +66 -0
- package/esm/sync/mapping.d.ts.map +1 -0
- package/esm/sync/mapping.js +165 -0
- package/esm/sync/mod.d.ts +16 -0
- package/esm/sync/mod.d.ts.map +1 -0
- package/esm/sync/mod.js +12 -0
- package/esm/sync/status.d.ts +23 -0
- package/esm/sync/status.d.ts.map +1 -0
- package/esm/sync/status.js +21 -0
- package/esm/typl/ast.d.ts +87 -0
- package/esm/typl/ast.d.ts.map +1 -0
- package/esm/typl/ast.js +21 -0
- package/esm/typl/bridge.d.ts +32 -0
- package/esm/typl/bridge.d.ts.map +1 -0
- package/esm/typl/bridge.js +27 -0
- package/esm/typl/bullet.d.ts +34 -0
- package/esm/typl/bullet.d.ts.map +1 -0
- package/esm/typl/bullet.js +44 -0
- package/esm/typl/diagnostics.d.ts +43 -0
- package/esm/typl/diagnostics.d.ts.map +1 -0
- package/esm/typl/diagnostics.js +61 -0
- package/esm/typl/fence.d.ts +31 -0
- package/esm/typl/fence.d.ts.map +1 -0
- package/esm/typl/fence.js +24 -0
- package/esm/typl/grammar.d.ts +20 -0
- package/esm/typl/grammar.d.ts.map +1 -0
- package/esm/typl/grammar.js +471 -0
- package/esm/typl/inline.d.ts +34 -0
- package/esm/typl/inline.d.ts.map +1 -0
- package/esm/typl/inline.js +48 -0
- package/esm/typl/lexer.d.ts +37 -0
- package/esm/typl/lexer.d.ts.map +1 -0
- package/esm/typl/lexer.js +234 -0
- package/esm/typl/mod.d.ts +23 -0
- package/esm/typl/mod.d.ts.map +1 -0
- package/esm/typl/mod.js +16 -0
- package/esm/typl/registry.d.ts +42 -0
- package/esm/typl/registry.d.ts.map +1 -0
- package/esm/typl/registry.js +26 -0
- package/esm/typl/validator.d.ts +29 -0
- package/esm/typl/validator.d.ts.map +1 -0
- package/esm/typl/validator.js +141 -0
- package/esm/util/fence.d.ts +30 -0
- package/esm/util/fence.d.ts.map +1 -0
- package/esm/util/fence.js +40 -0
- package/esm/util/line_endings.d.ts +33 -0
- package/esm/util/line_endings.d.ts.map +1 -0
- package/esm/util/line_endings.js +53 -0
- package/esm/util/modals.d.ts +29 -0
- package/esm/util/modals.d.ts.map +1 -0
- package/esm/util/modals.js +38 -0
- package/esm/validator/attributes.d.ts +3 -3
- package/esm/validator/attributes.d.ts.map +1 -1
- package/esm/validator/attributes.js +1 -18
- package/esm/validator/body_blocks.d.ts +38 -0
- package/esm/validator/body_blocks.d.ts.map +1 -0
- package/esm/validator/body_blocks.js +218 -0
- package/esm/validator/caption_convention.d.ts +29 -0
- package/esm/validator/caption_convention.d.ts.map +1 -0
- package/esm/validator/caption_convention.js +58 -0
- package/esm/validator/captions.d.ts +22 -0
- package/esm/validator/captions.d.ts.map +1 -0
- package/esm/validator/captions.js +137 -0
- package/esm/validator/component_schemes.d.ts +73 -0
- package/esm/validator/component_schemes.d.ts.map +1 -0
- package/esm/validator/component_schemes.js +375 -0
- package/esm/validator/discipline.d.ts +35 -0
- package/esm/validator/discipline.d.ts.map +1 -0
- package/esm/validator/discipline.js +204 -0
- package/esm/validator/feature_ac.d.ts +28 -0
- package/esm/validator/feature_ac.d.ts.map +1 -0
- package/esm/validator/feature_ac.js +102 -0
- package/esm/validator/listing.d.ts +42 -0
- package/esm/validator/listing.d.ts.map +1 -0
- package/esm/validator/listing.js +295 -0
- package/esm/validator/mod.d.ts +3 -1
- package/esm/validator/mod.d.ts.map +1 -1
- package/esm/validator/mod.js +275 -13
- package/esm/validator/modal_keywords.d.ts +25 -0
- package/esm/validator/modal_keywords.d.ts.map +1 -0
- package/esm/validator/modal_keywords.js +54 -0
- package/esm/validator/pattern.d.ts +15 -8
- package/esm/validator/pattern.d.ts.map +1 -1
- package/esm/validator/pattern.js +42 -19
- package/esm/validator/per_type_attrs.d.ts +29 -0
- package/esm/validator/per_type_attrs.d.ts.map +1 -0
- package/esm/validator/per_type_attrs.js +75 -0
- package/esm/validator/pipeline.d.ts +18 -2
- package/esm/validator/pipeline.d.ts.map +1 -1
- package/esm/validator/pipeline.js +76 -21
- package/esm/validator/trace_types.d.ts +26 -0
- package/esm/validator/trace_types.d.ts.map +1 -0
- package/esm/validator/trace_types.js +232 -0
- package/esm/validator/traceability.d.ts +3 -4
- package/esm/validator/traceability.d.ts.map +1 -1
- package/esm/validator/traceability.js +5 -10
- package/esm/validator/type_resolution.d.ts +67 -0
- package/esm/validator/type_resolution.d.ts.map +1 -0
- package/esm/validator/type_resolution.js +162 -0
- package/esm/validator/types.d.ts +45 -0
- package/esm/validator/types.d.ts.map +1 -1
- package/esm/validator/types.js +128 -16
- package/esm/validator/value_types.d.ts +8 -0
- package/esm/validator/value_types.d.ts.map +1 -1
- package/esm/validator/value_types.js +8 -1
- package/package.json +2 -2
- package/script/ast/build.d.ts +60 -0
- package/script/ast/build.d.ts.map +1 -0
- package/script/ast/build.js +521 -0
- package/script/ast/equivalence.d.ts +18 -0
- package/script/ast/equivalence.d.ts.map +1 -0
- package/script/ast/equivalence.js +59 -0
- package/script/ast/nodes.d.ts +189 -0
- package/script/ast/nodes.d.ts.map +1 -0
- package/script/ast/nodes.js +18 -0
- package/script/ast/normalize.d.ts +58 -0
- package/script/ast/normalize.d.ts.map +1 -0
- package/script/ast/normalize.js +200 -0
- package/script/ast/render.d.ts +34 -0
- package/script/ast/render.d.ts.map +1 -0
- package/script/ast/render.js +218 -0
- package/script/compiler/constants.d.ts +16 -0
- package/script/compiler/constants.d.ts.map +1 -0
- package/script/compiler/constants.js +29 -0
- package/script/compiler/discipline_classifier.d.ts +55 -0
- package/script/compiler/discipline_classifier.d.ts.map +1 -0
- package/script/compiler/discipline_classifier.js +196 -0
- package/script/compiler/inverses.d.ts +2 -1
- package/script/compiler/inverses.d.ts.map +1 -1
- package/script/compiler/inverses.js +33 -14
- package/script/compiler/manifest.d.ts +59 -0
- package/script/compiler/manifest.d.ts.map +1 -0
- package/script/compiler/manifest.js +51 -0
- package/script/compiler/mod.d.ts +38 -1
- package/script/compiler/mod.d.ts.map +1 -1
- package/script/compiler/mod.js +206 -54
- package/script/compiler/ndjson_writer.d.ts +50 -0
- package/script/compiler/ndjson_writer.d.ts.map +1 -0
- package/script/compiler/ndjson_writer.js +78 -0
- package/script/compiler/schema.d.ts +33 -1
- package/script/compiler/schema.d.ts.map +1 -1
- package/script/compiler/schema.js +30 -8
- package/script/config/markspec.d.ts +5 -0
- package/script/config/markspec.d.ts.map +1 -1
- package/script/config/markspec.js +17 -2
- package/script/config/mod.d.ts.map +1 -1
- package/script/config/mod.js +54 -0
- package/script/formatter/mod.d.ts +55 -4
- package/script/formatter/mod.d.ts.map +1 -1
- package/script/formatter/mod.js +426 -46
- package/script/formatter/synth_ulid.d.ts +21 -0
- package/script/formatter/synth_ulid.d.ts.map +1 -0
- package/script/formatter/synth_ulid.js +67 -0
- package/script/lexicons/loader.d.ts +35 -0
- package/script/lexicons/loader.d.ts.map +1 -0
- package/script/lexicons/loader.js +55 -0
- package/script/lexicons/mod.d.ts +13 -0
- package/script/lexicons/mod.d.ts.map +1 -0
- package/script/lexicons/mod.js +17 -0
- package/script/lint/glossary.d.ts +45 -0
- package/script/lint/glossary.d.ts.map +1 -0
- package/script/lint/glossary.js +88 -0
- package/script/lint/mod.d.ts +14 -0
- package/script/lint/mod.d.ts.map +1 -0
- package/script/lint/mod.js +17 -0
- package/script/lint/range_util.d.ts +25 -0
- package/script/lint/range_util.d.ts.map +1 -0
- package/script/lint/range_util.js +53 -0
- package/script/lint/rules/ears.d.ts +39 -0
- package/script/lint/rules/ears.d.ts.map +1 -0
- package/script/lint/rules/ears.js +320 -0
- package/script/lint/rules/incose_sentence.d.ts +46 -0
- package/script/lint/rules/incose_sentence.d.ts.map +1 -0
- package/script/lint/rules/incose_sentence.js +421 -0
- package/script/lint/rules/lexicon.d.ts +24 -0
- package/script/lint/rules/lexicon.d.ts.map +1 -0
- package/script/lint/rules/lexicon.js +240 -0
- package/script/lint/rules/modal_sentence.d.ts +46 -0
- package/script/lint/rules/modal_sentence.d.ts.map +1 -0
- package/script/lint/rules/modal_sentence.js +150 -0
- package/script/lint/rules/passive.d.ts +64 -0
- package/script/lint/rules/passive.d.ts.map +1 -0
- package/script/lint/rules/passive.js +286 -0
- package/script/lint/rules/struct.d.ts +17 -0
- package/script/lint/rules/struct.d.ts.map +1 -0
- package/script/lint/rules/struct.js +59 -0
- package/script/lint/rules/suppression.d.ts +54 -0
- package/script/lint/rules/suppression.d.ts.map +1 -0
- package/script/lint/rules/suppression.js +136 -0
- package/script/lint/rules/xref.d.ts +19 -0
- package/script/lint/rules/xref.d.ts.map +1 -0
- package/script/lint/rules/xref.js +251 -0
- package/script/lint/runner.d.ts +59 -0
- package/script/lint/runner.d.ts.map +1 -0
- package/script/lint/runner.js +157 -0
- package/script/lint/score.d.ts +64 -0
- package/script/lint/score.d.ts.map +1 -0
- package/script/lint/score.js +167 -0
- package/script/lint/segmenter.d.ts +32 -0
- package/script/lint/segmenter.d.ts.map +1 -0
- package/script/lint/segmenter.js +82 -0
- package/script/lint/types.d.ts +31 -0
- package/script/lint/types.d.ts.map +1 -0
- package/script/lint/types.js +10 -0
- package/script/lock/canonical_edges.d.ts +31 -0
- package/script/lock/canonical_edges.d.ts.map +1 -0
- package/script/lock/canonical_edges.js +61 -0
- package/script/lock/check.d.ts +24 -0
- package/script/lock/check.d.ts.map +1 -0
- package/script/lock/check.js +130 -0
- package/script/lock/hash.d.ts +12 -0
- package/script/lock/hash.d.ts.map +1 -0
- package/script/lock/hash.js +36 -0
- package/script/lock/mod.d.ts +19 -0
- package/script/lock/mod.d.ts.map +1 -0
- package/script/lock/mod.js +31 -0
- package/script/lock/model.d.ts +81 -0
- package/script/lock/model.d.ts.map +1 -0
- package/script/lock/model.js +10 -0
- package/script/lock/parser.d.ts +26 -0
- package/script/lock/parser.d.ts.map +1 -0
- package/script/lock/parser.js +198 -0
- package/script/lock/resolve.d.ts +142 -0
- package/script/lock/resolve.d.ts.map +1 -0
- package/script/lock/resolve.js +397 -0
- package/script/lock/serializer.d.ts +14 -0
- package/script/lock/serializer.d.ts.map +1 -0
- package/script/lock/serializer.js +107 -0
- package/script/mod.d.ts +28 -8
- package/script/mod.d.ts.map +1 -1
- package/script/mod.js +129 -32
- package/script/model/attributes.d.ts +6 -0
- package/script/model/attributes.d.ts.map +1 -1
- package/script/model/attributes.js +201 -3
- package/script/model/discipline.d.ts +53 -0
- package/script/model/discipline.d.ts.map +1 -0
- package/script/model/discipline.js +53 -0
- package/script/model/discriminating_attr.d.ts +33 -0
- package/script/model/discriminating_attr.d.ts.map +1 -0
- package/script/model/discriminating_attr.js +77 -0
- package/script/model/mod.d.ts +267 -14
- package/script/model/mod.d.ts.map +1 -1
- package/script/model/mod.js +111 -3
- package/script/model/profile.d.ts +102 -27
- package/script/model/profile.d.ts.map +1 -1
- package/script/model/source_introspection.d.ts +26 -0
- package/script/model/source_introspection.d.ts.map +1 -0
- package/script/model/source_introspection.js +80 -0
- package/script/model/type_hierarchy.d.ts +51 -0
- package/script/model/type_hierarchy.d.ts.map +1 -0
- package/script/model/type_hierarchy.js +130 -0
- package/script/model/uri_scheme_map.d.ts +21 -0
- package/script/model/uri_scheme_map.d.ts.map +1 -0
- package/script/model/uri_scheme_map.js +69 -0
- package/script/parser/attributes.d.ts.map +1 -1
- package/script/parser/attributes.js +10 -16
- package/script/parser/body_tokens.d.ts +35 -0
- package/script/parser/body_tokens.d.ts.map +1 -0
- package/script/parser/body_tokens.js +235 -0
- package/script/parser/glossary.d.ts +51 -0
- package/script/parser/glossary.d.ts.map +1 -0
- package/script/parser/glossary.js +224 -0
- package/script/parser/grammars.d.ts +5 -3
- package/script/parser/grammars.d.ts.map +1 -1
- package/script/parser/grammars.js +15 -8
- package/script/parser/language_spec.d.ts +55 -0
- package/script/parser/language_spec.d.ts.map +1 -0
- package/script/parser/language_spec.js +423 -0
- package/script/parser/line_map.d.ts +60 -0
- package/script/parser/line_map.d.ts.map +1 -0
- package/script/parser/line_map.js +44 -0
- package/script/parser/markdown.d.ts +9 -0
- package/script/parser/markdown.d.ts.map +1 -1
- package/script/parser/markdown.js +315 -23
- package/script/parser/mod.d.ts +5 -0
- package/script/parser/mod.d.ts.map +1 -1
- package/script/parser/mod.js +36 -7
- package/script/parser/source.d.ts +53 -2
- package/script/parser/source.d.ts.map +1 -1
- package/script/parser/source.js +159 -69
- package/script/parser/translate.d.ts +24 -0
- package/script/parser/translate.d.ts.map +1 -0
- package/script/parser/translate.js +102 -0
- package/script/profile/chain.d.ts +8 -0
- package/script/profile/chain.d.ts.map +1 -1
- package/script/profile/chain.js +32 -14
- package/script/profile/colors.js +1 -1
- package/script/profile/default_profile.d.ts +25 -0
- package/script/profile/default_profile.d.ts.map +1 -0
- package/script/profile/default_profile.js +46 -0
- package/script/profile/discipline_mode.d.ts +64 -0
- package/script/profile/discipline_mode.d.ts.map +1 -0
- package/script/profile/discipline_mode.js +138 -0
- package/script/profile/discipline_registry.d.ts +41 -0
- package/script/profile/discipline_registry.d.ts.map +1 -0
- package/script/profile/discipline_registry.js +70 -0
- package/script/profile/introspect.d.ts +135 -0
- package/script/profile/introspect.d.ts.map +1 -0
- package/script/profile/introspect.js +381 -0
- package/script/profile/load.d.ts +3 -1
- package/script/profile/load.d.ts.map +1 -1
- package/script/profile/load.js +91 -5
- package/script/profile/manifest.d.ts.map +1 -1
- package/script/profile/manifest.js +511 -89
- package/script/profile/merge.d.ts.map +1 -1
- package/script/profile/merge.js +251 -39
- package/script/profile/mod.d.ts +4 -4
- package/script/profile/mod.d.ts.map +1 -1
- package/script/profile/mod.js +12 -6
- package/script/reporter/mod.js +4 -4
- package/script/sync/locked_attributes.d.ts +19 -0
- package/script/sync/locked_attributes.d.ts.map +1 -0
- package/script/sync/locked_attributes.js +30 -0
- package/script/sync/log.d.ts +34 -0
- package/script/sync/log.d.ts.map +1 -0
- package/script/sync/log.js +52 -0
- package/script/sync/mapping.d.ts +66 -0
- package/script/sync/mapping.d.ts.map +1 -0
- package/script/sync/mapping.js +169 -0
- package/script/sync/mod.d.ts +16 -0
- package/script/sync/mod.d.ts.map +1 -0
- package/script/sync/mod.js +21 -0
- package/script/sync/status.d.ts +23 -0
- package/script/sync/status.d.ts.map +1 -0
- package/script/sync/status.js +24 -0
- package/script/typl/ast.d.ts +87 -0
- package/script/typl/ast.d.ts.map +1 -0
- package/script/typl/ast.js +24 -0
- package/script/typl/bridge.d.ts +32 -0
- package/script/typl/bridge.d.ts.map +1 -0
- package/script/typl/bridge.js +30 -0
- package/script/typl/bullet.d.ts +34 -0
- package/script/typl/bullet.d.ts.map +1 -0
- package/script/typl/bullet.js +47 -0
- package/script/typl/diagnostics.d.ts +43 -0
- package/script/typl/diagnostics.d.ts.map +1 -0
- package/script/typl/diagnostics.js +65 -0
- package/script/typl/fence.d.ts +31 -0
- package/script/typl/fence.d.ts.map +1 -0
- package/script/typl/fence.js +27 -0
- package/script/typl/grammar.d.ts +20 -0
- package/script/typl/grammar.d.ts.map +1 -0
- package/script/typl/grammar.js +474 -0
- package/script/typl/inline.d.ts +34 -0
- package/script/typl/inline.d.ts.map +1 -0
- package/script/typl/inline.js +51 -0
- package/script/typl/lexer.d.ts +37 -0
- package/script/typl/lexer.d.ts.map +1 -0
- package/script/typl/lexer.js +237 -0
- package/script/typl/mod.d.ts +23 -0
- package/script/typl/mod.d.ts.map +1 -0
- package/script/typl/mod.js +29 -0
- package/script/typl/registry.d.ts +42 -0
- package/script/typl/registry.d.ts.map +1 -0
- package/script/typl/registry.js +29 -0
- package/script/typl/validator.d.ts +29 -0
- package/script/typl/validator.d.ts.map +1 -0
- package/script/typl/validator.js +144 -0
- package/script/util/fence.d.ts +30 -0
- package/script/util/fence.d.ts.map +1 -0
- package/script/util/fence.js +44 -0
- package/script/util/line_endings.d.ts +33 -0
- package/script/util/line_endings.d.ts.map +1 -0
- package/script/util/line_endings.js +58 -0
- package/script/util/modals.d.ts +29 -0
- package/script/util/modals.d.ts.map +1 -0
- package/script/util/modals.js +42 -0
- package/script/validator/attributes.d.ts +3 -3
- package/script/validator/attributes.d.ts.map +1 -1
- package/script/validator/attributes.js +1 -18
- package/script/validator/body_blocks.d.ts +38 -0
- package/script/validator/body_blocks.d.ts.map +1 -0
- package/script/validator/body_blocks.js +221 -0
- package/script/validator/caption_convention.d.ts +29 -0
- package/script/validator/caption_convention.d.ts.map +1 -0
- package/script/validator/caption_convention.js +61 -0
- package/script/validator/captions.d.ts +22 -0
- package/script/validator/captions.d.ts.map +1 -0
- package/script/validator/captions.js +140 -0
- package/script/validator/component_schemes.d.ts +73 -0
- package/script/validator/component_schemes.d.ts.map +1 -0
- package/script/validator/component_schemes.js +384 -0
- package/script/validator/discipline.d.ts +35 -0
- package/script/validator/discipline.d.ts.map +1 -0
- package/script/validator/discipline.js +207 -0
- package/script/validator/feature_ac.d.ts +28 -0
- package/script/validator/feature_ac.d.ts.map +1 -0
- package/script/validator/feature_ac.js +105 -0
- package/script/validator/listing.d.ts +42 -0
- package/script/validator/listing.d.ts.map +1 -0
- package/script/validator/listing.js +298 -0
- package/script/validator/mod.d.ts +3 -1
- package/script/validator/mod.d.ts.map +1 -1
- package/script/validator/mod.js +278 -14
- package/script/validator/modal_keywords.d.ts +25 -0
- package/script/validator/modal_keywords.d.ts.map +1 -0
- package/script/validator/modal_keywords.js +57 -0
- package/script/validator/pattern.d.ts +15 -8
- package/script/validator/pattern.d.ts.map +1 -1
- package/script/validator/pattern.js +42 -19
- package/script/validator/per_type_attrs.d.ts +29 -0
- package/script/validator/per_type_attrs.d.ts.map +1 -0
- package/script/validator/per_type_attrs.js +78 -0
- package/script/validator/pipeline.d.ts +18 -2
- package/script/validator/pipeline.d.ts.map +1 -1
- package/script/validator/pipeline.js +78 -22
- package/script/validator/trace_types.d.ts +26 -0
- package/script/validator/trace_types.d.ts.map +1 -0
- package/script/validator/trace_types.js +235 -0
- package/script/validator/traceability.d.ts +3 -4
- package/script/validator/traceability.d.ts.map +1 -1
- package/script/validator/traceability.js +5 -10
- package/script/validator/type_resolution.d.ts +67 -0
- package/script/validator/type_resolution.d.ts.map +1 -0
- package/script/validator/type_resolution.js +168 -0
- package/script/validator/types.d.ts +45 -0
- package/script/validator/types.d.ts.map +1 -1
- package/script/validator/types.js +131 -16
- package/script/validator/value_types.d.ts +8 -0
- package/script/validator/value_types.d.ts.map +1 -1
- package/script/validator/value_types.js +10 -2
package/script/model/mod.js
CHANGED
|
@@ -5,15 +5,102 @@
|
|
|
5
5
|
* MarkSpec document model — AST types, ID types, and project configuration.
|
|
6
6
|
*/
|
|
7
7
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
-
exports.VALUE_TYPES = exports.LIST_VALUE_TYPES = exports.ConfigError = exports.DEFAULT_PROJECT_CONFIG = exports.REFHUB_URL = exports.URI_SCHEME_RE = exports.ULID_RE = exports.IDENTITY_KEY = exports.PALETTE_HUES = exports.COLOR_NAME_RE = exports.UNIVERSAL_ATTRIBUTE_KEYS = exports.attributeSpec = exports.ATTRIBUTE_CATALOG = void 0;
|
|
8
|
+
exports.VALUE_TYPES = exports.LIST_VALUE_TYPES = exports.KNOWN_LINK_KINDS = exports.ConfigError = exports.DEFAULT_PROJECT_CONFIG = exports.REFHUB_URL = exports.URI_SCHEME_RE = exports.ULID_RE = exports.IDENTITY_KEY = exports.CORE_TYPES = exports.CORE_CONCRETE_TYPES = exports.CORE_ABSTRACT_TYPES = exports.MIXED_DISCIPLINE = exports.CORE_KINDS = exports.CORE_DISCIPLINE_REGISTRY = exports.inferTypeFromDiscriminatingAttr = exports.inferTypeFromSource = exports.inferTypeFromUriScheme = exports.CORE_TYPE_SCOPED_ATTRS = exports.CORE_TYPE_HIERARCHY = exports.attributesForType = exports.PALETTE_HUES = exports.COLOR_NAME_RE = exports.UNIVERSAL_ATTRIBUTE_KEYS = exports.CSV_SPLITTABLE_TYPES = exports.attributeSpec = exports.ATTRIBUTE_CATALOG = void 0;
|
|
9
|
+
exports.makeDisplayId = makeDisplayId;
|
|
10
|
+
exports.makeUlid = makeUlid;
|
|
9
11
|
exports.shapeFromIdValue = shapeFromIdValue;
|
|
10
12
|
var attributes_js_1 = require("./attributes.js");
|
|
11
13
|
Object.defineProperty(exports, "ATTRIBUTE_CATALOG", { enumerable: true, get: function () { return attributes_js_1.ATTRIBUTE_CATALOG; } });
|
|
12
14
|
Object.defineProperty(exports, "attributeSpec", { enumerable: true, get: function () { return attributes_js_1.attributeSpec; } });
|
|
15
|
+
Object.defineProperty(exports, "CSV_SPLITTABLE_TYPES", { enumerable: true, get: function () { return attributes_js_1.CSV_SPLITTABLE_TYPES; } });
|
|
13
16
|
Object.defineProperty(exports, "UNIVERSAL_ATTRIBUTE_KEYS", { enumerable: true, get: function () { return attributes_js_1.UNIVERSAL_ATTRIBUTE_KEYS; } });
|
|
14
17
|
var palette_js_1 = require("./palette.js");
|
|
15
18
|
Object.defineProperty(exports, "COLOR_NAME_RE", { enumerable: true, get: function () { return palette_js_1.COLOR_NAME_RE; } });
|
|
16
19
|
Object.defineProperty(exports, "PALETTE_HUES", { enumerable: true, get: function () { return palette_js_1.PALETTE_HUES; } });
|
|
20
|
+
var type_hierarchy_js_1 = require("./type_hierarchy.js");
|
|
21
|
+
Object.defineProperty(exports, "attributesForType", { enumerable: true, get: function () { return type_hierarchy_js_1.attributesForType; } });
|
|
22
|
+
Object.defineProperty(exports, "CORE_TYPE_HIERARCHY", { enumerable: true, get: function () { return type_hierarchy_js_1.CORE_TYPE_HIERARCHY; } });
|
|
23
|
+
Object.defineProperty(exports, "CORE_TYPE_SCOPED_ATTRS", { enumerable: true, get: function () { return type_hierarchy_js_1.CORE_TYPE_SCOPED_ATTRS; } });
|
|
24
|
+
var uri_scheme_map_js_1 = require("./uri_scheme_map.js");
|
|
25
|
+
Object.defineProperty(exports, "inferTypeFromUriScheme", { enumerable: true, get: function () { return uri_scheme_map_js_1.inferTypeFromUriScheme; } });
|
|
26
|
+
var source_introspection_js_1 = require("./source_introspection.js");
|
|
27
|
+
Object.defineProperty(exports, "inferTypeFromSource", { enumerable: true, get: function () { return source_introspection_js_1.inferTypeFromSource; } });
|
|
28
|
+
var discriminating_attr_js_1 = require("./discriminating_attr.js");
|
|
29
|
+
Object.defineProperty(exports, "inferTypeFromDiscriminatingAttr", { enumerable: true, get: function () { return discriminating_attr_js_1.inferTypeFromDiscriminatingAttr; } });
|
|
30
|
+
// Re-export discipline primitives (ADR-017 / ADR-018).
|
|
31
|
+
var discipline_js_1 = require("./discipline.js");
|
|
32
|
+
Object.defineProperty(exports, "CORE_DISCIPLINE_REGISTRY", { enumerable: true, get: function () { return discipline_js_1.CORE_DISCIPLINE_REGISTRY; } });
|
|
33
|
+
Object.defineProperty(exports, "CORE_KINDS", { enumerable: true, get: function () { return discipline_js_1.CORE_KINDS; } });
|
|
34
|
+
Object.defineProperty(exports, "MIXED_DISCIPLINE", { enumerable: true, get: function () { return discipline_js_1.MIXED_DISCIPLINE; } });
|
|
35
|
+
/**
|
|
36
|
+
* Cast a plain string to a branded `DisplayId`.
|
|
37
|
+
*
|
|
38
|
+
* This is a zero-cost assertion — no validation is performed. The caller
|
|
39
|
+
* asserts that `s` is a syntactically valid display ID.
|
|
40
|
+
*/
|
|
41
|
+
function makeDisplayId(s) {
|
|
42
|
+
return s;
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Cast a plain string to a branded `Ulid`.
|
|
46
|
+
*
|
|
47
|
+
* This is a zero-cost assertion — no validation is performed. The caller
|
|
48
|
+
* asserts that `s` is a syntactically valid 26-character Crockford base32
|
|
49
|
+
* ULID.
|
|
50
|
+
*/
|
|
51
|
+
function makeUlid(s) {
|
|
52
|
+
return s;
|
|
53
|
+
}
|
|
54
|
+
// ---------------------------------------------------------------------------
|
|
55
|
+
// Core type taxonomy (ADR-003 §Part 1, spec §1.3)
|
|
56
|
+
// ---------------------------------------------------------------------------
|
|
57
|
+
/**
|
|
58
|
+
* Core abstract item types. Always valid as `Type:` values regardless of
|
|
59
|
+
* which profile is loaded (core-only mode included). Convention: TitleCase.
|
|
60
|
+
*
|
|
61
|
+
* - `Item` is the abstract root and serves as the bottom fallback in the
|
|
62
|
+
* type-resolution chain (§1.3.1 step 8).
|
|
63
|
+
* - `Specification`, `Component`, `Unit` are abstract+concrete parents:
|
|
64
|
+
* instantiable as direct fallbacks when no concrete subtype fits, and
|
|
65
|
+
* roots for both core concrete subtypes and profile-declared extensions.
|
|
66
|
+
*/
|
|
67
|
+
exports.CORE_ABSTRACT_TYPES = [
|
|
68
|
+
"Item",
|
|
69
|
+
"Specification",
|
|
70
|
+
"Component",
|
|
71
|
+
"Unit",
|
|
72
|
+
];
|
|
73
|
+
/**
|
|
74
|
+
* Core concrete item types (ADR-003 §Part 1). Twelve subtypes plus three
|
|
75
|
+
* abstract+concrete parents from {@linkcode CORE_ABSTRACT_TYPES} make up
|
|
76
|
+
* the "15 concrete instantiable types" the spec describes.
|
|
77
|
+
*/
|
|
78
|
+
exports.CORE_CONCRETE_TYPES = [
|
|
79
|
+
// Specification subtypes
|
|
80
|
+
"Requirement",
|
|
81
|
+
"Test",
|
|
82
|
+
"Contract",
|
|
83
|
+
"Record",
|
|
84
|
+
"Risk",
|
|
85
|
+
// Component subtypes
|
|
86
|
+
"SoftwareComponent",
|
|
87
|
+
"HardwareComponent",
|
|
88
|
+
"SoftwareInterface",
|
|
89
|
+
"HardwareInterface",
|
|
90
|
+
// Unit subtypes
|
|
91
|
+
"SoftwareUnit",
|
|
92
|
+
"HardwareUnit",
|
|
93
|
+
// Definition (standalone under Item)
|
|
94
|
+
"Definition",
|
|
95
|
+
];
|
|
96
|
+
/**
|
|
97
|
+
* All core type names. Accepted as `Type:` values in core-only mode and
|
|
98
|
+
* when any profile is loaded. Profile-declared types extend this set.
|
|
99
|
+
*/
|
|
100
|
+
exports.CORE_TYPES = new Set([
|
|
101
|
+
...exports.CORE_ABSTRACT_TYPES,
|
|
102
|
+
...exports.CORE_CONCRETE_TYPES,
|
|
103
|
+
]);
|
|
17
104
|
/** Core-reserved identity attribute name. */
|
|
18
105
|
exports.IDENTITY_KEY = "Id";
|
|
19
106
|
/** Regex matching a bare ULID (identified-entry `Id:` value). */
|
|
@@ -34,9 +121,9 @@ exports.URI_SCHEME_RE = /^[A-Za-z][A-Za-z0-9+\-.]*:/;
|
|
|
34
121
|
*/
|
|
35
122
|
function shapeFromIdValue(value) {
|
|
36
123
|
if (exports.ULID_RE.test(value))
|
|
37
|
-
return "
|
|
124
|
+
return "Authored";
|
|
38
125
|
if (exports.URI_SCHEME_RE.test(value))
|
|
39
|
-
return "
|
|
126
|
+
return "Reference";
|
|
40
127
|
return undefined;
|
|
41
128
|
}
|
|
42
129
|
// ---------------------------------------------------------------------------
|
|
@@ -51,6 +138,7 @@ exports.DEFAULT_PROJECT_CONFIG = {
|
|
|
51
138
|
labels: [],
|
|
52
139
|
parents: [],
|
|
53
140
|
parentFallback: exports.REFHUB_URL,
|
|
141
|
+
captionConventions: {},
|
|
54
142
|
};
|
|
55
143
|
/** Error thrown when `project.yaml` is invalid. */
|
|
56
144
|
class ConfigError extends Error {
|
|
@@ -81,6 +169,26 @@ class ConfigError extends Error {
|
|
|
81
169
|
}
|
|
82
170
|
}
|
|
83
171
|
exports.ConfigError = ConfigError;
|
|
172
|
+
/**
|
|
173
|
+
* Built-in link kinds recognized by the core compiler and shipped profiles.
|
|
174
|
+
*
|
|
175
|
+
* Consumers that need to validate or enumerate the core-defined relation
|
|
176
|
+
* vocabulary should use this constant rather than hard-coding string literals.
|
|
177
|
+
* Profile-declared kinds extend this set at runtime.
|
|
178
|
+
*/
|
|
179
|
+
exports.KNOWN_LINK_KINDS = [
|
|
180
|
+
"satisfies",
|
|
181
|
+
"derived-from",
|
|
182
|
+
"references",
|
|
183
|
+
"allocated-to",
|
|
184
|
+
"realizes",
|
|
185
|
+
"verifies",
|
|
186
|
+
"tests",
|
|
187
|
+
"depends-on",
|
|
188
|
+
"part-of",
|
|
189
|
+
"generated-from",
|
|
190
|
+
"supersedes",
|
|
191
|
+
];
|
|
84
192
|
var profile_js_1 = require("./profile.js");
|
|
85
193
|
Object.defineProperty(exports, "LIST_VALUE_TYPES", { enumerable: true, get: function () { return profile_js_1.LIST_VALUE_TYPES; } });
|
|
86
194
|
Object.defineProperty(exports, "VALUE_TYPES", { enumerable: true, get: function () { return profile_js_1.VALUE_TYPES; } });
|
|
@@ -4,7 +4,6 @@
|
|
|
4
4
|
* Profile data model — TypeScript types that mirror ADR-008 §4 manifest
|
|
5
5
|
* schema. Used by the profile loader, merger, and validator.
|
|
6
6
|
*/
|
|
7
|
-
import type { EntryShape } from "./mod.js";
|
|
8
7
|
/** All 14 attribute value-type keywords recognized by the core. */
|
|
9
8
|
export declare const VALUE_TYPES: readonly ["id", "id-list", "uri", "url", "path", "path-or-id", "enum", "tag-list", "text", "citation", "external-id", "integer", "date", "boolean"];
|
|
10
9
|
export type ValueType = typeof VALUE_TYPES[number];
|
|
@@ -28,21 +27,50 @@ export interface AttrDecl {
|
|
|
28
27
|
readonly cardinality: Cardinality;
|
|
29
28
|
readonly values?: readonly string[];
|
|
30
29
|
readonly inverse?: InverseDecl;
|
|
30
|
+
readonly description?: string;
|
|
31
31
|
}
|
|
32
32
|
/** Target matcher: either a type name or a shape matcher object. */
|
|
33
33
|
export type TargetMatcher = string | {
|
|
34
|
-
readonly shape: "
|
|
34
|
+
readonly shape: "Authored" | "Reference";
|
|
35
35
|
};
|
|
36
36
|
/** Traceability rule declared on a shape or type scope. */
|
|
37
37
|
export interface TraceRule {
|
|
38
38
|
readonly target: readonly TargetMatcher[];
|
|
39
39
|
readonly cardinality?: Cardinality;
|
|
40
40
|
readonly required: boolean;
|
|
41
|
+
readonly description?: string;
|
|
42
|
+
}
|
|
43
|
+
export type LabelConcernKind = "enum" | "set" | "flag";
|
|
44
|
+
export interface LabelValue {
|
|
45
|
+
readonly name: string;
|
|
46
|
+
readonly description?: string;
|
|
47
|
+
}
|
|
48
|
+
export interface LabelConcern {
|
|
49
|
+
readonly name: string;
|
|
50
|
+
readonly kind: LabelConcernKind;
|
|
51
|
+
readonly description?: string;
|
|
52
|
+
readonly values: readonly LabelValue[];
|
|
53
|
+
}
|
|
54
|
+
export interface ProfileConvention {
|
|
55
|
+
readonly name: string;
|
|
56
|
+
readonly settings: Readonly<Record<string, string>>;
|
|
57
|
+
readonly description?: string;
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* Resolved discipline mode per ADR-017 Slice 5. The mode shapes
|
|
61
|
+
* downstream behaviour (Doctor reporting, LSP scaffold ordering,
|
|
62
|
+
* Slice 4 mixed-allocation rule activation).
|
|
63
|
+
*/
|
|
64
|
+
export type DisciplineMode = "flat" | "tiered" | "none";
|
|
65
|
+
/** A profile-declared discipline kind. */
|
|
66
|
+
export interface KindDecl {
|
|
67
|
+
readonly description?: string;
|
|
41
68
|
}
|
|
42
69
|
export type EnforcementMode = "off" | "warn" | "error";
|
|
43
70
|
export interface TypeDef {
|
|
44
71
|
readonly name: string;
|
|
45
|
-
|
|
72
|
+
/** The core type this profile type extends (e.g., "Requirement", "Test"). */
|
|
73
|
+
readonly extends: string;
|
|
46
74
|
readonly displayIdPattern?: string;
|
|
47
75
|
readonly displayIdPatternEnforcement: EnforcementMode;
|
|
48
76
|
readonly required: readonly string[];
|
|
@@ -50,6 +78,13 @@ export interface TypeDef {
|
|
|
50
78
|
readonly traceability: ReadonlyMap<string, TraceRule>;
|
|
51
79
|
/** Optional semantic color-role name (key into `ProfileManifest.colors`). */
|
|
52
80
|
readonly color?: string;
|
|
81
|
+
readonly description?: string;
|
|
82
|
+
/**
|
|
83
|
+
* Discipline kind explicitly assigned to this type. When absent, the
|
|
84
|
+
* effective discipline registry auto-inherits from the type's `extends:`
|
|
85
|
+
* ancestor (see core/profile/discipline_registry.ts).
|
|
86
|
+
*/
|
|
87
|
+
readonly discipline?: string;
|
|
53
88
|
}
|
|
54
89
|
export interface DocTypeDef {
|
|
55
90
|
readonly id: string;
|
|
@@ -70,17 +105,21 @@ export type ProfileSpecifier = {
|
|
|
70
105
|
readonly scope?: string;
|
|
71
106
|
readonly name: string;
|
|
72
107
|
readonly range: string;
|
|
108
|
+
} | {
|
|
109
|
+
readonly kind: "builtin";
|
|
73
110
|
};
|
|
74
111
|
/** Parsed `markspec.yaml` content — the manifest authored in a profile. */
|
|
75
112
|
export interface ProfileManifest {
|
|
76
113
|
readonly id: string;
|
|
77
114
|
readonly version: string;
|
|
115
|
+
/** The `markspec-schema:` pin declaring the core schema version targeted. */
|
|
116
|
+
readonly markspecSchema?: string;
|
|
78
117
|
readonly description?: string;
|
|
79
118
|
readonly license?: string;
|
|
80
119
|
readonly extends?: ProfileSpecifier;
|
|
81
|
-
readonly universalRequired: readonly string[];
|
|
82
120
|
readonly universalAttributes: readonly AttrDecl[];
|
|
83
|
-
readonly labels: readonly
|
|
121
|
+
readonly labels: readonly LabelConcern[];
|
|
122
|
+
readonly conventions: readonly ProfileConvention[];
|
|
84
123
|
/**
|
|
85
124
|
* Semantic color-role bindings authored on this manifest.
|
|
86
125
|
* Maps a profile-author-chosen name (e.g. "primary") to a palette hue
|
|
@@ -88,20 +127,36 @@ export interface ProfileManifest {
|
|
|
88
127
|
* Empty when the manifest does not declare `profile.colors:`.
|
|
89
128
|
*/
|
|
90
129
|
readonly colors: ReadonlyMap<string, string>;
|
|
91
|
-
readonly identified: {
|
|
92
|
-
readonly required: readonly string[];
|
|
93
|
-
readonly attributes: readonly AttrDecl[];
|
|
94
|
-
readonly traceability: ReadonlyMap<string, TraceRule>;
|
|
95
|
-
};
|
|
96
|
-
readonly referenced: {
|
|
97
|
-
readonly required: readonly string[];
|
|
98
|
-
readonly attributes: readonly AttrDecl[];
|
|
99
|
-
};
|
|
100
130
|
readonly types: ReadonlyMap<string, TypeDef>;
|
|
101
131
|
readonly documents: {
|
|
102
132
|
readonly types: readonly DocTypeDef[];
|
|
103
133
|
readonly frontMatter: readonly AttrDecl[];
|
|
104
134
|
};
|
|
135
|
+
/**
|
|
136
|
+
* Profile-declared discipline kinds (ADR-017 Invariant 2). Maps kind
|
|
137
|
+
* name → declaration metadata. Empty when the manifest does not declare
|
|
138
|
+
* `profile.kinds:`.
|
|
139
|
+
*/
|
|
140
|
+
readonly kinds: ReadonlyMap<string, KindDecl>;
|
|
141
|
+
/**
|
|
142
|
+
* Prose-analysis configuration. All lexicon lists are additive across
|
|
143
|
+
* the profile chain (parent entries first, child entries appended,
|
|
144
|
+
* duplicates dropped).
|
|
145
|
+
*/
|
|
146
|
+
readonly prose: {
|
|
147
|
+
readonly lexicons: {
|
|
148
|
+
/** Extra tokens that are never flagged as undefined capitalized terms. */
|
|
149
|
+
readonly "capitalized-allow": readonly string[];
|
|
150
|
+
/** Extra abbreviation tokens that suppress false sentence-end detection. */
|
|
151
|
+
readonly "sentence-abbrev": readonly string[];
|
|
152
|
+
};
|
|
153
|
+
};
|
|
154
|
+
/**
|
|
155
|
+
* Author-declared discipline mode (ADR-017 Slice 5). `undefined` when
|
|
156
|
+
* the manifest does not declare `profile.discipline-mode:`; the merge
|
|
157
|
+
* layer then runs inference to populate `EffectiveProfile.disciplineMode`.
|
|
158
|
+
*/
|
|
159
|
+
readonly disciplineMode?: DisciplineMode;
|
|
105
160
|
}
|
|
106
161
|
/**
|
|
107
162
|
* A profile after it has been resolved and parsed. One tier of a
|
|
@@ -148,18 +203,11 @@ export interface ProvenancedMapEntry<V> {
|
|
|
148
203
|
}
|
|
149
204
|
/** Map with per-entry provenance. Keys are always strings (attr/type/link names). */
|
|
150
205
|
export type ProvenancedMap<V> = ReadonlyMap<string, ProvenancedMapEntry<V>>;
|
|
151
|
-
/** Shape-scope rules after merging (identified or referenced). */
|
|
152
|
-
export interface EffectiveShapeScope {
|
|
153
|
-
readonly required: ProvenancedValue<readonly string[]>;
|
|
154
|
-
readonly attributes: ProvenancedMap<AttrDecl>;
|
|
155
|
-
/** Referenced scope's traceability is always empty (referenced entries don't originate links). */
|
|
156
|
-
readonly traceability: ProvenancedMap<TraceRule>;
|
|
157
|
-
}
|
|
158
206
|
/** Type-scope rules after merging. */
|
|
159
207
|
export interface EffectiveTypeDef {
|
|
160
208
|
readonly name: string;
|
|
161
|
-
/**
|
|
162
|
-
readonly
|
|
209
|
+
/** The core type this profile type extends — frozen at declaration, never changes across the chain. */
|
|
210
|
+
readonly extends: string;
|
|
163
211
|
readonly displayIdPattern: ProvenancedValue<string | undefined>;
|
|
164
212
|
readonly displayIdPatternEnforcement: ProvenancedValue<EnforcementMode>;
|
|
165
213
|
/** Resolved semantic color-role name, or `undefined` when unset. */
|
|
@@ -167,23 +215,50 @@ export interface EffectiveTypeDef {
|
|
|
167
215
|
readonly required: ProvenancedValue<readonly string[]>;
|
|
168
216
|
readonly attributes: ProvenancedMap<AttrDecl>;
|
|
169
217
|
readonly traceability: ProvenancedMap<TraceRule>;
|
|
218
|
+
readonly description: ProvenancedValue<string | undefined>;
|
|
219
|
+
readonly attrDescriptions: ProvenancedMap<string>;
|
|
220
|
+
readonly relationDescriptions: ProvenancedMap<string>;
|
|
221
|
+
/**
|
|
222
|
+
* Discipline kind explicitly assigned to this type by some tier of the
|
|
223
|
+
* profile chain. `value` is `undefined` when no tier assigned one — the
|
|
224
|
+
* registry builder then walks the `extends:` chain to resolve.
|
|
225
|
+
*/
|
|
226
|
+
readonly discipline: ProvenancedValue<string | undefined>;
|
|
170
227
|
}
|
|
171
228
|
/**
|
|
172
229
|
* The merged, validator-ready view of a profile chain. Every field carries
|
|
173
230
|
* per-rule provenance so a diagnostic can blame the right tier.
|
|
174
231
|
*/
|
|
175
232
|
export interface EffectiveProfile {
|
|
176
|
-
readonly required: ProvenancedValue<readonly string[]>;
|
|
177
233
|
readonly attributes: ProvenancedMap<AttrDecl>;
|
|
178
|
-
readonly labels:
|
|
234
|
+
readonly labels: ProvenancedMap<LabelConcern>;
|
|
235
|
+
readonly conventions: ProvenancedMap<ProfileConvention>;
|
|
179
236
|
/** Semantic color-role bindings merged across the chain. */
|
|
180
237
|
readonly colors: ProvenancedMap<string>;
|
|
181
|
-
readonly identified: EffectiveShapeScope;
|
|
182
|
-
readonly referenced: EffectiveShapeScope;
|
|
183
238
|
readonly types: ProvenancedMap<EffectiveTypeDef>;
|
|
184
239
|
readonly documents: {
|
|
185
240
|
readonly types: ProvenancedMap<DocTypeDef>;
|
|
186
241
|
readonly frontMatter: ProvenancedMap<AttrDecl>;
|
|
187
242
|
};
|
|
243
|
+
/** Discipline kinds declared across the profile chain (ADR-017). */
|
|
244
|
+
readonly kinds: ProvenancedMap<KindDecl>;
|
|
245
|
+
/**
|
|
246
|
+
* Prose-analysis configuration merged across the chain. Each lexicon list
|
|
247
|
+
* is list-additive: parent entries first, child entries appended, duplicates
|
|
248
|
+
* dropped (profile-schema §5.1).
|
|
249
|
+
*/
|
|
250
|
+
readonly prose: {
|
|
251
|
+
readonly lexicons: {
|
|
252
|
+
readonly "capitalized-allow": ProvenancedValue<readonly string[]>;
|
|
253
|
+
readonly "sentence-abbrev": ProvenancedValue<readonly string[]>;
|
|
254
|
+
};
|
|
255
|
+
};
|
|
256
|
+
/**
|
|
257
|
+
* Resolved discipline mode after the chain folds (ADR-017 Slice 5).
|
|
258
|
+
* Always defined — `origin` is `"declared"` when at least one tier
|
|
259
|
+
* supplied a value, otherwise `"inferred"` (computed from the
|
|
260
|
+
* effective type graph by `inferDisciplineMode()`).
|
|
261
|
+
*/
|
|
262
|
+
readonly disciplineMode: ProvenancedValue<DisciplineMode>;
|
|
188
263
|
}
|
|
189
264
|
//# sourceMappingURL=profile.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"profile.d.ts","sourceRoot":"","sources":["../../src/model/profile.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;
|
|
1
|
+
{"version":3,"file":"profile.d.ts","sourceRoot":"","sources":["../../src/model/profile.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAMH,mEAAmE;AACnE,eAAO,MAAM,WAAW,qJAed,CAAC;AAEX,MAAM,MAAM,SAAS,GAAG,OAAO,WAAW,CAAC,MAAM,CAAC,CAAC;AAEnD,0DAA0D;AAC1D,eAAO,MAAM,gBAAgB,EAAE,WAAW,CAAC,SAAS,CAGlD,CAAC;AAMH,yEAAyE;AACzE,MAAM,WAAW,WAAW;IAC1B,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;CACxB;AAMD,kEAAkE;AAClE,MAAM,WAAW,WAAW;IAC1B,QAAQ,CAAC,IAAI,EAA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AM,GAAG,SAAS,CAAC,CAAC;CAC3D;AAED;;;GAGG;AACH,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,CAAC,UAAU,EAAE,cAAc,CAAC,QAAQ,CAAC,CAAC;IAC9C,QAAQ,CAAC,MAAM,EAAE,cAAc,CAAC,YAAY,CAAC,CAAC;IAC9C,QAAQ,CAAC,WAAW,EAAE,cAAc,CAAC,iBAAiB,CAAC,CAAC;IACxD,4DAA4D;IAC5D,QAAQ,CAAC,MAAM,EAAE,cAAc,CAAC,MAAM,CAAC,CAAC;IACxC,QAAQ,CAAC,KAAK,EAAE,cAAc,CAAC,gBAAgB,CAAC,CAAC;IACjD,QAAQ,CAAC,SAAS,EAAE;QAClB,QAAQ,CAAC,KAAK,EAAE,cAAc,CAAC,UAAU,CAAC,CAAC;QAC3C,QAAQ,CAAC,WAAW,EAAE,cAAc,CAAC,QAAQ,CAAC,CAAC;KAChD,CAAC;IACF,oEAAoE;IACpE,QAAQ,CAAC,KAAK,EAAE,cAAc,CAAC,QAAQ,CAAC,CAAC;IACzC;;;;OAIG;IACH,QAAQ,CAAC,KAAK,EAAE;QACd,QAAQ,CAAC,QAAQ,EAAE;YACjB,QAAQ,CAAC,mBAAmB,EAAE,gBAAgB,CAAC,SAAS,MAAM,EAAE,CAAC,CAAC;YAClE,QAAQ,CAAC,iBAAiB,EAAE,gBAAgB,CAAC,SAAS,MAAM,EAAE,CAAC,CAAC;SACjE,CAAC;KACH,CAAC;IACF;;;;;OAKG;IACH,QAAQ,CAAC,cAAc,EAAE,gBAAgB,CAAC,cAAc,CAAC,CAAC;CAC3D"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @module model/source_introspection
|
|
3
|
+
*
|
|
4
|
+
* `Source:` → core type inference per spec §1.3.1 step 3 and
|
|
5
|
+
* ADR-003 §Part 5. Returns the inferred core type when the
|
|
6
|
+
* `Source:` value looks like a recognised manifest, source-code
|
|
7
|
+
* file, interface description, or bus description; `undefined`
|
|
8
|
+
* otherwise.
|
|
9
|
+
*
|
|
10
|
+
* Match order is significant — manifests must run before generic
|
|
11
|
+
* extension matches so `path/to/something.json` doesn't shadow
|
|
12
|
+
* `package.json`. The list is conservative: only patterns ADR-003
|
|
13
|
+
* §Part 5 lists normatively are encoded here; profiles extend the
|
|
14
|
+
* map later.
|
|
15
|
+
*/
|
|
16
|
+
/**
|
|
17
|
+
* Infer a core type from a `Source:` attribute value. The value
|
|
18
|
+
* may be a filesystem path or a URI — only the filename portion
|
|
19
|
+
* is matched. Whitespace is trimmed before matching.
|
|
20
|
+
*
|
|
21
|
+
* Returns `undefined` when no pattern matches; callers should treat
|
|
22
|
+
* that as "Source: didn't classify" and fall through to step 4 of
|
|
23
|
+
* the resolution chain.
|
|
24
|
+
*/
|
|
25
|
+
export declare function inferTypeFromSource(source: string): string | undefined;
|
|
26
|
+
//# sourceMappingURL=source_introspection.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"source_introspection.d.ts","sourceRoot":"","sources":["../../src/model/source_introspection.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAwDH;;;;;;;;GAQG;AACH,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAMtE"}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* @module model/source_introspection
|
|
4
|
+
*
|
|
5
|
+
* `Source:` → core type inference per spec §1.3.1 step 3 and
|
|
6
|
+
* ADR-003 §Part 5. Returns the inferred core type when the
|
|
7
|
+
* `Source:` value looks like a recognised manifest, source-code
|
|
8
|
+
* file, interface description, or bus description; `undefined`
|
|
9
|
+
* otherwise.
|
|
10
|
+
*
|
|
11
|
+
* Match order is significant — manifests must run before generic
|
|
12
|
+
* extension matches so `path/to/something.json` doesn't shadow
|
|
13
|
+
* `package.json`. The list is conservative: only patterns ADR-003
|
|
14
|
+
* §Part 5 lists normatively are encoded here; profiles extend the
|
|
15
|
+
* map later.
|
|
16
|
+
*/
|
|
17
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
+
exports.inferTypeFromSource = inferTypeFromSource;
|
|
19
|
+
const SOURCE_PATTERNS = [
|
|
20
|
+
// Build manifests → SoftwareComponent. Anchored at filename
|
|
21
|
+
// boundary so `weird-Cargo.toml` doesn't match unintentionally.
|
|
22
|
+
{ pattern: /(?:^|\/)Cargo\.toml$/, type: "SoftwareComponent" },
|
|
23
|
+
{ pattern: /(?:^|\/)package\.json$/, type: "SoftwareComponent" },
|
|
24
|
+
{ pattern: /(?:^|\/)pom\.xml$/, type: "SoftwareComponent" },
|
|
25
|
+
{ pattern: /(?:^|\/)deno\.json$/, type: "SoftwareComponent" },
|
|
26
|
+
{ pattern: /(?:^|\/)go\.mod$/, type: "SoftwareComponent" },
|
|
27
|
+
{ pattern: /(?:^|\/)pyproject\.toml$/, type: "SoftwareComponent" },
|
|
28
|
+
{ pattern: /(?:^|\/)setup\.py$/, type: "SoftwareComponent" },
|
|
29
|
+
{ pattern: /(?:^|\/)pubspec\.yaml$/, type: "SoftwareComponent" },
|
|
30
|
+
{ pattern: /(?:^|\/)[^/]+\.csproj$/, type: "SoftwareComponent" },
|
|
31
|
+
// Interface description files → SoftwareInterface. Run BEFORE the
|
|
32
|
+
// generic source-code extensions so `.openapi.yaml` wins over `.yaml`.
|
|
33
|
+
{ pattern: /\.openapi\.(?:yaml|yml|json)$/, type: "SoftwareInterface" },
|
|
34
|
+
{ pattern: /\.asyncapi\.(?:yaml|yml|json)$/, type: "SoftwareInterface" },
|
|
35
|
+
{ pattern: /\.proto$/, type: "SoftwareInterface" },
|
|
36
|
+
{ pattern: /\.graphql$/, type: "SoftwareInterface" },
|
|
37
|
+
{ pattern: /\.wsdl$/, type: "SoftwareInterface" },
|
|
38
|
+
{ pattern: /\.arxml$/, type: "SoftwareInterface" },
|
|
39
|
+
{ pattern: /\.idl$/, type: "SoftwareInterface" },
|
|
40
|
+
{ pattern: /\.ridl$/, type: "SoftwareInterface" },
|
|
41
|
+
// Bus description files → HardwareInterface.
|
|
42
|
+
{ pattern: /\.dbc$/, type: "HardwareInterface" },
|
|
43
|
+
{ pattern: /\.ldf$/, type: "HardwareInterface" },
|
|
44
|
+
{ pattern: /\.fibex$/, type: "HardwareInterface" },
|
|
45
|
+
// Source-code files → SoftwareUnit.
|
|
46
|
+
{ pattern: /\.rs$/, type: "SoftwareUnit" },
|
|
47
|
+
{ pattern: /\.kt$/, type: "SoftwareUnit" },
|
|
48
|
+
{ pattern: /\.kts$/, type: "SoftwareUnit" },
|
|
49
|
+
{ pattern: /\.java$/, type: "SoftwareUnit" },
|
|
50
|
+
{ pattern: /\.py$/, type: "SoftwareUnit" },
|
|
51
|
+
{ pattern: /\.ts$/, type: "SoftwareUnit" },
|
|
52
|
+
{ pattern: /\.tsx$/, type: "SoftwareUnit" },
|
|
53
|
+
{ pattern: /\.js$/, type: "SoftwareUnit" },
|
|
54
|
+
{ pattern: /\.jsx$/, type: "SoftwareUnit" },
|
|
55
|
+
{ pattern: /\.go$/, type: "SoftwareUnit" },
|
|
56
|
+
{ pattern: /\.cpp$/, type: "SoftwareUnit" },
|
|
57
|
+
{ pattern: /\.cc$/, type: "SoftwareUnit" },
|
|
58
|
+
{ pattern: /\.cxx$/, type: "SoftwareUnit" },
|
|
59
|
+
{ pattern: /\.c$/, type: "SoftwareUnit" },
|
|
60
|
+
{ pattern: /\.h$/, type: "SoftwareUnit" },
|
|
61
|
+
{ pattern: /\.hpp$/, type: "SoftwareUnit" },
|
|
62
|
+
{ pattern: /\.hxx$/, type: "SoftwareUnit" },
|
|
63
|
+
];
|
|
64
|
+
/**
|
|
65
|
+
* Infer a core type from a `Source:` attribute value. The value
|
|
66
|
+
* may be a filesystem path or a URI — only the filename portion
|
|
67
|
+
* is matched. Whitespace is trimmed before matching.
|
|
68
|
+
*
|
|
69
|
+
* Returns `undefined` when no pattern matches; callers should treat
|
|
70
|
+
* that as "Source: didn't classify" and fall through to step 4 of
|
|
71
|
+
* the resolution chain.
|
|
72
|
+
*/
|
|
73
|
+
function inferTypeFromSource(source) {
|
|
74
|
+
const trimmed = source.trim();
|
|
75
|
+
for (const { pattern, type } of SOURCE_PATTERNS) {
|
|
76
|
+
if (pattern.test(trimmed))
|
|
77
|
+
return type;
|
|
78
|
+
}
|
|
79
|
+
return undefined;
|
|
80
|
+
}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @module model/type_hierarchy
|
|
3
|
+
*
|
|
4
|
+
* Core type hierarchy from ADR-003 §Part 2. Encodes the per-type
|
|
5
|
+
* attribute catalogue for the 15 built-in concrete types and the four
|
|
6
|
+
* abstract parents. Attributes flow downward via inheritance; this
|
|
7
|
+
* module exposes lookup helpers consumed by the validator's MSL-T022
|
|
8
|
+
* check and by future profile-resolution work.
|
|
9
|
+
*/
|
|
10
|
+
/** Per-type definition: parent in the hierarchy + locally declared attrs. */
|
|
11
|
+
export interface CoreTypeDef {
|
|
12
|
+
/** Parent type name, or `null` for `Item` (the root). */
|
|
13
|
+
readonly parent: string | null;
|
|
14
|
+
/**
|
|
15
|
+
* Attributes declared by this type. Subtype attribute sets include
|
|
16
|
+
* everything declared on ancestor types, per ADR-003 §Part 2.
|
|
17
|
+
*/
|
|
18
|
+
readonly ownAttrs: readonly string[];
|
|
19
|
+
/**
|
|
20
|
+
* Attributes inherited from ancestors that are "not applicable" on
|
|
21
|
+
* this subtype per ADR-003 §Part 2 (e.g., `Allocated-to` on Test).
|
|
22
|
+
* Removed during {@linkcode attributesForType} resolution.
|
|
23
|
+
*/
|
|
24
|
+
readonly excludedAttrs?: readonly string[];
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Built-in type hierarchy. Keyed by the canonical TitleCase / lower-with-
|
|
28
|
+
* hyphens name as it would appear in a `Type:` attribute value.
|
|
29
|
+
*/
|
|
30
|
+
export declare const CORE_TYPE_HIERARCHY: Readonly<Record<string, CoreTypeDef>>;
|
|
31
|
+
/**
|
|
32
|
+
* Collect every attribute valid on `typeName` by walking the parent
|
|
33
|
+
* chain and subtracting any `excludedAttrs` declared along the way.
|
|
34
|
+
* Returns a {@linkcode Set} of attribute keys (TitleCase or
|
|
35
|
+
* lowercase-with-hyphens as declared). Returns an empty set for
|
|
36
|
+
* unknown type names — the caller treats unknown types separately.
|
|
37
|
+
*
|
|
38
|
+
* Exclusion semantics: an attribute marked `excludedAttrs` on a
|
|
39
|
+
* subtype is removed from the final set even if an ancestor declared
|
|
40
|
+
* it. The subtype cannot re-add the attribute later — only its own
|
|
41
|
+
* `ownAttrs` list contributes.
|
|
42
|
+
*/
|
|
43
|
+
export declare function attributesForType(typeName: string): Set<string>;
|
|
44
|
+
/**
|
|
45
|
+
* Union of every type-scoped attribute name declared anywhere in the
|
|
46
|
+
* core hierarchy. Used by the validator to suppress `MSL-R010`
|
|
47
|
+
* (unknown attribute) for keys that are core-known but appear on the
|
|
48
|
+
* "wrong" type — those cases get the more specific `MSL-T022`.
|
|
49
|
+
*/
|
|
50
|
+
export declare const CORE_TYPE_SCOPED_ATTRS: ReadonlySet<string>;
|
|
51
|
+
//# sourceMappingURL=type_hierarchy.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"type_hierarchy.d.ts","sourceRoot":"","sources":["../../src/model/type_hierarchy.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,6EAA6E;AAC7E,MAAM,WAAW,WAAW;IAC1B,yDAAyD;IACzD,QAAQ,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IAC/B;;;OAGG;IACH,QAAQ,CAAC,QAAQ,EAAE,SAAS,MAAM,EAAE,CAAC;IACrC;;;;OAIG;IACH,QAAQ,CAAC,aAAa,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;CAC5C;AAED;;;GAGG;AACH,eAAO,MAAM,mBAAmB,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,WAAW,CAAC,CA0ErE,CAAC;AAEF;;;;;;;;;;;GAWG;AACH,wBAAgB,iBAAiB,CAAC,QAAQ,EAAE,MAAM,GAAG,GAAG,CAAC,MAAM,CAAC,CAa/D;AAED;;;;;GAKG;AACH,eAAO,MAAM,sBAAsB,EAAE,WAAW,CAAC,MAAM,CAMnD,CAAC"}
|