@blockml/framework 0.9.3 → 0.9.5

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.
Files changed (75) hide show
  1. package/blocks/org/blockml/bml/framework/FrameworkType.bml +16 -20
  2. package/blocks/org/blockml/bml/framework/Library.bml +21 -29
  3. package/blocks/org/blockml/bml/framework/README.bml +15 -22
  4. package/blocks/org/blockml/bml/framework/capability/BootstrapFullProjectRegistry.bml +25 -23
  5. package/blocks/org/blockml/bml/framework/capability/BootstrapTypeRegistry.bml +19 -21
  6. package/blocks/org/blockml/bml/framework/capability/CollectBaseTypeChain.bml +22 -21
  7. package/blocks/org/blockml/bml/framework/capability/DefaultBootstrapPaths.bml +19 -20
  8. package/blocks/org/blockml/bml/framework/capability/EvaluateExpression.bml +19 -20
  9. package/blocks/org/blockml/bml/framework/capability/EvaluateInterpolatedText.bml +19 -20
  10. package/blocks/org/blockml/bml/framework/capability/EvaluateParseValue.bml +23 -23
  11. package/blocks/org/blockml/bml/framework/capability/FindLocalMember.bml +22 -22
  12. package/blocks/org/blockml/bml/framework/capability/ForkBom.bml +19 -21
  13. package/blocks/org/blockml/bml/framework/capability/GetExportedFqns.bml +25 -22
  14. package/blocks/org/blockml/bml/framework/capability/GetPropertyNumericValue.bml +19 -20
  15. package/blocks/org/blockml/bml/framework/capability/IsLiteralValue.bml +19 -20
  16. package/blocks/org/blockml/bml/framework/capability/MemberIdentityKey.bml +19 -20
  17. package/blocks/org/blockml/bml/framework/capability/ParseExpression.bml +19 -21
  18. package/blocks/org/blockml/bml/framework/capability/ParseInterpolatedText.bml +22 -21
  19. package/blocks/org/blockml/bml/framework/capability/PeekLibraryTypeFqn.bml +19 -21
  20. package/blocks/org/blockml/bml/framework/capability/ProjectLibraryPackageDirs.bml +19 -20
  21. package/blocks/org/blockml/bml/framework/capability/ProjectLibraryPackageRoots.bml +19 -20
  22. package/blocks/org/blockml/bml/framework/capability/ProjectSourceRoots.bml +22 -21
  23. package/blocks/org/blockml/bml/framework/capability/RegistryFilesUnderRoots.bml +22 -21
  24. package/blocks/org/blockml/bml/framework/capability/ResolveContracts.bml +22 -22
  25. package/blocks/org/blockml/bml/framework/capability/ResolveEffectiveMembers.bml +22 -22
  26. package/blocks/org/blockml/bml/framework/capability/ResolveLibrarySeeds.bml +22 -22
  27. package/blocks/org/blockml/bml/framework/capability/RootFqnByFilePath.bml +19 -20
  28. package/blocks/org/blockml/bml/framework/capability/RootFqns.bml +19 -20
  29. package/blocks/org/blockml/bml/framework/capability/TypeRegistry.bml +12 -19
  30. package/blocks/org/blockml/bml/framework/capability/ValidateConstraints.bml +22 -22
  31. package/blocks/org/blockml/bml/framework/capability/ValidateEmbeddedBlocks.bml +19 -20
  32. package/blocks/org/blockml/bml/framework/capability/ValidateGenerics.bml +25 -24
  33. package/blocks/org/blockml/bml/framework/capability/ValidateInstances.bml +22 -21
  34. package/blocks/org/blockml/bml/framework/capability/ValidatePresets.bml +22 -21
  35. package/blocks/org/blockml/bml/framework/capability/ValidateReadOnly.bml +22 -21
  36. package/blocks/org/blockml/bml/framework/capability/ValidateTypes.bml +30 -25
  37. package/blocks/org/blockml/bml/framework/capability/ValidateVersions.bml +22 -22
  38. package/blocks/org/blockml/bml/framework/capability/ValidateVisibility.bml +22 -21
  39. package/blocks/org/blockml/bml/framework/config/FrameworkDiagnosticCodes.bml +16 -19
  40. package/blocks/org/blockml/bml/framework/documentation/ArchitectureOverview.bml +16 -21
  41. package/blocks/org/blockml/bml/framework/documentation/ConstraintValidation.bml +17 -22
  42. package/blocks/org/blockml/bml/framework/documentation/Diagnostics.bml +23 -28
  43. package/blocks/org/blockml/bml/framework/documentation/EffectiveMembers.bml +18 -23
  44. package/blocks/org/blockml/bml/framework/documentation/ExpressionParsing.bml +23 -24
  45. package/blocks/org/blockml/bml/framework/documentation/Introduction.bml +17 -22
  46. package/blocks/org/blockml/bml/framework/documentation/LayerSeparation.bml +19 -24
  47. package/blocks/org/blockml/bml/framework/documentation/PackageOwnership.bml +19 -24
  48. package/blocks/org/blockml/bml/framework/documentation/PublicApi.bml +19 -22
  49. package/blocks/org/blockml/bml/framework/documentation/ScopeExclusions.bml +16 -21
  50. package/blocks/org/blockml/bml/framework/documentation/TypeRegistryBootstrap.bml +22 -27
  51. package/blocks/org/blockml/bml/framework/expression/ArrayExpressionNode.bml +19 -20
  52. package/blocks/org/blockml/bml/framework/expression/BinaryExpressionNode.bml +25 -22
  53. package/blocks/org/blockml/bml/framework/expression/CallExpressionNode.bml +22 -21
  54. package/blocks/org/blockml/bml/framework/expression/ExpressionNode.bml +16 -20
  55. package/blocks/org/blockml/bml/framework/expression/InterpolatedStringNode.bml +19 -20
  56. package/blocks/org/blockml/bml/framework/expression/LiteralExpressionNode.bml +19 -20
  57. package/blocks/org/blockml/bml/framework/expression/ObjectExpressionEntry.bml +19 -20
  58. package/blocks/org/blockml/bml/framework/expression/ObjectExpressionNode.bml +19 -20
  59. package/blocks/org/blockml/bml/framework/expression/ParseExpressionError.bml +19 -20
  60. package/blocks/org/blockml/bml/framework/expression/ParseExpressionOutcome.bml +22 -21
  61. package/blocks/org/blockml/bml/framework/expression/ParseExpressionResult.bml +19 -20
  62. package/blocks/org/blockml/bml/framework/expression/PropertyExpressionNode.bml +19 -20
  63. package/blocks/org/blockml/bml/framework/registry/BootstrapOptions.bml +22 -21
  64. package/blocks/org/blockml/bml/framework/registry/BootstrapResult.bml +25 -22
  65. package/blocks/org/blockml/bml/framework/registry/BootstrapTrace.bml +28 -23
  66. package/dist/expression/parse-expression.d.ts.map +1 -1
  67. package/dist/expression/parse-expression.js +4 -1
  68. package/dist/expression/parse-expression.js.map +1 -1
  69. package/dist/expression/parse-interpolated-text.d.ts.map +1 -1
  70. package/dist/expression/parse-interpolated-text.js +60 -30
  71. package/dist/expression/parse-interpolated-text.js.map +1 -1
  72. package/dist/validate/validate-types.d.ts.map +1 -1
  73. package/dist/validate/validate-types.js +17 -26
  74. package/dist/validate/validate-types.js.map +1 -1
  75. package/package.json +4 -4
