@jxyszb/jxy-form-designer 0.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/CHANGELOG.md ADDED
@@ -0,0 +1,8 @@
1
+ # Changelog
2
+
3
+ ## 0.1.0
4
+
5
+ - 首次拆分 JXY Form Designer、Runtime、Schema、Store 和扩展字段。
6
+ - 支持宿主 request、上传组件和富文本组件注入。
7
+ - 提供 ESM 多入口、统一 CSS、类型声明和测试入口。
8
+ - 以 `@jxyszb/jxy-form-designer` 名称和 MIT 许可证首次公开发布。
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 jxyszb
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,85 @@
1
+ # @jxyszb/jxy-form-designer
2
+
3
+ A schema-driven form designer and runtime for Vue 3, Pinia, and Element Plus.
4
+
5
+ ## Features
6
+
7
+ - Drag-and-drop form design with fields, titles, and grid layouts.
8
+ - Runtime rendering from JSON Schema.
9
+ - Static, dictionary, and API data sources.
10
+ - Validation, field reactions, import/export, and preview.
11
+ - Host adapters for request clients, file upload, rich-text editors, and custom fields.
12
+
13
+ ## Installation
14
+
15
+ ```bash
16
+ npm install @jxyszb/jxy-form-designer
17
+ ```
18
+
19
+ Peer dependencies:
20
+
21
+ ```text
22
+ vue >=3.2.45 <4
23
+ pinia >=2.0.22 <3
24
+ element-plus >=2.7.0 <3
25
+ ```
26
+
27
+ ## Setup
28
+
29
+ ```js
30
+ import { createApp } from 'vue';
31
+ import { createPinia } from 'pinia';
32
+ import ElementPlus from 'element-plus';
33
+ import 'element-plus/dist/index.css';
34
+ import '@jxyszb/jxy-form-designer/style.css';
35
+ import { createJxyFormPlugin } from '@jxyszb/jxy-form-designer';
36
+
37
+ const app = createApp(App);
38
+ app.use(createPinia());
39
+ app.use(ElementPlus);
40
+ app.use(createJxyFormPlugin());
41
+ app.mount('#app');
42
+ ```
43
+
44
+ Dynamic data sources, uploads, and rich-text fields can use host adapters:
45
+
46
+ ```js
47
+ app.use(createJxyFormPlugin({
48
+ request: requestClient,
49
+ components: {
50
+ fileUpload: FileUpload,
51
+ editor: RichTextEditor
52
+ }
53
+ }));
54
+ ```
55
+
56
+ ## Usage
57
+
58
+ ```vue
59
+ <script setup>
60
+ import { ref } from 'vue';
61
+ import {
62
+ JXYFormDesigner,
63
+ JXYFormRuntime,
64
+ createDefaultSchema
65
+ } from '@jxyszb/jxy-form-designer';
66
+
67
+ const schema = ref(createDefaultSchema());
68
+ const formData = ref({});
69
+ </script>
70
+
71
+ <template>
72
+ <JXYFormDesigner />
73
+ <JXYFormRuntime v-model="formData" :schema="schema" />
74
+ </template>
75
+ ```
76
+
77
+ Schema utilities are also available from `@jxyszb/jxy-form-designer/schema`. The `testing` subpath contains demo and mock helpers and should not be used by production code.
78
+
79
+ ## Documentation
80
+
81
+ - [Field suffix extension](docs/field-suffix-extension.md)
82
+
83
+ ## License
84
+
85
+ [MIT](LICENSE)