@zerocost/sdk 0.3.0 → 0.5.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/index.cjs CHANGED
@@ -137,7 +137,7 @@ var TrackModule = class {
137
137
  // src/modules/widget.ts
138
138
  var POSITION_STYLES = {
139
139
  "bottom-right": "position:fixed;bottom:24px;right:24px;z-index:9999;",
140
- "bottom-left": "position:fixed;bottom:24px;left:24px;z-index:9999;",
140
+ "bottom-left": "position:fixed;bottom:24px;left:80px;z-index:9999;",
141
141
  "top-right": "position:fixed;top:24px;right:24px;z-index:9999;",
142
142
  "top-left": "position:fixed;top:24px;left:24px;z-index:9999;",
143
143
  "bottom-center": "position:fixed;bottom:24px;left:50%;transform:translateX(-50%);z-index:9999;",
@@ -253,8 +253,10 @@ var WidgetModule = class {
253
253
  closeBtn.addEventListener("click", (e) => {
254
254
  e.preventDefault();
255
255
  e.stopPropagation();
256
- el.innerHTML = "";
257
- el.style.display = "none";
256
+ const mountInfo = this.mounted.get(targetElementId);
257
+ if (mountInfo?.interval) clearInterval(mountInfo.interval);
258
+ this.mounted.delete(targetElementId);
259
+ el.remove();
258
260
  });
259
261
  }
260
262
  } catch (err) {
package/dist/index.js CHANGED
@@ -108,7 +108,7 @@ var TrackModule = class {
108
108
  // src/modules/widget.ts
109
109
  var POSITION_STYLES = {
110
110
  "bottom-right": "position:fixed;bottom:24px;right:24px;z-index:9999;",
111
- "bottom-left": "position:fixed;bottom:24px;left:24px;z-index:9999;",
111
+ "bottom-left": "position:fixed;bottom:24px;left:80px;z-index:9999;",
112
112
  "top-right": "position:fixed;top:24px;right:24px;z-index:9999;",
113
113
  "top-left": "position:fixed;top:24px;left:24px;z-index:9999;",
114
114
  "bottom-center": "position:fixed;bottom:24px;left:50%;transform:translateX(-50%);z-index:9999;",
@@ -224,8 +224,10 @@ var WidgetModule = class {
224
224
  closeBtn.addEventListener("click", (e) => {
225
225
  e.preventDefault();
226
226
  e.stopPropagation();
227
- el.innerHTML = "";
228
- el.style.display = "none";
227
+ const mountInfo = this.mounted.get(targetElementId);
228
+ if (mountInfo?.interval) clearInterval(mountInfo.interval);
229
+ this.mounted.delete(targetElementId);
230
+ el.remove();
229
231
  });
230
232
  }
231
233
  } catch (err) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zerocost/sdk",
3
- "version": "0.3.0",
3
+ "version": "0.5.0",
4
4
  "type": "module",
5
5
  "main": "dist/index.cjs",
6
6
  "module": "dist/index.js",