@btst/stack 3.0.2 → 3.1.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.
Files changed (76) hide show
  1. package/dist/context/index.d.cts +3 -1
  2. package/dist/context/index.d.mts +3 -1
  3. package/dist/context/index.d.ts +3 -1
  4. package/dist/packages/stack/src/context/auth.cjs +20 -14
  5. package/dist/packages/stack/src/context/auth.mjs +20 -14
  6. package/dist/packages/stack/src/context/provider.cjs +42 -22
  7. package/dist/packages/stack/src/context/provider.mjs +43 -23
  8. package/dist/packages/stack/src/plugins/blog/client/components/pages/home-page.cjs +32 -28
  9. package/dist/packages/stack/src/plugins/blog/client/components/pages/home-page.mjs +32 -29
  10. package/dist/packages/stack/src/plugins/blog/client/components/pages/post-page.cjs +53 -47
  11. package/dist/packages/stack/src/plugins/blog/client/components/pages/post-page.mjs +53 -48
  12. package/dist/packages/stack/src/plugins/blog/client/components/pages/tag-page.cjs +30 -24
  13. package/dist/packages/stack/src/plugins/blog/client/components/pages/tag-page.mjs +30 -25
  14. package/dist/plugins/blog/api/index.d.cts +2 -2
  15. package/dist/plugins/blog/api/index.d.mts +2 -2
  16. package/dist/plugins/blog/api/index.d.ts +2 -2
  17. package/dist/plugins/blog/client/components/index.d.cts +6 -10
  18. package/dist/plugins/blog/client/components/index.d.mts +6 -10
  19. package/dist/plugins/blog/client/components/index.d.ts +6 -10
  20. package/dist/plugins/blog/client/hooks/index.d.cts +2 -2
  21. package/dist/plugins/blog/client/hooks/index.d.mts +2 -2
  22. package/dist/plugins/blog/client/hooks/index.d.ts +2 -2
  23. package/dist/plugins/blog/client/index.d.cts +2 -2
  24. package/dist/plugins/blog/client/index.d.mts +2 -2
  25. package/dist/plugins/blog/client/index.d.ts +2 -2
  26. package/dist/plugins/blog/client/pages/post.cjs +9 -0
  27. package/dist/plugins/blog/client/pages/post.d.cts +8 -0
  28. package/dist/plugins/blog/client/pages/post.d.mts +8 -0
  29. package/dist/plugins/blog/client/pages/post.d.ts +8 -0
  30. package/dist/plugins/blog/client/pages/post.mjs +7 -0
  31. package/dist/plugins/blog/client/pages/posts.cjs +9 -0
  32. package/dist/plugins/blog/client/pages/posts.d.cts +8 -0
  33. package/dist/plugins/blog/client/pages/posts.d.mts +8 -0
  34. package/dist/plugins/blog/client/pages/posts.d.ts +8 -0
  35. package/dist/plugins/blog/client/pages/posts.mjs +7 -0
  36. package/dist/plugins/blog/client/pages/tag.cjs +9 -0
  37. package/dist/plugins/blog/client/pages/tag.d.cts +8 -0
  38. package/dist/plugins/blog/client/pages/tag.d.mts +8 -0
  39. package/dist/plugins/blog/client/pages/tag.d.ts +8 -0
  40. package/dist/plugins/blog/client/pages/tag.mjs +7 -0
  41. package/dist/plugins/blog/query-keys.d.cts +2 -2
  42. package/dist/plugins/blog/query-keys.d.mts +2 -2
  43. package/dist/plugins/blog/query-keys.d.ts +2 -2
  44. package/dist/plugins/form-builder/api/index.d.cts +1 -1
  45. package/dist/plugins/form-builder/api/index.d.mts +1 -1
  46. package/dist/plugins/form-builder/api/index.d.ts +1 -1
  47. package/dist/plugins/form-builder/client/hooks/index.d.cts +1 -1
  48. package/dist/plugins/form-builder/client/hooks/index.d.mts +1 -1
  49. package/dist/plugins/form-builder/client/hooks/index.d.ts +1 -1
  50. package/dist/plugins/form-builder/query-keys.d.cts +1 -1
  51. package/dist/plugins/form-builder/query-keys.d.mts +1 -1
  52. package/dist/plugins/form-builder/query-keys.d.ts +1 -1
  53. package/dist/shared/{stack.BTStHVTy.d.cts → stack.BGzgFx3R.d.cts} +5 -5
  54. package/dist/shared/{stack.94kN3pEK.d.mts → stack.CjCSDfWy.d.mts} +5 -5
  55. package/dist/shared/{stack.lPKwd_v0.d.ts → stack.Clil75lW.d.ts} +37 -37
  56. package/dist/shared/{stack.CtrnoQgH.d.cts → stack.DNw6Hv5o.d.cts} +37 -37
  57. package/dist/shared/{stack.BggTHKlo.d.mts → stack.DhZtP2JZ.d.mts} +37 -37
  58. package/dist/shared/{stack.DfrRYOIl.d.ts → stack.Dpg_JjIo.d.ts} +5 -5
  59. package/package.json +41 -2
  60. package/src/__tests__/provider-hydration.test.tsx +164 -0
  61. package/src/context/auth.tsx +21 -14
  62. package/src/context/provider.tsx +51 -28
  63. package/src/plugins/blog/__tests__/page-load-error.test.tsx +53 -0
  64. package/src/plugins/blog/__tests__/page-loading.test.tsx +106 -0
  65. package/src/plugins/blog/client/components/pages/home-page.tsx +39 -35
  66. package/src/plugins/blog/client/components/pages/post-page.tsx +62 -54
  67. package/src/plugins/blog/client/components/pages/tag-page.tsx +35 -29
  68. package/src/plugins/blog/client/pages/post.tsx +7 -0
  69. package/src/plugins/blog/client/pages/posts.tsx +7 -0
  70. package/src/plugins/blog/client/pages/tag.tsx +7 -0
  71. package/dist/shared/{stack.D20bOqfr.d.ts → stack.BuxUQqL8.d.ts} +20 -20
  72. package/dist/shared/{stack.AWSs6TXN.d.cts → stack.CX83YNuS.d.cts} +20 -20
  73. package/dist/shared/{stack.CKc_Bais.d.cts → stack.Csi-4Mgz.d.cts} +7 -7
  74. package/dist/shared/{stack.CKc_Bais.d.mts → stack.Csi-4Mgz.d.mts} +7 -7
  75. package/dist/shared/{stack.CKc_Bais.d.ts → stack.Csi-4Mgz.d.ts} +7 -7
  76. package/dist/shared/{stack.HB5uGLpE.d.mts → stack.Egr3RWhA.d.mts} +20 -20
