reactivated 0.42.1 → 0.43.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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "reactivated",
3
- "version": "0.42.1",
3
+ "version": "0.43.0",
4
4
  "description": "",
5
5
  "type": "module",
6
6
  "exports": {
@@ -32,8 +32,8 @@
32
32
  "@types/express": "^4.17.21",
33
33
  "@types/react": "^18.0.12",
34
34
  "@types/react-dom": "^18.0.5",
35
- "@typescript-eslint/eslint-plugin": "^5.59.6",
36
- "@typescript-eslint/parser": "^5.59.6",
35
+ "@typescript-eslint/eslint-plugin": "^7.16.0",
36
+ "@typescript-eslint/parser": "^7.16.0",
37
37
  "@vanilla-extract/css": "^1.11.0",
38
38
  "@vanilla-extract/css-utils": "^0.1.3",
39
39
  "@vanilla-extract/dynamic": "^2.0.3",
@@ -42,22 +42,22 @@
42
42
  "@vanilla-extract/sprinkles": "^1.6.0",
43
43
  "@vanilla-extract/vite-plugin": "^3.9.5",
44
44
  "@vitejs/plugin-react": "^4.2.1",
45
- "eslint": "^8.40.0",
46
- "eslint-config-prettier": "^8.8.0",
47
- "eslint-import-resolver-typescript": "^3.5.5",
48
- "eslint-plugin-import": "^2.27.5",
49
- "eslint-plugin-react": "^7.32.2",
50
- "eslint-plugin-react-hooks": "^4.6.0",
51
- "eslint-plugin-unused-imports": "^2.0.0",
45
+ "eslint": "^8.57.0",
46
+ "eslint-config-prettier": "^9.1.0",
47
+ "eslint-import-resolver-typescript": "^3.6.1",
48
+ "eslint-plugin-import": "^2.29.1",
49
+ "eslint-plugin-react": "^7.34.3",
50
+ "eslint-plugin-react-hooks": "^4.6.2",
51
+ "eslint-plugin-unused-imports": "^3.2.0",
52
52
  "express": "^4.18.2",
53
53
  "immer": "^10.0.3",
54
- "json-schema-to-typescript": "^13.0.1",
55
- "prettier": "^2.8.8",
54
+ "json-schema-to-typescript": "^14.1.0",
55
+ "prettier": "^3.2.5",
56
56
  "react": "^18.1.0",
57
57
  "react-dom": "^18.1.0",
58
58
  "react-helmet-async": "^2.0.4",
59
59
  "terser": "^5.10.0",
60
- "ts-morph": "^18.0.0",
60
+ "ts-morph": "^23.0.0",
61
61
  "typescript": "^5.5.2",
62
62
  "vite": "^5.0.12",
63
63
  "vite-plugin-cjs-interop": "^2.0.5"
@@ -63,8 +63,8 @@ export type FormValues<T extends FieldMap> = {
63
63
  [K in keyof T]: T[K] extends {enum: unknown}
64
64
  ? T[K]["enum"] | null
65
65
  : T[K]["widget"] extends {_reactivated_value_do_not_use?: unknown}
66
- ? NonNullable<T[K]["widget"]["_reactivated_value_do_not_use"]>
67
- : T[K]["widget"]["value"];
66
+ ? NonNullable<T[K]["widget"]["_reactivated_value_do_not_use"]>
67
+ : T[K]["widget"]["value"];
68
68
  };
69
69
 
70
70
  export interface FormHandler<T extends FieldMap> {
@@ -374,8 +374,8 @@ export type CreateFieldHandler<T> = T extends {
374
374
  }
375
375
  ? SubwidgetHandler<T, U>
376
376
  : T extends WidgetLike
377
- ? WidgetHandler<T>
378
- : never;
377
+ ? WidgetHandler<T>
378
+ : never;
379
379
 
380
380
  export interface SubwidgetHandler<T extends {tag: string; name: string}, U> {
381
381
  tag: T["tag"];
@@ -848,22 +848,22 @@ export type UnknownFormValues<T extends FieldMap> = {
848
848
  export type FormOrFormSetValues<T> = T extends {tag: "FormGroup"}
849
849
  ? Omit<{[K in keyof T]: FormOrFormSetValues<T[K]>}, "tag">
850
850
  : T extends FormLike<any>
851
- ? UnknownFormValues<T["fields"]>
852
- : T extends FormSetLike<any>
853
- ? Array<UnknownFormValues<T["empty_form"]["fields"]>>
854
- : T extends null
855
- ? null
856
- : never;
851
+ ? UnknownFormValues<T["fields"]>
852
+ : T extends FormSetLike<any>
853
+ ? Array<UnknownFormValues<T["empty_form"]["fields"]>>
854
+ : T extends null
855
+ ? null
856
+ : never;
857
857
 
858
858
  export type FormOrFormSetErrors<T> = T extends {tag: "FormGroup"}
859
859
  ? Omit<{[K in keyof T]?: FormOrFormSetErrors<T[K]>}, "tag">
860
860
  : T extends FormLike<any>
861
- ? NonNullable<T["errors"]>
862
- : T extends FormSetLike<any>
863
- ? Array<NonNullable<T["empty_form"]["errors"]>>
864
- : T extends null
865
- ? null
866
- : never;
861
+ ? NonNullable<T["errors"]>
862
+ : T extends FormSetLike<any>
863
+ ? Array<NonNullable<T["empty_form"]["errors"]>>
864
+ : T extends null
865
+ ? null
866
+ : never;
867
867
 
868
868
  // Used by Joy, but unsure what this is for.
869
869
  export const getValue = (optgroup: Optgroup) => {
package/src/types.tsx CHANGED
@@ -1,6 +1,2 @@
1
- export type DiscriminateUnion<T, K extends keyof T, V extends T[K]> = T extends Record<
2
- K,
3
- V
4
- >
5
- ? T
6
- : never;
1
+ export type DiscriminateUnion<T, K extends keyof T, V extends T[K]> =
2
+ T extends Record<K, V> ? T : never;