Update files

This commit is contained in:
Lordmau5 2023-11-14 19:43:51 +01:00
parent 54ed770994
commit 6afe7675e9
8 changed files with 275 additions and 54 deletions

View File

@ -85,6 +85,11 @@
"ComponentBase": true,
"EditorComponent": true,
"VueMarkdown": true,
"MarkdownRenderer": true
"MarkdownRenderer": true,
"VueComponent": true,
"DComponent": true,
"__Component": true,
"__Ref": true,
"DRef": true
}
}

228
auto-imports.d.ts vendored
View File

@ -5,9 +5,10 @@
// Generated by unplugin-auto-import
export {}
declare global {
const Component: typeof import('vue-facing-decorator')['Component']
const ComponentBase: typeof import('vue-facing-decorator')['ComponentBase']
const DComponent: typeof import('vue-facing-decorator')['Component']
const DRef: typeof import('vue-facing-decorator')['Ref']
const EditorComponent: typeof import('./src/components/EditorComponent.vue')['default']
const EffectScope: typeof import('vue')['EffectScope']
const Emit: typeof import('vue-facing-decorator')['Emit']
const Hook: typeof import('vue-facing-decorator')['Hook']
const Inject: typeof import('vue-facing-decorator')['Inject']
@ -16,13 +17,232 @@ declare global {
const NavbarComponent: typeof import('./src/components/NavbarComponent.vue')['default']
const Prop: typeof import('vue-facing-decorator')['Prop']
const Provide: typeof import('vue-facing-decorator')['Provide']
const Ref: typeof import('vue-facing-decorator')['Ref']
const Setup: typeof import('vue-facing-decorator')['Setup']
const SidebarComponent: typeof import('./src/components/SidebarComponent.vue')['default']
const VModel: typeof import('vue-facing-decorator')['VModel']
const Vanilla: typeof import('vue-facing-decorator')['Vanilla']
const Vue: typeof import('vue-facing-decorator')['Vue']
const VueMarkdown: typeof import('vue-markdown')['VueMarkdown']
const Watch: typeof import('vue-facing-decorator')['Watch']
const computed: typeof import('vue')['computed']
const createApp: typeof import('vue')['createApp']
const customRef: typeof import('vue')['customRef']
const defineAsyncComponent: typeof import('vue')['defineAsyncComponent']
const defineComponent: typeof import('vue')['defineComponent']
const effectScope: typeof import('vue')['effectScope']
const getCurrentInstance: typeof import('vue')['getCurrentInstance']
const getCurrentScope: typeof import('vue')['getCurrentScope']
const h: typeof import('vue')['h']
const inject: typeof import('vue')['inject']
const isProxy: typeof import('vue')['isProxy']
const isReactive: typeof import('vue')['isReactive']
const isReadonly: typeof import('vue')['isReadonly']
const isRef: typeof import('vue')['isRef']
const markRaw: typeof import('vue')['markRaw']
const nextTick: typeof import('vue')['nextTick']
const onActivated: typeof import('vue')['onActivated']
const onBeforeMount: typeof import('vue')['onBeforeMount']
const onBeforeRouteLeave: typeof import('vue-router')['onBeforeRouteLeave']
const onBeforeRouteUpdate: typeof import('vue-router')['onBeforeRouteUpdate']
const onBeforeUnmount: typeof import('vue')['onBeforeUnmount']
const onBeforeUpdate: typeof import('vue')['onBeforeUpdate']
const onDeactivated: typeof import('vue')['onDeactivated']
const onErrorCaptured: typeof import('vue')['onErrorCaptured']
const onMounted: typeof import('vue')['onMounted']
const onRenderTracked: typeof import('vue')['onRenderTracked']
const onRenderTriggered: typeof import('vue')['onRenderTriggered']
const onScopeDispose: typeof import('vue')['onScopeDispose']
const onServerPrefetch: typeof import('vue')['onServerPrefetch']
const onUnmounted: typeof import('vue')['onUnmounted']
const onUpdated: typeof import('vue')['onUpdated']
const provide: typeof import('vue')['provide']
const reactive: typeof import('vue')['reactive']
const readonly: typeof import('vue')['readonly']
const ref: typeof import('vue')['ref']
const resolveComponent: typeof import('vue')['resolveComponent']
const shallowReactive: typeof import('vue')['shallowReactive']
const shallowReadonly: typeof import('vue')['shallowReadonly']
const shallowRef: typeof import('vue')['shallowRef']
const toNative: typeof import('vue-facing-decorator')['toNative']
const toRaw: typeof import('vue')['toRaw']
const toRef: typeof import('vue')['toRef']
const toRefs: typeof import('vue')['toRefs']
const toValue: typeof import('vue')['toValue']
const triggerRef: typeof import('vue')['triggerRef']
const unref: typeof import('vue')['unref']
const useAttrs: typeof import('vue')['useAttrs']
const useCssModule: typeof import('vue')['useCssModule']
const useCssVars: typeof import('vue')['useCssVars']
const useLink: typeof import('vue-router')['useLink']
const useRoute: typeof import('vue-router')['useRoute']
const useRouter: typeof import('vue-router')['useRouter']
const useSlots: typeof import('vue')['useSlots']
const watch: typeof import('vue')['watch']
const watchEffect: typeof import('vue')['watchEffect']
const watchPostEffect: typeof import('vue')['watchPostEffect']
const watchSyncEffect: typeof import('vue')['watchSyncEffect']
}
// for type re-export
declare global {
// @ts-ignore
export type { Component, ComponentPublicInstance, ComputedRef, ExtractDefaultPropTypes, ExtractPropTypes, ExtractPublicPropTypes, InjectionKey, PropType, Ref, VNode, WritableComputedRef } from 'vue'
}
// for vue template auto import
import { UnwrapRef } from 'vue'
declare module 'vue' {
interface ComponentCustomProperties {
readonly DComponent: UnwrapRef<typeof import('vue-facing-decorator')['Component']>
readonly DRef: UnwrapRef<typeof import('vue-facing-decorator')['Ref']>
readonly EditorComponent: UnwrapRef<typeof import('./src/components/EditorComponent.vue')['default']>
readonly EffectScope: UnwrapRef<typeof import('vue')['EffectScope']>
readonly Emit: UnwrapRef<typeof import('vue-facing-decorator')['Emit']>
readonly Hook: UnwrapRef<typeof import('vue-facing-decorator')['Hook']>
readonly Inject: UnwrapRef<typeof import('vue-facing-decorator')['Inject']>
readonly MarkdownRenderer: UnwrapRef<typeof import('./src/components/MarkdownRenderer.vue')['default']>
readonly Model: UnwrapRef<typeof import('vue-facing-decorator')['Model']>
readonly NavbarComponent: UnwrapRef<typeof import('./src/components/NavbarComponent.vue')['default']>
readonly Prop: UnwrapRef<typeof import('vue-facing-decorator')['Prop']>
readonly Provide: UnwrapRef<typeof import('vue-facing-decorator')['Provide']>
readonly Setup: UnwrapRef<typeof import('vue-facing-decorator')['Setup']>
readonly SidebarComponent: UnwrapRef<typeof import('./src/components/SidebarComponent.vue')['default']>
readonly VModel: UnwrapRef<typeof import('vue-facing-decorator')['VModel']>
readonly Vanilla: UnwrapRef<typeof import('vue-facing-decorator')['Vanilla']>
readonly Vue: UnwrapRef<typeof import('vue-facing-decorator')['Vue']>
readonly Watch: UnwrapRef<typeof import('vue-facing-decorator')['Watch']>
readonly computed: UnwrapRef<typeof import('vue')['computed']>
readonly createApp: UnwrapRef<typeof import('vue')['createApp']>
readonly customRef: UnwrapRef<typeof import('vue')['customRef']>
readonly defineAsyncComponent: UnwrapRef<typeof import('vue')['defineAsyncComponent']>
readonly defineComponent: UnwrapRef<typeof import('vue')['defineComponent']>
readonly effectScope: UnwrapRef<typeof import('vue')['effectScope']>
readonly getCurrentInstance: UnwrapRef<typeof import('vue')['getCurrentInstance']>
readonly getCurrentScope: UnwrapRef<typeof import('vue')['getCurrentScope']>
readonly h: UnwrapRef<typeof import('vue')['h']>
readonly inject: UnwrapRef<typeof import('vue')['inject']>
readonly isProxy: UnwrapRef<typeof import('vue')['isProxy']>
readonly isReactive: UnwrapRef<typeof import('vue')['isReactive']>
readonly isReadonly: UnwrapRef<typeof import('vue')['isReadonly']>
readonly isRef: UnwrapRef<typeof import('vue')['isRef']>
readonly markRaw: UnwrapRef<typeof import('vue')['markRaw']>
readonly nextTick: UnwrapRef<typeof import('vue')['nextTick']>
readonly onActivated: UnwrapRef<typeof import('vue')['onActivated']>
readonly onBeforeMount: UnwrapRef<typeof import('vue')['onBeforeMount']>
readonly onBeforeRouteLeave: UnwrapRef<typeof import('vue-router')['onBeforeRouteLeave']>
readonly onBeforeRouteUpdate: UnwrapRef<typeof import('vue-router')['onBeforeRouteUpdate']>
readonly onBeforeUnmount: UnwrapRef<typeof import('vue')['onBeforeUnmount']>
readonly onBeforeUpdate: UnwrapRef<typeof import('vue')['onBeforeUpdate']>
readonly onDeactivated: UnwrapRef<typeof import('vue')['onDeactivated']>
readonly onErrorCaptured: UnwrapRef<typeof import('vue')['onErrorCaptured']>
readonly onMounted: UnwrapRef<typeof import('vue')['onMounted']>
readonly onRenderTracked: UnwrapRef<typeof import('vue')['onRenderTracked']>
readonly onRenderTriggered: UnwrapRef<typeof import('vue')['onRenderTriggered']>
readonly onScopeDispose: UnwrapRef<typeof import('vue')['onScopeDispose']>
readonly onServerPrefetch: UnwrapRef<typeof import('vue')['onServerPrefetch']>
readonly onUnmounted: UnwrapRef<typeof import('vue')['onUnmounted']>
readonly onUpdated: UnwrapRef<typeof import('vue')['onUpdated']>
readonly provide: UnwrapRef<typeof import('vue')['provide']>
readonly reactive: UnwrapRef<typeof import('vue')['reactive']>
readonly readonly: UnwrapRef<typeof import('vue')['readonly']>
readonly ref: UnwrapRef<typeof import('vue')['ref']>
readonly resolveComponent: UnwrapRef<typeof import('vue')['resolveComponent']>
readonly shallowReactive: UnwrapRef<typeof import('vue')['shallowReactive']>
readonly shallowReadonly: UnwrapRef<typeof import('vue')['shallowReadonly']>
readonly shallowRef: UnwrapRef<typeof import('vue')['shallowRef']>
readonly toNative: UnwrapRef<typeof import('vue-facing-decorator')['toNative']>
readonly toRaw: UnwrapRef<typeof import('vue')['toRaw']>
readonly toRef: UnwrapRef<typeof import('vue')['toRef']>
readonly toRefs: UnwrapRef<typeof import('vue')['toRefs']>
readonly toValue: UnwrapRef<typeof import('vue')['toValue']>
readonly triggerRef: UnwrapRef<typeof import('vue')['triggerRef']>
readonly unref: UnwrapRef<typeof import('vue')['unref']>
readonly useAttrs: UnwrapRef<typeof import('vue')['useAttrs']>
readonly useCssModule: UnwrapRef<typeof import('vue')['useCssModule']>
readonly useCssVars: UnwrapRef<typeof import('vue')['useCssVars']>
readonly useLink: UnwrapRef<typeof import('vue-router')['useLink']>
readonly useRoute: UnwrapRef<typeof import('vue-router')['useRoute']>
readonly useRouter: UnwrapRef<typeof import('vue-router')['useRouter']>
readonly useSlots: UnwrapRef<typeof import('vue')['useSlots']>
readonly watch: UnwrapRef<typeof import('vue')['watch']>
readonly watchEffect: UnwrapRef<typeof import('vue')['watchEffect']>
readonly watchPostEffect: UnwrapRef<typeof import('vue')['watchPostEffect']>
readonly watchSyncEffect: UnwrapRef<typeof import('vue')['watchSyncEffect']>
}
}
declare module '@vue/runtime-core' {
interface ComponentCustomProperties {
readonly DComponent: UnwrapRef<typeof import('vue-facing-decorator')['Component']>
readonly DRef: UnwrapRef<typeof import('vue-facing-decorator')['Ref']>
readonly EditorComponent: UnwrapRef<typeof import('./src/components/EditorComponent.vue')['default']>
readonly EffectScope: UnwrapRef<typeof import('vue')['EffectScope']>
readonly Emit: UnwrapRef<typeof import('vue-facing-decorator')['Emit']>
readonly Hook: UnwrapRef<typeof import('vue-facing-decorator')['Hook']>
readonly Inject: UnwrapRef<typeof import('vue-facing-decorator')['Inject']>
readonly MarkdownRenderer: UnwrapRef<typeof import('./src/components/MarkdownRenderer.vue')['default']>
readonly Model: UnwrapRef<typeof import('vue-facing-decorator')['Model']>
readonly NavbarComponent: UnwrapRef<typeof import('./src/components/NavbarComponent.vue')['default']>
readonly Prop: UnwrapRef<typeof import('vue-facing-decorator')['Prop']>
readonly Provide: UnwrapRef<typeof import('vue-facing-decorator')['Provide']>
readonly Setup: UnwrapRef<typeof import('vue-facing-decorator')['Setup']>
readonly SidebarComponent: UnwrapRef<typeof import('./src/components/SidebarComponent.vue')['default']>
readonly VModel: UnwrapRef<typeof import('vue-facing-decorator')['VModel']>
readonly Vanilla: UnwrapRef<typeof import('vue-facing-decorator')['Vanilla']>
readonly Vue: UnwrapRef<typeof import('vue-facing-decorator')['Vue']>
readonly Watch: UnwrapRef<typeof import('vue-facing-decorator')['Watch']>
readonly computed: UnwrapRef<typeof import('vue')['computed']>
readonly createApp: UnwrapRef<typeof import('vue')['createApp']>
readonly customRef: UnwrapRef<typeof import('vue')['customRef']>
readonly defineAsyncComponent: UnwrapRef<typeof import('vue')['defineAsyncComponent']>
readonly defineComponent: UnwrapRef<typeof import('vue')['defineComponent']>
readonly effectScope: UnwrapRef<typeof import('vue')['effectScope']>
readonly getCurrentInstance: UnwrapRef<typeof import('vue')['getCurrentInstance']>
readonly getCurrentScope: UnwrapRef<typeof import('vue')['getCurrentScope']>
readonly h: UnwrapRef<typeof import('vue')['h']>
readonly inject: UnwrapRef<typeof import('vue')['inject']>
readonly isProxy: UnwrapRef<typeof import('vue')['isProxy']>
readonly isReactive: UnwrapRef<typeof import('vue')['isReactive']>
readonly isReadonly: UnwrapRef<typeof import('vue')['isReadonly']>
readonly isRef: UnwrapRef<typeof import('vue')['isRef']>
readonly markRaw: UnwrapRef<typeof import('vue')['markRaw']>
readonly nextTick: UnwrapRef<typeof import('vue')['nextTick']>
readonly onActivated: UnwrapRef<typeof import('vue')['onActivated']>
readonly onBeforeMount: UnwrapRef<typeof import('vue')['onBeforeMount']>
readonly onBeforeRouteLeave: UnwrapRef<typeof import('vue-router')['onBeforeRouteLeave']>
readonly onBeforeRouteUpdate: UnwrapRef<typeof import('vue-router')['onBeforeRouteUpdate']>
readonly onBeforeUnmount: UnwrapRef<typeof import('vue')['onBeforeUnmount']>
readonly onBeforeUpdate: UnwrapRef<typeof import('vue')['onBeforeUpdate']>
readonly onDeactivated: UnwrapRef<typeof import('vue')['onDeactivated']>
readonly onErrorCaptured: UnwrapRef<typeof import('vue')['onErrorCaptured']>
readonly onMounted: UnwrapRef<typeof import('vue')['onMounted']>
readonly onRenderTracked: UnwrapRef<typeof import('vue')['onRenderTracked']>
readonly onRenderTriggered: UnwrapRef<typeof import('vue')['onRenderTriggered']>
readonly onScopeDispose: UnwrapRef<typeof import('vue')['onScopeDispose']>
readonly onServerPrefetch: UnwrapRef<typeof import('vue')['onServerPrefetch']>
readonly onUnmounted: UnwrapRef<typeof import('vue')['onUnmounted']>
readonly onUpdated: UnwrapRef<typeof import('vue')['onUpdated']>
readonly provide: UnwrapRef<typeof import('vue')['provide']>
readonly reactive: UnwrapRef<typeof import('vue')['reactive']>
readonly readonly: UnwrapRef<typeof import('vue')['readonly']>
readonly ref: UnwrapRef<typeof import('vue')['ref']>
readonly resolveComponent: UnwrapRef<typeof import('vue')['resolveComponent']>
readonly shallowReactive: UnwrapRef<typeof import('vue')['shallowReactive']>
readonly shallowReadonly: UnwrapRef<typeof import('vue')['shallowReadonly']>
readonly shallowRef: UnwrapRef<typeof import('vue')['shallowRef']>
readonly toNative: UnwrapRef<typeof import('vue-facing-decorator')['toNative']>
readonly toRaw: UnwrapRef<typeof import('vue')['toRaw']>
readonly toRef: UnwrapRef<typeof import('vue')['toRef']>
readonly toRefs: UnwrapRef<typeof import('vue')['toRefs']>
readonly toValue: UnwrapRef<typeof import('vue')['toValue']>
readonly triggerRef: UnwrapRef<typeof import('vue')['triggerRef']>
readonly unref: UnwrapRef<typeof import('vue')['unref']>
readonly useAttrs: UnwrapRef<typeof import('vue')['useAttrs']>
readonly useCssModule: UnwrapRef<typeof import('vue')['useCssModule']>
readonly useCssVars: UnwrapRef<typeof import('vue')['useCssVars']>
readonly useLink: UnwrapRef<typeof import('vue-router')['useLink']>
readonly useRoute: UnwrapRef<typeof import('vue-router')['useRoute']>
readonly useRouter: UnwrapRef<typeof import('vue-router')['useRouter']>
readonly useSlots: UnwrapRef<typeof import('vue')['useSlots']>
readonly watch: UnwrapRef<typeof import('vue')['watch']>
readonly watchEffect: UnwrapRef<typeof import('vue')['watchEffect']>
readonly watchPostEffect: UnwrapRef<typeof import('vue')['watchPostEffect']>
readonly watchSyncEffect: UnwrapRef<typeof import('vue')['watchSyncEffect']>
}
}

View File

@ -11,17 +11,12 @@
</template>
<script lang="ts">
import {
Component, Vue, toNative
} from 'vue-facing-decorator';
@Component
class MainPage extends Vue {
@DComponent
export default class MainPage extends Vue {
leftDrawerOpen = false;
toggleLeftDrawer() {
this.leftDrawerOpen = !this.leftDrawerOpen;
}
}
export default toNative(MainPage);
</script>

View File

@ -126,8 +126,8 @@ import {
games
} from '@/js/ParseGamesJSON.js';
@Component
class EditorComponent extends Vue {
@DComponent
export default class EditorComponent extends Vue {
games: BingoGame[] = Array.from(games.values());
selected_game: BingoGame | undefined = undefined;
@ -152,5 +152,4 @@ class EditorComponent extends Vue {
return this.games.filter(game => game.name.toLocaleLowerCase().includes(this.search.toLocaleLowerCase()));
}
}
export default toNative(EditorComponent);
</script>

View File

@ -6,8 +6,8 @@
import MarkdownIt from 'markdown-it';
const md = new MarkdownIt();
@Component
class MarkdownRenderer extends Vue {
@DComponent
export default class MarkdownRenderer extends Vue {
@Prop({
default: false,
required: true
@ -18,5 +18,4 @@ class MarkdownRenderer extends Vue {
return md.render(this.text);
}
}
export default toNative(MarkdownRenderer);
</script>

View File

@ -7,19 +7,18 @@
<q-avatar>
<img src="https://cdn.quasar.dev/logo-v2/svg/logo-mono-white.svg">
</q-avatar>
Title
The Bingo Experience
</q-toolbar-title>
</q-toolbar>
</q-header>
</template>
<script lang="ts">
@Component({
@DComponent({
emits: [ 'toggleLeftDrawer' ]
})
class NavbarComponent extends Vue {
export default class NavbarComponent extends Vue {
@Emit
toggleLeftDrawer() {}
}
export default toNative(NavbarComponent);
</script>

View File

@ -21,8 +21,8 @@
</template>
<script lang="ts">
@Component
class SidebarComponent extends Vue {
@DComponent
export default class SidebarComponent extends Vue {
@Prop({
default: false,
required: true
@ -73,5 +73,4 @@ class SidebarComponent extends Vue {
// }
];
}
export default toNative(SidebarComponent);
</script>

View File

@ -25,46 +25,51 @@ export default defineConfig({
plugins: [
VueRouter(),
Components({
resolvers: [ QuasarResolver() ]
resolvers: [ QuasarResolver() ],
dts: true
}),
AutoImport({
include: [
/\.[tj]sx?$/, // .ts, .tsx, .js, .jsx
/\.vue$/,
/\.vue\?vue/, // .vue
/\.md$/ // .md
/\.vue\?vue/ // .vue
],
// imports: [
// // presets
// 'vue',
// 'vue-router'
// ],
imports: [ {
'vue-facing-decorator': [
'Component',
'ComponentBase',
'Setup',
'Ref',
'Watch',
'Prop',
'Provide',
'Inject',
'Emit',
'VModel',
'Model',
'Vanilla',
'Hook',
imports: [
// presets
'vue',
'vue-router',
{
'vue-facing-decorator': [
[
'Component',
'DComponent'
],
[
'Ref',
'DRef'
],
'Setup',
'Watch',
'Prop',
'Provide',
'Inject',
'Emit',
'VModel',
'Model',
'Vanilla',
'Hook',
'toNative',
'Vue'
],
'vue-markdown': [ 'VueMarkdown' ]
} ],
'toNative',
'Vue'
]
}
],
dirs: [ './src/components/**' ],
dts: true,
eslintrc: {
enabled: true
}
},
vueTemplate: true
}),
vue({