@nine-lab/nine-mu 0.1.51 → 0.1.53
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/nine-mu.js +5 -95
- package/dist/nine-mu.js.map +1 -1
- package/dist/nine-mu.umd.js +1 -1
- package/dist/nine-mu.umd.js.map +1 -1
- package/package.json +1 -1
- package/src/index.js +1 -2
- package/src/components/NineDialog.js +0 -100
package/dist/nine-mu.js
CHANGED
|
@@ -9,7 +9,7 @@ var __privateGet = (obj, member, getter) => (__accessCheck(obj, member, "read fr
|
|
|
9
9
|
var __privateAdd = (obj, member, value) => member.has(obj) ? __typeError("Cannot add the same private member more than once") : member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
|
|
10
10
|
var __privateSet = (obj, member, value, setter) => (__accessCheck(obj, member, "write to private field"), setter ? setter.call(obj, value) : member.set(obj, value), value);
|
|
11
11
|
var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "access private method"), method);
|
|
12
|
-
var _getSourcePath, _service, _routes, _diffPopup, _NineChat_instances, initInteractions_fn, initActions_fn, render_fn, _asisEditorView, _tobeEditorView, _asisEditorEl, _tobeEditorEl, _languageCompartment, _isScrollSyncActive, _initCodeMirror, _setupScrollSync, _applyDiffDecorations, _dialog, _diffView, _resolve, _asisBackup, _NineDiffPopup_instances, handleConfirm_fn, handleCancel_fn
|
|
12
|
+
var _getSourcePath, _service, _routes, _diffPopup, _NineChat_instances, initInteractions_fn, initActions_fn, render_fn, _asisEditorView, _tobeEditorView, _asisEditorEl, _tobeEditorEl, _languageCompartment, _isScrollSyncActive, _initCodeMirror, _setupScrollSync, _applyDiffDecorations, _dialog, _diffView, _resolve, _asisBackup, _NineDiffPopup_instances, handleConfirm_fn, handleCancel_fn;
|
|
13
13
|
import { trace, api, nine } from "@nine-lab/nine-util";
|
|
14
14
|
class NineMuService {
|
|
15
15
|
constructor(connectorUrl) {
|
|
@@ -183,7 +183,7 @@ render_fn = function() {
|
|
|
183
183
|
const customImport = this.getAttribute("css-path") ? `@import "${this.getAttribute("css-path")}";` : "";
|
|
184
184
|
this.shadowRoot.innerHTML = `
|
|
185
185
|
<style>
|
|
186
|
-
@import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-mu@${"0.1.
|
|
186
|
+
@import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-mu@${"0.1.52"}/dist/css/nine-mu.css";
|
|
187
187
|
${customImport}
|
|
188
188
|
</style>
|
|
189
189
|
<div class="wrapper">
|
|
@@ -26396,7 +26396,7 @@ class NineDiff extends HTMLElement {
|
|
|
26396
26396
|
const customImport = this.getAttribute("css-path") ? `@import "${this.getAttribute("css-path")}";` : "";
|
|
26397
26397
|
this.shadowRoot.innerHTML = `
|
|
26398
26398
|
<style>
|
|
26399
|
-
@import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-mu@${"0.1.
|
|
26399
|
+
@import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-mu@${"0.1.52"}/dist/css/nine-mu.css";
|
|
26400
26400
|
${customImport}
|
|
26401
26401
|
</style>
|
|
26402
26402
|
|
|
@@ -26461,7 +26461,7 @@ class NineDiffPopup extends HTMLElement {
|
|
|
26461
26461
|
const customImport = this.getAttribute("css-path") ? `@import "${this.getAttribute("css-path")}";` : "";
|
|
26462
26462
|
this.shadowRoot.innerHTML = `
|
|
26463
26463
|
<style>
|
|
26464
|
-
@import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-mu@${"0.1.
|
|
26464
|
+
@import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-mu@${"0.1.52"}/dist/css/nine-mu.css";
|
|
26465
26465
|
${customImport}
|
|
26466
26466
|
</style>
|
|
26467
26467
|
|
|
@@ -26538,104 +26538,14 @@ handleCancel_fn = function() {
|
|
|
26538
26538
|
this.remove();
|
|
26539
26539
|
};
|
|
26540
26540
|
customElements.define("nine-diff-popup", NineDiffPopup);
|
|
26541
|
-
class NineDialog extends HTMLElement {
|
|
26542
|
-
constructor() {
|
|
26543
|
-
super();
|
|
26544
|
-
__privateAdd(this, _dialog2);
|
|
26545
|
-
__privateAdd(this, _shift);
|
|
26546
|
-
__publicField(this, "showModal", () => {
|
|
26547
|
-
__privateGet(this, _dialog2).showModal();
|
|
26548
|
-
});
|
|
26549
|
-
__publicField(this, "close", () => {
|
|
26550
|
-
__privateGet(this, _dialog2).close();
|
|
26551
|
-
this.remove();
|
|
26552
|
-
});
|
|
26553
|
-
__privateAdd(this, _init, () => {
|
|
26554
|
-
const closeBtn = this.shadowRoot.querySelector(".close");
|
|
26555
|
-
closeBtn.addEventListener("click", () => {
|
|
26556
|
-
__privateGet(this, _dialog2).classList.add("out");
|
|
26557
|
-
setTimeout(() => this.close(), 200);
|
|
26558
|
-
});
|
|
26559
|
-
const head = this.shadowRoot.querySelector(".head");
|
|
26560
|
-
head.addEventListener("mousedown", __privateGet(this, _onMouseDown));
|
|
26561
|
-
});
|
|
26562
|
-
// 드래그 로직 이식 시 querySelector 대신 this.#dialog 사용
|
|
26563
|
-
__privateAdd(this, _onMouseDown, (e) => {
|
|
26564
|
-
var rect = __privateGet(this, _dialog2).getBoundingClientRect();
|
|
26565
|
-
__privateSet(this, _shift, { x: e.clientX - rect.x, y: e.clientY - rect.y });
|
|
26566
|
-
document.addEventListener("mousemove", __privateGet(this, _onMouseMove));
|
|
26567
|
-
document.addEventListener("mouseup", __privateGet(this, _onMouseUp));
|
|
26568
|
-
});
|
|
26569
|
-
__privateAdd(this, _onMouseMove, (e) => {
|
|
26570
|
-
__privateGet(this, _dialog2).style.position = "fixed";
|
|
26571
|
-
__privateGet(this, _dialog2).style.left = `${e.pageX - __privateGet(this, _shift).x}px`;
|
|
26572
|
-
__privateGet(this, _dialog2).style.top = `${e.pageY - __privateGet(this, _shift).y}px`;
|
|
26573
|
-
__privateGet(this, _dialog2).style.margin = "0";
|
|
26574
|
-
});
|
|
26575
|
-
__privateAdd(this, _onMouseUp, () => {
|
|
26576
|
-
document.removeEventListener("mousemove", __privateGet(this, _onMouseMove));
|
|
26577
|
-
document.removeEventListener("mouseup", __privateGet(this, _onMouseUp));
|
|
26578
|
-
});
|
|
26579
|
-
this.attachShadow({ mode: "open" });
|
|
26580
|
-
}
|
|
26581
|
-
connectedCallback() {
|
|
26582
|
-
this.render();
|
|
26583
|
-
__privateGet(this, _init).call(this);
|
|
26584
|
-
}
|
|
26585
|
-
render() {
|
|
26586
|
-
this.shadowRoot.innerHTML = `
|
|
26587
|
-
<style>
|
|
26588
|
-
@import "https://cdn.jsdelivr.net/npm/ninegrid2@${ninegrid.version}/dist/css/nxDialog.css";
|
|
26589
|
-
/* 커스텀 스타일 경로 로직 유지 */
|
|
26590
|
-
${ninegrid.getCustomPath(this, "nxDialog.css") || ""}
|
|
26591
|
-
|
|
26592
|
-
:host { display: contents; }
|
|
26593
|
-
dialog { padding: 0; border: none; border-radius: 8px; box-shadow: 0 10px 25px rgba(0,0,0,0.2); }
|
|
26594
|
-
.contents { display: flex; flex-direction: column; min-width: 600px; min-height: 400px; }
|
|
26595
|
-
.body { flex: 1; overflow: auto; padding: 10px; }
|
|
26596
|
-
.head { cursor: move; user-select: none; }
|
|
26597
|
-
/* 애니메이션 처리용 */
|
|
26598
|
-
dialog.out { opacity: 0; transform: scale(0.9); transition: 0.3s; }
|
|
26599
|
-
</style>
|
|
26600
|
-
|
|
26601
|
-
<dialog>
|
|
26602
|
-
<div class="head">
|
|
26603
|
-
<span class="title">Details</span>
|
|
26604
|
-
<buttons>
|
|
26605
|
-
<button class="close">×</button>
|
|
26606
|
-
</buttons>
|
|
26607
|
-
</div>
|
|
26608
|
-
<div class="contents">
|
|
26609
|
-
<div class="body">
|
|
26610
|
-
<slot></slot>
|
|
26611
|
-
</div>
|
|
26612
|
-
</div>
|
|
26613
|
-
</dialog>
|
|
26614
|
-
`;
|
|
26615
|
-
__privateSet(this, _dialog2, this.shadowRoot.querySelector("dialog"));
|
|
26616
|
-
}
|
|
26617
|
-
// 외부에서 타이틀을 바꿀 수 있게 제공
|
|
26618
|
-
setTitle(text) {
|
|
26619
|
-
const titleEl = this.shadowRoot.querySelector(".title");
|
|
26620
|
-
if (titleEl) titleEl.textContent = text;
|
|
26621
|
-
}
|
|
26622
|
-
}
|
|
26623
|
-
_dialog2 = new WeakMap();
|
|
26624
|
-
_shift = new WeakMap();
|
|
26625
|
-
_init = new WeakMap();
|
|
26626
|
-
_onMouseDown = new WeakMap();
|
|
26627
|
-
_onMouseMove = new WeakMap();
|
|
26628
|
-
_onMouseUp = new WeakMap();
|
|
26629
|
-
if (!customElements.get("nine-dialog")) ;
|
|
26630
26541
|
const NineMu = {
|
|
26631
|
-
version: "0.1.
|
|
26542
|
+
version: "0.1.52",
|
|
26632
26543
|
init: (config) => {
|
|
26633
26544
|
trace.log("🛠️ Nine-Mu Engine initialized", config);
|
|
26634
26545
|
}
|
|
26635
26546
|
};
|
|
26636
26547
|
export {
|
|
26637
26548
|
NineChat,
|
|
26638
|
-
NineDialog,
|
|
26639
26549
|
NineDiff,
|
|
26640
26550
|
NineDiffPopup,
|
|
26641
26551
|
NineMu,
|