@passui/tanstack 0.2.7 → 0.3.1

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 (139) hide show
  1. package/dist/{types/src/auth-shell → auth-shell}/auth-shell.d.ts +3 -3
  2. package/dist/auth-shell/auth-shell.js +17 -0
  3. package/dist/auth-shell.d.ts +2 -0
  4. package/dist/auth-shell.js +1 -0
  5. package/dist/core.d.ts +3 -0
  6. package/dist/core.js +3 -0
  7. package/dist/{types/src/document → document}/compose-viewport.d.ts +11 -11
  8. package/dist/document/compose-viewport.js +43 -0
  9. package/dist/document.d.ts +2 -0
  10. package/dist/document.js +1 -0
  11. package/dist/form-fields/fields.d.ts +35 -0
  12. package/dist/form-fields/fields.js +163 -0
  13. package/dist/form-fields/selection.d.ts +21 -0
  14. package/dist/form-fields/selection.js +73 -0
  15. package/dist/form-fields/submit.d.ts +3 -0
  16. package/dist/form-fields/submit.js +26 -0
  17. package/dist/form-fields.d.ts +7 -0
  18. package/dist/form-fields.js +7 -0
  19. package/dist/forms/contexts.js +4 -0
  20. package/dist/{types/src/forms → forms}/elements/form-alert.d.ts +4 -4
  21. package/dist/forms/elements/form-alert.js +19 -0
  22. package/dist/forms/fields/avatar-picker.d.ts +10 -0
  23. package/dist/forms/fields/avatar-picker.js +228 -0
  24. package/dist/forms/fields/avatar.d.ts +30 -0
  25. package/dist/forms/fields/avatar.js +188 -0
  26. package/dist/forms/fields/checkbox.d.ts +2 -0
  27. package/dist/forms/fields/index.d.ts +21 -0
  28. package/dist/forms/fields/index.js +15 -0
  29. package/dist/forms/fields/input.d.ts +2 -0
  30. package/dist/forms/fields/multiselect.d.ts +2 -0
  31. package/dist/forms/fields/otp.d.ts +2 -0
  32. package/dist/forms/fields/radio-card.d.ts +2 -0
  33. package/dist/forms/fields/switch.d.ts +2 -0
  34. package/dist/forms/fields/textarea.d.ts +2 -0
  35. package/dist/forms.d.ts +45 -0
  36. package/dist/forms.js +16 -0
  37. package/dist/mutation/use-app-mutation.d.ts +23 -0
  38. package/dist/mutation/use-app-mutation.js +41 -0
  39. package/dist/mutation.d.ts +3 -0
  40. package/dist/mutation.js +3 -0
  41. package/dist/route-boundary/default-boundary.d.ts +2 -0
  42. package/dist/route-boundary/default-boundary.js +40 -0
  43. package/dist/route-boundary/default-loader.d.ts +6 -0
  44. package/dist/route-boundary/default-loader.js +17 -0
  45. package/dist/{types/src/route-boundary → route-boundary}/not-founder.d.ts +2 -2
  46. package/dist/route-boundary/not-founder.js +44 -0
  47. package/dist/route-boundary.d.ts +4 -0
  48. package/dist/route-boundary.js +4 -0
  49. package/dist/settings/setting-list.d.ts +51 -0
  50. package/dist/settings/setting-list.js +122 -0
  51. package/dist/settings.d.ts +2 -0
  52. package/dist/settings.js +1 -0
  53. package/dist/{types/src/shared → shared}/optimistic.d.ts +2 -2
  54. package/dist/shared/optimistic.js +16 -0
  55. package/dist/{types/src/shared → shared}/table.d.ts +7 -7
  56. package/dist/shared/table.js +12 -0
  57. package/dist/tables/columns.d.ts +3 -0
  58. package/dist/tables/columns.js +21 -0
  59. package/dist/tables/data-table.d.ts +76 -0
  60. package/dist/tables/data-table.js +307 -0
  61. package/dist/tables/filter-row.js +137 -0
  62. package/dist/tables/pagination.d.ts +8 -0
  63. package/dist/tables/pagination.js +86 -0
  64. package/dist/tables.d.ts +4 -0
  65. package/dist/tables.js +4 -0
  66. package/package.json +129 -128
  67. package/src/styles.css +1 -0
  68. package/dist/types/src/auth-shell/index.d.ts +0 -1
  69. package/dist/types/src/document/index.d.ts +0 -1
  70. package/dist/types/src/form-fields/fields.d.ts +0 -24
  71. package/dist/types/src/form-fields/index.d.ts +0 -2
  72. package/dist/types/src/form-fields/selection.d.ts +0 -21
  73. package/dist/types/src/form-fields/submit.d.ts +0 -3
  74. package/dist/types/src/forms/contexts.d.ts +0 -1
  75. package/dist/types/src/forms/elements/submit.d.ts +0 -1
  76. package/dist/types/src/forms/fields/avatar-picker.d.ts +0 -30
  77. package/dist/types/src/forms/fields/avatar.d.ts +0 -30
  78. package/dist/types/src/forms/fields/checkbox.d.ts +0 -1
  79. package/dist/types/src/forms/fields/index.d.ts +0 -21
  80. package/dist/types/src/forms/fields/input.d.ts +0 -1
  81. package/dist/types/src/forms/fields/multiselect.d.ts +0 -1
  82. package/dist/types/src/forms/fields/otp.d.ts +0 -1
  83. package/dist/types/src/forms/fields/radio-card.d.ts +0 -1
  84. package/dist/types/src/forms/fields/switch.d.ts +0 -1
  85. package/dist/types/src/forms/fields/textarea.d.ts +0 -1
  86. package/dist/types/src/forms/index.d.ts +0 -41
  87. package/dist/types/src/mutation/index.d.ts +0 -1
  88. package/dist/types/src/mutation/use-app-mutation.d.ts +0 -22
  89. package/dist/types/src/route-boundary/default-boundary.d.ts +0 -2
  90. package/dist/types/src/route-boundary/default-loader.d.ts +0 -6
  91. package/dist/types/src/route-boundary/index.d.ts +0 -3
  92. package/dist/types/src/settings/index.d.ts +0 -1
  93. package/dist/types/src/settings/setting-list.d.ts +0 -51
  94. package/dist/types/src/shared/index.d.ts +0 -2
  95. package/dist/types/src/tables/columns.d.ts +0 -3
  96. package/dist/types/src/tables/data-table.d.ts +0 -76
  97. package/dist/types/src/tables/filter-row.d.ts +0 -9
  98. package/dist/types/src/tables/index.d.ts +0 -3
  99. package/dist/types/src/tables/pagination.d.ts +0 -8
  100. package/dist/types/src/tables/utils.d.ts +0 -1
  101. package/src/auth-shell/auth-shell.tsx +0 -16
  102. package/src/auth-shell/index.ts +0 -1
  103. package/src/document/compose-viewport.tsx +0 -80
  104. package/src/document/index.ts +0 -1
  105. package/src/form-fields/fields.tsx +0 -147
  106. package/src/form-fields/index.ts +0 -2
  107. package/src/form-fields/selection.tsx +0 -109
  108. package/src/form-fields/submit.tsx +0 -35
  109. package/src/forms/contexts.ts +0 -4
  110. package/src/forms/elements/form-alert.tsx +0 -21
  111. package/src/forms/elements/submit.tsx +0 -1
  112. package/src/forms/fields/avatar-picker.tsx +0 -319
  113. package/src/forms/fields/avatar.tsx +0 -269
  114. package/src/forms/fields/checkbox.tsx +0 -1
  115. package/src/forms/fields/index.ts +0 -29
  116. package/src/forms/fields/input.tsx +0 -1
  117. package/src/forms/fields/multiselect.tsx +0 -1
  118. package/src/forms/fields/otp.tsx +0 -1
  119. package/src/forms/fields/radio-card.tsx +0 -1
  120. package/src/forms/fields/switch.tsx +0 -1
  121. package/src/forms/fields/textarea.tsx +0 -1
  122. package/src/forms/index.ts +0 -26
  123. package/src/mutation/index.ts +0 -1
  124. package/src/mutation/use-app-mutation.ts +0 -100
  125. package/src/route-boundary/default-boundary.tsx +0 -46
  126. package/src/route-boundary/default-loader.tsx +0 -23
  127. package/src/route-boundary/index.ts +0 -3
  128. package/src/route-boundary/not-founder.tsx +0 -39
  129. package/src/settings/index.ts +0 -1
  130. package/src/settings/setting-list.tsx +0 -223
  131. package/src/shared/index.ts +0 -2
  132. package/src/shared/optimistic.ts +0 -19
  133. package/src/shared/table.ts +0 -12
  134. package/src/tables/columns.tsx +0 -30
  135. package/src/tables/data-table.tsx +0 -524
  136. package/src/tables/filter-row.tsx +0 -196
  137. package/src/tables/index.ts +0 -3
  138. package/src/tables/pagination.tsx +0 -85
  139. package/src/tables/utils.ts +0 -5
