@formspec/core 0.1.0-alpha.2 → 0.1.0-alpha.21

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 (49) hide show
  1. package/README.md +85 -0
  2. package/dist/__tests__/constraint-definitions.test.d.ts +2 -0
  3. package/dist/__tests__/constraint-definitions.test.d.ts.map +1 -0
  4. package/dist/__tests__/guards.test.d.ts +2 -0
  5. package/dist/__tests__/guards.test.d.ts.map +1 -0
  6. package/dist/core.d.ts +1459 -0
  7. package/dist/extensions/index.d.ts +252 -0
  8. package/dist/extensions/index.d.ts.map +1 -0
  9. package/dist/guards.d.ts +73 -0
  10. package/dist/guards.d.ts.map +1 -0
  11. package/dist/index.cjs +159 -0
  12. package/dist/index.cjs.map +1 -0
  13. package/dist/index.d.ts +6 -2
  14. package/dist/index.d.ts.map +1 -1
  15. package/dist/index.js +111 -12
  16. package/dist/index.js.map +1 -1
  17. package/dist/types/constraint-definitions.d.ts +64 -0
  18. package/dist/types/constraint-definitions.d.ts.map +1 -0
  19. package/dist/types/data-source.d.ts +8 -0
  20. package/dist/types/data-source.d.ts.map +1 -1
  21. package/dist/types/elements.d.ts +40 -0
  22. package/dist/types/elements.d.ts.map +1 -1
  23. package/dist/types/field-state.d.ts +4 -0
  24. package/dist/types/field-state.d.ts.map +1 -1
  25. package/dist/types/form-state.d.ts +2 -0
  26. package/dist/types/form-state.d.ts.map +1 -1
  27. package/dist/types/index.d.ts +4 -0
  28. package/dist/types/index.d.ts.map +1 -1
  29. package/dist/types/ir.d.ts +578 -0
  30. package/dist/types/ir.d.ts.map +1 -0
  31. package/dist/types/predicate.d.ts +4 -0
  32. package/dist/types/predicate.d.ts.map +1 -1
  33. package/dist/types/validity.d.ts +2 -0
  34. package/dist/types/validity.d.ts.map +1 -1
  35. package/package.json +17 -5
  36. package/dist/types/data-source.js +0 -2
  37. package/dist/types/data-source.js.map +0 -1
  38. package/dist/types/elements.js +0 -8
  39. package/dist/types/elements.js.map +0 -1
  40. package/dist/types/field-state.js +0 -17
  41. package/dist/types/field-state.js.map +0 -1
  42. package/dist/types/form-state.js +0 -2
  43. package/dist/types/form-state.js.map +0 -1
  44. package/dist/types/index.js +0 -3
  45. package/dist/types/index.js.map +0 -1
  46. package/dist/types/predicate.js +0 -7
  47. package/dist/types/predicate.js.map +0 -1
  48. package/dist/types/validity.js +0 -2
  49. package/dist/types/validity.js.map +0 -1
@@ -1,8 +0,0 @@
1
- /**
2
- * Form element type definitions.
3
- *
4
- * These types define the structure of form specifications.
5
- * The structure IS the definition - nesting implies layout and conditional logic.
6
- */
7
- export {};
8
- //# sourceMappingURL=elements.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"elements.js","sourceRoot":"","sources":["../../src/types/elements.ts"],"names":[],"mappings":"AAAA;;;;;GAKG"}
@@ -1,17 +0,0 @@
1
- /**
2
- * Creates initial field state with default values.
3
- *
4
- * @typeParam T - The value type of the field
5
- * @param value - The initial value for the field
6
- * @returns Initial field state
7
- */
8
- export function createInitialFieldState(value) {
9
- return {
10
- value,
11
- dirty: false,
12
- touched: false,
13
- validity: "unknown",
14
- errors: [],
15
- };
16
- }
17
- //# sourceMappingURL=field-state.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"field-state.js","sourceRoot":"","sources":["../../src/types/field-state.ts"],"names":[],"mappings":"AAwBA;;;;;;GAMG;AACH,MAAM,UAAU,uBAAuB,CAAI,KAAQ;IACjD,OAAO;QACL,KAAK;QACL,KAAK,EAAE,KAAK;QACZ,OAAO,EAAE,KAAK;QACd,QAAQ,EAAE,SAAS;QACnB,MAAM,EAAE,EAAE;KACX,CAAC;AACJ,CAAC"}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=form-state.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"form-state.js","sourceRoot":"","sources":["../../src/types/form-state.ts"],"names":[],"mappings":""}
@@ -1,3 +0,0 @@
1
- // Re-export all types from the types directory
2
- export { createInitialFieldState } from "./field-state.js";
3
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA,+CAA+C;AAK/C,OAAO,EAAE,uBAAuB,EAAE,MAAM,kBAAkB,CAAC"}
@@ -1,7 +0,0 @@
1
- /**
2
- * Predicate types for conditional logic.
3
- *
4
- * Predicates are used with `when()` to define conditions in a readable way.
5
- */
6
- export {};
7
- //# sourceMappingURL=predicate.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"predicate.js","sourceRoot":"","sources":["../../src/types/predicate.ts"],"names":[],"mappings":"AAAA;;;;GAIG"}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=validity.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"validity.js","sourceRoot":"","sources":["../../src/types/validity.ts"],"names":[],"mappings":""}