Skip to content

Commit 96cea06

Browse files
authored
Merge pull request #31 from zernonia/remove-vue-fragment
remove fragment-for-vue dependencies
2 parents c992d69 + 9756881 commit 96cea06

File tree

4 files changed

+13
-125
lines changed

4 files changed

+13
-125
lines changed

package.json

-2
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,6 @@
4949
"dependencies": {
5050
"@nuxt/kit": "^3.0.0-rc.1",
5151
"@vueuse/core": "^8.7.5",
52-
"fragment-for-vue": "^1.0.1",
5352
"katex": "^0.15.1",
5453
"pathe": "^0.2.0",
5554
"prismjs": "^1.25.0",
@@ -78,7 +77,6 @@
7877
"vue-tsc": "^0.34.11"
7978
},
8079
"peerDependencies": {
81-
"fragment-for-vue": "^1.0.1",
8280
"katex": "^0.15.1",
8381
"prismjs": "^1.25.0",
8482
"vue": "^3.2.20"

src/blocks/column.vue

+13-16
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,32 @@
11
<script setup lang="ts">
2-
import { computed } from "vue"
3-
import { Fragment } from "fragment-for-vue/vue3"
2+
import { computed } from "vue";
43
5-
const baseWidth = 46 // todo: add magic numbers to a config json
4+
const baseWidth = 46; // todo: add magic numbers to a config json
65
76
const props = defineProps({
87
format: { type: Object, required: true },
9-
})
8+
});
109
1110
const columnStyle = computed(() => {
12-
const columns = Number((1 / props.format.column_ratio).toFixed(0))
13-
const totalWidth = (columns - 1) * baseWidth
11+
const columns = Number((1 / props.format.column_ratio).toFixed(0));
12+
const totalWidth = (columns - 1) * baseWidth;
1413
return {
1514
width: `calc((100% - ${totalWidth}px) * ${props.format.column_ratio})`,
16-
}
17-
})
15+
};
16+
});
1817
19-
const spacerStyle = computed(() => ({ width: `${baseWidth}px` }))
18+
const spacerStyle = computed(() => ({ width: `${baseWidth}px` }));
2019
</script>
2120

2221
<script lang="ts">
2322
export default {
2423
name: "NotionColumn",
25-
}
24+
};
2625
</script>
2726

2827
<template>
29-
<Fragment>
30-
<div class="notion-column" :style="columnStyle">
31-
<slot />
32-
</div>
33-
<div class="notion-spacer" :style="spacerStyle" />
34-
</Fragment>
28+
<div class="notion-column" :style="columnStyle">
29+
<slot />
30+
</div>
31+
<div class="notion-spacer" :style="spacerStyle" />
3532
</template>

src/blocks/helpers/fragment.ts

-102
This file was deleted.

yarn.lock

-5
Original file line numberDiff line numberDiff line change
@@ -1232,11 +1232,6 @@ flat@^5.0.0:
12321232
resolved "https://registry.yarnpkg.com/flat/-/flat-5.0.2.tgz#8ca6fe332069ffa9d324c327198c598259ceb241"
12331233
integrity sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ==
12341234

1235-
fragment-for-vue@^1.0.1:
1236-
version "1.0.1"
1237-
resolved "https://registry.yarnpkg.com/fragment-for-vue/-/fragment-for-vue-1.0.1.tgz#669c9779bd89a986ad3c8dfaf26af25237629a45"
1238-
integrity sha512-LTjux+UjhTL5tyGAA64GfUsJLLBnth0OwU3XZgzm0Z7lsbf7oObwGpBYUpgL4BMmUJaFmBo8ubsBVNMMUtMERA==
1239-
12401235
fs-extra@^10.0.0:
12411236
version "10.1.0"
12421237
resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-10.1.0.tgz#02873cfbc4084dde127eaa5f9905eef2325d1abf"

0 commit comments

Comments
 (0)