@@ -1,12 +1,6 @@
1
- <!--
2
- Framework Documentation — Diagnostics
3
- FQN: org.blockml.bml.framework.documentation.Diagnostics
4
- -->
5
- <block
6
- xmlns="http://blockml.org/bml"
7
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
8
- xsi:schemaLocation="http://blockml.org/bml https://blockml.org/schemas/bml.xsd
9
- "
1
+ <!--Framework Documentation — Diagnostics
2
+ FQN: org.blockml.bml.framework.documentation.Diagnostics-->
3
+ <fwdocumentation:Diagnostics xmlns="http://blockml.org/bml"
10
4
  xmlns:blockml="org.blockml.bml"
11
5
  xmlns:bom="org.blockml.bml.bom"
12
6
  xmlns:bomapi="org.blockml.bml.bom.api"
@@ -32,13 +26,15 @@
32
26
  xmlns:valdocumentation="org.blockml.bml.compiler.validator.documentation"
33
27
  xmlns:doc="org.blockml.bml.documentation">
34
28
 
35
- <name>Diagnostics</name>
36
- <type>fwdocumentation:Diagnostics</type>
37
- <baseType>core:Documentation</baseType>
38
- <is>Framework diagnostic codes</is>
39
-
40
- <documentation>Diagnostic codes emitted by framework utilities (see fwconfig:FrameworkDiagnosticCodes):
41
-
29
+ <baseType>
30
+ core:Documentation
31
+ </baseType>
32
+ <is>
33
+ Framework diagnostic codes
34
+ </is>
35
+ <documentation>
36
+ Diagnostic codes emitted by framework utilities (see fwconfig:FrameworkDiagnosticCodes):
37
+
42
38
  validateTypes (type-driven reference walk — declared ValueType, never the field name):
43
39
  • BML_UNKNOWN_BASE_TYPE — baseType FQN not in TypeRegistry (at baseTypeSource)
44
40
  • BML_UNKNOWN_CONTRACT — contracts[] FQN not in TypeRegistry
@@ -48,8 +44,8 @@
48
44
  • BML_TYPE_BOUND_NOT_SATISFIED — TypeReference(B) / TypeReferenceEntity(B) value fails bound B (capability throws[] defaults to core:Exception)
49
45
  TypeIdentifier / PackageIdentifier / InstanceIdentifier / MemberIdentifier (and *IdentifierEntity) values are not existence-checked. block.type is TypeIdentifier.
50
46
  • BML_MEMBER_COLLISION — duplicate member identity in effective set
