@blockml/bom 0.1.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/blocks/org/blockml/bml/bom/Library.bml +153 -0
- package/blocks/org/blockml/bml/bom/README.bml +55 -0
- package/blocks/org/blockml/bml/bom/UrmodellType.bml +39 -0
- package/blocks/org/blockml/bml/bom/api/ParseOptions.bml +42 -0
- package/blocks/org/blockml/bml/bom/api/ParseResult.bml +45 -0
- package/blocks/org/blockml/bml/bom/api/SerializeOptions.bml +42 -0
- package/blocks/org/blockml/bml/bom/api/SerializeResult.bml +45 -0
- package/blocks/org/blockml/bml/bom/api/TypeRegistryReader.bml +34 -0
- package/blocks/org/blockml/bml/bom/api/ValidateOptions.bml +50 -0
- package/blocks/org/blockml/bml/bom/api/ValidateResult.bml +46 -0
- package/blocks/org/blockml/bml/bom/block/AliasEntry.bml +51 -0
- package/blocks/org/blockml/bml/bom/block/BlockDefinition.bml +136 -0
- package/blocks/org/blockml/bml/bom/block/ChangelogEntry.bml +48 -0
- package/blocks/org/blockml/bml/bom/block/DocumentationExample.bml +57 -0
- package/blocks/org/blockml/bml/bom/block/DocumentationProseEntry.bml +51 -0
- package/blocks/org/blockml/bml/bom/block/DocumentationReference.bml +72 -0
- package/blocks/org/blockml/bml/bom/block/GenericType.bml +45 -0
- package/blocks/org/blockml/bml/bom/block/KeywordEntry.bml +51 -0
- package/blocks/org/blockml/bml/bom/block/TypeReferenceEntityInstance.bml +45 -0
- package/blocks/org/blockml/bml/bom/capability/BomEquals.bml +45 -0
- package/blocks/org/blockml/bml/bom/capability/StripProvenance.bml +42 -0
- package/blocks/org/blockml/bml/bom/common/CharacterDataForm.bml +39 -0
- package/blocks/org/blockml/bml/bom/common/Diagnostic.bml +48 -0
- package/blocks/org/blockml/bml/bom/common/DiagnosticSeverity.bml +39 -0
- package/blocks/org/blockml/bml/bom/common/MemberSectionName.bml +39 -0
- package/blocks/org/blockml/bml/bom/common/MetadataElementTrivia.bml +39 -0
- package/blocks/org/blockml/bml/bom/common/SourceInfo.bml +51 -0
- package/blocks/org/blockml/bml/bom/common/SourceLocation.bml +51 -0
- package/blocks/org/blockml/bml/bom/common/XmlNodeKind.bml +39 -0
- package/blocks/org/blockml/bml/bom/common/XmlRenderingBlock.bml +39 -0
- package/blocks/org/blockml/bml/bom/common/XmlRenderingMember.bml +48 -0
- package/blocks/org/blockml/bml/bom/common/XmlTrivia.bml +42 -0
- package/blocks/org/blockml/bml/bom/composition/BlockInstance.bml +72 -0
- package/blocks/org/blockml/bml/bom/composition/BlockInstanceNode.bml +49 -0
- package/blocks/org/blockml/bml/bom/composition/CompositionNode.bml +35 -0
- package/blocks/org/blockml/bml/bom/composition/CompositionTemplate.bml +48 -0
- package/blocks/org/blockml/bml/bom/composition/DirectiveAttribute.bml +35 -0
- package/blocks/org/blockml/bml/bom/composition/EachDirective.bml +49 -0
- package/blocks/org/blockml/bml/bom/composition/IfDirective.bml +43 -0
- package/blocks/org/blockml/bml/bom/composition/InstanceAggregationComposition.bml +42 -0
- package/blocks/org/blockml/bml/bom/composition/UnlessDirective.bml +43 -0
- package/blocks/org/blockml/bml/bom/composition/VirtualContainerNode.bml +49 -0
- package/blocks/org/blockml/bml/bom/composition/WithBinding.bml +42 -0
- package/blocks/org/blockml/bml/bom/composition/WithDirective.bml +43 -0
- package/blocks/org/blockml/bml/bom/document/BomDocument.bml +49 -0
- package/blocks/org/blockml/bml/bom/documentation/AbstractionPrinciple.bml +46 -0
- package/blocks/org/blockml/bml/bom/documentation/ArchitectureOverview.bml +49 -0
- package/blocks/org/blockml/bml/bom/documentation/AuthoredSurfaceTable.bml +47 -0
- package/blocks/org/blockml/bml/bom/documentation/CalibratorExample.bml +53 -0
- package/blocks/org/blockml/bml/bom/documentation/CompositionDirectives.bml +45 -0
- package/blocks/org/blockml/bml/bom/documentation/DesignDecisions.bml +64 -0
- package/blocks/org/blockml/bml/bom/documentation/InstanceIdRules.bml +45 -0
- package/blocks/org/blockml/bml/bom/documentation/Introduction.bml +50 -0
- package/blocks/org/blockml/bml/bom/documentation/LayerSeparation.bml +47 -0
- package/blocks/org/blockml/bml/bom/documentation/MemberValueSemantics.bml +48 -0
- package/blocks/org/blockml/bml/bom/documentation/PackageOwnership.bml +56 -0
- package/blocks/org/blockml/bml/bom/documentation/PublicApi.bml +59 -0
- package/blocks/org/blockml/bml/bom/documentation/RelatedDiagnostics.bml +51 -0
- package/blocks/org/blockml/bml/bom/documentation/ScopeExclusions.bml +47 -0
- package/blocks/org/blockml/bml/bom/documentation/SubBlockAndEmbeddedBlocks.bml +45 -0
- package/blocks/org/blockml/bml/bom/documentation/TypeExpressionsOverview.bml +47 -0
- package/blocks/org/blockml/bml/bom/documentation/ValidationResponsibilities.bml +51 -0
- package/blocks/org/blockml/bml/bom/documentation/VersionRules.bml +41 -0
- package/blocks/org/blockml/bml/bom/documentation/XmlComments.bml +47 -0
- package/blocks/org/blockml/bml/bom/member/AggregationDefinition.bml +58 -0
- package/blocks/org/blockml/bml/bom/member/AssociationDefinition.bml +46 -0
- package/blocks/org/blockml/bml/bom/member/CapabilityDefinition.bml +52 -0
- package/blocks/org/blockml/bml/bom/member/ConstrainableDefinition.bml +39 -0
- package/blocks/org/blockml/bml/bom/member/EmbeddedExpression.bml +45 -0
- package/blocks/org/blockml/bml/bom/member/ImplementationBlock.bml +51 -0
- package/blocks/org/blockml/bml/bom/member/MemberDefinition.bml +35 -0
- package/blocks/org/blockml/bml/bom/member/MemberDefinitionBase.bml +90 -0
- package/blocks/org/blockml/bml/bom/member/PropertyDefinition.bml +61 -0
- package/blocks/org/blockml/bml/bom/member/PropertyValueEntry.bml +42 -0
- package/blocks/org/blockml/bml/bom/type/AnonymousStructType.bml +43 -0
- package/blocks/org/blockml/bml/bom/type/GenericParameterReference.bml +43 -0
- package/blocks/org/blockml/bml/bom/type/InstanceConfiguration.bml +42 -0
- package/blocks/org/blockml/bml/bom/type/Multiplicity.bml +42 -0
- package/blocks/org/blockml/bml/bom/type/NamedTypeReference.bml +52 -0
- package/blocks/org/blockml/bml/bom/type/SelfTypeReference.bml +40 -0
- package/blocks/org/blockml/bml/bom/type/StructField.bml +42 -0
- package/blocks/org/blockml/bml/bom/type/TypeDescriptor.bml +37 -0
- package/blocks/org/blockml/bml/bom/type/TypeExpression.bml +35 -0
- package/blocks/org/blockml/bml/bom/type/UnionTypeExpression.bml +43 -0
- package/blocks/org/blockml/bml/bom/value/Address.bml +54 -0
- package/blocks/org/blockml/bml/bom/value/AddressValue.bml +43 -0
- package/blocks/org/blockml/bml/bom/value/ExpressionValue.bml +49 -0
- package/blocks/org/blockml/bml/bom/value/LiteralValue.bml +49 -0
- package/blocks/org/blockml/bml/bom/value/MemberValue.bml +35 -0
- package/dist/equals.d.ts +10 -0
- package/dist/equals.d.ts.map +1 -0
- package/dist/equals.js +94 -0
- package/dist/equals.js.map +1 -0
- package/dist/index.d.ts +10 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -0
- package/dist/types/api.d.ts +50 -0
- package/dist/types/api.d.ts.map +1 -0
- package/dist/types/api.js +2 -0
- package/dist/types/api.js.map +1 -0
- package/dist/types/block-definition.d.ts +150 -0
- package/dist/types/block-definition.d.ts.map +1 -0
- package/dist/types/block-definition.js +2 -0
- package/dist/types/block-definition.js.map +1 -0
- package/dist/types/common.d.ts +60 -0
- package/dist/types/common.d.ts.map +1 -0
- package/dist/types/common.js +2 -0
- package/dist/types/common.js.map +1 -0
- package/dist/types/composition.d.ts +77 -0
- package/dist/types/composition.d.ts.map +1 -0
- package/dist/types/composition.js +2 -0
- package/dist/types/composition.js.map +1 -0
- package/dist/types/document.d.ts +12 -0
- package/dist/types/document.d.ts.map +1 -0
- package/dist/types/document.js +2 -0
- package/dist/types/document.js.map +1 -0
- package/dist/types/member-definition.d.ts +96 -0
- package/dist/types/member-definition.d.ts.map +1 -0
- package/dist/types/member-definition.js +2 -0
- package/dist/types/member-definition.js.map +1 -0
- package/dist/types/type-expression.d.ts +42 -0
- package/dist/types/type-expression.d.ts.map +1 -0
- package/dist/types/type-expression.js +2 -0
- package/dist/types/type-expression.js.map +1 -0
- package/dist/types/values.d.ts +35 -0
- package/dist/types/values.d.ts.map +1 -0
- package/dist/types/values.js +2 -0
- package/dist/types/values.js.map +1 -0
- package/package.json +40 -0
package/dist/equals.js
ADDED
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
function isSourceLocation(value) {
|
|
2
|
+
if (value === null || typeof value !== "object" || Array.isArray(value)) {
|
|
3
|
+
return false;
|
|
4
|
+
}
|
|
5
|
+
const obj = value;
|
|
6
|
+
return (typeof obj["file"] === "string" &&
|
|
7
|
+
typeof obj["line"] === "number" &&
|
|
8
|
+
typeof obj["column"] === "number");
|
|
9
|
+
}
|
|
10
|
+
function isSourceInfo(value) {
|
|
11
|
+
if (value === null || typeof value !== "object" || Array.isArray(value)) {
|
|
12
|
+
return false;
|
|
13
|
+
}
|
|
14
|
+
const obj = value;
|
|
15
|
+
return obj["format"] === "xml" && typeof obj["filePath"] === "string";
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Deep-clone a value tree omitting provenance keys recursively (B20).
|
|
19
|
+
* Removes SourceInfo, SourceLocation spans, and optional endLine/endColumn —
|
|
20
|
+
* but preserves ImplementationBlock.source (implementation code body).
|
|
21
|
+
*/
|
|
22
|
+
export function stripProvenance(node) {
|
|
23
|
+
if (node === null || node === undefined) {
|
|
24
|
+
return node;
|
|
25
|
+
}
|
|
26
|
+
if (Array.isArray(node)) {
|
|
27
|
+
return node.map((item) => stripProvenance(item));
|
|
28
|
+
}
|
|
29
|
+
if (typeof node !== "object") {
|
|
30
|
+
return node;
|
|
31
|
+
}
|
|
32
|
+
const result = {};
|
|
33
|
+
for (const [key, value] of Object.entries(node)) {
|
|
34
|
+
if (key === "sourceLocation" || key === "endLine" || key === "endColumn") {
|
|
35
|
+
continue;
|
|
36
|
+
}
|
|
37
|
+
if (key === "source" && (isSourceLocation(value) || isSourceInfo(value))) {
|
|
38
|
+
continue;
|
|
39
|
+
}
|
|
40
|
+
result[key] = stripProvenance(value);
|
|
41
|
+
}
|
|
42
|
+
return result;
|
|
43
|
+
}
|
|
44
|
+
function deepEqual(a, b) {
|
|
45
|
+
if (Object.is(a, b)) {
|
|
46
|
+
return true;
|
|
47
|
+
}
|
|
48
|
+
if (a === null || b === null || a === undefined || b === undefined) {
|
|
49
|
+
return a === b;
|
|
50
|
+
}
|
|
51
|
+
if (typeof a !== typeof b) {
|
|
52
|
+
return false;
|
|
53
|
+
}
|
|
54
|
+
if (Array.isArray(a)) {
|
|
55
|
+
if (!Array.isArray(b) || a.length !== b.length) {
|
|
56
|
+
return false;
|
|
57
|
+
}
|
|
58
|
+
for (let i = 0; i < a.length; i++) {
|
|
59
|
+
if (!deepEqual(a[i], b[i])) {
|
|
60
|
+
return false;
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
return true;
|
|
64
|
+
}
|
|
65
|
+
if (typeof a === "object") {
|
|
66
|
+
if (typeof b !== "object" || Array.isArray(b)) {
|
|
67
|
+
return false;
|
|
68
|
+
}
|
|
69
|
+
const aObj = a;
|
|
70
|
+
const bObj = b;
|
|
71
|
+
const aKeys = Object.keys(aObj).sort();
|
|
72
|
+
const bKeys = Object.keys(bObj).sort();
|
|
73
|
+
if (aKeys.length !== bKeys.length) {
|
|
74
|
+
return false;
|
|
75
|
+
}
|
|
76
|
+
for (let i = 0; i < aKeys.length; i++) {
|
|
77
|
+
const key = aKeys[i];
|
|
78
|
+
const bKey = bKeys[i];
|
|
79
|
+
if (key === undefined || bKey === undefined || key !== bKey) {
|
|
80
|
+
return false;
|
|
81
|
+
}
|
|
82
|
+
if (!deepEqual(aObj[key], bObj[bKey])) {
|
|
83
|
+
return false;
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
return true;
|
|
87
|
+
}
|
|
88
|
+
return false;
|
|
89
|
+
}
|
|
90
|
+
/** Structural equality modulo provenance (B20). */
|
|
91
|
+
export function bomEquals(a, b) {
|
|
92
|
+
return deepEqual(stripProvenance(a), stripProvenance(b));
|
|
93
|
+
}
|
|
94
|
+
//# sourceMappingURL=equals.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"equals.js","sourceRoot":"","sources":["../src/equals.ts"],"names":[],"mappings":"AAEA,SAAS,gBAAgB,CAAC,KAAc;IACtC,IAAI,KAAK,KAAK,IAAI,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC;QACxE,OAAO,KAAK,CAAC;IACf,CAAC;IACD,MAAM,GAAG,GAAG,KAAgC,CAAC;IAC7C,OAAO,CACL,OAAO,GAAG,CAAC,MAAM,CAAC,KAAK,QAAQ;QAC/B,OAAO,GAAG,CAAC,MAAM,CAAC,KAAK,QAAQ;QAC/B,OAAO,GAAG,CAAC,QAAQ,CAAC,KAAK,QAAQ,CAClC,CAAC;AACJ,CAAC;AAED,SAAS,YAAY,CAAC,KAAc;IAClC,IAAI,KAAK,KAAK,IAAI,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC;QACxE,OAAO,KAAK,CAAC;IACf,CAAC;IACD,MAAM,GAAG,GAAG,KAAgC,CAAC;IAC7C,OAAO,GAAG,CAAC,QAAQ,CAAC,KAAK,KAAK,IAAI,OAAO,GAAG,CAAC,UAAU,CAAC,KAAK,QAAQ,CAAC;AACxE,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,eAAe,CAAI,IAAO;IACxC,IAAI,IAAI,KAAK,IAAI,IAAI,IAAI,KAAK,SAAS,EAAE,CAAC;QACxC,OAAO,IAAI,CAAC;IACd,CAAC;IAED,IAAI,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,CAAC;QACxB,OAAO,IAAI,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC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C,IAAI,CAAC,CAAC,EAAE,CAAC;gBACtC,OAAO,KAAK,CAAC;YACf,CAAC;QACH,CAAC;QACD,OAAO,IAAI,CAAC;IACd,CAAC;IAED,OAAO,KAAK,CAAC;AACf,CAAC;AAED,mDAAmD;AACnD,MAAM,UAAU,SAAS,CAAC,CAAc,EAAE,CAAc;IACtD,OAAO,SAAS,CAAC,eAAe,CAAC,CAAC,CAAC,EAAE,eAAe,CAAC,CAAC,CAAC,CAAC,CAAC;AAC3D,CAAC"}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export type { SourceLocation, SourceInfo, XmlTrivia, MemberSectionName, MetadataElementTrivia, XmlNodeKind, CharacterDataForm, XmlRenderingBlock, XmlRenderingMember, DiagnosticSeverity, Diagnostic, } from "./types/common.js";
|
|
2
|
+
export type { BomDocument } from "./types/document.js";
|
|
3
|
+
export type { TypeReferenceEntityInstance, GenericType, BlockDefinition, KeywordEntry, DocumentationProseEntry, AliasEntry, ChangelogEntry, DocumentationExample, DocumentationReference, } from "./types/block-definition.js";
|
|
4
|
+
export type { TypeExpression, TypeDescriptor, Multiplicity, InstanceConfiguration, NamedTypeReference, UnionTypeExpression, GenericParameterReference, SelfTypeReference, AnonymousStructType, StructField, } from "./types/type-expression.js";
|
|
5
|
+
export type { MemberDefinition, ConstrainableDefinition, MemberDefinitionBase, PropertyDefinition, PropertyValueEntry, AggregationDefinition, AssociationDefinition, CapabilityDefinition, ImplementationBlock, EmbeddedExpression, } from "./types/member-definition.js";
|
|
6
|
+
export type { CompositionTemplate, InstanceAggregationComposition, CompositionNode, BlockInstanceNode, VirtualContainerNode, BlockInstance, DirectiveAttribute, EachDirective, IfDirective, UnlessDirective, WithDirective, WithBinding, } from "./types/composition.js";
|
|
7
|
+
export type { MemberValue, LiteralValue, ExpressionValue, AddressValue, Address, } from "./types/values.js";
|
|
8
|
+
export type { ParseResult, SerializeResult, ParseOptions, SerializeOptions, ValidateResult, ValidateOptions, TypeRegistryReader, } from "./types/api.js";
|
|
9
|
+
export { bomEquals, stripProvenance } from "./equals.js";
|
|
10
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,YAAY,EACV,cAAc,EACd,UAAU,EACV,SAAS,EACT,iBAAiB,EACjB,qBAAqB,EACrB,WAAW,EACX,iBAAiB,EACjB,iBAAiB,EACjB,kBAAkB,EAClB,kBAAkB,EAClB,UAAU,GACX,MAAM,mBAAmB,CAAC;AAE3B,YAAY,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAEvD,YAAY,EACV,2BAA2B,EAC3B,WAAW,EACX,eAAe,EACf,YAAY,EACZ,uBAAuB,EACvB,UAAU,EACV,cAAc,EACd,oBAAoB,EACpB,sBAAsB,GACvB,MAAM,6BAA6B,CAAC;AAErC,YAAY,EACV,cAAc,EACd,cAAc,EACd,YAAY,EACZ,qBAAqB,EACrB,kBAAkB,EAClB,mBAAmB,EACnB,yBAAyB,EACzB,iBAAiB,EACjB,mBAAmB,EACnB,WAAW,GACZ,MAAM,4BAA4B,CAAC;AAEpC,YAAY,EACV,gBAAgB,EAChB,uBAAuB,EACvB,oBAAoB,EACpB,kBAAkB,EAClB,kBAAkB,EAClB,qBAAqB,EACrB,qBAAqB,EACrB,oBAAoB,EACpB,mBAAmB,EACnB,kBAAkB,GACnB,MAAM,8BAA8B,CAAC;AAEtC,YAAY,EACV,mBAAmB,EACnB,8BAA8B,EAC9B,eAAe,EACf,iBAAiB,EACjB,oBAAoB,EACpB,aAAa,EACb,kBAAkB,EAClB,aAAa,EACb,WAAW,EACX,eAAe,EACf,aAAa,EACb,WAAW,GACZ,MAAM,wBAAwB,CAAC;AAEhC,YAAY,EACV,WAAW,EACX,YAAY,EACZ,eAAe,EACf,YAAY,EACZ,OAAO,GACR,MAAM,mBAAmB,CAAC;AAE3B,YAAY,EACV,WAAW,EACX,eAAe,EACf,YAAY,EACZ,gBAAgB,EAChB,cAAc,EACd,eAAe,EACf,kBAAkB,GACnB,MAAM,gBAAgB,CAAC;AAExB,OAAO,EAAE,SAAS,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAuFA,OAAO,EAAE,SAAS,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC"}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import type { BomDocument } from "./document.js";
|
|
2
|
+
import type { Diagnostic } from "./common.js";
|
|
3
|
+
export interface ParseResult {
|
|
4
|
+
/** null only on hard fail (format / malformed XML / no usable root). */
|
|
5
|
+
document: BomDocument | null;
|
|
6
|
+
diagnostics: Diagnostic[];
|
|
7
|
+
/** false if any diagnostic has severity === "error". */
|
|
8
|
+
success: boolean;
|
|
9
|
+
}
|
|
10
|
+
export interface SerializeResult {
|
|
11
|
+
/** null only if serialize cannot produce text. */
|
|
12
|
+
text: string | null;
|
|
13
|
+
diagnostics: Diagnostic[];
|
|
14
|
+
success: boolean;
|
|
15
|
+
}
|
|
16
|
+
export interface ParseOptions {
|
|
17
|
+
/** default: "<memory>" — written to BomDocument.source.filePath */
|
|
18
|
+
filePath?: string;
|
|
19
|
+
/** default true — keep mapping after errors; attach document when possible */
|
|
20
|
+
continueOnError?: boolean;
|
|
21
|
+
}
|
|
22
|
+
export interface SerializeOptions {
|
|
23
|
+
/** default 2 — pretty-print spaces (B13); 0 = compact */
|
|
24
|
+
indent?: number;
|
|
25
|
+
/** default false — omit <?xml …?> (B17 / B24) */
|
|
26
|
+
xmlDeclaration?: boolean;
|
|
27
|
+
}
|
|
28
|
+
/** Minimal registry surface for ValidateOptions (implemented by @blockml/framework TypeRegistry). */
|
|
29
|
+
export interface TypeRegistryReader {
|
|
30
|
+
get(fqn: string): BomDocument | undefined;
|
|
31
|
+
has(fqn: string): boolean;
|
|
32
|
+
}
|
|
33
|
+
export interface ValidateResult {
|
|
34
|
+
/** Forked pragmatic model when validation ran (resolve-only copy). */
|
|
35
|
+
pragmaticModel?: BomDocument;
|
|
36
|
+
diagnostics: Diagnostic[];
|
|
37
|
+
/** false if any diagnostic has severity === "error". */
|
|
38
|
+
success: boolean;
|
|
39
|
+
}
|
|
40
|
+
export interface ValidateOptions {
|
|
41
|
+
/** Pre-built registry; when omitted, bootstrap from bootstrapPaths / libraryPaths. */
|
|
42
|
+
typeRegistry?: TypeRegistryReader;
|
|
43
|
+
/** Directories scanned for .bml when typeRegistry omitted (corpus mode). */
|
|
44
|
+
bootstrapPaths?: string[];
|
|
45
|
+
/** Library.bml paths for library-graph bootstrap when typeRegistry omitted. */
|
|
46
|
+
libraryPaths?: string[];
|
|
47
|
+
/** default true — continue after errors; still attach pragmaticModel when possible */
|
|
48
|
+
continueOnError?: boolean;
|
|
49
|
+
}
|
|
50
|
+
//# sourceMappingURL=api.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"api.d.ts","sourceRoot":"","sources":["../../src/types/api.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AACjD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAE9C,MAAM,WAAW,WAAW;IAC1B,wEAAwE;IACxE,QAAQ,EAAE,WAAW,GAAG,IAAI,CAAC;IAC7B,WAAW,EAAE,UAAU,EAAE,CAAC;IAC1B,wDAAwD;IACxD,OAAO,EAAE,OAAO,CAAC;CAClB;AAED,MAAM,WAAW,eAAe;IAC9B,kDAAkD;IAClD,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB,WAAW,EAAE,UAAU,EAAE,CAAC;IAC1B,OAAO,EAAE,OAAO,CAAC;CAClB;AAED,MAAM,WAAW,YAAY;IAC3B,mEAAmE;IACnE,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,8EAA8E;IAC9E,eAAe,CAAC,EAAE,OAAO,CAAC;CAC3B;AAED,MAAM,WAAW,gBAAgB;IAC/B,yDAAyD;IACzD,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,iDAAiD;IACjD,cAAc,CAAC,EAAE,OAAO,CAAC;CAC1B;AAED,qGAAqG;AACrG,MAAM,WAAW,kBAAkB;IACjC,GAAG,CAAC,GAAG,EAAE,MAAM,GAAG,WAAW,GAAG,SAAS,CAAC;IAC1C,GAAG,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CAC3B;AAED,MAAM,WAAW,cAAc;IAC7B,sEAAsE;IACtE,cAAc,CAAC,EAAE,WAAW,CAAC;IAC7B,WAAW,EAAE,UAAU,EAAE,CAAC;IAC1B,wDAAwD;IACxD,OAAO,EAAE,OAAO,CAAC;CAClB;AAED,MAAM,WAAW,eAAe;IAC9B,sFAAsF;IACtF,YAAY,CAAC,EAAE,kBAAkB,CAAC;IAClC,4EAA4E;IAC5E,cAAc,CAAC,EAAE,MAAM,EAAE,CAAC;IAC1B,+EAA+E;IAC/E,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;IACxB,sFAAsF;IACtF,eAAe,CAAC,EAAE,OAAO,CAAC;CAC3B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"api.js","sourceRoot":"","sources":["../../src/types/api.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
import type { CharacterDataForm, MetadataElementTrivia, MemberSectionName, SourceLocation, XmlRenderingBlock, XmlTrivia } from "./common.js";
|
|
2
|
+
import type { BlockInstance } from "./composition.js";
|
|
3
|
+
import type { MemberDefinition } from "./member-definition.js";
|
|
4
|
+
import type { CompositionTemplate } from "./composition.js";
|
|
5
|
+
/** BOM shape for org.blockml.bml.type.TypeReferenceEntity(B[, D]) instances. */
|
|
6
|
+
export interface TypeReferenceEntityInstance {
|
|
7
|
+
typeFqn: "org.blockml.bml.type.TypeReferenceEntity";
|
|
8
|
+
/** Authored / resolved TypeReference (FQN or TypeExpression). */
|
|
9
|
+
value: string;
|
|
10
|
+
/** Bound B from the aggregation type application (when recorded). */
|
|
11
|
+
boundB?: string;
|
|
12
|
+
}
|
|
13
|
+
export interface GenericType {
|
|
14
|
+
/** Parameter name (e.g. T). */
|
|
15
|
+
name: string;
|
|
16
|
+
/** FQN constraint — each concrete type argument must satisfy this bound. */
|
|
17
|
+
baseType: string;
|
|
18
|
+
/**
|
|
19
|
+
* Optional default when a generic application omits this argument.
|
|
20
|
+
* Concrete TypeExpression, or the name of an earlier sibling generic parameter.
|
|
21
|
+
*/
|
|
22
|
+
defaultType?: string;
|
|
23
|
+
}
|
|
24
|
+
export interface BlockDefinition {
|
|
25
|
+
/** Short class name (PascalCase). Required. */
|
|
26
|
+
name: string;
|
|
27
|
+
/**
|
|
28
|
+
* Globally unique FQN.
|
|
29
|
+
* Required on root blocks (authored in BML).
|
|
30
|
+
* Derived on Sub-Blocks: parentFqn + "." + name
|
|
31
|
+
*/
|
|
32
|
+
type: string;
|
|
33
|
+
/** Parent type FQN. Omitted in some corpus files. */
|
|
34
|
+
baseType?: string;
|
|
35
|
+
/** Semantic version of this definition. Omitted when inherited from Library. */
|
|
36
|
+
version?: string;
|
|
37
|
+
/** Required: names the Idea (Urbild). */
|
|
38
|
+
is?: string;
|
|
39
|
+
/** Short prose expansions (i18n + optional QName facets). */
|
|
40
|
+
summaries?: DocumentationProseEntry[];
|
|
41
|
+
/** Optional search/discovery tags — core.Keyword Entity instances. */
|
|
42
|
+
keywords?: KeywordEntry[];
|
|
43
|
+
/** Natural language for documentation prose — TypeReferenceEntity instance. */
|
|
44
|
+
language?: TypeReferenceEntityInstance;
|
|
45
|
+
/** Resolved FQN projection of language.value. */
|
|
46
|
+
languageFqn?: string;
|
|
47
|
+
/** Technical prose entries (i18n + optional QName facets). */
|
|
48
|
+
documentations?: DocumentationProseEntry[];
|
|
49
|
+
/** What this Block is not — required when confusion risk exists. */
|
|
50
|
+
isNot?: string;
|
|
51
|
+
/** Alternative names for this Block type — core.Alias Entity instances. */
|
|
52
|
+
aliases?: AliasEntry[];
|
|
53
|
+
/** Semantic version from which this definition is available. */
|
|
54
|
+
since?: string;
|
|
55
|
+
/** Version history entries — oldest first. */
|
|
56
|
+
changelog?: ChangelogEntry[];
|
|
57
|
+
/** Usage examples with character-data body. */
|
|
58
|
+
examples?: DocumentationExample[];
|
|
59
|
+
/** Cross-references to related Blocks or Definitions. */
|
|
60
|
+
references?: DocumentationReference[];
|
|
61
|
+
/** Abstract type — not usable as composition instance type. Default false. */
|
|
62
|
+
abstract?: boolean;
|
|
63
|
+
/** Final type — cannot be used as baseType on definitions. Default false. */
|
|
64
|
+
final?: boolean;
|
|
65
|
+
/** Authored block-level `<bml:xml>…</bml:xml>`. */
|
|
66
|
+
xmlRendering?: XmlRenderingBlock;
|
|
67
|
+
/** BlockML access visibility — Sub-Blocks only. */
|
|
68
|
+
visibility?: "private" | "protected" | "public";
|
|
69
|
+
/** Contract TypeReferenceEntity instances merged into this Block. Root block only. */
|
|
70
|
+
contracts?: TypeReferenceEntityInstance[];
|
|
71
|
+
/** Generic type parameters declared on this Block. */
|
|
72
|
+
genericTypes?: GenericType[];
|
|
73
|
+
/** Definition meta-model type FQN for this block's definition document. */
|
|
74
|
+
definitionFqn?: string;
|
|
75
|
+
/** Constraint Block instances on this Block definition. */
|
|
76
|
+
constraints?: BlockInstance[];
|
|
77
|
+
/**
|
|
78
|
+
* Members declared in THIS block only — not inherited.
|
|
79
|
+
* Array order is significant.
|
|
80
|
+
*/
|
|
81
|
+
members: MemberDefinition[];
|
|
82
|
+
/** Sub-Block definitions nested under this block. */
|
|
83
|
+
subBlocks: BlockDefinition[];
|
|
84
|
+
/**
|
|
85
|
+
* Inline Library — virtual .bml files on the document root only.
|
|
86
|
+
* Each entry is EmbeddedBlockDefinition.
|
|
87
|
+
*/
|
|
88
|
+
embeddedBlocks: BlockDefinition[];
|
|
89
|
+
/** Composition templates — derived from nested composition inside aggregation members. */
|
|
90
|
+
compositions: CompositionTemplate[];
|
|
91
|
+
/** XML comments on this definition element itself (B11). */
|
|
92
|
+
xmlTrivia?: XmlTrivia;
|
|
93
|
+
/** Comments bound to flattened member-section containers. */
|
|
94
|
+
memberSectionTrivia?: Partial<Record<MemberSectionName, XmlTrivia>>;
|
|
95
|
+
/** Comments bound to metadata child elements that map to fields. */
|
|
96
|
+
metadataTrivia?: MetadataElementTrivia;
|
|
97
|
+
/** BML source span of this definition (root or sub-block). */
|
|
98
|
+
source?: SourceLocation;
|
|
99
|
+
}
|
|
100
|
+
export interface KeywordEntry {
|
|
101
|
+
typeFqn: string;
|
|
102
|
+
term?: string;
|
|
103
|
+
languageFqn?: string;
|
|
104
|
+
weight?: number;
|
|
105
|
+
source?: SourceLocation;
|
|
106
|
+
}
|
|
107
|
+
export interface DocumentationProseEntry {
|
|
108
|
+
namespace: string;
|
|
109
|
+
text: string;
|
|
110
|
+
languageFqn: string;
|
|
111
|
+
authoredCharacterDataForm?: CharacterDataForm;
|
|
112
|
+
source?: SourceLocation;
|
|
113
|
+
}
|
|
114
|
+
export interface AliasEntry {
|
|
115
|
+
typeFqn: string;
|
|
116
|
+
name?: string;
|
|
117
|
+
languageFqn?: string;
|
|
118
|
+
legacy?: boolean;
|
|
119
|
+
source?: SourceLocation;
|
|
120
|
+
}
|
|
121
|
+
export interface ChangelogEntry {
|
|
122
|
+
version: string;
|
|
123
|
+
text: string;
|
|
124
|
+
languageFqn?: string;
|
|
125
|
+
source?: SourceLocation;
|
|
126
|
+
}
|
|
127
|
+
export interface DocumentationExample {
|
|
128
|
+
title: string;
|
|
129
|
+
content: string;
|
|
130
|
+
authoredCharacterDataForm?: CharacterDataForm;
|
|
131
|
+
contentLanguageFqn?: string;
|
|
132
|
+
snippet?: boolean;
|
|
133
|
+
namespace?: string;
|
|
134
|
+
source?: SourceLocation;
|
|
135
|
+
}
|
|
136
|
+
export interface DocumentationReference {
|
|
137
|
+
type?: string;
|
|
138
|
+
instance?: string;
|
|
139
|
+
file?: string;
|
|
140
|
+
url?: string;
|
|
141
|
+
property?: string;
|
|
142
|
+
aggregation?: string;
|
|
143
|
+
association?: string;
|
|
144
|
+
capability?: string;
|
|
145
|
+
relationFqn?: string;
|
|
146
|
+
context: string;
|
|
147
|
+
languageFqn?: string;
|
|
148
|
+
source?: SourceLocation;
|
|
149
|
+
}
|
|
150
|
+
//# sourceMappingURL=block-definition.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"block-definition.d.ts","sourceRoot":"","sources":["../../src/types/block-definition.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,iBAAiB,EACjB,qBAAqB,EACrB,iBAAiB,EACjB,cAAc,EACd,iBAAiB,EACjB,SAAS,EACV,MAAM,aAAa,CAAC;AACrB,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACtD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAC/D,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAE5D,gFAAgF;AAChF,MAAM,WAAW,2BAA2B;IAC1C,OAAO,EAAE,0CAA0C,CAAC;IACpD,iEAAiE;IACjE,KAAK,EAAE,MAAM,CAAC;IACd,qEAAqE;IACrE,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,WAAW;IAC1B,+BAA+B;IAC/B,IAAI,EAAE,MAAM,CAAC;IACb,4EAA4E;IAC5E,QAAQ,EAAE,MAAM,CAAC;IACjB;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,WAAW,eAAe;IAC9B,+CAA+C;IAC/C,IAAI,EAAE,MAAM,CAAC;IACb;;;;OAIG;IACH,IAAI,EAAE,MAAM,CAAC;IACb,qDAAqD;IACrD,QAAQ,CAAC,EAAE,MAAM,CA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K,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,yBAAyB,CAAC,EAAE,iBAAiB,CAAC;IAC9C,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,MAAM,CAAC,EAAE,cAAc,CAAC;CACzB;AAED,MAAM,WAAW,sBAAsB;IACrC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,MAAM,CAAC,EAAE,cAAc,CAAC;CACzB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"block-definition.js","sourceRoot":"","sources":["../../src/types/block-definition.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
/** BML source span for diagnostics and LSP. */
|
|
2
|
+
export interface SourceLocation {
|
|
3
|
+
file: string;
|
|
4
|
+
line: number;
|
|
5
|
+
column: number;
|
|
6
|
+
/** Optional end position for ranges. */
|
|
7
|
+
endLine?: number;
|
|
8
|
+
endColumn?: number;
|
|
9
|
+
}
|
|
10
|
+
/** Parse metadata for a BomDocument. */
|
|
11
|
+
export interface SourceInfo {
|
|
12
|
+
/** Absolute or project-relative path. */
|
|
13
|
+
filePath: string;
|
|
14
|
+
/** "xml" only for authoring. */
|
|
15
|
+
format: "xml";
|
|
16
|
+
/**
|
|
17
|
+
* Authored xmlns prefix → namespace identifier (XML).
|
|
18
|
+
* Default xmlns uses prefix key "".
|
|
19
|
+
*/
|
|
20
|
+
namespaceBindings?: Record<string, string>;
|
|
21
|
+
/** Authored xsi:schemaLocation value (opaque string). */
|
|
22
|
+
schemaLocation?: string;
|
|
23
|
+
/** Authored xsi:noNamespaceSchemaLocation when present. */
|
|
24
|
+
noNamespaceSchemaLocation?: string;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* XML comment trivia bound to an element (B11).
|
|
28
|
+
* Bodies only — without `<!--` / `-->`.
|
|
29
|
+
*/
|
|
30
|
+
export interface XmlTrivia {
|
|
31
|
+
leadingComments?: string[];
|
|
32
|
+
trailingComments?: string[];
|
|
33
|
+
}
|
|
34
|
+
export type MemberSectionName = "properties" | "aggregations" | "associations" | "capabilities";
|
|
35
|
+
/** Key = metadata child element localName. */
|
|
36
|
+
export type MetadataElementTrivia = Record<string, XmlTrivia>;
|
|
37
|
+
export type XmlNodeKind = "attribute" | "element" | "text";
|
|
38
|
+
/** How host-element character data appeared in source when placement is `text` (D8). */
|
|
39
|
+
export type CharacterDataForm = "text" | "cdata";
|
|
40
|
+
/** Block-level `<bml:xml>` body — lossless. */
|
|
41
|
+
export interface XmlRenderingBlock {
|
|
42
|
+
raw: string;
|
|
43
|
+
}
|
|
44
|
+
/** Member-level `bml:xml` — lossless + emit hints. */
|
|
45
|
+
export interface XmlRenderingMember {
|
|
46
|
+
/** Authored `bml:xml` value (e.g. `element|attribute`). */
|
|
47
|
+
raw?: string;
|
|
48
|
+
kinds: XmlNodeKind[];
|
|
49
|
+
authoredPlacement?: XmlNodeKind;
|
|
50
|
+
authoredCharacterDataForm?: CharacterDataForm;
|
|
51
|
+
}
|
|
52
|
+
export type DiagnosticSeverity = "error" | "warning" | "info";
|
|
53
|
+
/** Compiler result diagnostic — distinct from org.blockml.bml.core.Diagnostic BML branch. */
|
|
54
|
+
export interface Diagnostic {
|
|
55
|
+
severity: DiagnosticSeverity;
|
|
56
|
+
code: string;
|
|
57
|
+
message: string;
|
|
58
|
+
source: SourceLocation;
|
|
59
|
+
}
|
|
60
|
+
//# sourceMappingURL=common.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../../src/types/common.ts"],"names":[],"mappings":"AAAA,+CAA+C;AAC/C,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,wCAAwC;IACxC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,wCAAwC;AACxC,MAAM,WAAW,UAAU;IACzB,yCAAyC;IACzC,QAAQ,EAAE,MAAM,CAAC;IACjB,gCAAgC;IAChC,MAAM,EAAE,KAAK,CAAC;IACd;;;OAGG;IACH,iBAAiB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC3C,yDAAyD;IACzD,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,2DAA2D;IAC3D,yBAAyB,CAAC,EAAE,MAAM,CAAC;CACpC;AAED;;;GAGG;AACH,MAAM,WAAW,SAAS;IACxB,eAAe,CAAC,EAAE,MAAM,EAAE,CAAC;IAC3B,gBAAgB,CAAC,EAAE,MAAM,EAAE,CAAC;CAC7B;AAED,MAAM,MAAM,iBAAiB,GACzB,YAAY,GACZ,cAAc,GACd,cAAc,GACd,cAAc,CAAC;AAEnB,8CAA8C;AAC9C,MAAM,MAAM,qBAAqB,GAAG,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC;AAE9D,MAAM,MAAM,WAAW,GAAG,WAAW,GAAG,SAAS,GAAG,MAAM,CAAC;AAE3D,wFAAwF;AACxF,MAAM,MAAM,iBAAiB,GAAG,MAAM,GAAG,OAAO,CAAC;AAEjD,+CAA+C;AAC/C,MAAM,WAAW,iBAAiB;IAChC,GAAG,EAAE,MAAM,CAAC;CACb;AAED,sDAAsD;AACtD,MAAM,WAAW,kBAAkB;IACjC,2DAA2D;IAC3D,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,WAAW,EAAE,CAAC;IACrB,iBAAiB,CAAC,EAAE,WAAW,CAAC;IAChC,yBAAyB,CAAC,EAAE,iBAAiB,CAAC;CAC/C;AAED,MAAM,MAAM,kBAAkB,GAAG,OAAO,GAAG,SAAS,GAAG,MAAM,CAAC;AAE9D,6FAA6F;AAC7F,MAAM,WAAW,UAAU;IACzB,QAAQ,EAAE,kBAAkB,CAAC;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,cAAc,CAAC;CACxB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"common.js","sourceRoot":"","sources":["../../src/types/common.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import type { MemberValue, ExpressionValue } from "./values.js";
|
|
2
|
+
import type { SourceLocation, XmlTrivia } from "./common.js";
|
|
3
|
+
/** Target aggregation name — e.g. "_parts", "blocks", "_presets". */
|
|
4
|
+
export interface CompositionTemplate {
|
|
5
|
+
aggregationName: string;
|
|
6
|
+
directives?: DirectiveAttribute[];
|
|
7
|
+
children: CompositionNode[];
|
|
8
|
+
source?: SourceLocation;
|
|
9
|
+
}
|
|
10
|
+
/** Aggregation opened inline on a Block instance. */
|
|
11
|
+
export interface InstanceAggregationComposition {
|
|
12
|
+
aggregationName: string;
|
|
13
|
+
composition: CompositionTemplate;
|
|
14
|
+
}
|
|
15
|
+
export type CompositionNode = BlockInstanceNode | VirtualContainerNode;
|
|
16
|
+
export interface BlockInstanceNode {
|
|
17
|
+
kind: "blockInstance";
|
|
18
|
+
instance: BlockInstance;
|
|
19
|
+
/** bml:each, bml:if, bml:unless, bml:with on this block instance element. */
|
|
20
|
+
directives?: DirectiveAttribute[];
|
|
21
|
+
source?: SourceLocation;
|
|
22
|
+
}
|
|
23
|
+
export interface VirtualContainerNode {
|
|
24
|
+
kind: "virtualContainer";
|
|
25
|
+
/** bml:each, bml:if, bml:unless, bml:with on `<bml:container>`. */
|
|
26
|
+
directives?: DirectiveAttribute[];
|
|
27
|
+
children: CompositionNode[];
|
|
28
|
+
source?: SourceLocation;
|
|
29
|
+
}
|
|
30
|
+
/** Represents a concrete child block in a composition. */
|
|
31
|
+
export interface BlockInstance {
|
|
32
|
+
/** Resolved FQN of the referenced block type. */
|
|
33
|
+
typeFqn: string;
|
|
34
|
+
/** Composition instance identity — from bml:id (literal or ExpressionValue). */
|
|
35
|
+
id?: MemberValue;
|
|
36
|
+
/** From bml:version — optional exact-version assert on external block references. */
|
|
37
|
+
version?: MemberValue;
|
|
38
|
+
/** From bml:bean — registers this instance as a named service bean. */
|
|
39
|
+
bean?: MemberValue;
|
|
40
|
+
/** From bml:scope — bean visibility: "local" (default) or "context". */
|
|
41
|
+
scope?: "local" | "context";
|
|
42
|
+
/** Preset reference: {PresetsDocumentFQN}::{preset-id}. */
|
|
43
|
+
basePresets?: string;
|
|
44
|
+
renderGroup?: string;
|
|
45
|
+
namespace?: string;
|
|
46
|
+
/** Member values set on this instance (properties + capabilities). */
|
|
47
|
+
memberValues: Record<string, MemberValue>;
|
|
48
|
+
/** Nested aggregation compositions on this instance. */
|
|
49
|
+
aggregationCompositions?: InstanceAggregationComposition[];
|
|
50
|
+
/** XML comments bound to this composition instance element (B11). */
|
|
51
|
+
xmlTrivia?: XmlTrivia;
|
|
52
|
+
source?: SourceLocation;
|
|
53
|
+
}
|
|
54
|
+
export type DirectiveAttribute = EachDirective | IfDirective | UnlessDirective | WithDirective;
|
|
55
|
+
export interface EachDirective {
|
|
56
|
+
type: "each";
|
|
57
|
+
variables: string[];
|
|
58
|
+
statVariable?: string;
|
|
59
|
+
collection: ExpressionValue;
|
|
60
|
+
}
|
|
61
|
+
export interface IfDirective {
|
|
62
|
+
type: "if";
|
|
63
|
+
condition: ExpressionValue;
|
|
64
|
+
}
|
|
65
|
+
export interface UnlessDirective {
|
|
66
|
+
type: "unless";
|
|
67
|
+
condition: ExpressionValue;
|
|
68
|
+
}
|
|
69
|
+
export interface WithDirective {
|
|
70
|
+
type: "with";
|
|
71
|
+
bindings: WithBinding[];
|
|
72
|
+
}
|
|
73
|
+
export interface WithBinding {
|
|
74
|
+
name: string;
|
|
75
|
+
value: ExpressionValue;
|
|
76
|
+
}
|
|
77
|
+
//# sourceMappingURL=composition.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"composition.d.ts","sourceRoot":"","sources":["../../src/types/composition.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAChE,OAAO,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAE7D,qEAAqE;AACrE,MAAM,WAAW,mBAAmB;IAClC,eAAe,EAAE,MAAM,CAAC;IACxB,UAAU,CAAC,EAAE,kBAAkB,EAAE,CAAC;IAClC,QAAQ,EAAE,eAAe,EAAE,CAAC;IAC5B,MAAM,CAAC,EAAE,cAAc,CAAC;CACzB;AAED,qDAAqD;AACrD,MAAM,WAAW,8BAA8B;IAC7C,eAAe,EAAE,MAAM,CAAC;IACxB,WAAW,EAAE,mBAAmB,CAAC;CAClC;AAED,MAAM,MAAM,eAAe,GAAG,iBAAiB,GAAG,oBAAoB,CAAC;AAEvE,MAAM,WAAW,iBAAiB;IAChC,IAAI,EAAE,eAAe,CAAC;IACtB,QAAQ,EAAE,aAAa,CAAC;IACxB,6EAA6E;IAC7E,UAAU,CAAC,EAAE,kBAAkB,EAAE,CAAC;IAClC,MAAM,CAAC,EAAE,cAAc,CAAC;CACzB;AAED,MAAM,WAAW,oBAAoB;IACnC,IAAI,EAAE,kBAAkB,CAAC;IACzB,mEAAmE;IACnE,UAAU,CAAC,EAAE,kBAAkB,EA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,EAAE,WAAW,EAAE,CAAC;CACzB;AAED,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,eAAe,CAAC;CACxB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"composition.js","sourceRoot":"","sources":["../../src/types/composition.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { SourceInfo } from "./common.js";
|
|
2
|
+
import type { BlockDefinition } from "./block-definition.js";
|
|
3
|
+
/** Every parsed or Builder-sealed BML document is exactly one BomDocument (Urmodell). */
|
|
4
|
+
export interface BomDocument {
|
|
5
|
+
/** V1: always `<block>` root. */
|
|
6
|
+
kind: "block";
|
|
7
|
+
/** Parse metadata. */
|
|
8
|
+
source: SourceInfo;
|
|
9
|
+
/** Root block definition. */
|
|
10
|
+
block: BlockDefinition;
|
|
11
|
+
}
|
|
12
|
+
//# sourceMappingURL=document.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"document.d.ts","sourceRoot":"","sources":["../../src/types/document.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAC9C,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAE7D,yFAAyF;AACzF,MAAM,WAAW,WAAW;IAC1B,iCAAiC;IACjC,IAAI,EAAE,OAAO,CAAC;IACd,sBAAsB;IACtB,MAAM,EAAE,UAAU,CAAC;IACnB,6BAA6B;IAC7B,KAAK,EAAE,eAAe,CAAC;CACxB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"document.js","sourceRoot":"","sources":["../../src/types/document.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import type { CharacterDataForm, SourceLocation, XmlRenderingMember, XmlTrivia } from "./common.js";
|
|
2
|
+
import type { BlockInstance } from "./composition.js";
|
|
3
|
+
import type { ChangelogEntry, DocumentationExample, DocumentationProseEntry, DocumentationReference, KeywordEntry, TypeReferenceEntityInstance } from "./block-definition.js";
|
|
4
|
+
import type { TypeDescriptor, TypeExpression } from "./type-expression.js";
|
|
5
|
+
import type { MemberValue } from "./values.js";
|
|
6
|
+
import type { CompositionTemplate } from "./composition.js";
|
|
7
|
+
export type MemberDefinition = PropertyDefinition | AggregationDefinition | AssociationDefinition | CapabilityDefinition;
|
|
8
|
+
export interface ConstrainableDefinition {
|
|
9
|
+
constraints?: BlockInstance[];
|
|
10
|
+
}
|
|
11
|
+
export interface MemberDefinitionBase {
|
|
12
|
+
/** Logical member name — visibility prefixes `_` / `__` stripped (B14). */
|
|
13
|
+
name: string;
|
|
14
|
+
summaries?: DocumentationProseEntry[];
|
|
15
|
+
keywords?: KeywordEntry[];
|
|
16
|
+
documentations?: DocumentationProseEntry[];
|
|
17
|
+
since?: string;
|
|
18
|
+
changelog?: ChangelogEntry[];
|
|
19
|
+
examples?: DocumentationExample[];
|
|
20
|
+
references?: DocumentationReference[];
|
|
21
|
+
/** Resolved canonical namespace identifier (FQN or URI). */
|
|
22
|
+
namespace?: string;
|
|
23
|
+
visibility?: "private" | "protected" | "public";
|
|
24
|
+
readOnly?: boolean;
|
|
25
|
+
abstract?: boolean;
|
|
26
|
+
final?: boolean;
|
|
27
|
+
override?: boolean;
|
|
28
|
+
xmlRendering?: XmlRenderingMember;
|
|
29
|
+
constraints?: BlockInstance[];
|
|
30
|
+
xmlTrivia?: XmlTrivia;
|
|
31
|
+
source?: SourceLocation;
|
|
32
|
+
}
|
|
33
|
+
export interface PropertyDefinition extends MemberDefinitionBase {
|
|
34
|
+
kind: "property";
|
|
35
|
+
/** Resolved type FQN for simple property types. */
|
|
36
|
+
typeFqn: string;
|
|
37
|
+
/** Full parse-time type expression when authored form is not a plain FQN (e.g. TypeReference(core:Block)). */
|
|
38
|
+
type?: TypeExpression;
|
|
39
|
+
values?: PropertyValueEntry[];
|
|
40
|
+
/** Convenience — default-namespace entry from values[]. */
|
|
41
|
+
value?: MemberValue;
|
|
42
|
+
group?: string;
|
|
43
|
+
/** Block instances of the same type as typeFqn — metadata only. */
|
|
44
|
+
suggestions?: BlockInstance[];
|
|
45
|
+
/** Member group TypeReferenceEntity instances (Property-only). */
|
|
46
|
+
groups?: TypeReferenceEntityInstance[];
|
|
47
|
+
}
|
|
48
|
+
export interface PropertyValueEntry {
|
|
49
|
+
/** "" = canonical value; else resolved Annotation FQN. */
|
|
50
|
+
namespace: string;
|
|
51
|
+
value: MemberValue;
|
|
52
|
+
}
|
|
53
|
+
export interface AggregationDefinition extends MemberDefinitionBase {
|
|
54
|
+
kind: "aggregation";
|
|
55
|
+
/** Full TypeExpression — plain Block[] or TypeReferenceEntity(T)[]. Omitted when not authored. */
|
|
56
|
+
type?: TypeExpression;
|
|
57
|
+
/** Omitted when not authored (inherited aggregation fill sites). */
|
|
58
|
+
cardinality?: "0..1" | "0..n" | "1..1" | "1..n";
|
|
59
|
+
default?: boolean;
|
|
60
|
+
/** Nested composition filling this aggregation — instance aggregations only. */
|
|
61
|
+
composition?: CompositionTemplate;
|
|
62
|
+
/** Member group TypeReferenceEntity instances. */
|
|
63
|
+
groups?: TypeReferenceEntityInstance[];
|
|
64
|
+
/** false when authored as direct block child (not inside `<aggregations>`). */
|
|
65
|
+
authoredInAggregationsSection?: boolean;
|
|
66
|
+
}
|
|
67
|
+
export interface AssociationDefinition extends MemberDefinitionBase {
|
|
68
|
+
kind: "association";
|
|
69
|
+
type: TypeExpression;
|
|
70
|
+
cardinality: "0..1" | "0..n";
|
|
71
|
+
}
|
|
72
|
+
export interface CapabilityDefinition extends MemberDefinitionBase {
|
|
73
|
+
kind: "capability";
|
|
74
|
+
typeFqn: string;
|
|
75
|
+
inputType?: TypeDescriptor;
|
|
76
|
+
outputType?: TypeDescriptor;
|
|
77
|
+
implementation?: ImplementationBlock;
|
|
78
|
+
}
|
|
79
|
+
export interface ImplementationBlock {
|
|
80
|
+
languageFqn: string;
|
|
81
|
+
/** Host-element character data — full original text including <$ $> regions. */
|
|
82
|
+
source: string;
|
|
83
|
+
authoredCharacterDataForm?: CharacterDataForm;
|
|
84
|
+
/** Embedded expression regions — defaults to [] when omitted. */
|
|
85
|
+
embeddedExpressions?: EmbeddedExpression[];
|
|
86
|
+
sourceLocation?: SourceLocation;
|
|
87
|
+
}
|
|
88
|
+
export interface EmbeddedExpression {
|
|
89
|
+
/** Expression text between delimiters (for later parseExpression). */
|
|
90
|
+
raw: string;
|
|
91
|
+
/** Byte/char offset of opening <$ in source. */
|
|
92
|
+
start: number;
|
|
93
|
+
/** Offset immediately after closing $>. */
|
|
94
|
+
end: number;
|
|
95
|
+
}
|
|
96
|
+
//# sourceMappingURL=member-definition.d.ts.map
|