@farcaster/snap 1.5.1 → 2.0.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 (156) hide show
  1. package/dist/constants.d.ts +0 -107
  2. package/dist/constants.js +0 -148
  3. package/dist/dataStore.d.ts +12 -0
  4. package/dist/dataStore.js +35 -0
  5. package/dist/index.d.ts +6 -3
  6. package/dist/index.js +5 -3
  7. package/dist/middleware.d.ts +3 -0
  8. package/dist/middleware.js +3 -0
  9. package/dist/react/accent-context.d.ts +6 -0
  10. package/dist/react/accent-context.js +10 -0
  11. package/dist/react/catalog-renderer.d.ts +5 -0
  12. package/dist/react/catalog-renderer.js +37 -0
  13. package/dist/react/components/action-button.d.ts +6 -0
  14. package/dist/react/components/action-button.js +22 -0
  15. package/dist/react/components/badge.d.ts +5 -0
  16. package/dist/react/components/badge.js +18 -0
  17. package/dist/react/components/icon.d.ts +7 -0
  18. package/dist/react/components/icon.js +60 -0
  19. package/dist/react/components/image.d.ts +5 -0
  20. package/dist/react/components/image.js +15 -0
  21. package/dist/react/components/input.d.ts +5 -0
  22. package/dist/react/components/input.js +18 -0
  23. package/dist/react/components/item-group.d.ts +7 -0
  24. package/dist/react/components/item-group.js +17 -0
  25. package/dist/react/components/item.d.ts +7 -0
  26. package/dist/react/components/item.js +9 -0
  27. package/dist/react/components/progress.d.ts +5 -0
  28. package/dist/react/components/progress.js +11 -0
  29. package/dist/react/components/separator.d.ts +5 -0
  30. package/dist/react/components/separator.js +7 -0
  31. package/dist/react/components/slider.d.ts +5 -0
  32. package/dist/react/components/slider.js +21 -0
  33. package/dist/react/components/stack.d.ts +7 -0
  34. package/dist/react/components/stack.js +32 -0
  35. package/dist/react/components/switch.d.ts +5 -0
  36. package/dist/react/components/switch.js +23 -0
  37. package/dist/react/components/text.d.ts +5 -0
  38. package/dist/react/components/text.js +25 -0
  39. package/dist/react/components/toggle-group.d.ts +5 -0
  40. package/dist/react/components/toggle-group.js +52 -0
  41. package/dist/react/hooks/use-snap-accent.d.ts +13 -0
  42. package/dist/react/hooks/use-snap-accent.js +32 -0
  43. package/dist/react/index.d.ts +47 -0
  44. package/dist/react/index.js +191 -0
  45. package/dist/react/lib/preview-primary-css.d.ts +6 -0
  46. package/dist/react/lib/preview-primary-css.js +43 -0
  47. package/dist/react/lib/resolve-palette-hex.d.ts +2 -0
  48. package/dist/react/lib/resolve-palette-hex.js +10 -0
  49. package/dist/schemas.d.ts +14 -1629
  50. package/dist/schemas.js +14 -526
  51. package/dist/ui/badge.d.ts +52 -0
  52. package/dist/ui/badge.js +9 -0
  53. package/dist/ui/button.d.ts +42 -28
  54. package/dist/ui/button.js +7 -9
  55. package/dist/ui/catalog.d.ts +280 -155
  56. package/dist/ui/catalog.js +102 -83
  57. package/dist/ui/icon.d.ts +56 -0
  58. package/dist/ui/icon.js +51 -0
  59. package/dist/ui/image.d.ts +1 -0
  60. package/dist/ui/image.js +2 -2
  61. package/dist/ui/index.d.ts +20 -22
  62. package/dist/ui/index.js +10 -11
  63. package/dist/ui/input.d.ts +17 -0
  64. package/dist/ui/input.js +13 -0
  65. package/dist/ui/item-group.d.ts +12 -0
  66. package/dist/ui/item-group.js +7 -0
  67. package/dist/ui/item.d.ts +14 -0
  68. package/dist/ui/item.js +9 -0
  69. package/dist/ui/progress.d.ts +1 -11
  70. package/dist/ui/progress.js +21 -4
  71. package/dist/ui/schema.js +3 -3
  72. package/dist/ui/separator.d.ts +9 -0
  73. package/dist/ui/separator.js +5 -0
  74. package/dist/ui/slider.d.ts +4 -3
  75. package/dist/ui/slider.js +34 -5
  76. package/dist/ui/stack.d.ts +22 -1
  77. package/dist/ui/stack.js +8 -1
  78. package/dist/ui/switch.d.ts +8 -0
  79. package/dist/ui/switch.js +7 -0
  80. package/dist/ui/text.d.ts +15 -7
  81. package/dist/ui/text.js +8 -4
  82. package/dist/ui/toggle-group.d.ts +23 -0
  83. package/dist/ui/toggle-group.js +19 -0
  84. package/dist/validator.d.ts +5 -1
  85. package/dist/validator.js +6 -136
  86. package/package.json +72 -52
  87. package/src/constants.ts +0 -179
  88. package/src/dataStore.ts +62 -0
  89. package/src/index.ts +11 -20
  90. package/src/middleware.ts +7 -0
  91. package/src/react/accent-context.tsx +29 -0
  92. package/src/react/catalog-renderer.tsx +39 -0
  93. package/src/react/components/action-button.tsx +48 -0
  94. package/src/react/components/badge.tsx +37 -0
  95. package/src/react/components/icon.tsx +115 -0
  96. package/src/react/components/image.tsx +33 -0
  97. package/src/react/components/input.tsx +36 -0
  98. package/src/react/components/item-group.tsx +43 -0
  99. package/src/react/components/item.tsx +33 -0
  100. package/src/react/components/progress.tsx +29 -0
  101. package/src/react/components/separator.tsx +14 -0
  102. package/src/react/components/slider.tsx +43 -0
  103. package/src/react/components/stack.tsx +55 -0
  104. package/src/react/components/switch.tsx +46 -0
  105. package/src/react/components/text.tsx +43 -0
  106. package/src/react/components/toggle-group.tsx +85 -0
  107. package/src/react/hooks/use-snap-accent.ts +45 -0
  108. package/src/react/index.tsx +321 -0
  109. package/src/react/lib/preview-primary-css.ts +57 -0
  110. package/src/react/lib/resolve-palette-hex.ts +20 -0
  111. package/src/schemas.ts +18 -644
  112. package/src/ui/badge.ts +13 -0
  113. package/src/ui/button.ts +9 -12
  114. package/src/ui/catalog.ts +106 -86
  115. package/src/ui/icon.ts +56 -0
  116. package/src/ui/image.ts +3 -2
  117. package/src/ui/index.ts +26 -29
  118. package/src/ui/input.ts +17 -0
  119. package/src/ui/item-group.ts +11 -0
  120. package/src/ui/item.ts +13 -0
  121. package/src/ui/progress.ts +25 -7
  122. package/src/ui/schema.ts +3 -3
  123. package/src/ui/separator.ts +9 -0
  124. package/src/ui/slider.ts +40 -10
  125. package/src/ui/stack.ts +9 -1
  126. package/src/ui/switch.ts +11 -0
  127. package/src/ui/text.ts +9 -4
  128. package/src/ui/toggle-group.ts +23 -0
  129. package/src/validator.ts +6 -176
  130. package/dist/ui/bar-chart.d.ts +0 -30
  131. package/dist/ui/bar-chart.js +0 -15
  132. package/dist/ui/button-group.d.ts +0 -19
  133. package/dist/ui/button-group.js +0 -18
  134. package/dist/ui/divider.d.ts +0 -3
  135. package/dist/ui/divider.js +0 -2
  136. package/dist/ui/grid.d.ts +0 -22
  137. package/dist/ui/grid.js +0 -16
  138. package/dist/ui/group.d.ts +0 -7
  139. package/dist/ui/group.js +0 -5
  140. package/dist/ui/list.d.ts +0 -13
  141. package/dist/ui/list.js +0 -13
  142. package/dist/ui/spacer.d.ts +0 -9
  143. package/dist/ui/spacer.js +0 -5
  144. package/dist/ui/text-input.d.ts +0 -7
  145. package/dist/ui/text-input.js +0 -12
  146. package/dist/ui/toggle.d.ts +0 -7
  147. package/dist/ui/toggle.js +0 -6
  148. package/src/ui/bar-chart.ts +0 -20
  149. package/src/ui/button-group.ts +0 -26
  150. package/src/ui/divider.ts +0 -5
  151. package/src/ui/grid.ts +0 -25
  152. package/src/ui/group.ts +0 -8
  153. package/src/ui/list.ts +0 -17
  154. package/src/ui/spacer.ts +0 -8
  155. package/src/ui/text-input.ts +0 -15
  156. package/src/ui/toggle.ts +0 -9
package/dist/schemas.d.ts CHANGED
@@ -1,838 +1,10 @@
1
1
  import { z } from "zod";
