ninegrid2 6.164.0 → 6.166.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.
- package/dist/bundle.cjs.js +14 -18
- package/dist/bundle.esm.js +14 -18
- package/dist/utils/ninegrid.js +14 -18
- package/package.json +1 -1
- package/src/utils/ninegrid.js +14 -18
package/dist/bundle.cjs.js
CHANGED
|
@@ -10730,28 +10730,24 @@ class ninegrid {
|
|
|
10730
10730
|
if (!("shadow" in Element.prototype)) {
|
|
10731
10731
|
Object.defineProperty(Element.prototype, "shadow", {
|
|
10732
10732
|
get: function () {
|
|
10733
|
-
|
|
10734
|
-
|
|
10735
|
-
|
|
10736
|
-
return function (selector) {
|
|
10737
|
-
console.log(selector);
|
|
10738
|
-
return "xx";
|
|
10739
|
-
/**
|
|
10740
|
-
let currentElement = this;
|
|
10733
|
+
return {
|
|
10734
|
+
closest: function (selector) {
|
|
10735
|
+
let currentElement = this;
|
|
10741
10736
|
|
|
10742
|
-
|
|
10743
|
-
|
|
10737
|
+
while (currentElement) {
|
|
10738
|
+
if (currentElement.matches(selector)) return currentElement;
|
|
10744
10739
|
|
|
10745
|
-
|
|
10746
|
-
|
|
10747
|
-
|
|
10748
|
-
|
|
10749
|
-
|
|
10740
|
+
// ✅ Shadow Root를 가지고 있는 경우 내부에서 탐색
|
|
10741
|
+
if (currentElement.shadowRoot) {
|
|
10742
|
+
const found = currentElement.shadowRoot.querySelector(selector);
|
|
10743
|
+
if (found) return found;
|
|
10744
|
+
}
|
|
10750
10745
|
|
|
10751
|
-
|
|
10752
|
-
|
|
10746
|
+
currentElement = currentElement.getRootNode()?.host || null; // ✅ Shadow DOM 내부 탐색
|
|
10747
|
+
}
|
|
10753
10748
|
|
|
10754
|
-
|
|
10749
|
+
return null;
|
|
10750
|
+
},
|
|
10755
10751
|
};
|
|
10756
10752
|
}
|
|
10757
10753
|
});
|
package/dist/bundle.esm.js
CHANGED
|
@@ -10728,28 +10728,24 @@ class ninegrid {
|
|
|
10728
10728
|
if (!("shadow" in Element.prototype)) {
|
|
10729
10729
|
Object.defineProperty(Element.prototype, "shadow", {
|
|
10730
10730
|
get: function () {
|
|
10731
|
-
|
|
10732
|
-
|
|
10733
|
-
|
|
10734
|
-
return function (selector) {
|
|
10735
|
-
console.log(selector);
|
|
10736
|
-
return "xx";
|
|
10737
|
-
/**
|
|
10738
|
-
let currentElement = this;
|
|
10731
|
+
return {
|
|
10732
|
+
closest: function (selector) {
|
|
10733
|
+
let currentElement = this;
|
|
10739
10734
|
|
|
10740
|
-
|
|
10741
|
-
|
|
10735
|
+
while (currentElement) {
|
|
10736
|
+
if (currentElement.matches(selector)) return currentElement;
|
|
10742
10737
|
|
|
10743
|
-
|
|
10744
|
-
|
|
10745
|
-
|
|
10746
|
-
|
|
10747
|
-
|
|
10738
|
+
// ✅ Shadow Root를 가지고 있는 경우 내부에서 탐색
|
|
10739
|
+
if (currentElement.shadowRoot) {
|
|
10740
|
+
const found = currentElement.shadowRoot.querySelector(selector);
|
|
10741
|
+
if (found) return found;
|
|
10742
|
+
}
|
|
10748
10743
|
|
|
10749
|
-
|
|
10750
|
-
|
|
10744
|
+
currentElement = currentElement.getRootNode()?.host || null; // ✅ Shadow DOM 내부 탐색
|
|
10745
|
+
}
|
|
10751
10746
|
|
|
10752
|
-
|
|
10747
|
+
return null;
|
|
10748
|
+
},
|
|
10753
10749
|
};
|
|
10754
10750
|
}
|
|
10755
10751
|
});
|
package/dist/utils/ninegrid.js
CHANGED
|
@@ -24,28 +24,24 @@ export class ninegrid {
|
|
|
24
24
|
if (!("shadow" in Element.prototype)) {
|
|
25
25
|
Object.defineProperty(Element.prototype, "shadow", {
|
|
26
26
|
get: function () {
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
return function (selector) {
|
|
31
|
-
console.log(selector);
|
|
32
|
-
return "xx";
|
|
33
|
-
/**
|
|
34
|
-
let currentElement = this;
|
|
27
|
+
return {
|
|
28
|
+
closest: function (selector) {
|
|
29
|
+
let currentElement = this;
|
|
35
30
|
|
|
36
|
-
|
|
37
|
-
|
|
31
|
+
while (currentElement) {
|
|
32
|
+
if (currentElement.matches(selector)) return currentElement;
|
|
38
33
|
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
34
|
+
// ✅ Shadow Root를 가지고 있는 경우 내부에서 탐색
|
|
35
|
+
if (currentElement.shadowRoot) {
|
|
36
|
+
const found = currentElement.shadowRoot.querySelector(selector);
|
|
37
|
+
if (found) return found;
|
|
38
|
+
}
|
|
44
39
|
|
|
45
|
-
|
|
46
|
-
|
|
40
|
+
currentElement = currentElement.getRootNode()?.host || null; // ✅ Shadow DOM 내부 탐색
|
|
41
|
+
}
|
|
47
42
|
|
|
48
|
-
|
|
43
|
+
return null;
|
|
44
|
+
},
|
|
49
45
|
};
|
|
50
46
|
}
|
|
51
47
|
});
|
package/package.json
CHANGED
package/src/utils/ninegrid.js
CHANGED
|
@@ -24,28 +24,24 @@ export class ninegrid {
|
|
|
24
24
|
if (!("shadow" in Element.prototype)) {
|
|
25
25
|
Object.defineProperty(Element.prototype, "shadow", {
|
|
26
26
|
get: function () {
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
return function (selector) {
|
|
31
|
-
console.log(selector);
|
|
32
|
-
return "xx";
|
|
33
|
-
/**
|
|
34
|
-
let currentElement = this;
|
|
27
|
+
return {
|
|
28
|
+
closest: function (selector) {
|
|
29
|
+
let currentElement = this;
|
|
35
30
|
|
|
36
|
-
|
|
37
|
-
|
|
31
|
+
while (currentElement) {
|
|
32
|
+
if (currentElement.matches(selector)) return currentElement;
|
|
38
33
|
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
34
|
+
// ✅ Shadow Root를 가지고 있는 경우 내부에서 탐색
|
|
35
|
+
if (currentElement.shadowRoot) {
|
|
36
|
+
const found = currentElement.shadowRoot.querySelector(selector);
|
|
37
|
+
if (found) return found;
|
|
38
|
+
}
|
|
44
39
|
|
|
45
|
-
|
|
46
|
-
|
|
40
|
+
currentElement = currentElement.getRootNode()?.host || null; // ✅ Shadow DOM 내부 탐색
|
|
41
|
+
}
|
|
47
42
|
|
|
48
|
-
|
|
43
|
+
return null;
|
|
44
|
+
},
|
|
49
45
|
};
|
|
50
46
|
}
|
|
51
47
|
});
|