react-toolkits 2.9.26 → 2.9.28

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/CHANGELOG.md CHANGED
@@ -1,5 +1,21 @@
1
1
  # react-toolkits
2
2
 
3
+ ## 2.9.28
4
+
5
+ ### Patch Changes
6
+
7
+ - 48dbace: fix: response may be not a json
8
+
9
+ ## 2.9.27
10
+
11
+ ### Patch Changes
12
+
13
+ - b5384d7: feat: parse error message when http code out of 2xx range
14
+
15
+ ```
16
+
17
+ ```
18
+
3
19
  ## 2.9.26
4
20
 
5
21
  ### Patch Changes
package/lib/index.css CHANGED
@@ -1,311 +1 @@
1
- /* src/styles/index.css */
2
- *,
3
- ::before,
4
- ::after {
5
- --tw-border-spacing-x: 0;
6
- --tw-border-spacing-y: 0;
7
- --tw-translate-x: 0;
8
- --tw-translate-y: 0;
9
- --tw-rotate: 0;
10
- --tw-skew-x: 0;
11
- --tw-skew-y: 0;
12
- --tw-scale-x: 1;
13
- --tw-scale-y: 1;
14
- --tw-pan-x: ;
15
- --tw-pan-y: ;
16
- --tw-pinch-zoom: ;
17
- --tw-scroll-snap-strictness: proximity;
18
- --tw-gradient-from-position: ;
19
- --tw-gradient-via-position: ;
20
- --tw-gradient-to-position: ;
21
- --tw-ordinal: ;
22
- --tw-slashed-zero: ;
23
- --tw-numeric-figure: ;
24
- --tw-numeric-spacing: ;
25
- --tw-numeric-fraction: ;
26
- --tw-ring-inset: ;
27
- --tw-ring-offset-width: 0px;
28
- --tw-ring-offset-color: #fff;
29
- --tw-ring-color: rgb(59 130 246 / 0.5);
30
- --tw-ring-offset-shadow: 0 0 #0000;
31
- --tw-ring-shadow: 0 0 #0000;
32
- --tw-shadow: 0 0 #0000;
33
- --tw-shadow-colored: 0 0 #0000;
34
- --tw-blur: ;
35
- --tw-brightness: ;
36
- --tw-contrast: ;
37
- --tw-grayscale: ;
38
- --tw-hue-rotate: ;
39
- --tw-invert: ;
40
- --tw-saturate: ;
41
- --tw-sepia: ;
42
- --tw-drop-shadow: ;
43
- --tw-backdrop-blur: ;
44
- --tw-backdrop-brightness: ;
45
- --tw-backdrop-contrast: ;
46
- --tw-backdrop-grayscale: ;
47
- --tw-backdrop-hue-rotate: ;
48
- --tw-backdrop-invert: ;
49
- --tw-backdrop-opacity: ;
50
- --tw-backdrop-saturate: ;
51
- --tw-backdrop-sepia: ;
52
- --tw-contain-size: ;
53
- --tw-contain-layout: ;
54
- --tw-contain-paint: ;
55
- --tw-contain-style: ;
56
- }
57
- ::backdrop {
58
- --tw-border-spacing-x: 0;
59
- --tw-border-spacing-y: 0;
60
- --tw-translate-x: 0;
61
- --tw-translate-y: 0;
62
- --tw-rotate: 0;
63
- --tw-skew-x: 0;
64
- --tw-skew-y: 0;
65
- --tw-scale-x: 1;
66
- --tw-scale-y: 1;
67
- --tw-pan-x: ;
68
- --tw-pan-y: ;
69
- --tw-pinch-zoom: ;
70
- --tw-scroll-snap-strictness: proximity;
71
- --tw-gradient-from-position: ;
72
- --tw-gradient-via-position: ;
73
- --tw-gradient-to-position: ;
74
- --tw-ordinal: ;
75
- --tw-slashed-zero: ;
76
- --tw-numeric-figure: ;
77
- --tw-numeric-spacing: ;
78
- --tw-numeric-fraction: ;
79
- --tw-ring-inset: ;
80
- --tw-ring-offset-width: 0px;
81
- --tw-ring-offset-color: #fff;
82
- --tw-ring-color: rgb(59 130 246 / 0.5);
83
- --tw-ring-offset-shadow: 0 0 #0000;
84
- --tw-ring-shadow: 0 0 #0000;
85
- --tw-shadow: 0 0 #0000;
86
- --tw-shadow-colored: 0 0 #0000;
87
- --tw-blur: ;
88
- --tw-brightness: ;
89
- --tw-contrast: ;
90
- --tw-grayscale: ;
91
- --tw-hue-rotate: ;
92
- --tw-invert: ;
93
- --tw-saturate: ;
94
- --tw-sepia: ;
95
- --tw-drop-shadow: ;
96
- --tw-backdrop-blur: ;
97
- --tw-backdrop-brightness: ;
98
- --tw-backdrop-contrast: ;
99
- --tw-backdrop-grayscale: ;
100
- --tw-backdrop-hue-rotate: ;
101
- --tw-backdrop-invert: ;
102
- --tw-backdrop-opacity: ;
103
- --tw-backdrop-saturate: ;
104
- --tw-backdrop-sepia: ;
105
- --tw-contain-size: ;
106
- --tw-contain-layout: ;
107
- --tw-contain-paint: ;
108
- --tw-contain-style: ;
109
- }
110
- .container {
111
- width: 100%;
112
- }
113
- @media (min-width: 640px) {
114
- .container {
115
- max-width: 640px;
116
- }
117
- }
118
- @media (min-width: 768px) {
119
- .container {
120
- max-width: 768px;
121
- }
122
- }
123
- @media (min-width: 1024px) {
124
- .container {
125
- max-width: 1024px;
126
- }
127
- }
128
- @media (min-width: 1280px) {
129
- .container {
130
- max-width: 1280px;
131
- }
132
- }
133
- @media (min-width: 1536px) {
134
- .container {
135
- max-width: 1536px;
136
- }
137
- }
138
- .fixed {
139
- position: fixed;
140
- }
141
- .absolute {
142
- position: absolute;
143
- }
144
- .relative {
145
- position: relative;
146
- }
147
- .bottom-0 {
148
- bottom: 0px;
149
- }
150
- .left-0 {
151
- left: 0px;
152
- }
153
- .left-14 {
154
- left: 3.5rem;
155
- }
156
- .right-0 {
157
- right: 0px;
158
- }
159
- .right-16 {
160
- right: 4rem;
161
- }
162
- .top-0 {
163
- top: 0px;
164
- }
165
- .top-1\/2 {
166
- top: 50%;
167
- }
168
- .top-16 {
169
- top: 4rem;
170
- }
171
- .top-6 {
172
- top: 1.5rem;
173
- }
174
- .z-10 {
175
- z-index: 10;
176
- }
177
- .my-12 {
178
- margin-top: 3rem;
179
- margin-bottom: 3rem;
180
- }
181
- .mb-0 {
182
- margin-bottom: 0px;
183
- }
184
- .mb-12 {
185
- margin-bottom: 3rem;
186
- }
187
- .mb-6 {
188
- margin-bottom: 1.5rem;
189
- }
190
- .ml-4 {
191
- margin-left: 1rem;
192
- }
193
- .mr-6 {
194
- margin-right: 1.5rem;
195
- }
196
- .mt-4 {
197
- margin-top: 1rem;
198
- }
199
- .block {
200
- display: block;
201
- }
202
- .inline {
203
- display: inline;
204
- }
205
- .flex {
206
- display: flex;
207
- }
208
- .h-10 {
209
- height: 2.5rem;
210
- }
211
- .h-8 {
212
- height: 2rem;
213
- }
214
- .h-full {
215
- height: 100%;
216
- }
217
- .h-screen {
218
- height: 100vh;
219
- }
220
- .w-10\/12 {
221
- width: 83.333333%;
222
- }
223
- .w-\[650px\] {
224
- width: 650px;
225
- }
226
- .w-full {
227
- width: 100%;
228
- }
229
- .w-screen {
230
- width: 100vw;
231
- }
232
- .flex-1 {
233
- flex: 1 1 0%;
234
- }
235
- .flex-grow-0 {
236
- flex-grow: 0;
237
- }
238
- .-translate-y-1\/2 {
239
- --tw-translate-y: -50%;
240
- transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
241
- }
242
- .-translate-y-10 {
243
- --tw-translate-y: -2.5rem;
244
- transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
245
- }
246
- .flex-row {
247
- flex-direction: row;
248
- }
249
- .flex-col {
250
- flex-direction: column;
251
- }
252
- .items-center {
253
- align-items: center;
254
- }
255
- .justify-center {
256
- justify-content: center;
257
- }
258
- .justify-between {
259
- justify-content: space-between;
260
- }
261
- .gap-2 {
262
- gap: 0.5rem;
263
- }
264
- .overflow-hidden {
265
- overflow: hidden;
266
- }
267
- .bg-slate-50 {
268
- --tw-bg-opacity: 1;
269
- background-color: rgb(248 250 252 / var(--tw-bg-opacity));
270
- }
271
- .px-36 {
272
- padding-left: 9rem;
273
- padding-right: 9rem;
274
- }
275
- .px-6 {
276
- padding-left: 1.5rem;
277
- padding-right: 1.5rem;
278
- }
279
- .py-4 {
280
- padding-top: 1rem;
281
- padding-bottom: 1rem;
282
- }
283
- .text-start {
284
- text-align: start;
285
- }
286
- .text-end {
287
- text-align: end;
288
- }
289
- .filter {
290
- filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow);
291
- }
292
-
293
- /* src/components/layout/style.css */
294
- .expand {
295
- animation-duration: 0.2s;
296
- animation-name: expand;
297
- }
298
- @keyframes expand {
299
- 0%, 50% {
300
- width: 0;
301
- opacity: 0;
302
- }
303
- 75% {
304
- width: 100%;
305
- opacity: 0;
306
- }
307
- 100% {
308
- opacity: 1;
309
- }
310
- }
311
- /*# sourceMappingURL=index.css.map */
1
+ *,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }.container{width:100%}@media (min-width: 640px){.container{max-width:640px}}@media (min-width: 768px){.container{max-width:768px}}@media (min-width: 1024px){.container{max-width:1024px}}@media (min-width: 1280px){.container{max-width:1280px}}@media (min-width: 1536px){.container{max-width:1536px}}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.bottom-0{bottom:0}.left-0{left:0}.left-14{left:3.5rem}.right-0{right:0}.right-16{right:4rem}.top-0{top:0}.top-1\/2{top:50%}.top-16{top:4rem}.top-6{top:1.5rem}.z-10{z-index:10}.my-12{margin-top:3rem;margin-bottom:3rem}.mb-0{margin-bottom:0}.mb-12{margin-bottom:3rem}.mb-6{margin-bottom:1.5rem}.ml-4{margin-left:1rem}.mr-6{margin-right:1.5rem}.mt-4{margin-top:1rem}.block{display:block}.inline{display:inline}.flex{display:flex}.h-10{height:2.5rem}.h-8{height:2rem}.h-full{height:100%}.h-screen{height:100vh}.w-10\/12{width:83.333333%}.w-\[650px\]{width:650px}.w-full{width:100%}.w-screen{width:100vw}.flex-1{flex:1 1 0%}.flex-grow-0{flex-grow:0}.-translate-y-1\/2{--tw-translate-y: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-translate-y-10{--tw-translate-y: -2.5rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.flex-row{flex-direction:row}.flex-col{flex-direction:column}.items-center{align-items:center}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-2{gap:.5rem}.overflow-hidden{overflow:hidden}.bg-slate-50{--tw-bg-opacity: 1;background-color:rgb(248 250 252 / var(--tw-bg-opacity))}.px-36{padding-left:9rem;padding-right:9rem}.px-6{padding-left:1.5rem;padding-right:1.5rem}.py-4{padding-top:1rem;padding-bottom:1rem}.text-start{text-align:start}.text-end{text-align:end}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.expand{animation-duration:.2s;animation-name:expand}@keyframes expand{0%,50%{width:0;opacity:0}75%{width:100%;opacity:0}to{opacity:1}}
package/lib/index.d.ts CHANGED
@@ -445,9 +445,7 @@ declare const useTokenStore: zustand.UseBoundStore<Omit<zustand.StoreApi<TokenSt
445
445
  }>>;
446
446
  };
