docs: cleanup
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
<script lang="ts" setup>
|
||||
import type { SFCOptions } from '@vue/repl'
|
||||
import { ReplStore, Repl as VueRepl } from '@vue/repl'
|
||||
import CodeMirror from '@vue/repl/codemirror-editor'
|
||||
import { useVueFlow } from '@vue-flow/core'
|
||||
import '@vue/repl/style.css'
|
||||
import { exampleImports } from '../examples'
|
||||
|
||||
const props = defineProps<{ example: keyof typeof exampleImports; mainFile?: string; dependencies?: Record<string, string> }>()
|
||||
@@ -39,13 +39,6 @@ body,
|
||||
|
||||
const store = new ReplStore({
|
||||
showOutput: true,
|
||||
outputMode: 'preview',
|
||||
})
|
||||
|
||||
const vh = useCssVar('--vh')
|
||||
|
||||
watchEffect(() => {
|
||||
vh.value = `${window.innerHeight}px`
|
||||
})
|
||||
|
||||
const files: Record<string, (typeof imports)[keyof typeof imports]> = {}
|
||||
@@ -60,7 +53,7 @@ for (const example of Object.keys(imports).filter((i) => i !== 'additionalImport
|
||||
}
|
||||
}
|
||||
|
||||
await store.setVueVersion('3.2.37')
|
||||
await store.setVueVersion('3.3.11')
|
||||
|
||||
await store.setFiles(
|
||||
{
|
||||
@@ -92,12 +85,13 @@ const sfcOptions = {
|
||||
|
||||
<template>
|
||||
<VueRepl
|
||||
:clear-console="true"
|
||||
:auto-resize="true"
|
||||
:editor="CodeMirror"
|
||||
:store="store"
|
||||
:show-compile-output="false"
|
||||
:show-import-map="false"
|
||||
:show-ts-config="false"
|
||||
:sfc-options="sfcOptions"
|
||||
:ssr="false"
|
||||
@keydown.ctrl.s.prevent
|
||||
@keydown.meta.s.prevent
|
||||
/>
|
||||
@@ -109,10 +103,6 @@ const sfcOptions = {
|
||||
}
|
||||
|
||||
.vue-repl {
|
||||
--vh: 100vh;
|
||||
|
||||
@apply rounded-lg border-1 border-solid dark:border-gray-200/10 border-gray-200;
|
||||
|
||||
height: calc(var(--vh) - 72px);
|
||||
@apply h-screen rounded-lg border-1 border-solid dark:border-gray-200/10 border-gray-200;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -18,10 +18,10 @@ const defaultOptions = {
|
||||
'[data-blobity], a:not([data-no-blobity]), button:not([data-no-blobity]), [data-blobity-tooltip], .back-to-top, .intro',
|
||||
}
|
||||
|
||||
export const useBlobity = createSharedComposable(() => {
|
||||
export function useBlobity() {
|
||||
const blobity = ref<Blobity>(isClient ? new Blobity(defaultOptions as any) : (null as any))
|
||||
|
||||
provide(BlobityInjection, blobity)
|
||||
provide(BlobityInjection, blobity as Ref<Blobity>)
|
||||
|
||||
const { y } = useWindowScroll()
|
||||
|
||||
@@ -39,4 +39,4 @@ export const useBlobity = createSharedComposable(() => {
|
||||
})
|
||||
|
||||
return { blobity, reset }
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user