@driftsys/markspec 0.10.3 → 0.12.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 +11 -2
- package/esm/ast/normalize.d.ts +4 -5
- package/esm/ast/normalize.d.ts.map +1 -1
- package/esm/ast/normalize.js +6 -37
- package/esm/collect/mod.d.ts +29 -9
- package/esm/collect/mod.d.ts.map +1 -1
- package/esm/collect/mod.js +36 -10
- package/esm/compiler/deserialize.d.ts +49 -0
- package/esm/compiler/deserialize.d.ts.map +1 -0
- package/esm/compiler/deserialize.js +139 -0
- package/esm/compiler/manifest.d.ts +3 -0
- package/esm/compiler/manifest.d.ts.map +1 -1
- package/esm/compiler/manifest.js +9 -3
- package/esm/compiler/mod.d.ts.map +1 -1
- package/esm/compiler/mod.js +18 -13
- package/esm/config/markspec.d.ts +40 -1
- package/esm/config/markspec.d.ts.map +1 -1
- package/esm/config/markspec.js +127 -2
- package/esm/config/mod.d.ts.map +1 -1
- package/esm/config/mod.js +143 -147
- package/esm/decl/duplicates.d.ts +29 -0
- package/esm/decl/duplicates.d.ts.map +1 -0
- package/esm/decl/duplicates.js +28 -0
- package/esm/decl/mod.d.ts +4 -2
- package/esm/decl/mod.d.ts.map +1 -1
- package/esm/decl/mod.js +2 -1
- package/esm/decl/surfaces.d.ts +29 -7
- package/esm/decl/surfaces.d.ts.map +1 -1
- package/esm/decl/surfaces.js +31 -18
- package/esm/discovery/mod.d.ts +24 -8
- package/esm/discovery/mod.d.ts.map +1 -1
- package/esm/discovery/mod.js +57 -21
- package/esm/discovery/projects.d.ts +109 -0
- package/esm/discovery/projects.d.ts.map +1 -0
- package/esm/discovery/projects.js +232 -0
- package/esm/formatter/entry_body.d.ts +86 -0
- package/esm/formatter/entry_body.d.ts.map +1 -0
- package/esm/formatter/entry_body.js +287 -0
- package/esm/formatter/mod.d.ts +13 -9
- package/esm/formatter/mod.d.ts.map +1 -1
- package/esm/formatter/mod.js +126 -50
- package/esm/gates/mod.d.ts +13 -2
- package/esm/gates/mod.d.ts.map +1 -1
- package/esm/gates/mod.js +41 -13
- package/esm/lint/runner.d.ts.map +1 -1
- package/esm/lint/runner.js +7 -5
- package/esm/lock/acquire_compile.d.ts +31 -0
- package/esm/lock/acquire_compile.d.ts.map +1 -0
- package/esm/lock/acquire_compile.js +83 -0
- package/esm/lock/cache_check.d.ts +28 -0
- package/esm/lock/cache_check.d.ts.map +1 -0
- package/esm/lock/cache_check.js +51 -0
- package/esm/lock/check.d.ts +14 -3
- package/esm/lock/check.d.ts.map +1 -1
- package/esm/lock/check.js +43 -4
- package/esm/lock/edge_drift.d.ts +2 -0
- package/esm/lock/edge_drift.d.ts.map +1 -1
- package/esm/lock/edge_drift.js +4 -0
- package/esm/lock/git_intent.d.ts +46 -0
- package/esm/lock/git_intent.d.ts.map +1 -0
- package/esm/lock/git_intent.js +111 -0
- package/esm/lock/mod.d.ts +11 -4
- package/esm/lock/mod.d.ts.map +1 -1
- package/esm/lock/mod.js +8 -2
- package/esm/lock/model.d.ts +24 -1
- package/esm/lock/model.d.ts.map +1 -1
- package/esm/lock/parser.d.ts.map +1 -1
- package/esm/lock/parser.js +32 -0
- package/esm/lock/pin_assurance.d.ts +20 -0
- package/esm/lock/pin_assurance.d.ts.map +1 -0
- package/esm/lock/pin_assurance.js +34 -0
- package/esm/lock/resolve.d.ts +8 -17
- package/esm/lock/resolve.d.ts.map +1 -1
- package/esm/lock/resolve.js +7 -67
- package/esm/lock/serializer.d.ts.map +1 -1
- package/esm/lock/serializer.js +23 -0
- package/esm/lock/upstream_common.d.ts +29 -0
- package/esm/lock/upstream_common.d.ts.map +1 -0
- package/esm/lock/upstream_common.js +38 -0
- package/esm/lock/upstream_deps.d.ts +63 -0
- package/esm/lock/upstream_deps.d.ts.map +1 -0
- package/esm/lock/upstream_deps.js +172 -0
- package/esm/lock/upstream_refs.d.ts +69 -0
- package/esm/lock/upstream_refs.d.ts.map +1 -0
- package/esm/lock/upstream_refs.js +238 -0
- package/esm/mod.d.ts +23 -11
- package/esm/mod.d.ts.map +1 -1
- package/esm/mod.js +20 -8
- package/esm/model/mod.d.ts +114 -28
- package/esm/model/mod.d.ts.map +1 -1
- package/esm/model/mod.js +76 -13
- package/esm/model/profile.d.ts +13 -0
- package/esm/model/profile.d.ts.map +1 -1
- package/esm/parser/code_regions.d.ts +29 -0
- package/esm/parser/code_regions.d.ts.map +1 -0
- package/esm/parser/code_regions.js +38 -0
- package/esm/parser/markdown.d.ts.map +1 -1
- package/esm/parser/markdown.js +110 -91
- package/esm/parser/mod.d.ts.map +1 -1
- package/esm/parser/mod.js +7 -1
- package/esm/parser/translate.d.ts.map +1 -1
- package/esm/parser/translate.js +5 -0
- package/esm/profile/manifest.d.ts.map +1 -1
- package/esm/profile/manifest.js +20 -3
- package/esm/profile/merge.js +7 -0
- package/esm/refs/mod.d.ts.map +1 -1
- package/esm/refs/mod.js +8 -19
- package/esm/reporter/mod.d.ts +11 -0
- package/esm/reporter/mod.d.ts.map +1 -1
- package/esm/reporter/mod.js +20 -9
- package/esm/typl/assemble.d.ts +53 -0
- package/esm/typl/assemble.d.ts.map +1 -0
- package/esm/typl/assemble.js +238 -0
- package/esm/typl/ast.d.ts +7 -1
- package/esm/typl/ast.d.ts.map +1 -1
- package/esm/typl/ast.js +3 -0
- package/esm/typl/bullet.d.ts +9 -7
- package/esm/typl/bullet.d.ts.map +1 -1
- package/esm/typl/bullet.js +6 -4
- package/esm/typl/citations.d.ts +27 -0
- package/esm/typl/citations.d.ts.map +1 -0
- package/esm/typl/citations.js +16 -0
- package/esm/typl/diagnostics.d.ts +2 -2
- package/esm/typl/diagnostics.d.ts.map +1 -1
- package/esm/typl/diagnostics.js +18 -0
- package/esm/typl/grammar.d.ts.map +1 -1
- package/esm/typl/grammar.js +6 -0
- package/esm/typl/lexer.d.ts.map +1 -1
- package/esm/typl/lexer.js +25 -4
- package/esm/typl/mod.d.ts +8 -2
- package/esm/typl/mod.d.ts.map +1 -1
- package/esm/typl/mod.js +5 -1
- package/esm/typl/recognize.js +2 -2
- package/esm/typl/registry.d.ts +1 -1
- package/esm/typl/resolve.d.ts +31 -0
- package/esm/typl/resolve.d.ts.map +1 -0
- package/esm/typl/resolve.js +27 -0
- package/esm/typl/table.d.ts +52 -0
- package/esm/typl/table.d.ts.map +1 -0
- package/esm/typl/table.js +69 -0
- package/esm/typl/validator.d.ts +24 -5
- package/esm/typl/validator.d.ts.map +1 -1
- package/esm/typl/validator.js +55 -75
- package/esm/upstream/mod.d.ts +45 -0
- package/esm/upstream/mod.d.ts.map +1 -0
- package/esm/upstream/mod.js +98 -0
- package/esm/upstream/project.d.ts +33 -0
- package/esm/upstream/project.d.ts.map +1 -0
- package/esm/upstream/project.js +38 -0
- package/esm/upstream/refs.d.ts +23 -0
- package/esm/upstream/refs.d.ts.map +1 -0
- package/esm/upstream/refs.js +71 -0
- package/esm/util/fence.d.ts +20 -29
- package/esm/util/fence.d.ts.map +1 -1
- package/esm/util/fence.js +42 -50
- package/esm/util/modals.d.ts +6 -0
- package/esm/util/modals.d.ts.map +1 -1
- package/esm/util/modals.js +37 -0
- package/esm/util/paths.d.ts +14 -0
- package/esm/util/paths.d.ts.map +1 -0
- package/esm/util/paths.js +22 -0
- package/esm/uxil/assemble.d.ts +38 -0
- package/esm/uxil/assemble.d.ts.map +1 -0
- package/esm/uxil/assemble.js +268 -0
- package/esm/uxil/ast.d.ts +63 -0
- package/esm/uxil/ast.d.ts.map +1 -0
- package/esm/uxil/ast.js +9 -0
- package/esm/uxil/citations.d.ts +27 -0
- package/esm/uxil/citations.d.ts.map +1 -0
- package/esm/uxil/citations.js +25 -0
- package/esm/uxil/diagnostics.d.ts +39 -0
- package/esm/uxil/diagnostics.d.ts.map +1 -0
- package/esm/uxil/diagnostics.js +135 -0
- package/esm/uxil/grammar.d.ts +72 -0
- package/esm/uxil/grammar.d.ts.map +1 -0
- package/esm/uxil/grammar.js +505 -0
- package/esm/uxil/lexer.d.ts +23 -0
- package/esm/uxil/lexer.d.ts.map +1 -0
- package/esm/uxil/lexer.js +58 -0
- package/esm/uxil/mod.d.ts +32 -0
- package/esm/uxil/mod.d.ts.map +1 -0
- package/esm/uxil/mod.js +11 -0
- package/esm/uxil/projection.d.ts +40 -0
- package/esm/uxil/projection.d.ts.map +1 -0
- package/esm/uxil/projection.js +41 -0
- package/esm/uxil/recognize.d.ts +16 -0
- package/esm/uxil/recognize.d.ts.map +1 -0
- package/esm/uxil/recognize.js +28 -0
- package/esm/uxil/registry.d.ts +37 -0
- package/esm/uxil/registry.d.ts.map +1 -0
- package/esm/uxil/registry.js +29 -0
- package/esm/uxil/surfaces.d.ts +36 -0
- package/esm/uxil/surfaces.d.ts.map +1 -0
- package/esm/uxil/surfaces.js +34 -0
- package/esm/uxil/validator.d.ts +36 -0
- package/esm/uxil/validator.d.ts.map +1 -0
- package/esm/uxil/validator.js +139 -0
- package/esm/uxil/vocab.d.ts +33 -0
- package/esm/uxil/vocab.d.ts.map +1 -0
- package/esm/uxil/vocab.js +36 -0
- package/esm/validator/body_blocks.d.ts +2 -1
- package/esm/validator/body_blocks.d.ts.map +1 -1
- package/esm/validator/body_blocks.js +80 -2
- package/esm/validator/caption_convention.d.ts +2 -1
- package/esm/validator/caption_convention.d.ts.map +1 -1
- package/esm/validator/caption_convention.js +2 -1
- package/esm/validator/corpus.d.ts +6 -0
- package/esm/validator/corpus.d.ts.map +1 -1
- package/esm/validator/corpus.js +55 -20
- package/esm/validator/discipline.d.ts +6 -4
- package/esm/validator/discipline.d.ts.map +1 -1
- package/esm/validator/discipline.js +6 -4
- package/esm/validator/mod.d.ts +1 -1
- package/esm/validator/mod.d.ts.map +1 -1
- package/esm/validator/mod.js +29 -16
- package/esm/validator/pipeline.d.ts +11 -1
- package/esm/validator/pipeline.d.ts.map +1 -1
- package/esm/validator/pipeline.js +76 -23
- package/esm/validator/trace_types.d.ts +9 -2
- package/esm/validator/trace_types.d.ts.map +1 -1
- package/esm/validator/trace_types.js +21 -5
- package/esm/validator/traceability.d.ts +15 -3
- package/esm/validator/traceability.d.ts.map +1 -1
- package/esm/validator/traceability.js +39 -4
- package/esm/validator/types.d.ts.map +1 -1
- package/esm/validator/types.js +11 -1
- package/esm/validator/uxil_family.d.ts +43 -0
- package/esm/validator/uxil_family.d.ts.map +1 -0
- package/esm/validator/uxil_family.js +52 -0
- package/package.json +1 -1
- package/script/ast/normalize.d.ts +4 -5
- package/script/ast/normalize.d.ts.map +1 -1
- package/script/ast/normalize.js +5 -36
- package/script/collect/mod.d.ts +29 -9
- package/script/collect/mod.d.ts.map +1 -1
- package/script/collect/mod.js +38 -10
- package/script/compiler/deserialize.d.ts +49 -0
- package/script/compiler/deserialize.d.ts.map +1 -0
- package/script/compiler/deserialize.js +144 -0
- package/script/compiler/manifest.d.ts +3 -0
- package/script/compiler/manifest.d.ts.map +1 -1
- package/script/compiler/manifest.js +10 -3
- package/script/compiler/mod.d.ts.map +1 -1
- package/script/compiler/mod.js +16 -11
- package/script/config/markspec.d.ts +40 -1
- package/script/config/markspec.d.ts.map +1 -1
- package/script/config/markspec.js +129 -3
- package/script/config/mod.d.ts.map +1 -1
- package/script/config/mod.js +143 -147
- package/script/decl/duplicates.d.ts +29 -0
- package/script/decl/duplicates.d.ts.map +1 -0
- package/script/decl/duplicates.js +31 -0
- package/script/decl/mod.d.ts +4 -2
- package/script/decl/mod.d.ts.map +1 -1
- package/script/decl/mod.js +4 -2
- package/script/decl/surfaces.d.ts +29 -7
- package/script/decl/surfaces.d.ts.map +1 -1
- package/script/decl/surfaces.js +32 -19
- package/script/discovery/mod.d.ts +24 -8
- package/script/discovery/mod.d.ts.map +1 -1
- package/script/discovery/mod.js +56 -20
- package/script/discovery/projects.d.ts +109 -0
- package/script/discovery/projects.d.ts.map +1 -0
- package/script/discovery/projects.js +240 -0
- package/script/formatter/entry_body.d.ts +86 -0
- package/script/formatter/entry_body.d.ts.map +1 -0
- package/script/formatter/entry_body.js +292 -0
- package/script/formatter/mod.d.ts +13 -9
- package/script/formatter/mod.d.ts.map +1 -1
- package/script/formatter/mod.js +124 -48
- package/script/gates/mod.d.ts +13 -2
- package/script/gates/mod.d.ts.map +1 -1
- package/script/gates/mod.js +50 -22
- package/script/lint/runner.d.ts.map +1 -1
- package/script/lint/runner.js +6 -4
- package/script/lock/acquire_compile.d.ts +31 -0
- package/script/lock/acquire_compile.d.ts.map +1 -0
- package/script/lock/acquire_compile.js +86 -0
- package/script/lock/cache_check.d.ts +28 -0
- package/script/lock/cache_check.d.ts.map +1 -0
- package/script/lock/cache_check.js +54 -0
- package/script/lock/check.d.ts +14 -3
- package/script/lock/check.d.ts.map +1 -1
- package/script/lock/check.js +43 -4
- package/script/lock/edge_drift.d.ts +2 -0
- package/script/lock/edge_drift.d.ts.map +1 -1
- package/script/lock/edge_drift.js +5 -0
- package/script/lock/git_intent.d.ts +46 -0
- package/script/lock/git_intent.d.ts.map +1 -0
- package/script/lock/git_intent.js +115 -0
- package/script/lock/mod.d.ts +11 -4
- package/script/lock/mod.d.ts.map +1 -1
- package/script/lock/mod.js +17 -2
- package/script/lock/model.d.ts +24 -1
- package/script/lock/model.d.ts.map +1 -1
- package/script/lock/parser.d.ts.map +1 -1
- package/script/lock/parser.js +32 -0
- package/script/lock/pin_assurance.d.ts +20 -0
- package/script/lock/pin_assurance.d.ts.map +1 -0
- package/script/lock/pin_assurance.js +37 -0
- package/script/lock/resolve.d.ts +8 -17
- package/script/lock/resolve.d.ts.map +1 -1
- package/script/lock/resolve.js +7 -68
- package/script/lock/serializer.d.ts.map +1 -1
- package/script/lock/serializer.js +23 -0
- package/script/lock/upstream_common.d.ts +29 -0
- package/script/lock/upstream_common.d.ts.map +1 -0
- package/script/lock/upstream_common.js +42 -0
- package/script/lock/upstream_deps.d.ts +63 -0
- package/script/lock/upstream_deps.d.ts.map +1 -0
- package/script/lock/upstream_deps.js +175 -0
- package/script/lock/upstream_refs.d.ts +69 -0
- package/script/lock/upstream_refs.d.ts.map +1 -0
- package/script/lock/upstream_refs.js +244 -0
- package/script/mod.d.ts +23 -11
- package/script/mod.d.ts.map +1 -1
- package/script/mod.js +55 -7
- package/script/model/mod.d.ts +114 -28
- package/script/model/mod.d.ts.map +1 -1
- package/script/model/mod.js +81 -14
- package/script/model/profile.d.ts +13 -0
- package/script/model/profile.d.ts.map +1 -1
- package/script/parser/code_regions.d.ts +29 -0
- package/script/parser/code_regions.d.ts.map +1 -0
- package/script/parser/code_regions.js +41 -0
- package/script/parser/markdown.d.ts.map +1 -1
- package/script/parser/markdown.js +108 -89
- package/script/parser/mod.d.ts.map +1 -1
- package/script/parser/mod.js +7 -1
- package/script/parser/translate.d.ts.map +1 -1
- package/script/parser/translate.js +5 -0
- package/script/profile/manifest.d.ts.map +1 -1
- package/script/profile/manifest.js +20 -3
- package/script/profile/merge.js +7 -0
- package/script/refs/mod.d.ts.map +1 -1
- package/script/refs/mod.js +7 -18
- package/script/reporter/mod.d.ts +11 -0
- package/script/reporter/mod.d.ts.map +1 -1
- package/script/reporter/mod.js +19 -8
- package/script/typl/assemble.d.ts +53 -0
- package/script/typl/assemble.d.ts.map +1 -0
- package/script/typl/assemble.js +241 -0
- package/script/typl/ast.d.ts +7 -1
- package/script/typl/ast.d.ts.map +1 -1
- package/script/typl/ast.js +3 -0
- package/script/typl/bullet.d.ts +9 -7
- package/script/typl/bullet.d.ts.map +1 -1
- package/script/typl/bullet.js +6 -4
- package/script/typl/citations.d.ts +27 -0
- package/script/typl/citations.d.ts.map +1 -0
- package/script/typl/citations.js +20 -0
- package/script/typl/diagnostics.d.ts +2 -2
- package/script/typl/diagnostics.d.ts.map +1 -1
- package/script/typl/diagnostics.js +18 -0
- package/script/typl/grammar.d.ts.map +1 -1
- package/script/typl/grammar.js +6 -0
- package/script/typl/lexer.d.ts.map +1 -1
- package/script/typl/lexer.js +25 -4
- package/script/typl/mod.d.ts +8 -2
- package/script/typl/mod.d.ts.map +1 -1
- package/script/typl/mod.js +14 -2
- package/script/typl/recognize.js +2 -2
- package/script/typl/registry.d.ts +1 -1
- package/script/typl/resolve.d.ts +31 -0
- package/script/typl/resolve.d.ts.map +1 -0
- package/script/typl/resolve.js +33 -0
- package/script/typl/table.d.ts +52 -0
- package/script/typl/table.d.ts.map +1 -0
- package/script/typl/table.js +75 -0
- package/script/typl/validator.d.ts +24 -5
- package/script/typl/validator.d.ts.map +1 -1
- package/script/typl/validator.js +55 -75
- package/script/upstream/mod.d.ts +45 -0
- package/script/upstream/mod.d.ts.map +1 -0
- package/script/upstream/mod.js +101 -0
- package/script/upstream/project.d.ts +33 -0
- package/script/upstream/project.d.ts.map +1 -0
- package/script/upstream/project.js +41 -0
- package/script/upstream/refs.d.ts +23 -0
- package/script/upstream/refs.d.ts.map +1 -0
- package/script/upstream/refs.js +74 -0
- package/script/util/fence.d.ts +20 -29
- package/script/util/fence.d.ts.map +1 -1
- package/script/util/fence.js +47 -54
- package/script/util/modals.d.ts +6 -0
- package/script/util/modals.d.ts.map +1 -1
- package/script/util/modals.js +38 -0
- package/script/util/paths.d.ts +14 -0
- package/script/util/paths.d.ts.map +1 -0
- package/script/util/paths.js +25 -0
- package/script/uxil/assemble.d.ts +38 -0
- package/script/uxil/assemble.d.ts.map +1 -0
- package/script/uxil/assemble.js +272 -0
- package/script/uxil/ast.d.ts +63 -0
- package/script/uxil/ast.d.ts.map +1 -0
- package/script/uxil/ast.js +10 -0
- package/script/uxil/citations.d.ts +27 -0
- package/script/uxil/citations.d.ts.map +1 -0
- package/script/uxil/citations.js +29 -0
- package/script/uxil/diagnostics.d.ts +39 -0
- package/script/uxil/diagnostics.d.ts.map +1 -0
- package/script/uxil/diagnostics.js +140 -0
- package/script/uxil/grammar.d.ts +72 -0
- package/script/uxil/grammar.d.ts.map +1 -0
- package/script/uxil/grammar.js +511 -0
- package/script/uxil/lexer.d.ts +23 -0
- package/script/uxil/lexer.d.ts.map +1 -0
- package/script/uxil/lexer.js +61 -0
- package/script/uxil/mod.d.ts +32 -0
- package/script/uxil/mod.d.ts.map +1 -0
- package/script/uxil/mod.js +37 -0
- package/script/uxil/projection.d.ts +40 -0
- package/script/uxil/projection.d.ts.map +1 -0
- package/script/uxil/projection.js +44 -0
- package/script/uxil/recognize.d.ts +16 -0
- package/script/uxil/recognize.d.ts.map +1 -0
- package/script/uxil/recognize.js +31 -0
- package/script/uxil/registry.d.ts +37 -0
- package/script/uxil/registry.d.ts.map +1 -0
- package/script/uxil/registry.js +32 -0
- package/script/uxil/surfaces.d.ts +36 -0
- package/script/uxil/surfaces.d.ts.map +1 -0
- package/script/uxil/surfaces.js +39 -0
- package/script/uxil/validator.d.ts +36 -0
- package/script/uxil/validator.d.ts.map +1 -0
- package/script/uxil/validator.js +142 -0
- package/script/uxil/vocab.d.ts +33 -0
- package/script/uxil/vocab.d.ts.map +1 -0
- package/script/uxil/vocab.js +41 -0
- package/script/validator/body_blocks.d.ts +2 -1
- package/script/validator/body_blocks.d.ts.map +1 -1
- package/script/validator/body_blocks.js +80 -2
- package/script/validator/caption_convention.d.ts +2 -1
- package/script/validator/caption_convention.d.ts.map +1 -1
- package/script/validator/caption_convention.js +2 -1
- package/script/validator/corpus.d.ts +6 -0
- package/script/validator/corpus.d.ts.map +1 -1
- package/script/validator/corpus.js +55 -19
- package/script/validator/discipline.d.ts +6 -4
- package/script/validator/discipline.d.ts.map +1 -1
- package/script/validator/discipline.js +6 -4
- package/script/validator/mod.d.ts +1 -1
- package/script/validator/mod.d.ts.map +1 -1
- package/script/validator/mod.js +29 -15
- package/script/validator/pipeline.d.ts +11 -1
- package/script/validator/pipeline.d.ts.map +1 -1
- package/script/validator/pipeline.js +75 -22
- package/script/validator/trace_types.d.ts +9 -2
- package/script/validator/trace_types.d.ts.map +1 -1
- package/script/validator/trace_types.js +20 -4
- package/script/validator/traceability.d.ts +15 -3
- package/script/validator/traceability.d.ts.map +1 -1
- package/script/validator/traceability.js +38 -3
- package/script/validator/types.d.ts.map +1 -1
- package/script/validator/types.js +10 -0
- package/script/validator/uxil_family.d.ts +43 -0
- package/script/validator/uxil_family.d.ts.map +1 -0
- package/script/validator/uxil_family.js +56 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"manifest.d.ts","sourceRoot":"","sources":["../../src/profile/manifest.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,KAAK,EAAE,UAAU,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"manifest.d.ts","sourceRoot":"","sources":["../../src/profile/manifest.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,KAAK,EAAE,UAAU,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AA+BnE,eAAO,MAAM,iBAAiB,aAS5B,CAAC;AAEH,eAAO,MAAM,oBAAoB,aAW/B,CAAC;AAEH,eAAO,MAAM,iBAAiB,aAW5B,CAAC;AAEH,eAAO,MAAM,qBAAqB,aAA6C,CAAC;AAChF,eAAO,MAAM,sBAAsB,aAAoC,CAAC;AACxE,eAAO,MAAM,qBAAqB,aAA6C,CAAC;AAEhF,eAAO,MAAM,iBAAiB,aAQ5B,CAAC;AAEH,eAAO,MAAM,oBAAoB,aAAgC,CAAC;AAElE,eAAO,MAAM,uBAAuB,aAKlC,CAAC;AAEH,4CAA4C;AAC5C,MAAM,WAAW,mBAAmB;IAClC,QAAQ,CAAC,QAAQ,EAAE,eAAe,GAAG,IAAI,CAAC;IAC1C,QAAQ,CAAC,WAAW,EAAE,SAAS,UAAU,EAAE,CAAC;CAC7C;AAo1CD;;;;;GAKG;AACH,wBAAgB,aAAa,CAC3B,OAAO,EAAE,MAAM,EACf,UAAU,SAAoB,GAC7B,mBAAmB,CAyMrB"}
|
|
@@ -12,6 +12,7 @@ exports.parseManifest = parseManifest;
|
|
|
12
12
|
const yaml_1 = require("@std/yaml");
|
|
13
13
|
const mod_js_1 = require("../model/mod.js");
|
|
14
14
|
const display_id_js_1 = require("./display_id.js");
|
|
15
|
+
const paths_js_1 = require("../util/paths.js");
|
|
15
16
|
const VALUE_TYPE_SET = new Set(mod_js_1.VALUE_TYPES);
|
|
16
17
|
exports.ALLOWED_ROOT_KEYS = new Set([
|
|
17
18
|
"$schema",
|
|
@@ -45,6 +46,7 @@ exports.ALLOWED_TYPE_KEYS = new Set([
|
|
|
45
46
|
"traceability",
|
|
46
47
|
"color",
|
|
47
48
|
"discipline",
|
|
49
|
+
"declares",
|
|
48
50
|
]);
|
|
49
51
|
exports.ALLOWED_DOC_TYPE_KEYS = new Set(["id", "contains", "description"]);
|
|
50
52
|
exports.ALLOWED_DOCUMENTS_KEYS = new Set(["types", "frontMatter"]);
|
|
@@ -981,6 +983,21 @@ function parseTypeDef(name, raw, sourcePath, diagnostics) {
|
|
|
981
983
|
}
|
|
982
984
|
discipline = r.discipline;
|
|
983
985
|
}
|
|
986
|
+
// uxil S9 (#727): `declares: ux-surface` designates a uxil declaring
|
|
987
|
+
// entry type. Closed vocabulary — reject anything else at load time.
|
|
988
|
+
let declares;
|
|
989
|
+
if (r.declares !== undefined) {
|
|
990
|
+
if (r.declares !== "ux-surface") {
|
|
991
|
+
diagnostics.push({
|
|
992
|
+
code: "PROFILE-TYPE-009",
|
|
993
|
+
severity: "error",
|
|
994
|
+
message: `${ctx}: 'declares' value '${r.declares}' is not recognised (expected 'ux-surface')`,
|
|
995
|
+
location: { file: sourcePath, line: 1, column: 1 },
|
|
996
|
+
});
|
|
997
|
+
return undefined;
|
|
998
|
+
}
|
|
999
|
+
declares = r.declares;
|
|
1000
|
+
}
|
|
984
1001
|
const description = typeof r.description === "string"
|
|
985
1002
|
? r.description
|
|
986
1003
|
: undefined;
|
|
@@ -998,6 +1015,7 @@ function parseTypeDef(name, raw, sourcePath, diagnostics) {
|
|
|
998
1015
|
color,
|
|
999
1016
|
description,
|
|
1000
1017
|
discipline,
|
|
1018
|
+
declares,
|
|
1001
1019
|
};
|
|
1002
1020
|
}
|
|
1003
1021
|
function parseTypesMap(raw, sourcePath, diagnostics) {
|
|
@@ -1146,11 +1164,10 @@ function parseDeliversSection(raw, sourcePath, diagnostics) {
|
|
|
1146
1164
|
});
|
|
1147
1165
|
continue;
|
|
1148
1166
|
}
|
|
1167
|
+
const normalized = path.replaceAll("\\", "/");
|
|
1149
1168
|
// PROFILE-DELIVERS-003 — the path must stay inside the profile
|
|
1150
1169
|
// directory: no absolute paths (POSIX or drive-letter), no `..`.
|
|
1151
|
-
|
|
1152
|
-
if (normalized.startsWith("/") || /^[A-Za-z]:/.test(normalized) ||
|
|
1153
|
-
normalized.split("/").includes("..")) {
|
|
1170
|
+
if ((0, paths_js_1.isUnsafeRelPath)(path)) {
|
|
1154
1171
|
diagnostics.push({
|
|
1155
1172
|
code: "PROFILE-DELIVERS-003",
|
|
1156
1173
|
severity: "error",
|
package/script/profile/merge.js
CHANGED
|
@@ -124,6 +124,7 @@ function foldTier(base, tier, diagnostics) {
|
|
|
124
124
|
attrDescriptions: mapFromAttrDescriptions(td.attributes, origin),
|
|
125
125
|
relationDescriptions: mapFromTraceDescriptions(td.traceability, origin),
|
|
126
126
|
discipline: { value: td.discipline, origin },
|
|
127
|
+
declares: { value: td.declares, origin },
|
|
127
128
|
};
|
|
128
129
|
types.set(name, { value: eff, origin });
|
|
129
130
|
}
|
|
@@ -402,6 +403,10 @@ function tightenType(existing, child, childOrigin, diagnostics) {
|
|
|
402
403
|
const discipline = child.discipline !== undefined
|
|
403
404
|
? { value: child.discipline, origin: childOrigin }
|
|
404
405
|
: effExisting.discipline;
|
|
406
|
+
// Declares (uxil S9 #727): child wins when set; otherwise parent stays.
|
|
407
|
+
const declares = child.declares !== undefined
|
|
408
|
+
? { value: child.declares, origin: childOrigin }
|
|
409
|
+
: effExisting.declares ?? { value: undefined, origin: existing.origin };
|
|
405
410
|
const attrDescriptions = mergeDescriptionMap(effExisting.attrDescriptions, child.attributes.map((a) => ({ name: a.name, desc: a.description })), childOrigin);
|
|
406
411
|
const relationDescriptions = mergeDescriptionMap(effExisting.relationDescriptions, [...child.traceability.entries()].map(([name, r]) => ({
|
|
407
412
|
name,
|
|
@@ -420,6 +425,7 @@ function tightenType(existing, child, childOrigin, diagnostics) {
|
|
|
420
425
|
attrDescriptions,
|
|
421
426
|
relationDescriptions,
|
|
422
427
|
discipline,
|
|
428
|
+
declares,
|
|
423
429
|
};
|
|
424
430
|
const overrides = [
|
|
425
431
|
...(existing.overrides ?? []),
|
|
@@ -741,6 +747,7 @@ function mapFromTypes(types, origin) {
|
|
|
741
747
|
attrDescriptions: mapFromAttrDescriptions(td.attributes, origin),
|
|
742
748
|
relationDescriptions: mapFromTraceDescriptions(td.traceability, origin),
|
|
743
749
|
discipline: { value: td.discipline, origin },
|
|
750
|
+
declares: { value: td.declares, origin },
|
|
744
751
|
};
|
|
745
752
|
out.set(name, { value: eff, origin });
|
|
746
753
|
}
|
package/script/refs/mod.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mod.d.ts","sourceRoot":"","sources":["../../src/refs/mod.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AAO7C,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAG/C;;;;GAIG;AACH,eAAO,MAAM,oBAAoB,EAAE,WAAW,CAAC,MAAM,CAGnD,CAAC;AAEH,iFAAiF;AACjF,MAAM,WAAW,QAAQ;IACvB,QAAQ,CAAC,eAAe,EAAE,WAAW,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACtD,QAAQ,CAAC,eAAe,EAAE,WAAW,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CACvD;AAED;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,OAAO,EAAE,SAAS,KAAK,EAAE,GAAG,QAAQ,CAajE;AAcD;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAC9B,OAAO,EAAE,MAAM,EACf,OAAO,EAAE,SAAS,KAAK,EAAE,EACzB,KAAK,EAAE,QAAQ,EACf,MAAM,EAAE,SAAS,QAAQ,EAAE,GAC1B;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,OAAO,CAAA;CAAE,
|
|
1
|
+
{"version":3,"file":"mod.d.ts","sourceRoot":"","sources":["../../src/refs/mod.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AAO7C,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAG/C;;;;GAIG;AACH,eAAO,MAAM,oBAAoB,EAAE,WAAW,CAAC,MAAM,CAGnD,CAAC;AAEH,iFAAiF;AACjF,MAAM,WAAW,QAAQ;IACvB,QAAQ,CAAC,eAAe,EAAE,WAAW,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACtD,QAAQ,CAAC,eAAe,EAAE,WAAW,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CACvD;AAED;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,OAAO,EAAE,SAAS,KAAK,EAAE,GAAG,QAAQ,CAajE;AAcD;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAC9B,OAAO,EAAE,MAAM,EACf,OAAO,EAAE,SAAS,KAAK,EAAE,EACzB,KAAK,EAAE,QAAQ,EACf,MAAM,EAAE,SAAS,QAAQ,EAAE,GAC1B;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,OAAO,CAAA;CAAE,CAqGtC"}
|
package/script/refs/mod.js
CHANGED
|
@@ -90,25 +90,17 @@ function canonicalizeRefs(content, entries, index, ledger) {
|
|
|
90
90
|
};
|
|
91
91
|
const lines = content.split("\n");
|
|
92
92
|
let changed = false;
|
|
93
|
-
//
|
|
94
|
-
//
|
|
95
|
-
|
|
96
|
-
// every other fmt pass honors (§5.1; cf. `collapseBlankLines`). Without
|
|
97
|
-
// this, `markspec fmt` rewrites example IDs in spec/ADR docs on every run
|
|
98
|
-
// (#668). The parser/validator already treat fenced content as inert.
|
|
99
|
-
let inFence = false;
|
|
93
|
+
// Share CommonMark fence boundaries with other prose passes. Compute them
|
|
94
|
+
// once so both the main loop and continuation loop remain linear (#705).
|
|
95
|
+
const fencedLines = (0, fence_js_1.fencedCodeLines)(content);
|
|
100
96
|
for (let i = 0; i < lines.length; i++) {
|
|
97
|
+
if (fencedLines.has(i))
|
|
98
|
+
continue;
|
|
101
99
|
// Strip a trailing CR before matching so CRLF files are handled (the
|
|
102
100
|
// trailer regex ends in `$`, which `\r` would block) and re-append it on
|
|
103
101
|
// rewrite so line endings stay byte-for-byte lossless.
|
|
104
102
|
const cr = lines[i].endsWith("\r");
|
|
105
103
|
const bare = cr ? lines[i].slice(0, -1) : lines[i];
|
|
106
|
-
if (fence_js_1.FENCE_RE.test(bare)) {
|
|
107
|
-
inFence = !inFence;
|
|
108
|
-
continue;
|
|
109
|
-
}
|
|
110
|
-
if (inFence)
|
|
111
|
-
continue;
|
|
112
104
|
const m = TRACE_TRAILER_RE.exec(bare);
|
|
113
105
|
if (!m)
|
|
114
106
|
continue;
|
|
@@ -135,11 +127,8 @@ function canonicalizeRefs(content, entries, index, ledger) {
|
|
|
135
127
|
j++;
|
|
136
128
|
const crj = lines[j].endsWith("\r");
|
|
137
129
|
const barej = crj ? lines[j].slice(0, -1) : lines[j];
|
|
138
|
-
//
|
|
139
|
-
|
|
140
|
-
// swallowed here without toggling `inFence`, desyncing fence tracking
|
|
141
|
-
// for the rest of the file. Back out and let the outer loop toggle it.
|
|
142
|
-
if (fence_js_1.FENCE_RE.test(barej)) {
|
|
130
|
+
// Fence delimiters and fenced content cannot continue a trace value.
|
|
131
|
+
if (fencedLines.has(j)) {
|
|
143
132
|
j--;
|
|
144
133
|
break;
|
|
145
134
|
}
|
package/script/reporter/mod.d.ts
CHANGED
|
@@ -19,6 +19,17 @@ export interface ReportOptions {
|
|
|
19
19
|
readonly scope?: string;
|
|
20
20
|
/** Filter entries by label value. */
|
|
21
21
|
readonly label?: string;
|
|
22
|
+
/**
|
|
23
|
+
* Declared upstream ids from `project.yaml`'s `dependencies:` (federated
|
|
24
|
+
* upstream, slice 4), derived via `deriveUpstreamId`. Used by the
|
|
25
|
+
* `coverage` report to classify an upstream-origin entry: an id in this
|
|
26
|
+
* set participates in coverage like a project entry (a `dependencies:`
|
|
27
|
+
* upstream); an upstream-origin entry whose id is NOT in this set is a
|
|
28
|
+
* `references:` leaf, excluded from the orphan/unsatisfied gap lists.
|
|
29
|
+
* Defaults to empty — every upstream-origin entry is treated as a
|
|
30
|
+
* reference leaf.
|
|
31
|
+
*/
|
|
32
|
+
readonly dependencyUpstreamIds?: ReadonlySet<string>;
|
|
22
33
|
}
|
|
23
34
|
/**
|
|
24
35
|
* Generate a report from compiled traceability graph.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mod.d.ts","sourceRoot":"","sources":["../../src/reporter/mod.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"mod.d.ts","sourceRoot":"","sources":["../../src/reporter/mod.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAQxD,8BAA8B;AAC9B,MAAM,MAAM,UAAU,GAAG,cAAc,GAAG,UAAU,CAAC;AAErD,gCAAgC;AAChC,MAAM,MAAM,YAAY,GAAG,IAAI,GAAG,MAAM,GAAG,KAAK,CAAC;AAEjD,sCAAsC;AACtC,MAAM,WAAW,aAAa;IAC5B,mBAAmB;IACnB,QAAQ,CAAC,IAAI,EAAE,UAAU,CAAC;IAC1B,qBAAqB;IACrB,QAAQ,CAAC,MAAM,EAAE,YAAY,CAAC;IAC9B,2DAA2D;IAC3D,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IACxB,qCAAqC;IACrC,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IACxB;;;;;;;;;OASG;IACH,QAAQ,CAAC,qBAAqB,CAAC,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;CACtD;AAED;;;;;;GAMG;AACH,wBAAgB,MAAM,CAAC,MAAM,EAAE,aAAa,EAAE,OAAO,EAAE,aAAa,GAAG,MAAM,CAY5E"}
|
package/script/reporter/mod.js
CHANGED
|
@@ -20,7 +20,7 @@ function report(result, options) {
|
|
|
20
20
|
if (options.kind === "traceability") {
|
|
21
21
|
return formatTraceability(result, entries, options.format);
|
|
22
22
|
}
|
|
23
|
-
return formatCoverage(result, entries, options.format);
|
|
23
|
+
return formatCoverage(result, entries, options.format, options.dependencyUpstreamIds);
|
|
24
24
|
}
|
|
25
25
|
// ---------------------------------------------------------------------------
|
|
26
26
|
// Filtering
|
|
@@ -53,7 +53,7 @@ function filterEntries(result, scope, label) {
|
|
|
53
53
|
* Markdown, and JSON rows all agree on the same value.
|
|
54
54
|
*/
|
|
55
55
|
function originCell(entry) {
|
|
56
|
-
return entry
|
|
56
|
+
return (0, mod_js_1.isCorpusEntry)(entry) ? (0, mod_js_1.formatEntryOrigin)(entry.origin) : "project";
|
|
57
57
|
}
|
|
58
58
|
function buildTraceRows(result, entries) {
|
|
59
59
|
return entries.map((entry) => {
|
|
@@ -98,7 +98,8 @@ function formatTraceability(result, entries, format) {
|
|
|
98
98
|
const lines = rows.map((r) => `| ${r.id} | ${r.title} | ${r.entryType} | ${r.origin} | ${r.satisfies || "\u2014"} | ${r.satisfiedBy || "\u2014"} |`);
|
|
99
99
|
return [header, sep, ...lines].join("\n");
|
|
100
100
|
}
|
|
101
|
-
function computeCoverage(result, entries) {
|
|
101
|
+
function computeCoverage(result, entries, opts = {}) {
|
|
102
|
+
const { dependencyUpstreamIds } = opts;
|
|
102
103
|
const byType = {};
|
|
103
104
|
const orphans = [];
|
|
104
105
|
const unsatisfied = [];
|
|
@@ -108,13 +109,22 @@ function computeCoverage(result, entries) {
|
|
|
108
109
|
// Bucket by profile-declared type when available, fall back to shape.
|
|
109
110
|
const t = entry.type ?? (entry.shape === "Reference" ? "ref" : "untyped");
|
|
110
111
|
byType[t] = (byType[t] ?? 0) + 1;
|
|
112
|
+
// Federated upstream (slice 4): a `references:` upstream entry is a
|
|
113
|
+
// traceability leaf — no coverage expectation points at or from it, so
|
|
114
|
+
// it is excluded from both gap lists below. A `dependencies:` upstream
|
|
115
|
+
// entry (its upstreamId present in `dependencyUpstreamIds`) participates
|
|
116
|
+
// like a project entry — this branch is inert until slice 3 loads
|
|
117
|
+
// dependency entries, but the classification is exercised here so it's
|
|
118
|
+
// ready when they do.
|
|
119
|
+
const isReferenceLeaf = (0, mod_js_1.isUpstreamEntry)(entry) &&
|
|
120
|
+
!(dependencyUpstreamIds?.has(entry.origin.upstreamId) ?? false);
|
|
111
121
|
const fwd = result.forward.get(entry.displayId) ?? [];
|
|
112
122
|
const rev = result.reverse.get(entry.displayId) ?? [];
|
|
113
123
|
const hasSatisfies = fwd.some((l) => l.kind === "satisfies");
|
|
114
|
-
if (hasSatisfies) {
|
|
124
|
+
if (hasSatisfies && !isReferenceLeaf) {
|
|
115
125
|
withSatisfies++;
|
|
116
126
|
}
|
|
117
|
-
else if (entry.shape === "Authored") {
|
|
127
|
+
else if (entry.shape === "Authored" && !isReferenceLeaf) {
|
|
118
128
|
withoutSatisfies++;
|
|
119
129
|
orphans.push(entry.displayId);
|
|
120
130
|
}
|
|
@@ -123,7 +133,8 @@ function computeCoverage(result, entries) {
|
|
|
123
133
|
// profile-specific; a profile-aware reporter layer refines this.
|
|
124
134
|
const hasSatisfiedBy = rev.some((l) => l.kind === "satisfies");
|
|
125
135
|
if (entry.type &&
|
|
126
|
-
!hasSatisfiedBy
|
|
136
|
+
!hasSatisfiedBy &&
|
|
137
|
+
!isReferenceLeaf) {
|
|
127
138
|
unsatisfied.push(entry.displayId);
|
|
128
139
|
}
|
|
129
140
|
}
|
|
@@ -135,8 +146,8 @@ function computeCoverage(result, entries) {
|
|
|
135
146
|
gaps: { orphans, unsatisfied },
|
|
136
147
|
};
|
|
137
148
|
}
|
|
138
|
-
function formatCoverage(result, entries, format) {
|
|
139
|
-
const stats = computeCoverage(result, entries);
|
|
149
|
+
function formatCoverage(result, entries, format, dependencyUpstreamIds) {
|
|
150
|
+
const stats = computeCoverage(result, entries, { dependencyUpstreamIds });
|
|
140
151
|
if (format === "json") {
|
|
141
152
|
return JSON.stringify(stats, null, 2);
|
|
142
153
|
}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @module typl/assemble
|
|
3
|
+
*
|
|
4
|
+
* Entry-level typl assembly (#723, #724): extracts declarations from the four
|
|
5
|
+
* surfaces (fence / bullet / inline / table), resolves published names through
|
|
6
|
+
* the base-resolution engine (core/decl/resolve), and aggregates the
|
|
7
|
+
* result into the `Entry.types` TyplBlock. Moved out of parser/markdown.ts
|
|
8
|
+
* so the parser calls one function.
|
|
9
|
+
*
|
|
10
|
+
* Resolution rules (design spec D5):
|
|
11
|
+
* - a `: namespace` binding establishes a base; nested-bullet namespaces
|
|
12
|
+
* scope their subtree (innermost wins); the root namespace (no
|
|
13
|
+
* namespace ancestor) scopes the whole entry body, order-independent;
|
|
14
|
+
* - a table's `Table:` caption may carry a base (#724); a table row
|
|
15
|
+
* resolves against that caption base first (innermost, #722 rule 3),
|
|
16
|
+
* then the root — the caption base is not itself a root and never sets
|
|
17
|
+
* `rootNamespace`;
|
|
18
|
+
* - relative names (`$.x`) resolve to absolute dotted names before
|
|
19
|
+
* aggregation — Entry.types carries absolute names only;
|
|
20
|
+
* - namespace bindings are scaffolding: excluded from bindings;
|
|
21
|
+
* - a relative name with no base is TYPL-010 (binding dropped);
|
|
22
|
+
* - a second root is TYPL-012 (first root wins);
|
|
23
|
+
* - inline/fence relative refs resolve against the root base only.
|
|
24
|
+
*/
|
|
25
|
+
import type { BodyBlock } from "../ast/nodes.js";
|
|
26
|
+
import type { BodyToken, Diagnostic } from "../model/mod.js";
|
|
27
|
+
import type { TyplBlock } from "./ast.js";
|
|
28
|
+
/**
|
|
29
|
+
* Assemble one entry's typl declarations into its `Entry.types` block.
|
|
30
|
+
*
|
|
31
|
+
* Extracts declarations from the four embedding surfaces (fenced code,
|
|
32
|
+
* bullet glossary, inline code spans, table rows), resolves every relative
|
|
33
|
+
* `$.x` name against the caption/root/nested-namespace bases in scope (see
|
|
34
|
+
* the module doc's resolution rules), and aggregates the result.
|
|
35
|
+
*
|
|
36
|
+
* @param bodyAst - The entry body's parsed block AST (fence + bullet + table
|
|
37
|
+
* surfaces walk this).
|
|
38
|
+
* @param bodyTokens - The entry body's flat token stream (the inline
|
|
39
|
+
* surface walks this).
|
|
40
|
+
* @param file - Source file path, for bridging diagnostics back to
|
|
41
|
+
* file-relative positions.
|
|
42
|
+
* @param bodyStartLine - 1-based line the entry body starts on, added to
|
|
43
|
+
* each surface's body-relative range to get a file-relative line.
|
|
44
|
+
* @returns `types` — the assembled `TyplBlock`, omitted when the entry
|
|
45
|
+
* declares nothing (no bindings, no typedefs, no root namespace) — plus
|
|
46
|
+
* any diagnostics raised during extraction or resolution (TYPL-010,
|
|
47
|
+
* TYPL-012, and bridged parse diagnostics).
|
|
48
|
+
*/
|
|
49
|
+
export declare function assembleTyplTypes(bodyAst: readonly BodyBlock[], bodyTokens: readonly BodyToken[], file: string, bodyStartLine: number): {
|
|
50
|
+
types?: TyplBlock;
|
|
51
|
+
diagnostics: Diagnostic[];
|
|
52
|
+
};
|
|
53
|
+
//# sourceMappingURL=assemble.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"assemble.d.ts","sourceRoot":"","sources":["../../src/typl/assemble.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AACjD,OAAO,KAAK,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7D,OAAO,KAAK,EAAoB,SAAS,EAAE,MAAM,UAAU,CAAC;AAkC5D;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,iBAAiB,CAC/B,OAAO,EAAE,SAAS,SAAS,EAAE,EAC7B,UAAU,EAAE,SAAS,SAAS,EAAE,EAChC,IAAI,EAAE,MAAM,EACZ,aAAa,EAAE,MAAM,GACpB;IAAE,KAAK,CAAC,EAAE,SAAS,CAAC;IAAC,WAAW,EAAE,UAAU,EAAE,CAAA;CAAE,CAqOlD"}
|
|
@@ -0,0 +1,241 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.assembleTyplTypes = assembleTyplTypes;
|
|
4
|
+
const mod_js_1 = require("../decl/mod.js");
|
|
5
|
+
const bridge_js_1 = require("./bridge.js");
|
|
6
|
+
const diagnostics_js_1 = require("./diagnostics.js");
|
|
7
|
+
const fence_js_1 = require("./fence.js");
|
|
8
|
+
const bullet_js_1 = require("./bullet.js");
|
|
9
|
+
const inline_js_1 = require("./inline.js");
|
|
10
|
+
const table_js_1 = require("./table.js");
|
|
11
|
+
const grammar_js_1 = require("./grammar.js");
|
|
12
|
+
const resolve_js_1 = require("./resolve.js");
|
|
13
|
+
/**
|
|
14
|
+
* Assemble one entry's typl declarations into its `Entry.types` block.
|
|
15
|
+
*
|
|
16
|
+
* Extracts declarations from the four embedding surfaces (fenced code,
|
|
17
|
+
* bullet glossary, inline code spans, table rows), resolves every relative
|
|
18
|
+
* `$.x` name against the caption/root/nested-namespace bases in scope (see
|
|
19
|
+
* the module doc's resolution rules), and aggregates the result.
|
|
20
|
+
*
|
|
21
|
+
* @param bodyAst - The entry body's parsed block AST (fence + bullet + table
|
|
22
|
+
* surfaces walk this).
|
|
23
|
+
* @param bodyTokens - The entry body's flat token stream (the inline
|
|
24
|
+
* surface walks this).
|
|
25
|
+
* @param file - Source file path, for bridging diagnostics back to
|
|
26
|
+
* file-relative positions.
|
|
27
|
+
* @param bodyStartLine - 1-based line the entry body starts on, added to
|
|
28
|
+
* each surface's body-relative range to get a file-relative line.
|
|
29
|
+
* @returns `types` — the assembled `TyplBlock`, omitted when the entry
|
|
30
|
+
* declares nothing (no bindings, no typedefs, no root namespace) — plus
|
|
31
|
+
* any diagnostics raised during extraction or resolution (TYPL-010,
|
|
32
|
+
* TYPL-012, and bridged parse diagnostics).
|
|
33
|
+
*/
|
|
34
|
+
function assembleTyplTypes(bodyAst, bodyTokens, file, bodyStartLine) {
|
|
35
|
+
const diagnostics = [];
|
|
36
|
+
const blocks = [];
|
|
37
|
+
// Map bullet-extraction index → blocks[] index, for parent lookups.
|
|
38
|
+
const bulletBlockIndex = [];
|
|
39
|
+
for (const fence of (0, fence_js_1.extractTyplFences)(bodyAst)) {
|
|
40
|
+
const result = (0, grammar_js_1.parseTyplBlock)(fence.source);
|
|
41
|
+
const lineOffset = bodyStartLine + fence.range.start.line - 1;
|
|
42
|
+
for (const td of result.diagnostics) {
|
|
43
|
+
diagnostics.push((0, bridge_js_1.bridgeTyplDiagnostic)(td, file, lineOffset));
|
|
44
|
+
}
|
|
45
|
+
blocks.push({ ...result.ast, file, lineOffset });
|
|
46
|
+
}
|
|
47
|
+
const bullets = (0, bullet_js_1.extractTyplBulletsNested)(bodyAst);
|
|
48
|
+
for (const bullet of bullets) {
|
|
49
|
+
const result = (0, grammar_js_1.parseTyplBlock)(bullet.source);
|
|
50
|
+
const lineOffset = bodyStartLine + bullet.range.start.line - 2;
|
|
51
|
+
for (const td of result.diagnostics) {
|
|
52
|
+
diagnostics.push((0, bridge_js_1.bridgeTyplDiagnostic)(td, file, lineOffset));
|
|
53
|
+
}
|
|
54
|
+
bulletBlockIndex.push(blocks.length);
|
|
55
|
+
blocks.push({
|
|
56
|
+
...result.ast,
|
|
57
|
+
file,
|
|
58
|
+
lineOffset,
|
|
59
|
+
bulletParent: bullet.parent,
|
|
60
|
+
});
|
|
61
|
+
}
|
|
62
|
+
for (const inline of (0, inline_js_1.extractTyplInlines)(bodyTokens)) {
|
|
63
|
+
const result = (0, grammar_js_1.parseTyplBlock)(inline.source);
|
|
64
|
+
const lineOffset = inline.location.line - 1;
|
|
65
|
+
for (const td of result.diagnostics) {
|
|
66
|
+
diagnostics.push((0, bridge_js_1.bridgeTyplDiagnostic)(td, inline.location.file, lineOffset));
|
|
67
|
+
}
|
|
68
|
+
blocks.push({ ...result.ast, file: inline.location.file, lineOffset });
|
|
69
|
+
}
|
|
70
|
+
// Table rows (#724): each recognized data row is one binding. Its range
|
|
71
|
+
// points AT the row's own line (like the bullet surface, not the fence
|
|
72
|
+
// whose range points at the opening ``` a line above its content), so the
|
|
73
|
+
// diagnostic offset subtracts 2, matching the bullet path. The `Table:`
|
|
74
|
+
// caption base — when the caption text is an absolute typl name — scopes
|
|
75
|
+
// the row's relative refs (see `scopeFor`); the caption base is not a
|
|
76
|
+
// namespace binding, so it takes no part in Pass A root detection or Pass B.
|
|
77
|
+
for (const row of (0, table_js_1.extractTyplTable)(bodyAst)) {
|
|
78
|
+
const result = (0, grammar_js_1.parseTyplBlock)(row.source);
|
|
79
|
+
const lineOffset = bodyStartLine + row.range.start.line - 2;
|
|
80
|
+
for (const td of result.diagnostics) {
|
|
81
|
+
diagnostics.push((0, bridge_js_1.bridgeTyplDiagnostic)(td, file, lineOffset));
|
|
82
|
+
}
|
|
83
|
+
const captionBase = row.captionText !== undefined
|
|
84
|
+
? (0, table_js_1.typlTableCaptionBase)(row.captionText)
|
|
85
|
+
: undefined;
|
|
86
|
+
blocks.push({
|
|
87
|
+
...result.ast,
|
|
88
|
+
file,
|
|
89
|
+
lineOffset,
|
|
90
|
+
...(captionBase !== undefined ? { captionBase } : {}),
|
|
91
|
+
});
|
|
92
|
+
}
|
|
93
|
+
// Emit a bridged typl diagnostic for a binding in blocks[i].
|
|
94
|
+
const emit = (code, params, i, position) => {
|
|
95
|
+
const td = (0, diagnostics_js_1.typlDiagnostic)(code, params, position);
|
|
96
|
+
diagnostics.push((0, bridge_js_1.bridgeTyplDiagnostic)(td, blocks[i].file, blocks[i].lineOffset));
|
|
97
|
+
};
|
|
98
|
+
// blockHasNamespace / hasNamespaceAncestor are static structure checks
|
|
99
|
+
// (independent of resolution), so Pass A is order-independent.
|
|
100
|
+
const blockHasNamespace = blocks.map((b) => b.bindings.some((x) => x.kind === "namespace"));
|
|
101
|
+
const hasNamespaceAncestor = (i) => {
|
|
102
|
+
let p = blocks[i].bulletParent;
|
|
103
|
+
while (p !== undefined) {
|
|
104
|
+
const idx = bulletBlockIndex[p];
|
|
105
|
+
if (blockHasNamespace[idx])
|
|
106
|
+
return true;
|
|
107
|
+
p = blocks[idx].bulletParent;
|
|
108
|
+
}
|
|
109
|
+
return false;
|
|
110
|
+
};
|
|
111
|
+
// ── Pass A: find the root ────────────────────────────────────────────
|
|
112
|
+
// Root candidate = an ABSOLUTE namespace binding with no namespace
|
|
113
|
+
// ancestor in its bullet chain (a relative namespace can never be a
|
|
114
|
+
// root — it needs a base itself). checkSingleRoot (core/decl) enforces
|
|
115
|
+
// the one-root invariant; its bare contract also flags zero candidates
|
|
116
|
+
// as a failure ("no-root"), but an entry with no namespace binding at
|
|
117
|
+
// all is a normal, error-free shape here — only "multiple-roots"
|
|
118
|
+
// produces diagnostics, first candidate in source order wins (order-
|
|
119
|
+
// independent for authors: the root scopes the whole body).
|
|
120
|
+
const rootCandidates = [];
|
|
121
|
+
for (let i = 0; i < blocks.length; i++) {
|
|
122
|
+
for (const binding of blocks[i].bindings) {
|
|
123
|
+
if (binding.kind !== "namespace")
|
|
124
|
+
continue;
|
|
125
|
+
if (!resolve_js_1.TYPL_REF_OPS.isAbsolute(binding.name))
|
|
126
|
+
continue;
|
|
127
|
+
if (hasNamespaceAncestor(i))
|
|
128
|
+
continue;
|
|
129
|
+
rootCandidates.push({
|
|
130
|
+
path: (0, resolve_js_1.typlPathOf)(binding.name),
|
|
131
|
+
blockIndex: i,
|
|
132
|
+
position: binding.position,
|
|
133
|
+
});
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
const rootCheck = (0, mod_js_1.checkSingleRoot)(rootCandidates);
|
|
137
|
+
let rootPath;
|
|
138
|
+
if (rootCheck.ok) {
|
|
139
|
+
rootPath = rootCheck.root.path;
|
|
140
|
+
}
|
|
141
|
+
else if (rootCheck.reason === "multiple-roots") {
|
|
142
|
+
rootPath = rootCheck.roots[0].path;
|
|
143
|
+
for (let k = 1; k < rootCheck.roots.length; k++) {
|
|
144
|
+
const extra = rootCheck.roots[k];
|
|
145
|
+
emit("TYPL-012", { first: `$${rootPath}` }, extra.blockIndex, extra.position);
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
// "no-root" → rootPath stays undefined; not an error.
|
|
149
|
+
// basePathOfBlock[i] = the base path blocks[i] provides to its bullet
|
|
150
|
+
// subtree, or undefined. One base slot per block: a block with several
|
|
151
|
+
// namespace bindings keeps the last (bullet blocks hold a single
|
|
152
|
+
// declaration in practice).
|
|
153
|
+
const basePathOfBlock = blocks.map(() => undefined);
|
|
154
|
+
/**
|
|
155
|
+
* Scope chain for blocks[i], innermost-first, terminated by the root base.
|
|
156
|
+
* Which frames a block sees depends on its surface: a bullet block walks
|
|
157
|
+
* its bullet-ancestor bases; a table-row block contributes its `Table:`
|
|
158
|
+
* caption base (#724); fence/inline blocks have neither and see the root
|
|
159
|
+
* only. The frame kinds don't combine in practice — a table row carries no
|
|
160
|
+
* `bulletParent`, so a table nested inside a bullet-namespace subtree sees
|
|
161
|
+
* only its caption base + the root, not the enclosing bullet base (known
|
|
162
|
+
* limitation, #724). Built immutably per call.
|
|
163
|
+
*/
|
|
164
|
+
const scopeFor = (i) => {
|
|
165
|
+
const chain = []; // innermost first
|
|
166
|
+
let p = blocks[i].bulletParent;
|
|
167
|
+
while (p !== undefined) {
|
|
168
|
+
const idx = bulletBlockIndex[p];
|
|
169
|
+
const base = basePathOfBlock[idx];
|
|
170
|
+
if (base !== undefined)
|
|
171
|
+
chain.push(base);
|
|
172
|
+
p = blocks[idx].bulletParent;
|
|
173
|
+
}
|
|
174
|
+
let scope = rootPath !== undefined
|
|
175
|
+
? { base: rootPath }
|
|
176
|
+
: undefined;
|
|
177
|
+
for (let k = chain.length - 1; k >= 0; k--) {
|
|
178
|
+
scope = { base: chain[k], parent: scope };
|
|
179
|
+
}
|
|
180
|
+
// A table row resolves against its caption base first (#722 rule 3):
|
|
181
|
+
// innermost, above the bullet chain and the root.
|
|
182
|
+
const captionBase = blocks[i].captionBase;
|
|
183
|
+
if (captionBase !== undefined)
|
|
184
|
+
scope = { base: captionBase, parent: scope };
|
|
185
|
+
return scope;
|
|
186
|
+
};
|
|
187
|
+
// ── Pass B: establish bases ──────────────────────────────────────────
|
|
188
|
+
// Source order is parents-before-children (bullet extraction is
|
|
189
|
+
// depth-first), so an ancestor's base is always resolved before its
|
|
190
|
+
// descendants need it. A relative namespace resolves against its own
|
|
191
|
+
// chain (TYPL-010 when there is none). Extra roots (TYPL-012 in Pass A)
|
|
192
|
+
// establish no base.
|
|
193
|
+
for (let i = 0; i < blocks.length; i++) {
|
|
194
|
+
for (const binding of blocks[i].bindings) {
|
|
195
|
+
if (binding.kind !== "namespace")
|
|
196
|
+
continue;
|
|
197
|
+
if (resolve_js_1.TYPL_REF_OPS.isAbsolute(binding.name)) {
|
|
198
|
+
const path = (0, resolve_js_1.typlPathOf)(binding.name);
|
|
199
|
+
const isExtraRoot = !hasNamespaceAncestor(i) && path !== rootPath;
|
|
200
|
+
if (!isExtraRoot)
|
|
201
|
+
basePathOfBlock[i] = path;
|
|
202
|
+
continue;
|
|
203
|
+
}
|
|
204
|
+
const res = (0, mod_js_1.resolveRef)(binding.name, scopeFor(i), resolve_js_1.TYPL_REF_OPS);
|
|
205
|
+
if (!res.ok) {
|
|
206
|
+
emit("TYPL-010", { name: binding.name }, i, binding.position);
|
|
207
|
+
continue;
|
|
208
|
+
}
|
|
209
|
+
basePathOfBlock[i] = (0, resolve_js_1.typlPathOf)(res.ref);
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
// ── Pass C: resolve every non-namespace binding to an absolute name ──
|
|
213
|
+
const allBindings = [];
|
|
214
|
+
const allTypedefs = [];
|
|
215
|
+
for (let i = 0; i < blocks.length; i++) {
|
|
216
|
+
const block = blocks[i];
|
|
217
|
+
for (const binding of block.bindings) {
|
|
218
|
+
if (binding.kind === "namespace")
|
|
219
|
+
continue; // scaffolding (D8)
|
|
220
|
+
const res = (0, mod_js_1.resolveRef)(binding.name, scopeFor(i), resolve_js_1.TYPL_REF_OPS);
|
|
221
|
+
if (!res.ok) {
|
|
222
|
+
emit("TYPL-010", { name: binding.name }, i, binding.position);
|
|
223
|
+
continue;
|
|
224
|
+
}
|
|
225
|
+
allBindings.push(res.ref === binding.name ? binding : { ...binding, name: res.ref });
|
|
226
|
+
}
|
|
227
|
+
allTypedefs.push(...block.typedefs);
|
|
228
|
+
}
|
|
229
|
+
if (allBindings.length === 0 && allTypedefs.length === 0 &&
|
|
230
|
+
rootPath === undefined) {
|
|
231
|
+
return { diagnostics };
|
|
232
|
+
}
|
|
233
|
+
return {
|
|
234
|
+
types: {
|
|
235
|
+
bindings: allBindings,
|
|
236
|
+
typedefs: allTypedefs,
|
|
237
|
+
...(rootPath !== undefined ? { rootNamespace: rootPath } : {}),
|
|
238
|
+
},
|
|
239
|
+
diagnostics,
|
|
240
|
+
};
|
|
241
|
+
}
|
package/script/typl/ast.d.ts
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* Closed kind vocabulary. `value` is the default kind when an author omits
|
|
9
9
|
* it from a binding.
|
|
10
10
|
*/
|
|
11
|
-
export declare const KINDS: readonly ["value", "event", "signal", "command", "state", "const", "config", "document", "stream"];
|
|
11
|
+
export declare const KINDS: readonly ["value", "event", "signal", "command", "state", "const", "config", "document", "stream", "namespace"];
|
|
12
12
|
export type Kind = typeof KINDS[number];
|
|
13
13
|
/** Schema AST — one discriminated union covering all shape variants. */
|
|
14
14
|
export type Shape = {
|
|
@@ -83,5 +83,11 @@ export type Statement = Binding | Typedef;
|
|
|
83
83
|
export interface TyplBlock {
|
|
84
84
|
readonly bindings: readonly Binding[];
|
|
85
85
|
readonly typedefs: readonly Typedef[];
|
|
86
|
+
/**
|
|
87
|
+
* The entry's root namespace path (no `$`, e.g. `"powertrain.brake"`),
|
|
88
|
+
* when the entry declares one (#723). The validator resolves relative
|
|
89
|
+
* citations against it.
|
|
90
|
+
*/
|
|
91
|
+
readonly rootNamespace?: string;
|
|
86
92
|
}
|
|
87
93
|
//# sourceMappingURL=ast.d.ts.map
|
package/script/typl/ast.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ast.d.ts","sourceRoot":"","sources":["../../src/typl/ast.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH;;;GAGG;AACH,eAAO,MAAM,KAAK,
|
|
1
|
+
{"version":3,"file":"ast.d.ts","sourceRoot":"","sources":["../../src/typl/ast.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH;;;GAGG;AACH,eAAO,MAAM,KAAK,iHAaR,CAAC;AACX,MAAM,MAAM,IAAI,GAAG,OAAO,KAAK,CAAC,MAAM,CAAC,CAAC;AAExC,wEAAwE;AACxE,MAAM,MAAM,KAAK,GACb;IAAE,IAAI,EAAE,WAAW,CAAC;IAAC,IAAI,EAAE,KAAK,GAAG,OAAO,GAAG,MAAM,GAAG,QAAQ,GAAG,OAAO,CAAA;CAAE,GAC1E;IACA,IAAI,EAAE,OAAO,CAAC;IACd,IAAI,EAAE,KAAK,GAAG,OAAO,CAAC;IACtB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,GACC;IACA,IAAI,EAAE,QAAQ,CAAC;IACf,IAAI,EAAE,QAAQ,GAAG,OAAO,CAAC;IACzB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,GACC;IAAE,IAAI,EAAE,SAAS,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAA;CAAE,GAClD;IACA,IAAI,EAAE,OAAO,CAAC;IACd,OAAO,EAAE,KAAK,CAAC;IACf,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,GACC;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,SAAS,CAAC,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC,EAAE,CAAA;CAAE,GAChE;IAAE,IAAI,EAAE,QAAQ,CAAC;IAAC,MAAM,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC,CAAA;CAAE,GAC3D;IAAE,IAAI,EAAE,SAAS,CAAC;IAAC,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,CAAA;CAAE,GACrD;IAAE,IAAI,EAAE,KAAK,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,GAC7B;IAAE,IAAI,EAAE,UAAU,CAAC;IAAC,KAAK,EAAE,KAAK,CAAA;CAAE,CAAC;AAEvC,uEAAuE;AACvE,MAAM,WAAW,QAAQ;IACvB,2CAA2C;IAC3C,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,sBAAsB;IACtB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;CACzB;AAED,yCAAyC;AACzC,MAAM,WAAW,OAAO;IACtB,QAAQ,CAAC,aAAa,EAAE,SAAS,CAAC;IAClC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,IAAI,EAAE,IAAI,CAAC;IACpB;;;OAGG;IACH,QAAQ,CAAC,KAAK,CAAC,EAAE,KAAK,CAAC;IACvB,QAAQ,CAAC,QAAQ,EAAE,QAAQ,CAAC;CAC7B;AAED,sCAAsC;AACtC,MAAM,WAAW,OAAO;IACtB,QAAQ,CAAC,aAAa,EAAE,SAAS,CAAC;IAClC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,KAAK,EAAE,KAAK,CAAC;IACtB,QAAQ,CAAC,QAAQ,EAAE,QAAQ,CAAC;CAC7B;AAED,MAAM,MAAM,SAAS,GAAG,OAAO,GAAG,OAAO,CAAC;AAE1C,iCAAiC;AACjC,MAAM,WAAW,SAAS;IACxB,QAAQ,CAAC,QAAQ,EAAE,SAAS,OAAO,EAAE,CAAC;IACtC,QAAQ,CAAC,QAAQ,EAAE,SAAS,OAAO,EAAE,CAAC;IACtC;;;;OAIG;IACH,QAAQ,CAAC,aAAa,CAAC,EAAE,MAAM,CAAC;CACjC"}
|
package/script/typl/ast.js
CHANGED
package/script/typl/bullet.d.ts
CHANGED
|
@@ -6,19 +6,21 @@
|
|
|
6
6
|
* `type X = …` typedef). A thin wrapper over the shared
|
|
7
7
|
* declaration-surface machinery (core/decl): it supplies typl's text
|
|
8
8
|
* recognizer and re-exports the common declaration node as
|
|
9
|
-
* {@linkcode
|
|
10
|
-
* items are extracted, non-matching bullets are left alone.
|
|
9
|
+
* {@linkcode TyplNestedBulletExtraction}. Mixed lists are supported —
|
|
10
|
+
* matching items are extracted, non-matching bullets are left alone.
|
|
11
11
|
*
|
|
12
12
|
* See ADR-019.
|
|
13
13
|
*/
|
|
14
14
|
import type { BodyBlock } from "../ast/nodes.js";
|
|
15
|
-
import { type
|
|
16
|
-
/** A
|
|
17
|
-
export type
|
|
15
|
+
import { type NestedBlockDeclaration } from "../decl/mod.js";
|
|
16
|
+
/** A typl bullet declaration with its structural parent link (#723). */
|
|
17
|
+
export type TyplNestedBulletExtraction = NestedBlockDeclaration;
|
|
18
18
|
/**
|
|
19
19
|
* Walk a body AST and return every bullet-list item whose first paragraph
|
|
20
20
|
* is a typl declaration, in source order (depth-first, recursing into
|
|
21
|
-
* nested lists)
|
|
21
|
+
* nested lists), each with a `parent` link for base-resolution scope
|
|
22
|
+
* chains. Delegates traversal to
|
|
23
|
+
* {@linkcode extractNestedBulletDeclarations}.
|
|
22
24
|
*/
|
|
23
|
-
export declare function
|
|
25
|
+
export declare function extractTyplBulletsNested(blocks: readonly BodyBlock[]): readonly TyplNestedBulletExtraction[];
|
|
24
26
|
//# sourceMappingURL=bullet.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bullet.d.ts","sourceRoot":"","sources":["../../src/typl/bullet.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AACH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AACjD,OAAO,
|
|
1
|
+
{"version":3,"file":"bullet.d.ts","sourceRoot":"","sources":["../../src/typl/bullet.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AACH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AACjD,OAAO,EAEL,KAAK,sBAAsB,EAC5B,MAAM,gBAAgB,CAAC;AAGxB,wEAAwE;AACxE,MAAM,MAAM,0BAA0B,GAAG,sBAAsB,CAAC;AAEhE;;;;;;GAMG;AACH,wBAAgB,wBAAwB,CACtC,MAAM,EAAE,SAAS,SAAS,EAAE,GAC3B,SAAS,0BAA0B,EAAE,CAEvC"}
|