@formspec/constraints 0.1.0-alpha.10

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.
Files changed (52) hide show
  1. package/README.md +263 -0
  2. package/dist/__tests__/loader.test.d.ts +2 -0
  3. package/dist/__tests__/loader.test.d.ts.map +1 -0
  4. package/dist/__tests__/loader.test.js +133 -0
  5. package/dist/__tests__/loader.test.js.map +1 -0
  6. package/dist/__tests__/validators.test.d.ts +2 -0
  7. package/dist/__tests__/validators.test.d.ts.map +1 -0
  8. package/dist/__tests__/validators.test.js +404 -0
  9. package/dist/__tests__/validators.test.js.map +1 -0
  10. package/dist/browser.d.ts +51 -0
  11. package/dist/browser.d.ts.map +1 -0
  12. package/dist/browser.js +65 -0
  13. package/dist/browser.js.map +1 -0
  14. package/dist/constraints.d.ts +544 -0
  15. package/dist/defaults.d.ts +15 -0
  16. package/dist/defaults.d.ts.map +1 -0
  17. package/dist/defaults.js +106 -0
  18. package/dist/defaults.js.map +1 -0
  19. package/dist/index.d.ts +44 -0
  20. package/dist/index.d.ts.map +1 -0
  21. package/dist/index.js +46 -0
  22. package/dist/index.js.map +1 -0
  23. package/dist/loader.d.ts +81 -0
  24. package/dist/loader.d.ts.map +1 -0
  25. package/dist/loader.js +140 -0
  26. package/dist/loader.js.map +1 -0
  27. package/dist/types.d.ts +200 -0
  28. package/dist/types.d.ts.map +1 -0
  29. package/dist/types.js +2 -0
  30. package/dist/types.js.map +1 -0
  31. package/dist/validators/field-options.d.ts +49 -0
  32. package/dist/validators/field-options.d.ts.map +1 -0
  33. package/dist/validators/field-options.js +79 -0
  34. package/dist/validators/field-options.js.map +1 -0
  35. package/dist/validators/field-types.d.ts +38 -0
  36. package/dist/validators/field-types.d.ts.map +1 -0
  37. package/dist/validators/field-types.js +93 -0
  38. package/dist/validators/field-types.js.map +1 -0
  39. package/dist/validators/formspec.d.ts +54 -0
  40. package/dist/validators/formspec.d.ts.map +1 -0
  41. package/dist/validators/formspec.js +152 -0
  42. package/dist/validators/formspec.js.map +1 -0
  43. package/dist/validators/index.d.ts +5 -0
  44. package/dist/validators/index.d.ts.map +1 -0
  45. package/dist/validators/index.js +5 -0
  46. package/dist/validators/index.js.map +1 -0
  47. package/dist/validators/layout.d.ts +39 -0
  48. package/dist/validators/layout.d.ts.map +1 -0
  49. package/dist/validators/layout.js +107 -0
  50. package/dist/validators/layout.js.map +1 -0
  51. package/formspec.schema.json +245 -0
  52. package/package.json +57 -0
