publ-echo-test 0.0.196 → 0.0.198

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.
@@ -55,7 +55,18 @@ var GridItem = function (_a) {
55
55
  var callback = function (mutationsList) {
56
56
  for (var _i = 0, mutationsList_1 = mutationsList; _i < mutationsList_1.length; _i++) {
57
57
  var mutation = mutationsList_1[_i];
58
- console.log(mutation.attributeName);
58
+ var oldClass = mutation.oldValue || '';
59
+ var newClass = mutation.target.getAttribute('class') || '';
60
+ // hover로 인해 "hovered" 클래스가 추가된 경우
61
+ if (!oldClass.includes('hovered') && newClass.includes('hovered')) {
62
+ console.log('Hover 상태로 변경됨');
63
+ return;
64
+ }
65
+ // hover에서 벗어난 경우
66
+ if (oldClass.includes('hovered') && !newClass.includes('hovered')) {
67
+ console.log('Hover 상태 해제됨');
68
+ return;
69
+ }
59
70
  var isCharacterChanged = mutation.type === 'characterData';
60
71
  var keepWidth = true;
61
72
  var hasPaddingChanged = false;
@@ -110,7 +121,7 @@ var GridItem = function (_a) {
110
121
  attributes: true,
111
122
  subtree: true,
112
123
  attributeOldValue: true,
113
- attributeFilter: ['data-status'],
124
+ attributeFilter: ['class'],
114
125
  };
115
126
  // 대상 노드와 설정으로 관찰 시작
116
127
  observer.observe(targetNode, config);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "publ-echo-test",
3
- "version": "0.0.196",
3
+ "version": "0.0.198",
4
4
  "private": false,
5
5
  "main": "dist/lib/index.js",
6
6
  "types": "dist/lib/index.d.js",