vitepress-plugin-back2top 0.1.0 → 0.1.2

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.
@@ -52,7 +52,7 @@ const iconSVGStr = computed(() => backToTopConfig?.value?.icon)
52
52
  <div v-show="show" class="back-to-top">
53
53
  <span class="icon-wrapper" @click="handleBackRoTop">
54
54
  <Icon :size="20" :icon="iconSVGStr">
55
- <svg width="512" height="512" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
55
+ <svg width="1em" height="1em" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
56
56
  <path
57
57
  fill="currentColor"
58
58
  d="m20 22l-3.86-1.55c.7-1.53 1.2-3.11 1.51-4.72zM7.86 20.45L4 22l2.35-6.27c.31 1.61.81 3.19 1.51 4.72M12 2s5 2 5 10c0 3.1-.75 5.75-1.67 7.83A2 2 0 0 1 13.5 21h-3a2 2 0 0 1-1.83-1.17C7.76 17.75 7 15.1 7 12c0-8 5-10 5-10m0 10c1.1 0 2-.9 2-2s-.9-2-2-2s-2 .9-2 2s.9 2 2 2"
@@ -21,6 +21,7 @@ const size = computed(() => props.size && (typeof props.size === 'number' ? `${p
21
21
  --color: inherit;
22
22
  align-items: center;
23
23
  display: inline-flex;
24
+ flex-shrink: 0;
24
25
  height: 1em;
25
26
  justify-content: center;
26
27
  line-height: 1em;
@@ -30,4 +31,9 @@ const size = computed(() => props.size && (typeof props.size === 'number' ? `${p
30
31
  color: var(--color);
31
32
  font-size: inherit;
32
33
  }
34
+ .sugar-theme-icon :deep(svg) {
35
+ width: 1em;
36
+ height: 1em;
37
+ flex-shrink: 0;
38
+ }
33
39
  </style>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vitepress-plugin-back2top",
3
- "version": "0.1.0",
3
+ "version": "0.1.2",
4
4
  "description": "vitepress plugin back to top",
5
5
  "author": "sugar",
6
6
  "license": "MIT",
@@ -30,7 +30,7 @@
30
30
  "dist"
31
31
  ],
32
32
  "peerDependencies": {
33
- "vitepress": "^1 || ^2"
33
+ "vitepress": "^1.0.0-0 || ^2.0.0-0"
34
34
  },
35
35
  "dependencies": {
36
36
  "@vueuse/core": "^14.1.0",
@@ -43,7 +43,7 @@
43
43
  "tsup": " ^7.2.0",
44
44
  "typescript": "^5.5.4",
45
45
  "vite": "^5",
46
- "vitepress": "2.0.0-alpha.16",
46
+ "vitepress": "2.0.0-alpha.17",
47
47
  "vue": "^3.5.24"
48
48
  },
49
49
  "scripts": {