package/README.md ADDED
@@ -0,0 +1,263 @@
1
+ # @formspec/constraints
2
+
3
+ Define and enforce constraints on which FormSpec DSL features are allowed in your project.
4
+
5
+ ## Overview
6
+
7
+ The constraints package lets you restrict which parts of the FormSpec DSL can be used. This is useful for:
8
+
9
+ - **Standardization**: Enforce consistent form patterns across a team
10
+ - **Compatibility**: Restrict to features your renderer supports
11
+ - **Simplicity**: Keep forms simple by disallowing complex nesting or conditionals
12
+ - **Linting**: Catch constraint violations at development time via ESLint
13
+
14
+ ## Installation
15
+
16
+ ```bash
17
+ npm install @formspec/constraints
18
+ # or
19
+ pnpm add @formspec/constraints
20
+ ```
21
+
22
+ ## Configuration
23
+
24
+ Create a `.formspec.yml` file in your project root:
25
+
26
+ ```yaml
27
+ constraints:
28
+ fieldTypes:
29
+ text: off # Allow text fields
30
+ number: off # Allow number fields
31
+ boolean: off # Allow boolean fields
32
+ staticEnum: off # Allow static enums
33
+ dynamicEnum: warn # Warn on dynamic enums
34
+ dynamicSchema: error # Disallow dynamic schemas
35
+ array: off # Allow arrays
36
+ object: off # Allow objects
37
+
38
+ layout:
39
+ group: off # Allow groups
40
+ conditionals: off # Allow when() conditionals
41
+ maxNestingDepth: 3 # Max nesting depth (0 = flat only)
42
+
43
+ fieldOptions:
44
+ label: off
45
+ placeholder: off
46
+ required: off
47
+ minValue: off
48
+ maxValue: off
49
+ minItems: off
50
+ maxItems: off
51
+ ```
52
+
53
+ ### Severity Levels
54
+
55
+ Each constraint can be set to:
56
+
57
+ | Severity | Behavior |
58
+ | --------- | ---------------------------- |
59
+ | `"off"` | Feature is allowed (default) |
60
+ | `"warn"` | Emit warning but allow |
61
+ | `"error"` | Disallow - fail validation |
62
+
63
+ ## Constraint Categories
64
+
65
+ ### Field Types (`fieldTypes`)
66
+
67
+ Control which DSL field builders are allowed:
68
+
69
+ | Constraint | DSL Function |
70
+ | --------------- | -------------------------------------------- |
71
+ | `text` | `field.text()` |
72
+ | `number` | `field.number()` |
73
+ | `boolean` | `field.boolean()` |
74
+ | `staticEnum` | `field.enum()` |
75
+ | `dynamicEnum` | `field.dynamicEnum()` |
76
+ | `dynamicSchema` | `field.dynamicSchema()` |
77
+ | `array` | `field.array()`, `field.arrayWithConfig()` |
78
+ | `object` | `field.object()`, `field.objectWithConfig()` |
79
+
80
+ ### Layout (`layout`)
81
+
82
+ Control structure and nesting:
83
+
84
+ | Constraint | Description |
85
+ | ----------------- | --------------------------------------- |
86
+ | `group` | `group()` visual grouping |
87
+ | `conditionals` | `when()` conditional visibility |
88
+ | `maxNestingDepth` | Maximum depth for nested objects/arrays |
89
+
90
+ ### Field Options (`fieldOptions`)
91
+
92
+ Control which field configuration options are allowed:
93
+
94
+ | Constraint | Description |
95
+ | ---------------------- | ------------------------- |
96
+ | `label` | Field label text |
97
+ | `placeholder` | Input placeholder |
98
+ | `required` | Required field validation |
99
+ | `minValue`, `maxValue` | Number field constraints |
100
+ | `minItems`, `maxItems` | Array length constraints |
101
+
102
+ ### UI Schema (`uiSchema`)
103
+
104
+ Control JSON Forms-specific features:
105
+
106
+ ```yaml
107
+ constraints:
108
+ uiSchema:
109
+ layouts:
110
+ VerticalLayout: off
111
+ HorizontalLayout: off
112
+ Group: off
113
+ Categorization: error # Disallow tabbed interfaces
114
+ Category: error
115
+ rules:
116
+ enabled: off
117
+ effects:
118
+ SHOW: off
119
+ HIDE: off
120
+ ENABLE: warn
121
+ DISABLE: warn
122
+ ```
123
+
124
+ ## Programmatic Usage
125
+
126
+ ### Loading Configuration
127
+
128
+ ```typescript
129
+ import { loadConfig, mergeWithDefaults } from "@formspec/constraints";
130
+
131
+ // Load from .formspec.yml (searches up directory tree)
132
+ const config = await loadConfig();
133
+
134
+ // Or load from specific path
135
+ const config = await loadConfig("/path/to/.formspec.yml");
136
+
137
+ // Merge with defaults to get fully resolved config
138
+ const resolved = mergeWithDefaults(config.constraints);
139
+ ```
140
+
141
+ ### Validating Forms
142
+
143
+ ```typescript
144
+ import { validateFormSpec } from "@formspec/constraints";
145
+ import { formspec, field, when, is } from "@formspec/dsl";
146
+
147
+ const form = formspec(
148
+ field.text("name"),
149
+ field.dynamicEnum("country", "fetch_countries"),
150
+ when(is("country", "US"), field.text("state"))
151
+ );
152
+
153
+ const result = validateFormSpec(form, resolved);
154
+
155
+ if (!result.valid) {
156
+ for (const issue of result.issues) {
157
+ console.log(`${issue.severity}: ${issue.message}`);
158
+ }
159
+ }
160
+ ```
161
+
162
+ ### Validation Result
163
+
164
+ ```typescript
165
+ interface ValidationResult {
166
+ valid: boolean; // true if no errors (warnings OK)
167
+ issues: ValidationIssue[];
168
+ }
169
+
170
+ interface ValidationIssue {
171
+ code: string; // e.g., "FIELD_TYPE_NOT_ALLOWED"
172
+ message: string; // Human-readable description
173
+ severity: "error" | "warning";
174
+ category: "fieldTypes" | "layout" | "uiSchema" | "fieldOptions" | "controlOptions";
175
+ path?: string; // JSON pointer to issue location
176
+ fieldName?: string; // Affected field name
177
+ fieldType?: string; // Affected field type
178
+ }
179
+ ```
180
+
181
+ ## ESLint Integration
182
+
183
+ Use `@formspec/eslint-plugin` to catch constraint violations at development time:
184
+
185
+ ```javascript
186
+ // eslint.config.js
187
+ import formspec from "@formspec/eslint-plugin";
188
+
189
+ export default [
190
+ {
191
+ plugins: { formspec },
192
+ rules: {
193
+ // Enforce allowed field types from .formspec.yml
194
+ "formspec/constraints-allowed-field-types": "error",
195
+ // Enforce allowed layouts from .formspec.yml
196
+ "formspec/constraints-allowed-layouts": "error",
197
+ },
198
+ },
199
+ ];
200
+ ```
201
+
202
+ The ESLint rules automatically load constraints from your `.formspec.yml` file.
203
+
204
+ ## Example Configurations
205
+
206
+ ### Simple Forms Only
207
+
208
+ Restrict to flat forms with basic field types:
209
+
210
+ ```yaml
211
+ constraints:
212
+ fieldTypes:
213
+ array: error
214
+ object: error
215
+ dynamicEnum: error
216
+ dynamicSchema: error
217
+ layout:
218
+ conditionals: error
219
+ maxNestingDepth: 0
220
+ ```
221
+
222
+ ### JSON Forms Compatible
223
+
224
+ Restrict to features supported by standard JSON Forms renderers:
225
+
226
+ ```yaml
227
+ constraints:
228
+ fieldTypes:
229
+ dynamicSchema: error # Not supported by JSON Forms
230
+ uiSchema:
231
+ layouts:
232
+ Categorization: warn # May not be supported by all renderers
233
+ ```
234
+
235
+ ### Warn on Advanced Features
236
+
237
+ Allow all features but warn on complex ones:
238
+
239
+ ```yaml
240
+ constraints:
241
+ fieldTypes:
242
+ dynamicEnum: warn
243
+ dynamicSchema: warn
244
+ array: warn
245
+ object: warn
246
+ layout:
247
+ conditionals: warn
248
+ maxNestingDepth: 2
249
+ ```
250
+
251
+ ## JSON Schema
252
+
253
+ A JSON Schema for `.formspec.yml` is available for editor autocompletion:
254
+
255
+ ```yaml
256
+ # .formspec.yml
257
+ # yaml-language-server: $schema=node_modules/@formspec/constraints/formspec.schema.json
258
+
259
+ constraints:
260
+ fieldTypes:
261
+ text: off
262
+ # ... autocomplete available
263
+ ```
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=loader.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"loader.test.d.ts","sourceRoot":"","sources":["../../src/__tests__/loader.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,133 @@
1
+ import { describe, it, expect } from "vitest";
2
+ import { loadConfigFromString, defineConstraints } from "../index.js";
3
+ describe("loadConfigFromString", () => {
4
+ it("parses YAML with constraints section", () => {
5
+ const yaml = `
6
+ constraints:
7
+ fieldTypes:
8
+ dynamicEnum: error
9
+ dynamicSchema: error
10
+ layout:
11
+ group: error
12
+ conditionals: warn
13
+ `;
14
+ const config = loadConfigFromString(yaml);
15
+ expect(config.fieldTypes.dynamicEnum).toBe("error");
16
+ expect(config.fieldTypes.dynamicSchema).toBe("error");
17
+ expect(config.layout.group).toBe("error");
18
+ expect(config.layout.conditionals).toBe("warn");
19
+ });
20
+ it("applies defaults for missing values", () => {
21
+ const yaml = `
22
+ constraints:
23
+ fieldTypes:
24
+ dynamicEnum: error
25
+ `;
26
+ const config = loadConfigFromString(yaml);
27
+ expect(config.fieldTypes.dynamicEnum).toBe("error");
28
+ expect(config.fieldTypes.text).toBe("off");
29
+ expect(config.fieldTypes.number).toBe("off");
30
+ expect(config.layout.group).toBe("off");
31
+ });
32
+ it("handles empty YAML", () => {
33
+ const config = loadConfigFromString("");
34
+ // Should return all defaults
35
+ expect(config.fieldTypes.text).toBe("off");
36
+ expect(config.layout.group).toBe("off");
37
+ });
38
+ it("handles YAML with only comments", () => {
39
+ const yaml = `
40
+ # This is a comment
41
+ # Another comment
42
+ `;
43
+ const config = loadConfigFromString(yaml);
44
+ expect(config.fieldTypes.text).toBe("off");
45
+ });
46
+ it("parses nested uiSchema constraints", () => {
47
+ const yaml = `
48
+ constraints:
49
+ uiSchema:
50
+ layouts:
51
+ VerticalLayout: off
52
+ HorizontalLayout: error
53
+ Group: error
54
+ rules:
55
+ enabled: error
56
+ `;
57
+ const config = loadConfigFromString(yaml);
58
+ expect(config.uiSchema.layouts.VerticalLayout).toBe("off");
59
+ expect(config.uiSchema.layouts.HorizontalLayout).toBe("error");
60
+ expect(config.uiSchema.layouts.Group).toBe("error");
61
+ expect(config.uiSchema.rules.enabled).toBe("error");
62
+ });
63
+ it("parses fieldOptions constraints", () => {
64
+ const yaml = `
65
+ constraints:
66
+ fieldOptions:
67
+ minItems: error
68
+ maxItems: error
69
+ placeholder: warn
70
+ `;
71
+ const config = loadConfigFromString(yaml);
72
+ expect(config.fieldOptions.minItems).toBe("error");
73
+ expect(config.fieldOptions.maxItems).toBe("error");
74
+ expect(config.fieldOptions.placeholder).toBe("warn");
75
+ expect(config.fieldOptions.label).toBe("off");
76
+ });
77
+ it("parses maxNestingDepth as number", () => {
78
+ const yaml = `
79
+ constraints:
80
+ layout:
81
+ maxNestingDepth: 2
82
+ `;
83
+ const config = loadConfigFromString(yaml);
84
+ expect(config.layout.maxNestingDepth).toBe(2);
85
+ });
86
+ it("throws on invalid YAML structure", () => {
87
+ const yaml = `
88
+ - this
89
+ - is
90
+ - an array
91
+ `;
92
+ expect(() => loadConfigFromString(yaml)).toThrow();
93
+ });
94
+ });
95
+ describe("defineConstraints", () => {
96
+ it("creates config from object literal", () => {
97
+ const config = defineConstraints({
98
+ fieldTypes: {
99
+ dynamicEnum: "error",
100
+ array: "warn",
101
+ },
102
+ layout: {
103
+ group: "error",
104
+ maxNestingDepth: 1,
105
+ },
106
+ });
107
+ expect(config.fieldTypes.dynamicEnum).toBe("error");
108
+ expect(config.fieldTypes.array).toBe("warn");
109
+ expect(config.fieldTypes.text).toBe("off"); // default
110
+ expect(config.layout.group).toBe("error");
111
+ expect(config.layout.maxNestingDepth).toBe(1);
112
+ });
113
+ it("handles empty config", () => {
114
+ const config = defineConstraints({});
115
+ // All defaults
116
+ expect(config.fieldTypes.text).toBe("off");
117
+ expect(config.layout.group).toBe("off");
118
+ expect(config.uiSchema.layouts.VerticalLayout).toBe("off");
119
+ });
120
+ it("handles partial nested config", () => {
121
+ const config = defineConstraints({
122
+ uiSchema: {
123
+ rules: {
124
+ enabled: "error",
125
+ },
126
+ },
127
+ });
128
+ expect(config.uiSchema.rules.enabled).toBe("error");
129
+ expect(config.uiSchema.rules.effects.SHOW).toBe("off"); // default
130
+ expect(config.uiSchema.layouts.VerticalLayout).toBe("off"); // default
131
+ });
132
+ });
133
+ //# sourceMappingURL=loader.test.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"loader.test.js","sourceRoot":"","sources":["../../src/__tests__/loader.test.ts"],"names":[],"mappings":"AAA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M,CAAC,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,UAAU;QAClE,MAAM,CAAC,MAAM,CAAC,QAAQ,CAAC,OAAO,CAAC,cAAc,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,UAAU;IACxE,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=validators.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"validators.test.d.ts","sourceRoot":"","sources":["../../src/__tests__/validators.test.ts"],"names":[],"mappings":""}