package/package.json CHANGED
@@ -1,130 +1,131 @@
1
1
  {
2
- "name": "@passui/tanstack",
3
- "version": "0.2.7",
4
- "license": "MIT",
5
- "type": "module",
6
- "repository": {
7
- "type": "git",
8
- "url": "git+https://github.com/phe-rus/passui.git",
9
- "directory": "packages/tanstack"
10
- },
11
- "homepage": "https://passui.pherus.org/docs/installation",
12
- "publishConfig": {
13
- "registry": "https://registry.npmjs.org",
14
- "access": "public"
15
- },
16
- "files": [
17
- "dist",
18
- "src",
19
- "README.md",
20
- "LICENSE"
21
- ],
22
- "scripts": {
23
- "typecheck": "tsc --noEmit",
24
- "test": "vitest run",
25
- "publish:check": "bun pm pack --dry-run",
26
- "build": "bun ../../scripts/build-types.mjs"
27
- },
28
- "dependencies": {
29
- "@hugeicons/core-free-icons": "^4.3.5"
30
- },
31
- "peerDependencies": {
32
- "react": "^19.3.0",
33
- "react-dom": "^19.3.0",
34
- "@tanstack/react-query": "^5.104.0",
35
- "tailwindcss": "^4.3.3",
36
- "@hugeicons/react": "^1.1.10",
37
- "@tanstack/react-devtools": "^0.10.13",
38
- "@tanstack/react-form": "^1.33.5",
39
- "@tanstack/react-query-devtools": "^5.104.0",
40
- "@tanstack/react-router": "^1.170.39",
41
- "@tanstack/react-router-devtools": "^1.167.2",
42
- "@tanstack/react-table": "^9.2.4",
43
- "motion": "^13.4.4",
44
- "@passui/react": "^0.1.24"
45
- },
46
- "devDependencies": {
47
- "@types/node": "^26.6.3",
48
- "@types/react": "^19.3.0",
49
- "@types/react-dom": "^19.3.0",
50
- "tailwindcss": "^4.3.3",
51
- "typescript": "^7.0.2",
52
- "vitest": "5.0.5",
53
- "vite": "8.3.5",
54
- "@hugeicons/react": "^1.1.10",
55
- "@tanstack/react-devtools": "^0.10.13",
56
- "@tanstack/react-form": "^1.33.5",
57
- "@tanstack/react-query-devtools": "^5.104.0",
58
- "@tanstack/react-router": "^1.170.39",
59
- "@tanstack/react-router-devtools": "^1.167.2",
60
- "@tanstack/react-table": "^9.2.4",
61
- "motion": "^13.4.4",
62
- "@passui/react": "^0.1.23",
63
- "react": "^19.3.0",
64
- "react-dom": "^19.3.0",
65
- "@tanstack/react-query": "^5.104.0"
66
- },
67
- "exports": {
68
- "./forms": "./src/forms/index.ts",
69
- "./form-fields": "./src/form-fields/index.ts",
70
- "./tables": "./src/tables/index.ts",
71
- "./document": "./src/document/index.ts",
72
- "./auth-shell": "./src/auth-shell/index.ts",
73
- "./settings": "./src/settings/index.ts",
74
- "./mutation": "./src/mutation/index.ts",
75
- "./route-boundary": "./src/route-boundary/index.ts",
76
- "./styles.css": "./src/styles.css",
77
- "./react/forms": "./src/forms/index.ts",
78
- "./react/form-fields": "./src/form-fields/index.ts",
79
- "./react/tables": "./src/tables/index.ts",
80
- "./react/document": "./src/document/index.ts",
81
- "./react/auth-shell": "./src/auth-shell/index.ts",
82
- "./react/settings": "./src/settings/index.ts",
83
- "./react/mutation": "./src/mutation/index.ts",
84
- "./react/route-boundary": "./src/route-boundary/index.ts",
85
- "./react/styles.css": "./src/styles.css",
86
- "./core": "./src/shared/index.ts"
87
- },
88
- "description": "TanStack form, table and router integrations for Passui.",
89
- "peerDependenciesMeta": {
90
- "react": {
91
- "optional": true
92
- },
93
- "react-dom": {
94
- "optional": true
95
- },
96
- "@tanstack/react-query": {
97
- "optional": true
98
- },
99
- "@hugeicons/react": {
100
- "optional": true
101
- },
102
- "@tanstack/react-devtools": {
103
- "optional": true
104
- },
105
- "@tanstack/react-form": {
106
- "optional": true
107
- },
108
- "@tanstack/react-query-devtools": {
109
- "optional": true
110
- },
111
- "@tanstack/react-router": {
112
- "optional": true
113
- },
114
- "@tanstack/react-router-devtools": {
115
- "optional": true
116
- },
117
- "@tanstack/react-table": {
118
- "optional": true
119
- },
120
- "motion": {
121
- "optional": true
122
- },
123
- "@passui/react": {
124
- "optional": true
125
- }
126
- },
127
- "sideEffects": [
128
- "**/*.css"
129
- ]
2
+ "name": "@passui/tanstack",
3
+ "version": "0.3.1",
4
+ "license": "MIT",
5
+ "type": "module",
6
+ "repository": {
7
+ "type": "git",
8
+ "url": "git+https://github.com/phe-rus/passui.git",
9
+ "directory": "packages/tanstack"
10
+ },
11
+ "homepage": "https://passui.pherus.org/docs/installation",
12
+ "publishConfig": {
13
+ "registry": "https://registry.npmjs.org",
14
+ "access": "public"
15
+ },
16
+ "files": [
17
+ "dist",
18
+ "src/styles.css",
19
+ "README.md",
20
+ "LICENSE"
21
+ ],
22
+ "scripts": {
23
+ "typecheck": "tsc --noEmit",
24
+ "test": "vitest run",
25
+ "publish:check": "bun pm pack --dry-run",
26
+ "build": "tsdown"
27
+ },
28
+ "dependencies": {},
29
+ "peerDependencies": {
30
+ "react": "^19.3.0",
31
+ "react-dom": "^19.3.0",
32
+ "@tanstack/react-query": "^5.104.0",
33
+ "tailwindcss": "^4.3.3",
34
+ "@tanstack/react-devtools": "^0.10.13",
35
+ "@tanstack/react-form": "^1.33.5",
36
+ "@tanstack/react-query-devtools": "^5.104.0",
37
+ "@tanstack/react-router": "^1.170.39",
38
+ "@tanstack/react-router-devtools": "^1.167.2",
39
+ "@tanstack/react-table": "^9.2.4",
40
+ "motion": "^13.4.4",
41
+ "@passui/react": "^0.3.0",
42
+ "@passui/icons": "^0.1.0"
43
+ },
44
+ "devDependencies": {
45
+ "@types/node": "^26.6.6",
46
+ "@types/react": "^19.3.0",
47
+ "@types/react-dom": "^19.3.0",
48
+ "tailwindcss": "^4.3.5",
49
+ "typescript": "^7.0.2",
50
+ "vitest": "5.1.0",
51
+ "vite": "8.3.8",
52
+ "@tanstack/react-devtools": "^0.10.13",
53
+ "@tanstack/react-form": "^1.33.5",
54
+ "@tanstack/react-query-devtools": "^5.104.0",
55
+ "@tanstack/react-router": "^1.170.39",
56
+ "@tanstack/react-router-devtools": "^1.167.2",
57
+ "@tanstack/react-table": "^9.2.4",
58
+ "motion": "14.12.0",
59
+ "@passui/react": "^0.3.0",
60
+ "react": "^19.3.0",
61
+ "react-dom": "^19.3.0",
62
+ "@tanstack/react-query": "^5.104.0",
63
+ "tsdown": "0.23.7",
64
+ "@passui/icons": "^0.1.1"
65
+ },
66
+ "exports": {
67
+ "./auth-shell": "./dist/auth-shell.js",
68
+ "./core": "./dist/core.js",
69
+ "./document": "./dist/document.js",
70
+ "./form-fields": "./dist/form-fields.js",
71
+ "./forms": "./dist/forms.js",
72
+ "./mutation": "./dist/mutation.js",
73
+ "./route-boundary": "./dist/route-boundary.js",
74
+ "./settings": "./dist/settings.js",
75
+ "./tables": "./dist/tables.js",
76
+ "./package.json": "./package.json",
77
+ "./react/forms": "./dist/forms.js",
78
+ "./react/form-fields": "./dist/form-fields.js",
79
+ "./react/tables": "./dist/tables.js",
80
+ "./react/document": "./dist/document.js",
81
+ "./react/auth-shell": "./dist/auth-shell.js",
82
+ "./react/settings": "./dist/settings.js",
83
+ "./react/mutation": "./dist/mutation.js",
84
+ "./react/route-boundary": "./dist/route-boundary.js",
85
+ "./styles.css": "./src/styles.css",
86
+ "./globals.css": "./src/globals.css",
87
+ "./react/styles.css": "./src/styles.css"
88
+ },
89
+ "description": "TanStack form, table and router integrations for Passui.",
90
+ "peerDependenciesMeta": {
91
+ "react": {
92
+ "optional": true
93
+ },
94
+ "react-dom": {
95
+ "optional": true
96
+ },
97
+ "@tanstack/react-query": {
98
+ "optional": true
99
+ },
100
+ "@tanstack/react-devtools": {
101
+ "optional": true
102
+ },
103
+ "@tanstack/react-form": {
104
+ "optional": true
105
+ },
106
+ "@tanstack/react-query-devtools": {
107
+ "optional": true
108
+ },
109
+ "@tanstack/react-router": {
110
+ "optional": true
111
+ },
112
+ "@tanstack/react-router-devtools": {
113
+ "optional": true
114
+ },
115
+ "@tanstack/react-table": {
116
+ "optional": true
117
+ },
118
+ "motion": {
119
+ "optional": true
120
+ },
121
+ "@passui/react": {
122
+ "optional": true
123
+ },
124
+ "@passui/icons": {
125
+ "optional": false
126
+ }
127
+ },
128
+ "sideEffects": [
129
+ "**/*.css"
130
+ ]
130
131
  }