51
- • BML_OVERRIDE_WITHOUT_PARENT — override without resolvable base member
52
- • BML_OVERRIDE_REQUIRED — override on non-overridable member
47
+ • BML_OVERRIDE_WITHOUT_PARENT — override="true" without a matching inherited or contract member
48
+ • BML_OVERRIDE_REQUIRED — local redeclaration of an inherited or contract member without override="true" (all member kinds, including aggregation composition fills)
53
49
  • BML_EXPRESSION_PARSE_ERROR — parseExpression failed on ExpressionValue.raw
54
50
  • BML_EXPR_SYNTAX_ERROR — unclosed ${} in interpolated text
55
51
  • BML_EXPR_NOT_ALLOWED_IN_INTERPOLATION — hole uses @model, @bean, or a forbidden call
@@ -60,37 +56,36 @@
60
56
  TODO: a matching prefixed type (scad:type for scad:value) so each facet can be
61
57
  checked in its target language. Message is the thrown Error text. Expressions,
62
58
  interpolation, unions, StructType, and EnumType are skipped.
63
-
59
+
64
60
  validateInstances:
65
61
  • BML_UNKNOWN_TYPE — composition instance typeFqn not in TypeRegistry
66
62
  • BML_UNKNOWN_PROPERTY — instance memberValues key not in effective members (error)
67
-
63
+
68
64
  validateGenerics:
69
65
  • BML_OPEN_GENERIC_INSTANCE — aggregated domain Block instance still has open genericTypes without bml:generics (not TypeReferenceEntity sugar)
70
66
  • BML_GENERICS_DIRECTIVE_NOT_ALLOWED — bml:generics not on a Block instance (including TypeReferenceEntity QName sugar)
71
67
  • BML_GENERICS_ARGUMENT_MISMATCH — bml:generics does not match declared genericTypes (including on a non-generic type)
72
68
  • BML_MISSING_GENERIC_TYPE_ARGUMENT — directive present but a required argument has no defaultType
73
69
  • BML_GENERIC_CONSTRAINT_VIOLATION — argument fails parameter baseType via satisfiesTypeBound
74
-
70
+
75
71
  validateVersions:
76
72
  • BML_MISSING_VERSION — standalone root block missing effective version (non-framework convention)
77
73
  • BML_UNKNOWN_VERSION — bml:version pin does not match registered block version
78
-
74
+
79
75
  validateConstraints:
80
76
  • BML_CONSTRAINT_VIOLATION — constraint predicate failed
81
77
  • BML_CONSTRAINT_UNKNOWN — unrecognized constraint type FQN
82
78
  • BML_CONSTRAINT_TARGET_MISMATCH — constraint branch wrong for embed context
83
-
79
+
84
80
  bootstrap:
85
81
  • BML_BOOTSTRAP_READ_ERROR — file read failure during corpus walk (warning)
86
82
  • BML_LIBRARY_RESOLVE_ERROR — Library.bml path or dependency could not be resolved
87
83
  • BML_LIBRARY_NESTING_VIOLATION — outer library re-exports inner-only block
88
-
89
- Diagnostic type: org.blockml.bml.bom.common.Diagnostic.</documentation>
90
-
84
+
85
+ Diagnostic type: org.blockml.bml.bom.common.Diagnostic.
86
+ </documentation>
91
87
  <references>
92
88
  <see type="fwconfig:FrameworkDiagnosticCodes" relation="Defines" />
93
89
  <see type="fwdocumentation:PackageOwnership" relation="ReadNext" />
94
90
  </references>
95
-
96
- </block>
91
+ </fwdocumentation:Diagnostics>
@@ -1,12 +1,6 @@
1
- <!--
2
- Framework Documentation — EffectiveMembers
3
- FQN: org.blockml.bml.framework.documentation.EffectiveMembers
4
- -->
5
- <block
6
- xmlns="http://blockml.org/bml"
7
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
8
- xsi:schemaLocation="http://blockml.org/bml https://blockml.org/schemas/bml.xsd
9
- "
1
+ <!--Framework Documentation — EffectiveMembers
2
+ FQN: org.blockml.bml.framework.documentation.EffectiveMembers-->
3
+ <fwdocumentation:EffectiveMembers xmlns="http://blockml.org/bml"
10
4
  xmlns:blockml="org.blockml.bml"
11
5
  xmlns:bom="org.blockml.bml.bom"
12
6
  xmlns:bomapi="org.blockml.bml.bom.api"
@@ -32,35 +26,36 @@
32
26
  xmlns:valdocumentation="org.blockml.bml.compiler.validator.documentation"
33
27
  xmlns:doc="org.blockml.bml.documentation">
34
28
 
