@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.
- package/dist/constants.d.ts +0 -107
- package/dist/constants.js +0 -148
- package/dist/dataStore.d.ts +12 -0
- package/dist/dataStore.js +35 -0
- package/dist/index.d.ts +6 -3
- package/dist/index.js +5 -3
- package/dist/middleware.d.ts +3 -0
- package/dist/middleware.js +3 -0
- package/dist/react/accent-context.d.ts +6 -0
- package/dist/react/accent-context.js +10 -0
- package/dist/react/catalog-renderer.d.ts +5 -0
- package/dist/react/catalog-renderer.js +37 -0
- package/dist/react/components/action-button.d.ts +6 -0
- package/dist/react/components/action-button.js +22 -0
- package/dist/react/components/badge.d.ts +5 -0
- package/dist/react/components/badge.js +18 -0
- package/dist/react/components/icon.d.ts +7 -0
- package/dist/react/components/icon.js +60 -0
- package/dist/react/components/image.d.ts +5 -0
- package/dist/react/components/image.js +15 -0
- package/dist/react/components/input.d.ts +5 -0
- package/dist/react/components/input.js +18 -0
- package/dist/react/components/item-group.d.ts +7 -0
- package/dist/react/components/item-group.js +17 -0
- package/dist/react/components/item.d.ts +7 -0
- package/dist/react/components/item.js +9 -0
- package/dist/react/components/progress.d.ts +5 -0
- package/dist/react/components/progress.js +11 -0
- package/dist/react/components/separator.d.ts +5 -0
- package/dist/react/components/separator.js +7 -0
- package/dist/react/components/slider.d.ts +5 -0
- package/dist/react/components/slider.js +21 -0
- package/dist/react/components/stack.d.ts +7 -0
- package/dist/react/components/stack.js +32 -0
- package/dist/react/components/switch.d.ts +5 -0
- package/dist/react/components/switch.js +23 -0
- package/dist/react/components/text.d.ts +5 -0
- package/dist/react/components/text.js +25 -0
- package/dist/react/components/toggle-group.d.ts +5 -0
- package/dist/react/components/toggle-group.js +52 -0
- package/dist/react/hooks/use-snap-accent.d.ts +13 -0
- package/dist/react/hooks/use-snap-accent.js +32 -0
- package/dist/react/index.d.ts +47 -0
- package/dist/react/index.js +191 -0
- package/dist/react/lib/preview-primary-css.d.ts +6 -0
- package/dist/react/lib/preview-primary-css.js +43 -0
- package/dist/react/lib/resolve-palette-hex.d.ts +2 -0
- package/dist/react/lib/resolve-palette-hex.js +10 -0
- package/dist/schemas.d.ts +14 -1629
- package/dist/schemas.js +14 -526
- package/dist/ui/badge.d.ts +52 -0
- package/dist/ui/badge.js +9 -0
- package/dist/ui/button.d.ts +42 -28
- package/dist/ui/button.js +7 -9
- package/dist/ui/catalog.d.ts +280 -155
- package/dist/ui/catalog.js +102 -83
- package/dist/ui/icon.d.ts +56 -0
- package/dist/ui/icon.js +51 -0
- package/dist/ui/image.d.ts +1 -0
- package/dist/ui/image.js +2 -2
- package/dist/ui/index.d.ts +20 -22
- package/dist/ui/index.js +10 -11
- package/dist/ui/input.d.ts +17 -0
- package/dist/ui/input.js +13 -0
- package/dist/ui/item-group.d.ts +12 -0
- package/dist/ui/item-group.js +7 -0
- package/dist/ui/item.d.ts +14 -0
- package/dist/ui/item.js +9 -0
- package/dist/ui/progress.d.ts +1 -11
- package/dist/ui/progress.js +21 -4
- package/dist/ui/schema.js +3 -3
- package/dist/ui/separator.d.ts +9 -0
- package/dist/ui/separator.js +5 -0
- package/dist/ui/slider.d.ts +4 -3
- package/dist/ui/slider.js +34 -5
- package/dist/ui/stack.d.ts +22 -1
- package/dist/ui/stack.js +8 -1
- package/dist/ui/switch.d.ts +8 -0
- package/dist/ui/switch.js +7 -0
- package/dist/ui/text.d.ts +15 -7
- package/dist/ui/text.js +8 -4
- package/dist/ui/toggle-group.d.ts +23 -0
- package/dist/ui/toggle-group.js +19 -0
- package/dist/validator.d.ts +5 -1
- package/dist/validator.js +6 -136
- package/package.json +72 -52
- package/src/constants.ts +0 -179
- package/src/dataStore.ts +62 -0
- package/src/index.ts +11 -20
- package/src/middleware.ts +7 -0
- package/src/react/accent-context.tsx +29 -0
- package/src/react/catalog-renderer.tsx +39 -0
- package/src/react/components/action-button.tsx +48 -0
- package/src/react/components/badge.tsx +37 -0
- package/src/react/components/icon.tsx +115 -0
- package/src/react/components/image.tsx +33 -0
- package/src/react/components/input.tsx +36 -0
- package/src/react/components/item-group.tsx +43 -0
- package/src/react/components/item.tsx +33 -0
- package/src/react/components/progress.tsx +29 -0
- package/src/react/components/separator.tsx +14 -0
- package/src/react/components/slider.tsx +43 -0
- package/src/react/components/stack.tsx +55 -0
- package/src/react/components/switch.tsx +46 -0
- package/src/react/components/text.tsx +43 -0
- package/src/react/components/toggle-group.tsx +85 -0
- package/src/react/hooks/use-snap-accent.ts +45 -0
- package/src/react/index.tsx +321 -0
- package/src/react/lib/preview-primary-css.ts +57 -0
- package/src/react/lib/resolve-palette-hex.ts +20 -0
- package/src/schemas.ts +18 -644
- package/src/ui/badge.ts +13 -0
- package/src/ui/button.ts +9 -12
- package/src/ui/catalog.ts +106 -86
- package/src/ui/icon.ts +56 -0
- package/src/ui/image.ts +3 -2
- package/src/ui/index.ts +26 -29
- package/src/ui/input.ts +17 -0
- package/src/ui/item-group.ts +11 -0
- package/src/ui/item.ts +13 -0
- package/src/ui/progress.ts +25 -7
- package/src/ui/schema.ts +3 -3
- package/src/ui/separator.ts +9 -0
- package/src/ui/slider.ts +40 -10
- package/src/ui/stack.ts +9 -1
- package/src/ui/switch.ts +11 -0
- package/src/ui/text.ts +9 -4
- package/src/ui/toggle-group.ts +23 -0
- package/src/validator.ts +6 -176
- package/dist/ui/bar-chart.d.ts +0 -30
- package/dist/ui/bar-chart.js +0 -15
- package/dist/ui/button-group.d.ts +0 -19
- package/dist/ui/button-group.js +0 -18
- package/dist/ui/divider.d.ts +0 -3
- package/dist/ui/divider.js +0 -2
- package/dist/ui/grid.d.ts +0 -22
- package/dist/ui/grid.js +0 -16
- package/dist/ui/group.d.ts +0 -7
- package/dist/ui/group.js +0 -5
- package/dist/ui/list.d.ts +0 -13
- package/dist/ui/list.js +0 -13
- package/dist/ui/spacer.d.ts +0 -9
- package/dist/ui/spacer.js +0 -5
- package/dist/ui/text-input.d.ts +0 -7
- package/dist/ui/text-input.js +0 -12
- package/dist/ui/toggle.d.ts +0 -7
- package/dist/ui/toggle.js +0 -6
- package/src/ui/bar-chart.ts +0 -20
- package/src/ui/button-group.ts +0 -26
- package/src/ui/divider.ts +0 -5
- package/src/ui/grid.ts +0 -25
- package/src/ui/group.ts +0 -8
- package/src/ui/list.ts +0 -17
- package/src/ui/spacer.ts +0 -8
- package/src/ui/text-input.ts +0 -15
- package/src/ui/toggle.ts +0 -9
package/dist/ui/button.d.ts
CHANGED
|
@@ -1,34 +1,48 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
-
export declare const
|
|
3
|
-
|
|
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
|
-
|
|
22
|
-
|
|
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 =
|
|
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 {
|
|
3
|
-
export const
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
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;
|
package/dist/ui/catalog.d.ts
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
/**
|
|
3
|
-
*
|
|
4
|
-
*
|
|
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
|
-
|
|
37
|
+
badge: {
|
|
36
38
|
props: z.ZodObject<{
|
|
37
|
-
|
|
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
|
-
|
|
89
|
+
button: {
|
|
100
90
|
props: z.ZodObject<{
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
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
|
-
|
|
136
|
+
switch: {
|
|
114
137
|
props: z.ZodObject<{
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
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
|
-
|
|
144
|
+
toggle_group: {
|
|
137
145
|
props: z.ZodObject<{
|
|
138
146
|
name: z.ZodString;
|
|
139
|
-
|
|
140
|
-
|
|
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
|
-
|
|
162
|
+
input: {
|
|
145
163
|
props: z.ZodObject<{
|
|
146
164
|
name: z.ZodString;
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
165
|
+
type: z.ZodOptional<z.ZodEnum<{
|
|
166
|
+
number: "number";
|
|
167
|
+
text: "text";
|
|
168
|
+
}>>;
|
|
151
169
|
label: z.ZodOptional<z.ZodString>;
|
|
152
|
-
|
|
153
|
-
|
|
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
|
-
|
|
158
|
-
props: z.
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
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
|
|
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
|
-
|
|
188
|
+
item_group: {
|
|
178
189
|
props: z.ZodObject<{
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
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
|
-
|
|
201
|
+
icon: {
|
|
186
202
|
props: z.ZodObject<{
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
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
|
-
|
|
256
|
+
image: {
|
|
217
257
|
props: z.ZodObject<{
|
|
218
|
-
|
|
219
|
-
|
|
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
|
-
|
|
225
|
-
props: z.ZodObject<{
|
|
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
|
-
|
|
278
|
+
separator: {
|
|
229
279
|
props: z.ZodObject<{
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
399
|
+
sellToken: z.ZodOptional<z.ZodString>;
|
|
400
|
+
buyToken: z.ZodOptional<z.ZodString>;
|
|
276
401
|
}, z.core.$strip>;
|
|
277
402
|
};
|
|
278
403
|
};
|