2
- export declare const clientActionSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
3
- type: z.ZodLiteral<"view_cast">;
4
- hash: z.ZodString;
5
- }, z.core.$strict>, z.ZodObject<{
6
- type: z.ZodLiteral<"view_profile">;
7
- fid: z.ZodNumber;
8
- }, z.core.$strict>, z.ZodObject<{
9
- type: z.ZodLiteral<"compose_cast">;
10
- text: z.ZodOptional<z.ZodString>;
11
- embeds: z.ZodOptional<z.ZodArray<z.ZodString>>;
12
- parent: z.ZodOptional<z.ZodObject<{
13
- type: z.ZodLiteral<"cast">;
14
- hash: z.ZodString;
15
- }, z.core.$strict>>;
16
- channelKey: z.ZodOptional<z.ZodString>;
17
- }, z.core.$strict>, z.ZodObject<{
18
- type: z.ZodLiteral<"view_token">;
19
- token: z.ZodString;
20
- }, z.core.$strict>, z.ZodObject<{
21
- type: z.ZodLiteral<"send_token">;
22
- token: z.ZodOptional<z.ZodString>;
23
- amount: z.ZodOptional<z.ZodString>;
24
- recipientFid: z.ZodOptional<z.ZodNumber>;
25
- recipientAddress: z.ZodOptional<z.ZodString>;
26
- }, z.core.$strict>, z.ZodObject<{
27
- type: z.ZodLiteral<"swap_token">;
28
- sellToken: z.ZodOptional<z.ZodString>;
29
- buyToken: z.ZodOptional<z.ZodString>;
30
- sellAmount: z.ZodOptional<z.ZodString>;
31
- }, z.core.$strict>], "type">;
32
- export type ClientAction = z.infer<typeof clientActionSchema>;
33
- declare const buttonSchema: z.ZodObject<{
34
- label: z.ZodString;
35
- action: z.ZodEnum<{
36
- post: "post";
37
- link: "link";
38
- mini_app: "mini_app";
39
- client: "client";
40
- }>;
41
- target: z.ZodOptional<z.ZodString>;
42
- client_action: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
43
- type: z.ZodLiteral<"view_cast">;
44
- hash: z.ZodString;
45
- }, z.core.$strict>, z.ZodObject<{
46
- type: z.ZodLiteral<"view_profile">;
47
- fid: z.ZodNumber;
48
- }, z.core.$strict>, z.ZodObject<{
49
- type: z.ZodLiteral<"compose_cast">;
50
- text: z.ZodOptional<z.ZodString>;
51
- embeds: z.ZodOptional<z.ZodArray<z.ZodString>>;
52
- parent: z.ZodOptional<z.ZodObject<{
53
- type: z.ZodLiteral<"cast">;
54
- hash: z.ZodString;
55
- }, z.core.$strict>>;
56
- channelKey: z.ZodOptional<z.ZodString>;
57
- }, z.core.$strict>, z.ZodObject<{
58
- type: z.ZodLiteral<"view_token">;
59
- token: z.ZodString;
60
- }, z.core.$strict>, z.ZodObject<{
61
- type: z.ZodLiteral<"send_token">;
62
- token: z.ZodOptional<z.ZodString>;
63
- amount: z.ZodOptional<z.ZodString>;
64
- recipientFid: z.ZodOptional<z.ZodNumber>;
65
- recipientAddress: z.ZodOptional<z.ZodString>;
66
- }, z.core.$strict>, z.ZodObject<{
67
- type: z.ZodLiteral<"swap_token">;
68
- sellToken: z.ZodOptional<z.ZodString>;
69
- buyToken: z.ZodOptional<z.ZodString>;
70
- sellAmount: z.ZodOptional<z.ZodString>;
71
- }, z.core.$strict>], "type">>;
72
- style: z.ZodOptional<z.ZodEnum<{
73
- primary: "primary";
74
- secondary: "secondary";
75
- }>>;
76
- }, z.core.$strip>;
77
- export type Button = z.infer<typeof buttonSchema>;
78
- /** Child elements allowed inside `group` (no media, no nested group) */
79
- declare const groupChildElementSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
80
- type: z.ZodLiteral<"text">;
81
- style: z.ZodEnum<{
82
- title: "title";
83
- body: "body";
84
- caption: "caption";
85
- label: "label";
86
- }>;
87
- content: z.ZodString;
88
- align: z.ZodOptional<z.ZodEnum<{
89
- left: "left";
90
- center: "center";
91
- right: "right";
92
- }>>;
93
- }, z.core.$strip>, z.ZodObject<{
94
- type: z.ZodLiteral<"divider">;
95
- }, z.core.$strip>, z.ZodObject<{
96
- type: z.ZodLiteral<"spacer">;
97
- size: z.ZodDefault<z.ZodEnum<{
98
- small: "small";
99
- medium: "medium";
100
- large: "large";
101
- }>>;
102
- }, z.core.$strip>, z.ZodObject<{
103
- type: z.ZodLiteral<"progress">;
104
- value: z.ZodNumber;
105
- max: z.ZodNumber;
106
- label: z.ZodOptional<z.ZodString>;
107
- color: z.ZodOptional<z.ZodEnum<{
108
- gray: "gray";
109
- blue: "blue";
110
- red: "red";
111
- amber: "amber";
112
- green: "green";
113
- teal: "teal";
114
- purple: "purple";
115
- pink: "pink";
116
- accent: "accent";
117
- }>>;
118
- }, z.core.$strip>, z.ZodObject<{
119
- type: z.ZodLiteral<"list">;
120
- style: z.ZodDefault<z.ZodEnum<{
121
- ordered: "ordered";
122
- unordered: "unordered";
123
- plain: "plain";
124
- }>>;
125
- items: z.ZodArray<z.ZodObject<{
126
- content: z.ZodString;
127
- trailing: z.ZodOptional<z.ZodString>;
128
- }, z.core.$strip>>;
129
- }, z.core.$strip>, z.ZodObject<{
130
- type: z.ZodLiteral<"text_input">;
131
- name: z.ZodString;
132
- placeholder: z.ZodOptional<z.ZodString>;
133
- maxLength: z.ZodOptional<z.ZodNumber>;
134
- }, z.core.$strip>, z.ZodPipe<z.ZodObject<{
135
- type: z.ZodLiteral<"slider">;
136
- name: z.ZodString;
137
- min: z.ZodNumber;
138
- max: z.ZodNumber;
139
- step: z.ZodDefault<z.ZodNumber>;
140
- value: z.ZodOptional<z.ZodNumber>;
141
- label: z.ZodOptional<z.ZodString>;
142
- minLabel: z.ZodOptional<z.ZodString>;
143
- maxLabel: z.ZodOptional<z.ZodString>;
144
- }, z.core.$strip>, z.ZodTransform<{
145
- value: number;
146
- type: "slider";
147
- name: string;
148
- min: number;
149
- max: number;
150
- step: number;
151
- label?: string | undefined;
152
- minLabel?: string | undefined;
153
- maxLabel?: string | undefined;
154
- }, {
155
- type: "slider";
156
- name: string;
157
- min: number;
158
- max: number;
159
- step: number;
160
- value?: number | undefined;
161
- label?: string | undefined;
162
- minLabel?: string | undefined;
163
- maxLabel?: string | undefined;
164
- }>>, z.ZodPipe<z.ZodObject<{
165
- type: z.ZodLiteral<"button_group">;
166
- name: z.ZodString;
167
- options: z.ZodArray<z.ZodString>;
168
- style: z.ZodOptional<z.ZodEnum<{
169
- row: "row";
170
- stack: "stack";
171
- grid: "grid";
172
- }>>;
173
- }, z.core.$strip>, z.ZodTransform<{
174
- style: "row" | "stack" | "grid";
175
- type: "button_group";
176
- name: string;
177
- options: string[];
178
- }, {
179
- type: "button_group";
180
- name: string;
181
- options: string[];
182
- style?: "row" | "stack" | "grid" | undefined;
183
- }>>, z.ZodObject<{
184
- type: z.ZodLiteral<"toggle">;
185
- name: z.ZodString;
186
- label: z.ZodString;
187
- value: z.ZodDefault<z.ZodBoolean>;
188
- }, z.core.$strip>, z.ZodObject<{
189
- type: z.ZodLiteral<"bar_chart">;
190
- bars: z.ZodArray<z.ZodObject<{
191
- label: z.ZodString;
192
- value: z.ZodNumber;
193
- color: z.ZodOptional<z.ZodEnum<{
194
- gray: "gray";
195
- blue: "blue";
196
- red: "red";
197
- amber: "amber";
198
- green: "green";
199
- teal: "teal";
200
- purple: "purple";
201
- pink: "pink";
202
- }>>;
203
- }, z.core.$strip>>;
204
- max: z.ZodOptional<z.ZodNumber>;
205
- color: z.ZodOptional<z.ZodEnum<{
206
- gray: "gray";
207
- blue: "blue";
208
- red: "red";
209
- amber: "amber";
210
- green: "green";
211
- teal: "teal";
212
- purple: "purple";
213
- pink: "pink";
214
- accent: "accent";
215
- }>>;
216
- }, z.core.$strip>], "type">;
217
- export type GroupChildElement = z.infer<typeof groupChildElementSchema>;
218
- /** Any single page element, including media and `group` */
219
- declare const elementSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
220
- type: z.ZodLiteral<"text">;
221
- style: z.ZodEnum<{
222
- title: "title";
223
- body: "body";
224
- caption: "caption";
225
- label: "label";
226
- }>;
227
- content: z.ZodString;
228
- align: z.ZodOptional<z.ZodEnum<{
229
- left: "left";
230
- center: "center";
231
- right: "right";
232
- }>>;
233
- }, z.core.$strip>, z.ZodObject<{
234
- type: z.ZodLiteral<"image">;
235
- url: z.ZodString;
236
- aspect: z.ZodEnum<{
237
- "1:1": "1:1";
238
- "16:9": "16:9";
239
- "4:3": "4:3";
240
- "3:4": "3:4";
241
- "9:16": "9:16";
242
- }>;
243
- alt: z.ZodOptional<z.ZodString>;
244
- }, z.core.$strip>, z.ZodObject<{
245
- type: z.ZodLiteral<"divider">;
246
- }, z.core.$strip>, z.ZodObject<{
247
- type: z.ZodLiteral<"spacer">;
248
- size: z.ZodDefault<z.ZodEnum<{
249
- small: "small";
250
- medium: "medium";
251
- large: "large";
252
- }>>;
253
- }, z.core.$strip>, z.ZodObject<{
254
- type: z.ZodLiteral<"progress">;
255
- value: z.ZodNumber;
256
- max: z.ZodNumber;
257
- label: z.ZodOptional<z.ZodString>;
258
- color: z.ZodOptional<z.ZodEnum<{
259
- gray: "gray";
260
- blue: "blue";
261
- red: "red";
262
- amber: "amber";
263
- green: "green";
264
- teal: "teal";
265
- purple: "purple";
266
- pink: "pink";
267
- accent: "accent";
268
- }>>;
269
- }, z.core.$strip>, z.ZodObject<{
270
- type: z.ZodLiteral<"list">;
271
- style: z.ZodDefault<z.ZodEnum<{
272
- ordered: "ordered";
273
- unordered: "unordered";
274
- plain: "plain";
275
- }>>;
276
- items: z.ZodArray<z.ZodObject<{
277
- content: z.ZodString;
278
- trailing: z.ZodOptional<z.ZodString>;
279
- }, z.core.$strip>>;
280
- }, z.core.$strip>, z.ZodObject<{
281
- type: z.ZodLiteral<"grid">;
282
- cols: z.ZodNumber;
283
- rows: z.ZodNumber;
284
- cells: z.ZodArray<z.ZodObject<{
285
- row: z.ZodNumber;
286
- col: z.ZodNumber;
287
- color: z.ZodOptional<z.ZodString>;
288
- content: z.ZodOptional<z.ZodString>;
289
- }, z.core.$strip>>;
290
- cellSize: z.ZodOptional<z.ZodEnum<{
291
- auto: "auto";
292
- square: "square";
293
- }>>;
294
- gap: z.ZodDefault<z.ZodEnum<{
295
- small: "small";
296
- medium: "medium";
297
- none: "none";
298
- }>>;
299
- interactive: z.ZodOptional<z.ZodBoolean>;
300
- }, z.core.$strip>, z.ZodObject<{
301
- type: z.ZodLiteral<"text_input">;
302
- name: z.ZodString;
303
- placeholder: z.ZodOptional<z.ZodString>;
304
- maxLength: z.ZodOptional<z.ZodNumber>;
305
- }, z.core.$strip>, z.ZodPipe<z.ZodObject<{
306
- type: z.ZodLiteral<"slider">;
307
- name: z.ZodString;
308
- min: z.ZodNumber;
309
- max: z.ZodNumber;
310
- step: z.ZodDefault<z.ZodNumber>;
311
- value: z.ZodOptional<z.ZodNumber>;
312
- label: z.ZodOptional<z.ZodString>;
313
- minLabel: z.ZodOptional<z.ZodString>;
314
- maxLabel: z.ZodOptional<z.ZodString>;
315
- }, z.core.$strip>, z.ZodTransform<{
316
- value: number;
317
- type: "slider";
318
- name: string;
319
- min: number;
320
- max: number;
321
- step: number;
322
- label?: string | undefined;
323
- minLabel?: string | undefined;
324
- maxLabel?: string | undefined;
325
- }, {
326
- type: "slider";
327
- name: string;
328
- min: number;
329
- max: number;
330
- step: number;
331
- value?: number | undefined;
332
- label?: string | undefined;
333
- minLabel?: string | undefined;
334
- maxLabel?: string | undefined;
335
- }>>, z.ZodPipe<z.ZodObject<{
336
- type: z.ZodLiteral<"button_group">;
337
- name: z.ZodString;
338
- options: z.ZodArray<z.ZodString>;
339
- style: z.ZodOptional<z.ZodEnum<{
340
- row: "row";
341
- stack: "stack";
342
- grid: "grid";
343
- }>>;
344
- }, z.core.$strip>, z.ZodTransform<{
345
- style: "row" | "stack" | "grid";
346
- type: "button_group";
347
- name: string;
348
- options: string[];
349
- }, {
350
- type: "button_group";
351
- name: string;
352
- options: string[];
353
- style?: "row" | "stack" | "grid" | undefined;
354
- }>>, z.ZodObject<{
355
- type: z.ZodLiteral<"toggle">;
356
- name: z.ZodString;
357
- label: z.ZodString;
358
- value: z.ZodDefault<z.ZodBoolean>;
359
- }, z.core.$strip>, z.ZodObject<{
360
- type: z.ZodLiteral<"group">;
361
- layout: z.ZodEnum<{
362
- row: "row";
363
- }>;
364
- children: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
365
- type: z.ZodLiteral<"text">;
366
- style: z.ZodEnum<{
367
- title: "title";
368
- body: "body";
369
- caption: "caption";
370
- label: "label";
371
- }>;
372
- content: z.ZodString;
373
- align: z.ZodOptional<z.ZodEnum<{
374
- left: "left";
375
- center: "center";
376
- right: "right";
377
- }>>;
378
- }, z.core.$strip>, z.ZodObject<{
379
- type: z.ZodLiteral<"divider">;
380
- }, z.core.$strip>, z.ZodObject<{
381
- type: z.ZodLiteral<"spacer">;
382
- size: z.ZodDefault<z.ZodEnum<{
383
- small: "small";
384
- medium: "medium";
385
- large: "large";
386
- }>>;
387
- }, z.core.$strip>, z.ZodObject<{
388
- type: z.ZodLiteral<"progress">;
389
- value: z.ZodNumber;
390
- max: z.ZodNumber;
391
- label: z.ZodOptional<z.ZodString>;
392
- color: z.ZodOptional<z.ZodEnum<{
393
- gray: "gray";
394
- blue: "blue";
395
- red: "red";
396
- amber: "amber";
397
- green: "green";
398
- teal: "teal";
399
- purple: "purple";
400
- pink: "pink";
401
- accent: "accent";
402
- }>>;
403
- }, z.core.$strip>, z.ZodObject<{
404
- type: z.ZodLiteral<"list">;
405
- style: z.ZodDefault<z.ZodEnum<{
406
- ordered: "ordered";
407
- unordered: "unordered";
408
- plain: "plain";
409
- }>>;
410
- items: z.ZodArray<z.ZodObject<{
411
- content: z.ZodString;
412
- trailing: z.ZodOptional<z.ZodString>;
413
- }, z.core.$strip>>;
414
- }, z.core.$strip>, z.ZodObject<{
415
- type: z.ZodLiteral<"text_input">;
416
- name: z.ZodString;
417
- placeholder: z.ZodOptional<z.ZodString>;
418
- maxLength: z.ZodOptional<z.ZodNumber>;
419
- }, z.core.$strip>, z.ZodPipe<z.ZodObject<{
420
- type: z.ZodLiteral<"slider">;
421
- name: z.ZodString;
422
- min: z.ZodNumber;
423
- max: z.ZodNumber;
424
- step: z.ZodDefault<z.ZodNumber>;
425
- value: z.ZodOptional<z.ZodNumber>;
426
- label: z.ZodOptional<z.ZodString>;
427
- minLabel: z.ZodOptional<z.ZodString>;
428
- maxLabel: z.ZodOptional<z.ZodString>;
429
- }, z.core.$strip>, z.ZodTransform<{
430
- value: number;
431
- type: "slider";
432
- name: string;
433
- min: number;
434
- max: number;
435
- step: number;
436
- label?: string | undefined;
437
- minLabel?: string | undefined;
438
- maxLabel?: string | undefined;
439
- }, {
440
- type: "slider";
441
- name: string;
442
- min: number;
443
- max: number;
444
- step: number;
445
- value?: number | undefined;
446
- label?: string | undefined;
447
- minLabel?: string | undefined;
448
- maxLabel?: string | undefined;
449
- }>>, z.ZodPipe<z.ZodObject<{
450
- type: z.ZodLiteral<"button_group">;
451
- name: z.ZodString;
452
- options: z.ZodArray<z.ZodString>;
453
- style: z.ZodOptional<z.ZodEnum<{
454
- row: "row";
455
- stack: "stack";
456
- grid: "grid";
457
- }>>;
458
- }, z.core.$strip>, z.ZodTransform<{
459
- style: "row" | "stack" | "grid";
460
- type: "button_group";
461
- name: string;
462
- options: string[];
463
- }, {
464
- type: "button_group";
465
- name: string;
466
- options: string[];
467
- style?: "row" | "stack" | "grid" | undefined;
468
- }>>, z.ZodObject<{
469
- type: z.ZodLiteral<"toggle">;
470
- name: z.ZodString;
471
- label: z.ZodString;
472
- value: z.ZodDefault<z.ZodBoolean>;
473
- }, z.core.$strip>, z.ZodObject<{
474
- type: z.ZodLiteral<"bar_chart">;
475
- bars: z.ZodArray<z.ZodObject<{
476
- label: z.ZodString;
477
- value: z.ZodNumber;
478
- color: z.ZodOptional<z.ZodEnum<{
479
- gray: "gray";
480
- blue: "blue";
481
- red: "red";
482
- amber: "amber";
483
- green: "green";
484
- teal: "teal";
485
- purple: "purple";
486
- pink: "pink";
487
- }>>;
488
- }, z.core.$strip>>;
489
- max: z.ZodOptional<z.ZodNumber>;
490
- color: z.ZodOptional<z.ZodEnum<{
491
- gray: "gray";
492
- blue: "blue";
493
- red: "red";
494
- amber: "amber";
495
- green: "green";
496
- teal: "teal";
497
- purple: "purple";
498
- pink: "pink";
499
- accent: "accent";
500
- }>>;
501
- }, z.core.$strip>], "type">>;
502
- }, z.core.$strip>, z.ZodObject<{
503
- type: z.ZodLiteral<"bar_chart">;
504
- bars: z.ZodArray<z.ZodObject<{
505
- label: z.ZodString;
506
- value: z.ZodNumber;
507
- color: z.ZodOptional<z.ZodEnum<{
508
- gray: "gray";
509
- blue: "blue";
510
- red: "red";
511
- amber: "amber";
512
- green: "green";
513
- teal: "teal";
514
- purple: "purple";
515
- pink: "pink";
516
- }>>;
517
- }, z.core.$strip>>;
518
- max: z.ZodOptional<z.ZodNumber>;
519
- color: z.ZodOptional<z.ZodEnum<{
520
- gray: "gray";
521
- blue: "blue";
522
- red: "red";
523
- amber: "amber";
524
- green: "green";
525
- teal: "teal";
526
- purple: "purple";
527
- pink: "pink";
528
- accent: "accent";
529
- }>>;
530
- }, z.core.$strip>], "type">;
531
- export type Element = z.infer<typeof elementSchema>;
532
- export type SnapPageElementInput = z.input<typeof elementSchema>;
533
- declare const elementsSchema: z.ZodObject<{
534
- type: z.ZodLiteral<"stack">;
535
- children: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
536
- type: z.ZodLiteral<"text">;
537
- style: z.ZodEnum<{
538
- title: "title";
539
- body: "body";
540
- caption: "caption";
541
- label: "label";
542
- }>;
543
- content: z.ZodString;
544
- align: z.ZodOptional<z.ZodEnum<{
545
- left: "left";
546
- center: "center";
547
- right: "right";
548
- }>>;
549
- }, z.core.$strip>, z.ZodObject<{
550
- type: z.ZodLiteral<"image">;
551
- url: z.ZodString;
552
- aspect: z.ZodEnum<{
553
- "1:1": "1:1";
554
- "16:9": "16:9";
555
- "4:3": "4:3";
556
- "3:4": "3:4";
557
- "9:16": "9:16";
558
- }>;
559
- alt: z.ZodOptional<z.ZodString>;
560
- }, z.core.$strip>, z.ZodObject<{
561
- type: z.ZodLiteral<"divider">;
562
- }, z.core.$strip>, z.ZodObject<{
563
- type: z.ZodLiteral<"spacer">;
564
- size: z.ZodDefault<z.ZodEnum<{
565
- small: "small";
566
- medium: "medium";
567
- large: "large";
568
- }>>;
569
- }, z.core.$strip>, z.ZodObject<{
570
- type: z.ZodLiteral<"progress">;
571
- value: z.ZodNumber;
572
- max: z.ZodNumber;
573
- label: z.ZodOptional<z.ZodString>;
574
- color: z.ZodOptional<z.ZodEnum<{
575
- gray: "gray";
576
- blue: "blue";
577
- red: "red";
578
- amber: "amber";
579
- green: "green";
580
- teal: "teal";
581
- purple: "purple";
582
- pink: "pink";
583
- accent: "accent";
584
- }>>;
585
- }, z.core.$strip>, z.ZodObject<{
586
- type: z.ZodLiteral<"list">;
587
- style: z.ZodDefault<z.ZodEnum<{
588
- ordered: "ordered";
589
- unordered: "unordered";
590
- plain: "plain";
591
- }>>;
592
- items: z.ZodArray<z.ZodObject<{
593
- content: z.ZodString;
594
- trailing: z.ZodOptional<z.ZodString>;
595
- }, z.core.$strip>>;
596
- }, z.core.$strip>, z.ZodObject<{
597
- type: z.ZodLiteral<"grid">;
598
- cols: z.ZodNumber;
599
- rows: z.ZodNumber;
600
- cells: z.ZodArray<z.ZodObject<{
601
- row: z.ZodNumber;
602
- col: z.ZodNumber;
603
- color: z.ZodOptional<z.ZodString>;
604
- content: z.ZodOptional<z.ZodString>;
605
- }, z.core.$strip>>;
606
- cellSize: z.ZodOptional<z.ZodEnum<{
607
- auto: "auto";
608
- square: "square";
609
- }>>;
610
- gap: z.ZodDefault<z.ZodEnum<{
611
- small: "small";
612
- medium: "medium";
613
- none: "none";
614
- }>>;
615
- interactive: z.ZodOptional<z.ZodBoolean>;
616
- }, z.core.$strip>, z.ZodObject<{
617
- type: z.ZodLiteral<"text_input">;
618
- name: z.ZodString;
619
- placeholder: z.ZodOptional<z.ZodString>;
620
- maxLength: z.ZodOptional<z.ZodNumber>;
621
- }, z.core.$strip>, z.ZodPipe<z.ZodObject<{
622
- type: z.ZodLiteral<"slider">;
623
- name: z.ZodString;
624
- min: z.ZodNumber;
625
- max: z.ZodNumber;
626
- step: z.ZodDefault<z.ZodNumber>;
627
- value: z.ZodOptional<z.ZodNumber>;
628
- label: z.ZodOptional<z.ZodString>;
629
- minLabel: z.ZodOptional<z.ZodString>;
630
- maxLabel: z.ZodOptional<z.ZodString>;
631
- }, z.core.$strip>, z.ZodTransform<{
632
- value: number;
633
- type: "slider";
634
- name: string;
635
- min: number;
636
- max: number;
637
- step: number;
638
- label?: string | undefined;
639
- minLabel?: string | undefined;
640
- maxLabel?: string | undefined;
641
- }, {
642
- type: "slider";
643
- name: string;
644
- min: number;
645
- max: number;
646
- step: number;
647
- value?: number | undefined;
648
- label?: string | undefined;
649
- minLabel?: string | undefined;
650
- maxLabel?: string | undefined;
651
- }>>, z.ZodPipe<z.ZodObject<{
652
- type: z.ZodLiteral<"button_group">;
653
- name: z.ZodString;
654
- options: z.ZodArray<z.ZodString>;
655
- style: z.ZodOptional<z.ZodEnum<{
656
- row: "row";
657
- stack: "stack";
658
- grid: "grid";
659
- }>>;
660
- }, z.core.$strip>, z.ZodTransform<{
661
- style: "row" | "stack" | "grid";
662
- type: "button_group";
663
- name: string;
664
- options: string[];
665
- }, {
666
- type: "button_group";
667
- name: string;
668
- options: string[];
669
- style?: "row" | "stack" | "grid" | undefined;
670
- }>>, z.ZodObject<{
671
- type: z.ZodLiteral<"toggle">;
672
- name: z.ZodString;
673
- label: z.ZodString;
674
- value: z.ZodDefault<z.ZodBoolean>;
675
- }, z.core.$strip>, z.ZodObject<{
676
- type: z.ZodLiteral<"group">;
677
- layout: z.ZodEnum<{
678
- row: "row";
679
- }>;
680
- children: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
681
- type: z.ZodLiteral<"text">;
682
- style: z.ZodEnum<{
683
- title: "title";
684
- body: "body";
685
- caption: "caption";
686
- label: "label";
687
- }>;
688
- content: z.ZodString;
689
- align: z.ZodOptional<z.ZodEnum<{
690
- left: "left";
691
- center: "center";
692
- right: "right";
693
- }>>;
694
- }, z.core.$strip>, z.ZodObject<{
695
- type: z.ZodLiteral<"divider">;
696
- }, z.core.$strip>, z.ZodObject<{
697
- type: z.ZodLiteral<"spacer">;
698
- size: z.ZodDefault<z.ZodEnum<{
699
- small: "small";
700
- medium: "medium";
701
- large: "large";
702
- }>>;
703
- }, z.core.$strip>, z.ZodObject<{
704
- type: z.ZodLiteral<"progress">;
705
- value: z.ZodNumber;
706
- max: z.ZodNumber;
707
- label: z.ZodOptional<z.ZodString>;
708
- color: z.ZodOptional<z.ZodEnum<{
709
- gray: "gray";
710
- blue: "blue";
711
- red: "red";
712
- amber: "amber";
713
- green: "green";
714
- teal: "teal";
715
- purple: "purple";
716
- pink: "pink";
717
- accent: "accent";
718
- }>>;
719
- }, z.core.$strip>, z.ZodObject<{
720
- type: z.ZodLiteral<"list">;
721
- style: z.ZodDefault<z.ZodEnum<{
722
- ordered: "ordered";
723
- unordered: "unordered";
724
- plain: "plain";
725
- }>>;
726
- items: z.ZodArray<z.ZodObject<{
727
- content: z.ZodString;
728
- trailing: z.ZodOptional<z.ZodString>;
729
- }, z.core.$strip>>;
730
- }, z.core.$strip>, z.ZodObject<{
731
- type: z.ZodLiteral<"text_input">;
732
- name: z.ZodString;
733
- placeholder: z.ZodOptional<z.ZodString>;
734
- maxLength: z.ZodOptional<z.ZodNumber>;
735
- }, z.core.$strip>, z.ZodPipe<z.ZodObject<{
736
- type: z.ZodLiteral<"slider">;
737
- name: z.ZodString;
738
- min: z.ZodNumber;
739
- max: z.ZodNumber;
740
- step: z.ZodDefault<z.ZodNumber>;
741
- value: z.ZodOptional<z.ZodNumber>;
742
- label: z.ZodOptional<z.ZodString>;
743
- minLabel: z.ZodOptional<z.ZodString>;
744
- maxLabel: z.ZodOptional<z.ZodString>;
745
- }, z.core.$strip>, z.ZodTransform<{
746
- value: number;
747
- type: "slider";
748
- name: string;
749
- min: number;
750
- max: number;
751
- step: number;
752
- label?: string | undefined;
753
- minLabel?: string | undefined;
754
- maxLabel?: string | undefined;
755
- }, {
756
- type: "slider";
757
- name: string;
758
- min: number;
759
- max: number;
760
- step: number;
761
- value?: number | undefined;
762
- label?: string | undefined;
763
- minLabel?: string | undefined;
764
- maxLabel?: string | undefined;
765
- }>>, z.ZodPipe<z.ZodObject<{
766
- type: z.ZodLiteral<"button_group">;
767
- name: z.ZodString;
768
- options: z.ZodArray<z.ZodString>;
769
- style: z.ZodOptional<z.ZodEnum<{
770
- row: "row";
771
- stack: "stack";
772
- grid: "grid";
773
- }>>;
774
- }, z.core.$strip>, z.ZodTransform<{
775
- style: "row" | "stack" | "grid";
776
- type: "button_group";
777
- name: string;
778
- options: string[];
779
- }, {
780
- type: "button_group";
781
- name: string;
782
- options: string[];
783
- style?: "row" | "stack" | "grid" | undefined;
784
- }>>, z.ZodObject<{
785
- type: z.ZodLiteral<"toggle">;
786
- name: z.ZodString;
787
- label: z.ZodString;
788
- value: z.ZodDefault<z.ZodBoolean>;
789
- }, z.core.$strip>, z.ZodObject<{
790
- type: z.ZodLiteral<"bar_chart">;
791
- bars: z.ZodArray<z.ZodObject<{
792
- label: z.ZodString;
793
- value: z.ZodNumber;
794
- color: z.ZodOptional<z.ZodEnum<{
795
- gray: "gray";
796
- blue: "blue";
797
- red: "red";
798
- amber: "amber";
799
- green: "green";
800
- teal: "teal";
801
- purple: "purple";
802
- pink: "pink";
803
- }>>;
804
- }, z.core.$strip>>;
805
- max: z.ZodOptional<z.ZodNumber>;
806
- color: z.ZodOptional<z.ZodEnum<{
807
- gray: "gray";
808
- blue: "blue";
809
- red: "red";
810
- amber: "amber";
811
- green: "green";
812
- teal: "teal";
813
- purple: "purple";
814
- pink: "pink";
815
- accent: "accent";
816
- }>>;
817
- }, z.core.$strip>], "type">>;
818
- }, z.core.$strip>, z.ZodObject<{
819
- type: z.ZodLiteral<"bar_chart">;
820
- bars: z.ZodArray<z.ZodObject<{
821
- label: z.ZodString;
822
- value: z.ZodNumber;
823
- color: z.ZodOptional<z.ZodEnum<{
824
- gray: "gray";
825
- blue: "blue";
826
- red: "red";
827
- amber: "amber";
828
- green: "green";
829
- teal: "teal";
830
- purple: "purple";
831
- pink: "pink";
832
- }>>;
833
- }, z.core.$strip>>;
834
- max: z.ZodOptional<z.ZodNumber>;
835
- color: z.ZodOptional<z.ZodEnum<{
2
+ import type { Spec } from "@json-render/core";
3
+ import { type SnapDataStore } from "./dataStore.js";
4
+ export declare const snapResponseSchema: z.ZodObject<{
5
+ version: z.ZodLiteral<"1.0">;
6
+ theme: z.ZodDefault<z.ZodOptional<z.ZodObject<{
7
+ accent: z.ZodDefault<z.ZodEnum<{
836
8
  gray: "gray";
837
9
  blue: "blue";
838
10
  red: "red";
@@ -841,788 +13,18 @@ declare const elementsSchema: z.ZodObject<{
841
13
  teal: "teal";
842
14
  purple: "purple";
843
15
  pink: "pink";
844
- accent: "accent";
845
16
  }>>;
846
- }, z.core.$strip>], "type">>;
847
- }, z.core.$strict>;
848
- export type Elements = z.infer<typeof elementsSchema>;
849
- export declare const snapResponseSchema: z.ZodObject<{
850
- version: z.ZodLiteral<"1.0">;
851
- page: z.ZodObject<{
852
- theme: z.ZodDefault<z.ZodOptional<z.ZodObject<{
853
- accent: z.ZodDefault<z.ZodEnum<{
854
- gray: "gray";
855
- blue: "blue";
856
- red: "red";
857
- amber: "amber";
858
- green: "green";
859
- teal: "teal";
860
- purple: "purple";
861
- pink: "pink";
862
- }>>;
863
- }, z.core.$strict>>>;
864
- button_layout: z.ZodDefault<z.ZodEnum<{
865
- row: "row";
866
- stack: "stack";
867
- grid: "grid";
868
- }>>;
869
- effects: z.ZodOptional<z.ZodArray<z.ZodEnum<{
870
- confetti: "confetti";
871
- }>>>;
872
- elements: z.ZodObject<{
873
- type: z.ZodLiteral<"stack">;
874
- children: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
875
- type: z.ZodLiteral<"text">;
876
- style: z.ZodEnum<{
877
- title: "title";
878
- body: "body";
879
- caption: "caption";
880
- label: "label";
881
- }>;
882
- content: z.ZodString;
883
- align: z.ZodOptional<z.ZodEnum<{
884
- left: "left";
885
- center: "center";
886
- right: "right";
887
- }>>;
888
- }, z.core.$strip>, z.ZodObject<{
889
- type: z.ZodLiteral<"image">;
890
- url: z.ZodString;
891
- aspect: z.ZodEnum<{
892
- "1:1": "1:1";
893
- "16:9": "16:9";
894
- "4:3": "4:3";
895
- "3:4": "3:4";
896
- "9:16": "9:16";
897
- }>;
898
- alt: z.ZodOptional<z.ZodString>;
899
- }, z.core.$strip>, z.ZodObject<{
900
- type: z.ZodLiteral<"divider">;
901
- }, z.core.$strip>, z.ZodObject<{
902
- type: z.ZodLiteral<"spacer">;
903
- size: z.ZodDefault<z.ZodEnum<{
904
- small: "small";
905
- medium: "medium";
906
- large: "large";
907
- }>>;
908
- }, z.core.$strip>, z.ZodObject<{
909
- type: z.ZodLiteral<"progress">;
910
- value: z.ZodNumber;
911
- max: z.ZodNumber;
912
- label: z.ZodOptional<z.ZodString>;
913
- color: z.ZodOptional<z.ZodEnum<{
914
- gray: "gray";
915
- blue: "blue";
916
- red: "red";
917
- amber: "amber";
918
- green: "green";
919
- teal: "teal";
920
- purple: "purple";
921
- pink: "pink";
922
- accent: "accent";
923
- }>>;
924
- }, z.core.$strip>, z.ZodObject<{
925
- type: z.ZodLiteral<"list">;
926
- style: z.ZodDefault<z.ZodEnum<{
927
- ordered: "ordered";
928
- unordered: "unordered";
929
- plain: "plain";
930
- }>>;
931
- items: z.ZodArray<z.ZodObject<{
932
- content: z.ZodString;
933
- trailing: z.ZodOptional<z.ZodString>;
934
- }, z.core.$strip>>;
935
- }, z.core.$strip>, z.ZodObject<{
936
- type: z.ZodLiteral<"grid">;
937
- cols: z.ZodNumber;
938
- rows: z.ZodNumber;
939
- cells: z.ZodArray<z.ZodObject<{
940
- row: z.ZodNumber;
941
- col: z.ZodNumber;
942
- color: z.ZodOptional<z.ZodString>;
943
- content: z.ZodOptional<z.ZodString>;
944
- }, z.core.$strip>>;
945
- cellSize: z.ZodOptional<z.ZodEnum<{
946
- auto: "auto";
947
- square: "square";
948
- }>>;
949
- gap: z.ZodDefault<z.ZodEnum<{
950
- small: "small";
951
- medium: "medium";
952
- none: "none";
953
- }>>;
954
- interactive: z.ZodOptional<z.ZodBoolean>;
955
- }, z.core.$strip>, z.ZodObject<{
956
- type: z.ZodLiteral<"text_input">;
957
- name: z.ZodString;
958
- placeholder: z.ZodOptional<z.ZodString>;
959
- maxLength: z.ZodOptional<z.ZodNumber>;
960
- }, z.core.$strip>, z.ZodPipe<z.ZodObject<{
961
- type: z.ZodLiteral<"slider">;
962
- name: z.ZodString;
963
- min: z.ZodNumber;
964
- max: z.ZodNumber;
965
- step: z.ZodDefault<z.ZodNumber>;
966
- value: z.ZodOptional<z.ZodNumber>;
967
- label: z.ZodOptional<z.ZodString>;
968
- minLabel: z.ZodOptional<z.ZodString>;
969
- maxLabel: z.ZodOptional<z.ZodString>;
970
- }, z.core.$strip>, z.ZodTransform<{
971
- value: number;
972
- type: "slider";
973
- name: string;
974
- min: number;
975
- max: number;
976
- step: number;
977
- label?: string | undefined;
978
- minLabel?: string | undefined;
979
- maxLabel?: string | undefined;
980
- }, {
981
- type: "slider";
982
- name: string;
983
- min: number;
984
- max: number;
985
- step: number;
986
- value?: number | undefined;
987
- label?: string | undefined;
988
- minLabel?: string | undefined;
989
- maxLabel?: string | undefined;
990
- }>>, z.ZodPipe<z.ZodObject<{
991
- type: z.ZodLiteral<"button_group">;
992
- name: z.ZodString;
993
- options: z.ZodArray<z.ZodString>;
994
- style: z.ZodOptional<z.ZodEnum<{
995
- row: "row";
996
- stack: "stack";
997
- grid: "grid";
998
- }>>;
999
- }, z.core.$strip>, z.ZodTransform<{
1000
- style: "row" | "stack" | "grid";
1001
- type: "button_group";
1002
- name: string;
1003
- options: string[];
1004
- }, {
1005
- type: "button_group";
1006
- name: string;
1007
- options: string[];
1008
- style?: "row" | "stack" | "grid" | undefined;
1009
- }>>, z.ZodObject<{
1010
- type: z.ZodLiteral<"toggle">;
1011
- name: z.ZodString;
1012
- label: z.ZodString;
1013
- value: z.ZodDefault<z.ZodBoolean>;
1014
- }, z.core.$strip>, z.ZodObject<{
1015
- type: z.ZodLiteral<"group">;
1016
- layout: z.ZodEnum<{
1017
- row: "row";
1018
- }>;
1019
- children: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
1020
- type: z.ZodLiteral<"text">;
1021
- style: z.ZodEnum<{
1022
- title: "title";
1023
- body: "body";
1024
- caption: "caption";
1025
- label: "label";
1026
- }>;
1027
- content: z.ZodString;
1028
- align: z.ZodOptional<z.ZodEnum<{
1029
- left: "left";
1030
- center: "center";
1031
- right: "right";
1032
- }>>;
1033
- }, z.core.$strip>, z.ZodObject<{
1034
- type: z.ZodLiteral<"divider">;
1035
- }, z.core.$strip>, z.ZodObject<{
1036
- type: z.ZodLiteral<"spacer">;
1037
- size: z.ZodDefault<z.ZodEnum<{
1038
- small: "small";
1039
- medium: "medium";
1040
- large: "large";
1041
- }>>;
1042
- }, z.core.$strip>, z.ZodObject<{
1043
- type: z.ZodLiteral<"progress">;
1044
- value: z.ZodNumber;
1045
- max: z.ZodNumber;
1046
- label: z.ZodOptional<z.ZodString>;
1047
- color: z.ZodOptional<z.ZodEnum<{
1048
- gray: "gray";
1049
- blue: "blue";
1050
- red: "red";
1051
- amber: "amber";
1052
- green: "green";
1053
- teal: "teal";
1054
- purple: "purple";
1055
- pink: "pink";
1056
- accent: "accent";
1057
- }>>;
1058
- }, z.core.$strip>, z.ZodObject<{
1059
- type: z.ZodLiteral<"list">;
1060
- style: z.ZodDefault<z.ZodEnum<{
1061
- ordered: "ordered";
1062
- unordered: "unordered";
1063
- plain: "plain";
1064
- }>>;
1065
- items: z.ZodArray<z.ZodObject<{
1066
- content: z.ZodString;
1067
- trailing: z.ZodOptional<z.ZodString>;
1068
- }, z.core.$strip>>;
1069
- }, z.core.$strip>, z.ZodObject<{
1070
- type: z.ZodLiteral<"text_input">;
1071
- name: z.ZodString;
1072
- placeholder: z.ZodOptional<z.ZodString>;
1073
- maxLength: z.ZodOptional<z.ZodNumber>;
1074
- }, z.core.$strip>, z.ZodPipe<z.ZodObject<{
1075
- type: z.ZodLiteral<"slider">;
1076
- name: z.ZodString;
1077
- min: z.ZodNumber;
1078
- max: z.ZodNumber;
1079
- step: z.ZodDefault<z.ZodNumber>;
1080
- value: z.ZodOptional<z.ZodNumber>;
1081
- label: z.ZodOptional<z.ZodString>;
1082
- minLabel: z.ZodOptional<z.ZodString>;
1083
- maxLabel: z.ZodOptional<z.ZodString>;
1084
- }, z.core.$strip>, z.ZodTransform<{
1085
- value: number;
1086
- type: "slider";
1087
- name: string;
1088
- min: number;
1089
- max: number;
1090
- step: number;
1091
- label?: string | undefined;
1092
- minLabel?: string | undefined;
1093
- maxLabel?: string | undefined;
1094
- }, {
1095
- type: "slider";
1096
- name: string;
1097
- min: number;
1098
- max: number;
1099
- step: number;
1100
- value?: number | undefined;
1101
- label?: string | undefined;
1102
- minLabel?: string | undefined;
1103
- maxLabel?: string | undefined;
1104
- }>>, z.ZodPipe<z.ZodObject<{
1105
- type: z.ZodLiteral<"button_group">;
1106
- name: z.ZodString;
1107
- options: z.ZodArray<z.ZodString>;
1108
- style: z.ZodOptional<z.ZodEnum<{
1109
- row: "row";
1110
- stack: "stack";
1111
- grid: "grid";
1112
- }>>;
1113
- }, z.core.$strip>, z.ZodTransform<{
1114
- style: "row" | "stack" | "grid";
1115
- type: "button_group";
1116
- name: string;
1117
- options: string[];
1118
- }, {
1119
- type: "button_group";
1120
- name: string;
1121
- options: string[];
1122
- style?: "row" | "stack" | "grid" | undefined;
1123
- }>>, z.ZodObject<{
1124
- type: z.ZodLiteral<"toggle">;
1125
- name: z.ZodString;
1126
- label: z.ZodString;
1127
- value: z.ZodDefault<z.ZodBoolean>;
1128
- }, z.core.$strip>, z.ZodObject<{
1129
- type: z.ZodLiteral<"bar_chart">;
1130
- bars: z.ZodArray<z.ZodObject<{
1131
- label: z.ZodString;
1132
- value: z.ZodNumber;
1133
- color: z.ZodOptional<z.ZodEnum<{
1134
- gray: "gray";
1135
- blue: "blue";
1136
- red: "red";
1137
- amber: "amber";
1138
- green: "green";
1139
- teal: "teal";
1140
- purple: "purple";
1141
- pink: "pink";
1142
- }>>;
1143
- }, z.core.$strip>>;
1144
- max: z.ZodOptional<z.ZodNumber>;
1145
- color: z.ZodOptional<z.ZodEnum<{
1146
- gray: "gray";
1147
- blue: "blue";
1148
- red: "red";
1149
- amber: "amber";
1150
- green: "green";
1151
- teal: "teal";
1152
- purple: "purple";
1153
- pink: "pink";
1154
- accent: "accent";
1155
- }>>;
1156
- }, z.core.$strip>], "type">>;
1157
- }, z.core.$strip>, z.ZodObject<{
1158
- type: z.ZodLiteral<"bar_chart">;
1159
- bars: z.ZodArray<z.ZodObject<{
1160
- label: z.ZodString;
1161
- value: z.ZodNumber;
1162
- color: z.ZodOptional<z.ZodEnum<{
1163
- gray: "gray";
1164
- blue: "blue";
1165
- red: "red";
1166
- amber: "amber";
1167
- green: "green";
1168
- teal: "teal";
1169
- purple: "purple";
1170
- pink: "pink";
1171
- }>>;
1172
- }, z.core.$strip>>;
1173
- max: z.ZodOptional<z.ZodNumber>;
1174
- color: z.ZodOptional<z.ZodEnum<{
1175
- gray: "gray";
1176
- blue: "blue";
1177
- red: "red";
1178
- amber: "amber";
1179
- green: "green";
1180
- teal: "teal";
1181
- purple: "purple";
1182
- pink: "pink";
1183
- accent: "accent";
1184
- }>>;
1185
- }, z.core.$strip>], "type">>;
1186
- }, z.core.$strict>;
1187
- buttons: z.ZodOptional<z.ZodArray<z.ZodObject<{
1188
- label: z.ZodString;
1189
- action: z.ZodEnum<{
1190
- post: "post";
1191
- link: "link";
1192
- mini_app: "mini_app";
1193
- client: "client";
1194
- }>;
1195
- target: z.ZodOptional<z.ZodString>;
1196
- client_action: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
1197
- type: z.ZodLiteral<"view_cast">;
1198
- hash: z.ZodString;
1199
- }, z.core.$strict>, z.ZodObject<{
1200
- type: z.ZodLiteral<"view_profile">;
1201
- fid: z.ZodNumber;
1202
- }, z.core.$strict>, z.ZodObject<{
1203
- type: z.ZodLiteral<"compose_cast">;
1204
- text: z.ZodOptional<z.ZodString>;
1205
- embeds: z.ZodOptional<z.ZodArray<z.ZodString>>;
1206
- parent: z.ZodOptional<z.ZodObject<{
1207
- type: z.ZodLiteral<"cast">;
1208
- hash: z.ZodString;
1209
- }, z.core.$strict>>;
1210
- channelKey: z.ZodOptional<z.ZodString>;
1211
- }, z.core.$strict>, z.ZodObject<{
1212
- type: z.ZodLiteral<"view_token">;
1213
- token: z.ZodString;
1214
- }, z.core.$strict>, z.ZodObject<{
1215
- type: z.ZodLiteral<"send_token">;
1216
- token: z.ZodOptional<z.ZodString>;
1217
- amount: z.ZodOptional<z.ZodString>;
1218
- recipientFid: z.ZodOptional<z.ZodNumber>;
1219
- recipientAddress: z.ZodOptional<z.ZodString>;
1220
- }, z.core.$strict>, z.ZodObject<{
1221
- type: z.ZodLiteral<"swap_token">;
1222
- sellToken: z.ZodOptional<z.ZodString>;
1223
- buyToken: z.ZodOptional<z.ZodString>;
1224
- sellAmount: z.ZodOptional<z.ZodString>;
1225
- }, z.core.$strict>], "type">>;
1226
- style: z.ZodOptional<z.ZodEnum<{
1227
- primary: "primary";
1228
- secondary: "secondary";
1229
- }>>;
1230
- }, z.core.$strip>>>;
1231
- }, z.core.$strict>;
17
+ }, z.core.$strict>>>;
18
+ effects: z.ZodOptional<z.ZodArray<z.ZodEnum<{
19
+ confetti: "confetti";
20
+ }>>>;
21
+ ui: z.ZodCustom<Spec, Spec>;
1232
22
  }, z.core.$strict>;
