astro-accelerator 0.0.71 → 0.0.73

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/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "0.0.71",
2
+ "version": "0.0.73",
3
3
  "author": "Steve Fenton",
4
4
  "name": "astro-accelerator",
5
5
  "description": "A super-lightweight, accessible, SEO-friendly starter project for Astro",
@@ -24,15 +24,15 @@
24
24
  "dts": "tsc ./tests/locate-content.js ./tests/locate-navigation.js ./tests/locate-search.js --allowJs --declaration --emitDeclarationOnly"
25
25
  },
26
26
  "dependencies": {
27
- "@astrojs/mdx": "^0.17.0",
28
- "@squoosh/lib": "^0.4.0",
29
- "astro": "^2.0.13",
27
+ "@astrojs/mdx": "^0.18.1",
28
+ "@squoosh/lib": "^0.5.3",
29
+ "astro": "^2.1.3",
30
30
  "astro-accelerator-utils": "^0.2.23",
31
31
  "hast-util-from-selector": "^2.0.1",
32
32
  "remark-directive": "^2.0.1"
33
33
  },
34
34
  "devDependencies": {
35
- "@playwright/test": "^1.30.0"
35
+ "@playwright/test": "^1.31.2"
36
36
  },
37
37
  "engines": {
38
38
  "node": "*"
@@ -345,14 +345,14 @@ nav.site-nav h2 {
345
345
 
346
346
  .site-nav a {
347
347
  text-indent: var(--marker-size);
348
- width: calc(100% - 2rem);
348
+ width: calc(100% - 2.07rem);
349
349
  display: inline-block;
350
350
  padding: 0.5rem 1rem;
351
351
  }
352
352
 
353
353
  .site-nav li.has-children summary span {
354
354
  text-indent: 0;
355
- width: calc(100% - 2rem - var(--marker-size));
355
+ width: calc(100% - 2.07rem - var(--marker-size));
356
356
  display: inline-block;
357
357
  padding: 0.5rem 1rem;
358
358
  text-decoration: underline;
@@ -12,12 +12,19 @@ function handleClick() {
12
12
  url: url
13
13
  };
14
14
 
15
- navigator.share(share);
15
+ if (navigator.share) {
16
+ navigator.share(share);
17
+ }
16
18
  }
17
19
 
18
20
  function enableSharing() {
21
+ const canShare = !!navigator.share;
19
22
  qsa('[data-share]').forEach((elem) => {
20
- elem.addEventListener('click', handleClick);
23
+ if (canShare) {
24
+ elem.addEventListener('click', handleClick);
25
+ } else {
26
+ elem.style.display = 'none';
27
+ }
21
28
  });
22
29
  }
23
30