Move pin templates to subdirectory

This commit is contained in:
barsdeveloper
2022-12-17 10:46:30 +01:00
parent 0c2625aa05
commit 60a8aa544a
24 changed files with 70 additions and 73 deletions

32
dist/ueblueprint.js vendored
View File

@@ -4723,7 +4723,7 @@ class IDraggablePositionedTemplate extends IDraggableTemplate {
/**
* @typedef {import("../../Blueprint").default} Blueprint
* @typedef {import("../../element/NodeElement").default} NodeElement
* @typedef {import("../../template/CommentNodeTemplate").default} CommentNodeTemplate
* @typedef {import("../../template/node/CommentNodeTemplate").default} CommentNodeTemplate
*/
/** @extends {MouseMoveDraggable<NodeElement>} */
@@ -5102,8 +5102,8 @@ class IResizeableTemplate 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 CommentNodeTemplate extends IResizeableTemplate {
@@ -5387,10 +5387,10 @@ class MouseCreateLink extends IMouseClickDrag {
}
}
/** @typedef {import("../input/IInput").default} IInput */
/** @typedef {import("../../input/IInput").default} IInput */
/**
* @template T
* @typedef {import("../element/PinElement").default<T>} PinElement
* @typedef {import("../../element/PinElement").default<T>} PinElement
*/
/**
@@ -5481,7 +5481,7 @@ class PinTemplate extends ITemplate {
}
}
/** @typedef {import("./KnotNodeTemplate").default} KnotNodeTemplate */
/** @typedef {import("./../KnotNodeTemplate").default} KnotNodeTemplate */
class KnotPinTemplate extends PinTemplate {
@@ -6228,7 +6228,7 @@ class SelectorElement extends IFromToPositionedElement {
* @typedef {import("./element/PinElement").default} PinElement
* @typedef {import("./entity/GuidEntity").default} GuidEntity
* @typedef {import("./entity/PinReferenceEntity").default} PinReferenceEntity
* @typedef {import("./template/CommentNodeTemplate").default} CommentNodeTemplate
* @typedef {import("./template/node/CommentNodeTemplate").default} CommentNodeTemplate
* @typedef {{
* primaryInf: Number,
* primarySup: Number,
@@ -6794,7 +6794,7 @@ class ColorSliderElement extends IDraggableControlElement {
}
}
/** @typedef {import ("../element/InputElement").default} InputElement */
/** @typedef {import ("../../element/InputElement").default} InputElement */
/** @extends {ITemplate<InputElement>} */
class InputTemplate extends ITemplate {
@@ -6935,7 +6935,7 @@ class BoolInputPinTemplate extends PinTemplate {
}
}
/** @typedef {import("../element/PinElement").default} PinElement */
/** @typedef {import("../../element/PinElement").default} PinElement */
class ExecPinTemplate extends PinTemplate {
@@ -6956,7 +6956,7 @@ class ExecPinTemplate extends PinTemplate {
/**
* @template T
* @typedef {import("../element/PinElement").default<T>} PinElement
* @typedef {import("../../element/PinElement").default<T>} PinElement
*/
/**
@@ -7096,7 +7096,7 @@ class INumericPinTemplate extends IInputPinTemplate {
}
}
/** @typedef {import("../entity/IntegerEntity").default} IntEntity */
/** @typedef {import("../../entity/IntegerEntity").default} IntEntity */
/** @extends INumericInputPinTemplate<IntEntity> */
class IntInputPinTemplate extends INumericPinTemplate {
@@ -7550,8 +7550,8 @@ class ColorPickerWindowTemplate extends WindowTemplate {
}
/**
* @typedef {import("../element/WindowElement").default} WindowElement
* @typedef {import("../entity/LinearColorEntity").default} LinearColorEntity
* @typedef {import("../../element/WindowElement").default} WindowElement
* @typedef {import("../../entity/LinearColorEntity").default} LinearColorEntity
*/
/** @extends PinTemplate<LinearColorEntity> */
@@ -7600,7 +7600,7 @@ class LinearColorInputPinTemplate extends PinTemplate {
}
}
/** @typedef {import("../element/PinElement").default} PinElement */
/** @typedef {import("../../element/PinElement").default} PinElement */
class NameInputPinTemplate extends IInputPinTemplate {
@@ -7635,7 +7635,7 @@ class ReferencePinTemplate extends PinTemplate {
}
}
/** @typedef {import("../entity/RotatorEntity").default} Rotator */
/** @typedef {import("../../entity/RotatorEntity").default} Rotator */
/** @extends INumericPinTemplate<Rotator> */
class RotatorInputPinTemplate extends INumericPinTemplate {
@@ -7677,7 +7677,7 @@ class RotatorInputPinTemplate extends INumericPinTemplate {
class StringInputPinTemplate extends IInputPinTemplate {
}
/** @typedef {import("../entity/LinearColorEntity").default} LinearColorEntity */
/** @typedef {import("../../entity/LinearColorEntity").default} LinearColorEntity */
/**
* @template {VectorEntity} T

View File

@@ -10,7 +10,7 @@ import Utility from "./Utility"
* @typedef {import("./element/PinElement").default} PinElement
* @typedef {import("./entity/GuidEntity").default} GuidEntity
* @typedef {import("./entity/PinReferenceEntity").default} PinReferenceEntity
* @typedef {import("./template/CommentNodeTemplate").default} CommentNodeTemplate
* @typedef {import("./template/node/CommentNodeTemplate").default} CommentNodeTemplate
* @typedef {{
* primaryInf: Number,
* primarySup: Number,

View File

@@ -1,4 +1,4 @@
import InputTemplate from "../template/InputTemplate"
import InputTemplate from "../template/pin/InputTemplate"
import Utility from "../Utility"
import IElement from "./IElement"

View File

@@ -1,4 +1,4 @@
import CommentNodeTemplate from "../template/CommentNodeTemplate"
import CommentNodeTemplate from "../template/node/CommentNodeTemplate"
import Configuration from "../Configuration"
import IdentifierEntity from "../entity/IdentifierEntity"
import ISelectableDraggableElement from "./ISelectableDraggableElement"

View File

@@ -1,21 +1,21 @@
import BoolInputPinTemplate from "../template/BoolPinTemplate"
import BoolInputPinTemplate from "../template/pin/BoolPinTemplate"
import Configuration from "../Configuration"
import ElementFactory from "./ElementFactory"
import ExecPinTemplate from "../template/ExecPinTemplate"
import ExecPinTemplate from "../template/pin/ExecPinTemplate"
import GuidEntity from "../entity/GuidEntity"
import IElement from "./IElement"
import IntInputPinTemplate from "../template/IntPinTemplate"
import IntInputPinTemplate from "../template/pin/IntPinTemplate"
import ISerializer from "../serialization/ISerializer"
import LinearColorEntity from "../entity/LinearColorEntity"
import LinearColorInputPinTemplate from "../template/LinearColorPinTemplate"
import NameInputPinTemplate from "../template/NamePinTemplate"
import PinTemplate from "../template/PinTemplate"
import RealInputPinTemplate from "../template/RealInputPinTemplate"
import ReferencePinTemplate from "../template/ReferencePinTemplate"
import RotatorInputPinTemplate from "../template/RotatorInputPinTemplate"
import StringInputPinTemplate from "../template/StringInputPinTemplate"
import LinearColorInputPinTemplate from "../template/pin/LinearColorPinTemplate"
import NameInputPinTemplate from "../template/pin/NamePinTemplate"
import PinTemplate from "../template/pin/PinTemplate"
import RealInputPinTemplate from "../template/pin/RealInputPinTemplate"
import ReferencePinTemplate from "../template/pin/ReferencePinTemplate"
import RotatorInputPinTemplate from "../template/pin/RotatorInputPinTemplate"
import StringInputPinTemplate from "../template/pin/StringInputPinTemplate"
import Utility from "../Utility"
import VectorInputPinTemplate from "../template/VectorInputPinTemplate"
import VectorInputPinTemplate from "../template/pin/VectorInputPinTemplate"
/**
* @typedef {import("../entity/PinReferenceEntity").default} PinReferenceEntity
@@ -50,7 +50,6 @@ export default 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(),
@@ -72,7 +71,6 @@ export default 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,

View File

@@ -33,7 +33,6 @@ export default 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

View File

@@ -3,7 +3,7 @@ import MouseMoveDraggable from "./MouseMoveDraggable"
/**
* @typedef {import("../../Blueprint").default} Blueprint
* @typedef {import("../../element/NodeElement").default} NodeElement
* @typedef {import("../../template/CommentNodeTemplate").default} CommentNodeTemplate
* @typedef {import("../../template/node/CommentNodeTemplate").default} CommentNodeTemplate
*/
/** @extends {MouseMoveDraggable<NodeElement>} */

View File

@@ -1,7 +1,7 @@
import { html } from "lit"
import Configuration from "../Configuration"
import ElementFactory from "../element/ElementFactory"
import KnotPinTemplate from "./KnotPinTemplate"
import KnotPinTemplate from "./pin/KnotPinTemplate"
import NodeTemplate from "./NodeTemplate"
/**

View File

@@ -1,11 +1,11 @@
import { css, html } from "lit"
import Configuration from "../Configuration"
import IResizeableTemplate from "./IResizeableTemplate"
import LinearColorEntity from "../entity/LinearColorEntity"
import Configuration from "../../Configuration"
import IResizeableTemplate from "../IResizeableTemplate"
import LinearColorEntity from "../../entity/LinearColorEntity"
/**
* @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 CommentNodeTemplate extends IResizeableTemplate {

View File

@@ -1,5 +1,5 @@
import { html } from "lit"
import MouseIgnore from "../input/mouse/MouseIgnore"
import MouseIgnore from "../../input/mouse/MouseIgnore"
import PinTemplate from "./PinTemplate"
/**

View File

@@ -1,9 +1,9 @@
import { html } from "lit"
import PinTemplate from "./PinTemplate"
import SVGIcon from "../SVGIcon"
import Utility from "../Utility"
import SVGIcon from "../../SVGIcon"
import Utility from "../../Utility"
/** @typedef {import("../element/PinElement").default} PinElement */
/** @typedef {import("../../element/PinElement").default} PinElement */
export default class ExecPinTemplate extends PinTemplate {

View File

@@ -1,11 +1,11 @@
import { html } from "lit"
import MouseIgnore from "../input/mouse/MouseIgnore"
import MouseIgnore from "../../input/mouse/MouseIgnore"
import PinTemplate from "./PinTemplate"
import Utility from "../Utility"
import Utility from "../../Utility"
/**
* @template T
* @typedef {import("../element/PinElement").default<T>} PinElement
* @typedef {import("../../element/PinElement").default<T>} PinElement
*/
/**

View File

@@ -1,6 +1,6 @@
import ITemplate from "./ITemplate"
import ITemplate from "../ITemplate"
/** @typedef {import ("../element/InputElement").default} InputElement */
/** @typedef {import ("../../element/InputElement").default} InputElement */
/** @extends {ITemplate<InputElement>} */
export default class InputTemplate extends ITemplate {

View File

@@ -1,8 +1,8 @@
import { html } from "lit"
import IntegerEntity from "../entity/IntegerEntity"
import IntegerEntity from "../../entity/IntegerEntity"
import INumericInputPinTemplate from "./INumericInputPinTemplate"
/** @typedef {import("../entity/IntegerEntity").default} IntEntity */
/** @typedef {import("../../entity/IntegerEntity").default} IntEntity */
/** @extends INumericInputPinTemplate<IntEntity> */
export default class IntInputPinTemplate extends INumericInputPinTemplate {

View File

@@ -1,8 +1,8 @@
import { html } from "lit"
import PinTemplate from "./PinTemplate"
import Utility from "../Utility"
import Utility from "../../Utility"
/** @typedef {import("./KnotNodeTemplate").default} KnotNodeTemplate */
/** @typedef {import("./../KnotNodeTemplate").default} KnotNodeTemplate */
export default class KnotPinTemplate extends PinTemplate {

View File

@@ -1,12 +1,12 @@
import { html } from "lit"
import ColorPickerWindowTemplate from "./ColorPickerWindowTemplate"
import Configuration from "../Configuration"
import ElementFactory from "../element/ElementFactory"
import ColorPickerWindowTemplate from "../ColorPickerWindowTemplate"
import Configuration from "../../Configuration"
import ElementFactory from "../../element/ElementFactory"
import PinTemplate from "./PinTemplate"
/**
* @typedef {import("../element/WindowElement").default} WindowElement
* @typedef {import("../entity/LinearColorEntity").default} LinearColorEntity
* @typedef {import("../../element/WindowElement").default} WindowElement
* @typedef {import("../../entity/LinearColorEntity").default} LinearColorEntity
*/
/** @extends PinTemplate<LinearColorEntity> */

View File

@@ -1,6 +1,6 @@
import IInputPinTemplate from "./IInputPinTemplate"
/** @typedef {import("../element/PinElement").default} PinElement */
/** @typedef {import("../../element/PinElement").default} PinElement */
export default class NameInputPinTemplate extends IInputPinTemplate {

View File

@@ -1,14 +1,14 @@
import { html } from "lit"
import Configuration from "../Configuration"
import ITemplate from "./ITemplate"
import MouseCreateLink from "../input/mouse/MouseCreateLink"
import SVGIcon from "../SVGIcon"
import Utility from "../Utility"
import Configuration from "../../Configuration"
import ITemplate from "../ITemplate"
import MouseCreateLink from "../../input/mouse/MouseCreateLink"
import SVGIcon from "../../SVGIcon"
import Utility from "../../Utility"
/** @typedef {import("../input/IInput").default} IInput */
/** @typedef {import("../../input/IInput").default} IInput */
/**
* @template T
* @typedef {import("../element/PinElement").default<T>} PinElement
* @typedef {import("../../element/PinElement").default<T>} PinElement
*/
/**

View File

@@ -1,7 +1,7 @@
import { html } from "lit"
import IInputPinTemplate from "./IInputPinTemplate"
import INumericPinTemplate from "./INumericInputPinTemplate"
import Utility from "../Utility"
import Utility from "../../Utility"
/**
* @template {Number} T

View File

@@ -1,5 +1,5 @@
import PinTemplate from "./PinTemplate"
import SVGIcon from "../SVGIcon"
import SVGIcon from "../../SVGIcon"
export default class ReferencePinTemplate extends PinTemplate {

View File

@@ -1,9 +1,9 @@
import { html } from "lit"
import IInputPinTemplate from "./IInputPinTemplate"
import INumericPinTemplate from "./INumericInputPinTemplate"
import RotatorEntity from "../entity/RotatorEntity"
import RotatorEntity from "../../entity/RotatorEntity"
/** @typedef {import("../entity/RotatorEntity").default} Rotator */
/** @typedef {import("../../entity/RotatorEntity").default} Rotator */
/** @extends INumericPinTemplate<Rotator> */
export default class RotatorInputPinTemplate extends INumericPinTemplate {

View File

@@ -1,10 +1,10 @@
import { html } from "lit"
import IInputPinTemplate from "./IInputPinTemplate"
import INumericPinTemplate from "./INumericInputPinTemplate"
import Utility from "../Utility"
import VectorEntity from "../entity/VectorEntity"
import Utility from "../../Utility"
import VectorEntity from "../../entity/VectorEntity"
/** @typedef {import("../entity/LinearColorEntity").default} LinearColorEntity */
/** @typedef {import("../../entity/LinearColorEntity").default} LinearColorEntity */
/**
* @template {VectorEntity} T