Skip to content

Commit 5219a1b

Browse files
committed
initial commit
1 parent 44a240d commit 5219a1b

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+1471
-3190
lines changed

auto-imports.d.ts

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -95,16 +95,12 @@ declare module 'vue' {
9595
interface GlobalComponents {}
9696
interface ComponentCustomProperties {
9797
readonly EffectScope: UnwrapRef<typeof import('vue')['EffectScope']>
98-
readonly acceptHMRUpdate: UnwrapRef<typeof import('pinia')['acceptHMRUpdate']>
9998
readonly computed: UnwrapRef<typeof import('vue')['computed']>
10099
readonly createApp: UnwrapRef<typeof import('vue')['createApp']>
101-
readonly createPinia: UnwrapRef<typeof import('pinia')['createPinia']>
102100
readonly customRef: UnwrapRef<typeof import('vue')['customRef']>
103101
readonly defineAsyncComponent: UnwrapRef<typeof import('vue')['defineAsyncComponent']>
104102
readonly defineComponent: UnwrapRef<typeof import('vue')['defineComponent']>
105-
readonly defineStore: UnwrapRef<typeof import('pinia')['defineStore']>
106103
readonly effectScope: UnwrapRef<typeof import('vue')['effectScope']>
107-
readonly getActivePinia: UnwrapRef<typeof import('pinia')['getActivePinia']>
108104
readonly getCurrentInstance: UnwrapRef<typeof import('vue')['getCurrentInstance']>
109105
readonly getCurrentScope: UnwrapRef<typeof import('vue')['getCurrentScope']>
110106
readonly h: UnwrapRef<typeof import('vue')['h']>
@@ -113,17 +109,10 @@ declare module 'vue' {
113109
readonly isReactive: UnwrapRef<typeof import('vue')['isReactive']>
114110
readonly isReadonly: UnwrapRef<typeof import('vue')['isReadonly']>
115111
readonly isRef: UnwrapRef<typeof import('vue')['isRef']>
116-
readonly mapActions: UnwrapRef<typeof import('pinia')['mapActions']>
117-
readonly mapGetters: UnwrapRef<typeof import('pinia')['mapGetters']>
118-
readonly mapState: UnwrapRef<typeof import('pinia')['mapState']>
119-
readonly mapStores: UnwrapRef<typeof import('pinia')['mapStores']>
120-
readonly mapWritableState: UnwrapRef<typeof import('pinia')['mapWritableState']>
121112
readonly markRaw: UnwrapRef<typeof import('vue')['markRaw']>
122113
readonly nextTick: UnwrapRef<typeof import('vue')['nextTick']>
123114
readonly onActivated: UnwrapRef<typeof import('vue')['onActivated']>
124115
readonly onBeforeMount: UnwrapRef<typeof import('vue')['onBeforeMount']>
125-
readonly onBeforeRouteLeave: UnwrapRef<typeof import('vue-router')['onBeforeRouteLeave']>
126-
readonly onBeforeRouteUpdate: UnwrapRef<typeof import('vue-router')['onBeforeRouteUpdate']>
127116
readonly onBeforeUnmount: UnwrapRef<typeof import('vue')['onBeforeUnmount']>
128117
readonly onBeforeUpdate: UnwrapRef<typeof import('vue')['onBeforeUpdate']>
129118
readonly onDeactivated: UnwrapRef<typeof import('vue')['onDeactivated']>
@@ -141,12 +130,9 @@ declare module 'vue' {
141130
readonly readonly: UnwrapRef<typeof import('vue')['readonly']>
142131
readonly ref: UnwrapRef<typeof import('vue')['ref']>
143132
readonly resolveComponent: UnwrapRef<typeof import('vue')['resolveComponent']>
144-
readonly setActivePinia: UnwrapRef<typeof import('pinia')['setActivePinia']>
145-
readonly setMapStoreSuffix: UnwrapRef<typeof import('pinia')['setMapStoreSuffix']>
146133
readonly shallowReactive: UnwrapRef<typeof import('vue')['shallowReactive']>
147134
readonly shallowReadonly: UnwrapRef<typeof import('vue')['shallowReadonly']>
148135
readonly shallowRef: UnwrapRef<typeof import('vue')['shallowRef']>
149-
readonly storeToRefs: UnwrapRef<typeof import('pinia')['storeToRefs']>
150136
readonly toRaw: UnwrapRef<typeof import('vue')['toRaw']>
151137
readonly toRef: UnwrapRef<typeof import('vue')['toRef']>
152138
readonly toRefs: UnwrapRef<typeof import('vue')['toRefs']>
@@ -156,14 +142,9 @@ declare module 'vue' {
156142
readonly useAttrs: UnwrapRef<typeof import('vue')['useAttrs']>
157143
readonly useCssModule: UnwrapRef<typeof import('vue')['useCssModule']>
158144
readonly useCssVars: UnwrapRef<typeof import('vue')['useCssVars']>
159-
readonly useHead: UnwrapRef<typeof import('@unhead/vue')['useHead']>
160145
readonly useId: UnwrapRef<typeof import('vue')['useId']>
161-
readonly useLink: UnwrapRef<typeof import('vue-router')['useLink']>
162146
readonly useModel: UnwrapRef<typeof import('vue')['useModel']>
163-
readonly useRoute: UnwrapRef<typeof import('vue-router')['useRoute']>
164-
readonly useRouter: UnwrapRef<typeof import('vue-router')['useRouter']>
165147
readonly useSlots: UnwrapRef<typeof import('vue')['useSlots']>
166-
readonly useStore: UnwrapRef<typeof import('@/store')['useStore']>
167148
readonly useTemplateRef: UnwrapRef<typeof import('vue')['useTemplateRef']>
168149
readonly watch: UnwrapRef<typeof import('vue')['watch']>
169150
readonly watchEffect: UnwrapRef<typeof import('vue')['watchEffect']>

biome.json

Lines changed: 0 additions & 68 deletions
This file was deleted.

components.d.ts

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,17 @@ export {}
88
/* prettier-ignore */
99
declare module 'vue' {
1010
export interface GlobalComponents {
11-
HelloWorld: typeof import('./src/components/HelloWorld.vue')['default']
12-
RouterLink: typeof import('vue-router')['RouterLink']
13-
RouterView: typeof import('vue-router')['RouterView']
11+
CheckboxField: typeof import('./src/components/fields/CheckboxField.vue')['default']
12+
FieldItem: typeof import('./src/components/FieldItem.vue')['default']
13+
FormBuilder: typeof import('./src/components/FormBuilder.vue')['default']
14+
HeadingField: typeof import('./src/components/fields/HeadingField.vue')['default']
15+
ParagraphField: typeof import('./src/components/fields/ParagraphField.vue')['default']
16+
RadioField: typeof import('./src/components/fields/RadioField.vue')['default']
17+
SectionField: typeof import('./src/components/fields/SectionField.vue')['default']
18+
SelectField: typeof import('./src/components/fields/SelectField.vue')['default']
19+
Test: typeof import('./src/components/test.vue')['default']
20+
TextAreaField: typeof import('./src/components/fields/TextAreaField.vue')['default']
21+
TextField: typeof import('./src/components/fields/TextField.vue')['default']
22+
ToolBar: typeof import('./src/components/ToolBar.vue')['default']
1423
}
1524
}

examples/App.vue

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
<template>
2+
<div class="p-6">
3+
<h1 class="text-2xl font-bold mb-4">Form Builder Playground</h1>
4+
5+
<!-- 👇 use your FormBuilder component -->
6+
<FormBuilder />
7+
</div>
8+
</template>
9+
10+
<script setup lang="ts">
11+
import { ref } from 'vue'
12+
import FormBuilder from '../src/components/FormBuilder.vue'
13+
14+
// Example fields you might later design
15+
const fields = ref([
16+
{ id: 'name', type: 'text', label: 'Name', required: true },
17+
{ id: 'email', type: 'email', label: 'Email', required: true },
18+
{ id: 'message', type: 'textarea', label: 'Message' },
19+
])
20+
21+
function handleSubmit(data: Record<string, any>) {
22+
console.log('Form submitted:', data)
23+
}
24+
</script>
25+
26+
<style scoped>
27+
/* playground-only styles */
28+
body {
29+
background-color: #f9fafb;
30+
}
31+
</style>

examples/auto-imports.d.ts

Lines changed: 135 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,135 @@
1+
/* eslint-disable */
2+
/* prettier-ignore */
3+
// @ts-nocheck
4+
// noinspection JSUnusedGlobalSymbols
5+
// Generated by unplugin-auto-import
6+
// biome-ignore lint: disable
7+
export {}
8+
declare global {
9+
const EffectScope: typeof import('vue')['EffectScope']
10+
const computed: typeof import('vue')['computed']
11+
const createApp: typeof import('vue')['createApp']
12+
const customRef: typeof import('vue')['customRef']
13+
const defineAsyncComponent: typeof import('vue')['defineAsyncComponent']
14+
const defineComponent: typeof import('vue')['defineComponent']
15+
const effectScope: typeof import('vue')['effectScope']
16+
const getCurrentInstance: typeof import('vue')['getCurrentInstance']
17+
const getCurrentScope: typeof import('vue')['getCurrentScope']
18+
const h: typeof import('vue')['h']
19+
const inject: typeof import('vue')['inject']
20+
const isProxy: typeof import('vue')['isProxy']
21+
const isReactive: typeof import('vue')['isReactive']
22+
const isReadonly: typeof import('vue')['isReadonly']
23+
const isRef: typeof import('vue')['isRef']
24+
const markRaw: typeof import('vue')['markRaw']
25+
const nextTick: typeof import('vue')['nextTick']
26+
const onActivated: typeof import('vue')['onActivated']
27+
const onBeforeMount: typeof import('vue')['onBeforeMount']
28+
const onBeforeUnmount: typeof import('vue')['onBeforeUnmount']
29+
const onBeforeUpdate: typeof import('vue')['onBeforeUpdate']
30+
const onDeactivated: typeof import('vue')['onDeactivated']
31+
const onErrorCaptured: typeof import('vue')['onErrorCaptured']
32+
const onMounted: typeof import('vue')['onMounted']
33+
const onRenderTracked: typeof import('vue')['onRenderTracked']
34+
const onRenderTriggered: typeof import('vue')['onRenderTriggered']
35+
const onScopeDispose: typeof import('vue')['onScopeDispose']
36+
const onServerPrefetch: typeof import('vue')['onServerPrefetch']
37+
const onUnmounted: typeof import('vue')['onUnmounted']
38+
const onUpdated: typeof import('vue')['onUpdated']
39+
const onWatcherCleanup: typeof import('vue')['onWatcherCleanup']
40+
const provide: typeof import('vue')['provide']
41+
const reactive: typeof import('vue')['reactive']
42+
const readonly: typeof import('vue')['readonly']
43+
const ref: typeof import('vue')['ref']
44+
const resolveComponent: typeof import('vue')['resolveComponent']
45+
const shallowReactive: typeof import('vue')['shallowReactive']
46+
const shallowReadonly: typeof import('vue')['shallowReadonly']
47+
const shallowRef: typeof import('vue')['shallowRef']
48+
const toRaw: typeof import('vue')['toRaw']
49+
const toRef: typeof import('vue')['toRef']
50+
const toRefs: typeof import('vue')['toRefs']
51+
const toValue: typeof import('vue')['toValue']
52+
const triggerRef: typeof import('vue')['triggerRef']
53+
const unref: typeof import('vue')['unref']
54+
const useAttrs: typeof import('vue')['useAttrs']
55+
const useCssModule: typeof import('vue')['useCssModule']
56+
const useCssVars: typeof import('vue')['useCssVars']
57+
const useId: typeof import('vue')['useId']
58+
const useModel: typeof import('vue')['useModel']
59+
const useSlots: typeof import('vue')['useSlots']
60+
const useTemplateRef: typeof import('vue')['useTemplateRef']
61+
const watch: typeof import('vue')['watch']
62+
const watchEffect: typeof import('vue')['watchEffect']
63+
const watchPostEffect: typeof import('vue')['watchPostEffect']
64+
const watchSyncEffect: typeof import('vue')['watchSyncEffect']
65+
}
66+
// for type re-export
67+
declare global {
68+
// @ts-ignore
69+
export type { Component, Slot, Slots, ComponentPublicInstance, ComputedRef, DirectiveBinding, ExtractDefaultPropTypes, ExtractPropTypes, ExtractPublicPropTypes, InjectionKey, PropType, Ref, MaybeRef, MaybeRefOrGetter, VNode, WritableComputedRef } from 'vue'
70+
import('vue')
71+
}
72+
73+
// for vue template auto import
74+
import { UnwrapRef } from 'vue'
75+
declare module 'vue' {
76+
interface GlobalComponents {}
77+
interface ComponentCustomProperties {
78+
readonly EffectScope: UnwrapRef<typeof import('vue')['EffectScope']>
79+
readonly computed: UnwrapRef<typeof import('vue')['computed']>
80+
readonly createApp: UnwrapRef<typeof import('vue')['createApp']>
81+
readonly customRef: UnwrapRef<typeof import('vue')['customRef']>
82+
readonly defineAsyncComponent: UnwrapRef<typeof import('vue')['defineAsyncComponent']>
83+
readonly defineComponent: UnwrapRef<typeof import('vue')['defineComponent']>
84+
readonly effectScope: UnwrapRef<typeof import('vue')['effectScope']>
85+
readonly getCurrentInstance: UnwrapRef<typeof import('vue')['getCurrentInstance']>
86+
readonly getCurrentScope: UnwrapRef<typeof import('vue')['getCurrentScope']>
87+
readonly h: UnwrapRef<typeof import('vue')['h']>
88+
readonly inject: UnwrapRef<typeof import('vue')['inject']>
89+
readonly isProxy: UnwrapRef<typeof import('vue')['isProxy']>
90+
readonly isReactive: UnwrapRef<typeof import('vue')['isReactive']>
91+
readonly isReadonly: UnwrapRef<typeof import('vue')['isReadonly']>
92+
readonly isRef: UnwrapRef<typeof import('vue')['isRef']>
93+
readonly markRaw: UnwrapRef<typeof import('vue')['markRaw']>
94+
readonly nextTick: UnwrapRef<typeof import('vue')['nextTick']>
95+
readonly onActivated: UnwrapRef<typeof import('vue')['onActivated']>
96+
readonly onBeforeMount: UnwrapRef<typeof import('vue')['onBeforeMount']>
97+
readonly onBeforeUnmount: UnwrapRef<typeof import('vue')['onBeforeUnmount']>
98+
readonly onBeforeUpdate: UnwrapRef<typeof import('vue')['onBeforeUpdate']>
99+
readonly onDeactivated: UnwrapRef<typeof import('vue')['onDeactivated']>
100+
readonly onErrorCaptured: UnwrapRef<typeof import('vue')['onErrorCaptured']>
101+
readonly onMounted: UnwrapRef<typeof import('vue')['onMounted']>
102+
readonly onRenderTracked: UnwrapRef<typeof import('vue')['onRenderTracked']>
103+
readonly onRenderTriggered: UnwrapRef<typeof import('vue')['onRenderTriggered']>
104+
readonly onScopeDispose: UnwrapRef<typeof import('vue')['onScopeDispose']>
105+
readonly onServerPrefetch: UnwrapRef<typeof import('vue')['onServerPrefetch']>
106+
readonly onUnmounted: UnwrapRef<typeof import('vue')['onUnmounted']>
107+
readonly onUpdated: UnwrapRef<typeof import('vue')['onUpdated']>
108+
readonly onWatcherCleanup: UnwrapRef<typeof import('vue')['onWatcherCleanup']>
109+
readonly provide: UnwrapRef<typeof import('vue')['provide']>
110+
readonly reactive: UnwrapRef<typeof import('vue')['reactive']>
111+
readonly readonly: UnwrapRef<typeof import('vue')['readonly']>
112+
readonly ref: UnwrapRef<typeof import('vue')['ref']>
113+
readonly resolveComponent: UnwrapRef<typeof import('vue')['resolveComponent']>
114+
readonly shallowReactive: UnwrapRef<typeof import('vue')['shallowReactive']>
115+
readonly shallowReadonly: UnwrapRef<typeof import('vue')['shallowReadonly']>
116+
readonly shallowRef: UnwrapRef<typeof import('vue')['shallowRef']>
117+
readonly toRaw: UnwrapRef<typeof import('vue')['toRaw']>
118+
readonly toRef: UnwrapRef<typeof import('vue')['toRef']>
119+
readonly toRefs: UnwrapRef<typeof import('vue')['toRefs']>
120+
readonly toValue: UnwrapRef<typeof import('vue')['toValue']>
121+
readonly triggerRef: UnwrapRef<typeof import('vue')['triggerRef']>
122+
readonly unref: UnwrapRef<typeof import('vue')['unref']>
123+
readonly useAttrs: UnwrapRef<typeof import('vue')['useAttrs']>
124+
readonly useCssModule: UnwrapRef<typeof import('vue')['useCssModule']>
125+
readonly useCssVars: UnwrapRef<typeof import('vue')['useCssVars']>
126+
readonly useId: UnwrapRef<typeof import('vue')['useId']>
127+
readonly useModel: UnwrapRef<typeof import('vue')['useModel']>
128+
readonly useSlots: UnwrapRef<typeof import('vue')['useSlots']>
129+
readonly useTemplateRef: UnwrapRef<typeof import('vue')['useTemplateRef']>
130+
readonly watch: UnwrapRef<typeof import('vue')['watch']>
131+
readonly watchEffect: UnwrapRef<typeof import('vue')['watchEffect']>
132+
readonly watchPostEffect: UnwrapRef<typeof import('vue')['watchPostEffect']>
133+
readonly watchSyncEffect: UnwrapRef<typeof import('vue')['watchSyncEffect']>
134+
}
135+
}
Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
1-
<!DOCTYPE html>
2-
<html class="min-h-full" lang="en">
3-
<head>
4-
<meta charset="UTF-8" />
5-
<link rel="icon" href="/favicon.ico" />
6-
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
7-
<title>Vite + Vue 3 + TypeScript + Tailwind Starter Template</title>
8-
</head>
9-
<body>
10-
<div id="app"></div>
11-
<script type="module" src="/src/main.ts"></script>
12-
<noscript>
13-
<h1>Opinionated, production ready template for Vite and Vue 3</h1>
14-
15-
<p>This site requires JavaScript to work.</p>
16-
</noscript>
17-
</body>
18-
</html>
1+
<!doctype html>
2+
<html class="min-h-full" lang="en">
3+
<head>
4+
<meta charset="UTF-8" />
5+
<link rel="icon" href="/favicon.ico" />
6+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
7+
<title>Vite + Vue 3 + TypeScript + Tailwind Starter Template</title>
8+
</head>
9+
<body>
10+
<div id="app"></div>
11+
<script type="module" src="main.ts"></script>
12+
<noscript>
13+
<h1>Opinionated, production ready template for Vite and Vue 3</h1>
14+
15+
<p>This site requires JavaScript to work.</p>
16+
</noscript>
17+
</body>
18+
</html>

examples/main.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
import { createApp } from 'vue'
2+
import App from './App.vue'
3+
4+
// import your library directly from src while developing
5+
import '../src/css/FormBuilder.css'
6+
import FormBuilder from '../src'
7+
8+
createApp(App).use(FormBuilder).mount('#app')

interface-extensions.d.ts

Lines changed: 0 additions & 20 deletions
This file was deleted.

0 commit comments

Comments
 (0)