1233
23
  export type SnapResponse = z.infer<typeof snapResponseSchema>;
1234
24
  export type SnapHandlerResult = z.input<typeof snapResponseSchema>;
1235
- export declare const firstPageResponseSchema: z.ZodObject<{
1236
- version: z.ZodLiteral<"1.0">;
1237
- page: z.ZodObject<{
1238
- theme: z.ZodDefault<z.ZodOptional<z.ZodObject<{
1239
- accent: z.ZodDefault<z.ZodEnum<{
1240
- gray: "gray";
1241
- blue: "blue";
1242
- red: "red";
1243
- amber: "amber";
1244
- green: "green";
1245
- teal: "teal";
1246
- purple: "purple";
1247
- pink: "pink";
1248
- }>>;
1249
- }, z.core.$strict>>>;
1250
- button_layout: z.ZodDefault<z.ZodEnum<{
1251
- row: "row";
1252
- stack: "stack";
1253
- grid: "grid";
1254
- }>>;
1255
- effects: z.ZodOptional<z.ZodArray<z.ZodEnum<{
1256
- confetti: "confetti";
1257
- }>>>;
1258
- elements: z.ZodObject<{
1259
- type: z.ZodLiteral<"stack">;
1260
- children: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
1261
- type: z.ZodLiteral<"text">;
1262
- style: z.ZodEnum<{
1263
- title: "title";
1264
- body: "body";
1265
- caption: "caption";
1266
- label: "label";
1267
- }>;
1268
- content: z.ZodString;
1269
- align: z.ZodOptional<z.ZodEnum<{
1270
- left: "left";
1271
- center: "center";
1272
- right: "right";
1273
- }>>;
1274
- }, z.core.$strip>, z.ZodObject<{
1275
- type: z.ZodLiteral<"image">;
1276
- url: z.ZodString;
1277
- aspect: z.ZodEnum<{
1278
- "1:1": "1:1";
1279
- "16:9": "16:9";
1280
- "4:3": "4:3";
1281
- "3:4": "3:4";
1282
- "9:16": "9:16";
1283
- }>;
1284
- alt: z.ZodOptional<z.ZodString>;
1285
- }, z.core.$strip>, z.ZodObject<{
1286
- type: z.ZodLiteral<"divider">;
1287
- }, z.core.$strip>, z.ZodObject<{
1288
- type: z.ZodLiteral<"spacer">;
1289
- size: z.ZodDefault<z.ZodEnum<{
1290
- small: "small";
1291
- medium: "medium";
1292
- large: "large";
1293
- }>>;
1294
- }, z.core.$strip>, z.ZodObject<{
1295
- type: z.ZodLiteral<"progress">;
1296
- value: z.ZodNumber;
1297
- max: z.ZodNumber;
1298
- label: z.ZodOptional<z.ZodString>;
1299
- color: z.ZodOptional<z.ZodEnum<{
1300
- gray: "gray";
1301
- blue: "blue";
1302
- red: "red";
1303
- amber: "amber";
1304
- green: "green";
1305
- teal: "teal";
1306
- purple: "purple";
1307
- pink: "pink";
1308
- accent: "accent";
1309
- }>>;
1310
- }, z.core.$strip>, z.ZodObject<{
1311
- type: z.ZodLiteral<"list">;
1312
- style: z.ZodDefault<z.ZodEnum<{
1313
- ordered: "ordered";
1314
- unordered: "unordered";
1315
- plain: "plain";
1316
- }>>;
1317
- items: z.ZodArray<z.ZodObject<{
1318
- content: z.ZodString;
1319
- trailing: z.ZodOptional<z.ZodString>;
1320
- }, z.core.$strip>>;
1321
- }, z.core.$strip>, z.ZodObject<{
1322
- type: z.ZodLiteral<"grid">;
1323
- cols: z.ZodNumber;
1324
- rows: z.ZodNumber;
1325
- cells: z.ZodArray<z.ZodObject<{
1326
- row: z.ZodNumber;
1327
- col: z.ZodNumber;
1328
- color: z.ZodOptional<z.ZodString>;
1329
- content: z.ZodOptional<z.ZodString>;
1330
- }, z.core.$strip>>;
1331
- cellSize: z.ZodOptional<z.ZodEnum<{
1332
- auto: "auto";
1333
- square: "square";
1334
- }>>;
1335
- gap: z.ZodDefault<z.ZodEnum<{
1336
- small: "small";
1337
- medium: "medium";
1338
- none: "none";
1339
- }>>;
1340
- interactive: z.ZodOptional<z.ZodBoolean>;
1341
- }, z.core.$strip>, z.ZodObject<{
1342
- type: z.ZodLiteral<"text_input">;
1343
- name: z.ZodString;
1344
- placeholder: z.ZodOptional<z.ZodString>;
1345
- maxLength: z.ZodOptional<z.ZodNumber>;
1346
- }, z.core.$strip>, z.ZodPipe<z.ZodObject<{
1347
- type: z.ZodLiteral<"slider">;
1348
- name: z.ZodString;
1349
- min: z.ZodNumber;
1350
- max: z.ZodNumber;
1351
- step: z.ZodDefault<z.ZodNumber>;
1352
- value: z.ZodOptional<z.ZodNumber>;
1353
- label: z.ZodOptional<z.ZodString>;
1354
- minLabel: z.ZodOptional<z.ZodString>;
1355
- maxLabel: z.ZodOptional<z.ZodString>;
1356
- }, z.core.$strip>, z.ZodTransform<{
1357
- value: number;
1358
- type: "slider";
1359
- name: string;
1360
- min: number;
1361
- max: number;
1362
- step: number;
1363
- label?: string | undefined;
1364
- minLabel?: string | undefined;
1365
- maxLabel?: string | undefined;
1366
- }, {
1367
- type: "slider";
1368
- name: string;
1369
- min: number;
1370
- max: number;
1371
- step: number;
1372
- value?: number | undefined;
1373
- label?: string | undefined;
1374
- minLabel?: string | undefined;
1375
- maxLabel?: string | undefined;
1376
- }>>, z.ZodPipe<z.ZodObject<{
1377
- type: z.ZodLiteral<"button_group">;
1378
- name: z.ZodString;
1379
- options: z.ZodArray<z.ZodString>;
1380
- style: z.ZodOptional<z.ZodEnum<{
1381
- row: "row";
1382
- stack: "stack";
1383
- grid: "grid";
1384
- }>>;
1385
- }, z.core.$strip>, z.ZodTransform<{
1386
- style: "row" | "stack" | "grid";
1387
- type: "button_group";
1388
- name: string;
1389
- options: string[];
1390
- }, {
1391
- type: "button_group";
1392
- name: string;
1393
- options: string[];
1394
- style?: "row" | "stack" | "grid" | undefined;
1395
- }>>, z.ZodObject<{
1396
- type: z.ZodLiteral<"toggle">;
1397
- name: z.ZodString;
1398
- label: z.ZodString;
1399
- value: z.ZodDefault<z.ZodBoolean>;
1400
- }, z.core.$strip>, z.ZodObject<{
1401
- type: z.ZodLiteral<"group">;
1402
- layout: z.ZodEnum<{
1403
- row: "row";
1404
- }>;
1405
- children: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
1406
- type: z.ZodLiteral<"text">;
1407
- style: z.ZodEnum<{
1408
- title: "title";
1409
- body: "body";
1410
- caption: "caption";
1411
- label: "label";
1412
- }>;
1413
- content: z.ZodString;
1414
- align: z.ZodOptional<z.ZodEnum<{
1415
- left: "left";
1416
- center: "center";
1417
- right: "right";
1418
- }>>;
1419
- }, z.core.$strip>, z.ZodObject<{
1420
- type: z.ZodLiteral<"divider">;
1421
- }, z.core.$strip>, z.ZodObject<{
1422
- type: z.ZodLiteral<"spacer">;
1423
- size: z.ZodDefault<z.ZodEnum<{
1424
- small: "small";
1425
- medium: "medium";
1426
- large: "large";
1427
- }>>;
1428
- }, z.core.$strip>, z.ZodObject<{
1429
- type: z.ZodLiteral<"progress">;
1430
- value: z.ZodNumber;
1431
- max: z.ZodNumber;
1432
- label: z.ZodOptional<z.ZodString>;
1433
- color: z.ZodOptional<z.ZodEnum<{
1434
- gray: "gray";
1435
- blue: "blue";
1436
- red: "red";
1437
- amber: "amber";
1438
- green: "green";
1439
- teal: "teal";
1440
- purple: "purple";
1441
- pink: "pink";
1442
- accent: "accent";
1443
- }>>;
1444
- }, z.core.$strip>, z.ZodObject<{
1445
- type: z.ZodLiteral<"list">;
1446
- style: z.ZodDefault<z.ZodEnum<{
1447
- ordered: "ordered";
1448
- unordered: "unordered";
1449
- plain: "plain";
1450
- }>>;
1451
- items: z.ZodArray<z.ZodObject<{
1452
- content: z.ZodString;
1453
- trailing: z.ZodOptional<z.ZodString>;
1454
- }, z.core.$strip>>;
1455
- }, z.core.$strip>, z.ZodObject<{
1456
- type: z.ZodLiteral<"text_input">;
1457
- name: z.ZodString;
1458
- placeholder: z.ZodOptional<z.ZodString>;
1459
- maxLength: z.ZodOptional<z.ZodNumber>;
1460
- }, z.core.$strip>, z.ZodPipe<z.ZodObject<{
1461
- type: z.ZodLiteral<"slider">;
1462
- name: z.ZodString;
1463
- min: z.ZodNumber;
1464
- max: z.ZodNumber;
1465
- step: z.ZodDefault<z.ZodNumber>;
1466
- value: z.ZodOptional<z.ZodNumber>;
1467
- label: z.ZodOptional<z.ZodString>;
1468
- minLabel: z.ZodOptional<z.ZodString>;
1469
- maxLabel: z.ZodOptional<z.ZodString>;
1470
- }, z.core.$strip>, z.ZodTransform<{
1471
- value: number;
1472
- type: "slider";
1473
- name: string;
1474
- min: number;
1475
- max: number;
1476
- step: number;
1477
- label?: string | undefined;
1478
- minLabel?: string | undefined;
1479
- maxLabel?: string | undefined;
1480
- }, {
1481
- type: "slider";
1482
- name: string;
1483
- min: number;
1484
- max: number;
1485
- step: number;
1486
- value?: number | undefined;
1487
- label?: string | undefined;
1488
- minLabel?: string | undefined;
1489
- maxLabel?: string | undefined;
1490
- }>>, z.ZodPipe<z.ZodObject<{
1491
- type: z.ZodLiteral<"button_group">;
1492
- name: z.ZodString;
1493
- options: z.ZodArray<z.ZodString>;
1494
- style: z.ZodOptional<z.ZodEnum<{
1495
- row: "row";
1496
- stack: "stack";
1497
- grid: "grid";
1498
- }>>;
1499
- }, z.core.$strip>, z.ZodTransform<{
1500
- style: "row" | "stack" | "grid";
1501
- type: "button_group";
1502
- name: string;
1503
- options: string[];
1504
- }, {
1505
- type: "button_group";
1506
- name: string;
1507
- options: string[];
1508
- style?: "row" | "stack" | "grid" | undefined;
1509
- }>>, z.ZodObject<{
1510
- type: z.ZodLiteral<"toggle">;
1511
- name: z.ZodString;
1512
- label: z.ZodString;
1513
- value: z.ZodDefault<z.ZodBoolean>;
1514
- }, z.core.$strip>, z.ZodObject<{
1515
- type: z.ZodLiteral<"bar_chart">;
1516
- bars: z.ZodArray<z.ZodObject<{
1517
- label: z.ZodString;
1518
- value: z.ZodNumber;
1519
- color: z.ZodOptional<z.ZodEnum<{
1520
- gray: "gray";
1521
- blue: "blue";
1522
- red: "red";
1523
- amber: "amber";
1524
- green: "green";
1525
- teal: "teal";
1526
- purple: "purple";
1527
- pink: "pink";
1528
- }>>;
1529
- }, z.core.$strip>>;
1530
- max: z.ZodOptional<z.ZodNumber>;
1531
- color: z.ZodOptional<z.ZodEnum<{
1532
- gray: "gray";
1533
- blue: "blue";
1534
- red: "red";
1535
- amber: "amber";
1536
- green: "green";
1537
- teal: "teal";
1538
- purple: "purple";
1539
- pink: "pink";
1540
- accent: "accent";
1541
- }>>;
1542
- }, z.core.$strip>], "type">>;
1543
- }, z.core.$strip>, z.ZodObject<{
1544
- type: z.ZodLiteral<"bar_chart">;
1545
- bars: z.ZodArray<z.ZodObject<{
1546
- label: z.ZodString;
1547
- value: z.ZodNumber;
1548
- color: z.ZodOptional<z.ZodEnum<{
1549
- gray: "gray";
1550
- blue: "blue";
1551
- red: "red";
1552
- amber: "amber";
1553
- green: "green";
1554
- teal: "teal";
1555
- purple: "purple";
1556
- pink: "pink";
1557
- }>>;
1558
- }, z.core.$strip>>;
1559
- max: z.ZodOptional<z.ZodNumber>;
1560
- color: z.ZodOptional<z.ZodEnum<{
1561
- gray: "gray";
1562
- blue: "blue";
1563
- red: "red";
1564
- amber: "amber";
1565
- green: "green";
1566
- teal: "teal";
1567
- purple: "purple";
1568
- pink: "pink";
1569
- accent: "accent";
1570
- }>>;
1571
- }, z.core.$strip>], "type">>;
1572
- }, z.core.$strict>;
1573
- buttons: z.ZodOptional<z.ZodArray<z.ZodObject<{
1574
- label: z.ZodString;
1575
- action: z.ZodEnum<{
1576
- post: "post";
1577
- link: "link";
1578
- mini_app: "mini_app";
1579
- client: "client";
1580
- }>;
1581
- target: z.ZodOptional<z.ZodString>;
1582
- client_action: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
1583
- type: z.ZodLiteral<"view_cast">;
1584
- hash: z.ZodString;
1585
- }, z.core.$strict>, z.ZodObject<{
1586
- type: z.ZodLiteral<"view_profile">;
1587
- fid: z.ZodNumber;
1588
- }, z.core.$strict>, z.ZodObject<{
1589
- type: z.ZodLiteral<"compose_cast">;
1590
- text: z.ZodOptional<z.ZodString>;
1591
- embeds: z.ZodOptional<z.ZodArray<z.ZodString>>;
1592
- parent: z.ZodOptional<z.ZodObject<{
1593
- type: z.ZodLiteral<"cast">;
1594
- hash: z.ZodString;
1595
- }, z.core.$strict>>;
1596
- channelKey: z.ZodOptional<z.ZodString>;
1597
- }, z.core.$strict>, z.ZodObject<{
1598
- type: z.ZodLiteral<"view_token">;
1599
- token: z.ZodString;
1600
- }, z.core.$strict>, z.ZodObject<{
1601
- type: z.ZodLiteral<"send_token">;
1602
- token: z.ZodOptional<z.ZodString>;
1603
- amount: z.ZodOptional<z.ZodString>;
1604
- recipientFid: z.ZodOptional<z.ZodNumber>;
1605
- recipientAddress: z.ZodOptional<z.ZodString>;
1606
- }, z.core.$strict>, z.ZodObject<{
1607
- type: z.ZodLiteral<"swap_token">;
1608
- sellToken: z.ZodOptional<z.ZodString>;
1609
- buyToken: z.ZodOptional<z.ZodString>;
1610
- sellAmount: z.ZodOptional<z.ZodString>;
1611
- }, z.core.$strict>], "type">>;
1612
- style: z.ZodOptional<z.ZodEnum<{
1613
- primary: "primary";
1614
- secondary: "secondary";
1615
- }>>;
1616
- }, z.core.$strip>>>;
1617
- }, z.core.$strict>;
1618
- }, z.core.$strict>;
1619
- export type FirstPageResponse = z.infer<typeof firstPageResponseSchema>;
1620
25
  export declare const payloadSchema: z.ZodObject<{
1621
26
  fid: z.ZodNumber;
1622
- inputs: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodObject<{
1623
- row: z.ZodNumber;
1624
- col: z.ZodNumber;
1625
- }, z.core.$strict>]>>>;
27
+ inputs: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodArray<z.ZodString>]>>>;
1626
28
  button_index: z.ZodNumber;