@@ -1,6 +1,13 @@
1
1
  import { z } from 'zod';
2
2
 
3
3
  declare const createPostSchema: z.ZodObject<{
4
+ tags: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
5
+ name: z.ZodString;
6
+ }, z.core.$strip>, z.ZodObject<{
7
+ id: z.ZodString;
8
+ name: z.ZodString;
9
+ slug: z.ZodString;
10
+ }, z.core.$strip>]>>>>;
4
11
  slug: z.ZodOptional<z.ZodString>;
5
12
  publishedAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
6
13
  createdAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
@@ -10,13 +17,6 @@ declare const createPostSchema: z.ZodObject<{
10
17
  excerpt: z.ZodString;
11
18
  image: z.ZodOptional<z.ZodString>;
12
19
  published: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
13
- tags: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
14
- name: z.ZodString;
15
- }, z.core.$strip>, z.ZodObject<{
16
- id: z.ZodString;
17
- name: z.ZodString;
18
- slug: z.ZodString;
19
- }, z.core.$strip>]>>>>;
20
20
  }, z.core.$strip>;
21
21
  declare const updatePostSchema: z.ZodObject<{
22
22
  publishedAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
@@ -1,6 +1,13 @@
1
1
  import { z } from 'zod';
2
2
 
3
3
  declare const createPostSchema: z.ZodObject<{
4
+ tags: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
5
+ name: z.ZodString;
6
+ }, z.core.$strip>, z.ZodObject<{
7
+ id: z.ZodString;
8
+ name: z.ZodString;
9
+ slug: z.ZodString;
10
+ }, z.core.$strip>]>>>>;
4
11
  slug: z.ZodOptional<z.ZodString>;
5
12
  publishedAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
6
13
  createdAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
@@ -10,13 +17,6 @@ declare const createPostSchema: z.ZodObject<{
10
17
  excerpt: z.ZodString;
11
18
  image: z.ZodOptional<z.ZodString>;
12
19
  published: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
13
- tags: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
14
- name: z.ZodString;
15
- }, z.core.$strip>, z.ZodObject<{
16
- id: z.ZodString;
17
- name: z.ZodString;
18
- slug: z.ZodString;
19
- }, z.core.$strip>]>>>>;
20
20
  }, z.core.$strip>;
