Skip to content

Commit

Permalink
Merge pull request #31 from zernonia/remove-vue-fragment
Browse files Browse the repository at this point in the history
remove fragment-for-vue dependencies
  • Loading branch information
zernonia authored Nov 10, 2022
2 parents c992d69 + 9756881 commit 96cea06
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 125 deletions.
2 changes: 0 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@
"dependencies": {
"@nuxt/kit": "^3.0.0-rc.1",
"@vueuse/core": "^8.7.5",
"fragment-for-vue": "^1.0.1",
"katex": "^0.15.1",
"pathe": "^0.2.0",
"prismjs": "^1.25.0",
Expand Down Expand Up @@ -78,7 +77,6 @@
"vue-tsc": "^0.34.11"
},
"peerDependencies": {
"fragment-for-vue": "^1.0.1",
"katex": "^0.15.1",
"prismjs": "^1.25.0",
"vue": "^3.2.20"
Expand Down
29 changes: 13 additions & 16 deletions src/blocks/column.vue
Original file line number Diff line number Diff line change
@@ -1,35 +1,32 @@
<script setup lang="ts">
import { computed } from "vue"
import { Fragment } from "fragment-for-vue/vue3"
import { computed } from "vue";
const baseWidth = 46 // todo: add magic numbers to a config json
const baseWidth = 46; // todo: add magic numbers to a config json
const props = defineProps({
format: { type: Object, required: true },
})
});
const columnStyle = computed(() => {
const columns = Number((1 / props.format.column_ratio).toFixed(0))
const totalWidth = (columns - 1) * baseWidth
const columns = Number((1 / props.format.column_ratio).toFixed(0));
const totalWidth = (columns - 1) * baseWidth;
return {
width: `calc((100% - ${totalWidth}px) * ${props.format.column_ratio})`,
}
})
};
});
const spacerStyle = computed(() => ({ width: `${baseWidth}px` }))
const spacerStyle = computed(() => ({ width: `${baseWidth}px` }));
</script>

<script lang="ts">
export default {
name: "NotionColumn",
}
};
</script>

<template>
<Fragment>
<div class="notion-column" :style="columnStyle">
<slot />
</div>
<div class="notion-spacer" :style="spacerStyle" />
</Fragment>
<div class="notion-column" :style="columnStyle">
<slot />
</div>
<div class="notion-spacer" :style="spacerStyle" />
</template>
102 changes: 0 additions & 102 deletions src/blocks/helpers/fragment.ts

This file was deleted.

5 changes: 0 additions & 5 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1232,11 +1232,6 @@ flat@^5.0.0:
resolved "https://registry.yarnpkg.com/flat/-/flat-5.0.2.tgz#8ca6fe332069ffa9d324c327198c598259ceb241"
integrity sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ==

fragment-for-vue@^1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/fragment-for-vue/-/fragment-for-vue-1.0.1.tgz#669c9779bd89a986ad3c8dfaf26af25237629a45"
integrity sha512-LTjux+UjhTL5tyGAA64GfUsJLLBnth0OwU3XZgzm0Z7lsbf7oObwGpBYUpgL4BMmUJaFmBo8ubsBVNMMUtMERA==

fs-extra@^10.0.0:
version "10.1.0"
resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-10.1.0.tgz#02873cfbc4084dde127eaa5f9905eef2325d1abf"
Expand Down

2 comments on commit 96cea06

@vercel
Copy link

@vercel vercel bot commented on 96cea06 Nov 10, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

vue3-notion – ./demo/nuxt

vue3-notion-zernonia.vercel.app
vue3-notion-git-master-zernonia.vercel.app
vue3-notion.vercel.app

@vercel
Copy link

@vercel vercel bot commented on 96cea06 Nov 10, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.