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.
@@ -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
- console.log("get");
10734
- //const style = window.getComputedStyle(this);
10735
- //console.log(this, style.display, style.visibility, style.opacity);
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
- while (currentElement) {
10743
- if (currentElement.matches(selector)) return currentElement;
10737
+ while (currentElement) {
10738
+ if (currentElement.matches(selector)) return currentElement;
10744
10739
 
10745
- // ✅ Shadow Root를 가지고 있는 경우 내부에서 탐색
10746
- if (currentElement.shadowRoot) {
10747
- const found = currentElement.shadowRoot.querySelector(selector);
10748
- if (found) return found;
10749
- }
10740
+ // ✅ Shadow Root를 가지고 있는 경우 내부에서 탐색
10741
+ if (currentElement.shadowRoot) {
10742
+ const found = currentElement.shadowRoot.querySelector(selector);
10743
+ if (found) return found;
10744
+ }
10750
10745
 
10751
- currentElement = currentElement.getRootNode()?.host || null; // ✅ Shadow DOM 내부 탐색
10752
- }
10746
+ currentElement = currentElement.getRootNode()?.host || null; // ✅ Shadow DOM 내부 탐색
10747
+ }
10753
10748
 
10754
- return null; */
10749
+ return null;
10750
+ },
10755
10751
  };
10756
10752
  }
10757
10753
  });
@@ -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
- console.log("get");
10732
- //const style = window.getComputedStyle(this);
10733
- //console.log(this, style.display, style.visibility, style.opacity);
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
- while (currentElement) {
10741
- if (currentElement.matches(selector)) return currentElement;
10735
+ while (currentElement) {
10736
+ if (currentElement.matches(selector)) return currentElement;
10742
10737
 
10743
- // ✅ Shadow Root를 가지고 있는 경우 내부에서 탐색
10744
- if (currentElement.shadowRoot) {
10745
- const found = currentElement.shadowRoot.querySelector(selector);
10746
- if (found) return found;
10747
- }
10738
+ // ✅ Shadow Root를 가지고 있는 경우 내부에서 탐색
10739
+ if (currentElement.shadowRoot) {
10740
+ const found = currentElement.shadowRoot.querySelector(selector);
10741
+ if (found) return found;
10742
+ }
10748
10743
 
10749
- currentElement = currentElement.getRootNode()?.host || null; // ✅ Shadow DOM 내부 탐색
10750
- }
10744
+ currentElement = currentElement.getRootNode()?.host || null; // ✅ Shadow DOM 내부 탐색
10745
+ }
10751
10746
 
10752
- return null; */
10747
+ return null;
10748
+ },
10753
10749
  };
10754
10750
  }
10755
10751
  });
@@ -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
- console.log("get");
28
- //const style = window.getComputedStyle(this);
29
- //console.log(this, style.display, style.visibility, style.opacity);
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
- while (currentElement) {
37
- if (currentElement.matches(selector)) return currentElement;
31
+ while (currentElement) {
32
+ if (currentElement.matches(selector)) return currentElement;
38
33
 
39
- // ✅ Shadow Root를 가지고 있는 경우 내부에서 탐색
40
- if (currentElement.shadowRoot) {
41
- const found = currentElement.shadowRoot.querySelector(selector);
42
- if (found) return found;
43
- }
34
+ // ✅ Shadow Root를 가지고 있는 경우 내부에서 탐색
35
+ if (currentElement.shadowRoot) {
36
+ const found = currentElement.shadowRoot.querySelector(selector);
37
+ if (found) return found;
38
+ }
44
39
 
45
- currentElement = currentElement.getRootNode()?.host || null; // ✅ Shadow DOM 내부 탐색
46
- }
40
+ currentElement = currentElement.getRootNode()?.host || null; // ✅ Shadow DOM 내부 탐색
41
+ }
47
42
 
48
- return null; */
43
+ return null;
44
+ },
49
45
  };
50
46
  }
51
47
  });
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "ninegrid2",
3
3
  "type": "module",
4
- "version": "6.164.0",
4
+ "version": "6.166.0",
5
5
  "main": "dist/index.js",
6
6
  "exports": {
7
7
  "import": "./dist/index.js",
@@ -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
- console.log("get");
28
- //const style = window.getComputedStyle(this);
29
- //console.log(this, style.display, style.visibility, style.opacity);
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
- while (currentElement) {
37
- if (currentElement.matches(selector)) return currentElement;
31
+ while (currentElement) {
32
+ if (currentElement.matches(selector)) return currentElement;
38
33
 
39
- // ✅ Shadow Root를 가지고 있는 경우 내부에서 탐색
40
- if (currentElement.shadowRoot) {
41
- const found = currentElement.shadowRoot.querySelector(selector);
42
- if (found) return found;
43
- }
34
+ // ✅ Shadow Root를 가지고 있는 경우 내부에서 탐색
35
+ if (currentElement.shadowRoot) {
36
+ const found = currentElement.shadowRoot.querySelector(selector);
37
+ if (found) return found;
38
+ }
44
39
 
45
- currentElement = currentElement.getRootNode()?.host || null; // ✅ Shadow DOM 내부 탐색
46
- }
40
+ currentElement = currentElement.getRootNode()?.host || null; // ✅ Shadow DOM 내부 탐색
41
+ }
47
42
 
48
- return null; */
43
+ return null;
44
+ },
49
45
  };
50
46
  }
51
47
  });