@lionweb/class-core 0.6.13-beta.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/LICENSE +201 -0
- package/README.md +157 -0
- package/dist/base-types.d.ts +167 -0
- package/dist/base-types.d.ts.map +1 -0
- package/dist/base-types.js +147 -0
- package/dist/base-types.js.map +1 -0
- package/dist/convenience.d.ts +49 -0
- package/dist/convenience.d.ts.map +1 -0
- package/dist/convenience.js +75 -0
- package/dist/convenience.js.map +1 -0
- package/dist/deltas/appliers.d.ts +42 -0
- package/dist/deltas/appliers.d.ts.map +1 -0
- package/dist/deltas/appliers.js +274 -0
- package/dist/deltas/appliers.js.map +1 -0
- package/dist/deltas/base.d.ts +6 -0
- package/dist/deltas/base.d.ts.map +1 -0
- package/dist/deltas/base.js +18 -0
- package/dist/deltas/base.js.map +1 -0
- package/dist/deltas/handlers.d.ts +17 -0
- package/dist/deltas/handlers.d.ts.map +1 -0
- package/dist/deltas/handlers.js +43 -0
- package/dist/deltas/handlers.js.map +1 -0
- package/dist/deltas/index.d.ts +7 -0
- package/dist/deltas/index.d.ts.map +1 -0
- package/dist/deltas/index.js +23 -0
- package/dist/deltas/index.js.map +1 -0
- package/dist/deltas/inverters.d.ts +7 -0
- package/dist/deltas/inverters.d.ts.map +1 -0
- package/dist/deltas/inverters.js +82 -0
- package/dist/deltas/inverters.js.map +1 -0
- package/dist/deltas/serialization/base.d.ts +7 -0
- package/dist/deltas/serialization/base.d.ts.map +1 -0
- package/dist/deltas/serialization/base.js +18 -0
- package/dist/deltas/serialization/base.js.map +1 -0
- package/dist/deltas/serialization/deserializer.g.d.ts +5 -0
- package/dist/deltas/serialization/deserializer.g.d.ts.map +1 -0
- package/dist/deltas/serialization/deserializer.g.js +164 -0
- package/dist/deltas/serialization/deserializer.g.js.map +1 -0
- package/dist/deltas/serialization/index.d.ts +5 -0
- package/dist/deltas/serialization/index.d.ts.map +1 -0
- package/dist/deltas/serialization/index.js +21 -0
- package/dist/deltas/serialization/index.js.map +1 -0
- package/dist/deltas/serialization/serializer-helpers.d.ts +12 -0
- package/dist/deltas/serialization/serializer-helpers.d.ts.map +1 -0
- package/dist/deltas/serialization/serializer-helpers.js +28 -0
- package/dist/deltas/serialization/serializer-helpers.js.map +1 -0
- package/dist/deltas/serialization/serializer.g.d.ts +4 -0
- package/dist/deltas/serialization/serializer.g.d.ts.map +1 -0
- package/dist/deltas/serialization/serializer.g.js +208 -0
- package/dist/deltas/serialization/serializer.g.js.map +1 -0
- package/dist/deltas/serialization/types.g.d.ts +147 -0
- package/dist/deltas/serialization/types.g.d.ts.map +1 -0
- package/dist/deltas/serialization/types.g.js +18 -0
- package/dist/deltas/serialization/types.g.js.map +1 -0
- package/dist/deltas/types.g.d.ts +149 -0
- package/dist/deltas/types.g.d.ts.map +1 -0
- package/dist/deltas/types.g.js +180 -0
- package/dist/deltas/types.g.js.map +1 -0
- package/dist/deserializer.d.ts +27 -0
- package/dist/deserializer.d.ts.map +1 -0
- package/dist/deserializer.js +168 -0
- package/dist/deserializer.js.map +1 -0
- package/dist/duplicator.d.ts +19 -0
- package/dist/duplicator.d.ts.map +1 -0
- package/dist/duplicator.js +87 -0
- package/dist/duplicator.js.map +1 -0
- package/dist/id-mapping.d.ts +19 -0
- package/dist/id-mapping.d.ts.map +1 -0
- package/dist/id-mapping.js +44 -0
- package/dist/id-mapping.js.map +1 -0
- package/dist/index.d.ts +11 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +28 -0
- package/dist/index.js.map +1 -0
- package/dist/linking.d.ts +20 -0
- package/dist/linking.d.ts.map +1 -0
- package/dist/linking.js +18 -0
- package/dist/linking.js.map +1 -0
- package/dist/lionCore_builtins.g.d.ts +35 -0
- package/dist/lionCore_builtins.g.d.ts.map +1 -0
- package/dist/lionCore_builtins.g.js +96 -0
- package/dist/lionCore_builtins.g.js.map +1 -0
- package/dist/serializer.d.ts +17 -0
- package/dist/serializer.d.ts.map +1 -0
- package/dist/serializer.js +70 -0
- package/dist/serializer.js.map +1 -0
- package/dist/textualizer.d.ts +7 -0
- package/dist/textualizer.d.ts.map +1 -0
- package/dist/textualizer.js +82 -0
- package/dist/textualizer.js.map +1 -0
- package/dist/value-managers/annotations.d.ts +33 -0
- package/dist/value-managers/annotations.d.ts.map +1 -0
- package/dist/value-managers/annotations.js +192 -0
- package/dist/value-managers/annotations.js.map +1 -0
- package/dist/value-managers/base.d.ts +53 -0
- package/dist/value-managers/base.d.ts.map +1 -0
- package/dist/value-managers/base.js +102 -0
- package/dist/value-managers/base.js.map +1 -0
- package/dist/value-managers/containments.d.ts +58 -0
- package/dist/value-managers/containments.d.ts.map +1 -0
- package/dist/value-managers/containments.js +408 -0
- package/dist/value-managers/containments.js.map +1 -0
- package/dist/value-managers/index.d.ts +6 -0
- package/dist/value-managers/index.d.ts.map +1 -0
- package/dist/value-managers/index.js +22 -0
- package/dist/value-managers/index.js.map +1 -0
- package/dist/value-managers/properties.d.ts +24 -0
- package/dist/value-managers/properties.d.ts.map +1 -0
- package/dist/value-managers/properties.js +191 -0
- package/dist/value-managers/properties.js.map +1 -0
- package/dist/value-managers/references.d.ts +58 -0
- package/dist/value-managers/references.d.ts.map +1 -0
- package/dist/value-managers/references.js +346 -0
- package/dist/value-managers/references.js.map +1 -0
- package/package.json +35 -0
- package/src/base-types.ts +353 -0
- package/src/convenience.ts +101 -0
- package/src/deltas/appliers.ts +317 -0
- package/src/deltas/base.ts +23 -0
- package/src/deltas/handlers.ts +64 -0
- package/src/deltas/index.ts +23 -0
- package/src/deltas/inverters.ts +111 -0
- package/src/deltas/serialization/base.ts +26 -0
- package/src/deltas/serialization/deserializer.g.ts +193 -0
- package/src/deltas/serialization/index.ts +22 -0
- package/src/deltas/serialization/serializer-helpers.ts +36 -0
- package/src/deltas/serialization/serializer.g.ts +272 -0
- package/src/deltas/serialization/types.g.ts +209 -0
- package/src/deltas/types.g.ts +231 -0
- package/src/deserializer.ts +234 -0
- package/src/duplicator.ts +111 -0
- package/src/id-mapping.ts +58 -0
- package/src/index.ts +29 -0
- package/src/linking.ts +39 -0
- package/src/lionCore_builtins.g.ts +141 -0
- package/src/serializer.ts +86 -0
- package/src/textualizer.ts +104 -0
- package/src/value-managers/annotations.ts +139 -0
- package/src/value-managers/base.ts +123 -0
- package/src/value-managers/containments.ts +323 -0
- package/src/value-managers/index.ts +22 -0
- package/src/value-managers/properties.ts +127 -0
- package/src/value-managers/references.ts +268 -0
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { Id, Link } from "@lionweb/core";
|
|
2
|
+
import { INodeBase } from "./index.js";
|
|
3
|
+
/**
|
|
4
|
+
* A tuple type for (data concerning) link and annotation values that are involved with deserialization and deep-duplication
|
|
5
|
+
* — more specifically: nodes that have to be installed on other (deserialized/deep-duplicated) nodes in specific features (or as annotations).
|
|
6
|
+
*
|
|
7
|
+
* The elements are:
|
|
8
|
+
*
|
|
9
|
+
* 1. `parent` — the {@link INodeBase} instance to install on.
|
|
10
|
+
* 2. `feature` — the {@link Link link} feature to install on, or `null` to indicate that it's an annotation.
|
|
11
|
+
* 3. `nodesIds` — are the IDs of the nodes to install.
|
|
12
|
+
* 4. *optional* `originalReferenceTargets` — are the original reference targets of a {@link Reference reference} feature.
|
|
13
|
+
* This element is only present when the feature is a {@link Reference reference} feature.
|
|
14
|
+
* The `nodesIds` and `originalReferenceTargets` match up per index.
|
|
15
|
+
*
|
|
16
|
+
* Note: **DON'T** export this types from the package,
|
|
17
|
+
* as these are only used to align the deserializer and deep-cloner.
|
|
18
|
+
*/
|
|
19
|
+
export type NodesToInstall = [container: INodeBase, feature: Link | null, nodesIds: Id[], originalReferenceTargets?: INodeBase[]];
|
|
20
|
+
//# sourceMappingURL=linking.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"linking.d.ts","sourceRoot":"","sources":["../src/linking.ts"],"names":[],"mappings":"AAiBA,OAAO,EAAC,EAAE,EAAE,IAAI,EAAC,MAAM,eAAe,CAAC;AACvC,OAAO,EAAC,SAAS,EAAC,MAAM,YAAY,CAAC;AAGrC;;;;;;;;;;;;;;;GAeG;AACH,MAAM,MAAM,cAAc,GAAG,CAAE,SAAS,EAAE,SAAS,EAAE,OAAO,EAAE,IAAI,GAAG,IAAI,EAAE,QAAQ,EAAE,EAAE,EAAE,EAAE,wBAAwB,CAAC,EAAE,SAAS,EAAE,CAAE,CAAC"}
|
package/dist/linking.js
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
// Copyright 2025 TRUMPF Laser SE and other contributors
|
|
2
|
+
//
|
|
3
|
+
// Licensed under the Apache License, Version 2.0 (the "License")
|
|
4
|
+
// you may not use this file except in compliance with the License.
|
|
5
|
+
// You may obtain a copy of the License at
|
|
6
|
+
//
|
|
7
|
+
// http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
//
|
|
9
|
+
// Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
// See the License for the specific language governing permissions and
|
|
13
|
+
// limitations under the License.
|
|
14
|
+
//
|
|
15
|
+
// SPDX-FileCopyrightText: 2025 TRUMPF Laser SE and other contributors
|
|
16
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
17
|
+
export {};
|
|
18
|
+
//# sourceMappingURL=linking.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"linking.js","sourceRoot":"","sources":["../src/linking.ts"],"names":[],"mappings":"AAAA,wDAAwD;AACxD,EAAE;AACF,iEAAiE;AACjE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,iDAAiD;AACjD,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AACjC,EAAE;AACF,sEAAsE;AACtE,sCAAsC"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { Concept, EnumerationLiteral, Interface, Language, PrimitiveType, Property } from "@lionweb/core";
|
|
2
|
+
import { DeltaHandler, ILanguageBase, INodeBase, NodeBase, NodeBaseFactory } from "./index.js";
|
|
3
|
+
export declare class LionCore_builtinsBase implements ILanguageBase {
|
|
4
|
+
private readonly _language;
|
|
5
|
+
get language(): Language;
|
|
6
|
+
readonly _String: PrimitiveType;
|
|
7
|
+
get String(): PrimitiveType;
|
|
8
|
+
readonly _Boolean: PrimitiveType;
|
|
9
|
+
get Boolean(): PrimitiveType;
|
|
10
|
+
readonly _Integer: PrimitiveType;
|
|
11
|
+
get Integer(): PrimitiveType;
|
|
12
|
+
readonly _JSON: PrimitiveType;
|
|
13
|
+
get JSON(): PrimitiveType;
|
|
14
|
+
readonly _Node: Concept;
|
|
15
|
+
get Node(): Concept;
|
|
16
|
+
readonly _INamed: Interface;
|
|
17
|
+
get INamed(): Interface;
|
|
18
|
+
private readonly _INamed_name;
|
|
19
|
+
get INamed_name(): Property;
|
|
20
|
+
private _wiredUp;
|
|
21
|
+
private ensureWiredUp;
|
|
22
|
+
factory(_handleDelta?: DeltaHandler): NodeBaseFactory;
|
|
23
|
+
enumLiteralFrom<EnumType>(enumerationLiteral: EnumerationLiteral): EnumType;
|
|
24
|
+
static readonly INSTANCE: LionCore_builtinsBase;
|
|
25
|
+
}
|
|
26
|
+
export type String = string;
|
|
27
|
+
export type Boolean = boolean;
|
|
28
|
+
export type Integer = number;
|
|
29
|
+
export type JSON = unknown;
|
|
30
|
+
export declare abstract class Node extends NodeBase {
|
|
31
|
+
}
|
|
32
|
+
export interface INamed extends INodeBase {
|
|
33
|
+
name: string;
|
|
34
|
+
}
|
|
35
|
+
//# sourceMappingURL=lionCore_builtins.g.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lionCore_builtins.g.d.ts","sourceRoot":"","sources":["../src/lionCore_builtins.g.ts"],"names":[],"mappings":"AA6BA,OAAO,EAEH,OAAO,E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IACrC,IAAI,EAAE,MAAM,CAAC;CAChB"}
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
// Copyright 2025 TRUMPF Laser SE and other contributors
|
|
2
|
+
//
|
|
3
|
+
// Licensed under the Apache License, Version 2.0 (the "License")
|
|
4
|
+
// you may not use this file except in compliance with the License.
|
|
5
|
+
// You may obtain a copy of the License at
|
|
6
|
+
//
|
|
7
|
+
// http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
//
|
|
9
|
+
// Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
// See the License for the specific language governing permissions and
|
|
13
|
+
// limitations under the License.
|
|
14
|
+
//
|
|
15
|
+
// SPDX-FileCopyrightText: 2025 TRUMPF Laser SE and other contributors
|
|
16
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
17
|
+
// Warning: this file is generated!
|
|
18
|
+
// Modifying it by hand is useless at best, and sabotage at worst.
|
|
19
|
+
/*
|
|
20
|
+
* language's metadata:
|
|
21
|
+
* name: LionCore_builtins
|
|
22
|
+
* version: 2023.1
|
|
23
|
+
* key: LionCore-builtins
|
|
24
|
+
* id: LionCore-builtins
|
|
25
|
+
*/
|
|
26
|
+
import { Concept, Interface, Language, PrimitiveType, Property } from "@lionweb/core";
|
|
27
|
+
import { NodeBase } from "./index.js";
|
|
28
|
+
export class LionCore_builtinsBase {
|
|
29
|
+
constructor() {
|
|
30
|
+
this._language = new Language("LionCore_builtins", "2023.1", "LionCore-builtins", "LionCore-builtins");
|
|
31
|
+
this._String = new PrimitiveType(this._language, "String", "LionCore-builtins-String", "LionCore-builtins-String");
|
|
32
|
+
this._Boolean = new PrimitiveType(this._language, "Boolean", "LionCore-builtins-Boolean", "LionCore-builtins-Boolean");
|
|
33
|
+
this._Integer = new PrimitiveType(this._language, "Integer", "LionCore-builtins-Integer", "LionCore-builtins-Integer");
|
|
34
|
+
this._JSON = new PrimitiveType(this._language, "JSON", "LionCore-builtins-JSON", "LionCore-builtins-JSON");
|
|
35
|
+
this._Node = new Concept(this._language, "Node", "LionCore-builtins-Node", "LionCore-builtins-Node", true);
|
|
36
|
+
this._INamed = new Interface(this._language, "INamed", "LionCore-builtins-INamed", "LionCore-builtins-INamed");
|
|
37
|
+
this._INamed_name = new Property(this._INamed, "name", "LionCore-builtins-INamed-name", "LionCore-builtins-INamed-name");
|
|
38
|
+
this._wiredUp = false;
|
|
39
|
+
}
|
|
40
|
+
get language() {
|
|
41
|
+
this.ensureWiredUp();
|
|
42
|
+
return this._language;
|
|
43
|
+
}
|
|
44
|
+
get String() {
|
|
45
|
+
this.ensureWiredUp();
|
|
46
|
+
return this._String;
|
|
47
|
+
}
|
|
48
|
+
get Boolean() {
|
|
49
|
+
this.ensureWiredUp();
|
|
50
|
+
return this._Boolean;
|
|
51
|
+
}
|
|
52
|
+
get Integer() {
|
|
53
|
+
this.ensureWiredUp();
|
|
54
|
+
return this._Integer;
|
|
55
|
+
}
|
|
56
|
+
get JSON() {
|
|
57
|
+
this.ensureWiredUp();
|
|
58
|
+
return this._JSON;
|
|
59
|
+
}
|
|
60
|
+
get Node() {
|
|
61
|
+
this.ensureWiredUp();
|
|
62
|
+
return this._Node;
|
|
63
|
+
}
|
|
64
|
+
get INamed() {
|
|
65
|
+
this.ensureWiredUp();
|
|
66
|
+
return this._INamed;
|
|
67
|
+
}
|
|
68
|
+
get INamed_name() {
|
|
69
|
+
this.ensureWiredUp();
|
|
70
|
+
return this._INamed_name;
|
|
71
|
+
}
|
|
72
|
+
ensureWiredUp() {
|
|
73
|
+
if (this._wiredUp) {
|
|
74
|
+
return;
|
|
75
|
+
}
|
|
76
|
+
this._language.havingEntities(this._String, this._Boolean, this._Integer, this._JSON, this._Node, this._INamed);
|
|
77
|
+
this._INamed.havingFeatures(this._INamed_name);
|
|
78
|
+
this._INamed_name.ofType(this._String);
|
|
79
|
+
this._wiredUp = true;
|
|
80
|
+
}
|
|
81
|
+
factory(_handleDelta) {
|
|
82
|
+
return (classifier, _id) => {
|
|
83
|
+
const { language } = classifier;
|
|
84
|
+
throw new Error(`can't instantiate ${classifier.name} (key=${classifier.key}): classifier is not known in language ${language.name} (key=${language.key}, version=${language.version})`);
|
|
85
|
+
};
|
|
86
|
+
}
|
|
87
|
+
enumLiteralFrom(enumerationLiteral) {
|
|
88
|
+
const { enumeration } = enumerationLiteral;
|
|
89
|
+
const { language } = enumeration;
|
|
90
|
+
throw new Error(`enumeration with key ${enumeration.key} is not known in language ${language.name} (key=${language.key}, version=${language.version})`);
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
LionCore_builtinsBase.INSTANCE = new LionCore_builtinsBase();
|
|
94
|
+
export class Node extends NodeBase {
|
|
95
|
+
}
|
|
96
|
+
//# sourceMappingURL=lionCore_builtins.g.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lionCore_builtins.g.js","sourceRoot":"","sources":["../src/lionCore_builtins.g.ts"],"names":[],"mappings":"AAAA,wDAAwD;AACxD,EAAE;AACF,iEAAiE;AACjE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,iDAAiD;AACjD,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AACjC,EAAE;AACF,sEAAsE;AACtE,sCAAsC;AAEtC,mCAAmC;AACnC,kEAAkE;AAElE;;;;;;GAMG;AAGH,OAAO,EAEH,OAAO,EAGP,SAAS,EACT,QAAQ,EACR,aAAa,EACb,QAAQ,EACX,MAAM,eAAe,CAAC;AAEvB,OAAO,EAIH,QAAQ,EAEX,MAAM,YAAY,CAAC;AAGpB,MAAM,OAAO,qBAAqB;IAAlC;QAEqB,cAAS,GAAa,IAAI,QAAQ,CAAC,mBAAmB,EAAE,QAAQ,EAAE,mBAAmB,EAAE,mBAAmB,CAAC,CAAC;QAM7G,YA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C5D,MAAM,EAAC,WAAW,EAAC,GAAG,kBAAkB,CAAC;QACzC,MAAM,EAAC,QAAQ,EAAC,GAAG,WAAW,CAAC;QAC/B,MAAM,IAAI,KAAK,CAAC,wBAAwB,WAAW,CAAC,GAAG,6BAA6B,QAAQ,CAAC,IAAI,SAAS,QAAQ,CAAC,GAAG,aAAa,QAAQ,CAAC,OAAO,GAAG,CAAC,CAAC;IAC5J,CAAC;;AAEsB,8BAAQ,GAAG,IAAI,qBAAqB,EAAE,AAA9B,CAA+B;AAYlE,MAAM,OAAgB,IAAK,SAAQ,QAAQ;CAC1C"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { ExtractionFacade, Feature } from "@lionweb/core";
|
|
2
|
+
import { INodeBase } from "./index.js";
|
|
3
|
+
/**
|
|
4
|
+
* @return the value of the given {@link Feature feature} (2nd argument) on the given node (of type {@link INodeBase}; 1st argument).
|
|
5
|
+
* **Note** that this function is for internal use only!
|
|
6
|
+
*/
|
|
7
|
+
export declare const getFeatureValue: (node: INodeBase, feature: Feature) => unknown;
|
|
8
|
+
/**
|
|
9
|
+
* An {@link ExtractionFacade} that works on/for {@link INodeBase}s specifically.
|
|
10
|
+
* **Note** that this function is for internal use only!
|
|
11
|
+
*/
|
|
12
|
+
export declare const nodeBaseReader: ExtractionFacade<INodeBase>;
|
|
13
|
+
/**
|
|
14
|
+
* @return a serialization of the given nodes (of type {@link INodeBase}) as a {@link SerializationChunk}.
|
|
15
|
+
*/
|
|
16
|
+
export declare const serializeNodeBases: (nodes: INodeBase[]) => import("@lionweb/core").SerializationChunk;
|
|
17
|
+
//# sourceMappingURL=serializer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"serializer.d.ts","sourceRoot":"","sources":["../src/serializer.ts"],"names":[],"mappings":"AAiBA,OAAO,EAKH,gBAAgB,EAChB,OAAO,EAIV,MAAM,eAAe,CAAC;AAEvB,OAAO,EAAC,SAAS,EAAwB,MAAM,YAAY,CAAC;AAG5D;;;GAGG;AACH,eAAO,MAAM,eAAe,SAAU,SAAS,WAAW,OAAO,YAWhE,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,cAAc,EAAE,gBAAgB,CAAC,SAAS,CAyBtD,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,kBAAkB,UAAW,SAAS,EAAE,+CACuB,CAAC"}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
// Copyright 2025 TRUMPF Laser SE and other contributors
|
|
2
|
+
//
|
|
3
|
+
// Licensed under the Apache License, Version 2.0 (the "License")
|
|
4
|
+
// you may not use this file except in compliance with the License.
|
|
5
|
+
// You may obtain a copy of the License at
|
|
6
|
+
//
|
|
7
|
+
// http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
//
|
|
9
|
+
// Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
// See the License for the specific language governing permissions and
|
|
13
|
+
// limitations under the License.
|
|
14
|
+
//
|
|
15
|
+
// SPDX-FileCopyrightText: 2025 TRUMPF Laser SE and other contributors
|
|
16
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
17
|
+
import { allSuperTypesOf, builtinClassifiers, builtinFeatures, Containment, Property, Reference, serializeNodes } from "@lionweb/core";
|
|
18
|
+
import { LionCore_builtinsBase } from "./index.js";
|
|
19
|
+
/**
|
|
20
|
+
* @return the value of the given {@link Feature feature} (2nd argument) on the given node (of type {@link INodeBase}; 1st argument).
|
|
21
|
+
* **Note** that this function is for internal use only!
|
|
22
|
+
*/
|
|
23
|
+
export const getFeatureValue = (node, feature) => {
|
|
24
|
+
if (feature instanceof Property) {
|
|
25
|
+
return node.getPropertyValueManager(feature).getDirectly();
|
|
26
|
+
}
|
|
27
|
+
if (feature instanceof Containment) {
|
|
28
|
+
return node.getContainmentValueManager(feature).getDirectly();
|
|
29
|
+
}
|
|
30
|
+
if (feature instanceof Reference) {
|
|
31
|
+
return node.getReferenceValueManager(feature).getDirectly();
|
|
32
|
+
}
|
|
33
|
+
throw new Error(`unhandled Feature sub type ${feature.constructor.name}`);
|
|
34
|
+
};
|
|
35
|
+
/**
|
|
36
|
+
* An {@link ExtractionFacade} that works on/for {@link INodeBase}s specifically.
|
|
37
|
+
* **Note** that this function is for internal use only!
|
|
38
|
+
*/
|
|
39
|
+
export const nodeBaseReader = {
|
|
40
|
+
classifierOf: (node) => node.classifier,
|
|
41
|
+
getFeatureValue,
|
|
42
|
+
enumerationLiteralFrom: (encoding, enumeration) => {
|
|
43
|
+
return enumeration.literals.find((literal) => literal.key === encoding);
|
|
44
|
+
},
|
|
45
|
+
resolveInfoFor: (node) => {
|
|
46
|
+
if ("name" in node) {
|
|
47
|
+
// evaluating `node.name` might cause an error through FeatureValueManager.throwOnReadOfUnset:
|
|
48
|
+
try {
|
|
49
|
+
const value = node.name;
|
|
50
|
+
return typeof value === "string" ? value : undefined;
|
|
51
|
+
}
|
|
52
|
+
catch (_) {
|
|
53
|
+
return undefined;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
const allSupertypes = allSuperTypesOf(node.classifier);
|
|
57
|
+
if (allSupertypes.indexOf(builtinClassifiers.inamed) > -1) {
|
|
58
|
+
return node.getPropertyValueManager(builtinFeatures.inamed_name).getDirectly();
|
|
59
|
+
}
|
|
60
|
+
if (allSupertypes.indexOf(LionCore_builtinsBase.INSTANCE.INamed) > -1) {
|
|
61
|
+
return node.getPropertyValueManager(LionCore_builtinsBase.INSTANCE.INamed_name).getDirectly();
|
|
62
|
+
}
|
|
63
|
+
return undefined;
|
|
64
|
+
}
|
|
65
|
+
};
|
|
66
|
+
/**
|
|
67
|
+
* @return a serialization of the given nodes (of type {@link INodeBase}) as a {@link SerializationChunk}.
|
|
68
|
+
*/
|
|
69
|
+
export const serializeNodeBases = (nodes) => serializeNodes(nodes, nodeBaseReader, { serializeEmptyFeatures: false });
|
|
70
|
+
//# sourceMappingURL=serializer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"serializer.js","sourceRoot":"","sources":["../src/serializer.ts"],"names":[],"mappings":"AAAA,wDAAwD;AACxD,EAAE;AACF,iEAAiE;AACjE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,iDAAiD;AACjD,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AACjC,EAAE;AACF,sEAAsE;AACtE,sCAAsC;AAEtC,OAAO,EACH,eAAe,EACf,kBAAkB,EAClB,eAAe,EACf,WAAW,EAGX,QAAQ,EACR,SAAS,EACT,cAAc,EACjB,MAAM,eAAe,CAAC;AAEvB,OAAO,EAAY,qBAAqB,EAAC,MAAM,YAAY,CAAC;AAG5D;;;GAGG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,IAAe,EAAE,OAAgB,EAAE,EAAE;IACjE,IAAI,OAAO,YAAY,QAAQ,EAAE,CAAC;QAC9B,OAAO,IAAI,CAAC,uBAAuB,CAAC,OAAO,CAAC,CAAC,WAAW,EAAE,CAAC;IAC/D,CAAC;IACD,IAAI,OAAO,YAAY,WAAW,EAAE,CAAC;QACjC,OAAO,IAAI,CAAC,0BAA0B,CAAC,OAAO,CAAC,CAAC,WAAW,EAAE,CAAC;IAClE,CAAC;IACD,IAAI,OAAO,YAAY,SAAS,EAAE,CAAC;QAC/B,OAAO,IAAI,CAAC,wBAAwB,CAAC,OAAO,CAAC,CAAC,WAAW,EAAE,CAAC;IAChE,CAAC;IACD,MAAM,IAAI,KAAK,CAAC,8BAA8B,OAAO,CAAC,WAAW,CAAC,IAAI,EAAE,CAAC,CAAA;AAC7E,CAAC,CAAC;AAEF;;;GAGG;AACH,MAAM,CAAC,MAAM,cAAc,GAAgC;IACvD,YAAY,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,UAAU;IAC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,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { INodeBase } from "./base-types.js";
|
|
2
|
+
/**
|
|
3
|
+
* @return a function that renders the roots of a given forest of {@link INodeBase nodes} in a textual tree-representation.
|
|
4
|
+
* @param identificationFor a function that renders an identification for the given {@link INodeBase node} — typically its name or its ID.
|
|
5
|
+
*/
|
|
6
|
+
export declare const asTreeTextWith: (identificationFor: (node: INodeBase) => string) => (nodes: INodeBase[]) => string;
|
|
7
|
+
//# sourceMappingURL=textualizer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"textualizer.d.ts","sourceRoot":"","sources":["../src/textualizer.ts"],"names":[],"mappings":"AAoBA,OAAO,EAAC,SAAS,EAAC,MAAM,iBAAiB,CAAC;AAyB1C;;;GAGG;AACH,eAAO,MAAM,cAAc,6BAA8B,SAAS,KAAK,MAAM,aAAY,SAAS,EAAE,KAAK,MAqDxG,CAAA"}
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
// Copyright 2025 TRUMPF Laser SE and other contributors
|
|
2
|
+
//
|
|
3
|
+
// Licensed under the Apache License, Version 2.0 (the "License")
|
|
4
|
+
// you may not use this file except in compliance with the License.
|
|
5
|
+
// You may obtain a copy of the License at
|
|
6
|
+
//
|
|
7
|
+
// http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
//
|
|
9
|
+
// Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
// See the License for the specific language governing permissions and
|
|
13
|
+
// limitations under the License.
|
|
14
|
+
//
|
|
15
|
+
// SPDX-FileCopyrightText: 2025 TRUMPF Laser SE and other contributors
|
|
16
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
17
|
+
import { asString, indentWith } from "littoral-templates";
|
|
18
|
+
import { allFeaturesOf, Containment, Property, Reference, unresolved } from "@lionweb/core";
|
|
19
|
+
import { LionCore_builtinsBase } from "./lionCore_builtins.g.js";
|
|
20
|
+
const indent = indentWith(" ")(1);
|
|
21
|
+
const prependWith = (template, prefix) => prefix + asString(template);
|
|
22
|
+
const asINodeBases = (value) => {
|
|
23
|
+
const isINodeBase = (value) => !(value === unresolved || value === undefined);
|
|
24
|
+
if (Array.isArray(value)) {
|
|
25
|
+
return value
|
|
26
|
+
.filter((subValue) => isINodeBase(subValue))
|
|
27
|
+
.map((subValue) => subValue);
|
|
28
|
+
}
|
|
29
|
+
return isINodeBase(value) ? [value] : [];
|
|
30
|
+
};
|
|
31
|
+
/**
|
|
32
|
+
* @return a function that renders the roots of a given forest of {@link INodeBase nodes} in a textual tree-representation.
|
|
33
|
+
* @param identificationFor a function that renders an identification for the given {@link INodeBase node} — typically its name or its ID.
|
|
34
|
+
*/
|
|
35
|
+
export const asTreeTextWith = (identificationFor) => {
|
|
36
|
+
const asText = (node) => {
|
|
37
|
+
const featureValueAsText = (feature) => {
|
|
38
|
+
if (feature instanceof Property) {
|
|
39
|
+
const valueManager = node.getPropertyValueManager(feature);
|
|
40
|
+
const displayValue = (() => {
|
|
41
|
+
if (!valueManager.isSet()) {
|
|
42
|
+
return `$<not set>`;
|
|
43
|
+
}
|
|
44
|
+
const value = valueManager.getDirectly();
|
|
45
|
+
if (feature.type === LionCore_builtinsBase.INSTANCE.String) {
|
|
46
|
+
return `"${value}"`;
|
|
47
|
+
}
|
|
48
|
+
return value;
|
|
49
|
+
})();
|
|
50
|
+
return `${feature.name} = ${displayValue}`;
|
|
51
|
+
}
|
|
52
|
+
if (feature instanceof Containment) {
|
|
53
|
+
const valueManager = node.getContainmentValueManager(feature);
|
|
54
|
+
const children = asINodeBases(valueManager.getDirectly());
|
|
55
|
+
return [
|
|
56
|
+
`${feature.name}:${children.length === 0 ? " <nothing>" : ""}`,
|
|
57
|
+
indent(children.map(asText))
|
|
58
|
+
];
|
|
59
|
+
}
|
|
60
|
+
if (feature instanceof Reference) {
|
|
61
|
+
const valueManager = node.getReferenceValueManager(feature);
|
|
62
|
+
const references = asINodeBases(valueManager.getDirectly());
|
|
63
|
+
return [
|
|
64
|
+
`${feature.name} -> ${references.length === 0 ? "<none>" : references.map(identificationFor).join(", ")}`
|
|
65
|
+
];
|
|
66
|
+
}
|
|
67
|
+
return `!!! can't handle feature ${feature.name} (of meta type ${feature.metaType()})`;
|
|
68
|
+
};
|
|
69
|
+
const annotationAsText = (annotation) => prependWith(asText(annotation), "@ ");
|
|
70
|
+
return [
|
|
71
|
+
`${node.classifier.name} (id: ${node.id})`,
|
|
72
|
+
indent([
|
|
73
|
+
allFeaturesOf(node.classifier).map(featureValueAsText),
|
|
74
|
+
node.annotations.map(annotationAsText)
|
|
75
|
+
])
|
|
76
|
+
];
|
|
77
|
+
};
|
|
78
|
+
return (nodes) => asString(nodes
|
|
79
|
+
.filter((node) => node.parent === undefined) // root nodes
|
|
80
|
+
.map(asText));
|
|
81
|
+
};
|
|
82
|
+
//# sourceMappingURL=textualizer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"textualizer.js","sourceRoot":"","sources":["../src/textualizer.ts"],"names":[],"mappings":"AAAA,wDAAwD;AACxD,EAAE;AACF,iEAAiE;AACjE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,iDAAiD;AACjD,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AACjC,EAAE;AACF,sEAAsE;AACtE,sCAAsC;AAEtC,OAAO,EAAC,QAAQ,EAAE,UAAU,EAAW,MAAM,oBAAoB,CAAA;AACjE,OAAO,EAAC,aAAa,EAAE,WAAW,EAAW,QAAQ,EAAE,SAAS,EAAE,UAAU,EAAC,MAAM,eAAe,CAAA;AAGlG,OAAO,EAAC,qBAAqB,EAAC,MAAM,0BAA0B,CAAC;AAG/D,MAAM,MAAM,GAAG,UAAU,CAAC,MAAM,CAAC,CAA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OAAO;YACH,GAAG,IAAI,CAAC,UAAU,CAAC,IAAI,SAAS,IAAI,CAAC,EAAE,GAAG;YAC1C,MAAM,CAAC;gBACH,aAAa,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,GAAG,CAAC,kBAAkB,CAAC;gBACtD,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,gBAAgB,CAAC;aACzC,CAAC;SACL,CAAA;IACL,CAAC,CAAA;IAED,OAAO,CAAC,KAAkB,EAAE,EAAE,CAAC,QAAQ,CACnC,KAAK;SACA,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,MAAM,KAAK,SAAS,CAAC,CAAC,aAAa;SACzD,GAAG,CAAC,MAAM,CAAC,CACnB,CAAA;AACL,CAAC,CAAA"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { INodeBase } from "../base-types.js";
|
|
2
|
+
import { ValueManager } from "./base.js";
|
|
3
|
+
/**
|
|
4
|
+
* A value manager for annotations.
|
|
5
|
+
* Annotations (of any type) are simply contained by a parent (which is an {@link INodeBase}),
|
|
6
|
+
* not in the context of a(ny) {@link Feature feature}.
|
|
7
|
+
*/
|
|
8
|
+
export declare class AnnotationsValueManager extends ValueManager {
|
|
9
|
+
constructor(container: INodeBase);
|
|
10
|
+
private readonly annotations;
|
|
11
|
+
get(): INodeBase[];
|
|
12
|
+
addDirectly(newAnnotation: INodeBase): void;
|
|
13
|
+
add(newAnnotation: INodeBase): void;
|
|
14
|
+
/**
|
|
15
|
+
* @return `false` if the given `newAnnotation` wasn't contained before,
|
|
16
|
+
* otherwise an array tuple with the old – i.e.: previous – parent of the inserted annotation, and the index it was contained at.
|
|
17
|
+
*/
|
|
18
|
+
insertAtIndexDirectly(newAnnotation: INodeBase, index: number): false | [oldParent: INodeBase, oldIndex: number];
|
|
19
|
+
insertAtIndex(newAnnotation: INodeBase, index: number): void;
|
|
20
|
+
/**
|
|
21
|
+
* @return the moved annotation, or `undefined` if the indices coincide.
|
|
22
|
+
*/
|
|
23
|
+
moveDirectly(oldIndex: number, newIndex: number): INodeBase | undefined;
|
|
24
|
+
move(oldIndex: number, newIndex: number): void;
|
|
25
|
+
/**
|
|
26
|
+
* @return the replaced annotation.
|
|
27
|
+
*/
|
|
28
|
+
replaceAtIndexDirectly(newAnnotation: INodeBase, index: number): INodeBase;
|
|
29
|
+
replaceAtIndex(newAnnotation: INodeBase, index: number): void;
|
|
30
|
+
removeDirectly(annotationToRemove: INodeBase): number;
|
|
31
|
+
remove(annotationToRemove: INodeBase): void;
|
|
32
|
+
}
|
|
33
|
+
//# sourceMappingURL=annotations.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"annotations.d.ts","sourceRoot":"","sources":["../../src/value-managers/annotations.ts"],"names":[],"mappings":"AAmBA,OAAO,EAAC,SAAS,EAAmB,MAAM,kBAAkB,CAAC;AAC7D,OAAO,EAAa,YAAY,EAAC,MAAM,WAAW,CAAC;AAUnD;;;;GAIG;AACH,qBAAa,uBAAwB,SAAQ,YAAY;gBAEzC,SAAS,EAAE,SAAS;IAIhC,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAkD;IAE9E,GAAG,IAAI,SAAS,EAAE;IAIV,WAAW,CAAC,aAAa,EAAE,SAAS;IAKpC,GAAG,CAAC,aAAa,EAAE,SAAS;IAIpC;;;OAGG;IACK,qBAAqB,CAAC,aAAa,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,GAAG,KAAK,GAAG,CAAC,SAAS,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,CAAC;IAchH,aAAa,CAAC,aAAa,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM;IAS7D;;OAEG;IACK,YAAY,CAAC,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,SAAS,GAAG,SAAS;IAWvE,IAAI,CAAC,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM;IAO/C;;OAEG;IACK,sBAAsB,CAAC,aAAa,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,GAAG,SAAS;IAS1E,cAAc,CAAC,aAAa,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM;IAKtD,cAAc,CAAC,kBAAkB,EAAE,SAAS,GAAG,MAAM;IASrD,MAAM,CAAC,kBAAkB,EAAE,SAAS;CAO/C"}
|
|
@@ -0,0 +1,192 @@
|
|
|
1
|
+
// Copyright 2025 TRUMPF Laser SE and other contributors
|
|
2
|
+
//
|
|
3
|
+
// Licensed under the Apache License, Version 2.0 (the "License")
|
|
4
|
+
// you may not use this file except in compliance with the License.
|
|
5
|
+
// You may obtain a copy of the License at
|
|
6
|
+
//
|
|
7
|
+
// http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
//
|
|
9
|
+
// Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
// See the License for the specific language governing permissions and
|
|
13
|
+
// limitations under the License.
|
|
14
|
+
//
|
|
15
|
+
// SPDX-FileCopyrightText: 2025 TRUMPF Laser SE and other contributors
|
|
16
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
17
|
+
var __runInitializers = (this && this.__runInitializers) || function (thisArg, initializers, value) {
|
|
18
|
+
var useValue = arguments.length > 2;
|
|
19
|
+
for (var i = 0; i < initializers.length; i++) {
|
|
20
|
+
value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);
|
|
21
|
+
}
|
|
22
|
+
return useValue ? value : void 0;
|
|
23
|
+
};
|
|
24
|
+
var __esDecorate = (this && this.__esDecorate) || function (ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {
|
|
25
|
+
function accept(f) { if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected"); return f; }
|
|
26
|
+
var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value";
|
|
27
|
+
var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null;
|
|
28
|
+
var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});
|
|
29
|
+
var _, done = false;
|
|
30
|
+
for (var i = decorators.length - 1; i >= 0; i--) {
|
|
31
|
+
var context = {};
|
|
32
|
+
for (var p in contextIn) context[p] = p === "access" ? {} : contextIn[p];
|
|
33
|
+
for (var p in contextIn.access) context.access[p] = contextIn.access[p];
|
|
34
|
+
context.addInitializer = function (f) { if (done) throw new TypeError("Cannot add initializers after decoration has completed"); extraInitializers.push(accept(f || null)); };
|
|
35
|
+
var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);
|
|
36
|
+
if (kind === "accessor") {
|
|
37
|
+
if (result === void 0) continue;
|
|
38
|
+
if (result === null || typeof result !== "object") throw new TypeError("Object expected");
|
|
39
|
+
if (_ = accept(result.get)) descriptor.get = _;
|
|
40
|
+
if (_ = accept(result.set)) descriptor.set = _;
|
|
41
|
+
if (_ = accept(result.init)) initializers.unshift(_);
|
|
42
|
+
}
|
|
43
|
+
else if (_ = accept(result)) {
|
|
44
|
+
if (kind === "field") initializers.unshift(_);
|
|
45
|
+
else descriptor[key] = _;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
if (target) Object.defineProperty(target, contextIn.name, descriptor);
|
|
49
|
+
done = true;
|
|
50
|
+
};
|
|
51
|
+
import { action, observable } from "mobx";
|
|
52
|
+
import { removeFromParent } from "../base-types.js";
|
|
53
|
+
import { checkIndex, ValueManager } from "./base.js";
|
|
54
|
+
import { AnnotationAddedDelta, AnnotationDeletedDelta, AnnotationMovedFromOtherParentDelta, AnnotationMovedInSameParentDelta, AnnotationReplacedDelta } from "../deltas/index.js";
|
|
55
|
+
/**
|
|
56
|
+
* A value manager for annotations.
|
|
57
|
+
* Annotations (of any type) are simply contained by a parent (which is an {@link INodeBase}),
|
|
58
|
+
* not in the context of a(ny) {@link Feature feature}.
|
|
59
|
+
*/
|
|
60
|
+
let AnnotationsValueManager = (() => {
|
|
61
|
+
var _a;
|
|
62
|
+
let _classSuper = ValueManager;
|
|
63
|
+
let _instanceExtraInitializers = [];
|
|
64
|
+
let _addDirectly_decorators;
|
|
65
|
+
let _add_decorators;
|
|
66
|
+
let _insertAtIndexDirectly_decorators;
|
|
67
|
+
let _insertAtIndex_decorators;
|
|
68
|
+
let _moveDirectly_decorators;
|
|
69
|
+
let _move_decorators;
|
|
70
|
+
let _replaceAtIndexDirectly_decorators;
|
|
71
|
+
let _replaceAtIndex_decorators;
|
|
72
|
+
let _removeDirectly_decorators;
|
|
73
|
+
let _remove_decorators;
|
|
74
|
+
return _a = class AnnotationsValueManager extends _classSuper {
|
|
75
|
+
constructor(container) {
|
|
76
|
+
super(container);
|
|
77
|
+
this.annotations = (__runInitializers(this, _instanceExtraInitializers), observable.array([], { deep: false }));
|
|
78
|
+
}
|
|
79
|
+
get() {
|
|
80
|
+
return this.annotations.slice();
|
|
81
|
+
}
|
|
82
|
+
addDirectly(newAnnotation) {
|
|
83
|
+
this.annotations.push(newAnnotation);
|
|
84
|
+
newAnnotation.attachTo(this.container, null);
|
|
85
|
+
}
|
|
86
|
+
add(newAnnotation) {
|
|
87
|
+
this.insertAtIndex(newAnnotation, this.annotations.length);
|
|
88
|
+
}
|
|
89
|
+
/**
|
|
90
|
+
* @return `false` if the given `newAnnotation` wasn't contained before,
|
|
91
|
+
* otherwise an array tuple with the old – i.e.: previous – parent of the inserted annotation, and the index it was contained at.
|
|
92
|
+
*/
|
|
93
|
+
insertAtIndexDirectly(newAnnotation, index) {
|
|
94
|
+
checkIndex(index, this.annotations.length, true);
|
|
95
|
+
this.annotations.splice(index, 0, newAnnotation);
|
|
96
|
+
const oldParent = newAnnotation.parent;
|
|
97
|
+
if (oldParent === undefined) {
|
|
98
|
+
newAnnotation.attachTo(this.container, null);
|
|
99
|
+
return false;
|
|
100
|
+
}
|
|
101
|
+
else {
|
|
102
|
+
const oldIndex = removeFromParent(oldParent, newAnnotation);
|
|
103
|
+
newAnnotation.attachTo(this.container, null);
|
|
104
|
+
return [oldParent, oldIndex];
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
insertAtIndex(newAnnotation, index) {
|
|
108
|
+
const oldParentage = this.insertAtIndexDirectly(newAnnotation, index);
|
|
109
|
+
if (oldParentage === false) {
|
|
110
|
+
this.emitDelta(() => new AnnotationAddedDelta(this.container, index, newAnnotation));
|
|
111
|
+
}
|
|
112
|
+
else {
|
|
113
|
+
this.emitDelta(() => new AnnotationMovedFromOtherParentDelta(oldParentage[0], oldParentage[1], this.container, index, newAnnotation));
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
/**
|
|
117
|
+
* @return the moved annotation, or `undefined` if the indices coincide.
|
|
118
|
+
*/
|
|
119
|
+
moveDirectly(oldIndex, newIndex) {
|
|
120
|
+
checkIndex(oldIndex, this.annotations.length, false);
|
|
121
|
+
checkIndex(newIndex, this.annotations.length, false);
|
|
122
|
+
if (oldIndex !== newIndex) {
|
|
123
|
+
const [annotation] = this.annotations.splice(oldIndex, 1);
|
|
124
|
+
this.annotations.splice(newIndex, 0, annotation);
|
|
125
|
+
return annotation;
|
|
126
|
+
}
|
|
127
|
+
return undefined;
|
|
128
|
+
}
|
|
129
|
+
move(oldIndex, newIndex) {
|
|
130
|
+
const annotation = this.moveDirectly(oldIndex, newIndex);
|
|
131
|
+
if (annotation !== undefined) {
|
|
132
|
+
this.emitDelta(() => new AnnotationMovedInSameParentDelta(this.container, oldIndex, newIndex, annotation));
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
/**
|
|
136
|
+
* @return the replaced annotation.
|
|
137
|
+
*/
|
|
138
|
+
replaceAtIndexDirectly(newAnnotation, index) {
|
|
139
|
+
checkIndex(index, this.annotations.length, false);
|
|
140
|
+
const replacedAnnotation = this.annotations[index];
|
|
141
|
+
this.annotations.splice(index, 1, newAnnotation);
|
|
142
|
+
replacedAnnotation.detach();
|
|
143
|
+
newAnnotation.attachTo(this.container, null);
|
|
144
|
+
return replacedAnnotation;
|
|
145
|
+
}
|
|
146
|
+
replaceAtIndex(newAnnotation, index) {
|
|
147
|
+
const replacedAnnotation = this.replaceAtIndexDirectly(newAnnotation, index);
|
|
148
|
+
this.emitDelta(() => new AnnotationReplacedDelta(this.container, index, replacedAnnotation, newAnnotation));
|
|
149
|
+
}
|
|
150
|
+
removeDirectly(annotationToRemove) {
|
|
151
|
+
const index = this.annotations.indexOf(annotationToRemove);
|
|
152
|
+
if (index > -1) {
|
|
153
|
+
this.annotations.splice(index, 1);
|
|
154
|
+
}
|
|
155
|
+
annotationToRemove.detach();
|
|
156
|
+
return index;
|
|
157
|
+
}
|
|
158
|
+
remove(annotationToRemove) {
|
|
159
|
+
const removeIndex = this.removeDirectly(annotationToRemove);
|
|
160
|
+
if (removeIndex > -1) {
|
|
161
|
+
this.emitDelta(() => new AnnotationDeletedDelta(this.container, removeIndex, annotationToRemove));
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
},
|
|
165
|
+
(() => {
|
|
166
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
167
|
+
_addDirectly_decorators = [action];
|
|
168
|
+
_add_decorators = [action];
|
|
169
|
+
_insertAtIndexDirectly_decorators = [action];
|
|
170
|
+
_insertAtIndex_decorators = [action];
|
|
171
|
+
_moveDirectly_decorators = [action];
|
|
172
|
+
_move_decorators = [action];
|
|
173
|
+
_replaceAtIndexDirectly_decorators = [action];
|
|
174
|
+
_replaceAtIndex_decorators = [action];
|
|
175
|
+
_removeDirectly_decorators = [action];
|
|
176
|
+
_remove_decorators = [action];
|
|
177
|
+
__esDecorate(_a, null, _addDirectly_decorators, { kind: "method", name: "addDirectly", static: false, private: false, access: { has: obj => "addDirectly" in obj, get: obj => obj.addDirectly }, metadata: _metadata }, null, _instanceExtraInitializers);
|
|
178
|
+
__esDecorate(_a, null, _add_decorators, { kind: "method", name: "add", static: false, private: false, access: { has: obj => "add" in obj, get: obj => obj.add }, metadata: _metadata }, null, _instanceExtraInitializers);
|
|
179
|
+
__esDecorate(_a, null, _insertAtIndexDirectly_decorators, { kind: "method", name: "insertAtIndexDirectly", static: false, private: false, access: { has: obj => "insertAtIndexDirectly" in obj, get: obj => obj.insertAtIndexDirectly }, metadata: _metadata }, null, _instanceExtraInitializers);
|
|
180
|
+
__esDecorate(_a, null, _insertAtIndex_decorators, { kind: "method", name: "insertAtIndex", static: false, private: false, access: { has: obj => "insertAtIndex" in obj, get: obj => obj.insertAtIndex }, metadata: _metadata }, null, _instanceExtraInitializers);
|
|
181
|
+
__esDecorate(_a, null, _moveDirectly_decorators, { kind: "method", name: "moveDirectly", static: false, private: false, access: { has: obj => "moveDirectly" in obj, get: obj => obj.moveDirectly }, metadata: _metadata }, null, _instanceExtraInitializers);
|
|
182
|
+
__esDecorate(_a, null, _move_decorators, { kind: "method", name: "move", static: false, private: false, access: { has: obj => "move" in obj, get: obj => obj.move }, metadata: _metadata }, null, _instanceExtraInitializers);
|
|
183
|
+
__esDecorate(_a, null, _replaceAtIndexDirectly_decorators, { kind: "method", name: "replaceAtIndexDirectly", static: false, private: false, access: { has: obj => "replaceAtIndexDirectly" in obj, get: obj => obj.replaceAtIndexDirectly }, metadata: _metadata }, null, _instanceExtraInitializers);
|
|
184
|
+
__esDecorate(_a, null, _replaceAtIndex_decorators, { kind: "method", name: "replaceAtIndex", static: false, private: false, access: { has: obj => "replaceAtIndex" in obj, get: obj => obj.replaceAtIndex }, metadata: _metadata }, null, _instanceExtraInitializers);
|
|
185
|
+
__esDecorate(_a, null, _removeDirectly_decorators, { kind: "method", name: "removeDirectly", static: false, private: false, access: { has: obj => "removeDirectly" in obj, get: obj => obj.removeDirectly }, metadata: _metadata }, null, _instanceExtraInitializers);
|
|
186
|
+
__esDecorate(_a, null, _remove_decorators, { kind: "method", name: "remove", static: false, private: false, access: { has: obj => "remove" in obj, get: obj => obj.remove }, metadata: _metadata }, null, _instanceExtraInitializers);
|
|
187
|
+
if (_metadata) Object.defineProperty(_a, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
188
|
+
})(),
|
|
189
|
+
_a;
|
|
190
|
+
})();
|
|
191
|
+
export { AnnotationsValueManager };
|
|
192
|
+
//# sourceMappingURL=annotations.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"annotations.js","sourceRoot":"","sources":["../../src/value-managers/annotations.ts"],"names":[],"mappings":"AAAA,wDAAwD;AACxD,EAAE;AACF,iEAAiE;AACjE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,iDAAiD;AACjD,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AACjC,EAAE;AACF,sEAAsE;AACtE,sCAAsC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEtC,OAAO,EAAC,MAAM,EAAE,UAAU,EAAC,MAAM,MAAM,CAAC;AAExC,OAAO,EAAY,gBAAgB,EAAC,MAAM,kBAAkB,CAAC;AAC7D,OAAO,EAAC,UAAU,EAAE,YAAY,EAAC,MAAM,WAAW,CAAC;AACnD,OAAO,EACH,oBAAoB,EACpB,sBAAsB,EACtB,mCAAmC,EACnC,gCAAgC,EAChC,uBAAuB,EAC1B,MAAM,oBAAoB,CAAC;AAG5B;;;;GAIG;IACU,uBAAuB;;sBAAS,YAAY;;;;;;;;;;;;sBAA5C,uBAAwB,SAAQ,WAAY;YAErD,YAAY,SAAoB;gBAC5B,KAAK,CAAC,SAAS,CAAC,CAAC;gBAGJ,gBAAW,yDAAG,UAAU,CAAC,KAAK,CAAY,EAAE,EAAE,EAAC,IAAI,EAAE,KAAK,EAAC,CAAC,EAAC;YAF9E,CAAC;YAID,GAAG;gBACC,OAAO,IAAI,CAAC,WAAW,CAAC,KAAK,EAAE,CAAC;YACpC,CA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