diff --git a/dist/ueblueprint.js b/dist/ueblueprint.js index 03688dd..e683783 100755 --- a/dist/ueblueprint.js +++ b/dist/ueblueprint.js @@ -2443,7 +2443,6 @@ class Grammar { /** @template {AnyValue} T */ class ISerializer { - // @ts-expect-error static grammar = Parsimmon.createLanguage(new Grammar()) /** @param {AnyValueConstructor} entityType */ @@ -2736,7 +2735,6 @@ class IKeyboardShortcut extends IInput { return v } if (v.constructor === String) { - // @ts-expect-error const parsed = ISerializer.grammar.KeyBinding.parse(v); if (parsed.status) { return parsed.value @@ -3935,7 +3933,7 @@ class MouseDbClick extends IPointing { /** * @typedef {import("../element/LinkElement").default} LinkElement * @typedef {import("../element/NodeElement").default} NodeElement - * @typedef {import("../template/KnotNodeTemplate").default} KnotNodeTemplate + * @typedef {import("./node/KnotNodeTemplate").default} KnotNodeTemplate */ @@ -4788,8 +4786,8 @@ class ISelectableDraggableTemplate extends IDraggablePositionedTemplate { } /** - * @typedef {import("../element/NodeElement").default} NodeElement - * @typedef {import("../element/PinElement").default} PinElement + * @typedef {import("../../element/NodeElement").default} NodeElement + * @typedef {import("../../element/PinElement").default} PinElement */ /** @extends {ISelectableDraggableTemplate} */ @@ -5267,7 +5265,7 @@ class ISelectableDraggableElement extends IDraggableElement { /** * @typedef {import("../../element/PinElement").default} PinElement * @typedef {import("../../element/LinkElement").default} LinkElement - * @typedef {import("../../template/KnotNodeTemplate").default} KnotNodeTemplate + * @typedef {import("../../template/node/KnotNodeTemplate").default} KnotNodeTemplate */ /** @extends IMouseClickDrag */ @@ -5481,7 +5479,7 @@ class PinTemplate extends ITemplate { } } -/** @typedef {import("./../KnotNodeTemplate").default} KnotNodeTemplate */ +/** @typedef {import("../node/KnotNodeTemplate").default} KnotNodeTemplate */ class KnotPinTemplate extends PinTemplate { @@ -5508,8 +5506,8 @@ class KnotPinTemplate extends PinTemplate { } /** - * @typedef {import("../element/NodeElement").default} NodeElement - * @typedef {import("../element/PinElement").default} PinElement + * @typedef {import("../../element/NodeElement").default} NodeElement + * @typedef {import("../../element/PinElement").default} PinElement */ class KnotNodeTemplate extends NodeTemplate { @@ -5600,8 +5598,8 @@ class KnotNodeTemplate extends NodeTemplate { } /** - * @typedef {import("../element/NodeElement").default} NodeElement - * @typedef {import("../element/PinElement").default} PinElement + * @typedef {import("../../element/NodeElement").default} NodeElement + * @typedef {import("../../element/PinElement").default} PinElement */ class VariableAccessNodeTemplate extends NodeTemplate { @@ -7758,7 +7756,6 @@ class PinElement extends IElement { type: GuidEntity, converter: { fromAttribute: (value, type) => value - // @ts-expect-error ? ISerializer.grammar.Guid.parse(value).value : null, toAttribute: (value, type) => value?.toString(), @@ -7780,7 +7777,6 @@ class PinElement extends IElement { type: LinearColorEntity, converter: { fromAttribute: (value, type) => value - // @ts-expect-error ? ISerializer.grammar.LinearColorFromAnyColor.parse(value).value : null, toAttribute: (value, type) => value ? Utility.printLinearColor(value) : null, diff --git a/js/element/NodeElement.js b/js/element/NodeElement.js index 7e55eb6..740a45f 100644 --- a/js/element/NodeElement.js +++ b/js/element/NodeElement.js @@ -2,14 +2,14 @@ import CommentNodeTemplate from "../template/node/CommentNodeTemplate" import Configuration from "../Configuration" import IdentifierEntity from "../entity/IdentifierEntity" import ISelectableDraggableElement from "./ISelectableDraggableElement" -import KnotNodeTemplate from "../template/KnotNodeTemplate" -import NodeTemplate from "../template/NodeTemplate" +import KnotNodeTemplate from "../template/node/KnotNodeTemplate" +import NodeTemplate from "../template/node/NodeTemplate" import ObjectEntity from "../entity/ObjectEntity" import PinEntity from "../entity/PinEntity" import PinReferenceEntity from "../entity/PinReferenceEntity" import SerializerFactory from "../serialization/SerializerFactory" import Utility from "../Utility" -import VariableAccessNodeTemplate from "../template/VariableAccessNodeTemplate" +import VariableAccessNodeTemplate from "../template/node/VariableAccessNodeTemplate" /** @typedef {import("./IElement").default} IElement */ diff --git a/js/input/mouse/MouseCreateLink.js b/js/input/mouse/MouseCreateLink.js index 315d74d..09493e6 100755 --- a/js/input/mouse/MouseCreateLink.js +++ b/js/input/mouse/MouseCreateLink.js @@ -5,7 +5,7 @@ import IMouseClickDrag from "./IMouseClickDrag" /** * @typedef {import("../../element/PinElement").default} PinElement * @typedef {import("../../element/LinkElement").default} LinkElement - * @typedef {import("../../template/KnotNodeTemplate").default} KnotNodeTemplate + * @typedef {import("../../template/node/KnotNodeTemplate").default} KnotNodeTemplate */ /** @extends IMouseClickDrag */ diff --git a/js/serialization/ISerializer.js b/js/serialization/ISerializer.js index 5d365df..0494a4c 100644 --- a/js/serialization/ISerializer.js +++ b/js/serialization/ISerializer.js @@ -15,7 +15,6 @@ import Utility from "../Utility" /** @template {AnyValue} T */ export default class ISerializer { - // @ts-expect-error static grammar = Parsimmon.createLanguage(new Grammar()) /** @param {AnyValueConstructor} entityType */ diff --git a/js/template/IResizeableTemplate.js b/js/template/IResizeableTemplate.js index 69e8ec5..258f44f 100644 --- a/js/template/IResizeableTemplate.js +++ b/js/template/IResizeableTemplate.js @@ -1,5 +1,5 @@ import MouseClickDrag from "../input/mouse/MouseClickDrag" -import NodeTemplate from "./NodeTemplate" +import NodeTemplate from "./node/NodeTemplate" /** @typedef {import("../element/NodeElement").default} NodeElement */ diff --git a/js/template/LinkTemplate.js b/js/template/LinkTemplate.js index 4c3e8fe..636c762 100755 --- a/js/template/LinkTemplate.js +++ b/js/template/LinkTemplate.js @@ -9,7 +9,7 @@ import Utility from "../Utility" /** * @typedef {import("../element/LinkElement").default} LinkElement * @typedef {import("../element/NodeElement").default} NodeElement - * @typedef {import("../template/KnotNodeTemplate").default} KnotNodeTemplate + * @typedef {import("./node/KnotNodeTemplate").default} KnotNodeTemplate */ diff --git a/js/template/KnotNodeTemplate.js b/js/template/node/KnotNodeTemplate.js similarity index 89% rename from js/template/KnotNodeTemplate.js rename to js/template/node/KnotNodeTemplate.js index 734fd2d..07191b3 100644 --- a/js/template/KnotNodeTemplate.js +++ b/js/template/node/KnotNodeTemplate.js @@ -1,12 +1,12 @@ import { html } from "lit" -import Configuration from "../Configuration" -import ElementFactory from "../element/ElementFactory" -import KnotPinTemplate from "./pin/KnotPinTemplate" +import Configuration from "../../Configuration" +import ElementFactory from "../../element/ElementFactory" +import KnotPinTemplate from "../pin/KnotPinTemplate" import NodeTemplate from "./NodeTemplate" /** - * @typedef {import("../element/NodeElement").default} NodeElement - * @typedef {import("../element/PinElement").default} PinElement + * @typedef {import("../../element/NodeElement").default} NodeElement + * @typedef {import("../../element/PinElement").default} PinElement */ export default class KnotNodeTemplate extends NodeTemplate { diff --git a/js/template/NodeTemplate.js b/js/template/node/NodeTemplate.js similarity index 91% rename from js/template/NodeTemplate.js rename to js/template/node/NodeTemplate.js index a7bb60d..c14b8c5 100755 --- a/js/template/NodeTemplate.js +++ b/js/template/node/NodeTemplate.js @@ -1,13 +1,13 @@ import { css, html, nothing } from "lit" -import Configuration from "../Configuration" -import ElementFactory from "../element/ElementFactory" -import ISelectableDraggableTemplate from "./ISelectableDraggableTemplate" -import SVGIcon from "../SVGIcon" -import Utility from "../Utility" +import Configuration from "../../Configuration" +import ElementFactory from "../../element/ElementFactory" +import ISelectableDraggableTemplate from "../ISelectableDraggableTemplate" +import SVGIcon from "../../SVGIcon" +import Utility from "../../Utility" /** - * @typedef {import("../element/NodeElement").default} NodeElement - * @typedef {import("../element/PinElement").default} PinElement + * @typedef {import("../../element/NodeElement").default} NodeElement + * @typedef {import("../../element/PinElement").default} PinElement */ /** @extends {ISelectableDraggableTemplate} */ diff --git a/js/template/VariableAccessNodeTemplate.js b/js/template/node/VariableAccessNodeTemplate.js similarity index 91% rename from js/template/VariableAccessNodeTemplate.js rename to js/template/node/VariableAccessNodeTemplate.js index 7d8d04a..610e1a6 100644 --- a/js/template/VariableAccessNodeTemplate.js +++ b/js/template/node/VariableAccessNodeTemplate.js @@ -1,10 +1,10 @@ import { html, nothing } from "lit" -import ElementFactory from "../element/ElementFactory" +import ElementFactory from "../../element/ElementFactory" import NodeTemplate from "./NodeTemplate" /** - * @typedef {import("../element/NodeElement").default} NodeElement - * @typedef {import("../element/PinElement").default} PinElement + * @typedef {import("../../element/NodeElement").default} NodeElement + * @typedef {import("../../element/PinElement").default} PinElement */ export default class VariableAccessNodeTemplate extends NodeTemplate { diff --git a/js/template/pin/KnotPinTemplate.js b/js/template/pin/KnotPinTemplate.js index bfc3904..c0ecf47 100644 --- a/js/template/pin/KnotPinTemplate.js +++ b/js/template/pin/KnotPinTemplate.js @@ -2,7 +2,7 @@ import { html } from "lit" import PinTemplate from "./PinTemplate" import Utility from "../../Utility" -/** @typedef {import("./../KnotNodeTemplate").default} KnotNodeTemplate */ +/** @typedef {import("../node/KnotNodeTemplate").default} KnotNodeTemplate */ export default class KnotPinTemplate extends PinTemplate {