pdyform 2.0.1 → 2.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/package.json +9 -3
- package/packages/core/dist/chunk-TP3IHKWV.js +69 -0
- package/packages/core/dist/{chunk-GQASS6PM.js → chunk-WEDHXOHH.js} +22 -0
- package/packages/core/dist/formState.cjs +187 -0
- package/packages/core/dist/formState.d.cts +17 -0
- package/packages/core/dist/formState.d.ts +17 -0
- package/packages/core/dist/formState.js +15 -0
- package/packages/core/dist/index.cjs +92 -2
- package/packages/core/dist/index.d.cts +2 -1
- package/packages/core/dist/index.d.ts +2 -1
- package/packages/core/dist/index.js +21 -3
- package/packages/core/dist/utils.cjs +27 -2
- package/packages/core/dist/utils.d.cts +4 -1
- package/packages/core/dist/utils.d.ts +4 -1
- package/packages/core/dist/utils.js +9 -3
- package/packages/react/dist/index.cjs +14 -43
- package/packages/react/dist/index.js +20 -43
- package/packages/vue/dist/index.d.ts +2 -36
- package/packages/vue/dist/index.js +1 -28
- package/packages/vue/dist/index.mjs +267 -6530
- package/eslint.config.mjs +0 -53
- package/example/README.md +0 -36
- package/example/react-demo/index.html +0 -12
- package/example/react-demo/node_modules/.bin/browserslist +0 -17
- package/example/react-demo/node_modules/.bin/tsc +0 -17
- package/example/react-demo/node_modules/.bin/tsserver +0 -17
- package/example/react-demo/node_modules/.bin/vite +0 -17
- package/example/react-demo/node_modules/.vite/deps/@radix-ui_react-checkbox.js +0 -300
- package/example/react-demo/node_modules/.vite/deps/@radix-ui_react-checkbox.js.map +0 -7
- package/example/react-demo/node_modules/.vite/deps/@radix-ui_react-label.js +0 -194
- package/example/react-demo/node_modules/.vite/deps/@radix-ui_react-label.js.map +0 -7
- package/example/react-demo/node_modules/.vite/deps/@radix-ui_react-radio-group.js +0 -530
- package/example/react-demo/node_modules/.vite/deps/@radix-ui_react-radio-group.js.map +0 -7
- package/example/react-demo/node_modules/.vite/deps/@radix-ui_react-select.js +0 -4808
- package/example/react-demo/node_modules/.vite/deps/@radix-ui_react-select.js.map +0 -7
- package/example/react-demo/node_modules/.vite/deps/_metadata.json +0 -115
- package/example/react-demo/node_modules/.vite/deps/chunk-3D5PZ6F6.js +0 -49
- package/example/react-demo/node_modules/.vite/deps/chunk-3D5PZ6F6.js.map +0 -7
- package/example/react-demo/node_modules/.vite/deps/chunk-5Q2RBQLA.js +0 -127
- package/example/react-demo/node_modules/.vite/deps/chunk-5Q2RBQLA.js.map +0 -7
- package/example/react-demo/node_modules/.vite/deps/chunk-G3PMV62Z.js +0 -36
- package/example/react-demo/node_modules/.vite/deps/chunk-G3PMV62Z.js.map +0 -7
- package/example/react-demo/node_modules/.vite/deps/chunk-GX7YZ5KV.js +0 -370
- package/example/react-demo/node_modules/.vite/deps/chunk-GX7YZ5KV.js.map +0 -7
- package/example/react-demo/node_modules/.vite/deps/chunk-PUFJGYAC.js +0 -928
- package/example/react-demo/node_modules/.vite/deps/chunk-PUFJGYAC.js.map +0 -7
- package/example/react-demo/node_modules/.vite/deps/chunk-SIU35MPB.js +0 -21
- package/example/react-demo/node_modules/.vite/deps/chunk-SIU35MPB.js.map +0 -7
- package/example/react-demo/node_modules/.vite/deps/chunk-TOMGVNQP.js +0 -1906
- package/example/react-demo/node_modules/.vite/deps/chunk-TOMGVNQP.js.map +0 -7
- package/example/react-demo/node_modules/.vite/deps/chunk-YYN6DZAU.js +0 -21628
- package/example/react-demo/node_modules/.vite/deps/chunk-YYN6DZAU.js.map +0 -7
- package/example/react-demo/node_modules/.vite/deps/chunk-ZE5VSJFE.js +0 -144
- package/example/react-demo/node_modules/.vite/deps/chunk-ZE5VSJFE.js.map +0 -7
- package/example/react-demo/node_modules/.vite/deps/class-variance-authority.js +0 -51
- package/example/react-demo/node_modules/.vite/deps/class-variance-authority.js.map +0 -7
- package/example/react-demo/node_modules/.vite/deps/clsx.js +0 -10
- package/example/react-demo/node_modules/.vite/deps/clsx.js.map +0 -7
- package/example/react-demo/node_modules/.vite/deps/lucide-react.js +0 -29725
- package/example/react-demo/node_modules/.vite/deps/lucide-react.js.map +0 -7
- package/example/react-demo/node_modules/.vite/deps/package.json +0 -3
- package/example/react-demo/node_modules/.vite/deps/react-dom.js +0 -7
- package/example/react-demo/node_modules/.vite/deps/react-dom.js.map +0 -7
- package/example/react-demo/node_modules/.vite/deps/react-dom_client.js +0 -39
- package/example/react-demo/node_modules/.vite/deps/react-dom_client.js.map +0 -7
- package/example/react-demo/node_modules/.vite/deps/react.js +0 -6
- package/example/react-demo/node_modules/.vite/deps/react.js.map +0 -7
- package/example/react-demo/node_modules/.vite/deps/react_jsx-dev-runtime.js +0 -913
- package/example/react-demo/node_modules/.vite/deps/react_jsx-dev-runtime.js.map +0 -7
- package/example/react-demo/node_modules/.vite/deps/react_jsx-runtime.js +0 -7
- package/example/react-demo/node_modules/.vite/deps/react_jsx-runtime.js.map +0 -7
- package/example/react-demo/node_modules/.vite/deps/tailwind-merge.js +0 -2534
- package/example/react-demo/node_modules/.vite/deps/tailwind-merge.js.map +0 -7
- package/example/react-demo/package.json +0 -23
- package/example/react-demo/postcss.config.mjs +0 -6
- package/example/react-demo/src/App.tsx +0 -64
- package/example/react-demo/src/main.tsx +0 -10
- package/example/react-demo/src/styles.css +0 -102
- package/example/react-demo/tailwind.config.mjs +0 -50
- package/example/react-demo/tsconfig.json +0 -16
- package/example/react-demo/vite.config.ts +0 -14
- package/example/shared/defaultSchema.ts +0 -68
- package/example/vue-demo/index.html +0 -12
- package/example/vue-demo/node_modules/.bin/tsc +0 -17
- package/example/vue-demo/node_modules/.bin/tsserver +0 -17
- package/example/vue-demo/node_modules/.bin/vite +0 -17
- package/example/vue-demo/node_modules/.vite/deps/_metadata.json +0 -46
- package/example/vue-demo/node_modules/.vite/deps/chunk-PZ5AY32C.js +0 -10
- package/example/vue-demo/node_modules/.vite/deps/chunk-PZ5AY32C.js.map +0 -7
- package/example/vue-demo/node_modules/.vite/deps/chunk-TCXBSQ4M.js +0 -12877
- package/example/vue-demo/node_modules/.vite/deps/chunk-TCXBSQ4M.js.map +0 -7
- package/example/vue-demo/node_modules/.vite/deps/clsx.js +0 -22
- package/example/vue-demo/node_modules/.vite/deps/clsx.js.map +0 -7
- package/example/vue-demo/node_modules/.vite/deps/lucide-vue-next.js +0 -29720
- package/example/vue-demo/node_modules/.vite/deps/lucide-vue-next.js.map +0 -7
- package/example/vue-demo/node_modules/.vite/deps/package.json +0 -3
- package/example/vue-demo/node_modules/.vite/deps/radix-vue.js +0 -24321
- package/example/vue-demo/node_modules/.vite/deps/radix-vue.js.map +0 -7
- package/example/vue-demo/node_modules/.vite/deps/tailwind-merge.js +0 -2534
- package/example/vue-demo/node_modules/.vite/deps/tailwind-merge.js.map +0 -7
- package/example/vue-demo/node_modules/.vite/deps/vue.js +0 -348
- package/example/vue-demo/node_modules/.vite/deps/vue.js.map +0 -7
- package/example/vue-demo/package.json +0 -20
- package/example/vue-demo/postcss.config.mjs +0 -6
- package/example/vue-demo/src/App.vue +0 -61
- package/example/vue-demo/src/env.d.ts +0 -1
- package/example/vue-demo/src/main.ts +0 -5
- package/example/vue-demo/src/style.css +0 -102
- package/example/vue-demo/tailwind.config.mjs +0 -50
- package/example/vue-demo/tsconfig.json +0 -15
- package/example/vue-demo/vite.config.ts +0 -14
- package/packages/core/dist/parser.cjs +0 -1
- package/packages/core/dist/parser.d.cts +0 -2
- package/packages/core/dist/parser.d.ts +0 -2
- package/packages/core/dist/parser.js +0 -0
- package/packages/core/node_modules/.bin/api-extractor +0 -17
- package/packages/core/node_modules/.bin/esbuild +0 -14
- package/packages/core/node_modules/.bin/jiti +0 -17
- package/packages/core/node_modules/.bin/tsc +0 -17
- package/packages/core/node_modules/.bin/tsserver +0 -17
- package/packages/core/node_modules/.bin/tsup +0 -17
- package/packages/core/node_modules/.bin/tsup-node +0 -17
- package/packages/core/node_modules/.bin/vitest +0 -17
- package/packages/core/node_modules/.vite/vitest/results.json +0 -1
- package/packages/core/package.json +0 -37
- package/packages/core/src/index.ts +0 -2
- package/packages/core/src/parser.ts +0 -0
- package/packages/core/src/types.ts +0 -42
- package/packages/core/src/utils.ts +0 -80
- package/packages/core/test/utils.test.ts +0 -99
- package/packages/core/tsconfig.json +0 -15
- package/packages/core/tsup.config.ts +0 -9
- package/packages/react/node_modules/.bin/api-extractor +0 -17
- package/packages/react/node_modules/.bin/browserslist +0 -17
- package/packages/react/node_modules/.bin/esbuild +0 -14
- package/packages/react/node_modules/.bin/jiti +0 -17
- package/packages/react/node_modules/.bin/tsc +0 -17
- package/packages/react/node_modules/.bin/tsserver +0 -17
- package/packages/react/node_modules/.bin/tsup +0 -17
- package/packages/react/node_modules/.bin/tsup-node +0 -17
- package/packages/react/node_modules/.bin/vite +0 -17
- package/packages/react/node_modules/.bin/vitest +0 -17
- package/packages/react/node_modules/.vite/vitest/results.json +0 -1
- package/packages/react/package.json +0 -57
- package/packages/react/postcss.config.mjs +0 -6
- package/packages/react/src/DynamicForm.tsx +0 -93
- package/packages/react/src/FormFieldRenderer.tsx +0 -50
- package/packages/react/src/components/Checkbox.tsx +0 -28
- package/packages/react/src/components/CheckboxRenderer.tsx +0 -37
- package/packages/react/src/components/Input.tsx +0 -24
- package/packages/react/src/components/InputRenderer.tsx +0 -29
- package/packages/react/src/components/Label.tsx +0 -24
- package/packages/react/src/components/RadioGroup.tsx +0 -42
- package/packages/react/src/components/RadioRenderer.tsx +0 -29
- package/packages/react/src/components/Select.tsx +0 -93
- package/packages/react/src/components/SelectRenderer.tsx +0 -27
- package/packages/react/src/components/Textarea.tsx +0 -23
- package/packages/react/src/components/TextareaRenderer.tsx +0 -17
- package/packages/react/src/components/index.ts +0 -55
- package/packages/react/src/components/types.ts +0 -17
- package/packages/react/src/index.tsx +0 -3
- package/packages/react/src/utils.ts +0 -7
- package/packages/react/tailwind.config.mjs +0 -10
- package/packages/react/test/DynamicForm.test.tsx +0 -25
- package/packages/react/test/FormFieldRenderer.test.tsx +0 -127
- package/packages/react/tsconfig.json +0 -15
- package/packages/react/vitest.config.ts +0 -16
- package/packages/vue/node_modules/.bin/rollup +0 -17
- package/packages/vue/node_modules/.bin/tsc +0 -17
- package/packages/vue/node_modules/.bin/tsserver +0 -17
- package/packages/vue/node_modules/.bin/vite +0 -17
- package/packages/vue/node_modules/.bin/vitest +0 -17
- package/packages/vue/node_modules/.bin/vue-tsc +0 -17
- package/packages/vue/node_modules/.vite/vitest/results.json +0 -1
- package/packages/vue/node_modules/.vue-global-types/vue_3.5_0_0_0.d.ts +0 -118
- package/packages/vue/node_modules/.vue-global-types/vue_3.5_false.d.ts +0 -128
- package/packages/vue/package.json +0 -53
- package/packages/vue/postcss.config.mjs +0 -6
- package/packages/vue/src/DynamicForm.vue +0 -81
- package/packages/vue/src/FormFieldRenderer.vue +0 -70
- package/packages/vue/src/components/Checkbox.vue +0 -28
- package/packages/vue/src/components/CheckboxRenderer.vue +0 -35
- package/packages/vue/src/components/Input.vue +0 -21
- package/packages/vue/src/components/InputRenderer.vue +0 -28
- package/packages/vue/src/components/Label.vue +0 -21
- package/packages/vue/src/components/RadioGroup.vue +0 -30
- package/packages/vue/src/components/RadioGroupItem.vue +0 -26
- package/packages/vue/src/components/RadioRenderer.vue +0 -24
- package/packages/vue/src/components/Select.vue +0 -40
- package/packages/vue/src/components/SelectContent.vue +0 -38
- package/packages/vue/src/components/SelectItem.vue +0 -43
- package/packages/vue/src/components/SelectRenderer.vue +0 -30
- package/packages/vue/src/components/SelectTrigger.vue +0 -27
- package/packages/vue/src/components/Textarea.vue +0 -19
- package/packages/vue/src/components/TextareaRenderer.vue +0 -18
- package/packages/vue/src/components/index.ts +0 -24
- package/packages/vue/src/env.d.ts +0 -7
- package/packages/vue/src/fieldComponentMap.ts +0 -34
- package/packages/vue/src/index.ts +0 -4
- package/packages/vue/src/utils.ts +0 -6
- package/packages/vue/tailwind.config.mjs +0 -10
- package/packages/vue/test/DynamicForm.test.ts +0 -19
- package/packages/vue/test/FormFieldRenderer.test.ts +0 -133
- package/packages/vue/tsconfig.json +0 -16
- package/packages/vue/vite.config.ts +0 -29
- package/packages/vue/vitest.config.ts +0 -16
- package/pnpm-workspace.yaml +0 -4
- package/tsconfig.json +0 -21
- package/turbo.json +0 -25
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
// @vitest-environment jsdom
|
|
2
|
-
import { describe, it, expect } from 'vitest';
|
|
3
|
-
import { render, screen, fireEvent } from '@testing-library/react';
|
|
4
|
-
import { DynamicForm } from '../src/DynamicForm';
|
|
5
|
-
import React from 'react';
|
|
6
|
-
|
|
7
|
-
describe('React DynamicForm', () => {
|
|
8
|
-
const schema: any = {
|
|
9
|
-
fields: [
|
|
10
|
-
{ name: 'username', label: 'Username', type: 'text', validations: [{ type: 'required', message: 'Required' }] }
|
|
11
|
-
]
|
|
12
|
-
};
|
|
13
|
-
|
|
14
|
-
it('renders correctly', () => {
|
|
15
|
-
render(<DynamicForm schema={schema} onSubmit={() => {}} />);
|
|
16
|
-
expect(screen.getByLabelText('Username')).toBeTruthy();
|
|
17
|
-
});
|
|
18
|
-
|
|
19
|
-
it('shows validation error on blur', async () => {
|
|
20
|
-
render(<DynamicForm schema={schema} onSubmit={() => {}} />);
|
|
21
|
-
const input = screen.getByLabelText('Username');
|
|
22
|
-
fireEvent.blur(input);
|
|
23
|
-
expect(await screen.findByText('Required')).toBeTruthy();
|
|
24
|
-
});
|
|
25
|
-
});
|
|
@@ -1,127 +0,0 @@
|
|
|
1
|
-
// @vitest-environment jsdom
|
|
2
|
-
import { describe, it, expect, vi } from 'vitest';
|
|
3
|
-
import { render, screen, fireEvent } from '@testing-library/react';
|
|
4
|
-
import { FormFieldRenderer } from '../src/FormFieldRenderer';
|
|
5
|
-
import React from 'react';
|
|
6
|
-
import type { FormField } from 'pdyform/core';
|
|
7
|
-
|
|
8
|
-
describe('FormFieldRenderer', () => {
|
|
9
|
-
const defaultField: FormField = {
|
|
10
|
-
name: 'testField',
|
|
11
|
-
label: 'Test Label',
|
|
12
|
-
type: 'text',
|
|
13
|
-
id: 'test-field-id',
|
|
14
|
-
};
|
|
15
|
-
|
|
16
|
-
it('renders a text input correctly', () => {
|
|
17
|
-
const onChange = vi.fn();
|
|
18
|
-
render(<FormFieldRenderer field={defaultField} value="test value" onChange={onChange} />);
|
|
19
|
-
|
|
20
|
-
expect(screen.getByLabelText('Test Label')).toBeTruthy();
|
|
21
|
-
const input = screen.getByDisplayValue('test value') as HTMLInputElement;
|
|
22
|
-
expect(input.type).toBe('text');
|
|
23
|
-
|
|
24
|
-
fireEvent.change(input, { target: { value: 'new value' } });
|
|
25
|
-
expect(onChange).toHaveBeenCalledWith('new value');
|
|
26
|
-
});
|
|
27
|
-
|
|
28
|
-
it('emits number for number inputs', () => {
|
|
29
|
-
const field: FormField = { ...defaultField, type: 'number' };
|
|
30
|
-
const onChange = vi.fn();
|
|
31
|
-
render(<FormFieldRenderer field={field} value={22} onChange={onChange} />);
|
|
32
|
-
|
|
33
|
-
const input = screen.getByLabelText('Test Label') as HTMLInputElement;
|
|
34
|
-
fireEvent.change(input, { target: { value: '23' } });
|
|
35
|
-
expect(onChange).toHaveBeenCalledWith(23);
|
|
36
|
-
});
|
|
37
|
-
|
|
38
|
-
it('renders a textarea correctly', () => {
|
|
39
|
-
const field: FormField = { ...defaultField, type: 'textarea' };
|
|
40
|
-
const onChange = vi.fn();
|
|
41
|
-
render(<FormFieldRenderer field={field} value={"text\narea"} onChange={onChange} />);
|
|
42
|
-
|
|
43
|
-
const textarea = screen.getByRole('textbox') as HTMLTextAreaElement;
|
|
44
|
-
expect(textarea.value).toBe('text\narea');
|
|
45
|
-
});
|
|
46
|
-
|
|
47
|
-
it('renders a select correctly', () => {
|
|
48
|
-
const field: FormField = {
|
|
49
|
-
...defaultField,
|
|
50
|
-
type: 'select',
|
|
51
|
-
options: [
|
|
52
|
-
{ label: 'Option 1', value: 'opt1' },
|
|
53
|
-
{ label: 'Option 2', value: 'opt2' }
|
|
54
|
-
]
|
|
55
|
-
};
|
|
56
|
-
const onChange = vi.fn();
|
|
57
|
-
render(<FormFieldRenderer field={field} value="opt1" onChange={onChange} />);
|
|
58
|
-
|
|
59
|
-
// Radix Select Trigger is a button (combobox)
|
|
60
|
-
const trigger = screen.getByRole('combobox');
|
|
61
|
-
expect(trigger.textContent).toContain('Option 1');
|
|
62
|
-
|
|
63
|
-
// Open select to trigger change
|
|
64
|
-
fireEvent.click(trigger);
|
|
65
|
-
|
|
66
|
-
// Select Option 2
|
|
67
|
-
const option2 = screen.getByRole('option', { name: 'Option 2' });
|
|
68
|
-
fireEvent.click(option2);
|
|
69
|
-
|
|
70
|
-
expect(onChange).toHaveBeenCalledWith('opt2');
|
|
71
|
-
});
|
|
72
|
-
|
|
73
|
-
it('renders a checkbox correctly', () => {
|
|
74
|
-
const field: FormField = {
|
|
75
|
-
...defaultField,
|
|
76
|
-
type: 'checkbox',
|
|
77
|
-
options: [
|
|
78
|
-
{ label: 'Check 1', value: 'c1' },
|
|
79
|
-
{ label: 'Check 2', value: 'c2' }
|
|
80
|
-
]
|
|
81
|
-
};
|
|
82
|
-
const onChange = vi.fn();
|
|
83
|
-
render(<FormFieldRenderer field={field} value={['c1']} onChange={onChange} />);
|
|
84
|
-
|
|
85
|
-
const checkbox1 = screen.getByRole('checkbox', { name: 'Check 1' });
|
|
86
|
-
const checkbox2 = screen.getByRole('checkbox', { name: 'Check 2' });
|
|
87
|
-
|
|
88
|
-
expect(checkbox1.getAttribute('aria-checked')).toBe('true');
|
|
89
|
-
expect(checkbox2.getAttribute('aria-checked')).toBe('false');
|
|
90
|
-
|
|
91
|
-
fireEvent.click(checkbox2);
|
|
92
|
-
expect(onChange).toHaveBeenCalledWith(['c1', 'c2']);
|
|
93
|
-
|
|
94
|
-
fireEvent.click(checkbox1);
|
|
95
|
-
expect(onChange).toHaveBeenCalledWith([]);
|
|
96
|
-
});
|
|
97
|
-
|
|
98
|
-
it('renders a radio correctly', () => {
|
|
99
|
-
const field: FormField = {
|
|
100
|
-
...defaultField,
|
|
101
|
-
type: 'radio',
|
|
102
|
-
options: [
|
|
103
|
-
{ label: 'Radio 1', value: 'r1' },
|
|
104
|
-
{ label: 'Radio 2', value: 'r2' }
|
|
105
|
-
]
|
|
106
|
-
};
|
|
107
|
-
const onChange = vi.fn();
|
|
108
|
-
render(<FormFieldRenderer field={field} value="r1" onChange={onChange} />);
|
|
109
|
-
|
|
110
|
-
const radio1 = screen.getByRole('radio', { name: 'Radio 1' });
|
|
111
|
-
const radio2 = screen.getByRole('radio', { name: 'Radio 2' });
|
|
112
|
-
|
|
113
|
-
expect(radio1.getAttribute('aria-checked')).toBe('true');
|
|
114
|
-
expect(radio2.getAttribute('aria-checked')).toBe('false');
|
|
115
|
-
|
|
116
|
-
fireEvent.click(radio2);
|
|
117
|
-
expect(onChange).toHaveBeenCalledWith('r2');
|
|
118
|
-
});
|
|
119
|
-
|
|
120
|
-
it('displays description and error', () => {
|
|
121
|
-
const field: FormField = { ...defaultField, description: 'Desc text' };
|
|
122
|
-
render(<FormFieldRenderer field={field} value="" onChange={() => {}} error="Error text" />);
|
|
123
|
-
|
|
124
|
-
expect(screen.getByText('Desc text')).toBeTruthy();
|
|
125
|
-
expect(screen.getByText('Error text')).toBeTruthy();
|
|
126
|
-
});
|
|
127
|
-
});
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"compilerOptions": {
|
|
3
|
-
"composite": false,
|
|
4
|
-
"target": "ESNext",
|
|
5
|
-
"module": "ESNext",
|
|
6
|
-
"moduleResolution": "bundler",
|
|
7
|
-
"jsx": "react-jsx",
|
|
8
|
-
"outDir": "./dist",
|
|
9
|
-
"strict": true,
|
|
10
|
-
"esModuleInterop": true,
|
|
11
|
-
"skipLibCheck": true,
|
|
12
|
-
},
|
|
13
|
-
"include": ["src/**/*.ts", "src/**/*.tsx"],
|
|
14
|
-
"exclude": ["node_modules", "dist", "**/*.test.ts", "**/*.test.tsx"]
|
|
15
|
-
}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { defineConfig } from 'vitest/config';
|
|
2
|
-
import react from '@vitejs/plugin-react';
|
|
3
|
-
import path from 'path';
|
|
4
|
-
|
|
5
|
-
export default defineConfig({
|
|
6
|
-
plugins: [react()],
|
|
7
|
-
test: {
|
|
8
|
-
environment: 'jsdom',
|
|
9
|
-
globals: true,
|
|
10
|
-
},
|
|
11
|
-
resolve: {
|
|
12
|
-
alias: {
|
|
13
|
-
'pdyform/core': path.resolve(__dirname, '../core/src'),
|
|
14
|
-
},
|
|
15
|
-
},
|
|
16
|
-
});
|
|
@@ -1,17 +0,0 @@
|
|
|
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
|
|
@@ -1,17 +0,0 @@
|
|
|
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/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"
|
|
10
|
-
else
|
|
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
|
-
fi
|
|
13
|
-
if [ -x "$basedir/node" ]; then
|
|
14
|
-
exec "$basedir/node" "$basedir/../typescript/bin/tsc" "$@"
|
|
15
|
-
else
|
|
16
|
-
exec node "$basedir/../typescript/bin/tsc" "$@"
|
|
17
|
-
fi
|
|
@@ -1,17 +0,0 @@
|
|
|
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/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"
|
|
10
|
-
else
|
|
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
|
-
fi
|
|
13
|
-
if [ -x "$basedir/node" ]; then
|
|
14
|
-
exec "$basedir/node" "$basedir/../typescript/bin/tsserver" "$@"
|
|
15
|
-
else
|
|
16
|
-
exec node "$basedir/../typescript/bin/tsserver" "$@"
|
|
17
|
-
fi
|
|
@@ -1,17 +0,0 @@
|
|
|
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/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"
|
|
10
|
-
else
|
|
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
|
-
fi
|
|
13
|
-
if [ -x "$basedir/node" ]; then
|
|
14
|
-
exec "$basedir/node" "$basedir/../vite/bin/vite.js" "$@"
|
|
15
|
-
else
|
|
16
|
-
exec node "$basedir/../vite/bin/vite.js" "$@"
|
|
17
|
-
fi
|
|
@@ -1,17 +0,0 @@
|
|
|
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/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"
|
|
10
|
-
else
|
|
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
|
-
fi
|
|
13
|
-
if [ -x "$basedir/node" ]; then
|
|
14
|
-
exec "$basedir/node" "$basedir/../vitest/vitest.mjs" "$@"
|
|
15
|
-
else
|
|
16
|
-
exec node "$basedir/../vitest/vitest.mjs" "$@"
|
|
17
|
-
fi
|
|
@@ -1,17 +0,0 @@
|
|
|
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/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"
|
|
10
|
-
else
|
|
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
|
-
fi
|
|
13
|
-
if [ -x "$basedir/node" ]; then
|
|
14
|
-
exec "$basedir/node" "$basedir/../vue-tsc/bin/vue-tsc.js" "$@"
|
|
15
|
-
else
|
|
16
|
-
exec node "$basedir/../vue-tsc/bin/vue-tsc.js" "$@"
|
|
17
|
-
fi
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":"1.6.1","results":[[":test/DynamicForm.test.ts",{"duration":21,"failed":false}],[":test/FormFieldRenderer.test.ts",{"duration":82,"failed":false}]]}
|
|
@@ -1,118 +0,0 @@
|
|
|
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
|
-
type __VLS_NativeElements = __VLS_SpreadMerge<SVGElementTagNameMap, HTMLElementTagNameMap>;
|
|
11
|
-
type __VLS_IntrinsicElements = import('vue/jsx-runtime').JSX.IntrinsicElements;
|
|
12
|
-
type __VLS_Element = import('vue/jsx-runtime').JSX.Element;
|
|
13
|
-
type __VLS_GlobalComponents = import('vue').GlobalComponents;
|
|
14
|
-
type __VLS_GlobalDirectives = import('vue').GlobalDirectives;
|
|
15
|
-
type __VLS_IsAny<T> = 0 extends 1 & T ? true : false;
|
|
16
|
-
type __VLS_PickNotAny<A, B> = __VLS_IsAny<A> extends true ? B : A;
|
|
17
|
-
type __VLS_SpreadMerge<A, B> = Omit<A, keyof B> & B;
|
|
18
|
-
type __VLS_WithComponent<N0 extends string, LocalComponents, Self, N1 extends string, N2 extends string, N3 extends string> =
|
|
19
|
-
N1 extends keyof LocalComponents ? N1 extends N0 ? Pick<LocalComponents, N0 extends keyof LocalComponents ? N0 : never> : { [K in N0]: LocalComponents[N1] } :
|
|
20
|
-
N2 extends keyof LocalComponents ? N2 extends N0 ? Pick<LocalComponents, N0 extends keyof LocalComponents ? N0 : never> : { [K in N0]: LocalComponents[N2] } :
|
|
21
|
-
N3 extends keyof LocalComponents ? N3 extends N0 ? Pick<LocalComponents, N0 extends keyof LocalComponents ? N0 : never> : { [K in N0]: LocalComponents[N3] } :
|
|
22
|
-
Self extends object ? { [K in N0]: Self } :
|
|
23
|
-
N1 extends keyof __VLS_GlobalComponents ? N1 extends N0 ? Pick<__VLS_GlobalComponents, N0 extends keyof __VLS_GlobalComponents ? N0 : never> : { [K in N0]: __VLS_GlobalComponents[N1] } :
|
|
24
|
-
N2 extends keyof __VLS_GlobalComponents ? N2 extends N0 ? Pick<__VLS_GlobalComponents, N0 extends keyof __VLS_GlobalComponents ? N0 : never> : { [K in N0]: __VLS_GlobalComponents[N2] } :
|
|
25
|
-
N3 extends keyof __VLS_GlobalComponents ? N3 extends N0 ? Pick<__VLS_GlobalComponents, N0 extends keyof __VLS_GlobalComponents ? N0 : never> : { [K in N0]: __VLS_GlobalComponents[N3] } :
|
|
26
|
-
{ [K in N0]: unknown };
|
|
27
|
-
type __VLS_FunctionalComponentProps<T, K> =
|
|
28
|
-
'__ctx' extends keyof __VLS_PickNotAny<K, {}> ? K extends { __ctx?: { props?: infer P } } ? NonNullable<P> : never
|
|
29
|
-
: T extends (props: infer P, ...args: any) => any ? P :
|
|
30
|
-
{};
|
|
31
|
-
type __VLS_IsFunction<T, K> = K extends keyof T
|
|
32
|
-
? __VLS_IsAny<T[K]> extends false
|
|
33
|
-
? unknown extends T[K]
|
|
34
|
-
? false
|
|
35
|
-
: true
|
|
36
|
-
: false
|
|
37
|
-
: false;
|
|
38
|
-
type __VLS_NormalizeComponentEvent<Props, Events, onEvent extends keyof Props, Event extends keyof Events, CamelizedEvent extends keyof Events> = (
|
|
39
|
-
__VLS_IsFunction<Props, onEvent> extends true
|
|
40
|
-
? Props
|
|
41
|
-
: __VLS_IsFunction<Events, Event> extends true
|
|
42
|
-
? { [K in onEvent]?: Events[Event] }
|
|
43
|
-
: __VLS_IsFunction<Events, CamelizedEvent> extends true
|
|
44
|
-
? { [K in onEvent]?: Events[CamelizedEvent] }
|
|
45
|
-
: Props
|
|
46
|
-
) & Record<string, unknown>;
|
|
47
|
-
// fix https://github.com/vuejs/language-tools/issues/926
|
|
48
|
-
type __VLS_UnionToIntersection<U> = (U extends unknown ? (arg: U) => unknown : never) extends ((arg: infer P) => unknown) ? P : never;
|
|
49
|
-
type __VLS_OverloadUnionInner<T, U = unknown> = U & T extends (...args: infer A) => infer R
|
|
50
|
-
? U extends T
|
|
51
|
-
? never
|
|
52
|
-
: __VLS_OverloadUnionInner<T, Pick<T, keyof T> & U & ((...args: A) => R)> | ((...args: A) => R)
|
|
53
|
-
: never;
|
|
54
|
-
type __VLS_OverloadUnion<T> = Exclude<
|
|
55
|
-
__VLS_OverloadUnionInner<(() => never) & T>,
|
|
56
|
-
T extends () => never ? never : () => never
|
|
57
|
-
>;
|
|
58
|
-
type __VLS_ConstructorOverloads<T> = __VLS_OverloadUnion<T> extends infer F
|
|
59
|
-
? F extends (event: infer E, ...args: infer A) => any
|
|
60
|
-
? { [K in E & string]: (...args: A) => void; }
|
|
61
|
-
: never
|
|
62
|
-
: never;
|
|
63
|
-
type __VLS_NormalizeEmits<T> = __VLS_PrettifyGlobal<
|
|
64
|
-
__VLS_UnionToIntersection<
|
|
65
|
-
__VLS_ConstructorOverloads<T> & {
|
|
66
|
-
[K in keyof T]: T[K] extends any[] ? { (...args: T[K]): void } : never
|
|
67
|
-
}
|
|
68
|
-
>
|
|
69
|
-
>;
|
|
70
|
-
type __VLS_PrettifyGlobal<T> = { [K in keyof T]: T[K]; } & {};
|
|
71
|
-
type __VLS_PickFunctionalComponentCtx<T, K> = NonNullable<__VLS_PickNotAny<
|
|
72
|
-
'__ctx' extends keyof __VLS_PickNotAny<K, {}> ? K extends { __ctx?: infer Ctx } ? Ctx : never : any
|
|
73
|
-
, T extends (props: any, ctx: infer Ctx) => any ? Ctx : any
|
|
74
|
-
>>;
|
|
75
|
-
type __VLS_UseTemplateRef<T> = Readonly<import('vue').ShallowRef<T | null>>;
|
|
76
|
-
|
|
77
|
-
function __VLS_getVForSourceType<T extends number | string | any[] | Iterable<any>>(source: T): [
|
|
78
|
-
item: T extends number ? number
|
|
79
|
-
: T extends string ? string
|
|
80
|
-
: T extends any[] ? T[number]
|
|
81
|
-
: T extends Iterable<infer T1> ? T1
|
|
82
|
-
: any,
|
|
83
|
-
index: number,
|
|
84
|
-
][];
|
|
85
|
-
function __VLS_getVForSourceType<T>(source: T): [
|
|
86
|
-
item: T[keyof T],
|
|
87
|
-
key: keyof T,
|
|
88
|
-
index: number,
|
|
89
|
-
][];
|
|
90
|
-
// @ts-ignore
|
|
91
|
-
function __VLS_getSlotParams<T>(slot: T): Parameters<__VLS_PickNotAny<NonNullable<T>, (...args: any[]) => any>>;
|
|
92
|
-
// @ts-ignore
|
|
93
|
-
function __VLS_getSlotParam<T>(slot: T): Parameters<__VLS_PickNotAny<NonNullable<T>, (...args: any[]) => any>>[0];
|
|
94
|
-
function __VLS_asFunctionalDirective<T>(dir: T): T extends import('vue').ObjectDirective
|
|
95
|
-
? NonNullable<T['created' | 'beforeMount' | 'mounted' | 'beforeUpdate' | 'updated' | 'beforeUnmount' | 'unmounted']>
|
|
96
|
-
: T extends (...args: any) => any
|
|
97
|
-
? T
|
|
98
|
-
: (arg1: unknown, arg2: unknown, arg3: unknown, arg4: unknown) => void;
|
|
99
|
-
function __VLS_makeOptional<T>(t: T): { [K in keyof T]?: T[K] };
|
|
100
|
-
function __VLS_asFunctionalComponent<T, K = T extends new (...args: any) => any ? InstanceType<T> : unknown>(t: T, instance?: K):
|
|
101
|
-
T extends new (...args: any) => any
|
|
102
|
-
? (props: (K extends { $props: infer Props } ? Props : any) & Record<string, unknown>, ctx?: any) => __VLS_Element & {
|
|
103
|
-
__ctx?: {
|
|
104
|
-
attrs?: any;
|
|
105
|
-
slots?: K extends { $slots: infer Slots } ? Slots : any;
|
|
106
|
-
emit?: K extends { $emit: infer Emit } ? Emit : any;
|
|
107
|
-
expose?(exposed: K): void;
|
|
108
|
-
props?: (K extends { $props: infer Props } ? Props : any) & Record<string, unknown>;
|
|
109
|
-
}
|
|
110
|
-
}
|
|
111
|
-
: T extends () => any ? (props: {}, ctx?: any) => ReturnType<T>
|
|
112
|
-
: T extends (...args: any) => any ? T
|
|
113
|
-
: (_: {} & Record<string, unknown>, ctx?: any) => { __ctx?: { attrs?: any, expose?: any, slots?: any, emit?: any, props?: {} & Record<string, unknown> } };
|
|
114
|
-
function __VLS_functionalComponentArgsRest<T extends (...args: any) => any>(t: T): 2 extends Parameters<T>['length'] ? [any] : [];
|
|
115
|
-
function __VLS_asFunctionalElement<T>(tag: T, endTag?: T): (attrs: T & Record<string, unknown>) => void;
|
|
116
|
-
function __VLS_asFunctionalSlot<S>(slot: S): S extends () => infer R ? (props: {}) => R : NonNullable<S>;
|
|
117
|
-
function __VLS_tryAsConstant<const T>(t: T): T;
|
|
118
|
-
}
|
|
@@ -1,128 +0,0 @@
|
|
|
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,53 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "pdyform-vue",
|
|
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
|
-
],
|
|
11
|
-
"type": "module",
|
|
12
|
-
"main": "./dist/index.js",
|
|
13
|
-
"module": "./dist/index.mjs",
|
|
14
|
-
"types": "./dist/index.d.ts",
|
|
15
|
-
"files": [
|
|
16
|
-
"dist"
|
|
17
|
-
],
|
|
18
|
-
"homepage": "https://github.com/LaoChen1994/pdyform",
|
|
19
|
-
"repository": {
|
|
20
|
-
"type": "git",
|
|
21
|
-
"url": "https://github.com/LaoChen1994/pdyform"
|
|
22
|
-
},
|
|
23
|
-
"scripts": {
|
|
24
|
-
"build": "vite build && vue-tsc -p tsconfig.json --declaration --emitDeclarationOnly --outDir dist",
|
|
25
|
-
"dev": "vite",
|
|
26
|
-
"test": "vitest run",
|
|
27
|
-
"lint": "eslint src/**/*.{ts,vue} --no-error-on-unmatched-pattern"
|
|
28
|
-
},
|
|
29
|
-
"dependencies": {
|
|
30
|
-
"class-variance-authority": "^0.7.1",
|
|
31
|
-
"clsx": "^2.1.1",
|
|
32
|
-
"lucide-vue-next": "^0.300.0",
|
|
33
|
-
"pdyform": "workspace:*",
|
|
34
|
-
"radix-vue": "^1.9.17",
|
|
35
|
-
"tailwind-merge": "^2.6.1"
|
|
36
|
-
},
|
|
37
|
-
"peerDependencies": {
|
|
38
|
-
"vue": "^3.5.0"
|
|
39
|
-
},
|
|
40
|
-
"devDependencies": {
|
|
41
|
-
"@types/node": "^20.0.0",
|
|
42
|
-
"@vitejs/plugin-vue": "^5.0.0",
|
|
43
|
-
"@vue/test-utils": "^2.4.6",
|
|
44
|
-
"@vue/tsconfig": "^0.5.0",
|
|
45
|
-
"jsdom": "^22.1.0",
|
|
46
|
-
"typescript": "^5.0.0",
|
|
47
|
-
"vite": "^5.0.0",
|
|
48
|
-
"vite-plugin-dts": "^4.5.4",
|
|
49
|
-
"vitest": "^1.0.0",
|
|
50
|
-
"vue": "^3.5.0",
|
|
51
|
-
"vue-tsc": "^2.0.0"
|
|
52
|
-
}
|
|
53
|
-
}
|