@lisergia/core 5.0.0 → 7.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@4.0.0 build
3
+ > @lisergia/core@6.0.0 build
4
4
  > tsup src/index.ts --format cjs,esm --dts
5
5
 
6
6
  CLI Building entry: src/index.ts
@@ -9,12 +9,12 @@
9
9
  CLI Target: node16
10
10
  CJS Build start
11
11
  ESM Build start
12
- ESM dist/index.js 13.37 KB
13
- ESM ⚡️ Build success in 24ms
14
- CJS dist/index.cjs 15.51 KB
15
- CJS ⚡️ Build success in 24ms
12
+ ESM dist/index.js 13.40 KB
13
+ ESM ⚡️ Build success in 117ms
14
+ CJS dist/index.cjs 15.54 KB
15
+ CJS ⚡️ Build success in 117ms
16
16
  DTS Build start
17
- DTS ⚡️ Build success in 876ms
17
+ DTS ⚡️ Build success in 835ms
18
18
  DTS dist/index.d.cts 5.74 KB
19
19
  DTS dist/index.d.ts 5.74 KB
20
20
  ⠙
package/CHANGELOG.md CHANGED
@@ -1,5 +1,27 @@
1
1
  # @lisergia/core
2
2
 
3
+ ## 7.0.0
4
+
5
+ ### Major Changes
6
+
7
+ - Fix hash querySelector.
8
+
9
+ ### Patch Changes
10
+
11
+ - Updated dependencies
12
+ - @lisergia/config-tsconfig@7.0.0
13
+
14
+ ## 6.0.0
15
+
16
+ ### Major Changes
17
+
18
+ - Fix Prettier dependency.
19
+
20
+ ### Patch Changes
21
+
22
+ - Updated dependencies
23
+ - @lisergia/config-tsconfig@6.0.0
24
+
3
25
  ## 5.0.0
4
26
 
5
27
  ### Major Changes
package/dist/index.cjs CHANGED
@@ -187,9 +187,11 @@ var Link = class extends Component {
187
187
  const isAnchor = this.element.href.includes("#");
188
188
  if (isAnchor) {
189
189
  const hash = this.element.href.split("#")[1];
190
- const element = document.querySelector(`#${hash}`);
191
- if (element) {
192
- return;
190
+ if (hash) {
191
+ const element = document.querySelector(`#${hash}`);
192
+ if (element) {
193
+ return;
194
+ }
193
195
  }
194
196
  }
195
197
  if (isLocalPrevented || isDownload) {
package/dist/index.js CHANGED
@@ -144,9 +144,11 @@ var Link = class extends Component {
144
144
  const isAnchor = this.element.href.includes("#");
145
145
  if (isAnchor) {
146
146
  const hash = this.element.href.split("#")[1];
147
- const element = document.querySelector(`#${hash}`);
148
- if (element) {
149
- return;
147
+ if (hash) {
148
+ const element = document.querySelector(`#${hash}`);
149
+ if (element) {
150
+ return;
151
+ }
150
152
  }
151
153
  }
152
154
  if (isLocalPrevented || isDownload) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lisergia/core",
3
- "version": "5.0.0",
3
+ "version": "7.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": "5.0.0",
12
+ "@lisergia/config-tsconfig": "7.0.0",
13
13
  "auto-bind": "^5.0.1",
14
14
  "lenis": "^1.3.1",
15
15
  "mobx": "^6.13.7",
package/src/Link.ts CHANGED
@@ -23,10 +23,13 @@ export class Link extends Component {
23
23
 
24
24
  if (isAnchor) {
25
25
  const hash = this.element.href.split('#')[1]
26
- const element = document.querySelector(`#${hash}`)
27
26
 
28
- if (element) {
29
- return
27
+ if (hash) {
28
+ const element = document.querySelector(`#${hash}`)
29
+
30
+ if (element) {
31
+ return
32
+ }
30
33
  }
31
34
  }
32
35