formspec 0.1.0-alpha.11 → 0.1.0-alpha.12
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 +8 -4
- package/dist/formspec.d.ts +3 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js.map +1 -1
- package/package.json +5 -5
package/README.md
CHANGED
|
@@ -147,10 +147,14 @@ You can import from the umbrella package for convenience, or from individual pac
|
|
|
147
147
|
|
|
148
148
|
## Related Packages
|
|
149
149
|
|
|
150
|
-
| Package
|
|
151
|
-
|
|
|
152
|
-
| `@formspec/
|
|
153
|
-
| `@formspec/
|
|
150
|
+
| Package | Description |
|
|
151
|
+
| --- | --- |
|
|
152
|
+
| `@formspec/constraints` | Constraint definitions and validators |
|
|
153
|
+
| `@formspec/validator` | JSON Schema validation for secure runtimes |
|
|
154
|
+
| `@formspec/eslint-plugin` | ESLint rules for FormSpec |
|
|
155
|
+
| `@formspec/language-server` | Language server for editor integration |
|
|
156
|
+
| `@formspec/cli` | CLI tool for build-time schema generation |
|
|
157
|
+
| `@formspec/playground` | Interactive browser editor (private) |
|
|
154
158
|
|
|
155
159
|
## License
|
|
156
160
|
|
package/dist/formspec.d.ts
CHANGED
|
@@ -91,6 +91,7 @@ import { InferFieldValue } from '@formspec/dsl';
|
|
|
91
91
|
import { InferFormSchema } from '@formspec/dsl';
|
|
92
92
|
import { InferSchema } from '@formspec/dsl';
|
|
93
93
|
import { is } from '@formspec/dsl';
|
|
94
|
+
import { JsonSchema2020 } from '@formspec/build';
|
|
94
95
|
import { JSONSchema7 } from '@formspec/build';
|
|
95
96
|
import { JSONSchemaType } from '@formspec/build';
|
|
96
97
|
import { logValidationIssues } from '@formspec/dsl';
|
|
@@ -197,6 +198,8 @@ export { InferSchema }
|
|
|
197
198
|
|
|
198
199
|
export { is }
|
|
199
200
|
|
|
201
|
+
export { JsonSchema2020 }
|
|
202
|
+
|
|
200
203
|
export { JSONSchema7 }
|
|
201
204
|
|
|
202
205
|
export { JSONSchemaType }
|
package/dist/index.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/index.ts"],"sourcesContent":["/**\n * FormSpec - Type-safe form specifications\n *\n * This package re-exports everything from the FormSpec library for convenience.\n * You can import everything you need from a single package:\n *\n * @example\n * ```typescript\n * import {\n * // DSL functions\n * formspec, field, group, when, is,\n * // Type inference\n * type InferSchema,\n * // Schema generation\n * buildFormSchemas,\n * // Resolvers\n * defineResolvers,\n * // Core types\n * type FormSpec, type FormElement,\n * } from \"formspec\";\n *\n * // Define a form\n * const InvoiceForm = formspec(\n * group(\"Customer\",\n * field.text(\"name\", { label: \"Name\", required: true }),\n * field.dynamicEnum(\"country\", \"fetch_countries\", { label: \"Country\" }),\n * ),\n * group(\"Details\",\n * field.number(\"amount\", { label: \"Amount\", min: 0 }),\n * field.enum(\"status\", [\"draft\", \"sent\", \"paid\"]),\n * when(is(\"status\", \"draft\"),\n * field.text(\"notes\", { label: \"Internal Notes\" }),\n * ),\n * ),\n * );\n *\n * // Infer the schema type\n * type Schema = InferSchema<typeof InvoiceForm.elements>;\n *\n * // Generate JSON Schema and UI Schema\n * const { jsonSchema, uiSchema } = buildFormSchemas(InvoiceForm);\n *\n * // Define resolvers for dynamic data\n * const resolvers = defineResolvers(InvoiceForm, {\n * fetch_countries: async () => ({\n * options: [{ value: \"us\", label: \"United States\" }],\n * validity: \"valid\",\n * }),\n * });\n * ```\n *\n * @packageDocumentation\n */\n\n// =============================================================================\n// Core types\n// =============================================================================\n\nexport type {\n // Validity\n Validity,\n\n // Field state\n FieldState,\n\n // Form state\n FormState,\n\n // Data sources\n DataSourceRegistry,\n DataSourceOption,\n FetchOptionsResponse,\n DataSourceValueType,\n\n // Elements\n TextField,\n NumberField,\n BooleanField,\n StaticEnumField,\n DynamicEnumField,\n DynamicSchemaField,\n ArrayField,\n ObjectField,\n AnyField,\n Group,\n Conditional,\n FormElement,\n FormSpec,\n\n // Predicates\n EqualsPredicate,\n Predicate,\n} from \"@formspec/core\";\n\nexport { createInitialFieldState } from \"@formspec/core\";\n\n// =============================================================================\n// DSL functions\n// =============================================================================\n\nexport {\n field,\n group,\n when,\n is,\n formspec,\n formspecWithValidation,\n validateForm,\n logValidationIssues,\n} from \"@formspec/dsl\";\n\n// Re-export enum option types (commonly used)\nexport type { EnumOption, EnumOptionValue } from \"@formspec/dsl\";\n\nexport type {\n // Type inference\n InferFieldValue,\n ExtractFields,\n ExtractFieldsFromArray,\n BuildSchema,\n InferSchema,\n InferFormSchema,\n // Validation\n FormSpecOptions,\n ValidationSeverity,\n ValidationIssue,\n ValidationResult,\n} from \"@formspec/dsl\";\n\n// =============================================================================\n// Build tools\n// =============================================================================\n\nexport {\n generateJsonSchema,\n generateUiSchema,\n buildFormSchemas,\n writeSchemas,\n} from \"@formspec/build\";\n\nexport type {\n JSONSchema7,\n JSONSchemaType,\n UISchema,\n UISchemaElement,\n UISchemaElementType,\n ControlElement,\n VerticalLayout,\n HorizontalLayout,\n GroupLayout,\n Rule,\n RuleEffect,\n SchemaBasedCondition,\n BuildResult,\n WriteSchemasOptions,\n WriteSchemasResult,\n} from \"@formspec/build\";\n\n// =============================================================================\n// Runtime helpers\n// =============================================================================\n\nexport { defineResolvers } from \"@formspec/runtime\";\n\nexport type { Resolver, ResolverMap, ResolverRegistry } from \"@formspec/runtime\";\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AA8FA,kBAAwC;AAMxC,iBASO;AAwBP,mBAKO;
|
|
1
|
+
{"version":3,"sources":["../src/index.ts"],"sourcesContent":["/**\n * FormSpec - Type-safe form specifications\n *\n * This package re-exports everything from the FormSpec library for convenience.\n * You can import everything you need from a single package:\n *\n * @example\n * ```typescript\n * import {\n * // DSL functions\n * formspec, field, group, when, is,\n * // Type inference\n * type InferSchema,\n * // Schema generation\n * buildFormSchemas,\n * // Resolvers\n * defineResolvers,\n * // Core types\n * type FormSpec, type FormElement,\n * } from \"formspec\";\n *\n * // Define a form\n * const InvoiceForm = formspec(\n * group(\"Customer\",\n * field.text(\"name\", { label: \"Name\", required: true }),\n * field.dynamicEnum(\"country\", \"fetch_countries\", { label: \"Country\" }),\n * ),\n * group(\"Details\",\n * field.number(\"amount\", { label: \"Amount\", min: 0 }),\n * field.enum(\"status\", [\"draft\", \"sent\", \"paid\"]),\n * when(is(\"status\", \"draft\"),\n * field.text(\"notes\", { label: \"Internal Notes\" }),\n * ),\n * ),\n * );\n *\n * // Infer the schema type\n * type Schema = InferSchema<typeof InvoiceForm.elements>;\n *\n * // Generate JSON Schema and UI Schema\n * const { jsonSchema, uiSchema } = buildFormSchemas(InvoiceForm);\n *\n * // Define resolvers for dynamic data\n * const resolvers = defineResolvers(InvoiceForm, {\n * fetch_countries: async () => ({\n * options: [{ value: \"us\", label: \"United States\" }],\n * validity: \"valid\",\n * }),\n * });\n * ```\n *\n * @packageDocumentation\n */\n\n// =============================================================================\n// Core types\n// =============================================================================\n\nexport type {\n // Validity\n Validity,\n\n // Field state\n FieldState,\n\n // Form state\n FormState,\n\n // Data sources\n DataSourceRegistry,\n DataSourceOption,\n FetchOptionsResponse,\n DataSourceValueType,\n\n // Elements\n TextField,\n NumberField,\n BooleanField,\n StaticEnumField,\n DynamicEnumField,\n DynamicSchemaField,\n ArrayField,\n ObjectField,\n AnyField,\n Group,\n Conditional,\n FormElement,\n FormSpec,\n\n // Predicates\n EqualsPredicate,\n Predicate,\n} from \"@formspec/core\";\n\nexport { createInitialFieldState } from \"@formspec/core\";\n\n// =============================================================================\n// DSL functions\n// =============================================================================\n\nexport {\n field,\n group,\n when,\n is,\n formspec,\n formspecWithValidation,\n validateForm,\n logValidationIssues,\n} from \"@formspec/dsl\";\n\n// Re-export enum option types (commonly used)\nexport type { EnumOption, EnumOptionValue } from \"@formspec/dsl\";\n\nexport type {\n // Type inference\n InferFieldValue,\n ExtractFields,\n ExtractFieldsFromArray,\n BuildSchema,\n InferSchema,\n InferFormSchema,\n // Validation\n FormSpecOptions,\n ValidationSeverity,\n ValidationIssue,\n ValidationResult,\n} from \"@formspec/dsl\";\n\n// =============================================================================\n// Build tools\n// =============================================================================\n\nexport {\n generateJsonSchema,\n generateUiSchema,\n buildFormSchemas,\n writeSchemas,\n} from \"@formspec/build\";\n\nexport type {\n JsonSchema2020,\n JSONSchema7,\n JSONSchemaType,\n UISchema,\n UISchemaElement,\n UISchemaElementType,\n ControlElement,\n VerticalLayout,\n HorizontalLayout,\n GroupLayout,\n Rule,\n RuleEffect,\n SchemaBasedCondition,\n BuildResult,\n WriteSchemasOptions,\n WriteSchemasResult,\n} from \"@formspec/build\";\n\n// =============================================================================\n// Runtime helpers\n// =============================================================================\n\nexport { defineResolvers } from \"@formspec/runtime\";\n\nexport type { Resolver, ResolverMap, ResolverRegistry } from \"@formspec/runtime\";\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AA8FA,kBAAwC;AAMxC,iBASO;AAwBP,mBAKO;AAyBP,qBAAgC;","names":[]}
|
package/dist/index.d.ts
CHANGED
|
@@ -57,7 +57,7 @@ export { field, group, when, is, formspec, formspecWithValidation, validateForm,
|
|
|
57
57
|
export type { EnumOption, EnumOptionValue } from "@formspec/dsl";
|
|
58
58
|
export type { InferFieldValue, ExtractFields, ExtractFieldsFromArray, BuildSchema, InferSchema, InferFormSchema, FormSpecOptions, ValidationSeverity, ValidationIssue, ValidationResult, } from "@formspec/dsl";
|
|
59
59
|
export { generateJsonSchema, generateUiSchema, buildFormSchemas, writeSchemas, } from "@formspec/build";
|
|
60
|
-
export type { JSONSchema7, JSONSchemaType, UISchema, UISchemaElement, UISchemaElementType, ControlElement, VerticalLayout, HorizontalLayout, GroupLayout, Rule, RuleEffect, SchemaBasedCondition, BuildResult, WriteSchemasOptions, WriteSchemasResult, } from "@formspec/build";
|
|
60
|
+
export type { JsonSchema2020, JSONSchema7, JSONSchemaType, UISchema, UISchemaElement, UISchemaElementType, ControlElement, VerticalLayout, HorizontalLayout, GroupLayout, Rule, RuleEffect, SchemaBasedCondition, BuildResult, WriteSchemasOptions, WriteSchemasResult, } from "@formspec/build";
|
|
61
61
|
export { defineResolvers } from "@formspec/runtime";
|
|
62
62
|
export type { Resolver, ResolverMap, ResolverRegistry } from "@formspec/runtime";
|
|
63
63
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoDG;AAMH,YAAY,EAEV,QAAQ,EAGR,UAAU,EAGV,SAAS,EAGT,kBAAkB,EAClB,gBAAgB,EAChB,oBAAoB,EACpB,mBAAmB,EAGnB,SAAS,EACT,WAAW,EACX,YAAY,EACZ,eAAe,EACf,gBAAgB,EAChB,kBAAkB,EAClB,UAAU,EACV,WAAW,EACX,QAAQ,EACR,KAAK,EACL,WAAW,EACX,WAAW,EACX,QAAQ,EAGR,eAAe,EACf,SAAS,GACV,MAAM,gBAAgB,CAAC;AAExB,OAAO,EAAE,uBAAuB,EAAE,MAAM,gBAAgB,CAAC;AAMzD,OAAO,EACL,KAAK,EACL,KAAK,EACL,IAAI,EACJ,EAAE,EACF,QAAQ,EACR,sBAAsB,EACtB,YAAY,EACZ,mBAAmB,GACpB,MAAM,eAAe,CAAC;AAGvB,YAAY,EAAE,UAAU,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAEjE,YAAY,EAEV,eAAe,EACf,aAAa,EACb,sBAAsB,EACtB,WAAW,EACX,WAAW,EACX,eAAe,EAEf,eAAe,EACf,kBAAkB,EAClB,eAAe,EACf,gBAAgB,GACjB,MAAM,eAAe,CAAC;AAMvB,OAAO,EACL,kBAAkB,EAClB,gBAAgB,EAChB,gBAAgB,EAChB,YAAY,GACb,MAAM,iBAAiB,CAAC;AAEzB,YAAY,EACV,WAAW,EACX,cAAc,EACd,QAAQ,EACR,eAAe,EACf,mBAAmB,EACnB,cAAc,EACd,cAAc,EACd,gBAAgB,EAChB,WAAW,EACX,IAAI,EACJ,UAAU,EACV,oBAAoB,EACpB,WAAW,EACX,mBAAmB,EACnB,kBAAkB,GACnB,MAAM,iBAAiB,CAAC;AAMzB,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAEpD,YAAY,EAAE,QAAQ,EAAE,WAAW,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoDG;AAMH,YAAY,EAEV,QAAQ,EAGR,UAAU,EAGV,SAAS,EAGT,kBAAkB,EAClB,gBAAgB,EAChB,oBAAoB,EACpB,mBAAmB,EAGnB,SAAS,EACT,WAAW,EACX,YAAY,EACZ,eAAe,EACf,gBAAgB,EAChB,kBAAkB,EAClB,UAAU,EACV,WAAW,EACX,QAAQ,EACR,KAAK,EACL,WAAW,EACX,WAAW,EACX,QAAQ,EAGR,eAAe,EACf,SAAS,GACV,MAAM,gBAAgB,CAAC;AAExB,OAAO,EAAE,uBAAuB,EAAE,MAAM,gBAAgB,CAAC;AAMzD,OAAO,EACL,KAAK,EACL,KAAK,EACL,IAAI,EACJ,EAAE,EACF,QAAQ,EACR,sBAAsB,EACtB,YAAY,EACZ,mBAAmB,GACpB,MAAM,eAAe,CAAC;AAGvB,YAAY,EAAE,UAAU,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAEjE,YAAY,EAEV,eAAe,EACf,aAAa,EACb,sBAAsB,EACtB,WAAW,EACX,WAAW,EACX,eAAe,EAEf,eAAe,EACf,kBAAkB,EAClB,eAAe,EACf,gBAAgB,GACjB,MAAM,eAAe,CAAC;AAMvB,OAAO,EACL,kBAAkB,EAClB,gBAAgB,EAChB,gBAAgB,EAChB,YAAY,GACb,MAAM,iBAAiB,CAAC;AAEzB,YAAY,EACV,cAAc,EACd,WAAW,EACX,cAAc,EACd,QAAQ,EACR,eAAe,EACf,mBAAmB,EACnB,cAAc,EACd,cAAc,EACd,gBAAgB,EAChB,WAAW,EACX,IAAI,EACJ,UAAU,EACV,oBAAoB,EACpB,WAAW,EACX,mBAAmB,EACnB,kBAAkB,GACnB,MAAM,iBAAiB,CAAC;AAMzB,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAEpD,YAAY,EAAE,QAAQ,EAAE,WAAW,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC"}
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/index.ts"],"sourcesContent":["/**\n * FormSpec - Type-safe form specifications\n *\n * This package re-exports everything from the FormSpec library for convenience.\n * You can import everything you need from a single package:\n *\n * @example\n * ```typescript\n * import {\n * // DSL functions\n * formspec, field, group, when, is,\n * // Type inference\n * type InferSchema,\n * // Schema generation\n * buildFormSchemas,\n * // Resolvers\n * defineResolvers,\n * // Core types\n * type FormSpec, type FormElement,\n * } from \"formspec\";\n *\n * // Define a form\n * const InvoiceForm = formspec(\n * group(\"Customer\",\n * field.text(\"name\", { label: \"Name\", required: true }),\n * field.dynamicEnum(\"country\", \"fetch_countries\", { label: \"Country\" }),\n * ),\n * group(\"Details\",\n * field.number(\"amount\", { label: \"Amount\", min: 0 }),\n * field.enum(\"status\", [\"draft\", \"sent\", \"paid\"]),\n * when(is(\"status\", \"draft\"),\n * field.text(\"notes\", { label: \"Internal Notes\" }),\n * ),\n * ),\n * );\n *\n * // Infer the schema type\n * type Schema = InferSchema<typeof InvoiceForm.elements>;\n *\n * // Generate JSON Schema and UI Schema\n * const { jsonSchema, uiSchema } = buildFormSchemas(InvoiceForm);\n *\n * // Define resolvers for dynamic data\n * const resolvers = defineResolvers(InvoiceForm, {\n * fetch_countries: async () => ({\n * options: [{ value: \"us\", label: \"United States\" }],\n * validity: \"valid\",\n * }),\n * });\n * ```\n *\n * @packageDocumentation\n */\n\n// =============================================================================\n// Core types\n// =============================================================================\n\nexport type {\n // Validity\n Validity,\n\n // Field state\n FieldState,\n\n // Form state\n FormState,\n\n // Data sources\n DataSourceRegistry,\n DataSourceOption,\n FetchOptionsResponse,\n DataSourceValueType,\n\n // Elements\n TextField,\n NumberField,\n BooleanField,\n StaticEnumField,\n DynamicEnumField,\n DynamicSchemaField,\n ArrayField,\n ObjectField,\n AnyField,\n Group,\n Conditional,\n FormElement,\n FormSpec,\n\n // Predicates\n EqualsPredicate,\n Predicate,\n} from \"@formspec/core\";\n\nexport { createInitialFieldState } from \"@formspec/core\";\n\n// =============================================================================\n// DSL functions\n// =============================================================================\n\nexport {\n field,\n group,\n when,\n is,\n formspec,\n formspecWithValidation,\n validateForm,\n logValidationIssues,\n} from \"@formspec/dsl\";\n\n// Re-export enum option types (commonly used)\nexport type { EnumOption, EnumOptionValue } from \"@formspec/dsl\";\n\nexport type {\n // Type inference\n InferFieldValue,\n ExtractFields,\n ExtractFieldsFromArray,\n BuildSchema,\n InferSchema,\n InferFormSchema,\n // Validation\n FormSpecOptions,\n ValidationSeverity,\n ValidationIssue,\n ValidationResult,\n} from \"@formspec/dsl\";\n\n// =============================================================================\n// Build tools\n// =============================================================================\n\nexport {\n generateJsonSchema,\n generateUiSchema,\n buildFormSchemas,\n writeSchemas,\n} from \"@formspec/build\";\n\nexport type {\n JSONSchema7,\n JSONSchemaType,\n UISchema,\n UISchemaElement,\n UISchemaElementType,\n ControlElement,\n VerticalLayout,\n HorizontalLayout,\n GroupLayout,\n Rule,\n RuleEffect,\n SchemaBasedCondition,\n BuildResult,\n WriteSchemasOptions,\n WriteSchemasResult,\n} from \"@formspec/build\";\n\n// =============================================================================\n// Runtime helpers\n// =============================================================================\n\nexport { defineResolvers } from \"@formspec/runtime\";\n\nexport type { Resolver, ResolverMap, ResolverRegistry } from \"@formspec/runtime\";\n"],"mappings":";AA8FA,SAAS,+BAA+B;AAMxC;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAwBP;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;
|
|
1
|
+
{"version":3,"sources":["../src/index.ts"],"sourcesContent":["/**\n * FormSpec - Type-safe form specifications\n *\n * This package re-exports everything from the FormSpec library for convenience.\n * You can import everything you need from a single package:\n *\n * @example\n * ```typescript\n * import {\n * // DSL functions\n * formspec, field, group, when, is,\n * // Type inference\n * type InferSchema,\n * // Schema generation\n * buildFormSchemas,\n * // Resolvers\n * defineResolvers,\n * // Core types\n * type FormSpec, type FormElement,\n * } from \"formspec\";\n *\n * // Define a form\n * const InvoiceForm = formspec(\n * group(\"Customer\",\n * field.text(\"name\", { label: \"Name\", required: true }),\n * field.dynamicEnum(\"country\", \"fetch_countries\", { label: \"Country\" }),\n * ),\n * group(\"Details\",\n * field.number(\"amount\", { label: \"Amount\", min: 0 }),\n * field.enum(\"status\", [\"draft\", \"sent\", \"paid\"]),\n * when(is(\"status\", \"draft\"),\n * field.text(\"notes\", { label: \"Internal Notes\" }),\n * ),\n * ),\n * );\n *\n * // Infer the schema type\n * type Schema = InferSchema<typeof InvoiceForm.elements>;\n *\n * // Generate JSON Schema and UI Schema\n * const { jsonSchema, uiSchema } = buildFormSchemas(InvoiceForm);\n *\n * // Define resolvers for dynamic data\n * const resolvers = defineResolvers(InvoiceForm, {\n * fetch_countries: async () => ({\n * options: [{ value: \"us\", label: \"United States\" }],\n * validity: \"valid\",\n * }),\n * });\n * ```\n *\n * @packageDocumentation\n */\n\n// =============================================================================\n// Core types\n// =============================================================================\n\nexport type {\n // Validity\n Validity,\n\n // Field state\n FieldState,\n\n // Form state\n FormState,\n\n // Data sources\n DataSourceRegistry,\n DataSourceOption,\n FetchOptionsResponse,\n DataSourceValueType,\n\n // Elements\n TextField,\n NumberField,\n BooleanField,\n StaticEnumField,\n DynamicEnumField,\n DynamicSchemaField,\n ArrayField,\n ObjectField,\n AnyField,\n Group,\n Conditional,\n FormElement,\n FormSpec,\n\n // Predicates\n EqualsPredicate,\n Predicate,\n} from \"@formspec/core\";\n\nexport { createInitialFieldState } from \"@formspec/core\";\n\n// =============================================================================\n// DSL functions\n// =============================================================================\n\nexport {\n field,\n group,\n when,\n is,\n formspec,\n formspecWithValidation,\n validateForm,\n logValidationIssues,\n} from \"@formspec/dsl\";\n\n// Re-export enum option types (commonly used)\nexport type { EnumOption, EnumOptionValue } from \"@formspec/dsl\";\n\nexport type {\n // Type inference\n InferFieldValue,\n ExtractFields,\n ExtractFieldsFromArray,\n BuildSchema,\n InferSchema,\n InferFormSchema,\n // Validation\n FormSpecOptions,\n ValidationSeverity,\n ValidationIssue,\n ValidationResult,\n} from \"@formspec/dsl\";\n\n// =============================================================================\n// Build tools\n// =============================================================================\n\nexport {\n generateJsonSchema,\n generateUiSchema,\n buildFormSchemas,\n writeSchemas,\n} from \"@formspec/build\";\n\nexport type {\n JsonSchema2020,\n JSONSchema7,\n JSONSchemaType,\n UISchema,\n UISchemaElement,\n UISchemaElementType,\n ControlElement,\n VerticalLayout,\n HorizontalLayout,\n GroupLayout,\n Rule,\n RuleEffect,\n SchemaBasedCondition,\n BuildResult,\n WriteSchemasOptions,\n WriteSchemasResult,\n} from \"@formspec/build\";\n\n// =============================================================================\n// Runtime helpers\n// =============================================================================\n\nexport { defineResolvers } from \"@formspec/runtime\";\n\nexport type { Resolver, ResolverMap, ResolverRegistry } from \"@formspec/runtime\";\n"],"mappings":";AA8FA,SAAS,+BAA+B;AAMxC;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAwBP;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAyBP,SAAS,uBAAuB;","names":[]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "formspec",
|
|
3
|
-
"version": "0.1.0-alpha.
|
|
3
|
+
"version": "0.1.0-alpha.12",
|
|
4
4
|
"description": "Type-safe form specifications that compile to JSON Schema and JSON Forms UI Schema",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.cjs",
|
|
@@ -18,10 +18,10 @@
|
|
|
18
18
|
"README.md"
|
|
19
19
|
],
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"@formspec/core": "0.1.0-alpha.
|
|
22
|
-
"@formspec/dsl": "0.1.0-alpha.
|
|
23
|
-
"@formspec/build": "0.1.0-alpha.
|
|
24
|
-
"@formspec/runtime": "0.1.0-alpha.
|
|
21
|
+
"@formspec/core": "0.1.0-alpha.12",
|
|
22
|
+
"@formspec/dsl": "0.1.0-alpha.12",
|
|
23
|
+
"@formspec/build": "0.1.0-alpha.12",
|
|
24
|
+
"@formspec/runtime": "0.1.0-alpha.12"
|
|
25
25
|
},
|
|
26
26
|
"publishConfig": {
|
|
27
27
|
"access": "public"
|