mirror of
https://github.com/barsdeveloper/ueblueprint.git
synced 2026-02-04 08:08:18 +08:00
Closeable color picker window
This commit is contained in:
1
dist/css/ueb-style.css
vendored
1
dist/css/ueb-style.css
vendored
@@ -759,6 +759,7 @@ ueb-window {
|
||||
padding: 8px;
|
||||
height: 12px;
|
||||
width: 12px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.ueb-color-picker-theme,
|
||||
|
||||
2
dist/css/ueb-style.css.map
vendored
2
dist/css/ueb-style.css.map
vendored
@@ -1 +1 @@
|
||||
{"version":3,"sourceRoot":"","sources":["../../scss/style.scss","../../scss/ueb-link.scss","../../scss/ueb-node.scss","../../scss/ueb-pin.scss","../../scss/ueb-type-color.scss","../../scss/ueb-ui-controls.scss","../../scss/ueb-window.scss"],"names":[],"mappings":"AAAA;EACI;EACA;EACA,KACI;;AAIR;EACI;EACA;EACA,KACI;;AAIR;EACI;EACA;EACA,KACI;;AAIR;EACI;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;AAGJ;EACI;;;AAGJ;EACI;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;AAGJ;EACI;EACA;EACA;;;AAGJ;EACI;EACA;EACA;EACA;;;AAGJ;EACI;;;AAGJ;EACI;EACA;EACA;EACA;EACA;EACA;EACA;EACA,kBAEI;EA0BJ,iBAEI;EAQJ;EACA;EACA;EACA;EACA;;;AAGJ;EACI;;;AAGJ;EACI;;;AAGJ;EACI;;;AAGJ;EACI;;;AAGJ;EACI;;;AAGJ;EACI;;;AAGJ;EACI;;;AAGJ;EACI;;;AAGJ;EACI;;;AAGJ;EACI;;;AAGJ;EACI;;;AAGJ;EACI;;;AAGJ;EACI;EACA;;;AAGJ;EACI;;;AAGJ;EACI;EACA;;;AAGJ;EACI;EACA;;;AAGJ;EACI;EACA;;;AAGJ;EACI;EACA;;;AAGJ;EACI;EACA;;;AAGJ;EACI;EACA;;;AAGJ;EACI;EACA;;;AAGJ;EACI;EACA;;;AAGJ;EACI;EACA;EACA;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;EACA;EACA;EACA;EACA,YACI;;;AAWR;EACI;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;AAGJ;EACI;EACA;;;AAGJ;AAAA;EAEI;EACA;EACA;;;AAGJ;EACI;EACA;;;AAGJ;EACI;EACA;;;AAGJ;EACI;;;AAGJ;EACI;;;AAGJ;EACI;;;AAGJ;EACI;;AAEA;EAEI;EACA;EACA;EACA;EACA;EACA;;AAGJ;EACI;;;AAIR;AAAA;EAEI;EACA;;;AAGJ;EACI;EACA;EACA;;;AAGJ;EACI;EACA;EACA;EACA;;;AAGJ;EACI;EACA;EACA;;AAEA;EACI;;;AAIR;EACI;;;AAGJ;EACI;;;AAGJ;EACI;;;AAGJ;EACI;;;AAGJ;EACI;;;AAGJ;EACI;;;AAGJ;EACI;;;AAGJ;EACI;;;AAGJ;EACI","file":"ueb-style.css"}
|
||||
{"version":3,"sourceRoot":"","sources":["../../scss/style.scss","../../scss/ueb-link.scss","../../scss/ueb-node.scss","../../scss/ueb-pin.scss","../../scss/ueb-type-color.scss","../../scss/ueb-ui-controls.scss","../../scss/ueb-window.scss"],"names":[],"mappings":"AAAA;EACI;EACA;EACA,KACI;;AAIR;EACI;EACA;EACA,KACI;;AAIR;EACI;EACA;EACA,KACI;;AAIR;EACI;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;AAGJ;EACI;;;AAGJ;EACI;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;AAGJ;EACI;EACA;EACA;;;AAGJ;EACI;EACA;EACA;EACA;;;AAGJ;EACI;;;AAGJ;EACI;EACA;EACA;EACA;EACA;EACA;EACA;EACA,kBAEI;EA0BJ,iBAEI;EAQJ;EACA;EACA;EACA;EACA;;;AAGJ;EACI;;;AAGJ;EACI;;;AAGJ;EACI;;;AAGJ;EACI;;;AAGJ;EACI;;;AAGJ;EACI;;;AAGJ;EACI;;;AAGJ;EACI;;;AAGJ;EACI;;;AAGJ;EACI;;;AAGJ;EACI;;;AAGJ;EACI;;;AAGJ;EACI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EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;AAGJ;EACI;EACA;EACA;EACA;EACA;EACA;;;AAGJ;EACI;EACA;;;AAGJ;EACI;EACA;EACA;;;AAGJ;EACI;EACA;EACA;EACA;;;AAGJ;AAAA;EAEI;EACA;;;AAGJ;EACI;EACA;;;AAGJ;EACI;EACA;EACA;EACA;EACA,YACI;;;AAWR;EACI;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;AAGJ;EACI;EACA;;;AAGJ;AAAA;EAEI;EACA;EACA;;;AAGJ;EACI;EACA;;;AAGJ;EACI;EACA;;;AAGJ;EACI;;;AAGJ;EACI;;;AAGJ;EACI;;;AAGJ;EACI;;AAEA;EAEI;EACA;EACA;EACA;EACA;EACA;;AAGJ;EACI;;;AAIR;AAAA;EAEI;EACA;;;AAGJ;EACI;EACA;EACA;;;AAGJ;EACI;EACA;EACA;EACA;;;AAGJ;EACI;EACA;EACA;;AAEA;EACI;;;AAIR;EACI;;;AAGJ;EACI;;;AAGJ;EACI;;;AAGJ;EACI;;;AAGJ;EACI;;;AAGJ;EACI;;;AAGJ;EACI;;;AAGJ;EACI;;;AAGJ;EACI","file":"ueb-style.css"}
|
||||
2
dist/css/ueb-style.min.css
vendored
2
dist/css/ueb-style.min.css
vendored
File diff suppressed because one or more lines are too long
2
dist/css/ueb-style.min.css.map
vendored
2
dist/css/ueb-style.min.css.map
vendored
@@ -1 +1 @@
|
||||
{"version":3,"sourceRoot":"","sources":["../../scss/style.scss","../../scss/ueb-link.scss","../../scss/ueb-node.scss","../../scss/ueb-pin.scss","../../scss/ueb-type-color.scss","../../scss/ueb-ui-controls.scss","../../scss/ueb-window.scss"],"names":[],"mappings":"AAAA,WACI,qBACA,oBACA,IACI,kGAIR,WACI,qBACA,mBACA,IACI,sGAIR,WACI,qBACA,iBACA,IACI,gGAIR,cACI,eACA,6CACA,cACA,kBACA,8EACA,+BACA,WACA,iBAGJ,kBACI,iBAGJ,qBACI,aACA,kBACA,MACA,QACA,OAC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,0BACI,iDAGJ,wBACI,+CAGJ,2BACI,kDAGJ,0BACI,iDAGJ,qDACI,uDAGJ,iDACI,kDAGJ,mDACI,oDAGJ,gDACI,iDAGJ,0BACI,iDCvEJ,mCACI,kBACA,oBAEA,qFAEI,WACA,cACA,kBACA,QACA,SACA,+BAGJ,2CACI,UACA,0BAGJ,0CACI,WACA,2BAIR,uBACI,kBACA,yBACA,kBACA,YACA,mBAEA,6BACI,iBAIR,qCACI,cACA,kBACA,YACA,kBACA,mBAGJ,4BACI,kBACA,cACA,iBACA,UAKA,4BACI,WACA,qBACA,6BACA,oCACA,qCACA,sBAGJ,0BACI,eC9DR,WACI,cACA,kBACA,sBACA,MACA,OACA,sGACA,mBACA,6CACA,aAGJ,gBACI,aACA,mBACA,mBACA,gBACA,YACA,mBAGJ,oBACI,aACA,yBAGJ,iBACI,YACA,kBACA,kBAGJ,kBACI,YACA,YACA,WAGJ,+CAEI,qBACA,sBAGJ,uBACI,aACA,2DAGJ,wBACI,kBACA,iBACA,gBACA,mBACA,WACI,mLAWR,kBACI,cACA,kBACA,gBACA,iBACA,UACA,WACA,sBACA,kBAGJ,0CACI,8BACA,6BAGJ,qDAEI,aACA,oBACA,WAGJ,6BACI,iBACA,4EAGJ,wBACI,kBACA,4EAGJ,cACI,cAGJ,2CACI,yCAGJ,sCACI,yCAGJ,0BACI,kBAEA,mEAEI,WACA,cACA,kBACA,SACA,UACA,0BAGJ,iCACI,QAIR,4DAEI,YACA,YAGJ,2BACI,aACA,gBACA,gBAGJ,oDACI,aACA,sBACA,8BACA,YAGJ,wDACI,aACA,mBACA,kBAEA,4DACI,YAIR,kDACI,YAGJ,yDACI,oCAGJ,yDACI,oCAGJ,yDACI,oCAGJ,yDACI,oCAGJ,yDACI,oCAGJ,yDACI,oCAGJ,yDACI,oCAGJ,2BACI","file":"ueb-style.min.css"}
|
||||
{"version":3,"sourceRoot":"","sources":["../../scss/style.scss","../../scss/ueb-link.scss","../../scss/ueb-node.scss","../../scss/ueb-pin.scss","../../scss/ueb-type-color.scss","../../scss/ueb-ui-controls.scss","../../scss/ueb-window.scss"],"names":[],"mappings":"AAAA,WACI,qBACA,oBACA,IACI,kGAIR,WACI,qBACA,mBACA,IACI,sGAIR,WACI,qBACA,iBACA,IACI,gGAIR,cACI,eACA,6CACA,cACA,kBACA,8EACA,+BACA,WACA,iBAGJ,kBACI,iBAGJ,qBACI,aACA,kBACA,MACA,QACA,OACA,aACA,0BACA,UAGJ,mBACI,iBACA,iCACA,eAGJ,mBACI,kBACA,gCACA,gBACA,kBAGJ,oDACI,gBAGJ,UACI,kFACA,kBACA,eACA,gBACA,+DACA,gEACA,yBACA,iBAEI,s3BA0BJ,gBAEI,sZAQJ,sFACA,gEACA,oDACA,qBACA,gBAGJ,6CACI,gBAGJ,8CACI,eAGJ,6BACI,eAGJ,6BACI,mBAGJ,6BACI,kBAGJ,6BACI,mBAGJ,6BACI,iBAGJ,6BACI,mBAGJ,6BACI,kBAGJ,8BACI,mBAGJ,8BACI,kBAGJ,8BACI,mBAGJ,8BACI,iBACA,uDAGJ,0BACI,gCAGJ,8BACI,mBACA,uDAGJ,8BACI,sBACA,uDAGJ,8BACI,iBACA,uDAGJ,8BACI,sBACA,uDAGJ,8BACI,sBACA,uDAGJ,+BACI,iBACA,uDAGJ,+BACI,sBACA,uDAGJ,+BACI,sBACA,uDAGJ,kBACI,kBACA,QACA,SACA,wGAGJ,sBACI,QACA,SAGJ,yEACI,kBAGJ,aACI,cACA,kBACA,kBACA,MACA,OACA,QACA,SACA,iBAEI,wlDAmDJ,gBAEI,gQAWJ,oBAEI,wJAOJ,4BAGJ,gDACI,mBAIJ,eACI,mBAGJ,0BACI,mBACA,uBACA,gBCzUJ,SACI,kEAEA,wEACA,cACA,6CACA,8CAKA,kBAIJ,aACI,oEACA,kBACA,WACA,YACA,eACA,+FAGJ,kBACI,mBACA,6BACA,wCAGJ,gEAEI,wCACA,4BAGJ,kBACI,cACA,mBACA,kBACA,mDACA,qHAOA,sBACA,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ACA,YAGJ,wDACI,aACA,mBACA,kBAEA,4DACI,YAIR,kDACI,YAGJ,yDACI,oCAGJ,yDACI,oCAGJ,yDACI,oCAGJ,yDACI,oCAGJ,yDACI,oCAGJ,yDACI,oCAGJ,yDACI,oCAGJ,2BACI","file":"ueb-style.min.css"}
|
||||
304
dist/ueblueprint.js
vendored
304
dist/ueblueprint.js
vendored
@@ -90,6 +90,8 @@ class Configuration {
|
||||
begin: "ueb-tracking-mouse-begin",
|
||||
end: "ueb-tracking-mouse-end",
|
||||
}
|
||||
static windowApplyEventName = "ueb-window-apply"
|
||||
static windowCancelEventName = "ueb-window-cancel"
|
||||
static windowCloseEventName = "ueb-window-close"
|
||||
static ModifierKeys = [
|
||||
"Ctrl",
|
||||
@@ -215,12 +217,12 @@ class IInput {
|
||||
* @param {Blueprint} blueprint
|
||||
* @param {Object} options
|
||||
*/
|
||||
constructor(target, blueprint, options) {
|
||||
this.#target = target;
|
||||
this.#blueprint = blueprint;
|
||||
constructor(target, blueprint, options = {}) {
|
||||
options.consumeEvent ??= false;
|
||||
options.listenOnFocus ??= false;
|
||||
options.unlistenOnTextEdit ??= false;
|
||||
this.#target = target;
|
||||
this.#blueprint = blueprint;
|
||||
this.options = options;
|
||||
let self = this;
|
||||
this.listenHandler = _ => self.listenEvents();
|
||||
@@ -2136,14 +2138,15 @@ End Object\n`;
|
||||
|
||||
class Copy extends IInput {
|
||||
|
||||
static #serializer = new ObjectSerializer()
|
||||
|
||||
/** @type {(e: ClipboardEvent) => void} */
|
||||
#copyHandler
|
||||
|
||||
constructor(target, blueprint, options = {}) {
|
||||
options.listenOnFocus = true;
|
||||
options.unlistenOnTextEdit = true; // No nodes copy if inside a text field, just text (default behavior)
|
||||
options.listenOnFocus ??= true;
|
||||
options.unlistenOnTextEdit ??= true; // No nodes copy if inside a text field, just text (default behavior)
|
||||
super(target, blueprint, options);
|
||||
this.serializer = new ObjectSerializer();
|
||||
let self = this;
|
||||
this.#copyHandler = _ => self.copied();
|
||||
}
|
||||
@@ -2157,7 +2160,10 @@ class Copy extends IInput {
|
||||
}
|
||||
|
||||
copied() {
|
||||
const value = this.blueprint.getNodes(true).map(node => this.serializer.serialize(node.entity, false)).join("\n\n");
|
||||
const value = this.blueprint
|
||||
.getNodes(true)
|
||||
.map(node => Copy.#serializer.serialize(node.entity, false))
|
||||
.join("\n\n");
|
||||
navigator.clipboard.writeText(value);
|
||||
}
|
||||
}
|
||||
@@ -2344,9 +2350,9 @@ class KeyboardCanc extends IKeyboardShortcut {
|
||||
*/
|
||||
class IPointing extends IInput {
|
||||
|
||||
constructor(target, blueprint, options) {
|
||||
constructor(target, blueprint, options = {}) {
|
||||
options.ignoreTranslateCompensate ??= false;
|
||||
options.movementSpace ??= blueprint?.getGridDOMElement() ?? document.documentElement;
|
||||
options.movementSpace ??= blueprint.getGridDOMElement() ?? document.documentElement;
|
||||
super(target, blueprint, options);
|
||||
this.movementSpace = options.movementSpace;
|
||||
}
|
||||
@@ -3964,6 +3970,112 @@ class IDraggablePositionedTemplate extends IDraggableTemplate {
|
||||
}
|
||||
}
|
||||
|
||||
/** @typedef {import("../../Blueprint").default} Blueprint */
|
||||
|
||||
/**
|
||||
* @template {HTMLElement} T
|
||||
* @extends {IPointing<T>}
|
||||
*/
|
||||
class IMouseClick extends IPointing {
|
||||
|
||||
/** @type {(e: MouseEvent) => void} */
|
||||
#mouseDownHandler
|
||||
|
||||
/** @type {(e: MouseEvent) => void} */
|
||||
#mouseUpHandler
|
||||
|
||||
constructor(target, blueprint, options = {}) {
|
||||
options.clickButton ??= 0;
|
||||
options.consumeEvent ??= true;
|
||||
options.exitAnyButton ??= true;
|
||||
options.strictTarget ??= false;
|
||||
super(target, blueprint, options);
|
||||
this.clickedPosition = [0, 0];
|
||||
let self = this;
|
||||
|
||||
this.#mouseDownHandler = e => {
|
||||
self.blueprint.setFocused(true);
|
||||
switch (e.button) {
|
||||
case self.options.clickButton:
|
||||
// Either doesn't matter or consider the click only when clicking on the target, not descandants
|
||||
if (!self.options.strictTarget || e.target == e.currentTarget) {
|
||||
if (self.options.consumeEvent) {
|
||||
e.stopImmediatePropagation(); // Captured, don't call anyone else
|
||||
}
|
||||
// Attach the listeners
|
||||
document.addEventListener("mouseup", self.#mouseUpHandler);
|
||||
self.clickedPosition = self.locationFromEvent(e);
|
||||
self.clicked(self.clickedPosition);
|
||||
}
|
||||
break
|
||||
default:
|
||||
if (!self.options.exitAnyButton) {
|
||||
self.#mouseUpHandler(e);
|
||||
}
|
||||
break
|
||||
}
|
||||
};
|
||||
|
||||
this.#mouseUpHandler = e => {
|
||||
if (!self.options.exitAnyButton || e.button == self.options.clickButton) {
|
||||
if (self.options.consumeEvent) {
|
||||
e.stopImmediatePropagation(); // Captured, don't call anyone else
|
||||
}
|
||||
// Remove the handlers of "mousemove" and "mouseup"
|
||||
document.removeEventListener("mouseup", self.#mouseUpHandler);
|
||||
self.unclicked();
|
||||
}
|
||||
};
|
||||
|
||||
this.listenEvents();
|
||||
}
|
||||
|
||||
listenEvents() {
|
||||
this.target.addEventListener("mousedown", this.#mouseDownHandler);
|
||||
if (this.options.clickButton == 2) {
|
||||
this.target.addEventListener("contextmenu", e => e.preventDefault());
|
||||
}
|
||||
}
|
||||
|
||||
unlistenEvents() {
|
||||
this.target.removeEventListener("mousedown", this.#mouseDownHandler);
|
||||
}
|
||||
|
||||
/* Subclasses will override the following methods */
|
||||
clicked(location) {
|
||||
}
|
||||
|
||||
unclicked(location) {
|
||||
}
|
||||
}
|
||||
|
||||
class MouseClickAction extends IMouseClick {
|
||||
|
||||
static #ignoreEvent =
|
||||
/** @param {MouseClickAction} self */
|
||||
self => { }
|
||||
|
||||
constructor(
|
||||
target,
|
||||
blueprint,
|
||||
options,
|
||||
onMouseDown = MouseClickAction.#ignoreEvent,
|
||||
onMouseUp = MouseClickAction.#ignoreEvent
|
||||
) {
|
||||
super(target, blueprint, options);
|
||||
this.onMouseDown = onMouseDown;
|
||||
this.onMouseUp = onMouseUp;
|
||||
}
|
||||
|
||||
clicked() {
|
||||
this.onMouseDown(this);
|
||||
}
|
||||
|
||||
unclicked() {
|
||||
this.onMouseUp(this);
|
||||
}
|
||||
}
|
||||
|
||||
/** @typedef {import("../element/WindowElement").default} WindowElement */
|
||||
|
||||
/** @extends {IDraggablePositionedTemplate<WindowElement>} */
|
||||
@@ -3984,6 +4096,16 @@ class WindowTemplate extends IDraggablePositionedTemplate {
|
||||
})
|
||||
}
|
||||
|
||||
createInputObjects() {
|
||||
return [
|
||||
...super.createInputObjects(),
|
||||
new MouseClickAction(this.element.querySelector(".ueb-window-close"), this.element.blueprint, {},
|
||||
undefined,
|
||||
() => this.element.remove()
|
||||
),
|
||||
]
|
||||
}
|
||||
|
||||
render() {
|
||||
return $`
|
||||
<div class="ueb-window">
|
||||
@@ -4440,85 +4562,6 @@ class IInputPinTemplate extends PinTemplate {
|
||||
}
|
||||
}
|
||||
|
||||
/** @typedef {import("../../Blueprint").default} Blueprint */
|
||||
|
||||
/**
|
||||
* @template {HTMLElement} T
|
||||
* @extends {IPointing<T>}
|
||||
*/
|
||||
class IMouseClick extends IPointing {
|
||||
|
||||
/** @type {(e: MouseEvent) => void} */
|
||||
#mouseDownHandler
|
||||
|
||||
/** @type {(e: MouseEvent) => void} */
|
||||
#mouseUpHandler
|
||||
|
||||
constructor(target, blueprint, options = {}) {
|
||||
options.clickButton ??= 0;
|
||||
options.consumeEvent ??= true;
|
||||
options.exitAnyButton ??= true;
|
||||
options.strictTarget ??= false;
|
||||
super(target, blueprint, options);
|
||||
this.clickedPosition = [0, 0];
|
||||
let self = this;
|
||||
|
||||
this.#mouseDownHandler = e => {
|
||||
self.blueprint.setFocused(true);
|
||||
switch (e.button) {
|
||||
case self.options.clickButton:
|
||||
// Either doesn't matter or consider the click only when clicking on the target, not descandants
|
||||
if (!self.options.strictTarget || e.target == e.currentTarget) {
|
||||
if (self.options.consumeEvent) {
|
||||
e.stopImmediatePropagation(); // Captured, don't call anyone else
|
||||
}
|
||||
// Attach the listeners
|
||||
document.addEventListener("mouseup", self.#mouseUpHandler);
|
||||
self.clickedPosition = self.locationFromEvent(e);
|
||||
self.clicked(self.clickedPosition);
|
||||
}
|
||||
break
|
||||
default:
|
||||
if (!self.options.exitAnyButton) {
|
||||
self.#mouseUpHandler(e);
|
||||
}
|
||||
break
|
||||
}
|
||||
};
|
||||
|
||||
this.#mouseUpHandler = e => {
|
||||
if (!self.options.exitAnyButton || e.button == self.options.clickButton) {
|
||||
if (self.options.consumeEvent) {
|
||||
e.stopImmediatePropagation(); // Captured, don't call anyone else
|
||||
}
|
||||
// Remove the handlers of "mousemove" and "mouseup"
|
||||
document.removeEventListener("mouseup", self.#mouseUpHandler);
|
||||
self.unclicked();
|
||||
}
|
||||
};
|
||||
|
||||
this.listenEvents();
|
||||
}
|
||||
|
||||
listenEvents() {
|
||||
this.target.addEventListener("mousedown", this.#mouseDownHandler);
|
||||
if (this.options.clickButton == 2) {
|
||||
this.target.addEventListener("contextmenu", e => e.preventDefault());
|
||||
}
|
||||
}
|
||||
|
||||
unlistenEvents() {
|
||||
this.target.removeEventListener("mousedown", this.#mouseDownHandler);
|
||||
}
|
||||
|
||||
/* Subclasses will override the following methods */
|
||||
clicked(location) {
|
||||
}
|
||||
|
||||
unclicked(location) {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @template {WindowTemplate} T
|
||||
* @extends {IDraggableElement<Object, T>}
|
||||
@@ -4560,37 +4603,14 @@ class WindowElement extends IDraggableElement {
|
||||
this.dispatchCloseEvent();
|
||||
}
|
||||
|
||||
dispatchCloseEvent(value) {
|
||||
let deleteEvent = new CustomEvent(Configuration.windowCloseEventName, {
|
||||
bubbles: true,
|
||||
cancelable: true,
|
||||
});
|
||||
dispatchCloseEvent() {
|
||||
let deleteEvent = new CustomEvent(Configuration.windowCloseEventName);
|
||||
this.dispatchEvent(deleteEvent);
|
||||
}
|
||||
}
|
||||
|
||||
customElements.define("ueb-window", WindowElement);
|
||||
|
||||
/**
|
||||
* @template {HTMLElement} T
|
||||
* @extends {IMouseClick<T>}
|
||||
*/
|
||||
class MouseOpenWindow extends IMouseClick {
|
||||
|
||||
#window
|
||||
|
||||
clicked(location) {
|
||||
}
|
||||
|
||||
unclicked(location) {
|
||||
this.#window = new WindowElement({
|
||||
type: this.options.windowType,
|
||||
windowOptions: this.options.windowOptions,
|
||||
});
|
||||
this.blueprint.append(this.#window);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @typedef {import("../element/PinElement").default} PinElement
|
||||
* @typedef {import("../entity/LinearColorEntity").default} LinearColorEntity
|
||||
@@ -4601,6 +4621,9 @@ class LinearColorPinTemplate extends IInputPinTemplate {
|
||||
/** @type {HTMLInputElement} */
|
||||
#input
|
||||
|
||||
/** @type {WindowElement} */
|
||||
#window
|
||||
|
||||
/** @param {Map} changedProperties */
|
||||
firstUpdated(changedProperties) {
|
||||
super.firstUpdated(changedProperties);
|
||||
@@ -4610,16 +4633,29 @@ class LinearColorPinTemplate extends IInputPinTemplate {
|
||||
createInputObjects() {
|
||||
return [
|
||||
...super.createInputObjects(),
|
||||
new MouseOpenWindow(this.#input, this.element.blueprint, {
|
||||
moveEverywhere: true,
|
||||
windowType: ColorPickerWindowTemplate,
|
||||
windowOptions: {
|
||||
// The created window will use the following functions to get and set the color
|
||||
getPinColor: () => this.element.defaultValue,
|
||||
/** @param {LinearColorEntity} color */
|
||||
setPinColor: color => this.element.setDefaultValue(color),
|
||||
new MouseClickAction(this.#input, this.element.blueprint, undefined,
|
||||
inputInstance => {
|
||||
this.#window = new WindowElement({
|
||||
type: ColorPickerWindowTemplate,
|
||||
windowOptions: {
|
||||
// The created window will use the following functions to get and set the color
|
||||
getPinColor: () => this.element.defaultValue,
|
||||
/** @param {LinearColorEntity} color */
|
||||
setPinColor: color => this.element.setDefaultValue(color),
|
||||
},
|
||||
});
|
||||
this.element.blueprint.append(this.#window);
|
||||
const windowApplyHandler = () => {
|
||||
this.element.color = /** @type {ColorPickerWindowTemplate} */(this.#window.template).color;
|
||||
};
|
||||
const windowCloseHandler = () => {
|
||||
this.#window.removeEventListener(Configuration.windowApplyEventName, windowApplyHandler);
|
||||
this.#window.removeEventListener(Configuration.windowCloseEventName, windowCloseHandler);
|
||||
};
|
||||
this.#window.addEventListener(Configuration.windowApplyEventName, windowApplyHandler);
|
||||
this.#window.addEventListener(Configuration.windowCloseEventName, windowCloseHandler);
|
||||
},
|
||||
}),
|
||||
),
|
||||
]
|
||||
}
|
||||
|
||||
@@ -4635,7 +4671,7 @@ class LinearColorPinTemplate extends IInputPinTemplate {
|
||||
if (this.element.isInput()) {
|
||||
return $`
|
||||
<span class="ueb-pin-input" data-linear-color="${this.element.defaultValue.toString()}"
|
||||
style="--ueb-linear-color:rgba(${this.element.defaultValue.toString()})">
|
||||
style="--ueb-linear-color: rgba(${this.element.defaultValue.toString()})">
|
||||
</span>
|
||||
`
|
||||
}
|
||||
@@ -5132,6 +5168,7 @@ class ISelectableDraggableTemplate extends IDraggablePositionedTemplate {
|
||||
|
||||
/** @typedef {import("../element/NodeElement").default} NodeElement */
|
||||
|
||||
/** @extends {ISelectableDraggableTemplate<NodeElement>} */
|
||||
class NodeTemplate extends ISelectableDraggableTemplate {
|
||||
|
||||
toggleAdvancedDisplayHandler
|
||||
@@ -5342,19 +5379,13 @@ class NodeElement extends ISelectableDraggableElement {
|
||||
super.setLocation(value);
|
||||
}
|
||||
|
||||
dispatchDeleteEvent(value) {
|
||||
let deleteEvent = new CustomEvent(Configuration.nodeDeleteEventName, {
|
||||
bubbles: true,
|
||||
cancelable: true,
|
||||
});
|
||||
dispatchDeleteEvent() {
|
||||
let deleteEvent = new CustomEvent(Configuration.nodeDeleteEventName);
|
||||
this.dispatchEvent(deleteEvent);
|
||||
}
|
||||
|
||||
dispatchReflowEvent() {
|
||||
let reflowEvent = new CustomEvent(Configuration.nodeReflowEventName, {
|
||||
bubbles: true,
|
||||
cancelable: true
|
||||
});
|
||||
let reflowEvent = new CustomEvent(Configuration.nodeReflowEventName);
|
||||
this.dispatchEvent(reflowEvent);
|
||||
}
|
||||
|
||||
@@ -5371,14 +5402,15 @@ customElements.define("ueb-node", NodeElement);
|
||||
|
||||
class Paste extends IInput {
|
||||
|
||||
static #serializer = new ObjectSerializer()
|
||||
|
||||
/** @type {(e: ClipboardEvent) => void} */
|
||||
#pasteHandle
|
||||
|
||||
constructor(target, blueprint, options = {}) {
|
||||
options.listenOnFocus = true;
|
||||
options.unlistenOnTextEdit = true; // No nodes paste if inside a text field, just text (default behavior)
|
||||
options.listenOnFocus ??= true;
|
||||
options.unlistenOnTextEdit ??= true; // No nodes paste if inside a text field, just text (default behavior)
|
||||
super(target, blueprint, options);
|
||||
this.serializer = new ObjectSerializer();
|
||||
let self = this;
|
||||
this.#pasteHandle = e => self.pasted(e.clipboardData.getData("Text"));
|
||||
}
|
||||
@@ -5395,7 +5427,7 @@ class Paste extends IInput {
|
||||
let top = 0;
|
||||
let left = 0;
|
||||
let count = 0;
|
||||
let nodes = this.serializer.readMultiple(value).map(entity => {
|
||||
let nodes = Paste.#serializer.readMultiple(value).map(entity => {
|
||||
let node = new NodeElement(entity);
|
||||
top += node.locationY;
|
||||
left += node.locationX;
|
||||
|
||||
6
dist/ueblueprint.min.js
vendored
6
dist/ueblueprint.min.js
vendored
File diff suppressed because one or more lines are too long
@@ -66,6 +66,8 @@ export default class Configuration {
|
||||
begin: "ueb-tracking-mouse-begin",
|
||||
end: "ueb-tracking-mouse-end",
|
||||
}
|
||||
static windowApplyEventName = "ueb-window-apply"
|
||||
static windowCancelEventName = "ueb-window-cancel"
|
||||
static windowCloseEventName = "ueb-window-close"
|
||||
static ModifierKeys = [
|
||||
"Ctrl",
|
||||
|
||||
@@ -146,19 +146,13 @@ export default class NodeElement extends ISelectableDraggableElement {
|
||||
super.setLocation(value)
|
||||
}
|
||||
|
||||
dispatchDeleteEvent(value) {
|
||||
let deleteEvent = new CustomEvent(Configuration.nodeDeleteEventName, {
|
||||
bubbles: true,
|
||||
cancelable: true,
|
||||
})
|
||||
dispatchDeleteEvent() {
|
||||
let deleteEvent = new CustomEvent(Configuration.nodeDeleteEventName)
|
||||
this.dispatchEvent(deleteEvent)
|
||||
}
|
||||
|
||||
dispatchReflowEvent() {
|
||||
let reflowEvent = new CustomEvent(Configuration.nodeReflowEventName, {
|
||||
bubbles: true,
|
||||
cancelable: true
|
||||
})
|
||||
let reflowEvent = new CustomEvent(Configuration.nodeReflowEventName)
|
||||
this.dispatchEvent(reflowEvent)
|
||||
}
|
||||
|
||||
|
||||
@@ -44,11 +44,8 @@ export default class WindowElement extends IDraggableElement {
|
||||
this.dispatchCloseEvent()
|
||||
}
|
||||
|
||||
dispatchCloseEvent(value) {
|
||||
let deleteEvent = new CustomEvent(Configuration.windowCloseEventName, {
|
||||
bubbles: true,
|
||||
cancelable: true,
|
||||
})
|
||||
dispatchCloseEvent() {
|
||||
let deleteEvent = new CustomEvent(Configuration.windowCloseEventName)
|
||||
this.dispatchEvent(deleteEvent)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -25,12 +25,12 @@ export default class IInput {
|
||||
* @param {Blueprint} blueprint
|
||||
* @param {Object} options
|
||||
*/
|
||||
constructor(target, blueprint, options) {
|
||||
this.#target = target
|
||||
this.#blueprint = blueprint
|
||||
constructor(target, blueprint, options = {}) {
|
||||
options.consumeEvent ??= false
|
||||
options.listenOnFocus ??= false
|
||||
options.unlistenOnTextEdit ??= false
|
||||
this.#target = target
|
||||
this.#blueprint = blueprint
|
||||
this.options = options
|
||||
let self = this
|
||||
this.listenHandler = _ => self.listenEvents()
|
||||
|
||||
@@ -3,14 +3,15 @@ import ObjectSerializer from "../../serialization/ObjectSerializer"
|
||||
|
||||
export default class Copy extends IInput {
|
||||
|
||||
static #serializer = new ObjectSerializer()
|
||||
|
||||
/** @type {(e: ClipboardEvent) => void} */
|
||||
#copyHandler
|
||||
|
||||
constructor(target, blueprint, options = {}) {
|
||||
options.listenOnFocus = true
|
||||
options.unlistenOnTextEdit = true // No nodes copy if inside a text field, just text (default behavior)
|
||||
options.listenOnFocus ??= true
|
||||
options.unlistenOnTextEdit ??= true // No nodes copy if inside a text field, just text (default behavior)
|
||||
super(target, blueprint, options)
|
||||
this.serializer = new ObjectSerializer()
|
||||
let self = this
|
||||
this.#copyHandler = _ => self.copied()
|
||||
}
|
||||
@@ -24,7 +25,10 @@ export default class Copy extends IInput {
|
||||
}
|
||||
|
||||
copied() {
|
||||
const value = this.blueprint.getNodes(true).map(node => this.serializer.serialize(node.entity, false)).join("\n\n")
|
||||
const value = this.blueprint
|
||||
.getNodes(true)
|
||||
.map(node => Copy.#serializer.serialize(node.entity, false))
|
||||
.join("\n\n")
|
||||
navigator.clipboard.writeText(value)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,14 +4,15 @@ import ObjectSerializer from "../../serialization/ObjectSerializer"
|
||||
|
||||
export default class Paste extends IInput {
|
||||
|
||||
static #serializer = new ObjectSerializer()
|
||||
|
||||
/** @type {(e: ClipboardEvent) => void} */
|
||||
#pasteHandle
|
||||
|
||||
constructor(target, blueprint, options = {}) {
|
||||
options.listenOnFocus = true
|
||||
options.unlistenOnTextEdit = true // No nodes paste if inside a text field, just text (default behavior)
|
||||
options.listenOnFocus ??= true
|
||||
options.unlistenOnTextEdit ??= true // No nodes paste if inside a text field, just text (default behavior)
|
||||
super(target, blueprint, options)
|
||||
this.serializer = new ObjectSerializer()
|
||||
let self = this
|
||||
this.#pasteHandle = e => self.pasted(e.clipboardData.getData("Text"))
|
||||
}
|
||||
@@ -28,7 +29,7 @@ export default class Paste extends IInput {
|
||||
let top = 0
|
||||
let left = 0
|
||||
let count = 0
|
||||
let nodes = this.serializer.readMultiple(value).map(entity => {
|
||||
let nodes = Paste.#serializer.readMultiple(value).map(entity => {
|
||||
let node = new NodeElement(entity)
|
||||
top += node.locationY
|
||||
left += node.locationX
|
||||
|
||||
@@ -9,9 +9,9 @@ import Utility from "../../Utility"
|
||||
*/
|
||||
export default class IPointing extends IInput {
|
||||
|
||||
constructor(target, blueprint, options) {
|
||||
constructor(target, blueprint, options = {}) {
|
||||
options.ignoreTranslateCompensate ??= false
|
||||
options.movementSpace ??= blueprint?.getGridDOMElement() ?? document.documentElement
|
||||
options.movementSpace ??= blueprint.getGridDOMElement() ?? document.documentElement
|
||||
super(target, blueprint, options)
|
||||
this.movementSpace = options.movementSpace
|
||||
}
|
||||
|
||||
28
js/input/mouse/MouseClickAction.js
Normal file
28
js/input/mouse/MouseClickAction.js
Normal file
@@ -0,0 +1,28 @@
|
||||
import IMouseClick from "./IMouseClick"
|
||||
|
||||
export default class MouseClickAction extends IMouseClick {
|
||||
|
||||
static #ignoreEvent =
|
||||
/** @param {MouseClickAction} self */
|
||||
self => { }
|
||||
|
||||
constructor(
|
||||
target,
|
||||
blueprint,
|
||||
options,
|
||||
onMouseDown = MouseClickAction.#ignoreEvent,
|
||||
onMouseUp = MouseClickAction.#ignoreEvent
|
||||
) {
|
||||
super(target, blueprint, options)
|
||||
this.onMouseDown = onMouseDown
|
||||
this.onMouseUp = onMouseUp
|
||||
}
|
||||
|
||||
clicked() {
|
||||
this.onMouseDown(this)
|
||||
}
|
||||
|
||||
unclicked() {
|
||||
this.onMouseUp(this)
|
||||
}
|
||||
}
|
||||
@@ -1,22 +0,0 @@
|
||||
import IMouseClick from "./IMouseClick"
|
||||
import WindowElement from "../../element/WindowElement"
|
||||
|
||||
/**
|
||||
* @template {HTMLElement} T
|
||||
* @extends {IMouseClick<T>}
|
||||
*/
|
||||
export default class MouseOpenWindow extends IMouseClick {
|
||||
|
||||
#window
|
||||
|
||||
clicked(location) {
|
||||
}
|
||||
|
||||
unclicked(location) {
|
||||
this.#window = new WindowElement({
|
||||
type: this.options.windowType,
|
||||
windowOptions: this.options.windowOptions,
|
||||
})
|
||||
this.blueprint.append(this.#window)
|
||||
}
|
||||
}
|
||||
@@ -1,7 +1,9 @@
|
||||
import { html } from "lit"
|
||||
import ColorPickerWindowTemplate from "./ColorPickerWindowTemplate"
|
||||
import Configuration from "../Configuration"
|
||||
import IInputPinTemplate from "./IInputPinTemplate"
|
||||
import MouseOpenWindow from "../input/mouse/MouseOpenWindow"
|
||||
import MouseClickAction from "../input/mouse/MouseClickAction"
|
||||
import WindowElement from "../element/WindowElement"
|
||||
|
||||
/**
|
||||
* @typedef {import("../element/PinElement").default} PinElement
|
||||
@@ -13,6 +15,9 @@ export default class LinearColorPinTemplate extends IInputPinTemplate {
|
||||
/** @type {HTMLInputElement} */
|
||||
#input
|
||||
|
||||
/** @type {WindowElement} */
|
||||
#window
|
||||
|
||||
/** @param {Map} changedProperties */
|
||||
firstUpdated(changedProperties) {
|
||||
super.firstUpdated(changedProperties)
|
||||
@@ -22,16 +27,30 @@ export default class LinearColorPinTemplate extends IInputPinTemplate {
|
||||
createInputObjects() {
|
||||
return [
|
||||
...super.createInputObjects(),
|
||||
new MouseOpenWindow(this.#input, this.element.blueprint, {
|
||||
moveEverywhere: true,
|
||||
windowType: ColorPickerWindowTemplate,
|
||||
windowOptions: {
|
||||
// The created window will use the following functions to get and set the color
|
||||
getPinColor: () => this.element.defaultValue,
|
||||
/** @param {LinearColorEntity} color */
|
||||
setPinColor: color => this.element.setDefaultValue(color),
|
||||
new MouseClickAction(this.#input, this.element.blueprint, undefined,
|
||||
inputInstance => {
|
||||
this.#window = new WindowElement({
|
||||
type: ColorPickerWindowTemplate,
|
||||
windowOptions: {
|
||||
// The created window will use the following functions to get and set the color
|
||||
getPinColor: () => this.element.defaultValue,
|
||||
/** @param {LinearColorEntity} color */
|
||||
setPinColor: color => this.element.setDefaultValue(color),
|
||||
},
|
||||
})
|
||||
this.element.blueprint.append(this.#window)
|
||||
const windowApplyHandler = () => {
|
||||
this.element.color = /** @type {ColorPickerWindowTemplate} */(this.#window.template).color
|
||||
}
|
||||
const windowCloseHandler = () => {
|
||||
this.#window.removeEventListener(Configuration.windowApplyEventName, windowApplyHandler)
|
||||
this.#window.removeEventListener(Configuration.windowCloseEventName, windowCloseHandler)
|
||||
this.#window = null
|
||||
}
|
||||
this.#window.addEventListener(Configuration.windowApplyEventName, windowApplyHandler)
|
||||
this.#window.addEventListener(Configuration.windowCloseEventName, windowCloseHandler)
|
||||
},
|
||||
}),
|
||||
),
|
||||
]
|
||||
}
|
||||
|
||||
@@ -47,7 +66,7 @@ export default class LinearColorPinTemplate extends IInputPinTemplate {
|
||||
if (this.element.isInput()) {
|
||||
return html`
|
||||
<span class="ueb-pin-input" data-linear-color="${this.element.defaultValue.toString()}"
|
||||
style="--ueb-linear-color:rgba(${this.element.defaultValue.toString()})">
|
||||
style="--ueb-linear-color: rgba(${this.element.defaultValue.toString()})">
|
||||
</span>
|
||||
`
|
||||
}
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
import { html, nothing } from "lit"
|
||||
import PinElement from "../element/PinElement"
|
||||
import ISelectableDraggableTemplate from "./ISelectableDraggableTemplate"
|
||||
import PinElement from "../element/PinElement"
|
||||
|
||||
/** @typedef {import("../element/NodeElement").default} NodeElement */
|
||||
|
||||
/** @extends {ISelectableDraggableTemplate<NodeElement>} */
|
||||
export default class NodeTemplate extends ISelectableDraggableTemplate {
|
||||
|
||||
toggleAdvancedDisplayHandler
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import { html } from "lit"
|
||||
import IDraggablePositionedTemplate from "./IDraggablePositionedTemplate"
|
||||
import MouseClickAction from "../input/mouse/MouseClickAction"
|
||||
import MouseMoveDraggable from "../input/mouse/MouseMoveDraggable"
|
||||
|
||||
/** @typedef {import("../element/WindowElement").default} WindowElement */
|
||||
@@ -22,6 +23,16 @@ export default class WindowTemplate extends IDraggablePositionedTemplate {
|
||||
})
|
||||
}
|
||||
|
||||
createInputObjects() {
|
||||
return [
|
||||
...super.createInputObjects(),
|
||||
new MouseClickAction(this.element.querySelector(".ueb-window-close"), this.element.blueprint, {},
|
||||
undefined,
|
||||
() => this.element.remove()
|
||||
),
|
||||
]
|
||||
}
|
||||
|
||||
render() {
|
||||
return html`
|
||||
<div class="ueb-window">
|
||||
|
||||
@@ -36,6 +36,7 @@ ueb-window {
|
||||
padding: 8px;
|
||||
height: 12px;
|
||||
width: 12px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.ueb-color-picker-theme,
|
||||
|
||||
Reference in New Issue
Block a user