1627
29
  timestamp: z.ZodNumber;
1628
30
  }, z.core.$strict>;
@@ -1635,10 +37,7 @@ declare const snapGetActionSchema: z.ZodObject<{
1635
37
  export type SnapGetAction = z.infer<typeof snapGetActionSchema>;
1636
38
  declare const snapPostActionSchema: z.ZodObject<{
1637
39
  fid: z.ZodNumber;
1638
- inputs: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodObject<{
1639
- row: z.ZodNumber;
1640
- col: z.ZodNumber;
1641
- }, z.core.$strict>]>>>;
40
+ inputs: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodArray<z.ZodString>]>>>;
1642
41
  button_index: z.ZodNumber;
1643
42
  timestamp: z.ZodNumber;
1644
43
  type: z.ZodLiteral<"post">;
@@ -1648,26 +47,12 @@ export declare const snapActionSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
1648
47
  type: z.ZodLiteral<"get">;
1649
48
  }, z.core.$strip>, z.ZodObject<{
1650
49
  fid: z.ZodNumber;
1651
- inputs: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodObject<{
1652
- row: z.ZodNumber;
1653
- col: z.ZodNumber;
1654
- }, z.core.$strict>]>>>;
50
+ inputs: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodArray<z.ZodString>]>>>;
1655
51
  button_index: z.ZodNumber;
1656
52
  timestamp: z.ZodNumber;
1657
53
  type: z.ZodLiteral<"post">;
1658
54
  }, z.core.$strict>], "type">;
1659
55
  export type SnapAction = z.infer<typeof snapActionSchema>;
1660
- export type DataStoreValue = string | number | boolean | null | DataStoreValue[] | {
1661
- [key: string]: DataStoreValue;
1662
- };
1663
- export type SnapDataStoreOperations = {
1664
- get(key: string): Promise<DataStoreValue | null>;
1665
- set(key: string, value: DataStoreValue): Promise<void>;
1666
- };
1667
- export type SnapDataStore = SnapDataStoreOperations & {
1668
- withLock<T>(fn: (store: SnapDataStoreOperations) => Promise<T>): Promise<T>;
1669
- };
1670
- export declare function createDefaultDataStore(): SnapDataStore;
1671
56
  export type SnapContext = {
1672
57
  action: SnapAction;
1673
58
  request: Request;