@lisergia/core 18.0.0 → 19.0.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.
@@ -1,6 +1,6 @@
1
1
 
2
2
  
3
- > @lisergia/core@17.0.0 build
3
+ > @lisergia/core@18.0.0 build
4
4
  > tsup src/index.ts --format cjs,esm --dts
5
5
 
6
6
  CLI Building entry: src/index.ts
@@ -10,11 +10,11 @@
10
10
  CJS Build start
11
11
  ESM Build start
12
12
  ESM dist/index.js 13.91 KB
13
- ESM ⚡️ Build success in 41ms
13
+ ESM ⚡️ Build success in 17ms
14
14
  CJS dist/index.cjs 16.15 KB
15
- CJS ⚡️ Build success in 41ms
15
+ CJS ⚡️ Build success in 18ms
16
16
  DTS Build start
17
- DTS ⚡️ Build success in 763ms
17
+ DTS ⚡️ Build success in 869ms
18
18
  DTS dist/index.d.cts 5.82 KB
19
19
  DTS dist/index.d.ts 5.82 KB
20
20
  ⠙
package/CHANGELOG.md CHANGED
@@ -1,5 +1,16 @@
1
1
  # @lisergia/core
2
2
 
3
+ ## 19.0.0
4
+
5
+ ### Major Changes
6
+
7
+ - Cleanup elements from Component on destroy.
8
+
9
+ ### Patch Changes
10
+
11
+ - Updated dependencies
12
+ - @lisergia/config-tsconfig@19.0.0
13
+
3
14
  ## 18.0.0
4
15
 
5
16
  ### Major Changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lisergia/core",
3
- "version": "18.0.0",
3
+ "version": "19.0.0",
4
4
  "main": "./dist/index.js",
5
5
  "types": "./dist/index.d.ts",
6
6
  "type": "module",
@@ -9,7 +9,7 @@
9
9
  "dev": "tsup src/index.ts --format cjs,esm --dts --watch"
10
10
  },
11
11
  "dependencies": {
12
- "@lisergia/config-tsconfig": "18.0.0",
12
+ "@lisergia/config-tsconfig": "19.0.0",
13
13
  "auto-bind": "^5.0.1",
14
14
  "gsap": "^3.13.0",
15
15
  "lenis": "^1.3.1",
package/src/Component.ts CHANGED
@@ -87,6 +87,10 @@ export class Component extends EventEmitter {
87
87
  }
88
88
  }
89
89
 
90
+ destroyElement() {
91
+ this.element = undefined
92
+ }
93
+
90
94
  initElements(selectors?: ComponentSelectors) {
91
95
  for (const key in selectors) {
92
96
  const selector = selectors[key]
@@ -121,6 +125,10 @@ export class Component extends EventEmitter {
121
125
  }
122
126
  }
123
127
 
128
+ destroyElements() {
129
+ this.elements = {}
130
+ }
131
+
124
132
  addEventListeners() {}
125
133
 
126
134
  removeEventListeners() {}
@@ -129,5 +137,8 @@ export class Component extends EventEmitter {
129
137
  super.destroy()
130
138
 
131
139
  this.removeEventListeners()
140
+
141
+ this.destroyElements()
142
+ this.destroyElement()
132
143
  }
133
144
  }
package/src/Page.ts CHANGED
@@ -212,10 +212,10 @@ export class Page extends Component {
212
212
  // Destroy.
213
213
  //
214
214
  destroy() {
215
- super.destroy()
216
-
217
215
  this.destroyResizeObserver()
218
216
  this.destroyComponents()
219
217
  this.destroyScroll()
218
+
219
+ super.destroy()
220
220
  }
221
221
  }