package/src/styles.css CHANGED
@@ -10,3 +10,4 @@
10
10
 
11
11
  /* forms, tables and the document shell, from this file's place in the package */
12
12
  @source "./";
13
+ @source "../dist";
@@ -1 +0,0 @@
1
- export * from "./auth-shell";
@@ -1 +0,0 @@
1
- export * from "./compose-viewport";
@@ -1,24 +0,0 @@
1
- import { type TextFieldProps } from "@passui/react/text-field";
2
- import { type ComponentProps, type ReactNode } from "react";
3
- export declare const PeachFieldLabels: import("react").Context<{
4
- show: string;
5
- hide: string;
6
- } | undefined>;
7
- export declare function FieldInput(props: Omit<TextFieldProps, "value" | "onChange" | "onBlur" | "name">): import("react").JSX.Element;
8
- export declare function FieldCheckbox({ label }: {
9
- label: string;
10
- }): import("react").JSX.Element;
11
- export declare function FieldSwitch({ label, description, disabled, }: {
12
- label: string;
13
- description?: string;
14
- disabled?: boolean;
15
- }): import("react").JSX.Element;
16
- export declare function FieldTextarea({ label, icon, ...props }: ComponentProps<"textarea"> & {
17
- label: string;
18
- icon?: ReactNode;
19
- }): import("react").JSX.Element;
20
- export declare function FieldOtp({ label, maxLength, onComplete, }: {
21
- label: string;
22
- maxLength?: number;
23
- onComplete?: (value: string) => void;
24
- }): import("react").JSX.Element;
@@ -1,2 +0,0 @@
1
- export * from "../forms/index";
2
- export { PeachFieldLabels } from "./fields";
@@ -1,21 +0,0 @@
1
- import type { ReactNode } from "react";
2
- type Option = {
3
- label: string;
4
- value: string;
5
- description?: string;
6
- icon?: ReactNode;
7
- disabled?: boolean;
8
- };
9
- export declare function FieldRadioCard({ label, description, options, disabled, columns, }: {
10
- label: string;
11
- description?: string;
12
- options: Option[];
13
- disabled?: boolean;
14
- columns?: 1 | 2;
15
- }): import("react").JSX.Element;
16
- export declare function FieldMultiselect({ label, description, options, }: {
17
- label: string;
18
- description?: string;
19
- options: Option[];
20
- }): import("react").JSX.Element;
21
- export {};
@@ -1,3 +0,0 @@
1
- export declare function Submit({ label }: {
2
- label: string;
3
- }): import("react").JSX.Element;
@@ -1 +0,0 @@
1
- export declare const fieldContext: import("react").Context<import("@tanstack/react-form").AnyFieldApi>, formContext: import("react").Context<import("@tanstack/react-form").AnyFormApi>, useFieldContext: <TData>() => import("@tanstack/react-form").FieldApi<any, string, TData, any, any, any, any, any, any, any, any, any, any, any, any, any, any, any, any, any, any, any, any>, useFormContext: () => import("@tanstack/react-form").ReactFormExtendedApi<Record<string, never>, any, any, any, any, any, any, any, any, any, any, any>;
@@ -1 +0,0 @@
1
- export { Submit } from "../../form-fields/submit";
@@ -1,30 +0,0 @@
1
- export type AvatarPickerLabels = {
2
- photo: string;
3
- photoDescription: string;
4
- choosePhoto: string;
5
- takePhoto: string;
6
- capture: string;
7
- monogram: string;
8
- removePhoto: string;
9
- cancel: string;
10
- };
11
- type AvatarPickerProps = {
12
- open: boolean;
13
- onOpenChange: (open: boolean) => void;
14
- label: string;
15
- image?: string;
16
- clearable: boolean;
17
- labels: AvatarPickerLabels;
18
- onChooseFile: () => void;
19
- /** A captured frame, still to be framed in Move and Scale. */
20
- onCapture: (file: File) => void;
21
- /** A finished image that needs no framing, like a monogram. */
22
- onChoose: (file: File) => void;
23
- onRemove: () => void;
24
- };
25
- /**
26
- * The photo sheet Apple shows for a contact photo: the current photo lit by
27
- * its own colors, then the ways to change it.
28
- */
29
- export declare function AvatarPicker({ open, onOpenChange, label, image, clearable, labels, onChooseFile, onCapture, onChoose, onRemove, }: AvatarPickerProps): import("react").ReactPortal | null;
30
- export {};
@@ -1,30 +0,0 @@
1
- import type { ReactNode } from "react";
2
- import type { AvatarPickerLabels } from "./avatar-picker";
3
- export type FieldAvatarValue = File | null | false;
4
- export type FieldAvatarLabels = AvatarPickerLabels & {
5
- edit: string;
6
- remove: string;
7
- /** Shown under a picked photo until it's kept or dropped. */
8
- confirmHint: string;
9
- save: string;
10
- };
11
- type FieldAvatarProps = {
12
- /** Compact identity row for account settings. */
13
- compact?: boolean;
14
- existingImage?: string | null;
15
- label: string;
16
- accept?: string;
17
- /** Offer removing the image once there is one. Off by default: a
18
- * personal avatar usually just gets replaced, not cleared to nothing. */
19
- clearable?: boolean;
20
- /** Sit the photo in a surface lit by its own colors, with this under it. */
21
- caption?: ReactNode;
22
- /** For a translated UI; English otherwise. */
23
- labels?: Partial<FieldAvatarLabels>;
24
- };
25
- /**
26
- * A photo you click to replace: a small menu (choose, take, monogram), then
27
- * the new image shows in place and Enter keeps it (Esc drops it); no cropping dialog.
28
- */
29
- export declare function FieldAvatar({ compact, existingImage, label, accept, clearable, caption, labels, }: FieldAvatarProps): import("react").JSX.Element;
30
- export {};
@@ -1 +0,0 @@
1
- export { FieldCheckbox } from "../../form-fields/fields";
@@ -1,21 +0,0 @@
1
- import { FieldInput, FieldCheckbox, FieldTextarea, FieldSwitch, FieldOtp } from "../../form-fields/fields";
2
- import { FieldRadioCard, FieldMultiselect } from "../../form-fields/selection";
3
- import { FieldAvatar } from "./avatar";
4
- export declare const fields: {
5
- input: typeof FieldInput;
6
- checkbox: typeof FieldCheckbox;
7
- textarea: typeof FieldTextarea;
8
- switch: typeof FieldSwitch;
9
- radioCard: typeof FieldRadioCard;
10
- multiselect: typeof FieldMultiselect;
11
- avatar: typeof FieldAvatar;
12
- otp: typeof FieldOtp;
13
- };
14
- export * from "./input";
15
- export * from "./checkbox";
16
- export * from "./textarea";
17
- export * from "./switch";
18
- export * from "./radio-card";
19
- export * from "./multiselect";
20
- export * from "./avatar";
21
- export * from "./otp";
@@ -1 +0,0 @@
1
- export { FieldInput } from "../../form-fields/fields";
@@ -1 +0,0 @@
1
- export { FieldMultiselect } from "../../form-fields/selection";
@@ -1 +0,0 @@
1
- export { FieldOtp } from "../../form-fields/fields";
@@ -1 +0,0 @@
1
- export { FieldRadioCard } from "../../form-fields/selection";
@@ -1 +0,0 @@
1
- export { FieldSwitch } from "../../form-fields/fields";
@@ -1 +0,0 @@
1
- export { FieldTextarea } from "../../form-fields/fields";
@@ -1,41 +0,0 @@
1
- import { useSelector, useStore } from "@tanstack/react-form";
2
- import { Submit } from "./elements/submit";
3
- export declare const useAppForm: <TFormData, TOnMount extends undefined | import("@tanstack/react-form").FormValidateOrFn<TFormData>, TOnChange extends undefined | import("@tanstack/react-form").FormValidateOrFn<TFormData>, TOnChangeAsync extends undefined | import("@tanstack/react-form").FormAsyncValidateOrFn<TFormData>, TOnBlur extends undefined | import("@tanstack/react-form").FormValidateOrFn<TFormData>, TOnBlurAsync extends undefined | import("@tanstack/react-form").FormAsyncValidateOrFn<TFormData>, TOnSubmit extends undefined | import("@tanstack/react-form").FormValidateOrFn<TFormData>, TOnSubmitAsync extends undefined | import("@tanstack/react-form").FormAsyncValidateOrFn<TFormData>, TOnDynamic extends undefined | import("@tanstack/react-form").FormValidateOrFn<TFormData>, TOnDynamicAsync extends undefined | import("@tanstack/react-form").FormAsyncValidateOrFn<TFormData>, TOnServer extends undefined | import("@tanstack/react-form").FormAsyncValidateOrFn<TFormData>, TSubmitMeta>(props: import("@tanstack/react-form").FormOptions<TFormData, TOnMount, TOnChange, TOnChangeAsync, TOnBlur, TOnBlurAsync, TOnSubmit, TOnSubmitAsync, TOnDynamic, TOnDynamicAsync, TOnServer, TSubmitMeta>) => import("@tanstack/react-form").AppFieldExtendedReactFormApi<TFormData, TOnMount, TOnChange, TOnChangeAsync, TOnBlur, TOnBlurAsync, TOnSubmit, TOnSubmitAsync, TOnDynamic, TOnDynamicAsync, TOnServer, TSubmitMeta, {
4
- readonly input: typeof import(".").FieldInput;
5
- readonly checkbox: typeof import(".").FieldCheckbox;
6
- readonly textarea: typeof import(".").FieldTextarea;
7
- readonly switch: typeof import(".").FieldSwitch;
8
- readonly radioCard: typeof import(".").FieldRadioCard;
9
- readonly multiselect: typeof import(".").FieldMultiselect;
10
- readonly avatar: typeof import(".").FieldAvatar;
11
- readonly otp: typeof import(".").FieldOtp;
12
- }, {
13
- readonly submit: typeof Submit;
14
- }>, withForm: <TFormData, TOnMount extends undefined | import("@tanstack/react-form").FormValidateOrFn<TFormData>, TOnChange extends undefined | import("@tanstack/react-form").FormValidateOrFn<TFormData>, TOnChangeAsync extends undefined | import("@tanstack/react-form").FormAsyncValidateOrFn<TFormData>, TOnBlur extends undefined | import("@tanstack/react-form").FormValidateOrFn<TFormData>, TOnBlurAsync extends undefined | import("@tanstack/react-form").FormAsyncValidateOrFn<TFormData>, TOnSubmit extends undefined | import("@tanstack/react-form").FormValidateOrFn<TFormData>, TOnSubmitAsync extends undefined | import("@tanstack/react-form").FormAsyncValidateOrFn<TFormData>, TOnDynamic extends undefined | import("@tanstack/react-form").FormValidateOrFn<TFormData>, TOnDynamicAsync extends undefined | import("@tanstack/react-form").FormAsyncValidateOrFn<TFormData>, TOnServer extends undefined | import("@tanstack/react-form").FormAsyncValidateOrFn<TFormData>, TSubmitMeta, TRenderProps extends object = {}>({ render, props, }: import("@tanstack/react-form").WithFormProps<TFormData, TOnMount, TOnChange, TOnChangeAsync, TOnBlur, TOnBlurAsync, TOnSubmit, TOnSubmitAsync, TOnDynamic, TOnDynamicAsync, TOnServer, TSubmitMeta, {
15
- readonly input: typeof import(".").FieldInput;
16
- readonly checkbox: typeof import(".").FieldCheckbox;
17
- readonly textarea: typeof import(".").FieldTextarea;
18
- readonly switch: typeof import(".").FieldSwitch;
19
- readonly radioCard: typeof import(".").FieldRadioCard;
20
- readonly multiselect: typeof import(".").FieldMultiselect;
21
- readonly avatar: typeof import(".").FieldAvatar;
22
- readonly otp: typeof import(".").FieldOtp;
23
- }, {
24
- readonly submit: typeof Submit;
25
- }, TRenderProps>) => import("react").FunctionComponent<import("react").PropsWithChildren<NoInfer<[unknown] extends [TRenderProps] ? any : TRenderProps> & {
26
- form: import("@tanstack/react-form").AppFieldExtendedReactFormApi<[unknown] extends [TFormData] ? any : TFormData, [import("@tanstack/react-form").FormValidateOrFn<TFormData> | undefined] extends [TOnMount] ? [TOnMount] extends [TOnMount & (import("@tanstack/react-form").FormValidateOrFn<TFormData> | undefined)] ? any : TOnMount : TOnMount, [import("@tanstack/react-form").FormValidateOrFn<TFormData> | undefined] extends [TOnChange] ? [TOnChange] extends [TOnChange & (import("@tanstack/react-form").FormValidateOrFn<TFormData> | undefined)] ? any : TOnChange : TOnChange, [import("@tanstack/react-form").FormValidateOrFn<TFormData> | undefined] extends [TOnChangeAsync] ? [TOnChangeAsync] extends [TOnChangeAsync & (import("@tanstack/react-form").FormValidateOrFn<TFormData> | undefined)] ? any : TOnChangeAsync : TOnChangeAsync, [import("@tanstack/react-form").FormValidateOrFn<TFormData> | undefined] extends [TOnBlur] ? [TOnBlur] extends [TOnBlur & (import("@tanstack/react-form").FormValidateOrFn<TFormData> | undefined)] ? any : TOnBlur : TOnBlur, [import("@tanstack/react-form").FormValidateOrFn<TFormData> | undefined] extends [TOnBlurAsync] ? [TOnBlurAsync] extends [TOnBlurAsync & (import("@tanstack/react-form").FormValidateOrFn<TFormData> | undefined)] ? any : TOnBlurAsync : TOnBlurAsync, [import("@tanstack/react-form").FormValidateOrFn<TFormData> | undefined] extends [TOnSubmit] ? [TOnSubmit] extends [TOnSubmit & (import("@tanstack/react-form").FormValidateOrFn<TFormData> | undefined)] ? any : TOnSubmit : TOnSubmit, [import("@tanstack/react-form").FormValidateOrFn<TFormData> | undefined] extends [TOnSubmitAsync] ? [TOnSubmitAsync] extends [TOnSubmitAsync & (import("@tanstack/react-form").FormValidateOrFn<TFormData> | undefined)] ? any : TOnSubmitAsync : TOnSubmitAsync, [import("@tanstack/react-form").FormValidateOrFn<TFormData> | undefined] extends [TOnDynamic] ? [TOnDynamic] extends [TOnDynamic & (import("@tanstack/react-form").FormValidateOrFn<TFormData> | undefined)] ? any : TOnDynamic : TOnDynamic, [import("@tanstack/react-form").FormValidateOrFn<TFormData> | undefined] extends [TOnDynamicAsync] ? [TOnDynamicAsync] extends [TOnDynamicAsync & (import("@tanstack/react-form").FormValidateOrFn<TFormData> | undefined)] ? any : TOnDynamicAsync : TOnDynamicAsync, [import("@tanstack/react-form").FormValidateOrFn<TFormData> | undefined] extends [TOnServer] ? [TOnServer] extends [TOnServer & (import("@tanstack/react-form").FormValidateOrFn<TFormData> | undefined)] ? any : TOnServer : TOnServer, [unknown] extends [TSubmitMeta] ? any : TSubmitMeta, {
27
- readonly input: typeof import(".").FieldInput;
28
- readonly checkbox: typeof import(".").FieldCheckbox;
29
- readonly textarea: typeof import(".").FieldTextarea;
30
- readonly switch: typeof import(".").FieldSwitch;
31
- readonly radioCard: typeof import(".").FieldRadioCard;
32
- readonly multiselect: typeof import(".").FieldMultiselect;
33
- readonly avatar: typeof import(".").FieldAvatar;
34
- readonly otp: typeof import(".").FieldOtp;
35
- }, {
36
- readonly submit: typeof Submit;
37
- }>;
38
- }>>;
39
- export { useSelector, useStore };
40
- export * from "./fields/index";
41
- export { FormAlert } from "./elements/form-alert";
@@ -1 +0,0 @@
1
- export * from "./use-app-mutation";
@@ -1,22 +0,0 @@
1
- import type { QueryKey, UseMutationOptions } from "@tanstack/react-query";
2
- type OptimisticUpdate<TOptimisticData, TVariables> = {
3
- queryKey: QueryKey;
4
- /** Applied to the cache immediately, before the mutation resolves. Rolled back if it errors. */
5
- updater: (old: TOptimisticData | undefined, variables: TVariables) => TOptimisticData;
6
- };
7
- type MutationContext<TOptimisticData> = {
8
- previous: TOptimisticData | undefined;
9
- next: TOptimisticData;
10
- } | undefined;
11
- export { shouldRestoreOptimisticSnapshot, restoreOptimisticSnapshot } from "../shared/optimistic";
12
- type AppMutationOptions<TData, TVariables, TOptimisticData> = Omit<UseMutationOptions<TData, Error, TVariables, MutationContext<TOptimisticData>>, "onSuccess" | "onError" | "onMutate" | "onSettled"> & {
13
- /** Query keys to invalidate once the mutation settles, win or lose. */
14
- invalidates?: QueryKey[];
15
- optimisticUpdate?: OptimisticUpdate<TOptimisticData, TVariables>;
16
- successMessage?: string | ((data: TData, variables: TVariables) => string);
17
- successDescription?: string | ((data: TData, variables: TVariables) => string | undefined);
18
- errorMessage?: string;
19
- onSuccess?: (data: TData, variables: TVariables) => void;
20
- onError?: (error: Error, variables: TVariables) => void;
21
- };
22
- export declare function useAppMutation<TData, TVariables = void, TOptimisticData = unknown>({ invalidates, optimisticUpdate, successMessage, successDescription, errorMessage, onSuccess, onError, ...options }: AppMutationOptions<TData, TVariables, TOptimisticData>): import("@tanstack/react-query").UseMutationResult<TData, Error, TVariables, MutationContext<TOptimisticData>>;
@@ -1,2 +0,0 @@
1
- import type { ErrorComponentProps } from "@tanstack/react-router";
2
- export declare function DefaultBoundary({ error }: ErrorComponentProps): import("react").JSX.Element;
@@ -1,6 +0,0 @@
1
- export type DefaultLoaderProps = {
2
- /** Translated loading status for assistive technology; never displayed visually. */
3
- label?: string;
4
- className?: string;
5
- };
6
- export declare function DefaultLoader({ label, className }?: DefaultLoaderProps): import("react").JSX.Element;
@@ -1,3 +0,0 @@
1
- export * from "./default-boundary";
2
- export * from "./default-loader";
3
- export * from "./not-founder";
@@ -1 +0,0 @@
1
- export * from "./setting-list";
@@ -1,51 +0,0 @@
1
- import { type IconButtonSize } from "@passui/react/icon-button";
2
- import type { LinkProps } from "@tanstack/react-router";
3
- import type { ReactNode } from "react";
4
- type SettingListProps = {
5
- id?: string;
6
- /** h3 when the list sits inside an Area that already has the h2. */
7
- as?: "h2" | "h3";
8
- /** A Glyph beside the heading; rows themselves stay plain. */
9
- icon?: ReactNode;
10
- title?: string;
11
- description?: string;
12
- /** Right of the heading: an Add button, or a Coming soon badge. */
13
- action?: ReactNode;
14
- /** "tile": the rounded, lifted card of the account app's overview. */
15
- variant?: "inset" | "tile";
16
- children: ReactNode;
17
- className?: string;
18
- };
19
- type RowProps = {
20
- icon?: ReactNode;
21
- title: ReactNode;
22
- description?: ReactNode;
23
- /** The current value, muted on the right, like "On" or an email. */
24
- value?: ReactNode;
25
- trailing?: ReactNode;
26
- to?: LinkProps["to"];
27
- params?: LinkProps["params"];
28
- hash?: string;
29
- onClick?: () => void;
30
- /** Show the chevron without a destination, for a preview row. */
31
- chevron?: boolean;
32
- tone?: "default" | "destructive";
33
- };
34
- /**
35
- * A titled group of settings in one inset card, hairlines between rows
36
- * (even rows wrapped in a Preview), a soft highlight under the one you point at.
37
- */
38
- export declare function SettingList({ id, as: Heading, icon, title, description, action, variant, children, className, }: SettingListProps): import("react").JSX.Element;
39
- export declare namespace SettingList {
40
- export { Row };
41
- export { Copy };
42
- }
43
- declare function Row({ icon, title, description, value, trailing, to, params, hash, onClick, chevron, tone, }: RowProps): import("react").JSX.Element;
44
- /** A row's trailing copy button; shows a tick for a moment after copying. */
45
- declare function Copy({ value, label, size, }: {
46
- value: string;
47
- label?: string;
48
- /** Quiet and row-sized by default; any of Passui's icon sizes. */
49
- size?: IconButtonSize;
50
- }): import("react").JSX.Element;
51
- export {};
@@ -1,2 +0,0 @@
1
- export * from "./optimistic";
2
- export * from "./table";
@@ -1,3 +0,0 @@
1
- import type { RowData } from "@tanstack/react-table";
2
- import type { DataTableColumnDef } from "./data-table";
3
- export declare function selectColumn<TData extends RowData>(): DataTableColumnDef<TData>;