@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
@@ -1,34 +1,48 @@
1
1
  import { z } from "zod";
2
- export declare const actionButtonProps: z.ZodObject<{
3
- label: z.ZodString;
4
- action: z.ZodEnum<{
5
- post: "post";
6
- link: "link";
7
- mini_app: "mini_app";
8
- client: "client";
9
- }>;
10
- target: z.ZodOptional<z.ZodString>;
11
- client_action: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
12
- style: z.ZodOptional<z.ZodEnum<{
13
- primary: "primary";
14
- secondary: "secondary";
15
- }>>;
16
- }, z.core.$strip>;
17
- export type ActionButtonProps = z.infer<typeof actionButtonProps>;
18
- /** Same schema as `actionButtonProps` (legacy export name). */
2
+ export declare const BUTTON_VARIANTS: readonly ["default", "secondary", "outline", "ghost"];
3
+ export declare const BUTTON_MAX_LABEL_CHARS = 30;
19
4
  export declare const buttonProps: z.ZodObject<{
20
5
  label: z.ZodString;
21
- action: z.ZodEnum<{
22
- post: "post";
23
- link: "link";
24
- mini_app: "mini_app";
25
- client: "client";
26
- }>;
27
- target: z.ZodOptional<z.ZodString>;
28
- client_action: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
29
- style: z.ZodOptional<z.ZodEnum<{
30
- primary: "primary";
6
+ variant: z.ZodOptional<z.ZodEnum<{
7
+ default: "default";
31
8
  secondary: "secondary";
9
+ outline: "outline";
10
+ ghost: "ghost";
11
+ }>>;
12
+ icon: z.ZodOptional<z.ZodEnum<{
13
+ check: "check";
14
+ repeat: "repeat";
15
+ "arrow-right": "arrow-right";
16
+ "arrow-left": "arrow-left";
17
+ "external-link": "external-link";
18
+ "chevron-right": "chevron-right";
19
+ x: "x";
20
+ "alert-triangle": "alert-triangle";
21
+ info: "info";
22
+ clock: "clock";
23
+ heart: "heart";
24
+ "message-circle": "message-circle";
25
+ share: "share";
26
+ user: "user";
27
+ users: "users";
28
+ star: "star";
29
+ trophy: "trophy";
30
+ zap: "zap";
31
+ flame: "flame";
32
+ gift: "gift";
33
+ image: "image";
34
+ play: "play";
35
+ pause: "pause";
36
+ wallet: "wallet";
37
+ coins: "coins";
38
+ plus: "plus";
39
+ minus: "minus";
40
+ "refresh-cw": "refresh-cw";
41
+ bookmark: "bookmark";
42
+ "thumbs-up": "thumbs-up";
43
+ "thumbs-down": "thumbs-down";
44
+ "trending-up": "trending-up";
45
+ "trending-down": "trending-down";
32
46
  }>>;
33
47
  }, z.core.$strip>;
34
- export type ButtonProps = ActionButtonProps;
48
+ export type ButtonProps = z.infer<typeof buttonProps>;
package/dist/ui/button.js CHANGED
@@ -1,11 +1,9 @@
1
1
  import { z } from "zod";
2
- import { BUTTON_ACTION_VALUES, BUTTON_STYLE_VALUES } from "../constants.js";
3
- export const actionButtonProps = z.object({
4
- label: z.string(),
5
- action: z.enum(BUTTON_ACTION_VALUES),
6
- target: z.string().optional(),
7
- client_action: z.record(z.string(), z.unknown()).optional(),
8
- style: z.enum(BUTTON_STYLE_VALUES).optional(),
2
+ import { ICON_NAMES } from "./icon.js";
3
+ export const BUTTON_VARIANTS = ["default", "secondary", "outline", "ghost"];
4
+ export const BUTTON_MAX_LABEL_CHARS = 30;
5
+ export const buttonProps = z.object({
6
+ label: z.string().min(1).max(BUTTON_MAX_LABEL_CHARS),
7
+ variant: z.enum(BUTTON_VARIANTS).optional(),
8
+ icon: z.enum(ICON_NAMES).optional(),
9
9
  });
10
- /** Same schema as `actionButtonProps` (legacy export name). */
11
- export const buttonProps = actionButtonProps;
@@ -1,7 +1,9 @@
1
1
  import { z } from "zod";
2
2
  /**
3
- * Basic catalog: one json-render component per snap element type, plus ActionButton for snap buttons.
4
- * Does not validate cross-field rules (media count, height budget); snap JSON still goes through `@farcaster/snap` validation.
3
+ * json-render catalog for snap elements.
4
+ *
5
+ * Component keys match the snap wire-format `type` strings.
6
+ * Action names are used directly in `on.press` bindings.
5
7
  */
6
8
  export declare const snapJsonRenderCatalog: import("@json-render/core").Catalog<{
7
9
  spec: import("@json-render/core").SchemaType<"object", {
@@ -32,56 +34,9 @@ export declare const snapJsonRenderCatalog: import("@json-render/core").Catalog<
32
34
  }>;
33
35
  }, {
34
36
  components: {
35
- Text: {
37
+ badge: {
36
38
  props: z.ZodObject<{
37
- style: z.ZodEnum<{
38
- title: "title";
39
- body: "body";
40
- caption: "caption";
41
- label: "label";
42
- }>;
43
- content: z.ZodString;
44
- align: z.ZodOptional<z.ZodEnum<{
45
- left: "left";
46
- center: "center";
47
- right: "right";
48
- }>>;
49
- }, z.core.$strip>;
50
- description: string;
51
- };
52
- Image: {
53
- props: z.ZodObject<{
54
- url: z.ZodString;
55
- aspect: z.ZodEnum<{
56
- "1:1": "1:1";
57
- "16:9": "16:9";
58
- "4:3": "4:3";
59
- "3:4": "3:4";
60
- "9:16": "9:16";
61
- }>;
62
- alt: z.ZodOptional<z.ZodString>;
63
- }, z.core.$strip>;
64
- description: string;
65
- };
66
- Divider: {
67
- props: z.ZodObject<{}, z.core.$strip>;
68
- description: string;
69
- };
70
- Spacer: {
71
- props: z.ZodObject<{
72
- size: z.ZodDefault<z.ZodEnum<{
73
- small: "small";
74
- medium: "medium";
75
- large: "large";
76
- }>>;
77
- }, z.core.$strip>;
78
- description: string;
79
- };
80
- Progress: {
81
- props: z.ZodObject<{
82
- value: z.ZodNumber;
83
- max: z.ZodNumber;
84
- label: z.ZodOptional<z.ZodString>;
39
+ label: z.ZodString;
85
40
  color: z.ZodOptional<z.ZodEnum<{
86
41
  gray: "gray";
87
42
  blue: "blue";
@@ -93,112 +48,193 @@ export declare const snapJsonRenderCatalog: import("@json-render/core").Catalog<
93
48
  pink: "pink";
94
49
  accent: "accent";
95
50
  }>>;
51
+ icon: z.ZodOptional<z.ZodEnum<{
52
+ check: "check";
53
+ repeat: "repeat";
54
+ "arrow-right": "arrow-right";
55
+ "arrow-left": "arrow-left";
56
+ "external-link": "external-link";
57
+ "chevron-right": "chevron-right";
58
+ x: "x";
59
+ "alert-triangle": "alert-triangle";
60
+ info: "info";
61
+ clock: "clock";
62
+ heart: "heart";
63
+ "message-circle": "message-circle";
64
+ share: "share";
65
+ user: "user";
66
+ users: "users";
67
+ star: "star";
68
+ trophy: "trophy";
69
+ zap: "zap";
70
+ flame: "flame";
71
+ gift: "gift";
72
+ image: "image";
73
+ play: "play";
74
+ pause: "pause";
75
+ wallet: "wallet";
76
+ coins: "coins";
77
+ plus: "plus";
78
+ minus: "minus";
79
+ "refresh-cw": "refresh-cw";
80
+ bookmark: "bookmark";
81
+ "thumbs-up": "thumbs-up";
82
+ "thumbs-down": "thumbs-down";
83
+ "trending-up": "trending-up";
84
+ "trending-down": "trending-down";
85
+ }>>;
96
86
  }, z.core.$strip>;
97
87
  description: string;
98
88
  };
99
- List: {
89
+ button: {
100
90
  props: z.ZodObject<{
101
- style: z.ZodOptional<z.ZodEnum<{
102
- ordered: "ordered";
103
- unordered: "unordered";
104
- plain: "plain";
91
+ label: z.ZodString;
92
+ variant: z.ZodOptional<z.ZodEnum<{
93
+ default: "default";
94
+ secondary: "secondary";
95
+ outline: "outline";
96
+ ghost: "ghost";
97
+ }>>;
98
+ icon: z.ZodOptional<z.ZodEnum<{
99
+ check: "check";
100
+ repeat: "repeat";
101
+ "arrow-right": "arrow-right";
102
+ "arrow-left": "arrow-left";
103
+ "external-link": "external-link";
104
+ "chevron-right": "chevron-right";
105
+ x: "x";
106
+ "alert-triangle": "alert-triangle";
107
+ info: "info";
108
+ clock: "clock";
109
+ heart: "heart";
110
+ "message-circle": "message-circle";
111
+ share: "share";
112
+ user: "user";
113
+ users: "users";
114
+ star: "star";
115
+ trophy: "trophy";
116
+ zap: "zap";
117
+ flame: "flame";
118
+ gift: "gift";
119
+ image: "image";
120
+ play: "play";
121
+ pause: "pause";
122
+ wallet: "wallet";
123
+ coins: "coins";
124
+ plus: "plus";
125
+ minus: "minus";
126
+ "refresh-cw": "refresh-cw";
127
+ bookmark: "bookmark";
128
+ "thumbs-up": "thumbs-up";
129
+ "thumbs-down": "thumbs-down";
130
+ "trending-up": "trending-up";
131
+ "trending-down": "trending-down";
105
132
  }>>;
106
- items: z.ZodArray<z.ZodObject<{
107
- content: z.ZodString;
108
- trailing: z.ZodOptional<z.ZodString>;
109
- }, z.core.$strip>>;
110
133
  }, z.core.$strip>;
111
134
  description: string;
112
135
  };
113
- Grid: {
136
+ switch: {
114
137
  props: z.ZodObject<{
115
- cols: z.ZodNumber;
116
- rows: z.ZodNumber;
117
- cells: z.ZodArray<z.ZodObject<{
118
- row: z.ZodNumber;
119
- col: z.ZodNumber;
120
- color: z.ZodOptional<z.ZodString>;
121
- content: z.ZodOptional<z.ZodString>;
122
- }, z.core.$strip>>;
123
- cellSize: z.ZodOptional<z.ZodEnum<{
124
- auto: "auto";
125
- square: "square";
126
- }>>;
127
- gap: z.ZodOptional<z.ZodEnum<{
128
- small: "small";
129
- medium: "medium";
130
- none: "none";
131
- }>>;
132
- interactive: z.ZodOptional<z.ZodBoolean>;
138
+ name: z.ZodString;
139
+ label: z.ZodOptional<z.ZodString>;
140
+ defaultChecked: z.ZodOptional<z.ZodBoolean>;
133
141
  }, z.core.$strip>;
134
142
  description: string;
135
143
  };
136
- TextInput: {
144
+ toggle_group: {
137
145
  props: z.ZodObject<{
138
146
  name: z.ZodString;
139
- placeholder: z.ZodOptional<z.ZodString>;
140
- maxLength: z.ZodOptional<z.ZodNumber>;
147
+ label: z.ZodOptional<z.ZodString>;
148
+ multiple: z.ZodOptional<z.ZodBoolean>;
149
+ orientation: z.ZodOptional<z.ZodEnum<{
150
+ horizontal: "horizontal";
151
+ vertical: "vertical";
152
+ }>>;
153
+ defaultValue: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
154
+ options: z.ZodArray<z.ZodString>;
155
+ variant: z.ZodOptional<z.ZodEnum<{
156
+ default: "default";
157
+ outline: "outline";
158
+ }>>;
141
159
  }, z.core.$strip>;
142
160
  description: string;
143
161
  };
144
- Slider: {
162
+ input: {
145
163
  props: z.ZodObject<{
146
164
  name: z.ZodString;
147
- min: z.ZodNumber;
148
- max: z.ZodNumber;
149
- step: z.ZodOptional<z.ZodNumber>;
150
- value: z.ZodOptional<z.ZodNumber>;
165
+ type: z.ZodOptional<z.ZodEnum<{
166
+ number: "number";
167
+ text: "text";
168
+ }>>;
151
169
  label: z.ZodOptional<z.ZodString>;
152
- minLabel: z.ZodOptional<z.ZodString>;
153
- maxLabel: z.ZodOptional<z.ZodString>;
170
+ placeholder: z.ZodOptional<z.ZodString>;
171
+ defaultValue: z.ZodOptional<z.ZodString>;
172
+ maxLength: z.ZodOptional<z.ZodNumber>;
154
173
  }, z.core.$strip>;
155
174
  description: string;
156
175
  };
157
- ButtonGroup: {
158
- props: z.ZodPipe<z.ZodObject<{
159
- name: z.ZodString;
160
- options: z.ZodArray<z.ZodString>;
161
- style: z.ZodOptional<z.ZodEnum<{
162
- row: "row";
163
- stack: "stack";
164
- grid: "grid";
176
+ item: {
177
+ props: z.ZodObject<{
178
+ title: z.ZodString;
179
+ description: z.ZodOptional<z.ZodString>;
180
+ variant: z.ZodOptional<z.ZodEnum<{
181
+ default: "default";
182
+ outline: "outline";
183
+ muted: "muted";
165
184
  }>>;
166
- }, z.core.$strip>, z.ZodTransform<{
167
- style: "row" | "stack" | "grid";
168
- name: string;
169
- options: string[];
170
- }, {
171
- name: string;
172
- options: string[];
173
- style?: "row" | "stack" | "grid" | undefined;
174
- }>>;
185
+ }, z.core.$strip>;
175
186
  description: string;
176
187
  };
177
- Toggle: {
188
+ item_group: {
178
189
  props: z.ZodObject<{
179
- name: z.ZodString;
180
- label: z.ZodString;
181
- value: z.ZodDefault<z.ZodBoolean>;
190
+ border: z.ZodOptional<z.ZodBoolean>;
191
+ separator: z.ZodOptional<z.ZodBoolean>;
192
+ gap: z.ZodOptional<z.ZodEnum<{
193
+ sm: "sm";
194
+ md: "md";
195
+ none: "none";
196
+ lg: "lg";
197
+ }>>;
182
198
  }, z.core.$strip>;
183
199
  description: string;
184
200
  };
185
- BarChart: {
201
+ icon: {
186
202
  props: z.ZodObject<{
187
- bars: z.ZodArray<z.ZodObject<{
188
- label: z.ZodString;
189
- value: z.ZodNumber;
190
- color: z.ZodOptional<z.ZodEnum<{
191
- gray: "gray";
192
- blue: "blue";
193
- red: "red";
194
- amber: "amber";
195
- green: "green";
196
- teal: "teal";
197
- purple: "purple";
198
- pink: "pink";
199
- }>>;
200
- }, z.core.$strip>>;
201
- max: z.ZodOptional<z.ZodNumber>;
203
+ name: z.ZodEnum<{
204
+ check: "check";
205
+ repeat: "repeat";
206
+ "arrow-right": "arrow-right";
207
+ "arrow-left": "arrow-left";
208
+ "external-link": "external-link";
209
+ "chevron-right": "chevron-right";
210
+ x: "x";
211
+ "alert-triangle": "alert-triangle";
212
+ info: "info";
213
+ clock: "clock";
214
+ heart: "heart";
215
+ "message-circle": "message-circle";
216
+ share: "share";
217
+ user: "user";
218
+ users: "users";
219
+ star: "star";
220
+ trophy: "trophy";
221
+ zap: "zap";
222
+ flame: "flame";
223
+ gift: "gift";
224
+ image: "image";
225
+ play: "play";
226
+ pause: "pause";
227
+ wallet: "wallet";
228
+ coins: "coins";
229
+ plus: "plus";
230
+ minus: "minus";
231
+ "refresh-cw": "refresh-cw";
232
+ bookmark: "bookmark";
233
+ "thumbs-up": "thumbs-up";
234
+ "thumbs-down": "thumbs-down";
235
+ "trending-up": "trending-up";
236
+ "trending-down": "trending-down";
237
+ }>;
202
238
  color: z.ZodOptional<z.ZodEnum<{
203
239
  gray: "gray";
204
240
  blue: "blue";
@@ -210,69 +246,158 @@ export declare const snapJsonRenderCatalog: import("@json-render/core").Catalog<
210
246
  pink: "pink";
211
247
  accent: "accent";
212
248
  }>>;
249
+ size: z.ZodOptional<z.ZodEnum<{
250
+ sm: "sm";
251
+ md: "md";
252
+ }>>;
213
253
  }, z.core.$strip>;
214
254
  description: string;
215
255
  };
216
- Group: {
256
+ image: {
217
257
  props: z.ZodObject<{
218
- layout: z.ZodEnum<{
219
- row: "row";
258
+ url: z.ZodString;
259
+ aspect: z.ZodEnum<{
260
+ "1:1": "1:1";
261
+ "16:9": "16:9";
262
+ "4:3": "4:3";
263
+ "3:4": "3:4";
264
+ "9:16": "9:16";
220
265
  }>;
266
+ alt: z.ZodOptional<z.ZodString>;
221
267
  }, z.core.$strip>;
222
268
  description: string;
223
269
  };
224
- Stack: {
225
- props: z.ZodObject<{}, z.core.$strip>;
270
+ progress: {
271
+ props: z.ZodObject<{
272
+ value: z.ZodNumber;
273
+ max: z.ZodNumber;
274
+ label: z.ZodOptional<z.ZodString>;
275
+ }, z.core.$strip>;
226
276
  description: string;
227
277
  };
228
- ActionButton: {
278
+ separator: {
229
279
  props: z.ZodObject<{
230
- label: z.ZodString;
231
- action: z.ZodEnum<{
232
- post: "post";
233
- link: "link";
234
- mini_app: "mini_app";
235
- client: "client";
236
- }>;
237
- target: z.ZodOptional<z.ZodString>;
238
- client_action: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
239
- style: z.ZodOptional<z.ZodEnum<{
240
- primary: "primary";
241
- secondary: "secondary";
280
+ orientation: z.ZodOptional<z.ZodEnum<{
281
+ horizontal: "horizontal";
282
+ vertical: "vertical";
283
+ }>>;
284
+ }, z.core.$strip>;
285
+ description: string;
286
+ };
287
+ slider: {
288
+ props: z.ZodObject<{
289
+ name: z.ZodString;
290
+ min: z.ZodNumber;
291
+ max: z.ZodNumber;
292
+ step: z.ZodOptional<z.ZodNumber>;
293
+ defaultValue: z.ZodOptional<z.ZodNumber>;
294
+ label: z.ZodOptional<z.ZodString>;
295
+ }, z.core.$strip>;
296
+ description: string;
297
+ };
298
+ stack: {
299
+ props: z.ZodObject<{
300
+ direction: z.ZodOptional<z.ZodEnum<{
301
+ horizontal: "horizontal";
302
+ vertical: "vertical";
303
+ }>>;
304
+ gap: z.ZodOptional<z.ZodEnum<{
305
+ sm: "sm";
306
+ md: "md";
307
+ none: "none";
308
+ lg: "lg";
309
+ }>>;
310
+ justify: z.ZodOptional<z.ZodEnum<{
311
+ start: "start";
312
+ center: "center";
313
+ end: "end";
314
+ between: "between";
315
+ around: "around";
316
+ }>>;
317
+ }, z.core.$strip>;
318
+ description: string;
319
+ };
320
+ text: {
321
+ props: z.ZodObject<{
322
+ content: z.ZodString;
323
+ size: z.ZodOptional<z.ZodEnum<{
324
+ sm: "sm";
325
+ md: "md";
326
+ lg: "lg";
327
+ }>>;
328
+ weight: z.ZodOptional<z.ZodEnum<{
329
+ bold: "bold";
330
+ medium: "medium";
331
+ normal: "normal";
332
+ }>>;
333
+ align: z.ZodOptional<z.ZodEnum<{
334
+ center: "center";
335
+ left: "left";
336
+ right: "right";
242
337
  }>>;
243
338
  }, z.core.$strip>;
244
339
  description: string;
245
340
  };
246
341
  };
247
342
  actions: {
248
- snap_post: {
343
+ submit: {
249
344
  description: string;
250
345
  params: z.ZodObject<{
251
- button_index: z.ZodNumber;
252
346
  target: z.ZodString;
253
- label: z.ZodOptional<z.ZodString>;
254
- style: z.ZodOptional<z.ZodEnum<{
255
- primary: "primary";
256
- secondary: "secondary";
257
- }>>;
258
347
  }, z.core.$strip>;
259
348
  };
260
- snap_link: {
349
+ open_url: {
261
350
  description: string;
262
351
  params: z.ZodObject<{
263
352
  target: z.ZodString;
264
353
  }, z.core.$strip>;
265
354
  };
266
- snap_mini_app: {
355
+ open_mini_app: {
267
356
  description: string;
268
357
  params: z.ZodObject<{
269
358
  target: z.ZodString;
270
359
  }, z.core.$strip>;
271
360
  };
272
- snap_client: {
361
+ view_cast: {
362
+ description: string;
363
+ params: z.ZodObject<{
364
+ hash: z.ZodString;
365
+ }, z.core.$strip>;
366
+ };
367
+ view_profile: {
368
+ description: string;
369
+ params: z.ZodObject<{
370
+ fid: z.ZodNumber;
371
+ }, z.core.$strip>;
372
+ };
373
+ compose_cast: {
374
+ description: string;
375
+ params: z.ZodObject<{
376
+ text: z.ZodOptional<z.ZodString>;
377
+ channelKey: z.ZodOptional<z.ZodString>;
378
+ embeds: z.ZodOptional<z.ZodArray<z.ZodString>>;
379
+ }, z.core.$strip>;
380
+ };
381
+ view_token: {
382
+ description: string;
383
+ params: z.ZodObject<{
384
+ token: z.ZodString;
385
+ }, z.core.$strip>;
386
+ };
387
+ send_token: {
388
+ description: string;
389
+ params: z.ZodObject<{
390
+ token: z.ZodString;
391
+ amount: z.ZodOptional<z.ZodString>;
392
+ recipientFid: z.ZodOptional<z.ZodNumber>;
393
+ recipientAddress: z.ZodOptional<z.ZodString>;
394
+ }, z.core.$strip>;
395
+ };
396
+ swap_token: {
273
397
  description: string;
274
398
  params: z.ZodObject<{
275
- client_action: z.ZodRecord<z.ZodString, z.ZodUnknown>;
399
+ sellToken: z.ZodOptional<z.ZodString>;
400
+ buyToken: z.ZodOptional<z.ZodString>;
276
401
  }, z.core.$strip>;
277
402
  };
278
403
  };