pdyform 1.0.0 → 1.1.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/README.md CHANGED
@@ -1,34 +1,176 @@
1
1
  # pdyform
2
2
 
3
- A high-performance, schema-driven dynamic form system with React and Vue support.
3
+ [![npm version](https://badge.fury.io/js/pdyform.svg)](https://badge.fury.io/js/pdyform)
4
+ [![Tests](https://img.shields.io/badge/tests-6%20passed%20(100%25)-brightgreen.svg)]()
5
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
4
6
 
5
- ## Packages
7
+ [English](#english) | [中文说明](#中文说明)
6
8
 
7
- - `pdyform-core`: Framework-agnostic logic and schema parser.
9
+ ---
10
+
11
+ ## English
12
+
13
+ A high-performance, schema-driven dynamic form system with **React** and **Vue** support. It provides a framework-agnostic core logic for schema parsing and validation, allowing seamless integration across different frontend frameworks while maintaining a consistent configuration.
14
+
15
+ ### 🌟 Features
16
+
17
+ - **Schema-Driven**: Define your forms using a simple and intuitive JSON/JS schema.
18
+ - **Framework Agnostic Core**: Core logic is entirely framework-free, making it extremely lightweight.
19
+ - **React & Vue Support**: Out-of-the-box UI components for React (built on Shadcn UI) and Vue (built on Shadcn-vue).
20
+ - **High Performance**: Optimized rendering to prevent unnecessary re-renders on complex forms.
21
+ - **100% Test Coverage**: Core logic and UI components are fully unit-tested with a 100% pass rate.
22
+
23
+ ### 📦 Packages
24
+
25
+ The monorepo contains the following packages:
26
+
27
+ - `pdyform-core`: Framework-agnostic logic, utilities, and schema parser.
8
28
  - `pdyform-react`: React components based on Shadcn UI.
9
29
  - `pdyform-vue`: Vue components based on Shadcn-vue.
10
30
 
11
- ## Development
31
+ ### 🚀 Installation
12
32
 
13
33
  ```bash
14
- # Build all packages
15
- pnpm run build:all
16
-
17
- # Run all tests
18
- pnpm run test:all
34
+ npm install pdyform
35
+ # or
36
+ pnpm add pdyform
37
+ # or
38
+ yarn add pdyform
19
39
  ```
20
40
 
21
- ## Usage
41
+ ### 💻 Usage
22
42
 
23
43
  This package provides a unified entry point. You can import framework-specific components directly from the main package:
24
44
 
25
- ```typescript
26
- // Core logic
27
- import { validateField } from 'pdyform/core';
45
+ #### React
28
46
 
29
- // React components
47
+ ```tsx
48
+ import React from 'react';
30
49
  import { DynamicForm } from 'pdyform/react';
50
+ import type { FormSchema } from 'pdyform/core';
51
+
52
+ const schema: FormSchema = {
53
+ fields: [
54
+ { name: 'username', label: 'Username', type: 'text', required: true },
55
+ { name: 'email', label: 'Email', type: 'text', required: true, rules: { pattern: '\\S+@\\S+\\.\\S+' } }
56
+ ]
57
+ };
58
+
59
+ export default function App() {
60
+ return <DynamicForm schema={schema} onSubmit={console.log} />;
61
+ }
62
+ ```
63
+
64
+ #### Vue
31
65
 
32
- // Vue components
66
+ ```vue
67
+ <script setup lang="ts">
33
68
  import { DynamicForm } from 'pdyform/vue';
69
+ import type { FormSchema } from 'pdyform/core';
70
+
71
+ const schema: FormSchema = {
72
+ fields: [
73
+ { name: 'username', label: 'Username', type: 'text', required: true },
74
+ { name: 'email', label: 'Email', type: 'text', required: true, rules: { pattern: '\\S+@\\S+\\.\\S+' } }
75
+ ]
76
+ };
77
+
78
+ const handleSubmit = (data: any) => console.log(data);
79
+ </script>
80
+
81
+ <template>
82
+ <DynamicForm :schema="schema" @submit="handleSubmit" />
83
+ </template>
84
+ ```
85
+
86
+ ---
87
+
88
+ ## 中文说明
89
+
90
+ 一个高性能、基于 Schema 驱动的动态表单系统,同时支持 **React** 和 **Vue**。它提供了一个与框架无关的核心逻辑层用于 Schema 解析和表单校验,允许在不同的前端框架中无缝集成并保持一致的配置体验。
91
+
92
+ ### 🌟 特性
93
+
94
+ - **Schema 驱动**: 使用简单直观的 JSON/JS 对象定义你的表单。
95
+ - **框架无关核心**: 核心逻辑完全独立于任何 UI 框架,极其轻量化。
96
+ - **支持 React & Vue**: 开箱即用的 UI 组件,React 版本基于 Shadcn UI,Vue 版本基于 Shadcn-vue。
97
+ - **高性能**: 渲染优化机制,避免复杂表单场景下的无效重渲染。
98
+ - **可靠的测试覆盖率**: 核心逻辑与 UI 层均经过严格的单元测试,用例通过率 100%。
99
+
100
+ ### 📦 包结构
101
+
102
+ 此 Monorepo 包含以下几个核心子包:
103
+
104
+ - `pdyform-core`: 与框架无关的核心表单逻辑、校验工具和 Schema 解析器。
105
+ - `pdyform-react`: 基于 Shadcn UI 的 React 动态表单组件。
106
+ - `pdyform-vue`: 基于 Shadcn-vue 的 Vue 动态表单组件。
107
+
108
+ ### 🚀 安装
109
+
110
+ ```bash
111
+ npm install pdyform
112
+ # 或
113
+ pnpm add pdyform
114
+ # 或
115
+ yarn add pdyform
116
+ ```
117
+
118
+ ### 💻 基本使用
119
+
120
+ `pdyform` 提供了统一的导出入口。你可以直接从主包中按需引入对应框架的组件和核心类型:
121
+
122
+ #### React 示例
123
+
124
+ ```tsx
125
+ import React from 'react';
126
+ import { DynamicForm } from 'pdyform/react';
127
+ import type { FormSchema } from 'pdyform/core';
128
+
129
+ const schema: FormSchema = {
130
+ fields: [
131
+ { name: 'username', label: '用户名', type: 'text', required: true },
132
+ { name: 'email', label: '邮箱', type: 'text', required: true, rules: { pattern: '\\S+@\\S+\\.\\S+' } }
133
+ ]
134
+ };
135
+
136
+ export default function App() {
137
+ return <DynamicForm schema={schema} onSubmit={console.log} />;
138
+ }
139
+ ```
140
+
141
+ #### Vue 示例
142
+
143
+ ```vue
144
+ <script setup lang="ts">
145
+ import { DynamicForm } from 'pdyform/vue';
146
+ import type { FormSchema } from 'pdyform/core';
147
+
148
+ const schema: FormSchema = {
149
+ fields: [
150
+ { name: 'username', label: '用户名', type: 'text', required: true },
151
+ { name: 'email', label: '邮箱', type: 'text', required: true, rules: { pattern: '\\S+@\\S+\\.\\S+' } }
152
+ ]
153
+ };
154
+
155
+ const handleSubmit = (data: any) => console.log(data);
156
+ </script>
157
+
158
+ <template>
159
+ <DynamicForm :schema="schema" @submit="handleSubmit" />
160
+ </template>
161
+ ```
162
+
163
+ ---
164
+
165
+ ## 🛠️ Development / 本地开发
166
+
167
+ ```bash
168
+ # Install dependencies / 安装依赖
169
+ pnpm install
170
+
171
+ # Build all packages / 编译所有包
172
+ pnpm run build:all
173
+
174
+ # Run all tests / 运行所有单元测试
175
+ pnpm run test:all
34
176
  ```
package/package.json CHANGED
@@ -1,17 +1,29 @@
1
1
  {
2
2
  "name": "pdyform",
3
+ "description": "A high-performance, schema-driven dynamic form system with React and Vue support.",
4
+ "keywords": [
5
+ "dynamic-form",
6
+ "schema-form",
7
+ "react",
8
+ "vue",
9
+ "json-schema",
10
+ "form-builder"
11
+ ],
3
12
  "exports": {
4
13
  "./core": {
5
- "types": "./packages/core/src/index.ts",
6
- "import": "./packages/core/src/index.ts"
14
+ "types": "./packages/core/dist/index.d.ts",
15
+ "import": "./packages/core/dist/index.mjs",
16
+ "require": "./packages/core/dist/index.js"
7
17
  },
8
18
  "./react": {
9
- "types": "./packages/react/src/index.tsx",
10
- "import": "./packages/react/src/index.tsx"
19
+ "types": "./packages/react/dist/index.d.ts",
20
+ "import": "./packages/react/dist/index.js",
21
+ "require": "./packages/react/dist/index.cjs"
11
22
  },
12
23
  "./vue": {
13
- "types": "./packages/vue/src/index.ts",
14
- "import": "./packages/vue/src/index.ts"
24
+ "types": "./packages/vue/dist/index.d.ts",
25
+ "import": "./packages/vue/dist/index.mjs",
26
+ "require": "./packages/vue/dist/index.js"
15
27
  }
16
28
  },
17
29
  "license": "MIT",
@@ -35,7 +47,7 @@
35
47
  "typescript-eslint": "^8.56.1",
36
48
  "vitest": "^1.0.0"
37
49
  },
38
- "version": "1.0.0",
50
+ "version": "1.1.0",
39
51
  "scripts": {
40
52
  "build:all": "turbo run build",
41
53
  "dev:all": "turbo run dev",
@@ -0,0 +1,17 @@
1
+ #!/bin/sh
2
+ basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
3
+
4
+ case `uname` in
5
+ *CYGWIN*) basedir=`cygpath -w "$basedir"`;;
6
+ esac
7
+
8
+ if [ -z "$NODE_PATH" ]; then
9
+ export NODE_PATH="/Users/pidan/Work/Learn/dynamic-form/node_modules/.pnpm/@microsoft+api-extractor@7.57.6_@types+node@20.19.35/node_modules/@microsoft/api-extractor/bin/node_modules:/Users/pidan/Work/Learn/dynamic-form/node_modules/.pnpm/@microsoft+api-extractor@7.57.6_@types+node@20.19.35/node_modules/@microsoft/api-extractor/node_modules:/Users/pidan/Work/Learn/dynamic-form/node_modules/.pnpm/@microsoft+api-extractor@7.57.6_@types+node@20.19.35/node_modules/@microsoft/node_modules:/Users/pidan/Work/Learn/dynamic-form/node_modules/.pnpm/@microsoft+api-extractor@7.57.6_@types+node@20.19.35/node_modules:/Users/pidan/Work/Learn/dynamic-form/node_modules/.pnpm/node_modules"
10
+ else
11
+ export NODE_PATH="/Users/pidan/Work/Learn/dynamic-form/node_modules/.pnpm/@microsoft+api-extractor@7.57.6_@types+node@20.19.35/node_modules/@microsoft/api-extractor/bin/node_modules:/Users/pidan/Work/Learn/dynamic-form/node_modules/.pnpm/@microsoft+api-extractor@7.57.6_@types+node@20.19.35/node_modules/@microsoft/api-extractor/node_modules:/Users/pidan/Work/Learn/dynamic-form/node_modules/.pnpm/@microsoft+api-extractor@7.57.6_@types+node@20.19.35/node_modules/@microsoft/node_modules:/Users/pidan/Work/Learn/dynamic-form/node_modules/.pnpm/@microsoft+api-extractor@7.57.6_@types+node@20.19.35/node_modules:/Users/pidan/Work/Learn/dynamic-form/node_modules/.pnpm/node_modules:$NODE_PATH"
12
+ fi
13
+ if [ -x "$basedir/node" ]; then
14
+ exec "$basedir/node" "$basedir/../../../../node_modules/.pnpm/@microsoft+api-extractor@7.57.6_@types+node@20.19.35/node_modules/@microsoft/api-extractor/bin/api-extractor" "$@"
15
+ else
16
+ exec node "$basedir/../../../../node_modules/.pnpm/@microsoft+api-extractor@7.57.6_@types+node@20.19.35/node_modules/@microsoft/api-extractor/bin/api-extractor" "$@"
17
+ fi
@@ -6,9 +6,9 @@ case `uname` in
6
6
  esac
7
7
 
8
8
  if [ -z "$NODE_PATH" ]; then
9
- export NODE_PATH="/Users/pidan/Work/Learn/dynamic-form/node_modules/.pnpm/tsup@8.5.1_postcss@8.5.8_typescript@5.9.3/node_modules/tsup/dist/node_modules:/Users/pidan/Work/Learn/dynamic-form/node_modules/.pnpm/tsup@8.5.1_postcss@8.5.8_typescript@5.9.3/node_modules/tsup/node_modules:/Users/pidan/Work/Learn/dynamic-form/node_modules/.pnpm/tsup@8.5.1_postcss@8.5.8_typescript@5.9.3/node_modules:/Users/pidan/Work/Learn/dynamic-form/node_modules/.pnpm/node_modules"
9
+ export NODE_PATH="/Users/pidan/Work/Learn/dynamic-form/node_modules/.pnpm/tsup@8.5.1_@microsoft+api-extractor@7.57.6_@types+node@20.19.35__postcss@8.5.8_typescript@5.9.3/node_modules/tsup/dist/node_modules:/Users/pidan/Work/Learn/dynamic-form/node_modules/.pnpm/tsup@8.5.1_@microsoft+api-extractor@7.57.6_@types+node@20.19.35__postcss@8.5.8_typescript@5.9.3/node_modules/tsup/node_modules:/Users/pidan/Work/Learn/dynamic-form/node_modules/.pnpm/tsup@8.5.1_@microsoft+api-extractor@7.57.6_@types+node@20.19.35__postcss@8.5.8_typescript@5.9.3/node_modules:/Users/pidan/Work/Learn/dynamic-form/node_modules/.pnpm/node_modules"
10
10
  else
11
- export NODE_PATH="/Users/pidan/Work/Learn/dynamic-form/node_modules/.pnpm/tsup@8.5.1_postcss@8.5.8_typescript@5.9.3/node_modules/tsup/dist/node_modules:/Users/pidan/Work/Learn/dynamic-form/node_modules/.pnpm/tsup@8.5.1_postcss@8.5.8_typescript@5.9.3/node_modules/tsup/node_modules:/Users/pidan/Work/Learn/dynamic-form/node_modules/.pnpm/tsup@8.5.1_postcss@8.5.8_typescript@5.9.3/node_modules:/Users/pidan/Work/Learn/dynamic-form/node_modules/.pnpm/node_modules:$NODE_PATH"
11
+ export NODE_PATH="/Users/pidan/Work/Learn/dynamic-form/node_modules/.pnpm/tsup@8.5.1_@microsoft+api-extractor@7.57.6_@types+node@20.19.35__postcss@8.5.8_typescript@5.9.3/node_modules/tsup/dist/node_modules:/Users/pidan/Work/Learn/dynamic-form/node_modules/.pnpm/tsup@8.5.1_@microsoft+api-extractor@7.57.6_@types+node@20.19.35__postcss@8.5.8_typescript@5.9.3/node_modules/tsup/node_modules:/Users/pidan/Work/Learn/dynamic-form/node_modules/.pnpm/tsup@8.5.1_@microsoft+api-extractor@7.57.6_@types+node@20.19.35__postcss@8.5.8_typescript@5.9.3/node_modules:/Users/pidan/Work/Learn/dynamic-form/node_modules/.pnpm/node_modules:$NODE_PATH"
12
12
  fi
13
13
  if [ -x "$basedir/node" ]; then
14
14
  exec "$basedir/node" "$basedir/../tsup/dist/cli-default.js" "$@"
@@ -6,9 +6,9 @@ case `uname` in
6
6
  esac
7
7
 
8
8
  if [ -z "$NODE_PATH" ]; then
9
- export NODE_PATH="/Users/pidan/Work/Learn/dynamic-form/node_modules/.pnpm/tsup@8.5.1_postcss@8.5.8_typescript@5.9.3/node_modules/tsup/dist/node_modules:/Users/pidan/Work/Learn/dynamic-form/node_modules/.pnpm/tsup@8.5.1_postcss@8.5.8_typescript@5.9.3/node_modules/tsup/node_modules:/Users/pidan/Work/Learn/dynamic-form/node_modules/.pnpm/tsup@8.5.1_postcss@8.5.8_typescript@5.9.3/node_modules:/Users/pidan/Work/Learn/dynamic-form/node_modules/.pnpm/node_modules"
9
+ export NODE_PATH="/Users/pidan/Work/Learn/dynamic-form/node_modules/.pnpm/tsup@8.5.1_@microsoft+api-extractor@7.57.6_@types+node@20.19.35__postcss@8.5.8_typescript@5.9.3/node_modules/tsup/dist/node_modules:/Users/pidan/Work/Learn/dynamic-form/node_modules/.pnpm/tsup@8.5.1_@microsoft+api-extractor@7.57.6_@types+node@20.19.35__postcss@8.5.8_typescript@5.9.3/node_modules/tsup/node_modules:/Users/pidan/Work/Learn/dynamic-form/node_modules/.pnpm/tsup@8.5.1_@microsoft+api-extractor@7.57.6_@types+node@20.19.35__postcss@8.5.8_typescript@5.9.3/node_modules:/Users/pidan/Work/Learn/dynamic-form/node_modules/.pnpm/node_modules"
10
10
  else
11
- export NODE_PATH="/Users/pidan/Work/Learn/dynamic-form/node_modules/.pnpm/tsup@8.5.1_postcss@8.5.8_typescript@5.9.3/node_modules/tsup/dist/node_modules:/Users/pidan/Work/Learn/dynamic-form/node_modules/.pnpm/tsup@8.5.1_postcss@8.5.8_typescript@5.9.3/node_modules/tsup/node_modules:/Users/pidan/Work/Learn/dynamic-form/node_modules/.pnpm/tsup@8.5.1_postcss@8.5.8_typescript@5.9.3/node_modules:/Users/pidan/Work/Learn/dynamic-form/node_modules/.pnpm/node_modules:$NODE_PATH"
11
+ export NODE_PATH="/Users/pidan/Work/Learn/dynamic-form/node_modules/.pnpm/tsup@8.5.1_@microsoft+api-extractor@7.57.6_@types+node@20.19.35__postcss@8.5.8_typescript@5.9.3/node_modules/tsup/dist/node_modules:/Users/pidan/Work/Learn/dynamic-form/node_modules/.pnpm/tsup@8.5.1_@microsoft+api-extractor@7.57.6_@types+node@20.19.35__postcss@8.5.8_typescript@5.9.3/node_modules/tsup/node_modules:/Users/pidan/Work/Learn/dynamic-form/node_modules/.pnpm/tsup@8.5.1_@microsoft+api-extractor@7.57.6_@types+node@20.19.35__postcss@8.5.8_typescript@5.9.3/node_modules:/Users/pidan/Work/Learn/dynamic-form/node_modules/.pnpm/node_modules:$NODE_PATH"
12
12
  fi
13
13
  if [ -x "$basedir/node" ]; then
14
14
  exec "$basedir/node" "$basedir/../tsup/dist/cli-node.js" "$@"
@@ -1,6 +1,13 @@
1
1
  {
2
2
  "name": "pdyform-core",
3
3
  "version": "1.0.0",
4
+ "description": "Core logic and schema parser for pdyform.",
5
+ "keywords": [
6
+ "dynamic-form",
7
+ "schema-form",
8
+ "core",
9
+ "json-schema"
10
+ ],
4
11
  "type": "module",
5
12
  "main": "./dist/index.js",
6
13
  "module": "./dist/index.mjs",
@@ -0,0 +1,17 @@
1
+ #!/bin/sh
2
+ basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
3
+
4
+ case `uname` in
5
+ *CYGWIN*) basedir=`cygpath -w "$basedir"`;;
6
+ esac
7
+
8
+ if [ -z "$NODE_PATH" ]; then
9
+ export NODE_PATH="/Users/pidan/Work/Learn/dynamic-form/node_modules/.pnpm/@microsoft+api-extractor@7.57.6_@types+node@20.19.35/node_modules/@microsoft/api-extractor/bin/node_modules:/Users/pidan/Work/Learn/dynamic-form/node_modules/.pnpm/@microsoft+api-extractor@7.57.6_@types+node@20.19.35/node_modules/@microsoft/api-extractor/node_modules:/Users/pidan/Work/Learn/dynamic-form/node_modules/.pnpm/@microsoft+api-extractor@7.57.6_@types+node@20.19.35/node_modules/@microsoft/node_modules:/Users/pidan/Work/Learn/dynamic-form/node_modules/.pnpm/@microsoft+api-extractor@7.57.6_@types+node@20.19.35/node_modules:/Users/pidan/Work/Learn/dynamic-form/node_modules/.pnpm/node_modules"
10
+ else
11
+ export NODE_PATH="/Users/pidan/Work/Learn/dynamic-form/node_modules/.pnpm/@microsoft+api-extractor@7.57.6_@types+node@20.19.35/node_modules/@microsoft/api-extractor/bin/node_modules:/Users/pidan/Work/Learn/dynamic-form/node_modules/.pnpm/@microsoft+api-extractor@7.57.6_@types+node@20.19.35/node_modules/@microsoft/api-extractor/node_modules:/Users/pidan/Work/Learn/dynamic-form/node_modules/.pnpm/@microsoft+api-extractor@7.57.6_@types+node@20.19.35/node_modules/@microsoft/node_modules:/Users/pidan/Work/Learn/dynamic-form/node_modules/.pnpm/@microsoft+api-extractor@7.57.6_@types+node@20.19.35/node_modules:/Users/pidan/Work/Learn/dynamic-form/node_modules/.pnpm/node_modules:$NODE_PATH"
12
+ fi
13
+ if [ -x "$basedir/node" ]; then
14
+ exec "$basedir/node" "$basedir/../../../../node_modules/.pnpm/@microsoft+api-extractor@7.57.6_@types+node@20.19.35/node_modules/@microsoft/api-extractor/bin/api-extractor" "$@"
15
+ else
16
+ exec node "$basedir/../../../../node_modules/.pnpm/@microsoft+api-extractor@7.57.6_@types+node@20.19.35/node_modules/@microsoft/api-extractor/bin/api-extractor" "$@"
17
+ fi
@@ -6,9 +6,9 @@ case `uname` in
6
6
  esac
7
7
 
8
8
  if [ -z "$NODE_PATH" ]; then
9
- export NODE_PATH="/Users/pidan/Work/Learn/dynamic-form/node_modules/.pnpm/tsup@8.5.1_postcss@8.5.8_typescript@5.9.3/node_modules/tsup/dist/node_modules:/Users/pidan/Work/Learn/dynamic-form/node_modules/.pnpm/tsup@8.5.1_postcss@8.5.8_typescript@5.9.3/node_modules/tsup/node_modules:/Users/pidan/Work/Learn/dynamic-form/node_modules/.pnpm/tsup@8.5.1_postcss@8.5.8_typescript@5.9.3/node_modules:/Users/pidan/Work/Learn/dynamic-form/node_modules/.pnpm/node_modules"
9
+ export NODE_PATH="/Users/pidan/Work/Learn/dynamic-form/node_modules/.pnpm/tsup@8.5.1_@microsoft+api-extractor@7.57.6_@types+node@20.19.35__postcss@8.5.8_typescript@5.9.3/node_modules/tsup/dist/node_modules:/Users/pidan/Work/Learn/dynamic-form/node_modules/.pnpm/tsup@8.5.1_@microsoft+api-extractor@7.57.6_@types+node@20.19.35__postcss@8.5.8_typescript@5.9.3/node_modules/tsup/node_modules:/Users/pidan/Work/Learn/dynamic-form/node_modules/.pnpm/tsup@8.5.1_@microsoft+api-extractor@7.57.6_@types+node@20.19.35__postcss@8.5.8_typescript@5.9.3/node_modules:/Users/pidan/Work/Learn/dynamic-form/node_modules/.pnpm/node_modules"
10
10
  else
11
- export NODE_PATH="/Users/pidan/Work/Learn/dynamic-form/node_modules/.pnpm/tsup@8.5.1_postcss@8.5.8_typescript@5.9.3/node_modules/tsup/dist/node_modules:/Users/pidan/Work/Learn/dynamic-form/node_modules/.pnpm/tsup@8.5.1_postcss@8.5.8_typescript@5.9.3/node_modules/tsup/node_modules:/Users/pidan/Work/Learn/dynamic-form/node_modules/.pnpm/tsup@8.5.1_postcss@8.5.8_typescript@5.9.3/node_modules:/Users/pidan/Work/Learn/dynamic-form/node_modules/.pnpm/node_modules:$NODE_PATH"
11
+ export NODE_PATH="/Users/pidan/Work/Learn/dynamic-form/node_modules/.pnpm/tsup@8.5.1_@microsoft+api-extractor@7.57.6_@types+node@20.19.35__postcss@8.5.8_typescript@5.9.3/node_modules/tsup/dist/node_modules:/Users/pidan/Work/Learn/dynamic-form/node_modules/.pnpm/tsup@8.5.1_@microsoft+api-extractor@7.57.6_@types+node@20.19.35__postcss@8.5.8_typescript@5.9.3/node_modules/tsup/node_modules:/Users/pidan/Work/Learn/dynamic-form/node_modules/.pnpm/tsup@8.5.1_@microsoft+api-extractor@7.57.6_@types+node@20.19.35__postcss@8.5.8_typescript@5.9.3/node_modules:/Users/pidan/Work/Learn/dynamic-form/node_modules/.pnpm/node_modules:$NODE_PATH"
12
12
  fi
13
13
  if [ -x "$basedir/node" ]; then
14
14
  exec "$basedir/node" "$basedir/../tsup/dist/cli-default.js" "$@"
@@ -6,9 +6,9 @@ case `uname` in
6
6
  esac
7
7
 
8
8
  if [ -z "$NODE_PATH" ]; then
9
- export NODE_PATH="/Users/pidan/Work/Learn/dynamic-form/node_modules/.pnpm/tsup@8.5.1_postcss@8.5.8_typescript@5.9.3/node_modules/tsup/dist/node_modules:/Users/pidan/Work/Learn/dynamic-form/node_modules/.pnpm/tsup@8.5.1_postcss@8.5.8_typescript@5.9.3/node_modules/tsup/node_modules:/Users/pidan/Work/Learn/dynamic-form/node_modules/.pnpm/tsup@8.5.1_postcss@8.5.8_typescript@5.9.3/node_modules:/Users/pidan/Work/Learn/dynamic-form/node_modules/.pnpm/node_modules"
9
+ export NODE_PATH="/Users/pidan/Work/Learn/dynamic-form/node_modules/.pnpm/tsup@8.5.1_@microsoft+api-extractor@7.57.6_@types+node@20.19.35__postcss@8.5.8_typescript@5.9.3/node_modules/tsup/dist/node_modules:/Users/pidan/Work/Learn/dynamic-form/node_modules/.pnpm/tsup@8.5.1_@microsoft+api-extractor@7.57.6_@types+node@20.19.35__postcss@8.5.8_typescript@5.9.3/node_modules/tsup/node_modules:/Users/pidan/Work/Learn/dynamic-form/node_modules/.pnpm/tsup@8.5.1_@microsoft+api-extractor@7.57.6_@types+node@20.19.35__postcss@8.5.8_typescript@5.9.3/node_modules:/Users/pidan/Work/Learn/dynamic-form/node_modules/.pnpm/node_modules"
10
10
  else
11
- export NODE_PATH="/Users/pidan/Work/Learn/dynamic-form/node_modules/.pnpm/tsup@8.5.1_postcss@8.5.8_typescript@5.9.3/node_modules/tsup/dist/node_modules:/Users/pidan/Work/Learn/dynamic-form/node_modules/.pnpm/tsup@8.5.1_postcss@8.5.8_typescript@5.9.3/node_modules/tsup/node_modules:/Users/pidan/Work/Learn/dynamic-form/node_modules/.pnpm/tsup@8.5.1_postcss@8.5.8_typescript@5.9.3/node_modules:/Users/pidan/Work/Learn/dynamic-form/node_modules/.pnpm/node_modules:$NODE_PATH"
11
+ export NODE_PATH="/Users/pidan/Work/Learn/dynamic-form/node_modules/.pnpm/tsup@8.5.1_@microsoft+api-extractor@7.57.6_@types+node@20.19.35__postcss@8.5.8_typescript@5.9.3/node_modules/tsup/dist/node_modules:/Users/pidan/Work/Learn/dynamic-form/node_modules/.pnpm/tsup@8.5.1_@microsoft+api-extractor@7.57.6_@types+node@20.19.35__postcss@8.5.8_typescript@5.9.3/node_modules/tsup/node_modules:/Users/pidan/Work/Learn/dynamic-form/node_modules/.pnpm/tsup@8.5.1_@microsoft+api-extractor@7.57.6_@types+node@20.19.35__postcss@8.5.8_typescript@5.9.3/node_modules:/Users/pidan/Work/Learn/dynamic-form/node_modules/.pnpm/node_modules:$NODE_PATH"
12
12
  fi
13
13
  if [ -x "$basedir/node" ]; then
14
14
  exec "$basedir/node" "$basedir/../tsup/dist/cli-node.js" "$@"
@@ -1,6 +1,13 @@
1
1
  {
2
2
  "name": "pdyform-react",
3
3
  "version": "1.0.0",
4
+ "description": "React components for pdyform based on Shadcn UI.",
5
+ "keywords": [
6
+ "dynamic-form",
7
+ "schema-form",
8
+ "react",
9
+ "shadcn"
10
+ ],
4
11
  "type": "module",
5
12
  "main": "./dist/index.js",
6
13
  "module": "./dist/index.mjs",
@@ -0,0 +1,65 @@
1
+ import { ComponentOptionsMixin } from 'vue';
2
+ import { ComponentProvideOptions } from 'vue';
3
+ import { DefineComponent } from 'vue';
4
+ import { PublicProps } from 'vue';
5
+
6
+ declare type __VLS_Props = {
7
+ schema: FormSchema;
8
+ className?: string;
9
+ };
10
+
11
+ declare type __VLS_Props_2 = {
12
+ field: FormField;
13
+ modelValue: any;
14
+ error?: string;
15
+ };
16
+
17
+ export declare const DynamicForm: DefineComponent<__VLS_Props, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
18
+ submit: (...args: any[]) => void;
19
+ }, string, PublicProps, Readonly<__VLS_Props> & Readonly<{
20
+ onSubmit?: ((...args: any[]) => any) | undefined;
21
+ }>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLFormElement>;
22
+
23
+ declare type FieldType = 'text' | 'number' | 'email' | 'password' | 'select' | 'checkbox' | 'radio' | 'textarea' | 'date';
24
+
25
+ declare interface FormField {
26
+ id: string;
27
+ name: string;
28
+ label: string;
29
+ type: FieldType;
30
+ placeholder?: string;
31
+ description?: string;
32
+ defaultValue?: any;
33
+ options?: Option_2[]; // For select, radio, checkbox
34
+ validations?: ValidationRule[];
35
+ hidden?: boolean;
36
+ disabled?: boolean;
37
+ className?: string; // CSS class for custom styling
38
+ }
39
+
40
+ export declare const FormFieldRenderer: DefineComponent<__VLS_Props_2, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
41
+ "update:modelValue": (...args: any[]) => void;
42
+ }, string, PublicProps, Readonly<__VLS_Props_2> & Readonly<{
43
+ "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
44
+ }>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLDivElement>;
45
+
46
+ declare interface FormSchema {
47
+ title?: string;
48
+ description?: string;
49
+ fields: FormField[];
50
+ submitButtonText?: string;
51
+ }
52
+
53
+ declare interface Option_2 {
54
+ label: string;
55
+ value: string | number;
56
+ }
57
+
58
+ declare interface ValidationRule {
59
+ type: 'required' | 'min' | 'max' | 'pattern' | 'email' | 'custom';
60
+ value?: any;
61
+ message?: string;
62
+ validator?: (value: any) => boolean | string;
63
+ }
64
+
65
+ export { }
@@ -0,0 +1,17 @@
1
+ #!/bin/sh
2
+ basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
3
+
4
+ case `uname` in
5
+ *CYGWIN*) basedir=`cygpath -w "$basedir"`;;
6
+ esac
7
+
8
+ if [ -z "$NODE_PATH" ]; then
9
+ export NODE_PATH="/Users/pidan/Work/Learn/dynamic-form/node_modules/.pnpm/rollup@4.59.0/node_modules/rollup/dist/bin/node_modules:/Users/pidan/Work/Learn/dynamic-form/node_modules/.pnpm/rollup@4.59.0/node_modules/rollup/dist/node_modules:/Users/pidan/Work/Learn/dynamic-form/node_modules/.pnpm/rollup@4.59.0/node_modules/rollup/node_modules:/Users/pidan/Work/Learn/dynamic-form/node_modules/.pnpm/rollup@4.59.0/node_modules:/Users/pidan/Work/Learn/dynamic-form/node_modules/.pnpm/node_modules"
10
+ else
11
+ export NODE_PATH="/Users/pidan/Work/Learn/dynamic-form/node_modules/.pnpm/rollup@4.59.0/node_modules/rollup/dist/bin/node_modules:/Users/pidan/Work/Learn/dynamic-form/node_modules/.pnpm/rollup@4.59.0/node_modules/rollup/dist/node_modules:/Users/pidan/Work/Learn/dynamic-form/node_modules/.pnpm/rollup@4.59.0/node_modules/rollup/node_modules:/Users/pidan/Work/Learn/dynamic-form/node_modules/.pnpm/rollup@4.59.0/node_modules:/Users/pidan/Work/Learn/dynamic-form/node_modules/.pnpm/node_modules:$NODE_PATH"
12
+ fi
13
+ if [ -x "$basedir/node" ]; then
14
+ exec "$basedir/node" "$basedir/../../../../node_modules/.pnpm/rollup@4.59.0/node_modules/rollup/dist/bin/rollup" "$@"
15
+ else
16
+ exec node "$basedir/../../../../node_modules/.pnpm/rollup@4.59.0/node_modules/rollup/dist/bin/rollup" "$@"
17
+ fi
@@ -11,7 +11,7 @@ else
11
11
  export NODE_PATH="/Users/pidan/Work/Learn/dynamic-form/node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/bin/node_modules:/Users/pidan/Work/Learn/dynamic-form/node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/node_modules:/Users/pidan/Work/Learn/dynamic-form/node_modules/.pnpm/typescript@5.9.3/node_modules:/Users/pidan/Work/Learn/dynamic-form/node_modules/.pnpm/node_modules:$NODE_PATH"
12
12
  fi
13
13
  if [ -x "$basedir/node" ]; then
14
- exec "$basedir/node" "$basedir/../typescript/bin/tsc" "$@"
14
+ exec "$basedir/node" "$basedir/../../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/bin/tsc" "$@"
15
15
  else
16
- exec node "$basedir/../typescript/bin/tsc" "$@"
16
+ exec node "$basedir/../../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/bin/tsc" "$@"
17
17
  fi
@@ -11,7 +11,7 @@ else
11
11
  export NODE_PATH="/Users/pidan/Work/Learn/dynamic-form/node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/bin/node_modules:/Users/pidan/Work/Learn/dynamic-form/node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/node_modules:/Users/pidan/Work/Learn/dynamic-form/node_modules/.pnpm/typescript@5.9.3/node_modules:/Users/pidan/Work/Learn/dynamic-form/node_modules/.pnpm/node_modules:$NODE_PATH"
12
12
  fi
13
13
  if [ -x "$basedir/node" ]; then
14
- exec "$basedir/node" "$basedir/../typescript/bin/tsserver" "$@"
14
+ exec "$basedir/node" "$basedir/../../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/bin/tsserver" "$@"
15
15
  else
16
- exec node "$basedir/../typescript/bin/tsserver" "$@"
16
+ exec node "$basedir/../../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/bin/tsserver" "$@"
17
17
  fi
@@ -11,7 +11,7 @@ else
11
11
  export NODE_PATH="/Users/pidan/Work/Learn/dynamic-form/node_modules/.pnpm/vite@5.4.21_@types+node@20.19.35/node_modules/vite/bin/node_modules:/Users/pidan/Work/Learn/dynamic-form/node_modules/.pnpm/vite@5.4.21_@types+node@20.19.35/node_modules/vite/node_modules:/Users/pidan/Work/Learn/dynamic-form/node_modules/.pnpm/vite@5.4.21_@types+node@20.19.35/node_modules:/Users/pidan/Work/Learn/dynamic-form/node_modules/.pnpm/node_modules:$NODE_PATH"
12
12
  fi
13
13
  if [ -x "$basedir/node" ]; then
14
- exec "$basedir/node" "$basedir/../vite/bin/vite.js" "$@"
14
+ exec "$basedir/node" "$basedir/../../../../node_modules/.pnpm/vite@5.4.21_@types+node@20.19.35/node_modules/vite/bin/vite.js" "$@"
15
15
  else
16
- exec node "$basedir/../vite/bin/vite.js" "$@"
16
+ exec node "$basedir/../../../../node_modules/.pnpm/vite@5.4.21_@types+node@20.19.35/node_modules/vite/bin/vite.js" "$@"
17
17
  fi
@@ -11,7 +11,7 @@ else
11
11
  export NODE_PATH="/Users/pidan/Work/Learn/dynamic-form/node_modules/.pnpm/vitest@1.6.1_@types+node@20.19.35_jsdom@22.1.0/node_modules/vitest/node_modules:/Users/pidan/Work/Learn/dynamic-form/node_modules/.pnpm/vitest@1.6.1_@types+node@20.19.35_jsdom@22.1.0/node_modules:/Users/pidan/Work/Learn/dynamic-form/node_modules/.pnpm/node_modules:$NODE_PATH"
12
12
  fi
13
13
  if [ -x "$basedir/node" ]; then
14
- exec "$basedir/node" "$basedir/../vitest/vitest.mjs" "$@"
14
+ exec "$basedir/node" "$basedir/../../../../node_modules/.pnpm/vitest@1.6.1_@types+node@20.19.35_jsdom@22.1.0/node_modules/vitest/vitest.mjs" "$@"
15
15
  else
16
- exec node "$basedir/../vitest/vitest.mjs" "$@"
16
+ exec node "$basedir/../../../../node_modules/.pnpm/vitest@1.6.1_@types+node@20.19.35_jsdom@22.1.0/node_modules/vitest/vitest.mjs" "$@"
17
17
  fi
@@ -11,7 +11,7 @@ else
11
11
  export NODE_PATH="/Users/pidan/Work/Learn/dynamic-form/node_modules/.pnpm/vue-tsc@2.2.12_typescript@5.9.3/node_modules/vue-tsc/bin/node_modules:/Users/pidan/Work/Learn/dynamic-form/node_modules/.pnpm/vue-tsc@2.2.12_typescript@5.9.3/node_modules/vue-tsc/node_modules:/Users/pidan/Work/Learn/dynamic-form/node_modules/.pnpm/vue-tsc@2.2.12_typescript@5.9.3/node_modules:/Users/pidan/Work/Learn/dynamic-form/node_modules/.pnpm/node_modules:$NODE_PATH"
12
12
  fi
13
13
  if [ -x "$basedir/node" ]; then
14
- exec "$basedir/node" "$basedir/../vue-tsc/bin/vue-tsc.js" "$@"
14
+ exec "$basedir/node" "$basedir/../../../../node_modules/.pnpm/vue-tsc@2.2.12_typescript@5.9.3/node_modules/vue-tsc/bin/vue-tsc.js" "$@"
15
15
  else
16
- exec node "$basedir/../vue-tsc/bin/vue-tsc.js" "$@"
16
+ exec node "$basedir/../../../../node_modules/.pnpm/vue-tsc@2.2.12_typescript@5.9.3/node_modules/vue-tsc/bin/vue-tsc.js" "$@"
17
17
  fi
@@ -0,0 +1,128 @@
1
+ // @ts-nocheck
2
+ export {};
3
+
4
+ ; declare global {
5
+ const __VLS_intrinsicElements: __VLS_IntrinsicElements;
6
+ const __VLS_directiveBindingRestFields: { instance: null, oldValue: null, modifiers: any, dir: any };
7
+ const __VLS_unref: typeof import('vue').unref;
8
+ const __VLS_placeholder: any;
9
+
10
+ const __VLS_nativeElements = {
11
+ ...{} as SVGElementTagNameMap,
12
+ ...{} as HTMLElementTagNameMap,
13
+ };
14
+
15
+ type __VLS_IntrinsicElements = import('vue/jsx-runtime').JSX.IntrinsicElements;
16
+ type __VLS_Element = import('vue/jsx-runtime').JSX.Element;
17
+ type __VLS_GlobalComponents = import('vue').GlobalComponents;
18
+ type __VLS_GlobalDirectives = import('vue').GlobalDirectives;
19
+ type __VLS_IsAny<T> = 0 extends 1 & T ? true : false;
20
+ type __VLS_PickNotAny<A, B> = __VLS_IsAny<A> extends true ? B : A;
21
+ type __VLS_unknownDirective = (arg1: unknown, arg2: unknown, arg3: unknown, arg4: unknown) => void;
22
+ type __VLS_WithComponent<N0 extends string, LocalComponents, N1 extends string, N2 extends string, N3 extends string> =
23
+ N1 extends keyof LocalComponents ? N1 extends N0 ? Pick<LocalComponents, N0 extends keyof LocalComponents ? N0 : never> : { [K in N0]: LocalComponents[N1] } :
24
+ N2 extends keyof LocalComponents ? N2 extends N0 ? Pick<LocalComponents, N0 extends keyof LocalComponents ? N0 : never> : { [K in N0]: LocalComponents[N2] } :
25
+ N3 extends keyof LocalComponents ? N3 extends N0 ? Pick<LocalComponents, N0 extends keyof LocalComponents ? N0 : never> : { [K in N0]: LocalComponents[N3] } :
26
+ N1 extends keyof __VLS_GlobalComponents ? N1 extends N0 ? Pick<__VLS_GlobalComponents, N0 extends keyof __VLS_GlobalComponents ? N0 : never> : { [K in N0]: __VLS_GlobalComponents[N1] } :
27
+ N2 extends keyof __VLS_GlobalComponents ? N2 extends N0 ? Pick<__VLS_GlobalComponents, N0 extends keyof __VLS_GlobalComponents ? N0 : never> : { [K in N0]: __VLS_GlobalComponents[N2] } :
28
+ N3 extends keyof __VLS_GlobalComponents ? N3 extends N0 ? Pick<__VLS_GlobalComponents, N0 extends keyof __VLS_GlobalComponents ? N0 : never> : { [K in N0]: __VLS_GlobalComponents[N3] } :
29
+ { [K in N0]: unknown };
30
+ type __VLS_FunctionalComponentProps<T, K> =
31
+ '__ctx' extends keyof __VLS_PickNotAny<K, {}> ? K extends { __ctx?: { props?: infer P } } ? NonNullable<P> : never
32
+ : T extends (props: infer P, ...args: any) => any ? P :
33
+ {};
34
+ type __VLS_IsFunction<T, K> = K extends keyof T
35
+ ? __VLS_IsAny<T[K]> extends false
36
+ ? unknown extends T[K]
37
+ ? false
38
+ : true
39
+ : false
40
+ : false;
41
+ type __VLS_NormalizeComponentEvent<Props, Events, onEvent extends keyof Props, Event extends keyof Events, CamelizedEvent extends keyof Events> = (
42
+ __VLS_IsFunction<Props, onEvent> extends true
43
+ ? Props
44
+ : __VLS_IsFunction<Events, Event> extends true
45
+ ? { [K in onEvent]?: Events[Event] }
46
+ : __VLS_IsFunction<Events, CamelizedEvent> extends true
47
+ ? { [K in onEvent]?: Events[CamelizedEvent] }
48
+ : Props
49
+ ) & Record<string, unknown>;
50
+ // fix https://github.com/vuejs/language-tools/issues/926
51
+ type __VLS_UnionToIntersection<U> = (U extends unknown ? (arg: U) => unknown : never) extends ((arg: infer P) => unknown) ? P : never;
52
+ type __VLS_OverloadUnionInner<T, U = unknown> = U & T extends (...args: infer A) => infer R
53
+ ? U extends T
54
+ ? never
55
+ : __VLS_OverloadUnionInner<T, Pick<T, keyof T> & U & ((...args: A) => R)> | ((...args: A) => R)
56
+ : never;
57
+ type __VLS_OverloadUnion<T> = Exclude<
58
+ __VLS_OverloadUnionInner<(() => never) & T>,
59
+ T extends () => never ? never : () => never
60
+ >;
61
+ type __VLS_ConstructorOverloads<T> = __VLS_OverloadUnion<T> extends infer F
62
+ ? F extends (event: infer E, ...args: infer A) => any
63
+ ? { [K in E & string]: (...args: A) => void; }
64
+ : never
65
+ : never;
66
+ type __VLS_NormalizeEmits<T> = __VLS_PrettifyGlobal<
67
+ __VLS_UnionToIntersection<
68
+ __VLS_ConstructorOverloads<T> & {
69
+ [K in keyof T]: T[K] extends any[] ? { (...args: T[K]): void } : never
70
+ }
71
+ >
72
+ >;
73
+ type __VLS_PrettifyGlobal<T> = { [K in keyof T]: T[K]; } & {};
74
+ type __VLS_PickFunctionalComponentCtx<T, K> = NonNullable<__VLS_PickNotAny<
75
+ '__ctx' extends keyof __VLS_PickNotAny<K, {}> ? K extends { __ctx?: infer Ctx } ? Ctx : never : any
76
+ , T extends (props: any, ctx: infer Ctx) => any ? Ctx : any
77
+ >>;
78
+ type __VLS_UseTemplateRef<T> = Readonly<import('vue').ShallowRef<T | null>>;
79
+
80
+ function __VLS_getVForSourceType(source: number): [number, number, number][];
81
+ function __VLS_getVForSourceType(source: string): [string, number, number][];
82
+ function __VLS_getVForSourceType<T extends any[]>(source: T): [
83
+ item: T[number],
84
+ key: number,
85
+ index: number,
86
+ ][];
87
+ function __VLS_getVForSourceType<T extends { [Symbol.iterator](): Iterator<any> }>(source: T): [
88
+ item: T extends { [Symbol.iterator](): Iterator<infer T1> } ? T1 : never,
89
+ key: number,
90
+ index: undefined,
91
+ ][];
92
+ // #3845
93
+ function __VLS_getVForSourceType<T extends number | { [Symbol.iterator](): Iterator<any> }>(source: T): [
94
+ item: number | (Exclude<T, number> extends { [Symbol.iterator](): Iterator<infer T1> } ? T1 : never),
95
+ key: number,
96
+ index: undefined,
97
+ ][];
98
+ function __VLS_getVForSourceType<T>(source: T): [
99
+ item: T[keyof T],
100
+ key: keyof T,
101
+ index: number,
102
+ ][];
103
+ // @ts-ignore
104
+ function __VLS_getSlotParams<T>(slot: T): Parameters<__VLS_PickNotAny<NonNullable<T>, (...args: any[]) => any>>;
105
+ // @ts-ignore
106
+ function __VLS_getSlotParam<T>(slot: T): Parameters<__VLS_PickNotAny<NonNullable<T>, (...args: any[]) => any>>[0];
107
+ function __VLS_asFunctionalDirective<T>(dir: T): T extends import('vue').ObjectDirective
108
+ ? NonNullable<T['created' | 'beforeMount' | 'mounted' | 'beforeUpdate' | 'updated' | 'beforeUnmount' | 'unmounted']>
109
+ : T extends (...args: any) => any
110
+ ? T
111
+ : __VLS_unknownDirective;
112
+ function __VLS_withScope<T, K>(ctx: T, scope: K): ctx is T & K;
113
+ function __VLS_makeOptional<T>(t: T): { [K in keyof T]?: T[K] };
114
+ function __VLS_asFunctionalComponent<T, K = T extends new (...args: any) => any ? InstanceType<T> : unknown>(t: T, instance?: K):
115
+ T extends new (...args: any) => any
116
+ ? (props: (K extends { $props: infer Props } ? Props : any) & Record<string, unknown>, ctx?: any) => __VLS_Element & { __ctx?: {
117
+ attrs?: any,
118
+ slots?: K extends { $slots: infer Slots } ? Slots : any,
119
+ emit?: K extends { $emit: infer Emit } ? Emit : any
120
+ } & { props?: (K extends { $props: infer Props } ? Props : any) & Record<string, unknown>; expose?(exposed: K): void; } }
121
+ : T extends () => any ? (props: {}, ctx?: any) => ReturnType<T>
122
+ : T extends (...args: any) => any ? T
123
+ : (_: {} & Record<string, unknown>, ctx?: any) => { __ctx?: { attrs?: any, expose?: any, slots?: any, emit?: any, props?: {} & Record<string, unknown> } };
124
+ function __VLS_elementAsFunction<T>(tag: T, endTag?: T): (_: T & Record<string, unknown>) => void;
125
+ function __VLS_functionalComponentArgsRest<T extends (...args: any) => any>(t: T): 2 extends Parameters<T>['length'] ? [any] : [];
126
+ function __VLS_normalizeSlot<S>(s: S): S extends () => infer R ? (props: {}) => R : S;
127
+ function __VLS_tryAsConstant<const T>(t: T): T;
128
+ }
@@ -1,6 +1,13 @@
1
1
  {
2
2
  "name": "pdyform-vue",
3
3
  "version": "1.0.0",
4
+ "description": "Vue components for pdyform based on Shadcn-vue.",
5
+ "keywords": [
6
+ "dynamic-form",
7
+ "schema-form",
8
+ "vue",
9
+ "shadcn-vue"
10
+ ],
4
11
  "type": "module",
5
12
  "main": "./dist/index.js",
6
13
  "module": "./dist/index.mjs",
@@ -36,6 +43,7 @@
36
43
  "jsdom": "^22.1.0",
37
44
  "typescript": "^5.0.0",
38
45
  "vite": "^5.0.0",
46
+ "vite-plugin-dts": "^4.5.4",
39
47
  "vitest": "^1.0.0",
40
48
  "vue": "^3.5.0",
41
49
  "vue-tsc": "^2.0.0"
@@ -9,6 +9,7 @@
9
9
  "strict": true,
10
10
  "esModuleInterop": true,
11
11
  "skipLibCheck": true,
12
+ "declaration": true
12
13
  },
13
14
  "include": ["src/**/*.ts", "src/**/*.vue"],
14
15
  "exclude": ["node_modules", "dist", "**/*.test.ts"]
@@ -1,9 +1,10 @@
1
1
  import { defineConfig } from 'vite';
2
2
  import vue from '@vitejs/plugin-vue';
3
+ import dts from 'vite-plugin-dts';
3
4
  import path from 'path';
4
5
 
5
6
  export default defineConfig({
6
- plugins: [vue()],
7
+ plugins: [vue(), dts({ rollupTypes: true })],
7
8
  build: {
8
9
  lib: {
9
10
  entry: path.resolve(__dirname, 'src/index.ts'),