21
21
  declare const updatePostSchema: z.ZodObject<{
22
22
  publishedAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
@@ -127,11 +127,11 @@ declare const formBuilderBackendPlugin: (config?: FormBuilderBackendConfig) => _
127
127
  readonly status: Form["status"];
128
128
  readonly createdAt: string;
129
129
  readonly updatedAt: string;
130
- readonly slug: string;
130
+ readonly schema: string;
131
131
  readonly id: string;
132
- readonly name: string;
133
132
  readonly description?: string | undefined;
134
- readonly schema: string;
133
+ readonly slug: string;
134
+ readonly name: string;
135
135
  readonly successMessage?: string | undefined;
136
136
  readonly redirectUrl?: string | undefined;
137
137
  readonly createdBy?: string | undefined;
@@ -151,11 +151,11 @@ declare const formBuilderBackendPlugin: (config?: FormBuilderBackendConfig) => _
151
151
  readonly status: Form["status"];
152
152
  readonly createdAt: string;
153
153
  readonly updatedAt: string;
154
- readonly slug: string;
154
+ readonly schema: string;
155
155
  readonly id: string;
156
- readonly name: string;
157
156
  readonly description?: string | undefined;
158
- readonly schema: string;
157
+ readonly slug: string;
158
+ readonly name: string;
159
159
  readonly successMessage?: string | undefined;
160
160
  readonly redirectUrl?: string | undefined;
161
161
  readonly createdBy?: string | undefined;
@@ -171,11 +171,11 @@ declare const formBuilderBackendPlugin: (config?: FormBuilderBackendConfig) => _
171
171
  readonly status: Form["status"];
172
172
  readonly createdAt: string;
173
173
  readonly updatedAt: string;
174
- readonly slug: string;
174
+ readonly schema: string;
175
175
  readonly id: string;
176
- readonly name: string;
177
176
  readonly description?: string | undefined;
178
- readonly schema: string;
177
+ readonly slug: string;
178
+ readonly name: string;
179
179
  readonly successMessage?: string | undefined;
180
180
  readonly redirectUrl?: string | undefined;
181
181
  readonly createdBy?: string | undefined;
@@ -191,11 +191,11 @@ declare const formBuilderBackendPlugin: (config?: FormBuilderBackendConfig) => _
191
191
  readonly status: Form["status"];
192
192
  readonly createdAt: string;
193
193
  readonly updatedAt: string;
194
- readonly slug: string;
194
+ readonly schema: string;
195
195
  readonly id: string;
196
- readonly name: string;
197
196
  readonly description?: string | undefined;
198
- readonly schema: string;
197
+ readonly slug: string;
198
+ readonly name: string;
199
199
  readonly successMessage?: string | undefined;
200
200
  readonly redirectUrl?: string | undefined;
201
201
  readonly createdBy?: string | undefined;
@@ -225,11 +225,11 @@ declare const formBuilderBackendPlugin: (config?: FormBuilderBackendConfig) => _
225
225
  readonly status: Form["status"];
226
226
  readonly createdAt: string;
227
227
  readonly updatedAt: string;
228
- readonly slug: string;
228
+ readonly schema: string;
229
229
  readonly id: string;
230
- readonly name: string;
231
230
  readonly description?: string | undefined;
232
- readonly schema: string;
231
+ readonly slug: string;
232
+ readonly name: string;
233
233
  readonly successMessage?: string | undefined;
234
234
  readonly redirectUrl?: string | undefined;
235
235
  readonly createdBy?: string | undefined;
@@ -259,11 +259,11 @@ declare const formBuilderBackendPlugin: (config?: FormBuilderBackendConfig) => _
259
259
  readonly status: Form["status"];
260
260
  readonly createdAt: string;
261
261
  readonly updatedAt: string;
262
- readonly slug: string;
262
+ readonly schema: string;
263
263
  readonly id: string;
264
- readonly name: string;
265
264
  readonly description?: string | undefined;
266
- readonly schema: string;
265
+ readonly slug: string;
266
+ readonly name: string;
267
267
  readonly successMessage?: string | undefined;
268
268
  readonly redirectUrl?: string | undefined;
269
269
  readonly createdBy?: string | undefined;
@@ -291,10 +291,10 @@ declare const formBuilderBackendPlugin: (config?: FormBuilderBackendConfig) => _
291
291
  readonly redirectUrl?: string | undefined;
292
292
  };
293
293
  readonly submittedAt: string;
294
- readonly data: string;
295
294
  readonly id: string;
296
295
  readonly formId: string;
297
296
  readonly submittedBy?: string | undefined;
297
+ readonly data: string;
298
298
  readonly ipAddress?: string | undefined;
299
299
  readonly userAgent?: string | undefined;
300
300
  }>;
@@ -335,10 +335,10 @@ declare const formBuilderBackendPlugin: (config?: FormBuilderBackendConfig) => _
335
335
  readonly [x: string]: any;
336
336
  } | null;
337
337
  readonly submittedAt: string;
338
- readonly data: string;
339
338
  readonly id: string;
340
339
  readonly formId: string;
341
340
  readonly submittedBy?: string | undefined;
341
+ readonly data: string;
342
342
  readonly ipAddress?: string | undefined;
343
343
  readonly userAgent?: string | undefined;
344
344
  }>;