@formisch/solid 0.9.2 → 0.9.4
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/dist/dev.js +2 -2
- package/dist/dev.jsx +2 -2
- package/dist/index.d.ts +1 -1
- package/dist/index.js +2 -2
- package/dist/index.jsx +2 -2
- package/package.json +14 -14
package/dist/dev.js
CHANGED
|
@@ -18,10 +18,10 @@ function createSignal(initialValue) {
|
|
|
18
18
|
}
|
|
19
19
|
function initializeFieldStore(internalFieldStore, schema, initialInput, path, nullish = false) {
|
|
20
20
|
if (framework === "qwik" && schema.type === "lazy" || schema.type === "object_with_rest" || schema.type === "record" || schema.type === "tuple_with_rest" || schema.type === "promise") throw new Error(`"${schema.type}" schema is not supported`);
|
|
21
|
-
else if (schema.type === "lazy") initializeFieldStore(internalFieldStore, schema.getter(void 0), initialInput, path);
|
|
21
|
+
else if (schema.type === "lazy") initializeFieldStore(internalFieldStore, schema.getter(void 0), initialInput, path, nullish);
|
|
22
22
|
else if (schema.type === "exact_optional" || schema.type === "nullable" || schema.type === "nullish" || schema.type === "optional" || schema.type === "undefinedable") initializeFieldStore(internalFieldStore, schema.wrapped, initialInput === void 0 ? v.getDefault(schema) : initialInput, path, true);
|
|
23
23
|
else if (schema.type === "non_nullable" || schema.type === "non_nullish" || schema.type === "non_optional") initializeFieldStore(internalFieldStore, schema.wrapped, initialInput, path);
|
|
24
|
-
else if (schema.type === "intersect" || schema.type === "union" || schema.type === "variant") for (const schemaOption of schema.options) initializeFieldStore(internalFieldStore, schemaOption, initialInput, path);
|
|
24
|
+
else if (schema.type === "intersect" || schema.type === "union" || schema.type === "variant") for (const schemaOption of schema.options) initializeFieldStore(internalFieldStore, schemaOption, initialInput, path, nullish);
|
|
25
25
|
else {
|
|
26
26
|
internalFieldStore.schema = schema;
|
|
27
27
|
internalFieldStore.name = JSON.stringify(path);
|
package/dist/dev.jsx
CHANGED
|
@@ -16,10 +16,10 @@ function createSignal(initialValue) {
|
|
|
16
16
|
}
|
|
17
17
|
function initializeFieldStore(internalFieldStore, schema, initialInput, path, nullish = false) {
|
|
18
18
|
if (framework === "qwik" && schema.type === "lazy" || schema.type === "object_with_rest" || schema.type === "record" || schema.type === "tuple_with_rest" || schema.type === "promise") throw new Error(`"${schema.type}" schema is not supported`);
|
|
19
|
-
else if (schema.type === "lazy") initializeFieldStore(internalFieldStore, schema.getter(void 0), initialInput, path);
|
|
19
|
+
else if (schema.type === "lazy") initializeFieldStore(internalFieldStore, schema.getter(void 0), initialInput, path, nullish);
|
|
20
20
|
else if (schema.type === "exact_optional" || schema.type === "nullable" || schema.type === "nullish" || schema.type === "optional" || schema.type === "undefinedable") initializeFieldStore(internalFieldStore, schema.wrapped, initialInput === void 0 ? v.getDefault(schema) : initialInput, path, true);
|
|
21
21
|
else if (schema.type === "non_nullable" || schema.type === "non_nullish" || schema.type === "non_optional") initializeFieldStore(internalFieldStore, schema.wrapped, initialInput, path);
|
|
22
|
-
else if (schema.type === "intersect" || schema.type === "union" || schema.type === "variant") for (const schemaOption of schema.options) initializeFieldStore(internalFieldStore, schemaOption, initialInput, path);
|
|
22
|
+
else if (schema.type === "intersect" || schema.type === "union" || schema.type === "variant") for (const schemaOption of schema.options) initializeFieldStore(internalFieldStore, schemaOption, initialInput, path, nullish);
|
|
23
23
|
else {
|
|
24
24
|
internalFieldStore.schema = schema;
|
|
25
25
|
internalFieldStore.name = JSON.stringify(path);
|
package/dist/index.d.ts
CHANGED
|
@@ -1035,7 +1035,7 @@ type FormProps<TSchema extends Schema = Schema> = Omit<JSX.FormHTMLAttributes<HT
|
|
|
1035
1035
|
/**
|
|
1036
1036
|
* The submit handler called when the form is submitted and validation succeeds.
|
|
1037
1037
|
*/
|
|
1038
|
-
readonly onSubmit:
|
|
1038
|
+
readonly onSubmit: SubmitEventHandler<TSchema>;
|
|
1039
1039
|
};
|
|
1040
1040
|
/**
|
|
1041
1041
|
* Form component that manages form submission and applies internal state.
|
package/dist/index.js
CHANGED
|
@@ -18,10 +18,10 @@ function createSignal(initialValue) {
|
|
|
18
18
|
}
|
|
19
19
|
function initializeFieldStore(internalFieldStore, schema, initialInput, path, nullish = false) {
|
|
20
20
|
if (framework === "qwik" && schema.type === "lazy" || schema.type === "object_with_rest" || schema.type === "record" || schema.type === "tuple_with_rest" || schema.type === "promise") throw new Error(`"${schema.type}" schema is not supported`);
|
|
21
|
-
else if (schema.type === "lazy") initializeFieldStore(internalFieldStore, schema.getter(void 0), initialInput, path);
|
|
21
|
+
else if (schema.type === "lazy") initializeFieldStore(internalFieldStore, schema.getter(void 0), initialInput, path, nullish);
|
|
22
22
|
else if (schema.type === "exact_optional" || schema.type === "nullable" || schema.type === "nullish" || schema.type === "optional" || schema.type === "undefinedable") initializeFieldStore(internalFieldStore, schema.wrapped, initialInput === void 0 ? v.getDefault(schema) : initialInput, path, true);
|
|
23
23
|
else if (schema.type === "non_nullable" || schema.type === "non_nullish" || schema.type === "non_optional") initializeFieldStore(internalFieldStore, schema.wrapped, initialInput, path);
|
|
24
|
-
else if (schema.type === "intersect" || schema.type === "union" || schema.type === "variant") for (const schemaOption of schema.options) initializeFieldStore(internalFieldStore, schemaOption, initialInput, path);
|
|
24
|
+
else if (schema.type === "intersect" || schema.type === "union" || schema.type === "variant") for (const schemaOption of schema.options) initializeFieldStore(internalFieldStore, schemaOption, initialInput, path, nullish);
|
|
25
25
|
else {
|
|
26
26
|
internalFieldStore.schema = schema;
|
|
27
27
|
internalFieldStore.name = JSON.stringify(path);
|
package/dist/index.jsx
CHANGED
|
@@ -16,10 +16,10 @@ function createSignal(initialValue) {
|
|
|
16
16
|
}
|
|
17
17
|
function initializeFieldStore(internalFieldStore, schema, initialInput, path, nullish = false) {
|
|
18
18
|
if (framework === "qwik" && schema.type === "lazy" || schema.type === "object_with_rest" || schema.type === "record" || schema.type === "tuple_with_rest" || schema.type === "promise") throw new Error(`"${schema.type}" schema is not supported`);
|
|
19
|
-
else if (schema.type === "lazy") initializeFieldStore(internalFieldStore, schema.getter(void 0), initialInput, path);
|
|
19
|
+
else if (schema.type === "lazy") initializeFieldStore(internalFieldStore, schema.getter(void 0), initialInput, path, nullish);
|
|
20
20
|
else if (schema.type === "exact_optional" || schema.type === "nullable" || schema.type === "nullish" || schema.type === "optional" || schema.type === "undefinedable") initializeFieldStore(internalFieldStore, schema.wrapped, initialInput === void 0 ? v.getDefault(schema) : initialInput, path, true);
|
|
21
21
|
else if (schema.type === "non_nullable" || schema.type === "non_nullish" || schema.type === "non_optional") initializeFieldStore(internalFieldStore, schema.wrapped, initialInput, path);
|
|
22
|
-
else if (schema.type === "intersect" || schema.type === "union" || schema.type === "variant") for (const schemaOption of schema.options) initializeFieldStore(internalFieldStore, schemaOption, initialInput, path);
|
|
22
|
+
else if (schema.type === "intersect" || schema.type === "union" || schema.type === "variant") for (const schemaOption of schema.options) initializeFieldStore(internalFieldStore, schemaOption, initialInput, path, nullish);
|
|
23
23
|
else {
|
|
24
24
|
internalFieldStore.schema = schema;
|
|
25
25
|
internalFieldStore.name = JSON.stringify(path);
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@formisch/solid",
|
|
3
3
|
"description": "The modular and type-safe form library for SolidJS",
|
|
4
|
-
"version": "0.9.
|
|
4
|
+
"version": "0.9.4",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Fabian Hiller",
|
|
7
7
|
"homepage": "https://formisch.dev",
|
|
@@ -43,7 +43,17 @@
|
|
|
43
43
|
"publishConfig": {
|
|
44
44
|
"access": "public"
|
|
45
45
|
},
|
|
46
|
+
"scripts": {
|
|
47
|
+
"lint": "eslint \"src/**/*.ts*\" && tsc --noEmit",
|
|
48
|
+
"lint.fix": "eslint \"src/**/*.ts*\" --fix",
|
|
49
|
+
"format": "prettier --write ./src",
|
|
50
|
+
"format.check": "prettier --check ./src",
|
|
51
|
+
"build": "tsup && tsdown"
|
|
52
|
+
},
|
|
46
53
|
"devDependencies": {
|
|
54
|
+
"@formisch/core": "workspace:*",
|
|
55
|
+
"@formisch/eslint-config": "workspace:*",
|
|
56
|
+
"@formisch/methods": "workspace:*",
|
|
47
57
|
"@vitest/coverage-v8": "^3.2.4",
|
|
48
58
|
"eslint": "^9.31.0",
|
|
49
59
|
"eslint-plugin-solid": "^0.14.5",
|
|
@@ -56,10 +66,7 @@
|
|
|
56
66
|
"tsup-preset-solid": "^2.2.0",
|
|
57
67
|
"typescript": "^5.8.3",
|
|
58
68
|
"valibot": "^1.2.0",
|
|
59
|
-
"vitest": "3.2.4"
|
|
60
|
-
"@formisch/core": "0.6.2",
|
|
61
|
-
"@formisch/eslint-config": "0.1.0",
|
|
62
|
-
"@formisch/methods": "0.7.0"
|
|
69
|
+
"vitest": "3.2.4"
|
|
63
70
|
},
|
|
64
71
|
"peerDependencies": {
|
|
65
72
|
"solid-js": "^1.6.0",
|
|
@@ -72,12 +79,5 @@
|
|
|
72
79
|
}
|
|
73
80
|
},
|
|
74
81
|
"browser": {},
|
|
75
|
-
"typesVersions": {}
|
|
76
|
-
|
|
77
|
-
"lint": "eslint \"src/**/*.ts*\" && tsc --noEmit",
|
|
78
|
-
"lint.fix": "eslint \"src/**/*.ts*\" --fix",
|
|
79
|
-
"format": "prettier --write ./src",
|
|
80
|
-
"format.check": "prettier --check ./src",
|
|
81
|
-
"build": "tsup && tsdown"
|
|
82
|
-
}
|
|
83
|
-
}
|
|
82
|
+
"typesVersions": {}
|
|
83
|
+
}
|