@dragonmastery/zinia-forms-core 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +75 -0
- package/README.md +108 -0
- package/dist/index.d.ts +2163 -0
- package/dist/index.js +8544 -0
- package/dist/index.js.map +1 -0
- package/package.json +75 -0
- package/scripts/postinstall.js +27 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
ZINIA FORMS EVALUATION LICENSE
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 DragonMastery. All rights reserved.
|
|
4
|
+
|
|
5
|
+
================================================================================
|
|
6
|
+
|
|
7
|
+
NOTICE: This software and associated documentation files (the "Software") are
|
|
8
|
+
proprietary to DragonMastery.
|
|
9
|
+
|
|
10
|
+
GRANT OF EVALUATION LICENSE:
|
|
11
|
+
|
|
12
|
+
DragonMastery grants you a limited, non-exclusive, non-transferable, revocable
|
|
13
|
+
license to:
|
|
14
|
+
|
|
15
|
+
1. EVALUATION USE: Download and use the Software for evaluation and testing
|
|
16
|
+
purposes in non-production environments only.
|
|
17
|
+
|
|
18
|
+
2. DEVELOPMENT USE: Use the Software in local development environments for
|
|
19
|
+
proof-of-concept and evaluation purposes only.
|
|
20
|
+
|
|
21
|
+
3. INSPECTION: View and study the source code for evaluation purposes only.
|
|
22
|
+
|
|
23
|
+
RESTRICTIONS:
|
|
24
|
+
|
|
25
|
+
Without a separate commercial license from DragonMastery, you may NOT:
|
|
26
|
+
|
|
27
|
+
1. Use the Software in any production environment or live application
|
|
28
|
+
2. Use the Software in any commercial capacity or revenue-generating service
|
|
29
|
+
3. Modify, adapt, or create derivative works based on the Software
|
|
30
|
+
4. Redistribute, sublicense, sell, rent, lease, or transfer the Software
|
|
31
|
+
5. Remove or alter any copyright, trademark, or proprietary notices
|
|
32
|
+
6. Use the Software to develop competing products or services
|
|
33
|
+
7. Provide access to the Software to third parties for their use
|
|
34
|
+
|
|
35
|
+
PRODUCTION & COMMERCIAL LICENSE:
|
|
36
|
+
|
|
37
|
+
To use this Software in production environments or for commercial purposes, you
|
|
38
|
+
MUST obtain a separate commercial license from DragonMastery.
|
|
39
|
+
|
|
40
|
+
Contact for licensing:
|
|
41
|
+
|
|
42
|
+
- Repository: https://github.com/DragonMastery/zinia-forms
|
|
43
|
+
- Open a GitHub issue for licensing inquiries
|
|
44
|
+
|
|
45
|
+
TERMINATION:
|
|
46
|
+
|
|
47
|
+
This License is effective until terminated. Your rights under this License
|
|
48
|
+
terminate automatically without notice if you fail to comply with any term. Upon
|
|
49
|
+
termination, you must immediately cease all use and destroy all copies of the
|
|
50
|
+
Software.
|
|
51
|
+
|
|
52
|
+
DISCLAIMER OF WARRANTY:
|
|
53
|
+
|
|
54
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
55
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
|
56
|
+
FOR A PARTICULAR PURPOSE, AND NONINFRINGEMENT. DRAGONMASTERY MAKES NO WARRANTY
|
|
57
|
+
THAT THE SOFTWARE WILL BE ERROR-FREE OR UNINTERRUPTED.
|
|
58
|
+
|
|
59
|
+
LIMITATION OF LIABILITY:
|
|
60
|
+
|
|
61
|
+
IN NO EVENT SHALL DRAGONMASTERY BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
|
62
|
+
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
|
63
|
+
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
|
|
64
|
+
BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
|
65
|
+
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
|
|
66
|
+
IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
|
|
67
|
+
OF SUCH DAMAGE.
|
|
68
|
+
|
|
69
|
+
ACKNOWLEDGMENT:
|
|
70
|
+
|
|
71
|
+
By downloading, installing, or using the Software, you acknowledge that you have
|
|
72
|
+
read this License, understand it, and agree to be bound by its terms and
|
|
73
|
+
conditions.
|
|
74
|
+
|
|
75
|
+
================================================================================
|
package/README.md
ADDED
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
# Zinia Forms
|
|
2
|
+
|
|
3
|
+
A modern, type-safe form system for Vue 3 applications powered by:
|
|
4
|
+
|
|
5
|
+
- **Zod**: TypeScript-first schema validation
|
|
6
|
+
- **Vue 3**: Reactivity and component architecture
|
|
7
|
+
- **TypeScript**: End-to-end type safety
|
|
8
|
+
- **DaisyUI v5**: Beautiful UI components for Tailwind CSS v4
|
|
9
|
+
|
|
10
|
+
## 🌟 Key Features
|
|
11
|
+
|
|
12
|
+
- **Complete Type Safety**: Leverages TypeScript and Zod for end-to-end type
|
|
13
|
+
safety
|
|
14
|
+
- **Schema-Driven Forms**: Generate forms automatically from Zod schemas
|
|
15
|
+
- **Rich Field Types**: Support for all standard form fields plus custom
|
|
16
|
+
components
|
|
17
|
+
- **Component Generation**: Automatically generates typed components for each
|
|
18
|
+
field
|
|
19
|
+
- **Metadata Registry**: Enhance schemas with UI metadata for fine-grained
|
|
20
|
+
control
|
|
21
|
+
- **Style Flexibility**: Plugin-based style system with built-in DaisyUI and
|
|
22
|
+
minimal styling options
|
|
23
|
+
- **Nested Forms**: Handle complex nested data structures with ease
|
|
24
|
+
- **Form State Management**: Built-in validation, error handling, and form state
|
|
25
|
+
- **Smart Form Persistence**: Intelligent merging of server and local data
|
|
26
|
+
- **Automatic Data Loading**: Built-in data fetching with loading states
|
|
27
|
+
- **Reactive Loading States**: Track loading, errors, and form readiness
|
|
28
|
+
|
|
29
|
+
## 🚀 Quick Start
|
|
30
|
+
|
|
31
|
+
### Installation
|
|
32
|
+
|
|
33
|
+
```bash
|
|
34
|
+
# Install Zinia Forms and its peer dependencies
|
|
35
|
+
npm install zinia-forms zod vue@3 pinia
|
|
36
|
+
|
|
37
|
+
# Install UI dependencies (optional, but recommended for beautiful forms)
|
|
38
|
+
npm install tailwindcss@latest daisyui@latest
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
### Basic Usage
|
|
42
|
+
|
|
43
|
+
```typescript
|
|
44
|
+
import { z } from "zod";
|
|
45
|
+
import { useForm } from "zinia-forms";
|
|
46
|
+
|
|
47
|
+
// Define your schema
|
|
48
|
+
const loginSchema = z.object({
|
|
49
|
+
email: z.string().email("Please enter a valid email address"),
|
|
50
|
+
password: z.string().min(8, "Password must be at least 8 characters"),
|
|
51
|
+
});
|
|
52
|
+
|
|
53
|
+
// Use in your component
|
|
54
|
+
const { form, ZiniaForm, zinia, ZiniaSubmitButton } = useForm(loginSchema);
|
|
55
|
+
|
|
56
|
+
const handleSubmit = async (data) => {
|
|
57
|
+
console.log("Form data:", data);
|
|
58
|
+
};
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
```vue
|
|
62
|
+
<template>
|
|
63
|
+
<ZiniaForm :handleSubmit="handleSubmit">
|
|
64
|
+
<zinia.EmailField label="Email Address" />
|
|
65
|
+
<zinia.PasswordField label="Password" />
|
|
66
|
+
<ZiniaSubmitButton submitText="Login" />
|
|
67
|
+
</ZiniaForm>
|
|
68
|
+
</template>
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
## 📚 Documentation
|
|
72
|
+
|
|
73
|
+
For complete documentation, examples, and guides, visit the
|
|
74
|
+
[GitHub repository](https://github.com/DragonMastery/zinia-forms).
|
|
75
|
+
|
|
76
|
+
## ⚖️ License
|
|
77
|
+
|
|
78
|
+
**PROPRIETARY - Evaluation Use Only**
|
|
79
|
+
|
|
80
|
+
This software is proprietary and confidential. This package is provided for:
|
|
81
|
+
|
|
82
|
+
- ✅ Evaluation and testing in non-production environments
|
|
83
|
+
- ✅ Local development and proof-of-concept work
|
|
84
|
+
|
|
85
|
+
**❌ Production use is NOT permitted without a commercial license.**
|
|
86
|
+
|
|
87
|
+
### To Use in Production:
|
|
88
|
+
|
|
89
|
+
You must obtain a commercial license from DragonMastery.
|
|
90
|
+
|
|
91
|
+
**Contact for licensing:**
|
|
92
|
+
|
|
93
|
+
- Visit: https://github.com/DragonMastery/zinia-forms
|
|
94
|
+
- Open an issue for licensing inquiries
|
|
95
|
+
|
|
96
|
+
### License Restrictions:
|
|
97
|
+
|
|
98
|
+
Without a commercial license, you may NOT:
|
|
99
|
+
|
|
100
|
+
- Use this software in production environments
|
|
101
|
+
- Use this software in commercial applications
|
|
102
|
+
- Redistribute or share the software
|
|
103
|
+
|
|
104
|
+
See the [LICENSE](./LICENSE) file for complete terms and conditions.
|
|
105
|
+
|
|
106
|
+
---
|
|
107
|
+
|
|
108
|
+
© 2025 DragonMastery. All rights reserved.
|