mirror of
https://github.com/barsdeveloper/ueblueprint.git
synced 2026-02-04 08:50:33 +08:00
Large typedef import cleanup and smaller fixes
This commit is contained in:
@@ -127,6 +127,11 @@ describe("Serializer", () => {
|
||||
.to.be.instanceOf(ObjectReferenceEntity)
|
||||
.and.to.deep.contain({ type: "Class", path: "/Script/ShooterGame.ShooterGameMode" })
|
||||
)
|
||||
it("Parses EdGraphPin'EdGraphPin_45417'", () =>
|
||||
expect(serializer.read(`EdGraphPin'EdGraphPin_45417'`))
|
||||
.to.be.instanceOf(ObjectReferenceEntity)
|
||||
.and.to.deep.contain({ type: "EdGraphPin", path: "EdGraphPin_45417" })
|
||||
)
|
||||
it(`Parses EdGraphPin'"K2Node_DynamicCast_2126.EdGraphPin_3990988"'`, () =>
|
||||
expect(serializer.read(`EdGraphPin'"K2Node_DynamicCast_2126.EdGraphPin_3990988"'`))
|
||||
.to.be.instanceOf(ObjectReferenceEntity)
|
||||
|
||||
299
dist/ueblueprint.js
vendored
299
dist/ueblueprint.js
vendored
@@ -25,9 +25,8 @@ var t$1;const i$2=window,s$1=i$2.trustedTypes,e$1=s$1?s$1.createPolicy("lit-html
|
||||
*/var l,o;class s extends d$1{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0;}createRenderRoot(){var t,e;const i=super.createRenderRoot();return null!==(t=(e=this.renderOptions).renderBefore)&&void 0!==t||(e.renderBefore=i.firstChild),i}update(t){const i=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=Z(i,this.renderRoot,this.renderOptions);}connectedCallback(){var t;super.connectedCallback(),null===(t=this._$Do)||void 0===t||t.setConnected(!0);}disconnectedCallback(){var t;super.disconnectedCallback(),null===(t=this._$Do)||void 0===t||t.setConnected(!1);}render(){return x}}s.finalized=!0,s._$litElement$=!0,null===(l=globalThis.litElementHydrateSupport)||void 0===l||l.call(globalThis,{LitElement:s});const n=globalThis.litElementPolyfillSupport;null==n||n({LitElement:s});(null!==(o=globalThis.litElementVersions)&&void 0!==o?o:globalThis.litElementVersions=[]).push("3.2.2");
|
||||
|
||||
/**
|
||||
* @typedef {import("./element/NodeElement").default} NodeElement
|
||||
* @typedef {import("./element/PinElement").default} PinElement
|
||||
* @typedef {import("lit").CSSResult} CSSResult
|
||||
* @typedef {import("./entity/ObjectEntity.js").default} ObjectEntity
|
||||
* @typedef {import("./entity/ObjectReferenceEntity.js").default} ObjectReferenceEntity
|
||||
*/
|
||||
|
||||
class Configuration {
|
||||
@@ -198,6 +197,12 @@ class Configuration {
|
||||
static selectAllKeyboardKey = "(bCtrl=True,Key=A)"
|
||||
static smoothScrollTime = 1000 // ms
|
||||
static stringEscapedCharacters = /['"\\]/g
|
||||
/** @param {ObjectEntity} objectEntity */
|
||||
static subObjectAttributeNameFromEntity = objectEntity =>
|
||||
"#SubObject" + (objectEntity.Class.type ? "_" + objectEntity.Class.type : "") + "_" + objectEntity.Name
|
||||
/** @param {ObjectReferenceEntity} objectReferenceEntity */
|
||||
static subObjectAttributeNameFromReference = objectReferenceEntity =>
|
||||
"#SubObject_" + objectReferenceEntity.type + "_" + objectReferenceEntity.path
|
||||
static trackingMouseEventName = {
|
||||
begin: "ueb-tracking-mouse-begin",
|
||||
end: "ueb-tracking-mouse-end",
|
||||
@@ -306,7 +311,7 @@ class Configuration {
|
||||
}
|
||||
}
|
||||
|
||||
/** @typedef {import("../Blueprint").default} Blueprint */
|
||||
/** @typedef {import("../Blueprint.js").default} Blueprint */
|
||||
|
||||
/** @template {HTMLElement} T */
|
||||
class IInput {
|
||||
@@ -374,7 +379,7 @@ class IInput {
|
||||
}
|
||||
}
|
||||
|
||||
/** @typedef {import("./IEntity").default} IEntity */
|
||||
/** @typedef {import("./IEntity.js").default} IEntity */
|
||||
|
||||
class ComputedType {
|
||||
|
||||
@@ -392,17 +397,17 @@ class ComputedType {
|
||||
}
|
||||
|
||||
/**
|
||||
* @typedef {import("../entity/IEntity").default} IEntity
|
||||
* @typedef {import("../entity/IEntity").AnyValue} AnyValue
|
||||
* @typedef {import("../entity/IEntity.js").default} IEntity
|
||||
* @typedef {import("../entity/IEntity.js").AnyValue} AnyValue
|
||||
*/
|
||||
|
||||
/**
|
||||
* @template {AnyValue} T
|
||||
* @typedef {import("../entity/IEntity").AnyValueConstructor<T>} AnyValueConstructor
|
||||
* @typedef {import("../entity/IEntity.js").AnyValueConstructor<T>} AnyValueConstructor
|
||||
*/
|
||||
/**
|
||||
* @template {AnyValue} T
|
||||
* @typedef {import("./Serializer").default<T>} Serializer
|
||||
* @typedef {import("./Serializer.js").default<T>} Serializer
|
||||
*/
|
||||
|
||||
class SerializerFactory {
|
||||
@@ -430,7 +435,7 @@ class SerializerFactory {
|
||||
}
|
||||
}
|
||||
|
||||
/** @typedef {import("./IEntity").AnyValueConstructor<*>} AnyValueConstructor */
|
||||
/** @typedef {import("./IEntity.js").AnyValueConstructor<*>} AnyValueConstructor */
|
||||
|
||||
class UnionType {
|
||||
|
||||
@@ -450,13 +455,12 @@ class UnionType {
|
||||
}
|
||||
|
||||
/**
|
||||
* @typedef {import("./element/IElement").default} IElement
|
||||
* @typedef {import("./entity/IEntity").AnyValue} AnyValue
|
||||
* @typedef {import("./entity/IEntity").AnyValueConstructor<*>} AnyValueConstructor
|
||||
* @typedef {import("./entity/IEntity").AttributeInformation} TypeInformation
|
||||
* @typedef {import("./entity/IEntity").default} IEntity
|
||||
* @typedef {import("./entity/IEntity").EntityConstructor} EntityConstructor
|
||||
* @typedef {import("./entity/LinearColorEntity").default} LinearColorEntity
|
||||
* @typedef {import("./entity/IEntity.js").AnyValue} AnyValue
|
||||
* @typedef {import("./entity/IEntity.js").AnyValueConstructor<*>} AnyValueConstructor
|
||||
* @typedef {import("./entity/IEntity.js").AttributeInformation} TypeInformation
|
||||
* @typedef {import("./entity/IEntity.js").default} IEntity
|
||||
* @typedef {import("./entity/IEntity.js").EntityConstructor} EntityConstructor
|
||||
* @typedef {import("./entity/LinearColorEntity.js").default} LinearColorEntity
|
||||
*/
|
||||
|
||||
class Utility {
|
||||
@@ -2015,7 +2019,7 @@ class SimpleSerializationVectorEntity extends VectorEntity {
|
||||
}
|
||||
|
||||
/**
|
||||
* @typedef {import("./IEntity").AnyValue} AnyValue
|
||||
* @typedef {import("./IEntity.js").AnyValue} AnyValue
|
||||
* @typedef {import("lit").CSSResult} CSSResult
|
||||
*/
|
||||
|
||||
@@ -2609,6 +2613,10 @@ class SVGIcon {
|
||||
class UnknownPinEntity extends PinEntity {
|
||||
|
||||
static lookbehind = ""
|
||||
|
||||
constructor(values = {}) {
|
||||
super(values, true);
|
||||
}
|
||||
}
|
||||
|
||||
class VariableReferenceEntity extends IEntity {
|
||||
@@ -2826,7 +2834,12 @@ class ObjectEntity extends IEntity {
|
||||
showDefault: false,
|
||||
},
|
||||
CustomProperties: {
|
||||
type: [new UnionType(PinEntity, UnknownPinEntity)]
|
||||
type: [new UnionType(PinEntity, UnknownPinEntity)],
|
||||
},
|
||||
// Legacy
|
||||
Pins: {
|
||||
type: [ObjectReferenceEntity],
|
||||
inlined: true,
|
||||
},
|
||||
}
|
||||
|
||||
@@ -2928,6 +2941,8 @@ class ObjectEntity extends IEntity {
|
||||
/** @type {IntegerEntity?} */ this.ErrorType;
|
||||
/** @type {String?} */ this.ErrorMsg;
|
||||
/** @type {(PinEntity | UnknownPinEntity)[]} */ this.CustomProperties;
|
||||
// Legacy
|
||||
/** @type {ObjectReferenceEntity[]} */ this.Pins;
|
||||
}
|
||||
|
||||
getClass() {
|
||||
@@ -3945,7 +3960,7 @@ class Grammar {
|
||||
static subObjectEntity = P.lazy(() =>
|
||||
this.objectEntity
|
||||
.map(object =>
|
||||
values => values["SubObject_" + object.Name] = object
|
||||
values => values[Configuration.subObjectAttributeNameFromEntity(object)] = object
|
||||
)
|
||||
)
|
||||
|
||||
@@ -4296,7 +4311,7 @@ class ObjectSerializer extends Serializer {
|
||||
)
|
||||
}
|
||||
let result = indentation + "Begin Object"
|
||||
+ (entity.Class.path ? ` Class=${entity.Class.path}` : "")
|
||||
+ (entity.Class.type || entity.Class.path ? ` Class=${this.doWriteValue(entity.Class, insideString)}` : "")
|
||||
+ (entity.Name ? ` Name=${this.doWriteValue(entity.Name, insideString)}` : "")
|
||||
+ "\n"
|
||||
+ super.doWrite(
|
||||
@@ -4358,8 +4373,8 @@ class Copy extends IInput {
|
||||
}
|
||||
|
||||
/**
|
||||
* @typedef {import("../element/IElement").default} IElement
|
||||
* @typedef {import("../input/IInput").default} IInput
|
||||
* @typedef {import("../element/IElement.js").default} IElement
|
||||
* @typedef {import("../input/IInput.js").default} IInput
|
||||
* @typedef {import("lit").PropertyValues} PropertyValues
|
||||
*/
|
||||
|
||||
@@ -4429,7 +4444,7 @@ class ITemplate {
|
||||
}
|
||||
}
|
||||
|
||||
/** @typedef {import("../../Blueprint").default} Blueprint */
|
||||
/** @typedef {import("../../Blueprint.js").default} Blueprint */
|
||||
|
||||
/**
|
||||
* @template {HTMLElement} T
|
||||
@@ -4540,11 +4555,13 @@ class IKeyboardShortcut extends IInput {
|
||||
}
|
||||
}
|
||||
|
||||
/** @typedef {import("../../Blueprint.js").default} Blueprint */
|
||||
|
||||
class KeyboardCanc extends IKeyboardShortcut {
|
||||
|
||||
/**
|
||||
* @param {HTMLElement} target
|
||||
* @param {import("../../Blueprint").default} blueprint
|
||||
* @param {Blueprint} blueprint
|
||||
* @param {Object} options
|
||||
*/
|
||||
constructor(target, blueprint, options = {}) {
|
||||
@@ -4585,6 +4602,8 @@ class IPointing extends IInput {
|
||||
}
|
||||
}
|
||||
|
||||
/** @typedef {import("../../Blueprint.js").default} Blueprint */
|
||||
|
||||
class IMouseWheel extends IPointing {
|
||||
|
||||
/** @param {WheelEvent} e */
|
||||
@@ -4599,7 +4618,7 @@ class IMouseWheel extends IPointing {
|
||||
|
||||
/**
|
||||
* @param {HTMLElement} target
|
||||
* @param {import("../../Blueprint").default} blueprint
|
||||
* @param {Blueprint} blueprint
|
||||
* @param {Object} options
|
||||
*/
|
||||
constructor(target, blueprint, options = {}) {
|
||||
@@ -4648,6 +4667,8 @@ class Zoom extends IMouseWheel {
|
||||
}
|
||||
}
|
||||
|
||||
/** @typedef {import("../../Blueprint.js").default} Blueprint */
|
||||
|
||||
class KeyboardEnableZoom extends IKeyboardShortcut {
|
||||
|
||||
/** @type {Zoom} */
|
||||
@@ -4655,7 +4676,7 @@ class KeyboardEnableZoom extends IKeyboardShortcut {
|
||||
|
||||
/**
|
||||
* @param {HTMLElement} target
|
||||
* @param {import("../../Blueprint").default} blueprint
|
||||
* @param {Blueprint} blueprint
|
||||
* @param {Object} options
|
||||
*/
|
||||
constructor(target, blueprint, options = {}) {
|
||||
@@ -4673,7 +4694,8 @@ class KeyboardEnableZoom extends IKeyboardShortcut {
|
||||
}
|
||||
}
|
||||
|
||||
/** @typedef {import("../../Blueprint").default} Blueprint */
|
||||
/** @typedef {import("../../Blueprint.js").default} Blueprint */
|
||||
|
||||
class KeyboardSelectAll extends IKeyboardShortcut {
|
||||
|
||||
/**
|
||||
@@ -4692,11 +4714,10 @@ class KeyboardSelectAll extends IKeyboardShortcut {
|
||||
}
|
||||
|
||||
/**
|
||||
* @typedef {import("../Blueprint").default} Blueprint
|
||||
* @typedef {import("../entity/IEntity").default} IEntity
|
||||
* @typedef {import("../input/IInput").default} IInput
|
||||
* @typedef {import("../template/ITemplate").default} ITemplate
|
||||
* @typedef {import("lit").PropertyDeclarations} PropertyDeclarations
|
||||
* @typedef {import("../Blueprint.js").default} Blueprint
|
||||
* @typedef {import("../entity/IEntity.js").default} IEntity
|
||||
* @typedef {import("../input/IInput.js").default} IInput
|
||||
* @typedef {import("../template/ITemplate.js").default} ITemplate
|
||||
* @typedef {import("lit").PropertyValues} PropertyValues
|
||||
*/
|
||||
|
||||
@@ -4850,8 +4871,8 @@ class IElement extends s {
|
||||
}
|
||||
|
||||
/**
|
||||
* @typedef {import("../entity/IEntity").default} IEntity
|
||||
* @typedef {import("../template/IDraggableTemplate").default} IDraggableTemplate
|
||||
* @typedef {import("../entity/IEntity.js").default} IEntity
|
||||
* @typedef {import("../template/IDraggableTemplate.js").default} IDraggableTemplate
|
||||
* @typedef {CustomEvent<{
|
||||
* value: [Number, Number]
|
||||
* }>} DragEvent
|
||||
@@ -4979,8 +5000,8 @@ class IDraggableElement extends IElement {
|
||||
}
|
||||
|
||||
/**
|
||||
* @typedef {import("../../Blueprint").default} Blueprint
|
||||
* @typedef {import("../../element/IElement").default} IElement
|
||||
* @typedef {import("../../Blueprint.js").default} Blueprint
|
||||
* @typedef {import("../../element/IElement.js").default} IElement
|
||||
*/
|
||||
|
||||
/**
|
||||
@@ -5252,7 +5273,7 @@ class MouseTracking extends IPointing {
|
||||
}
|
||||
|
||||
/**
|
||||
* @typedef {import("./IElement").default} IElement
|
||||
* @typedef {import("./IElement.js").default} IElement
|
||||
* @typedef {new (...args) => IElement} ElementConstructor
|
||||
*/
|
||||
|
||||
@@ -5275,7 +5296,7 @@ class ElementFactory {
|
||||
}
|
||||
}
|
||||
|
||||
/** @typedef {import("../../element/NodeElement").NodeElementConstructor} NodeElementConstructor */
|
||||
/** @typedef {import("../../element/NodeElement.js").NodeElementConstructor} NodeElementConstructor */
|
||||
|
||||
class Paste extends IInput {
|
||||
|
||||
@@ -5390,10 +5411,10 @@ class Unfocus extends IInput {
|
||||
}
|
||||
|
||||
/**
|
||||
* @typedef {import("../Blueprint").default} Blueprint
|
||||
* @typedef {import("../element/PinElement").default} PinElement
|
||||
* @typedef {import("../element/SelectorElement").default} SelectorElement
|
||||
* @typedef {import("../entity/PinReferenceEntity").default} PinReferenceEntity
|
||||
* @typedef {import("../Blueprint.js").default} Blueprint
|
||||
* @typedef {import("../element/PinElement.js").default} PinElement
|
||||
* @typedef {import("../element/SelectorElement.js").default} SelectorElement
|
||||
* @typedef {import("../entity/PinReferenceEntity.js").default} PinReferenceEntity
|
||||
* @typedef {import("lit").PropertyValues} PropertyValues
|
||||
*/
|
||||
|
||||
@@ -5618,8 +5639,8 @@ class BlueprintTemplate extends ITemplate {
|
||||
}
|
||||
|
||||
/**
|
||||
* @typedef {import("../entity/IEntity").default} IEntity
|
||||
* @typedef {import("../template/ITemplate").default} ITemplate
|
||||
* @typedef {import("../entity/IEntity.js").default} IEntity
|
||||
* @typedef {import("../template/ITemplate.js").default} ITemplate
|
||||
*/
|
||||
|
||||
/**
|
||||
@@ -5685,7 +5706,7 @@ class IFromToPositionedElement extends IElement {
|
||||
}
|
||||
|
||||
/**
|
||||
* @typedef {import("../element/IFromToPositionedElement").default} IFromToPositionedElement
|
||||
* @typedef {import("../element/IFromToPositionedElement.js").default} IFromToPositionedElement
|
||||
* @typedef {import("lit").PropertyValues} PropertyValues
|
||||
*/
|
||||
|
||||
@@ -5752,8 +5773,6 @@ class KnotEntity extends ObjectEntity {
|
||||
}
|
||||
}
|
||||
|
||||
/** @typedef {import("../../Blueprint").default} Blueprint */
|
||||
|
||||
/**
|
||||
* @template {HTMLElement} T
|
||||
* @extends {IPointing<T>}
|
||||
@@ -5809,10 +5828,10 @@ class MouseDbClick extends IPointing {
|
||||
}
|
||||
|
||||
/**
|
||||
* @typedef {import("../element/LinkElement").default} LinkElement
|
||||
* @typedef {import("../element/LinkElement").LinkElementConstructor} LinkElementConstructor
|
||||
* @typedef {import("../element/NodeElement").NodeElementConstructor} NodeElementConstructor
|
||||
* @typedef {import("./node/KnotNodeTemplate").default} KnotNodeTemplate
|
||||
* @typedef {import("../element/LinkElement.js").default} LinkElement
|
||||
* @typedef {import("../element/LinkElement.js").LinkElementConstructor} LinkElementConstructor
|
||||
* @typedef {import("../element/NodeElement.js").NodeElementConstructor} NodeElementConstructor
|
||||
* @typedef {import("./node/KnotNodeTemplate.js").default} KnotNodeTemplate
|
||||
* @typedef {import("lit").PropertyValues} PropertyValues
|
||||
*/
|
||||
|
||||
@@ -5995,8 +6014,8 @@ class LinkTemplate extends IFromToPositionedTemplate {
|
||||
}
|
||||
|
||||
/**
|
||||
* @typedef {import("../element/IDraggableElement").DragEvent} DragEvent
|
||||
* @typedef {import("./PinElement").default} PinElement
|
||||
* @typedef {import("../element/IDraggableElement.js").DragEvent} DragEvent
|
||||
* @typedef {import("./PinElement.js").default} PinElement
|
||||
* @typedef {import("lit").TemplateResult<1>} TemplateResult
|
||||
* @typedef {typeof LinkElement} LinkElementConstructor
|
||||
*/
|
||||
@@ -6300,8 +6319,7 @@ class LinkElement extends IFromToPositionedElement {
|
||||
}
|
||||
|
||||
/**
|
||||
* @typedef {import("../../Blueprint").default} Blueprint
|
||||
* @typedef {import("../../element/IDraggableElement").default} IDraggableElement
|
||||
* @typedef {import("../../element/IDraggableElement.js").default} IDraggableElement
|
||||
*/
|
||||
|
||||
/**
|
||||
@@ -6360,7 +6378,7 @@ class MouseMoveDraggable extends IMouseClickDrag {
|
||||
}
|
||||
}
|
||||
|
||||
/** @typedef {import("../../Blueprint").default} Blueprint */
|
||||
/** @typedef {import("../../Blueprint.js").default} Blueprint */
|
||||
|
||||
class MouseClickDrag extends MouseMoveDraggable {
|
||||
|
||||
@@ -6411,7 +6429,7 @@ class MouseClickDrag extends MouseMoveDraggable {
|
||||
}
|
||||
}
|
||||
|
||||
/** @typedef {import("../../Blueprint").default} Blueprint */
|
||||
/** @typedef {import("../../Blueprint.js").default} Blueprint */
|
||||
|
||||
/**
|
||||
* @template {HTMLElement} T
|
||||
@@ -6451,10 +6469,7 @@ class KeyboardShortcutAction extends IKeyboardShortcut {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @typedef {import("../entity/IEntity").default} IEntity
|
||||
* @typedef {import("../element/IDraggableElement").default} IDraggableElement
|
||||
*/
|
||||
/** @typedef {import("../element/IDraggableElement.js").default} IDraggableElement */
|
||||
|
||||
/**
|
||||
* @template {IDraggableElement} T
|
||||
@@ -6535,7 +6550,7 @@ class IDraggableTemplate extends ITemplate {
|
||||
}
|
||||
|
||||
/**
|
||||
* @typedef {import("../element/IDraggableElement").default} IDraggableElement
|
||||
* @typedef {import("../element/IDraggableElement.js").default} IDraggableElement
|
||||
* @typedef {import("lit").PropertyValues} PropertyValues
|
||||
*/
|
||||
|
||||
@@ -6558,9 +6573,8 @@ class IDraggablePositionedTemplate extends IDraggableTemplate {
|
||||
}
|
||||
|
||||
/**
|
||||
* @typedef {import("../../Blueprint").default} Blueprint
|
||||
* @typedef {import("../../element/NodeElement").default} NodeElement
|
||||
* @typedef {import("../../template/node/CommentNodeTemplate").default} CommentNodeTemplate
|
||||
* @typedef {import("../../element/NodeElement.js").default} NodeElement
|
||||
* @typedef {import("../../template/node/CommentNodeTemplate.js").default} CommentNodeTemplate
|
||||
*/
|
||||
|
||||
/** @extends {MouseMoveDraggable<NodeElement>} */
|
||||
@@ -6595,9 +6609,9 @@ class MouseMoveNodes extends MouseMoveDraggable {
|
||||
}
|
||||
|
||||
/**
|
||||
* @typedef {import("../element/NodeElement").default} NodeElement
|
||||
* @typedef {import("../element/NodeElement.js").default} NodeElement
|
||||
* @typedef {import("../input/mouse/MouseMoveDraggable.js").default} MouseMoveDraggable
|
||||
* @typedef {import("lit").PropertyValues} PropertyValues
|
||||
* @typedef {import("../input/mouse/MouseMoveDraggable").default} MouseMoveDraggable
|
||||
*/
|
||||
|
||||
/**
|
||||
@@ -6627,9 +6641,9 @@ class ISelectableDraggableTemplate extends IDraggablePositionedTemplate {
|
||||
}
|
||||
|
||||
/**
|
||||
* @typedef {import("../../element/NodeElement").default} NodeElement
|
||||
* @typedef {import("../../element/PinElement").default} PinElement
|
||||
* @typedef {import("../../element/PinElement").PinElementConstructor} PinElementConstructor
|
||||
* @typedef {import("../../element/NodeElement.js").default} NodeElement
|
||||
* @typedef {import("../../element/PinElement.js").default} PinElement
|
||||
* @typedef {import("../../element/PinElement.js").PinElementConstructor} PinElementConstructor
|
||||
* @typedef {import("lit").PropertyValues} PropertyValues
|
||||
*/
|
||||
|
||||
@@ -6770,7 +6784,7 @@ class NodeTemplate extends ISelectableDraggableTemplate {
|
||||
}
|
||||
|
||||
/**
|
||||
* @typedef {import("../element/NodeElement").default} NodeElement
|
||||
* @typedef {import("../element/NodeElement.js").default} NodeElement
|
||||
* @typedef {import("lit").PropertyValues} PropertyValues
|
||||
*/
|
||||
|
||||
@@ -6924,8 +6938,7 @@ class IResizeableTemplate extends NodeTemplate {
|
||||
}
|
||||
|
||||
/**
|
||||
* @typedef {import("../../element/NodeElement").default} NodeElement
|
||||
* @typedef {import("../../element/PinElement").default} PinElement
|
||||
* @typedef {import("../../element/NodeElement.js").default} NodeElement
|
||||
* @typedef {import("lit").PropertyValues} PropertyValues
|
||||
*/
|
||||
|
||||
@@ -7037,12 +7050,11 @@ class CommentNodeTemplate extends IResizeableTemplate {
|
||||
}
|
||||
|
||||
/**
|
||||
* @typedef {import("../../Blueprint").default} Blueprint
|
||||
* @typedef {import("../../element/LinkElement").default} LinkElement
|
||||
* @typedef {import("../../element/LinkElement").LinkElementConstructor} LinkElementConstructor
|
||||
* @typedef {import("../../element/PinElement").default} PinElement
|
||||
* @typedef {import("../../template/node/KnotNodeTemplate").default} KnotNodeTemplate
|
||||
* @typedef {import("../../template/pin/KnotPinTemplate").default} KnotPinTemplate
|
||||
* @typedef {import("../../Blueprint.js").default} Blueprint
|
||||
* @typedef {import("../../element/LinkElement.js").default} LinkElement
|
||||
* @typedef {import("../../element/LinkElement.js").LinkElementConstructor} LinkElementConstructor
|
||||
* @typedef {import("../../element/PinElement.js").default} PinElement
|
||||
* @typedef {import("../../template/pin/KnotPinTemplate.js").default} KnotPinTemplate
|
||||
*/
|
||||
|
||||
/** @extends IMouseClickDrag<PinElement> */
|
||||
@@ -7172,8 +7184,8 @@ class MouseCreateLink extends IMouseClickDrag {
|
||||
}
|
||||
|
||||
/**
|
||||
* @typedef {import("../../element/NodeElement").default} NodeElement
|
||||
* @typedef {import("../../element/PinElement").PinElementConstructor} PinElementConstructor
|
||||
* @typedef {import("../../element/NodeElement.js").default} NodeElement
|
||||
* @typedef {import("../../element/PinElement.js").PinElementConstructor} PinElementConstructor
|
||||
*/
|
||||
|
||||
class VariableManagementNodeTemplate extends NodeTemplate {
|
||||
@@ -7229,27 +7241,23 @@ class VariableManagementNodeTemplate extends NodeTemplate {
|
||||
}
|
||||
}
|
||||
|
||||
/** @typedef {import("../../element/NodeElement").default} NodeElement */
|
||||
|
||||
class VariableConversionNodeTemplate extends VariableManagementNodeTemplate {
|
||||
|
||||
static nodeStyleClasses = [...super.nodeStyleClasses, "ueb-node-style-conversion"]
|
||||
}
|
||||
|
||||
/** @typedef {import("../../element/NodeElement").default} NodeElement */
|
||||
|
||||
class VariableOperationNodeTemplate extends VariableManagementNodeTemplate {
|
||||
|
||||
static nodeStyleClasses = [...super.nodeStyleClasses, "ueb-node-style-operation"]
|
||||
}
|
||||
|
||||
/**
|
||||
* @typedef {import("../../input/IInput").default} IInput
|
||||
* @typedef {import("../../input/IInput.js").default} IInput
|
||||
* @typedef {import("lit").PropertyValues} PropertyValues
|
||||
*/
|
||||
/**
|
||||
* @template T
|
||||
* @typedef {import("../../element/PinElement").default<T>} PinElement
|
||||
* @typedef {import("../../element/PinElement.js").default<T>} PinElement
|
||||
*/
|
||||
|
||||
/**
|
||||
@@ -7365,13 +7373,14 @@ class PinTemplate extends ITemplate {
|
||||
}
|
||||
}
|
||||
|
||||
/** @typedef {import("../../entity/IEntity.js").AnyValue} AnyValue */
|
||||
/**
|
||||
* @template T
|
||||
* @typedef {import("../../element/PinElement").default<T>} PinElement
|
||||
* @template {AnyValue} T
|
||||
* @typedef {import("../../element/PinElement.js").default<T>} PinElement
|
||||
*/
|
||||
|
||||
/**
|
||||
* @template T
|
||||
* @template {AnyValue} T
|
||||
* @extends PinTemplate<PinElement<T>>
|
||||
*/
|
||||
class MinimalPinTemplate extends PinTemplate {
|
||||
@@ -7386,7 +7395,7 @@ class MinimalPinTemplate extends PinTemplate {
|
||||
}
|
||||
|
||||
/**
|
||||
* @typedef {import("../../element/PinElement").PinElementConstructor} PinElementConstructor
|
||||
* @typedef {import("../../element/PinElement.js").PinElementConstructor} PinElementConstructor
|
||||
* @typedef {import("lit").PropertyValues} PropertyValues
|
||||
*/
|
||||
|
||||
@@ -7444,9 +7453,9 @@ class EventNodeTemplate extends NodeTemplate {
|
||||
}
|
||||
|
||||
/**
|
||||
* @typedef {import("../element/IDraggableElement").DragEvent} DragEvent
|
||||
* @typedef {import("../entity/IEntity").default} IEntity
|
||||
* @typedef {import("../template/ISelectableDraggableTemplate").default} ISelectableDraggableTemplate
|
||||
* @typedef {import("../element/IDraggableElement.js").DragEvent} DragEvent
|
||||
* @typedef {import("../entity/IEntity.js").default} IEntity
|
||||
* @typedef {import("../template/ISelectableDraggableTemplate.js").default} ISelectableDraggableTemplate
|
||||
*/
|
||||
|
||||
/**
|
||||
@@ -7500,8 +7509,8 @@ class ISelectableDraggableElement extends IDraggableElement {
|
||||
}
|
||||
|
||||
/**
|
||||
* @typedef {import("../node/KnotNodeTemplate").default} KnotNodeTemplate
|
||||
* @typedef {import("../../entity/PinEntity").default} KnotEntity
|
||||
* @typedef {import("../../entity/PinEntity.js").default} KnotEntity
|
||||
* @typedef {import("../node/KnotNodeTemplate.js").default} KnotNodeTemplate
|
||||
*/
|
||||
|
||||
/** @extends MinimalPinTemplate<KnotEntity> */
|
||||
@@ -7530,9 +7539,9 @@ class KnotPinTemplate extends MinimalPinTemplate {
|
||||
}
|
||||
|
||||
/**
|
||||
* @typedef {import("../../element/NodeElement").default} NodeElement
|
||||
* @typedef {import("../../element/PinElement").default} PinElement
|
||||
* @typedef {import("../../element/PinElement").PinElementConstructor} PinElementConstructor
|
||||
* @typedef {import("../../element/NodeElement.js").default} NodeElement
|
||||
* @typedef {import("../../element/PinElement.js").default} PinElement
|
||||
* @typedef {import("../../element/PinElement.js").PinElementConstructor} PinElementConstructor
|
||||
*/
|
||||
|
||||
class KnotNodeTemplate extends NodeTemplate {
|
||||
@@ -7615,7 +7624,7 @@ class KnotNodeTemplate extends NodeTemplate {
|
||||
}
|
||||
}
|
||||
|
||||
/** @typedef {import("../../element/NodeElement").default} NodeElement */
|
||||
/** @typedef {import("../../element/NodeElement.js").default} NodeElement */
|
||||
|
||||
class VariableAccessNodeTemplate extends VariableManagementNodeTemplate {
|
||||
|
||||
@@ -7637,9 +7646,10 @@ class VariableAccessNodeTemplate extends VariableManagementNodeTemplate {
|
||||
}
|
||||
|
||||
/**
|
||||
* @typedef {import("./IDraggableElement").DragEvent} DragEvent
|
||||
* @typedef {import("./IElement").default} IElement
|
||||
* @typedef {import("./PinElement").default} PinElement
|
||||
* @typedef {import("./IDraggableElement.js").DragEvent} DragEvent
|
||||
* @typedef {import("./IElement.js").default} IElement
|
||||
* @typedef {import("../entity/ObjectReferenceEntity.js").default} ObjectReferenceEntity
|
||||
* @typedef {import("./PinElement.js").default} PinElement
|
||||
* @typedef {typeof NodeElement} NodeElementConstructor
|
||||
*/
|
||||
|
||||
@@ -7900,7 +7910,15 @@ class NodeElement extends ISelectableDraggableElement {
|
||||
|
||||
/** @returns {PinEntity[]} */
|
||||
getPinEntities() {
|
||||
return this.entity.CustomProperties.filter(v => v instanceof PinEntity)
|
||||
if (this.entity.CustomProperties.length > 0) {
|
||||
return this.entity.CustomProperties.filter(v => v instanceof PinEntity)
|
||||
}
|
||||
// Legacy nodes attempt to find pin entities
|
||||
if (this.entity.Pins) {
|
||||
return this.entity.Pins.map(objectReference =>
|
||||
new UnknownPinEntity(this.entity[Configuration.subObjectAttributeNameFromReference(objectReference)])
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
setLocation(x = 0, y = 0, acknowledge = true) {
|
||||
@@ -7927,11 +7945,9 @@ class NodeElement extends ISelectableDraggableElement {
|
||||
}
|
||||
|
||||
/**
|
||||
* @typedef {import("./element/PinElement").default} PinElement
|
||||
* @typedef {import("./entity/GuidEntity").default} GuidEntity
|
||||
* @typedef {import("./entity/PinReferenceEntity").default} PinReferenceEntity
|
||||
* @typedef {import("./template/node/CommentNodeTemplate").default} CommentNodeTemplate
|
||||
* @typedef {import("lit").PropertyValues} PropertyValues
|
||||
* @typedef {import("./element/PinElement.js").default} PinElement
|
||||
* @typedef {import("./entity/PinReferenceEntity.js").default} PinReferenceEntity
|
||||
* @typedef {import("./template/node/CommentNodeTemplate.js").default} CommentNodeTemplate
|
||||
* @typedef {typeof Blueprint} BlueprintConstructor
|
||||
*/
|
||||
|
||||
@@ -8385,7 +8401,7 @@ class Blueprint extends IElement {
|
||||
customElements.define("ueb-blueprint", Blueprint);
|
||||
|
||||
/**
|
||||
* @typedef {import("../element/IDraggableElement").default} IDraggableElement
|
||||
* @typedef {import("../element/IDraggableElement.js").default} IDraggableElement
|
||||
* @typedef {import("lit").PropertyValues} PropertyValues
|
||||
*/
|
||||
|
||||
@@ -8441,7 +8457,7 @@ class IDraggableControlTemplate extends IDraggableTemplate {
|
||||
}
|
||||
}
|
||||
|
||||
/** @typedef {import("../element/ColorHandlerElement").default} ColorHandlerElement */
|
||||
/** @typedef {import("../element/ColorHandlerElement.js").default} ColorHandlerElement */
|
||||
|
||||
/** @extends {IDraggableControlTemplate<ColorHandlerElement>} */
|
||||
class ColorHandlerTemplate extends IDraggableControlTemplate {
|
||||
@@ -8465,9 +8481,9 @@ class ColorHandlerTemplate extends IDraggableControlTemplate {
|
||||
}
|
||||
|
||||
/**
|
||||
* @typedef {import("../element/WindowElement").default} WindowElement
|
||||
* @typedef {import("../entity/IEntity").default} IEntity
|
||||
* @typedef {import("../template/IDraggableControlTemplate").default} IDraggableControlTemplate
|
||||
* @typedef {import("../element/WindowElement.js").default} WindowElement
|
||||
* @typedef {import("../entity/IEntity.js").default} IEntity
|
||||
* @typedef {import("../template/IDraggableControlTemplate.js").default} IDraggableControlTemplate
|
||||
*/
|
||||
|
||||
/**
|
||||
@@ -8511,7 +8527,7 @@ class ColorHandlerElement extends IDraggableControlElement {
|
||||
}
|
||||
}
|
||||
|
||||
/** @typedef {import("../element/ColorHandlerElement").default} ColorHandlerElement */
|
||||
/** @typedef {import("../element/ColorHandlerElement.js").default} ColorHandlerElement */
|
||||
|
||||
/** @extends {IDraggableControlTemplate<ColorHandlerElement>} */
|
||||
class ColorSliderTemplate extends IDraggableControlTemplate {
|
||||
@@ -8645,7 +8661,7 @@ class InputElement extends IElement {
|
||||
}
|
||||
|
||||
/**
|
||||
* @typedef {import("../../element/IDraggableElement").default} IDraggableElement
|
||||
* @typedef {import("../../element/IDraggableElement.js").default} IDraggableElement
|
||||
*/
|
||||
|
||||
/**
|
||||
@@ -8700,8 +8716,6 @@ class BoolPinTemplate extends PinTemplate {
|
||||
}
|
||||
}
|
||||
|
||||
/** @typedef {import("../../element/PinElement").default} PinElement */
|
||||
|
||||
class ExecPinTemplate extends PinTemplate {
|
||||
|
||||
renderIcon() {
|
||||
@@ -8882,7 +8896,7 @@ class INumericPinTemplate extends IInputPinTemplate {
|
||||
}
|
||||
}
|
||||
|
||||
/** @typedef {import("../../entity/IntegerEntity").default} IntegerEntity */
|
||||
/** @typedef {import("../../entity/IntegerEntity.js").default} IntegerEntity */
|
||||
|
||||
/** @extends INumericPinTemplate<IntegerEntity> */
|
||||
class IntPinTemplate extends INumericPinTemplate {
|
||||
@@ -8904,8 +8918,6 @@ class IntPinTemplate extends INumericPinTemplate {
|
||||
}
|
||||
}
|
||||
|
||||
/** @typedef {import("../../entity/IntegerEntity").default} IntegerEntity */
|
||||
|
||||
class Int64PinTemplate extends IntPinTemplate {
|
||||
|
||||
/** @param {String[]} values */
|
||||
@@ -8937,7 +8949,7 @@ const t={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},e
|
||||
* SPDX-License-Identifier: BSD-3-Clause
|
||||
*/const i=e(class extends i$1{constructor(t$1){var e;if(super(t$1),t$1.type!==t.ATTRIBUTE||"style"!==t$1.name||(null===(e=t$1.strings)||void 0===e?void 0:e.length)>2)throw Error("The `styleMap` directive must be used in the `style` attribute and must be the only part in the attribute.")}render(t){return Object.keys(t).reduce(((e,r)=>{const s=t[r];return null==s?e:e+`${r=r.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g,"-$&").toLowerCase()}:${s};`}),"")}update(e,[r]){const{style:s}=e.element;if(void 0===this.vt){this.vt=new Set;for(const t in r)this.vt.add(t);return this.render(r)}this.vt.forEach((t=>{null==r[t]&&(this.vt.delete(t),t.includes("-")?s.removeProperty(t):s[t]="");}));for(const t in r){const e=r[t];null!=e&&(this.vt.add(t),t.includes("-")?s.setProperty(t,e):s[t]=e);}return x}});
|
||||
|
||||
/** @typedef {import("../../element/WindowElement").default} WindowElement */
|
||||
/** @typedef {import("../../element/WindowElement.js").default} WindowElement */
|
||||
|
||||
/** @extends {IDraggablePositionedTemplate<WindowElement>} */
|
||||
class WindowTemplate extends IDraggablePositionedTemplate {
|
||||
@@ -9012,7 +9024,7 @@ class WindowTemplate extends IDraggablePositionedTemplate {
|
||||
}
|
||||
|
||||
/**
|
||||
* @typedef {import("../../element/WindowElement").default} WindowElement
|
||||
* @typedef {import("../../element/WindowElement.js").default} WindowElement
|
||||
* @typedef {import("lit").PropertyValues} PropertyValues
|
||||
*/
|
||||
|
||||
@@ -9367,9 +9379,9 @@ class ColorPickerWindowTemplate extends WindowTemplate {
|
||||
}
|
||||
|
||||
/**
|
||||
* @typedef {import("../../element/WindowElement").default} WindowElement
|
||||
* @typedef {import("../../element/WindowElement").WindowElementConstructor} WindowElementConstructor
|
||||
* @typedef {import("../../entity/LinearColorEntity").default} LinearColorEntity
|
||||
* @typedef {import("../../element/WindowElement.js").default} WindowElement
|
||||
* @typedef {import("../../element/WindowElement.js").WindowElementConstructor} WindowElementConstructor
|
||||
* @typedef {import("../../entity/LinearColorEntity.js").default} LinearColorEntity
|
||||
*/
|
||||
|
||||
/** @extends PinTemplate<LinearColorEntity> */
|
||||
@@ -9418,8 +9430,6 @@ class LinearColorPinTemplate extends PinTemplate {
|
||||
}
|
||||
}
|
||||
|
||||
/** @typedef {import("../../element/PinElement").default} PinElement */
|
||||
|
||||
class NamePinTemplate extends IInputPinTemplate {
|
||||
|
||||
static singleLineInput = true
|
||||
@@ -9453,7 +9463,7 @@ class ReferencePinTemplate extends PinTemplate {
|
||||
}
|
||||
}
|
||||
|
||||
/** @typedef {import("../../entity/RotatorEntity").default} Rotator */
|
||||
/** @typedef {import("../../entity/RotatorEntity.js").default} Rotator */
|
||||
|
||||
/** @extends INumericPinTemplate<Rotator> */
|
||||
class RotatorPinTemplate extends INumericPinTemplate {
|
||||
@@ -9601,9 +9611,9 @@ class VectorPinTemplate extends INumericPinTemplate {
|
||||
}
|
||||
|
||||
/**
|
||||
* @typedef {import("../entity/IEntity").AnyValue} AnyValue
|
||||
* @typedef {import("./LinkElement").LinkElementConstructor} LinkElementConstructor
|
||||
* @typedef {import("./NodeElement").default} NodeElement
|
||||
* @typedef {import("../entity/IEntity.js").AnyValue} AnyValue
|
||||
* @typedef {import("./LinkElement.js").LinkElementConstructor} LinkElementConstructor
|
||||
* @typedef {import("./NodeElement.js").default} NodeElement
|
||||
* @typedef {import("lit").CSSResult} CSSResult
|
||||
* @typedef {typeof PinElement} PinElementConstructor
|
||||
*/
|
||||
@@ -9983,9 +9993,9 @@ class OrderedIndexArray {
|
||||
}
|
||||
|
||||
/**
|
||||
* @typedef {import("../element/NodeElement").default} NodeElement
|
||||
* @typedef {typeof import("../Blueprint").default.nodeBoundariesSupplier} BoundariesFunction
|
||||
* @typedef {typeof import("../Blueprint").default.nodeSelectToggleFunction} SelectionFunction
|
||||
* @typedef {import("../element/NodeElement.js").default} NodeElement
|
||||
* @typedef {typeof import("../Blueprint.js").default.nodeBoundariesSupplier} BoundariesFunction
|
||||
* @typedef {typeof import("../Blueprint.js").default.nodeSelectToggleFunction} SelectionFunction
|
||||
* @typedef {{
|
||||
* primaryBoundary: Number,
|
||||
* secondaryBoundary: Number,
|
||||
@@ -10142,13 +10152,13 @@ class FastSelectionModel {
|
||||
}
|
||||
}
|
||||
|
||||
/** @typedef {import("../element/SelectorElement").default} SelectorElement */
|
||||
/** @typedef {import("../element/SelectorElement.js").default} SelectorElement */
|
||||
|
||||
/** @extends IFromToPositionedTemplate<SelectorElement> */
|
||||
class SelectorTemplate extends IFromToPositionedTemplate {
|
||||
}
|
||||
|
||||
/** @typedef {import("../Blueprint").BlueprintConstructor} BlueprintConstructor */
|
||||
/** @typedef {import("../Blueprint.js").BlueprintConstructor} BlueprintConstructor */
|
||||
|
||||
/** @extends {IFromToPositionedElement<Object, SelectorTemplate>} */
|
||||
class SelectorElement extends IFromToPositionedElement {
|
||||
@@ -10276,8 +10286,8 @@ function defineElements() {
|
||||
}
|
||||
|
||||
/**
|
||||
* @typedef {import("../entity/IEntity").AnyValue} AnyValue
|
||||
* @typedef {import("../entity/IEntity").AnyValueConstructor<*>} AnyValueConstructor
|
||||
* @typedef {import("../entity/IEntity.js").AnyValue} AnyValue
|
||||
* @typedef {import("../entity/IEntity.js").AnyValueConstructor<*>} AnyValueConstructor
|
||||
*/
|
||||
|
||||
/**
|
||||
@@ -10309,8 +10319,8 @@ class CustomSerializer extends Serializer {
|
||||
}
|
||||
|
||||
/**
|
||||
* @typedef {import("../entity/IEntity").AnyValue} AnyValue
|
||||
* @typedef {import("../entity/IEntity").AnyValueConstructor<*>} AnyValueConstructor
|
||||
* @typedef {import("../entity/IEntity.js").AnyValue} AnyValue
|
||||
* @typedef {import("../entity/IEntity.js").AnyValueConstructor<*>} AnyValueConstructor
|
||||
*/
|
||||
|
||||
/**
|
||||
@@ -10335,10 +10345,7 @@ class ToStringSerializer extends Serializer {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @typedef {import("../entity/IEntity").AnySimpleValue} AnySimpleValue
|
||||
* @typedef {import("../entity/IEntity").AnyValue} AnyValue
|
||||
*/
|
||||
/** @typedef {import("../entity/IEntity.js").AnySimpleValue} AnySimpleValue */
|
||||
|
||||
function initializeSerializerFactory() {
|
||||
|
||||
|
||||
2
dist/ueblueprint.min.js
vendored
2
dist/ueblueprint.min.js
vendored
File diff suppressed because one or more lines are too long
@@ -6,11 +6,9 @@ import NodeElement from "./element/NodeElement.js"
|
||||
import Utility from "./Utility.js"
|
||||
|
||||
/**
|
||||
* @typedef {import("./element/PinElement").default} PinElement
|
||||
* @typedef {import("./entity/GuidEntity").default} GuidEntity
|
||||
* @typedef {import("./entity/PinReferenceEntity").default} PinReferenceEntity
|
||||
* @typedef {import("./template/node/CommentNodeTemplate").default} CommentNodeTemplate
|
||||
* @typedef {import("lit").PropertyValues} PropertyValues
|
||||
* @typedef {import("./element/PinElement.js").default} PinElement
|
||||
* @typedef {import("./entity/PinReferenceEntity.js").default} PinReferenceEntity
|
||||
* @typedef {import("./template/node/CommentNodeTemplate.js").default} CommentNodeTemplate
|
||||
* @typedef {typeof Blueprint} BlueprintConstructor
|
||||
*/
|
||||
|
||||
|
||||
@@ -1,9 +1,8 @@
|
||||
import { css } from "lit"
|
||||
|
||||
/**
|
||||
* @typedef {import("./element/NodeElement").default} NodeElement
|
||||
* @typedef {import("./element/PinElement").default} PinElement
|
||||
* @typedef {import("lit").CSSResult} CSSResult
|
||||
* @typedef {import("./entity/ObjectEntity.js").default} ObjectEntity
|
||||
* @typedef {import("./entity/ObjectReferenceEntity.js").default} ObjectReferenceEntity
|
||||
*/
|
||||
|
||||
export default class Configuration {
|
||||
@@ -174,6 +173,12 @@ export default class Configuration {
|
||||
static selectAllKeyboardKey = "(bCtrl=True,Key=A)"
|
||||
static smoothScrollTime = 1000 // ms
|
||||
static stringEscapedCharacters = /['"\\]/g
|
||||
/** @param {ObjectEntity} objectEntity */
|
||||
static subObjectAttributeNameFromEntity = objectEntity =>
|
||||
"#SubObject" + (objectEntity.Class.type ? "_" + objectEntity.Class.type : "") + "_" + objectEntity.Name
|
||||
/** @param {ObjectReferenceEntity} objectReferenceEntity */
|
||||
static subObjectAttributeNameFromReference = objectReferenceEntity =>
|
||||
"#SubObject_" + objectReferenceEntity.type + "_" + objectReferenceEntity.path
|
||||
static trackingMouseEventName = {
|
||||
begin: "ueb-tracking-mouse-begin",
|
||||
end: "ueb-tracking-mouse-end",
|
||||
|
||||
@@ -3,13 +3,12 @@ import Configuration from "./Configuration.js"
|
||||
import UnionType from "./entity/UnionType.js"
|
||||
|
||||
/**
|
||||
* @typedef {import("./element/IElement").default} IElement
|
||||
* @typedef {import("./entity/IEntity").AnyValue} AnyValue
|
||||
* @typedef {import("./entity/IEntity").AnyValueConstructor<*>} AnyValueConstructor
|
||||
* @typedef {import("./entity/IEntity").AttributeInformation} TypeInformation
|
||||
* @typedef {import("./entity/IEntity").default} IEntity
|
||||
* @typedef {import("./entity/IEntity").EntityConstructor} EntityConstructor
|
||||
* @typedef {import("./entity/LinearColorEntity").default} LinearColorEntity
|
||||
* @typedef {import("./entity/IEntity.js").AnyValue} AnyValue
|
||||
* @typedef {import("./entity/IEntity.js").AnyValueConstructor<*>} AnyValueConstructor
|
||||
* @typedef {import("./entity/IEntity.js").AttributeInformation} TypeInformation
|
||||
* @typedef {import("./entity/IEntity.js").default} IEntity
|
||||
* @typedef {import("./entity/IEntity.js").EntityConstructor} EntityConstructor
|
||||
* @typedef {import("./entity/LinearColorEntity.js").default} LinearColorEntity
|
||||
*/
|
||||
|
||||
export default class Utility {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* @typedef {import("./IElement").default} IElement
|
||||
* @typedef {import("./IElement.js").default} IElement
|
||||
* @typedef {new (...args) => IElement} ElementConstructor
|
||||
*/
|
||||
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import IDraggableElement from "./IDraggableElement.js"
|
||||
|
||||
/**
|
||||
* @typedef {import("../element/WindowElement").default} WindowElement
|
||||
* @typedef {import("../entity/IEntity").default} IEntity
|
||||
* @typedef {import("../template/IDraggableControlTemplate").default} IDraggableControlTemplate
|
||||
* @typedef {import("../element/WindowElement.js").default} WindowElement
|
||||
* @typedef {import("../entity/IEntity.js").default} IEntity
|
||||
* @typedef {import("../template/IDraggableControlTemplate.js").default} IDraggableControlTemplate
|
||||
*/
|
||||
|
||||
/**
|
||||
|
||||
@@ -3,8 +3,8 @@ import IElement from "./IElement.js"
|
||||
import Utility from "../Utility.js"
|
||||
|
||||
/**
|
||||
* @typedef {import("../entity/IEntity").default} IEntity
|
||||
* @typedef {import("../template/IDraggableTemplate").default} IDraggableTemplate
|
||||
* @typedef {import("../entity/IEntity.js").default} IEntity
|
||||
* @typedef {import("../template/IDraggableTemplate.js").default} IDraggableTemplate
|
||||
* @typedef {CustomEvent<{
|
||||
* value: [Number, Number]
|
||||
* }>} DragEvent
|
||||
|
||||
@@ -2,11 +2,10 @@ import { LitElement } from "lit"
|
||||
import Configuration from "../Configuration.js"
|
||||
|
||||
/**
|
||||
* @typedef {import("../Blueprint").default} Blueprint
|
||||
* @typedef {import("../entity/IEntity").default} IEntity
|
||||
* @typedef {import("../input/IInput").default} IInput
|
||||
* @typedef {import("../template/ITemplate").default} ITemplate
|
||||
* @typedef {import("lit").PropertyDeclarations} PropertyDeclarations
|
||||
* @typedef {import("../Blueprint.js").default} Blueprint
|
||||
* @typedef {import("../entity/IEntity.js").default} IEntity
|
||||
* @typedef {import("../input/IInput.js").default} IInput
|
||||
* @typedef {import("../template/ITemplate.js").default} ITemplate
|
||||
* @typedef {import("lit").PropertyValues} PropertyValues
|
||||
*/
|
||||
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import IElement from "./IElement.js"
|
||||
|
||||
/**
|
||||
* @typedef {import("../entity/IEntity").default} IEntity
|
||||
* @typedef {import("../template/ITemplate").default} ITemplate
|
||||
* @typedef {import("../entity/IEntity.js").default} IEntity
|
||||
* @typedef {import("../template/ITemplate.js").default} ITemplate
|
||||
*/
|
||||
|
||||
/**
|
||||
|
||||
@@ -3,9 +3,9 @@ import Utility from "../Utility.js"
|
||||
import IDraggableElement from "./IDraggableElement.js"
|
||||
|
||||
/**
|
||||
* @typedef {import("../element/IDraggableElement").DragEvent} DragEvent
|
||||
* @typedef {import("../entity/IEntity").default} IEntity
|
||||
* @typedef {import("../template/ISelectableDraggableTemplate").default} ISelectableDraggableTemplate
|
||||
* @typedef {import("../element/IDraggableElement.js").DragEvent} DragEvent
|
||||
* @typedef {import("../entity/IEntity.js").default} IEntity
|
||||
* @typedef {import("../template/ISelectableDraggableTemplate.js").default} ISelectableDraggableTemplate
|
||||
*/
|
||||
|
||||
/**
|
||||
|
||||
@@ -6,8 +6,8 @@ import SVGIcon from "../SVGIcon.js"
|
||||
import Utility from "../Utility.js"
|
||||
|
||||
/**
|
||||
* @typedef {import("../element/IDraggableElement").DragEvent} DragEvent
|
||||
* @typedef {import("./PinElement").default} PinElement
|
||||
* @typedef {import("../element/IDraggableElement.js").DragEvent} DragEvent
|
||||
* @typedef {import("./PinElement.js").default} PinElement
|
||||
* @typedef {import("lit").TemplateResult<1>} TemplateResult
|
||||
* @typedef {typeof LinkElement} LinkElementConstructor
|
||||
*/
|
||||
|
||||
@@ -13,11 +13,13 @@ import Utility from "../Utility.js"
|
||||
import VariableAccessNodeTemplate from "../template/node/VariableAccessNodeTemplate.js"
|
||||
import VariableConversionNodeTemplate from "../template/node/VariableConversionNodeTemplate.js"
|
||||
import VariableOperationNodeTemplate from "../template/node/VariableOperationNodeTemplate.js"
|
||||
import UnknownPinEntity from "../entity/UnknownPinEntity.js"
|
||||
|
||||
/**
|
||||
* @typedef {import("./IDraggableElement").DragEvent} DragEvent
|
||||
* @typedef {import("./IElement").default} IElement
|
||||
* @typedef {import("./PinElement").default} PinElement
|
||||
* @typedef {import("./IDraggableElement.js").DragEvent} DragEvent
|
||||
* @typedef {import("./IElement.js").default} IElement
|
||||
* @typedef {import("../entity/ObjectReferenceEntity.js").default} ObjectReferenceEntity
|
||||
* @typedef {import("./PinElement.js").default} PinElement
|
||||
* @typedef {typeof NodeElement} NodeElementConstructor
|
||||
*/
|
||||
|
||||
@@ -278,7 +280,15 @@ export default class NodeElement extends ISelectableDraggableElement {
|
||||
|
||||
/** @returns {PinEntity[]} */
|
||||
getPinEntities() {
|
||||
return this.entity.CustomProperties.filter(v => v instanceof PinEntity)
|
||||
if (this.entity.CustomProperties.length > 0) {
|
||||
return this.entity.CustomProperties.filter(v => v instanceof PinEntity)
|
||||
}
|
||||
// Legacy nodes attempt to find pin entities
|
||||
if (this.entity.Pins) {
|
||||
return this.entity.Pins.map(objectReference =>
|
||||
new UnknownPinEntity(this.entity[Configuration.subObjectAttributeNameFromReference(objectReference)])
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
setLocation(x = 0, y = 0, acknowledge = true) {
|
||||
|
||||
@@ -21,9 +21,9 @@ import Vector2DPinTemplate from "../template/pin/Vector2DPinTemplate.js"
|
||||
import VectorPinTemplate from "../template/pin/VectorPinTemplate.js"
|
||||
|
||||
/**
|
||||
* @typedef {import("../entity/IEntity").AnyValue} AnyValue
|
||||
* @typedef {import("./LinkElement").LinkElementConstructor} LinkElementConstructor
|
||||
* @typedef {import("./NodeElement").default} NodeElement
|
||||
* @typedef {import("../entity/IEntity.js").AnyValue} AnyValue
|
||||
* @typedef {import("./LinkElement.js").LinkElementConstructor} LinkElementConstructor
|
||||
* @typedef {import("./NodeElement.js").default} NodeElement
|
||||
* @typedef {import("lit").CSSResult} CSSResult
|
||||
* @typedef {typeof PinElement} PinElementConstructor
|
||||
*/
|
||||
|
||||
@@ -2,7 +2,7 @@ import FastSelectionModel from "../selection/FastSelectionModel.js"
|
||||
import IFromToPositionedElement from "./IFromToPositionedElement.js"
|
||||
import SelectorTemplate from "../template/SelectorTemplate.js"
|
||||
|
||||
/** @typedef {import("../Blueprint").BlueprintConstructor} BlueprintConstructor */
|
||||
/** @typedef {import("../Blueprint.js").BlueprintConstructor} BlueprintConstructor */
|
||||
|
||||
/** @extends {IFromToPositionedElement<Object, SelectorTemplate>} */
|
||||
export default class SelectorElement extends IFromToPositionedElement {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/** @typedef {import("./IEntity").default} IEntity */
|
||||
/** @typedef {import("./IEntity.js").default} IEntity */
|
||||
|
||||
export default class ComputedType {
|
||||
|
||||
|
||||
@@ -199,7 +199,12 @@ export default class ObjectEntity extends IEntity {
|
||||
showDefault: false,
|
||||
},
|
||||
CustomProperties: {
|
||||
type: [new UnionType(PinEntity, UnknownPinEntity)]
|
||||
type: [new UnionType(PinEntity, UnknownPinEntity)],
|
||||
},
|
||||
// Legacy
|
||||
Pins: {
|
||||
type: [ObjectReferenceEntity],
|
||||
inlined: true,
|
||||
},
|
||||
}
|
||||
|
||||
@@ -301,6 +306,8 @@ export default class ObjectEntity extends IEntity {
|
||||
/** @type {IntegerEntity?} */ this.ErrorType
|
||||
/** @type {String?} */ this.ErrorMsg
|
||||
/** @type {(PinEntity | UnknownPinEntity)[]} */ this.CustomProperties
|
||||
// Legacy
|
||||
/** @type {ObjectReferenceEntity[]} */ this.Pins
|
||||
}
|
||||
|
||||
getClass() {
|
||||
|
||||
@@ -22,7 +22,7 @@ import Vector2DEntity from "./Vector2DEntity.js"
|
||||
import VectorEntity from "./VectorEntity.js"
|
||||
|
||||
/**
|
||||
* @typedef {import("./IEntity").AnyValue} AnyValue
|
||||
* @typedef {import("./IEntity.js").AnyValue} AnyValue
|
||||
* @typedef {import("lit").CSSResult} CSSResult
|
||||
*/
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/** @typedef {import("./IEntity").AnyValueConstructor<*>} AnyValueConstructor */
|
||||
/** @typedef {import("./IEntity.js").AnyValueConstructor<*>} AnyValueConstructor */
|
||||
|
||||
export default class UnionType {
|
||||
|
||||
|
||||
@@ -3,4 +3,8 @@ import PinEntity from "./PinEntity.js"
|
||||
export default class UnknownPinEntity extends PinEntity {
|
||||
|
||||
static lookbehind = ""
|
||||
|
||||
constructor(values = {}) {
|
||||
super(values, true)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import Configuration from "../Configuration.js"
|
||||
|
||||
/** @typedef {import("../Blueprint").default} Blueprint */
|
||||
/** @typedef {import("../Blueprint.js").default} Blueprint */
|
||||
|
||||
/** @template {HTMLElement} T */
|
||||
export default class IInput {
|
||||
|
||||
@@ -2,7 +2,7 @@ import ElementFactory from "../../element/ElementFactory.js"
|
||||
import IInput from "../IInput.js"
|
||||
import ObjectSerializer from "../../serialization/ObjectSerializer.js"
|
||||
|
||||
/** @typedef {import("../../element/NodeElement").NodeElementConstructor} NodeElementConstructor */
|
||||
/** @typedef {import("../../element/NodeElement.js").NodeElementConstructor} NodeElementConstructor */
|
||||
|
||||
export default class Paste extends IInput {
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@ import Grammar from "../../serialization/Grammar.js"
|
||||
import IInput from "../IInput.js"
|
||||
import KeyBindingEntity from "../../entity/KeyBindingEntity.js"
|
||||
|
||||
/** @typedef {import("../../Blueprint").default} Blueprint */
|
||||
/** @typedef {import("../../Blueprint.js").default} Blueprint */
|
||||
|
||||
/**
|
||||
* @template {HTMLElement} T
|
||||
|
||||
@@ -1,11 +1,13 @@
|
||||
import Configuration from "../../Configuration.js"
|
||||
import IKeyboardShortcut from "./IKeyboardShortcut.js"
|
||||
|
||||
/** @typedef {import("../../Blueprint.js").default} Blueprint */
|
||||
|
||||
export default class KeyboardCanc extends IKeyboardShortcut {
|
||||
|
||||
/**
|
||||
* @param {HTMLElement} target
|
||||
* @param {import("../../Blueprint").default} blueprint
|
||||
* @param {Blueprint} blueprint
|
||||
* @param {Object} options
|
||||
*/
|
||||
constructor(target, blueprint, options = {}) {
|
||||
|
||||
@@ -2,6 +2,8 @@ import Configuration from "../../Configuration.js"
|
||||
import IKeyboardShortcut from "./IKeyboardShortcut.js"
|
||||
import Zoom from "../mouse/Zoom.js"
|
||||
|
||||
/** @typedef {import("../../Blueprint.js").default} Blueprint */
|
||||
|
||||
export default class KeyboardEnableZoom extends IKeyboardShortcut {
|
||||
|
||||
/** @type {Zoom} */
|
||||
@@ -9,7 +11,7 @@ export default class KeyboardEnableZoom extends IKeyboardShortcut {
|
||||
|
||||
/**
|
||||
* @param {HTMLElement} target
|
||||
* @param {import("../../Blueprint").default} blueprint
|
||||
* @param {Blueprint} blueprint
|
||||
* @param {Object} options
|
||||
*/
|
||||
constructor(target, blueprint, options = {}) {
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
import Configuration from "../../Configuration.js"
|
||||
import IKeyboardShortcut from "./IKeyboardShortcut.js"
|
||||
|
||||
/** @typedef {import("../../Blueprint").default} Blueprint */
|
||||
/** @typedef {import("../../Blueprint.js").default} Blueprint */
|
||||
|
||||
export default class KeyboardSelectAll extends IKeyboardShortcut {
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import IKeyboardShortcut from "./IKeyboardShortcut.js"
|
||||
|
||||
/** @typedef {import("../../Blueprint").default} Blueprint */
|
||||
/** @typedef {import("../../Blueprint.js").default} Blueprint */
|
||||
|
||||
/**
|
||||
* @template {HTMLElement} T
|
||||
|
||||
@@ -4,8 +4,8 @@ import IPointing from "./IPointing.js"
|
||||
import Utility from "../../Utility.js"
|
||||
|
||||
/**
|
||||
* @typedef {import("../../Blueprint").default} Blueprint
|
||||
* @typedef {import("../../element/IElement").default} IElement
|
||||
* @typedef {import("../../Blueprint.js").default} Blueprint
|
||||
* @typedef {import("../../element/IElement.js").default} IElement
|
||||
*/
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
import Configuration from "../../Configuration.js"
|
||||
import IPointing from "./IPointing.js"
|
||||
|
||||
/** @typedef {import("../../Blueprint.js").default} Blueprint */
|
||||
|
||||
export default class IMouseWheel extends IPointing {
|
||||
|
||||
/** @param {WheelEvent} e */
|
||||
@@ -15,7 +17,7 @@ export default class IMouseWheel extends IPointing {
|
||||
|
||||
/**
|
||||
* @param {HTMLElement} target
|
||||
* @param {import("../../Blueprint").default} blueprint
|
||||
* @param {Blueprint} blueprint
|
||||
* @param {Object} options
|
||||
*/
|
||||
constructor(target, blueprint, options = {}) {
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
import IPointing from "./IPointing.js"
|
||||
|
||||
/** @typedef {import("../../Blueprint").default} Blueprint */
|
||||
|
||||
/**
|
||||
* @template {HTMLElement} T
|
||||
* @extends {IPointing<T>}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import MouseMoveDraggable from "./MouseMoveDraggable.js"
|
||||
|
||||
/** @typedef {import("../../Blueprint").default} Blueprint */
|
||||
/** @typedef {import("../../Blueprint.js").default} Blueprint */
|
||||
|
||||
export default class MouseClickDrag extends MouseMoveDraggable {
|
||||
|
||||
|
||||
@@ -3,12 +3,11 @@ import ElementFactory from "../../element/ElementFactory.js"
|
||||
import IMouseClickDrag from "./IMouseClickDrag.js"
|
||||
|
||||
/**
|
||||
* @typedef {import("../../Blueprint").default} Blueprint
|
||||
* @typedef {import("../../element/LinkElement").default} LinkElement
|
||||
* @typedef {import("../../element/LinkElement").LinkElementConstructor} LinkElementConstructor
|
||||
* @typedef {import("../../element/PinElement").default} PinElement
|
||||
* @typedef {import("../../template/node/KnotNodeTemplate").default} KnotNodeTemplate
|
||||
* @typedef {import("../../template/pin/KnotPinTemplate").default} KnotPinTemplate
|
||||
* @typedef {import("../../Blueprint.js").default} Blueprint
|
||||
* @typedef {import("../../element/LinkElement.js").default} LinkElement
|
||||
* @typedef {import("../../element/LinkElement.js").LinkElementConstructor} LinkElementConstructor
|
||||
* @typedef {import("../../element/PinElement.js").default} PinElement
|
||||
* @typedef {import("../../template/pin/KnotPinTemplate.js").default} KnotPinTemplate
|
||||
*/
|
||||
|
||||
/** @extends IMouseClickDrag<PinElement> */
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
import IPointing from "./IPointing.js"
|
||||
|
||||
/** @typedef {import("../../Blueprint").default} Blueprint */
|
||||
|
||||
/**
|
||||
* @template {HTMLElement} T
|
||||
* @extends {IPointing<T>}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import IMouseClickDrag from "./IMouseClickDrag.js"
|
||||
|
||||
/**
|
||||
* @typedef {import("../../element/IDraggableElement").default} IDraggableElement
|
||||
* @typedef {import("../../element/IDraggableElement.js").default} IDraggableElement
|
||||
*/
|
||||
|
||||
/**
|
||||
|
||||
@@ -2,8 +2,7 @@ import IMouseClickDrag from "./IMouseClickDrag.js"
|
||||
import Utility from "../../Utility.js"
|
||||
|
||||
/**
|
||||
* @typedef {import("../../Blueprint").default} Blueprint
|
||||
* @typedef {import("../../element/IDraggableElement").default} IDraggableElement
|
||||
* @typedef {import("../../element/IDraggableElement.js").default} IDraggableElement
|
||||
*/
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,9 +1,8 @@
|
||||
import MouseMoveDraggable from "./MouseMoveDraggable.js"
|
||||
|
||||
/**
|
||||
* @typedef {import("../../Blueprint").default} Blueprint
|
||||
* @typedef {import("../../element/NodeElement").default} NodeElement
|
||||
* @typedef {import("../../template/node/CommentNodeTemplate").default} CommentNodeTemplate
|
||||
* @typedef {import("../../element/NodeElement.js").default} NodeElement
|
||||
* @typedef {import("../../template/node/CommentNodeTemplate.js").default} CommentNodeTemplate
|
||||
*/
|
||||
|
||||
/** @extends {MouseMoveDraggable<NodeElement>} */
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import OrderedIndexArray from "./OrderedIndexArray.js"
|
||||
|
||||
/**
|
||||
* @typedef {import("../element/NodeElement").default} NodeElement
|
||||
* @typedef {typeof import("../Blueprint").default.nodeBoundariesSupplier} BoundariesFunction
|
||||
* @typedef {typeof import("../Blueprint").default.nodeSelectToggleFunction} SelectionFunction
|
||||
* @typedef {import("../element/NodeElement.js").default} NodeElement
|
||||
* @typedef {typeof import("../Blueprint.js").default.nodeBoundariesSupplier} BoundariesFunction
|
||||
* @typedef {typeof import("../Blueprint.js").default.nodeSelectToggleFunction} SelectionFunction
|
||||
* @typedef {{
|
||||
* primaryBoundary: Number,
|
||||
* secondaryBoundary: Number,
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/**
|
||||
* @typedef {import("../element/NodeElement").default} NodeElement
|
||||
* @typedef {typeof import("../Blueprint").default.nodeBoundariesSupplier} BoundariesFunction
|
||||
* @typedef {typeof import("../Blueprint").default.nodeSelectToggleFunction} SelectionFunction
|
||||
* @typedef {import("../element/NodeElement.js").default} NodeElement
|
||||
* @typedef {typeof import("../Blueprint.js").default.nodeBoundariesSupplier} BoundariesFunction
|
||||
* @typedef {typeof import("../Blueprint.js").default.nodeSelectToggleFunction} SelectionFunction
|
||||
* @typedef {{
|
||||
* primaryBoundary: Number,
|
||||
* secondaryBoundary: Number,
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import Serializer from "./Serializer.js"
|
||||
|
||||
/**
|
||||
* @typedef {import("../entity/IEntity").AnyValue} AnyValue
|
||||
* @typedef {import("../entity/IEntity").AnyValueConstructor<*>} AnyValueConstructor
|
||||
* @typedef {import("../entity/IEntity.js").AnyValue} AnyValue
|
||||
* @typedef {import("../entity/IEntity.js").AnyValueConstructor<*>} AnyValueConstructor
|
||||
*/
|
||||
|
||||
/**
|
||||
|
||||
@@ -652,7 +652,7 @@ export default class Grammar {
|
||||
static subObjectEntity = P.lazy(() =>
|
||||
this.objectEntity
|
||||
.map(object =>
|
||||
values => values["SubObject_" + object.Name] = object
|
||||
values => values[Configuration.subObjectAttributeNameFromEntity(object)] = object
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
@@ -77,7 +77,7 @@ export default class ObjectSerializer extends Serializer {
|
||||
)
|
||||
}
|
||||
let result = indentation + "Begin Object"
|
||||
+ (entity.Class.path ? ` Class=${entity.Class.path}` : "")
|
||||
+ (entity.Class.type || entity.Class.path ? ` Class=${this.doWriteValue(entity.Class, insideString)}` : "")
|
||||
+ (entity.Name ? ` Name=${this.doWriteValue(entity.Name, insideString)}` : "")
|
||||
+ "\n"
|
||||
+ super.doWrite(
|
||||
|
||||
@@ -1,15 +1,15 @@
|
||||
/**
|
||||
* @typedef {import("../entity/IEntity").default} IEntity
|
||||
* @typedef {import("../entity/IEntity").AnyValue} AnyValue
|
||||
* @typedef {import("../entity/IEntity.js").default} IEntity
|
||||
* @typedef {import("../entity/IEntity.js").AnyValue} AnyValue
|
||||
*/
|
||||
|
||||
/**
|
||||
* @template {AnyValue} T
|
||||
* @typedef {import("../entity/IEntity").AnyValueConstructor<T>} AnyValueConstructor
|
||||
* @typedef {import("../entity/IEntity.js").AnyValueConstructor<T>} AnyValueConstructor
|
||||
*/
|
||||
/**
|
||||
* @template {AnyValue} T
|
||||
* @typedef {import("./Serializer").default<T>} Serializer
|
||||
* @typedef {import("./Serializer.js").default<T>} Serializer
|
||||
*/
|
||||
|
||||
export default class SerializerFactory {
|
||||
|
||||
@@ -2,8 +2,8 @@ import Serializer from "./Serializer.js"
|
||||
import Utility from "../Utility.js"
|
||||
|
||||
/**
|
||||
* @typedef {import("../entity/IEntity").AnyValue} AnyValue
|
||||
* @typedef {import("../entity/IEntity").AnyValueConstructor<*>} AnyValueConstructor
|
||||
* @typedef {import("../entity/IEntity.js").AnyValue} AnyValue
|
||||
* @typedef {import("../entity/IEntity.js").AnyValueConstructor<*>} AnyValueConstructor
|
||||
*/
|
||||
|
||||
/**
|
||||
|
||||
@@ -33,10 +33,7 @@ import VariableReferenceEntity from "../entity/VariableReferenceEntity.js"
|
||||
import Vector2DEntity from "../entity/Vector2DEntity.js"
|
||||
import VectorEntity from "../entity/VectorEntity.js"
|
||||
|
||||
/**
|
||||
* @typedef {import("../entity/IEntity").AnySimpleValue} AnySimpleValue
|
||||
* @typedef {import("../entity/IEntity").AnyValue} AnyValue
|
||||
*/
|
||||
/** @typedef {import("../entity/IEntity.js").AnySimpleValue} AnySimpleValue */
|
||||
|
||||
export default function initializeSerializerFactory() {
|
||||
|
||||
|
||||
@@ -14,10 +14,10 @@ import Utility from "../Utility.js"
|
||||
import Zoom from "../input/mouse/Zoom.js"
|
||||
|
||||
/**
|
||||
* @typedef {import("../Blueprint").default} Blueprint
|
||||
* @typedef {import("../element/PinElement").default} PinElement
|
||||
* @typedef {import("../element/SelectorElement").default} SelectorElement
|
||||
* @typedef {import("../entity/PinReferenceEntity").default} PinReferenceEntity
|
||||
* @typedef {import("../Blueprint.js").default} Blueprint
|
||||
* @typedef {import("../element/PinElement.js").default} PinElement
|
||||
* @typedef {import("../element/SelectorElement.js").default} SelectorElement
|
||||
* @typedef {import("../entity/PinReferenceEntity.js").default} PinReferenceEntity
|
||||
* @typedef {import("lit").PropertyValues} PropertyValues
|
||||
*/
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import IDraggableControlTemplate from "./IDraggableControlTemplate.js"
|
||||
import Utility from "../Utility.js"
|
||||
|
||||
/** @typedef {import("../element/ColorHandlerElement").default} ColorHandlerElement */
|
||||
/** @typedef {import("../element/ColorHandlerElement.js").default} ColorHandlerElement */
|
||||
|
||||
/** @extends {IDraggableControlTemplate<ColorHandlerElement>} */
|
||||
export default class ColorHandlerTemplate extends IDraggableControlTemplate {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import IDraggableControlTemplate from "./IDraggableControlTemplate.js"
|
||||
import Utility from "../Utility.js"
|
||||
|
||||
/** @typedef {import("../element/ColorHandlerElement").default} ColorHandlerElement */
|
||||
/** @typedef {import("../element/ColorHandlerElement.js").default} ColorHandlerElement */
|
||||
|
||||
/** @extends {IDraggableControlTemplate<ColorHandlerElement>} */
|
||||
export default class ColorSliderTemplate extends IDraggableControlTemplate {
|
||||
|
||||
@@ -2,7 +2,7 @@ import IDraggableTemplate from "./IDraggableTemplate.js"
|
||||
import MouseMoveDraggable from "../input/mouse/MouseMoveDraggable.js"
|
||||
|
||||
/**
|
||||
* @typedef {import("../element/IDraggableElement").default} IDraggableElement
|
||||
* @typedef {import("../element/IDraggableElement.js").default} IDraggableElement
|
||||
* @typedef {import("lit").PropertyValues} PropertyValues
|
||||
*/
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import IDraggableTemplate from "./IDraggableTemplate.js"
|
||||
|
||||
/**
|
||||
* @typedef {import("../element/IDraggableElement").default} IDraggableElement
|
||||
* @typedef {import("../element/IDraggableElement.js").default} IDraggableElement
|
||||
* @typedef {import("lit").PropertyValues} PropertyValues
|
||||
*/
|
||||
|
||||
|
||||
@@ -3,10 +3,7 @@ import ITemplate from "./ITemplate.js"
|
||||
import KeyboardShortcutAction from "../input/keybaord/KeyboardShortcutAction.js"
|
||||
import MouseMoveDraggable from "../input/mouse/MouseMoveDraggable.js"
|
||||
|
||||
/**
|
||||
* @typedef {import("../entity/IEntity").default} IEntity
|
||||
* @typedef {import("../element/IDraggableElement").default} IDraggableElement
|
||||
*/
|
||||
/** @typedef {import("../element/IDraggableElement.js").default} IDraggableElement */
|
||||
|
||||
/**
|
||||
* @template {IDraggableElement} T
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import ITemplate from "./ITemplate.js"
|
||||
|
||||
/**
|
||||
* @typedef {import("../element/IFromToPositionedElement").default} IFromToPositionedElement
|
||||
* @typedef {import("../element/IFromToPositionedElement.js").default} IFromToPositionedElement
|
||||
* @typedef {import("lit").PropertyValues} PropertyValues
|
||||
*/
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@ import MouseClickDrag from "../input/mouse/MouseClickDrag.js"
|
||||
import NodeTemplate from "./node/NodeTemplate.js"
|
||||
|
||||
/**
|
||||
* @typedef {import("../element/NodeElement").default} NodeElement
|
||||
* @typedef {import("../element/NodeElement.js").default} NodeElement
|
||||
* @typedef {import("lit").PropertyValues} PropertyValues
|
||||
*/
|
||||
|
||||
|
||||
@@ -2,9 +2,9 @@ import IDraggablePositionedTemplate from "./IDraggablePositionedTemplate.js"
|
||||
import MouseMoveNodes from "../input/mouse/MouseMoveNodes.js"
|
||||
|
||||
/**
|
||||
* @typedef {import("../element/NodeElement").default} NodeElement
|
||||
* @typedef {import("../element/NodeElement.js").default} NodeElement
|
||||
* @typedef {import("../input/mouse/MouseMoveDraggable.js").default} MouseMoveDraggable
|
||||
* @typedef {import("lit").PropertyValues} PropertyValues
|
||||
* @typedef {import("../input/mouse/MouseMoveDraggable").default} MouseMoveDraggable
|
||||
*/
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import { html } from "lit"
|
||||
|
||||
/**
|
||||
* @typedef {import("../element/IElement").default} IElement
|
||||
* @typedef {import("../input/IInput").default} IInput
|
||||
* @typedef {import("../element/IElement.js").default} IElement
|
||||
* @typedef {import("../input/IInput.js").default} IInput
|
||||
* @typedef {import("lit").PropertyValues} PropertyValues
|
||||
*/
|
||||
|
||||
|
||||
@@ -7,10 +7,10 @@ import MouseDbClick from "../input/mouse/MouseDbClick.js"
|
||||
import Utility from "../Utility.js"
|
||||
|
||||
/**
|
||||
* @typedef {import("../element/LinkElement").default} LinkElement
|
||||
* @typedef {import("../element/LinkElement").LinkElementConstructor} LinkElementConstructor
|
||||
* @typedef {import("../element/NodeElement").NodeElementConstructor} NodeElementConstructor
|
||||
* @typedef {import("./node/KnotNodeTemplate").default} KnotNodeTemplate
|
||||
* @typedef {import("../element/LinkElement.js").default} LinkElement
|
||||
* @typedef {import("../element/LinkElement.js").LinkElementConstructor} LinkElementConstructor
|
||||
* @typedef {import("../element/NodeElement.js").NodeElementConstructor} NodeElementConstructor
|
||||
* @typedef {import("./node/KnotNodeTemplate.js").default} KnotNodeTemplate
|
||||
* @typedef {import("lit").PropertyValues} PropertyValues
|
||||
*/
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import IFromToPositionedTemplate from "./IFromToPositionedTemplate.js"
|
||||
|
||||
/** @typedef {import("../element/SelectorElement").default} SelectorElement */
|
||||
/** @typedef {import("../element/SelectorElement.js").default} SelectorElement */
|
||||
|
||||
/** @extends IFromToPositionedTemplate<SelectorElement> */
|
||||
export default class SelectorTemplate extends IFromToPositionedTemplate {
|
||||
|
||||
@@ -5,8 +5,7 @@ import LinearColorEntity from "../../entity/LinearColorEntity.js"
|
||||
import Utility from "../../Utility.js"
|
||||
|
||||
/**
|
||||
* @typedef {import("../../element/NodeElement").default} NodeElement
|
||||
* @typedef {import("../../element/PinElement").default} PinElement
|
||||
* @typedef {import("../../element/NodeElement.js").default} NodeElement
|
||||
* @typedef {import("lit").PropertyValues} PropertyValues
|
||||
*/
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@ import MinimalPinTemplate from "../pin/MinimalPinTemplate.js"
|
||||
import NodeTemplate from "./NodeTemplate.js"
|
||||
|
||||
/**
|
||||
* @typedef {import("../../element/PinElement").PinElementConstructor} PinElementConstructor
|
||||
* @typedef {import("../../element/PinElement.js").PinElementConstructor} PinElementConstructor
|
||||
* @typedef {import("lit").PropertyValues} PropertyValues
|
||||
*/
|
||||
|
||||
|
||||
@@ -5,9 +5,9 @@ import KnotPinTemplate from "../pin/KnotPinTemplate.js"
|
||||
import NodeTemplate from "./NodeTemplate.js"
|
||||
|
||||
/**
|
||||
* @typedef {import("../../element/NodeElement").default} NodeElement
|
||||
* @typedef {import("../../element/PinElement").default} PinElement
|
||||
* @typedef {import("../../element/PinElement").PinElementConstructor} PinElementConstructor
|
||||
* @typedef {import("../../element/NodeElement.js").default} NodeElement
|
||||
* @typedef {import("../../element/PinElement.js").default} PinElement
|
||||
* @typedef {import("../../element/PinElement.js").PinElementConstructor} PinElementConstructor
|
||||
*/
|
||||
|
||||
export default class KnotNodeTemplate extends NodeTemplate {
|
||||
|
||||
@@ -5,9 +5,9 @@ import SVGIcon from "../../SVGIcon.js"
|
||||
import Utility from "../../Utility.js"
|
||||
|
||||
/**
|
||||
* @typedef {import("../../element/NodeElement").default} NodeElement
|
||||
* @typedef {import("../../element/PinElement").default} PinElement
|
||||
* @typedef {import("../../element/PinElement").PinElementConstructor} PinElementConstructor
|
||||
* @typedef {import("../../element/NodeElement.js").default} NodeElement
|
||||
* @typedef {import("../../element/PinElement.js").default} PinElement
|
||||
* @typedef {import("../../element/PinElement.js").PinElementConstructor} PinElementConstructor
|
||||
* @typedef {import("lit").PropertyValues} PropertyValues
|
||||
*/
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import Configuration from "../../Configuration.js"
|
||||
import VariableManagementNodeTemplate from "./VariableMangementNodeTemplate.js"
|
||||
|
||||
/** @typedef {import("../../element/NodeElement").default} NodeElement */
|
||||
/** @typedef {import("../../element/NodeElement.js").default} NodeElement */
|
||||
|
||||
export default class VariableAccessNodeTemplate extends VariableManagementNodeTemplate {
|
||||
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
import VariableManagementNodeTemplate from "./VariableMangementNodeTemplate.js"
|
||||
|
||||
/** @typedef {import("../../element/NodeElement").default} NodeElement */
|
||||
|
||||
export default class VariableConversionNodeTemplate extends VariableManagementNodeTemplate {
|
||||
|
||||
static nodeStyleClasses = [...super.nodeStyleClasses, "ueb-node-style-conversion"]
|
||||
|
||||
@@ -3,8 +3,8 @@ import ElementFactory from "../../element/ElementFactory.js"
|
||||
import NodeTemplate from "./NodeTemplate.js"
|
||||
|
||||
/**
|
||||
* @typedef {import("../../element/NodeElement").default} NodeElement
|
||||
* @typedef {import("../../element/PinElement").PinElementConstructor} PinElementConstructor
|
||||
* @typedef {import("../../element/NodeElement.js").default} NodeElement
|
||||
* @typedef {import("../../element/PinElement.js").PinElementConstructor} PinElementConstructor
|
||||
*/
|
||||
|
||||
export default class VariableManagementNodeTemplate extends NodeTemplate {
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
import VariableManagementNodeTemplate from "./VariableMangementNodeTemplate.js"
|
||||
|
||||
/** @typedef {import("../../element/NodeElement").default} NodeElement */
|
||||
|
||||
export default class VariableOperationNodeTemplate extends VariableManagementNodeTemplate {
|
||||
|
||||
static nodeStyleClasses = [...super.nodeStyleClasses, "ueb-node-style-operation"]
|
||||
|
||||
@@ -3,8 +3,6 @@ import PinTemplate from "./PinTemplate.js"
|
||||
import SVGIcon from "../../SVGIcon.js"
|
||||
import Utility from "../../Utility.js"
|
||||
|
||||
/** @typedef {import("../../element/PinElement").default} PinElement */
|
||||
|
||||
export default class ExecPinTemplate extends PinTemplate {
|
||||
|
||||
renderIcon() {
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
import IntPinTemplate from "./IntPinTemplate.js"
|
||||
|
||||
/** @typedef {import("../../entity/IntegerEntity").default} IntegerEntity */
|
||||
|
||||
export default class Int64PinTemplate extends IntPinTemplate {
|
||||
|
||||
/** @param {String[]} values */
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { html } from "lit"
|
||||
import INumericPinTemplate from "./INumericPinTemplate.js"
|
||||
|
||||
/** @typedef {import("../../entity/IntegerEntity").default} IntegerEntity */
|
||||
/** @typedef {import("../../entity/IntegerEntity.js").default} IntegerEntity */
|
||||
|
||||
/** @extends INumericPinTemplate<IntegerEntity> */
|
||||
export default class IntPinTemplate extends INumericPinTemplate {
|
||||
|
||||
@@ -3,8 +3,8 @@ import MinimalPinTemplate from "./MinimalPinTemplate.js"
|
||||
import Utility from "../../Utility.js"
|
||||
|
||||
/**
|
||||
* @typedef {import("../node/KnotNodeTemplate").default} KnotNodeTemplate
|
||||
* @typedef {import("../../entity/PinEntity").default} KnotEntity
|
||||
* @typedef {import("../../entity/PinEntity.js").default} KnotEntity
|
||||
* @typedef {import("../node/KnotNodeTemplate.js").default} KnotNodeTemplate
|
||||
*/
|
||||
|
||||
/** @extends MinimalPinTemplate<KnotEntity> */
|
||||
|
||||
@@ -5,9 +5,9 @@ import ElementFactory from "../../element/ElementFactory.js"
|
||||
import PinTemplate from "./PinTemplate.js"
|
||||
|
||||
/**
|
||||
* @typedef {import("../../element/WindowElement").default} WindowElement
|
||||
* @typedef {import("../../element/WindowElement").WindowElementConstructor} WindowElementConstructor
|
||||
* @typedef {import("../../entity/LinearColorEntity").default} LinearColorEntity
|
||||
* @typedef {import("../../element/WindowElement.js").default} WindowElement
|
||||
* @typedef {import("../../element/WindowElement.js").WindowElementConstructor} WindowElementConstructor
|
||||
* @typedef {import("../../entity/LinearColorEntity.js").default} LinearColorEntity
|
||||
*/
|
||||
|
||||
/** @extends PinTemplate<LinearColorEntity> */
|
||||
|
||||
@@ -1,13 +1,14 @@
|
||||
import { html } from "lit"
|
||||
import PinTemplate from "./PinTemplate.js"
|
||||
|
||||
/** @typedef {import("../../entity/IEntity.js").AnyValue} AnyValue */
|
||||
/**
|
||||
* @template T
|
||||
* @typedef {import("../../element/PinElement").default<T>} PinElement
|
||||
* @template {AnyValue} T
|
||||
* @typedef {import("../../element/PinElement.js").default<T>} PinElement
|
||||
*/
|
||||
|
||||
/**
|
||||
* @template T
|
||||
* @template {AnyValue} T
|
||||
* @extends PinTemplate<PinElement<T>>
|
||||
*/
|
||||
export default class MinimalPinTemplate extends PinTemplate {
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
import IInputPinTemplate from "./IInputPinTemplate.js"
|
||||
|
||||
/** @typedef {import("../../element/PinElement").default} PinElement */
|
||||
|
||||
export default class NamePinTemplate extends IInputPinTemplate {
|
||||
|
||||
static singleLineInput = true
|
||||
|
||||
@@ -7,12 +7,12 @@ import VariableConversionNodeTemplate from "../node/VariableConversionNodeTempla
|
||||
import VariableOperationNodeTemplate from "../node/VariableOperationNodeTemplate.js"
|
||||
|
||||
/**
|
||||
* @typedef {import("../../input/IInput").default} IInput
|
||||
* @typedef {import("../../input/IInput.js").default} IInput
|
||||
* @typedef {import("lit").PropertyValues} PropertyValues
|
||||
*/
|
||||
/**
|
||||
* @template T
|
||||
* @typedef {import("../../element/PinElement").default<T>} PinElement
|
||||
* @typedef {import("../../element/PinElement.js").default<T>} PinElement
|
||||
*/
|
||||
|
||||
/**
|
||||
|
||||
@@ -3,7 +3,7 @@ import INumericPinTemplate from "./INumericPinTemplate.js"
|
||||
import RotatorEntity from "../../entity/RotatorEntity.js"
|
||||
import Utility from "../../Utility.js"
|
||||
|
||||
/** @typedef {import("../../entity/RotatorEntity").default} Rotator */
|
||||
/** @typedef {import("../../entity/RotatorEntity.js").default} Rotator */
|
||||
|
||||
/** @extends INumericPinTemplate<Rotator> */
|
||||
export default class RotatorPinTemplate extends INumericPinTemplate {
|
||||
|
||||
@@ -8,7 +8,7 @@ import Utility from "../../Utility.js"
|
||||
import WindowTemplate from "./WindowTemplate.js"
|
||||
|
||||
/**
|
||||
* @typedef {import("../../element/WindowElement").default} WindowElement
|
||||
* @typedef {import("../../element/WindowElement.js").default} WindowElement
|
||||
* @typedef {import("lit").PropertyValues} PropertyValues
|
||||
*/
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ import IDraggablePositionedTemplate from "../IDraggablePositionedTemplate.js"
|
||||
import MouseMoveDraggable from "../../input/mouse/MouseMoveDraggable.js"
|
||||
import SVGIcon from "../../SVGIcon.js"
|
||||
|
||||
/** @typedef {import("../../element/WindowElement").default} WindowElement */
|
||||
/** @typedef {import("../../element/WindowElement.js").default} WindowElement */
|
||||
|
||||
/** @extends {IDraggablePositionedTemplate<WindowElement>} */
|
||||
export default class WindowTemplate extends IDraggablePositionedTemplate {
|
||||
|
||||
Reference in New Issue
Block a user