@gxpl/sdk 0.0.20 → 0.0.22
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/lib/sdk/schemas/article/ItemBase.schema.d.ts +44 -4
- package/lib/sdk/schemas/article/ItemBase.schema.js +8 -1
- package/lib/sdk/schemas/article/RichTextItem.schema.d.ts +27 -2
- package/lib/sdk/schemas/project/Project.schema.d.ts +4 -4
- package/lib/sdk/types/article/Item.d.ts +0 -4
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { AreaAnchor, DimensionMode } from '../../types/article/ItemArea';
|
|
3
|
-
export declare const Link: z.ZodObject<{
|
|
3
|
+
export declare const Link: z.ZodUnion<[z.ZodObject<{
|
|
4
4
|
url: z.ZodString;
|
|
5
5
|
target: z.ZodString;
|
|
6
6
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -9,7 +9,22 @@ export declare const Link: z.ZodObject<{
|
|
|
9
9
|
}, {
|
|
10
10
|
url: string;
|
|
11
11
|
target: string;
|
|
12
|
-
}
|
|
12
|
+
}>, z.ZodObject<{
|
|
13
|
+
value: z.ZodString;
|
|
14
|
+
animation: z.ZodEnum<["fade", "slide", "reveal"]>;
|
|
15
|
+
duration: z.ZodNumber;
|
|
16
|
+
direction: z.ZodEnum<["north", "west", "south", "east"]>;
|
|
17
|
+
}, "strip", z.ZodTypeAny, {
|
|
18
|
+
value: string;
|
|
19
|
+
duration: number;
|
|
20
|
+
animation: "slide" | "fade" | "reveal";
|
|
21
|
+
direction: "north" | "east" | "south" | "west";
|
|
22
|
+
}, {
|
|
23
|
+
value: string;
|
|
24
|
+
duration: number;
|
|
25
|
+
animation: "slide" | "fade" | "reveal";
|
|
26
|
+
direction: "north" | "east" | "south" | "west";
|
|
27
|
+
}>]>;
|
|
13
28
|
export declare const CompoundSettingsSchema: z.ZodObject<{
|
|
14
29
|
positionAnchor: z.ZodNativeEnum<typeof AreaAnchor>;
|
|
15
30
|
widthMode: z.ZodNativeEnum<typeof DimensionMode>;
|
|
@@ -60,7 +75,7 @@ export declare const ItemBaseSchema: z.ZodObject<{
|
|
|
60
75
|
anchorSide?: import("../../types/article/ItemArea").AnchorSide | undefined;
|
|
61
76
|
}>;
|
|
62
77
|
hidden: z.ZodBoolean;
|
|
63
|
-
link: z.ZodOptional<z.ZodObject<{
|
|
78
|
+
link: z.ZodOptional<z.ZodUnion<[z.ZodObject<{
|
|
64
79
|
url: z.ZodString;
|
|
65
80
|
target: z.ZodString;
|
|
66
81
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -69,7 +84,22 @@ export declare const ItemBaseSchema: z.ZodObject<{
|
|
|
69
84
|
}, {
|
|
70
85
|
url: string;
|
|
71
86
|
target: string;
|
|
72
|
-
}
|
|
87
|
+
}>, z.ZodObject<{
|
|
88
|
+
value: z.ZodString;
|
|
89
|
+
animation: z.ZodEnum<["fade", "slide", "reveal"]>;
|
|
90
|
+
duration: z.ZodNumber;
|
|
91
|
+
direction: z.ZodEnum<["north", "west", "south", "east"]>;
|
|
92
|
+
}, "strip", z.ZodTypeAny, {
|
|
93
|
+
value: string;
|
|
94
|
+
duration: number;
|
|
95
|
+
animation: "slide" | "fade" | "reveal";
|
|
96
|
+
direction: "north" | "east" | "south" | "west";
|
|
97
|
+
}, {
|
|
98
|
+
value: string;
|
|
99
|
+
duration: number;
|
|
100
|
+
animation: "slide" | "fade" | "reveal";
|
|
101
|
+
direction: "north" | "east" | "south" | "west";
|
|
102
|
+
}>]>>;
|
|
73
103
|
compoundSettings: z.ZodOptional<z.ZodObject<{
|
|
74
104
|
positionAnchor: z.ZodNativeEnum<typeof AreaAnchor>;
|
|
75
105
|
widthMode: z.ZodNativeEnum<typeof DimensionMode>;
|
|
@@ -101,6 +131,11 @@ export declare const ItemBaseSchema: z.ZodObject<{
|
|
|
101
131
|
link?: {
|
|
102
132
|
url: string;
|
|
103
133
|
target: string;
|
|
134
|
+
} | {
|
|
135
|
+
value: string;
|
|
136
|
+
duration: number;
|
|
137
|
+
animation: "slide" | "fade" | "reveal";
|
|
138
|
+
direction: "north" | "east" | "south" | "west";
|
|
104
139
|
} | undefined;
|
|
105
140
|
compoundSettings?: {
|
|
106
141
|
positionAnchor: AreaAnchor;
|
|
@@ -125,6 +160,11 @@ export declare const ItemBaseSchema: z.ZodObject<{
|
|
|
125
160
|
link?: {
|
|
126
161
|
url: string;
|
|
127
162
|
target: string;
|
|
163
|
+
} | {
|
|
164
|
+
value: string;
|
|
165
|
+
duration: number;
|
|
166
|
+
animation: "slide" | "fade" | "reveal";
|
|
167
|
+
direction: "north" | "east" | "south" | "west";
|
|
128
168
|
} | undefined;
|
|
129
169
|
compoundSettings?: {
|
|
130
170
|
positionAnchor: AreaAnchor;
|
|
@@ -4,10 +4,17 @@ exports.ItemBaseSchema = exports.CompoundSettingsSchema = exports.Link = void 0;
|
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
5
|
const ItemArea_schema_1 = require("./ItemArea.schema");
|
|
6
6
|
const ItemArea_1 = require("../../types/article/ItemArea");
|
|
7
|
-
|
|
7
|
+
const UrlLinkSchema = zod_1.z.object({
|
|
8
8
|
url: zod_1.z.string().min(1),
|
|
9
9
|
target: zod_1.z.string().min(1)
|
|
10
10
|
});
|
|
11
|
+
const ClickLinkSchema = zod_1.z.object({
|
|
12
|
+
value: zod_1.z.string().min(1),
|
|
13
|
+
animation: zod_1.z.enum(['fade', 'slide', 'reveal']),
|
|
14
|
+
duration: zod_1.z.number(),
|
|
15
|
+
direction: zod_1.z.enum(['north', 'west', 'south', 'east'])
|
|
16
|
+
});
|
|
17
|
+
exports.Link = zod_1.z.union([UrlLinkSchema, ClickLinkSchema]);
|
|
11
18
|
exports.CompoundSettingsSchema = zod_1.z.object({
|
|
12
19
|
positionAnchor: zod_1.z.nativeEnum(ItemArea_1.AreaAnchor),
|
|
13
20
|
widthMode: zod_1.z.nativeEnum(ItemArea_1.DimensionMode),
|
|
@@ -71,7 +71,7 @@ export declare const RichTextItemSchema: z.ZodObject<{
|
|
|
71
71
|
anchorSide?: import("../../..").AnchorSide | undefined;
|
|
72
72
|
}>;
|
|
73
73
|
hidden: z.ZodBoolean;
|
|
74
|
-
link: z.ZodOptional<z.ZodObject<{
|
|
74
|
+
link: z.ZodOptional<z.ZodUnion<[z.ZodObject<{
|
|
75
75
|
url: z.ZodString;
|
|
76
76
|
target: z.ZodString;
|
|
77
77
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -80,7 +80,22 @@ export declare const RichTextItemSchema: z.ZodObject<{
|
|
|
80
80
|
}, {
|
|
81
81
|
url: string;
|
|
82
82
|
target: string;
|
|
83
|
-
}
|
|
83
|
+
}>, z.ZodObject<{
|
|
84
|
+
value: z.ZodString;
|
|
85
|
+
animation: z.ZodEnum<["fade", "slide", "reveal"]>;
|
|
86
|
+
duration: z.ZodNumber;
|
|
87
|
+
direction: z.ZodEnum<["north", "west", "south", "east"]>;
|
|
88
|
+
}, "strip", z.ZodTypeAny, {
|
|
89
|
+
value: string;
|
|
90
|
+
duration: number;
|
|
91
|
+
animation: "slide" | "fade" | "reveal";
|
|
92
|
+
direction: "north" | "east" | "south" | "west";
|
|
93
|
+
}, {
|
|
94
|
+
value: string;
|
|
95
|
+
duration: number;
|
|
96
|
+
animation: "slide" | "fade" | "reveal";
|
|
97
|
+
direction: "north" | "east" | "south" | "west";
|
|
98
|
+
}>]>>;
|
|
84
99
|
compoundSettings: z.ZodOptional<z.ZodObject<{
|
|
85
100
|
positionAnchor: z.ZodNativeEnum<typeof import("../../..").AreaAnchor>;
|
|
86
101
|
widthMode: z.ZodNativeEnum<typeof import("../../..").DimensionMode>;
|
|
@@ -1168,6 +1183,11 @@ export declare const RichTextItemSchema: z.ZodObject<{
|
|
|
1168
1183
|
link?: {
|
|
1169
1184
|
url: string;
|
|
1170
1185
|
target: string;
|
|
1186
|
+
} | {
|
|
1187
|
+
value: string;
|
|
1188
|
+
duration: number;
|
|
1189
|
+
animation: "slide" | "fade" | "reveal";
|
|
1190
|
+
direction: "north" | "east" | "south" | "west";
|
|
1171
1191
|
} | undefined;
|
|
1172
1192
|
compoundSettings?: {
|
|
1173
1193
|
positionAnchor: import("../../..").AreaAnchor;
|
|
@@ -1355,6 +1375,11 @@ export declare const RichTextItemSchema: z.ZodObject<{
|
|
|
1355
1375
|
link?: {
|
|
1356
1376
|
url: string;
|
|
1357
1377
|
target: string;
|
|
1378
|
+
} | {
|
|
1379
|
+
value: string;
|
|
1380
|
+
duration: number;
|
|
1381
|
+
animation: "slide" | "fade" | "reveal";
|
|
1382
|
+
direction: "north" | "east" | "south" | "west";
|
|
1358
1383
|
} | undefined;
|
|
1359
1384
|
compoundSettings?: {
|
|
1360
1385
|
positionAnchor: import("../../..").AreaAnchor;
|
|
@@ -405,14 +405,14 @@ export declare const ProjectSchema: z.ZodObject<{
|
|
|
405
405
|
direction: z.ZodEnum<["north", "east", "south", "west"]>;
|
|
406
406
|
}, "strip", z.ZodTypeAny, {
|
|
407
407
|
type: "slide" | "fade";
|
|
408
|
+
direction: "north" | "east" | "south" | "west";
|
|
408
409
|
from: string;
|
|
409
410
|
to: string;
|
|
410
|
-
direction: "north" | "east" | "south" | "west";
|
|
411
411
|
}, {
|
|
412
412
|
type: "slide" | "fade";
|
|
413
|
+
direction: "north" | "east" | "south" | "west";
|
|
413
414
|
from: string;
|
|
414
415
|
to: string;
|
|
415
|
-
direction: "north" | "east" | "south" | "west";
|
|
416
416
|
}>, "many">;
|
|
417
417
|
foreground: z.ZodObject<{
|
|
418
418
|
id: z.ZodString;
|
|
@@ -1036,9 +1036,9 @@ export declare const ProjectSchema: z.ZodObject<{
|
|
|
1036
1036
|
};
|
|
1037
1037
|
relations: {
|
|
1038
1038
|
type: "slide" | "fade";
|
|
1039
|
+
direction: "north" | "east" | "south" | "west";
|
|
1039
1040
|
from: string;
|
|
1040
1041
|
to: string;
|
|
1041
|
-
direction: "north" | "east" | "south" | "west";
|
|
1042
1042
|
}[];
|
|
1043
1043
|
foreground: {
|
|
1044
1044
|
color: string | null;
|
|
@@ -1182,9 +1182,9 @@ export declare const ProjectSchema: z.ZodObject<{
|
|
|
1182
1182
|
};
|
|
1183
1183
|
relations: {
|
|
1184
1184
|
type: "slide" | "fade";
|
|
1185
|
+
direction: "north" | "east" | "south" | "west";
|
|
1185
1186
|
from: string;
|
|
1186
1187
|
to: string;
|
|
1187
|
-
direction: "north" | "east" | "south" | "west";
|
|
1188
1188
|
}[];
|
|
1189
1189
|
foreground: {
|
|
1190
1190
|
color: string | null;
|