@hexdspace/react 0.1.8 → 0.1.9
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/dist/css/base-theme.css +8 -8
- package/dist/css/component.css +49 -7
- package/dist/css/primitive.css +64 -80
- package/dist/css/semantic.css +14 -5
- package/dist/css/utils/custom-scrollbar.css +4 -3
- package/dist/index.d.ts +34 -16
- package/dist/index.js +678 -301
- package/package.json +1 -1
package/dist/css/base-theme.css
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
@import url(
|
|
2
|
-
@import url(
|
|
3
|
-
@import url(
|
|
1
|
+
@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;700&display=swap");
|
|
2
|
+
@import url("https://fonts.googleapis.com/css2?family=Fira+Sans:wght@400;600;700&display=swap");
|
|
3
|
+
@import url("https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;600;700&display=swap");
|
|
4
4
|
|
|
5
|
-
@import
|
|
5
|
+
@import "tailwindcss";
|
|
6
6
|
|
|
7
|
-
@import
|
|
8
|
-
@import
|
|
9
|
-
@import
|
|
10
|
-
@import
|
|
7
|
+
@import "./primitive.css";
|
|
8
|
+
@import "./semantic.css";
|
|
9
|
+
@import "./component.css";
|
|
10
|
+
@import "./utils/custom-scrollbar.css";
|
|
11
11
|
|
|
12
12
|
@plugin 'tailwind-scrollbar';
|
|
13
13
|
|
package/dist/css/component.css
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
--state-hover: color-mix(in oklab, currentColor, transparent 92%);
|
|
6
6
|
--state-active: color-mix(in oklab, currentColor, transparent 86%);
|
|
7
7
|
|
|
8
|
-
&::after{
|
|
8
|
+
&::after {
|
|
9
9
|
content: "";
|
|
10
10
|
position: absolute;
|
|
11
11
|
inset: 0;
|
|
@@ -16,9 +16,11 @@
|
|
|
16
16
|
pointer-events: none;
|
|
17
17
|
}
|
|
18
18
|
|
|
19
|
-
&:hover::after {
|
|
19
|
+
&:hover::after {
|
|
20
|
+
opacity: 1;
|
|
21
|
+
}
|
|
20
22
|
|
|
21
|
-
&:active::after{
|
|
23
|
+
&:active::after {
|
|
22
24
|
background: var(--state-active);
|
|
23
25
|
opacity: 1;
|
|
24
26
|
}
|
|
@@ -44,9 +46,18 @@
|
|
|
44
46
|
min-height: 100vh;
|
|
45
47
|
}
|
|
46
48
|
|
|
47
|
-
h1 {
|
|
48
|
-
|
|
49
|
-
|
|
49
|
+
h1 {
|
|
50
|
+
font: var(--h1);
|
|
51
|
+
@apply my-2;
|
|
52
|
+
}
|
|
53
|
+
h2 {
|
|
54
|
+
font: var(--h2);
|
|
55
|
+
@apply my-2;
|
|
56
|
+
}
|
|
57
|
+
h3 {
|
|
58
|
+
font: var(--h3);
|
|
59
|
+
@apply my-2;
|
|
60
|
+
}
|
|
50
61
|
|
|
51
62
|
p {
|
|
52
63
|
@apply my-2;
|
|
@@ -63,7 +74,7 @@
|
|
|
63
74
|
text-decoration: underline;
|
|
64
75
|
}
|
|
65
76
|
|
|
66
|
-
:where(button,[role="button"],a,input,select,textarea,[tabindex]):focus-visible {
|
|
77
|
+
:where(button, [role="button"], a, input, select, textarea, [tabindex]):focus-visible {
|
|
67
78
|
outline: none;
|
|
68
79
|
box-shadow: var(--focus-ring);
|
|
69
80
|
}
|
|
@@ -114,6 +125,37 @@
|
|
|
114
125
|
}
|
|
115
126
|
|
|
116
127
|
@layer utilities {
|
|
128
|
+
@keyframes skeleton-shimmer {
|
|
129
|
+
0% {
|
|
130
|
+
background-position: 200% 0;
|
|
131
|
+
}
|
|
132
|
+
100% {
|
|
133
|
+
background-position: -200% 0;
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
@keyframes tooltip-in {
|
|
138
|
+
0% {
|
|
139
|
+
opacity: 0;
|
|
140
|
+
transform: translate(var(--tooltip-x, 0px), var(--tooltip-y, 4px)) scale(0.98);
|
|
141
|
+
}
|
|
142
|
+
100% {
|
|
143
|
+
opacity: 1;
|
|
144
|
+
transform: translate(0, 0) scale(1);
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
@keyframes tooltip-out {
|
|
149
|
+
0% {
|
|
150
|
+
opacity: 1;
|
|
151
|
+
transform: translate(0, 0) scale(1);
|
|
152
|
+
}
|
|
153
|
+
100% {
|
|
154
|
+
opacity: 0;
|
|
155
|
+
transform: translate(var(--tooltip-x, 0px), var(--tooltip-y, 4px)) scale(0.98);
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
|
|
117
159
|
.brand-gradient {
|
|
118
160
|
background: linear-gradient(90deg, var(--brand-strong) 0%, var(--brand) 30%);
|
|
119
161
|
-webkit-background-clip: text;
|
package/dist/css/primitive.css
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
:root {
|
|
2
2
|
/* Typography */
|
|
3
|
-
--font-primary:
|
|
4
|
-
--font-secondary:
|
|
5
|
-
--font-mono:
|
|
6
|
-
--h1: 600 3rem/1.2em var(--font-secondary);
|
|
7
|
-
--h2: 600 2rem/1.2em var(--font-secondary);
|
|
8
|
-
--h3: 600 1.25rem/1.3em var(--font-secondary);
|
|
9
|
-
--p: 1rem/1.5em var(--font-primary);
|
|
10
|
-
--span: 1rem/1.0em var(--font-primary);
|
|
3
|
+
--font-primary: "Inter", sans-serif;
|
|
4
|
+
--font-secondary: "Fira Sans", sans-serif;
|
|
5
|
+
--font-mono: "JetBrains Mono", "Consolas", monospace;
|
|
6
|
+
--h1: 600 3rem / 1.2em var(--font-secondary);
|
|
7
|
+
--h2: 600 2rem / 1.2em var(--font-secondary);
|
|
8
|
+
--h3: 600 1.25rem / 1.3em var(--font-secondary);
|
|
9
|
+
--p: 1rem / 1.5em var(--font-primary);
|
|
10
|
+
--span: 1rem / 1.0em var(--font-primary);
|
|
11
11
|
|
|
12
12
|
/* Radii */
|
|
13
13
|
--shape-radius-0: 0px;
|
|
@@ -29,107 +29,91 @@
|
|
|
29
29
|
--ink-20: oklch(0.84 0.043 258);
|
|
30
30
|
--ink-30: oklch(0.76 0.043 258);
|
|
31
31
|
--ink-40: oklch(0.68 0.043 258);
|
|
32
|
-
--ink-50: oklch(0.
|
|
32
|
+
--ink-50: oklch(0.6 0.035 258);
|
|
33
33
|
--ink-60: oklch(0.48 0.035 258);
|
|
34
|
-
--ink-70: oklch(0.
|
|
34
|
+
--ink-70: oklch(0.4 0.035 258);
|
|
35
35
|
--ink-80: oklch(0.32 0.025 258);
|
|
36
36
|
--ink-90: oklch(0.24 0.025 258);
|
|
37
37
|
--ink-100: oklch(0.16 0.025 258);
|
|
38
38
|
|
|
39
39
|
/* Accent */
|
|
40
40
|
/* Accent (cool mint green) */
|
|
41
|
-
--accent-10:
|
|
42
|
-
--accent-20:
|
|
43
|
-
--accent-30:
|
|
44
|
-
--accent-40:
|
|
45
|
-
--accent-50:
|
|
46
|
-
--accent-60:
|
|
47
|
-
--accent-70:
|
|
48
|
-
--accent-80:
|
|
49
|
-
--accent-90: oklch(0.42
|
|
50
|
-
--accent-100: oklch(0.36
|
|
41
|
+
--accent-10: oklch(0.93 0.028 160);
|
|
42
|
+
--accent-20: oklch(0.87 0.052 160);
|
|
43
|
+
--accent-30: oklch(0.84 0.068 160);
|
|
44
|
+
--accent-40: oklch(0.8 0.085 160);
|
|
45
|
+
--accent-50: oklch(0.74 0.105 160);
|
|
46
|
+
--accent-60: oklch(0.66 0.125 160);
|
|
47
|
+
--accent-70: oklch(0.58 0.135 160);
|
|
48
|
+
--accent-80: oklch(0.48 0.125 160);
|
|
49
|
+
--accent-90: oklch(0.42 0.105 160);
|
|
50
|
+
--accent-100: oklch(0.36 0.105 160);
|
|
51
51
|
|
|
52
52
|
/* Brand ramp */
|
|
53
|
-
--brand-10:
|
|
54
|
-
--brand-20:
|
|
55
|
-
--brand-30:
|
|
56
|
-
--brand-40:
|
|
57
|
-
--brand-50:
|
|
58
|
-
--brand-60:
|
|
59
|
-
--brand-70:
|
|
60
|
-
--brand-80:
|
|
61
|
-
--brand-90:
|
|
53
|
+
--brand-10: oklch(0.97 0.02 250);
|
|
54
|
+
--brand-20: oklch(0.93 0.035 250);
|
|
55
|
+
--brand-30: oklch(0.88 0.05 250);
|
|
56
|
+
--brand-40: oklch(0.82 0.07 250);
|
|
57
|
+
--brand-50: oklch(0.74 0.095 250);
|
|
58
|
+
--brand-60: oklch(0.66 0.12 250);
|
|
59
|
+
--brand-70: oklch(0.58 0.145 250);
|
|
60
|
+
--brand-80: oklch(0.5 0.135 250);
|
|
61
|
+
--brand-90: oklch(0.42 0.115 250);
|
|
62
62
|
--brand-100: oklch(0.34 0.095 250);
|
|
63
63
|
|
|
64
64
|
/* Functional ramps */
|
|
65
|
-
--info-10: oklch(0.
|
|
66
|
-
--info-20: oklch(0.
|
|
67
|
-
--info-30: oklch(0.
|
|
68
|
-
--info-40: oklch(0.
|
|
69
|
-
--info-50: oklch(0.
|
|
70
|
-
--info-60: oklch(0.
|
|
71
|
-
--info-70: oklch(0.
|
|
72
|
-
--info-80: oklch(0.
|
|
73
|
-
--info-90: oklch(0.
|
|
65
|
+
--info-10: oklch(0.97 0.028 230);
|
|
66
|
+
--info-20: oklch(0.94 0.042 230);
|
|
67
|
+
--info-30: oklch(0.91 0.056 230);
|
|
68
|
+
--info-40: oklch(0.88 0.07 230);
|
|
69
|
+
--info-50: oklch(0.82 0.09 230);
|
|
70
|
+
--info-60: oklch(0.76 0.105 230);
|
|
71
|
+
--info-70: oklch(0.66 0.11 230);
|
|
72
|
+
--info-80: oklch(0.56 0.095 230);
|
|
73
|
+
--info-90: oklch(0.47 0.08 230);
|
|
74
74
|
|
|
75
|
-
--success-10: oklch(0.
|
|
76
|
-
--success-20: oklch(0.876 0.
|
|
75
|
+
--success-10: oklch(0.92 0.042 145);
|
|
76
|
+
--success-20: oklch(0.876 0.06 145);
|
|
77
77
|
--success-30: oklch(0.832 0.078 145);
|
|
78
78
|
--success-40: oklch(0.788 0.094 145);
|
|
79
79
|
--success-50: oklch(0.744 0.109 145);
|
|
80
|
-
--success-60: oklch(0.
|
|
81
|
-
--success-70: oklch(0.
|
|
82
|
-
--success-80: oklch(0.
|
|
83
|
-
--success-90: oklch(0.
|
|
80
|
+
--success-60: oklch(0.7 0.12 145);
|
|
81
|
+
--success-70: oklch(0.6 0.1 145);
|
|
82
|
+
--success-80: oklch(0.5 0.08 145);
|
|
83
|
+
--success-90: oklch(0.4 0.06 145);
|
|
84
84
|
|
|
85
|
-
--warning-10: oklch(0.
|
|
86
|
-
--warning-20: oklch(0.932 0.
|
|
85
|
+
--warning-10: oklch(0.97 0.042 80);
|
|
86
|
+
--warning-20: oklch(0.932 0.06 80);
|
|
87
87
|
--warning-30: oklch(0.894 0.078 80);
|
|
88
88
|
--warning-40: oklch(0.856 0.094 80);
|
|
89
89
|
--warning-50: oklch(0.818 0.109 80);
|
|
90
|
-
--warning-60: oklch(0.
|
|
91
|
-
--warning-70: oklch(0.
|
|
92
|
-
--warning-80: oklch(0.
|
|
93
|
-
--warning-90: oklch(0.
|
|
90
|
+
--warning-60: oklch(0.78 0.12 80);
|
|
91
|
+
--warning-70: oklch(0.68 0.1 80);
|
|
92
|
+
--warning-80: oklch(0.58 0.08 80);
|
|
93
|
+
--warning-90: oklch(0.48 0.06 80);
|
|
94
94
|
|
|
95
|
-
--danger-10: oklch(0.
|
|
96
|
-
--danger-20: oklch(0.836 0.
|
|
95
|
+
--danger-10: oklch(0.88 0.056 28);
|
|
96
|
+
--danger-20: oklch(0.836 0.08 28);
|
|
97
97
|
--danger-30: oklch(0.792 0.104 28);
|
|
98
98
|
--danger-40: oklch(0.748 0.125 28);
|
|
99
99
|
--danger-50: oklch(0.704 0.145 28);
|
|
100
|
-
--danger-60: oklch(0.
|
|
101
|
-
--danger-70: oklch(0.
|
|
102
|
-
--danger-80: oklch(0.
|
|
103
|
-
--danger-90: oklch(0.
|
|
100
|
+
--danger-60: oklch(0.66 0.16 28);
|
|
101
|
+
--danger-70: oklch(0.56 0.133 28);
|
|
102
|
+
--danger-80: oklch(0.46 0.107 28);
|
|
103
|
+
--danger-90: oklch(0.36 0.08 28);
|
|
104
104
|
|
|
105
105
|
/* Elevation */
|
|
106
106
|
--elevation-0: none;
|
|
107
|
-
--elevation-10:
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
--elevation-
|
|
111
|
-
0 4px 8px oklch(0.55 0 0 / 0.08),
|
|
112
|
-
0 2px 4px oklch(0.55 0 0 / 0.06);
|
|
113
|
-
--elevation-30:
|
|
114
|
-
0 10px 20px oklch(0.55 0 0 / 0.16),
|
|
115
|
-
0 3px 8px oklch(0.55 0 0 / 0.10);
|
|
116
|
-
--elevation-40:
|
|
117
|
-
0 18px 36px oklch(0.55 0 0 / 0.22),
|
|
118
|
-
0 6px 12px oklch(0.55 0 0 / 0.12);
|
|
107
|
+
--elevation-10: 0 1px 3px oklch(0.55 0 0 / 0.08), 0 1px 2px oklch(0.55 0 0 / 0.12);
|
|
108
|
+
--elevation-20: 0 4px 8px oklch(0.55 0 0 / 0.08), 0 2px 4px oklch(0.55 0 0 / 0.06);
|
|
109
|
+
--elevation-30: 0 10px 20px oklch(0.55 0 0 / 0.16), 0 3px 8px oklch(0.55 0 0 / 0.1);
|
|
110
|
+
--elevation-40: 0 18px 36px oklch(0.55 0 0 / 0.22), 0 6px 12px oklch(0.55 0 0 / 0.12);
|
|
119
111
|
}
|
|
120
112
|
|
|
121
113
|
.dark {
|
|
122
114
|
--elevation-0: none;
|
|
123
|
-
--elevation-10:
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
--elevation-
|
|
127
|
-
0 4px 10px oklch(0.25 0 0 / 0.38),
|
|
128
|
-
0 1px 3px oklch(0.25 0 0 / 0.28);
|
|
129
|
-
--elevation-30:
|
|
130
|
-
0 12px 24px oklch(0.25 0 0 / 0.42),
|
|
131
|
-
0 4px 10px oklch(0.25 0 0 / 0.32);
|
|
132
|
-
--elevation-40:
|
|
133
|
-
0 20px 40px oklch(0.25 0 0 / 0.48),
|
|
134
|
-
0 6px 18px oklch(0.25 0 0 / 0.32);
|
|
115
|
+
--elevation-10: 0 1px 2px oklch(0.25 0 0 / 0.35), 0 0 0 1px oklch(0.22 0 0 / 0.35);
|
|
116
|
+
--elevation-20: 0 4px 10px oklch(0.25 0 0 / 0.38), 0 1px 3px oklch(0.25 0 0 / 0.28);
|
|
117
|
+
--elevation-30: 0 12px 24px oklch(0.25 0 0 / 0.42), 0 4px 10px oklch(0.25 0 0 / 0.32);
|
|
118
|
+
--elevation-40: 0 20px 40px oklch(0.25 0 0 / 0.48), 0 6px 18px oklch(0.25 0 0 / 0.32);
|
|
135
119
|
}
|
package/dist/css/semantic.css
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
|
-
:root {
|
|
2
|
-
|
|
1
|
+
:root {
|
|
2
|
+
color-scheme: light;
|
|
3
|
+
}
|
|
4
|
+
.dark {
|
|
5
|
+
color-scheme: dark;
|
|
6
|
+
}
|
|
3
7
|
|
|
4
8
|
:root {
|
|
5
9
|
/* Surfaces */
|
|
@@ -55,7 +59,7 @@
|
|
|
55
59
|
--surface-active: color-mix(in oklab, var(--surface-1), black 4%);
|
|
56
60
|
|
|
57
61
|
/* Overlay */
|
|
58
|
-
--overlay: oklch(0.16 0 0 / 0.
|
|
62
|
+
--overlay: oklch(0.16 0 0 / 0.4);
|
|
59
63
|
|
|
60
64
|
/* Elevation */
|
|
61
65
|
--shadow-none: var(--elevation-0);
|
|
@@ -116,7 +120,7 @@
|
|
|
116
120
|
--surface-hover: color-mix(in oklab, var(--surface-1), white 6%);
|
|
117
121
|
--surface-active: color-mix(in oklab, var(--surface-1), white 8%);
|
|
118
122
|
|
|
119
|
-
--overlay: oklch(0.
|
|
123
|
+
--overlay: oklch(0.0 0 0 / 0.55);
|
|
120
124
|
|
|
121
125
|
--on-info: oklch(0.12 0 0);
|
|
122
126
|
--on-success: oklch(0.12 0 0);
|
|
@@ -129,5 +133,10 @@
|
|
|
129
133
|
}
|
|
130
134
|
|
|
131
135
|
@media (prefers-reduced-motion: reduce) {
|
|
132
|
-
|
|
136
|
+
*,
|
|
137
|
+
*::before,
|
|
138
|
+
*::after {
|
|
139
|
+
transition-duration: 1ms;
|
|
140
|
+
animation-duration: 1ms;
|
|
141
|
+
}
|
|
133
142
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
.custom-scrollbar {
|
|
2
2
|
@apply scrollbar-thin;
|
|
3
|
-
|
|
3
|
+
/* biome-ignore lint/correctness/noUnknownFunction: Tailwind's theme() is resolved at build time. */
|
|
4
|
+
scrollbar-color: theme("colors.ink.70") transparent;
|
|
4
5
|
overscroll-behavior: contain;
|
|
5
6
|
scrollbar-gutter: stable both-edges;
|
|
6
7
|
}
|
|
@@ -17,6 +18,6 @@
|
|
|
17
18
|
@apply bg-transparent;
|
|
18
19
|
}
|
|
19
20
|
|
|
20
|
-
.custom-scrollbar::-webkit-scrollbar-button{
|
|
21
|
-
display:none;
|
|
21
|
+
.custom-scrollbar::-webkit-scrollbar-button {
|
|
22
|
+
display: none;
|
|
22
23
|
}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import { ResultOk, ResultError, AsyncResult, Result } from '@hexdspace/util';
|
|
1
2
|
import * as _tanstack_react_query from '@tanstack/react-query';
|
|
2
3
|
import { QueryClient, QueryKey } from '@tanstack/react-query';
|
|
3
|
-
import { ResultOk, ResultError, AsyncResult, Result } from '@hexdspace/util';
|
|
4
4
|
import * as React from 'react';
|
|
5
5
|
import React__default, { CSSProperties, Dispatch, ReactNode } from 'react';
|
|
6
6
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
@@ -21,14 +21,14 @@ interface Notification {
|
|
|
21
21
|
action?: NotificationAction;
|
|
22
22
|
}
|
|
23
23
|
|
|
24
|
-
interface SendNotification {
|
|
25
|
-
execute(channel: string, notification: Notification): Promise<void>;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
24
|
interface NotificationListener {
|
|
29
25
|
notify: (notification: Notification) => void;
|
|
30
26
|
}
|
|
31
27
|
|
|
28
|
+
interface SendNotification {
|
|
29
|
+
execute(channel: string, notification: Notification): Promise<void>;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
32
|
type UnsubscribeHandler = () => void;
|
|
33
33
|
interface Subscribe {
|
|
34
34
|
execute(channel: string, observer: NotificationListener): Promise<UnsubscribeHandler>;
|
|
@@ -60,6 +60,7 @@ type ToastTheme = {
|
|
|
60
60
|
progressWarning?: string;
|
|
61
61
|
progressError?: string;
|
|
62
62
|
width?: string;
|
|
63
|
+
toastRadius?: string;
|
|
63
64
|
contentPadding?: string;
|
|
64
65
|
bodyColumnGap?: string;
|
|
65
66
|
bodyRowGap?: string;
|
|
@@ -79,6 +80,7 @@ type ToastifyCSSVars = CSSProperties & {
|
|
|
79
80
|
'--toastify-color-progress-warning'?: string;
|
|
80
81
|
'--toastify-color-progress-error'?: string;
|
|
81
82
|
'--toastify-toast-width'?: string;
|
|
83
|
+
'--toastify-toast-bd-radius'?: string;
|
|
82
84
|
};
|
|
83
85
|
type ToastActionTheme = {
|
|
84
86
|
padding: string;
|
|
@@ -108,6 +110,7 @@ type ResolvedToastTheme = {
|
|
|
108
110
|
progressWarning: string;
|
|
109
111
|
progressError: string;
|
|
110
112
|
width: string;
|
|
113
|
+
toastRadius: string;
|
|
111
114
|
contentPadding: string;
|
|
112
115
|
bodyColumnGap: string;
|
|
113
116
|
bodyRowGap: string;
|
|
@@ -160,7 +163,7 @@ type OptimisticSnapshot = {
|
|
|
160
163
|
rollback: () => void | Promise<void>;
|
|
161
164
|
};
|
|
162
165
|
type MutationFn<Args, Res> = (args: Args) => Promise<UIResult<Res>>;
|
|
163
|
-
type OptimisticUpdateFn<Args> = (args: Args, ctx: InstructionContext) => Promise<OptimisticSnapshot |
|
|
166
|
+
type OptimisticUpdateFn<Args> = (args: Args, ctx: InstructionContext) => Promise<OptimisticSnapshot | undefined> | OptimisticSnapshot | undefined;
|
|
164
167
|
type OnSuccessFn<Res> = (data: Res) => void;
|
|
165
168
|
type ResponsiveMutation<Args, Res> = {
|
|
166
169
|
mutationFn: MutationFn<Args, Res>;
|
|
@@ -248,6 +251,10 @@ interface User {
|
|
|
248
251
|
email: string;
|
|
249
252
|
}
|
|
250
253
|
|
|
254
|
+
interface GetAuthenticatedUser {
|
|
255
|
+
execute(): AsyncResult<Error, User | null>;
|
|
256
|
+
}
|
|
257
|
+
|
|
251
258
|
interface LoginUser {
|
|
252
259
|
execute(email: string, password: string): AsyncResult<Error, User>;
|
|
253
260
|
}
|
|
@@ -260,10 +267,6 @@ interface RegisterUser {
|
|
|
260
267
|
execute(email: string, password: string, attributes?: Record<string, string>): AsyncResult<Error, GenericResponse>;
|
|
261
268
|
}
|
|
262
269
|
|
|
263
|
-
interface GetAuthenticatedUser {
|
|
264
|
-
execute(): AsyncResult<Error, User | null>;
|
|
265
|
-
}
|
|
266
|
-
|
|
267
270
|
interface AuthProvider$1 {
|
|
268
271
|
getAuthenticatedUser(): AsyncResult<Error, User | null>;
|
|
269
272
|
login(email: string, password: string): AsyncResult<Error, User>;
|
|
@@ -366,8 +369,8 @@ type RedirectIfAuthedProps = {
|
|
|
366
369
|
errorPlaceholder?: ReactNode;
|
|
367
370
|
authenticatedPlaceholder?: ReactNode;
|
|
368
371
|
};
|
|
369
|
-
declare function RequireAuth({ guarded, loadingPlaceholder, errorPlaceholder, unauthenticatedRedirectTo, unauthenticatedPlaceholder }: RequireAuthProps): react_jsx_runtime.JSX.Element;
|
|
370
|
-
declare function RedirectIfAuthed({ redirectTo, loadingPlaceholder, nonAuthedPlaceholder, errorPlaceholder, authenticatedPlaceholder }: RedirectIfAuthedProps): react_jsx_runtime.JSX.Element;
|
|
372
|
+
declare function RequireAuth({ guarded, loadingPlaceholder, errorPlaceholder, unauthenticatedRedirectTo, unauthenticatedPlaceholder, }: RequireAuthProps): react_jsx_runtime.JSX.Element;
|
|
373
|
+
declare function RedirectIfAuthed({ redirectTo, loadingPlaceholder, nonAuthedPlaceholder, errorPlaceholder, authenticatedPlaceholder, }: RedirectIfAuthedProps): react_jsx_runtime.JSX.Element;
|
|
371
374
|
|
|
372
375
|
type AuthFixtures = {
|
|
373
376
|
meError?: HttpError;
|
|
@@ -394,7 +397,7 @@ declare const buttonVariants: (props?: ({
|
|
|
394
397
|
chrome?: "push" | "flat" | "inset" | "soft" | "glass" | "glow" | "hairline" | null | undefined;
|
|
395
398
|
fullWidth?: boolean | null | undefined;
|
|
396
399
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
397
|
-
interface ButtonProps extends Omit<React.ButtonHTMLAttributes<HTMLButtonElement>,
|
|
400
|
+
interface ButtonProps extends Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, 'children' | 'onClick'>, VariantProps<typeof buttonVariants> {
|
|
398
401
|
asChild?: boolean;
|
|
399
402
|
children?: React.ReactNode;
|
|
400
403
|
loading?: boolean;
|
|
@@ -402,6 +405,7 @@ interface ButtonProps extends Omit<React.ButtonHTMLAttributes<HTMLButtonElement>
|
|
|
402
405
|
rightIcon?: React.ReactNode;
|
|
403
406
|
reserveLeftIcon?: boolean;
|
|
404
407
|
reserveRightIcon?: boolean;
|
|
408
|
+
onClick?: React.MouseEventHandler<HTMLElement>;
|
|
405
409
|
}
|
|
406
410
|
declare const Button: React.ForwardRefExoticComponent<ButtonProps & React.RefAttributes<HTMLButtonElement>>;
|
|
407
411
|
|
|
@@ -410,7 +414,7 @@ type ControlLikeProps = {
|
|
|
410
414
|
disabled?: boolean;
|
|
411
415
|
required?: boolean;
|
|
412
416
|
invalid?: boolean;
|
|
413
|
-
|
|
417
|
+
'aria-describedby'?: string;
|
|
414
418
|
};
|
|
415
419
|
interface FieldProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
416
420
|
label?: React.ReactNode;
|
|
@@ -428,7 +432,7 @@ declare const controlShellVariants: (props?: ({
|
|
|
428
432
|
size?: "sm" | "md" | "lg" | null | undefined;
|
|
429
433
|
fullWidth?: boolean | null | undefined;
|
|
430
434
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
431
|
-
interface InputProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>,
|
|
435
|
+
interface InputProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'size'>, VariantProps<typeof controlShellVariants> {
|
|
432
436
|
invalid?: boolean;
|
|
433
437
|
leftSlot?: React.ReactNode;
|
|
434
438
|
rightSlot?: React.ReactNode;
|
|
@@ -438,6 +442,19 @@ interface InputProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, "
|
|
|
438
442
|
}
|
|
439
443
|
declare const Input: React.ForwardRefExoticComponent<InputProps & React.RefAttributes<HTMLInputElement>>;
|
|
440
444
|
|
|
445
|
+
declare const skeletonVariants: (props?: ({
|
|
446
|
+
variant?: "outline" | "surface" | null | undefined;
|
|
447
|
+
size?: "sm" | "md" | "lg" | null | undefined;
|
|
448
|
+
radius?: "none" | "sm" | "md" | "lg" | "full" | null | undefined;
|
|
449
|
+
fullWidth?: boolean | null | undefined;
|
|
450
|
+
animation?: "none" | "pulse" | "shimmer" | null | undefined;
|
|
451
|
+
preset?: "title" | "none" | "button" | "avatar" | "card" | null | undefined;
|
|
452
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
453
|
+
interface SkeletonProps extends React.HTMLAttributes<HTMLDivElement>, VariantProps<typeof skeletonVariants> {
|
|
454
|
+
animate?: boolean;
|
|
455
|
+
}
|
|
456
|
+
declare const Skeleton: React.ForwardRefExoticComponent<SkeletonProps & React.RefAttributes<HTMLDivElement>>;
|
|
457
|
+
|
|
441
458
|
declare const textareaShellVariants: (props?: ({
|
|
442
459
|
variant?: "outline" | "ghost" | "surface" | null | undefined;
|
|
443
460
|
size?: "sm" | "md" | "lg" | null | undefined;
|
|
@@ -447,7 +464,8 @@ interface TextareaProps extends React.TextareaHTMLAttributes<HTMLTextAreaElement
|
|
|
447
464
|
invalid?: boolean;
|
|
448
465
|
textareaClassName?: string;
|
|
449
466
|
autoResize?: boolean;
|
|
467
|
+
maxHeightPx?: number;
|
|
450
468
|
}
|
|
451
469
|
declare const Textarea: React.ForwardRefExoticComponent<TextareaProps & React.RefAttributes<HTMLTextAreaElement>>;
|
|
452
470
|
|
|
453
|
-
export { AuthController, AuthControllerCtx, type AuthControllerDeps, AuthControllerProvider, AuthDispatchCtx, AuthProvider, type AuthState, AuthStateCtx, Button, type ButtonProps, type CacheInstruction, type CustomInstruction, DEFAULT_NOTIFICATION_CHANNEL, type ErrorResponse, Field, type FieldProps, type GenericResponse, type HttpClient, HttpError, type HttpMethod, type HttpResponse, Input, type InputProps, type Instruction, type InstructionContext, MockAuthHttpClient, MockHttpClient, type MutationFn, type Notification, type NotificationAction, NotificationHost, type NotificationInstruction, type NotificationVariant, NotifierController, type OnSuccessFn, type OptimisticSnapshot, type OptimisticUpdateFn, RedirectIfAuthed, type RedirectIfAuthedProps, type RequestConfig, RequireAuth, type RequireAuthProps, type ResolvedToastTheme, type ResponsiveMutation, Textarea, type TextareaProps, type ToastActionTheme, type ToastTheme, type ToastTransition, type ToastifyCSSVars, type UIFail, type UIOk, type UIResult, type User, authController, controllerFactory, createAuthController, httpClient as fetchHttpClient, notifierController, resolveToastTheme, ui, useAuth, useAuthActions, useAuthController, useAuthDispatch, useAuthedUser, useResponsiveMutation };
|
|
471
|
+
export { AuthController, AuthControllerCtx, type AuthControllerDeps, AuthControllerProvider, AuthDispatchCtx, AuthProvider, type AuthState, AuthStateCtx, Button, type ButtonProps, type CacheInstruction, type CustomInstruction, DEFAULT_NOTIFICATION_CHANNEL, type ErrorResponse, Field, type FieldProps, type GenericResponse, type HttpClient, HttpError, type HttpMethod, type HttpResponse, Input, type InputProps, type Instruction, type InstructionContext, MockAuthHttpClient, MockHttpClient, type MutationFn, type Notification, type NotificationAction, NotificationHost, type NotificationInstruction, type NotificationVariant, NotifierController, type OnSuccessFn, type OptimisticSnapshot, type OptimisticUpdateFn, RedirectIfAuthed, type RedirectIfAuthedProps, type RequestConfig, RequireAuth, type RequireAuthProps, type ResolvedToastTheme, type ResponsiveMutation, Skeleton, type SkeletonProps, Textarea, type TextareaProps, type ToastActionTheme, type ToastTheme, type ToastTransition, type ToastifyCSSVars, type UIFail, type UIOk, type UIResult, type User, authController, controllerFactory, createAuthController, httpClient as fetchHttpClient, notifierController, resolveToastTheme, ui, useAuth, useAuthActions, useAuthController, useAuthDispatch, useAuthedUser, useResponsiveMutation };
|