ninegrid2 6.828.0 → 6.830.0

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.
@@ -121190,7 +121190,13 @@ class nxSplitter extends HTMLElement {
121190
121190
  pointerEvents: "none"
121191
121191
  });
121192
121192
 
121193
- const parent = this.getRootNode().host || this.parentElement;
121193
+ const root = this.getRootNode();
121194
+ const parent =
121195
+ root instanceof ShadowRoot ? root.host :
121196
+ this.parentElement || document.body; // fallback 처리까지 포함
121197
+
121198
+
121199
+ //const parent = this.getRootNode().host || this.parentElement;
121194
121200
  const prev = this.previousElementSibling;
121195
121201
  const next = this.nextElementSibling;
121196
121202
 
@@ -121219,12 +121225,7 @@ class nxSplitter extends HTMLElement {
121219
121225
  console.log(parent);
121220
121226
 
121221
121227
  // 👇 부모 노드 기준으로 삽입
121222
- if (parent instanceof ShadowRoot) {
121223
- parent.host.appendChild(dragBar); // 또는 별도의 overlay container로
121224
- }
121225
- else {
121226
- parent.appendChild(dragBar);
121227
- }
121228
+ (parent.shadowRoot || parent).appendChild(dragBar);
121228
121229
 
121229
121230
 
121230
121231
  const min = this.#mode === "h" ? prevRect.left : prevRect.top;
@@ -121186,7 +121186,13 @@ class nxSplitter extends HTMLElement {
121186
121186
  pointerEvents: "none"
121187
121187
  });
121188
121188
 
121189
- const parent = this.getRootNode().host || this.parentElement;
121189
+ const root = this.getRootNode();
121190
+ const parent =
121191
+ root instanceof ShadowRoot ? root.host :
121192
+ this.parentElement || document.body; // fallback 처리까지 포함
121193
+
121194
+
121195
+ //const parent = this.getRootNode().host || this.parentElement;
121190
121196
  const prev = this.previousElementSibling;
121191
121197
  const next = this.nextElementSibling;
121192
121198
 
@@ -121215,12 +121221,7 @@ class nxSplitter extends HTMLElement {
121215
121221
  console.log(parent);
121216
121222
 
121217
121223
  // 👇 부모 노드 기준으로 삽입
121218
- if (parent instanceof ShadowRoot) {
121219
- parent.host.appendChild(dragBar); // 또는 별도의 overlay container로
121220
- }
121221
- else {
121222
- parent.appendChild(dragBar);
121223
- }
121224
+ (parent.shadowRoot || parent).appendChild(dragBar);
121224
121225
 
121225
121226
 
121226
121227
  const min = this.#mode === "h" ? prevRect.left : prevRect.top;
@@ -45,7 +45,13 @@ class nxSplitter extends HTMLElement {
45
45
  pointerEvents: "none"
46
46
  });
47
47
 
48
- const parent = this.getRootNode().host || this.parentElement;
48
+ const root = this.getRootNode();
49
+ const parent =
50
+ root instanceof ShadowRoot ? root.host :
51
+ this.parentElement || document.body; // fallback 처리까지 포함
52
+
53
+
54
+ //const parent = this.getRootNode().host || this.parentElement;
49
55
  const prev = this.previousElementSibling;
50
56
  const next = this.nextElementSibling;
51
57
 
@@ -74,12 +80,7 @@ class nxSplitter extends HTMLElement {
74
80
  console.log(parent);
75
81
 
76
82
  // 👇 부모 노드 기준으로 삽입
77
- if (parent instanceof ShadowRoot) {
78
- parent.host.appendChild(dragBar); // 또는 별도의 overlay container로
79
- }
80
- else {
81
- parent.appendChild(dragBar);
82
- }
83
+ (parent.shadowRoot || parent).appendChild(dragBar);
83
84
 
84
85
 
85
86
  const min = this.#mode === "h" ? prevRect.left : prevRect.top;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "ninegrid2",
3
3
  "type": "module",
4
- "version": "6.828.0",
4
+ "version": "6.830.0",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
7
7
  "exports": {
@@ -45,7 +45,13 @@ class nxSplitter extends HTMLElement {
45
45
  pointerEvents: "none"
46
46
  });
47
47
 
48
- const parent = this.getRootNode().host || this.parentElement;
48
+ const root = this.getRootNode();
49
+ const parent =
50
+ root instanceof ShadowRoot ? root.host :
51
+ this.parentElement || document.body; // fallback 처리까지 포함
52
+
53
+
54
+ //const parent = this.getRootNode().host || this.parentElement;
49
55
  const prev = this.previousElementSibling;
50
56
  const next = this.nextElementSibling;
51
57
 
@@ -74,12 +80,7 @@ class nxSplitter extends HTMLElement {
74
80
  console.log(parent);
75
81
 
76
82
  // 👇 부모 노드 기준으로 삽입
77
- if (parent instanceof ShadowRoot) {
78
- parent.host.appendChild(dragBar); // 또는 별도의 overlay container로
79
- }
80
- else {
81
- parent.appendChild(dragBar);
82
- }
83
+ (parent.shadowRoot || parent).appendChild(dragBar);
83
84
 
84
85
 
85
86
  const min = this.#mode === "h" ? prevRect.left : prevRect.top;