35
- <name>EffectiveMembers</name>
36
- <type>fwdocumentation:EffectiveMembers</type>
37
- <baseType>core:Documentation</baseType>
38
- <is>resolveEffectiveMembers and baseType chain merge</is>
39
-
40
- <documentation>resolveEffectiveMembers(block, registry) merges members[] in order:
41
-
29
+ <baseType>
30
+ core:Documentation
31
+ </baseType>
32
+ <is>
33
+ resolveEffectiveMembers and baseType chain merge
34
+ </is>
35
+ <documentation>
36
+ resolveEffectiveMembers(block, registry) merges members[] in order:
37
+
42
38
  1. baseType chain (via collectBaseTypeChain) — earliest to latest
43
39
  2. contracts[] in declaration order (via resolveContracts) — contract Block members only;
44
40
  subBlocks/compositions/embeddedBlocks on contract types are ignored
45
41
  3. local block.members — override earlier layers when override=true
46
-
42
+
47
43
  collectBaseTypeChain walks block.baseType → registry.get(baseType) until absent or cycle.
48
44
  resolveContracts resolves each contracts[] FQN via TypeRegistry; unknown contract →
49
45
  BML_UNKNOWN_CONTRACT (validateTypes).
50
46
  memberIdentityKey(member) = (namespace ?? "") + ":" + name — collision detection key.
51
47
  findLocalMember(block, member) looks up that key in block.members only (not inherited).
52
-
48
+
53
49
  Partial merge: later layer replaces only explicitly authored attributes on the member.
54
50
  Used by validateTypes (member collision, override rules) and validateConstraints (effective
55
51
  PropertyDefinition constraints).
56
-
57
- EffectiveMemberSet is a runtime view — not stored on Urmodell (BOM SSOT).</documentation>
58
-
52
+
53
+ EffectiveMemberSet is a runtime view — not stored on Urmodell (BOM SSOT).
54
+ </documentation>
59
55
  <references>
60
56
  <see type="fwdocumentation:ExpressionParsing" relation="ReadNext" />
61
57
  <see type="fwcap:ResolveEffectiveMembers" relation="Defines" />
62
58
  <see type="fwcap:ResolveContracts" relation="SeeAlso" />
63
59
  <see type="fwcap:FindLocalMember" relation="SeeAlso" />
64
60
  </references>
65
-
66
- </block>
61
+ </fwdocumentation:EffectiveMembers>
@@ -1,12 +1,6 @@
1
- <!--
2
- Framework Documentation — ExpressionParsing
3
- FQN: org.blockml.bml.framework.documentation.ExpressionParsing
4
- -->
5
- <block
6
- xmlns="http://blockml.org/bml"
7
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
8
- xsi:schemaLocation="http://blockml.org/bml https://blockml.org/schemas/bml.xsd
9
- "
1
+ <!--Framework Documentation — ExpressionParsing
2
+ FQN: org.blockml.bml.framework.documentation.ExpressionParsing-->
3
+ <fwdocumentation:ExpressionParsing xmlns="http://blockml.org/bml"
10
4
  xmlns:blockml="org.blockml.bml"
11
5
  xmlns:bom="org.blockml.bml.bom"
12
6
  xmlns:bomapi="org.blockml.bml.bom.api"
@@ -32,28 +26,33 @@
32
26
  xmlns:valdocumentation="org.blockml.bml.compiler.validator.documentation"
33
27
  xmlns:doc="org.blockml.bml.documentation">
34
28
 