447
447
  }>;
448
- declare function useTokenValidation(options?: {
449
- skip: false;
450
- }): swr.SWRResponse<RequestResponse<any>, any, any>;
448
+ declare function useTestToken(): swr.SWRResponse<RequestResponse<any>, any, any>;
451
449
 
452
450
  interface NotFoundProps {
453
451
  redirectUrl?: string;
@@ -468,4 +466,4 @@ declare const SignIn: FC<SignInProps>;
468
466
 
469
467
  declare const mixedStorage: StateStorage;
470
468
 
471
- export { APP_ID_HEADER_NAME, ContextProvider, type ContextState, DynamicTags, type DynamicTagsProps, ExpandableParagraph, type ExpandableParagraphProps, FilterFormWrapper, type FilterFormWrapperProps, type Game, Highlight, type HighlightProps, InfiniteList, type InfiniteListProps, Layout, type LayoutState, NavMenu, type NavMenuItem, NotFound, OperationLogList, PermissionButton, type PermissionButtonProps, QueryList, QueryListAction, type QueryListProps, type QueryListRef, RequestError, type RequestOptions, type RequestResponse, RequireGame, RequirePermission, type RequirePermissionProps, SSO_URL, SignIn, type TokenState, type UseFormModalProps, type UseModalOperation, type UseModalProps, UserWidget, type UserWidgetProps, contextStore, mixedStorage, _default as permissionRoutes, request, useFormModal, useGameStore, useLayoutStore, useModal, useModalStore, usePermission, usePermissions, useQueryListStore, useTokenStore, useTokenValidation, useToolkitsContext };
469
+ export { APP_ID_HEADER_NAME, ContextProvider, type ContextState, DynamicTags, type DynamicTagsProps, ExpandableParagraph, type ExpandableParagraphProps, FilterFormWrapper, type FilterFormWrapperProps, type Game, Highlight, type HighlightProps, InfiniteList, type InfiniteListProps, Layout, type LayoutState, NavMenu, type NavMenuItem, NotFound, OperationLogList, PermissionButton, type PermissionButtonProps, QueryList, QueryListAction, type QueryListProps, type QueryListRef, RequestError, type RequestOptions, type RequestResponse, RequireGame, RequirePermission, type RequirePermissionProps, SSO_URL, SignIn, type TokenState, type UseFormModalProps, type UseModalOperation, type UseModalProps, UserWidget, type UserWidgetProps, contextStore, mixedStorage, _default as permissionRoutes, request, useFormModal, useGameStore, useLayoutStore, useModal, useModalStore, usePermission, usePermissions, useQueryListStore, useTestToken, useTokenStore, useToolkitsContext };