35
- <name>ExpressionParsing</name>
36
- <type>fwdocumentation:ExpressionParsing</type>
37
- <baseType>core:Documentation</baseType>
38
- <is>parseExpression AST — no Urmodell writeback (B4)</is>
39
-
40
- <documentation>parseExpression(source) parses expression text into an ExpressionNode AST.
41
- parseInterpolatedText(source) scans Text for ${} holes (restricted profile).
42
- Lookup is the same as full expressions: size ≡ #this.size, this ≡ #this.this.
29
+ <baseType>
30
+ core:Documentation
31
+ </baseType>
32
+ <is>
33
+ parseExpression AST — no Urmodell writeback (B4)
34
+ </is>
35
+ <documentation>
36
+ parseExpression(source) parses expression text into an ExpressionNode AST.
37
+ parseInterpolatedText(source) scans Text for unescaped ${} holes (restricted
38
+ profile). `\${` is a literal `${`; `\\${` is one `\` plus a hole (odd/even
39
+ backslashes immediately before `$`). Lookup is the same as full expressions:
40
+ size ≡ #this.size, this ≡ #this.this.
43
41
  Returns ParseExpressionOutcome: { ok: true, result } | { ok: false, error }.
44
-
42
+ Empty expression text → BML_EXPRESSION_PARSE_ERROR (write `\${ }` for literal
43
+ delimiter characters).
44
+
45
45
  Parser stores ExpressionValue.raw / InterpolatedTextValue.raw only (B4).
46
46
  validateTypes re-parses at validation time and emits BML_EXPRESSION_PARSE_ERROR
47
47
  or BML_EXPR_NOT_ALLOWED_IN_INTERPOLATION on failure.
48
-
48
+
49
49
  AST node kinds: literal, array, object, property, call, binary, interpolated.
50
50
  Optional resultTypeFqn on ParseExpressionResult for typed expression metadata.
51
-
52
- Expression AST is a Stage-2 utility — never written back to Urmodell member values.</documentation>
53
-
51
+
52
+ Expression AST is a Stage-2 utility — never written back to Urmodell member values.
53
+ </documentation>
54
54
  <references>
55
55
  <see type="fwdocumentation:ConstraintValidation" relation="ReadNext" />
56
56
  <see type="fwexpression:ExpressionNode" relation="Defines" />
57
57
  </references>
58
-
59
- </block>
58
+ </fwdocumentation:ExpressionParsing>
@@ -1,12 +1,6 @@
1
- <!--
2
- Framework Documentation — Introduction
3
- FQN: org.blockml.bml.framework.documentation.Introduction
4
- -->
5
- <block
6
- xmlns="http://blockml.org/bml"
7
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
8
- xsi:schemaLocation="http://blockml.org/bml https://blockml.org/schemas/bml.xsd
9
- "
1
+ <!--Framework Documentation — Introduction
2
+ FQN: org.blockml.bml.framework.documentation.Introduction-->
3
+ <fwdocumentation:Introduction xmlns="http://blockml.org/bml"
10
4
  xmlns:blockml="org.blockml.bml"
11
5
  xmlns:bom="org.blockml.bml.bom"
12
6
  xmlns:bomapi="org.blockml.bml.bom.api"
@@ -32,28 +26,29 @@
32
26
  xmlns:valdocumentation="org.blockml.bml.compiler.validator.documentation"
33
27
  xmlns:doc="org.blockml.bml.documentation">
34
28
 
35
- <name>Introduction</name>
36
- <type>fwdocumentation:Introduction</type>
37
- <baseType>core:Documentation</baseType>
38
- <is>Purpose and scope of the Framework utilities package</is>
39
-
40
- <documentation>The @blockml/framework package provides Stage-2 framework utilities: TypeRegistry,
29
+ <baseType>
30
+ core:Documentation
31
+ </baseType>
32
+ <is>
33
+ Purpose and scope of the Framework utilities package
34
+ </is>
35
+ <documentation>
36
+ The @blockml/framework package provides Stage-2 framework utilities: TypeRegistry,
41
37
  bootstrapTypeRegistry, forkBom, resolveEffectiveMembers, parseExpression, validateTypes,
42
38
  and validateConstraints.
43
-
39
+
44
40
  This library (org.blockml.bml.framework.*) is the SSOT. TypeScript in
45
41
  packages/framework/src/ implements it. Parity tests in packages/framework/test/
46
42
  verify BML ↔ TS alignment.
47
-
43
+
48
44
  Stage-2 placement: after parse (Stage 1) and before render/compile targets.
49
45
  Consumed by @blockml/validator (orchestrator) and @blockml/cli (bootstrap host).
50
-
46
+
51
47
  Language BML corpus remains in npm @blockml/core (node_modules). Framework utilities
52
- operate on BomDocument (Urmodell) from @blockml/bom — they do not redefine meta-model blocks.</documentation>
53
-
48
+ operate on BomDocument (Urmodell) from @blockml/bom — they do not redefine meta-model blocks.
49
+ </documentation>
54
50
  <references>
55
51
  <see type="fwdocumentation:LayerSeparation" relation="ReadNext" />
56
52
  <see type="bomdocumentation:Introduction" relation="SeeAlso" />
57
53
  </references>
58
-
59
- </block>
54
+ </fwdocumentation:Introduction>
@@ -1,12 +1,6 @@
1
- <!--
2
- Framework Documentation — LayerSeparation
3
- FQN: org.blockml.bml.framework.documentation.LayerSeparation
4
- -->
5
- <block
6
- xmlns="http://blockml.org/bml"
7
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
8
- xsi:schemaLocation="http://blockml.org/bml https://blockml.org/schemas/bml.xsd
9
- "
1
+ <!--Framework Documentation — LayerSeparation
2
+ FQN: org.blockml.bml.framework.documentation.LayerSeparation-->
3
+ <fwdocumentation:LayerSeparation xmlns="http://blockml.org/bml"
10
4
  xmlns:blockml="org.blockml.bml"
11
5
  xmlns:bom="org.blockml.bml.bom"
12
6
  xmlns:bomapi="org.blockml.bml.bom.api"
@@ -32,31 +26,32 @@
32
26
  xmlns:valdocumentation="org.blockml.bml.compiler.validator.documentation"
33
27
  xmlns:doc="org.blockml.bml.documentation">
34
28
 
35
- <name>LayerSeparation</name>
36
- <type>fwdocumentation:LayerSeparation</type>
37
- <baseType>core:Documentation</baseType>
38
- <is>Framework vs BOM vs parser vs validator vs core</is>
39
-
40
- <documentation>Five layers relevant to framework utilities:
41
-
29
+ <baseType>
30
+ core:Documentation
31
+ </baseType>
32
+ <is>
33
+ Framework vs BOM vs parser vs validator vs core
34
+ </is>
35
+ <documentation>
36
+ Five layers relevant to framework utilities:
37
+
42
38
  org.blockml.bml.bom.* (@blockml/bom) — Urmodell data structures (BomDocument, …).
43
39
  ValidateOptions, ValidateResult, TypeRegistryReader (B26) live here.
44
-
40
+
45
41
  org.blockml.bml.framework.* (this package) — TypeRegistry, fork/resolve/validate utilities,
46
42
  parseExpression AST (Stage 2). Does not own validate() orchestration.
47
-
43
+
48
44
  org.blockml.bml.compiler.parser.* (@blockml/parser) — BML → BomDocument (Stage 1).
49
45
  bootstrapTypeRegistry calls parse() on corpus files.
50
-
46
+
51
47
  org.blockml.bml.compiler.validator.* (@blockml/validator) — validate() entry point;
52
48
  orchestrates framework utilities on a pragmatic fork.
53
-
49
+
54
50
  org.blockml.bml.definition.* (@blockml/core) — BML meta-model corpus (npm).
55
- Framework reads Definition types via TypeRegistry; does not duplicate grammar blocks.</documentation>
56
-
51
+ Framework reads Definition types via TypeRegistry; does not duplicate grammar blocks.
52
+ </documentation>
57
53
  <references>
58
54
  <see type="fwdocumentation:ArchitectureOverview" relation="ReadNext" />
59
55
  <see type="bomdocumentation:LayerSeparation" relation="SeeAlso" />
60
56
  </references>
61
-
62
- </block>
57
+ </fwdocumentation:LayerSeparation>
@@ -1,12 +1,6 @@
1
- <!--
2
- Framework Documentation — PackageOwnership
3
- FQN: org.blockml.bml.framework.documentation.PackageOwnership
4
- -->
5
- <block
6
- xmlns="http://blockml.org/bml"
7
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
8
- xsi:schemaLocation="http://blockml.org/bml https://blockml.org/schemas/bml.xsd
9
- "
1
+ <!--Framework Documentation — PackageOwnership
2
+ FQN: org.blockml.bml.framework.documentation.PackageOwnership-->
3
+ <fwdocumentation:PackageOwnership xmlns="http://blockml.org/bml"
10
4
  xmlns:blockml="org.blockml.bml"
11
5
  xmlns:bom="org.blockml.bml.bom"
12
6
  xmlns:bomapi="org.blockml.bml.bom.api"
@@ -32,28 +26,29 @@
32
26
  xmlns:valdocumentation="org.blockml.bml.compiler.validator.documentation"
33
27
  xmlns:doc="org.blockml.bml.documentation">
34
28
 
35
- <name>PackageOwnership</name>
36
- <type>fwdocumentation:PackageOwnership</type>
37
- <baseType>core:Documentation</baseType>
38
- <is>Toolchain package responsibilities for framework utilities</is>
39
-
40
- <documentation>@blockml/framework — TypeRegistry, bootstrap, forkBom, resolveEffectiveMembers,
29
+ <baseType>
30
+ core:Documentation
31
+ </baseType>
32
+ <is>
33
+ Toolchain package responsibilities for framework utilities
34
+ </is>
35
+ <documentation>
36
+ @blockml/framework — TypeRegistry, bootstrap, forkBom, resolveEffectiveMembers,
41
37
  parseExpression, validateTypes, validateConstraints. Owns this BML library.
42
-
38
+
43
39
  @blockml/bom — Urmodell types, ValidateOptions/ValidateResult, TypeRegistryReader,
44
40
  Diagnostic. Framework consumes; does not redefine.
45
-
41
+
46
42
  @blockml/parser — parse() used during bootstrap only.
47
-
43
+
48
44
  @blockml/validator — validate() orchestrator; calls framework utilities.
49
-
45
+
50
46
  @blockml/core (npm) — language/meta-model BML corpus; bootstrap source.
51
-
52
- @blockml/cli — TypeRegistry bootstrap host and validate/compile orchestration.</documentation>
53
-
47
+
48
+ @blockml/cli — TypeRegistry bootstrap host and validate/compile orchestration.
49
+ </documentation>
54
50
  <references>
55
51
  <see type="fwdocumentation:ScopeExclusions" relation="ReadNext" />
56
52
  <see type="bomdocumentation:PackageOwnership" relation="SeeAlso" />
57
53
  </references>
58
-
59
- </block>
54
+ </fwdocumentation:PackageOwnership>
@@ -1,12 +1,6 @@
1
- <!--
2
- Framework Documentation — PublicApi
3
- FQN: org.blockml.bml.framework.documentation.PublicApi
4
- -->
5
- <block
6
- xmlns="http://blockml.org/bml"
7
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
8
- xsi:schemaLocation="http://blockml.org/bml https://blockml.org/schemas/bml.xsd
9
- "
1
+ <!--Framework Documentation — PublicApi
2
+ FQN: org.blockml.bml.framework.documentation.PublicApi-->
3
+ <fwdocumentation:PublicApi xmlns="http://blockml.org/bml"
10
4
  xmlns:blockml="org.blockml.bml"
11
5
  xmlns:bom="org.blockml.bml.bom"
12
6
  xmlns:bomapi="org.blockml.bml.bom.api"
@@ -32,13 +26,16 @@
32
26
  xmlns:valdocumentation="org.blockml.bml.compiler.validator.documentation"
33
27
  xmlns:doc="org.blockml.bml.documentation">
34
28
 
35
- <name>PublicApi</name>
36
- <type>fwdocumentation:PublicApi</type>
37
- <baseType>core:Documentation</baseType>
38
- <is>Framework public exports from index.ts</is>
39
-
40
- <documentation><![CDATA[Public exports from @blockml/framework (packages/framework/src/index.ts):
41
-
29
+ <baseType>
30
+ core:Documentation
31
+ </baseType>
32
+ <is>
33
+ Framework public exports from index.ts
34
+ </is>
35
+ <documentation>
36
+ <![CDATA[
37
+ Public exports from @blockml/framework (packages/framework/src/index.ts):
38
+
42
39
  TypeRegistry — class; register/get/has/keys/size/withOverlay on BomDocument index
43
40
  bootstrapTypeRegistry(options?) → BootstrapResult
44
41
  bootstrapFullProjectRegistry({ rootDir, srcDir?, libraries? }) → BootstrapResult
@@ -70,14 +67,14 @@
70
67
  validateConstraints(document, registry) → Diagnostic[]
71
68
  getPropertyNumericValue(property) → number | undefined
72
69
  isLiteralValue(value) → boolean
73
-
70
+
74
71
  Types: BootstrapResult, BootstrapTrace, BootstrapOptions, ExpressionNode, ParseExpressionResult, ParseExpressionOutcome
75
-
76
- Not exported from index: getLiteralNumericValue (internal helper in validate-types.ts).]]></documentation>
77
-
72
+
73
+ Not exported from index: getLiteralNumericValue (internal helper in validate-types.ts).
74
+ ]]>
75
+ </documentation>
78
76
  <references>
79
77
  <see type="fwdocumentation:TypeRegistryBootstrap" relation="ReadNext" />
80
78
  <see type="bomapi:TypeRegistryReader" relation="SeeAlso" />
81
79
  </references>
82
-
83
- </block>
80
+ </fwdocumentation:PublicApi>
@@ -1,12 +1,6 @@
1
- <!--
2
- Framework Documentation — ScopeExclusions
3
- FQN: org.blockml.bml.framework.documentation.ScopeExclusions
4
- -->
5
- <block
6
- xmlns="http://blockml.org/bml"
7
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
8
- xsi:schemaLocation="http://blockml.org/bml https://blockml.org/schemas/bml.xsd
9
- "
1
+ <!--Framework Documentation — ScopeExclusions
2
+ FQN: org.blockml.bml.framework.documentation.ScopeExclusions-->
3
+ <fwdocumentation:ScopeExclusions xmlns="http://blockml.org/bml"
10
4
  xmlns:blockml="org.blockml.bml"
11
5
  xmlns:bom="org.blockml.bml.bom"
12
6
  xmlns:bomapi="org.blockml.bml.bom.api"
@@ -32,24 +26,25 @@
32
26
  xmlns:valdocumentation="org.blockml.bml.compiler.validator.documentation"
33
27
  xmlns:doc="org.blockml.bml.documentation">
34
28
 
35
- <name>ScopeExclusions</name>
36
- <type>fwdocumentation:ScopeExclusions</type>
37
- <baseType>core:Documentation</baseType>
38
- <is>Explicit out-of-scope for the framework package</is>
39
-
40
- <documentation>Out of scope for @blockml/framework:
41
-
29
+ <baseType>
30
+ core:Documentation
31
+ </baseType>
32
+ <is>
33
+ Explicit out-of-scope for the framework package
34
+ </is>
35
+ <documentation>
36
+ Out of scope for @blockml/framework:
37
+
42
38
  • parse() / serialize() public entry points — @blockml/parser / @blockml/serializer
43
39
  • validate() orchestration — @blockml/validator
44
40
  • CLI / file orchestration — @blockml/cli
45
41
  • Render target emit — @blockml/compiler / domain packages
46
42
  • Language BML block authorship — @blockml/core (npm)
47
43
  • BomBuilder (V3) — future; framework accepts its output types only
48
-
49
- In scope: Stage-2 utilities on BomDocument with TypeRegistry-backed semantic checks.</documentation>
50
-
44
+
45
+ In scope: Stage-2 utilities on BomDocument with TypeRegistry-backed semantic checks.
46
+ </documentation>
51
47
  <references>
52
48
  <see type="fwdocumentation:Introduction" relation="SeeAlso" />
53
49
  </references>
54
-
55
- </block>
50
+ </fwdocumentation:ScopeExclusions>
@@ -1,12 +1,6 @@
1
- <!--
2
- Framework Documentation — TypeRegistryBootstrap
3
- FQN: org.blockml.bml.framework.documentation.TypeRegistryBootstrap
4
- -->
5
- <block
6
- xmlns="http://blockml.org/bml"
7
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
8
- xsi:schemaLocation="http://blockml.org/bml https://blockml.org/schemas/bml.xsd
9
- "
1
+ <!--Framework Documentation — TypeRegistryBootstrap
2
+ FQN: org.blockml.bml.framework.documentation.TypeRegistryBootstrap-->
3
+ <fwdocumentation:TypeRegistryBootstrap xmlns="http://blockml.org/bml"
10
4
  xmlns:blockml="org.blockml.bml"
11
5
  xmlns:bom="org.blockml.bml.bom"
12
6
  xmlns:bomapi="org.blockml.bml.bom.api"
@@ -32,16 +26,18 @@
32
26
  xmlns:valdocumentation="org.blockml.bml.compiler.validator.documentation"
33
27
  xmlns:doc="org.blockml.bml.documentation">
34
28
 
35
- <name>TypeRegistryBootstrap</name>
36
- <type>fwdocumentation:TypeRegistryBootstrap</type>
37
- <baseType>core:Documentation</baseType>
38
- <is>defaultBootstrapPaths and bootstrapTypeRegistry</is>
39
-
40
- <documentation>bootstrapTypeRegistry(options?) supports two modes:
41
-
29
+ <baseType>
30
+ core:Documentation
31
+ </baseType>
32
+ <is>
33
+ defaultBootstrapPaths and bootstrapTypeRegistry
34
+ </is>
35
+ <documentation>
36
+ bootstrapTypeRegistry(options?) supports two modes:
37
+
42
38
  corpus (default) — walks options.paths (or defaultBootstrapPaths()) for all .bml files,
43
39
  parses via @blockml/parser parse(), registers each document root block.
44
-
40
+
45
41
  library — when options.libraryPaths is set, resolves each Library.bml dependency graph
46
42
  (dependencies, subLibraries) in order, then registers blocks from each library blocks root
47
43
  except trees already covered by options.paths (srcDir / corpus). Missing Library path →
@@ -50,43 +46,42 @@
50
46
  BML_LIBRARY_NESTING_VIOLATION. Duplicate files of the same type FQN are resolved by
51
47
  source priority: a path not under node_modules (workspace / project sources) wins over
52
48
  an npm copy; same-origin last write wins. The losing file is not compared and is not kept.
53
-
49
+
54
50
  defaultBootstrapPaths(rootDir?) returns BlockML srcDir roots for production
55
51
  npm dependencies (package.json dependencies + optionalDependencies) of the nearest
56
52
  package, resolved via node_modules walk-up. Used as corpus fallback when no paths
57
53
  are given. A BlockML package is identified by blockml.library or blockml.config.json;
58
54
  its source root is srcDir (default "blocks", override only in that package's
59
55
  blockml.config.json).
60
-
56
+
61
57
  resolveLibrarySeeds(rootDir, extras?) prepends package.json blockml.library, then
62
58
  extras (config.libraries / --libraries), deduped by realpath.
63
-
59
+
64
60
  bootstrapFullProjectRegistry({ rootDir, srcDir?, libraries? }) is the shared
65
61
  entry point for `blockml validate --all`, `@blockml/search`, and `@blockml/graph`. It sets
66
62
  corpus paths to projectSourceRoots (this package srcDir plus local packages/*
67
63
  BlockML modules) and library seeds to resolveLibrarySeeds, then calls
68
64
  bootstrapTypeRegistry. The resulting registry is the effective BML corpus:
69
65
  local project files plus the library graph including npm BlockML packages.
70
-
66
+
71
67
  bootstrapTypeRegistry also indexes Library.bml under all BlockML packages found in
72
68
  workspace packages/ and node_modules along the directory walk (FQN search space).
73
69
  Local srcDir and workspace packages are indexed before node_modules.
74
70
  resolveDepCandidate / findLibraryFileForType pick workspace over npm when the same
75
71
  Library type FQN exists in both (Core dogfooding against an installed copy).
76
-
72
+
77
73
  BootstrapResult: { registry, diagnostics, exportsByLibrary?, trace? }
78
74
  trace lists corpusPaths, seeds, searchRoots (index only), librariesVisited, and
79
75
  skippedCoveredRoots. Read errors emit BML_BOOTSTRAP_READ_ERROR (warning). Parse
80
76
  diagnostics are collected but do not stop registration of successfully parsed
81
77
  documents.
82
-
78
+
83
79
  Hosts (@blockml/cli, @blockml/validator) may inject a pre-built TypeRegistry via
84
80
  ValidateOptions.typeRegistry instead of bootstrapping. ValidateOptions.libraryPaths
85
- selects library mode when typeRegistry is omitted.</documentation>
86
-
81
+ selects library mode when typeRegistry is omitted.
82
+ </documentation>
87
83
  <references>
88
84
  <see type="fwdocumentation:EffectiveMembers" relation="ReadNext" />
89
85
  <see type="fwcap:BootstrapTypeRegistry" relation="Defines" />
90
86
  </references>
91
-
92
- </block>
87
+ </fwdocumentation:TypeRegistryBootstrap>