@webstudio-is/sdk 0.114.0 → 0.116.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/lib/index.js CHANGED
@@ -138,6 +138,10 @@ var DataSourceVariableValue = z4.union([
138
138
  z4.object({
139
139
  type: z4.literal("string[]"),
140
140
  value: z4.array(z4.string())
141
+ }),
142
+ z4.object({
143
+ type: z4.literal("json"),
144
+ value: z4.unknown()
141
145
  })
142
146
  ]);
143
147
  var DataSource = z4.union([
@@ -183,6 +187,11 @@ var Prop = z5.union([
183
187
  type: z5.literal("boolean"),
184
188
  value: z5.boolean()
185
189
  }),
190
+ z5.object({
191
+ ...baseProp,
192
+ type: z5.literal("json"),
193
+ value: z5.unknown()
194
+ }),
186
195
  z5.object({
187
196
  ...baseProp,
188
197
  type: z5.literal("asset"),
@@ -212,6 +221,11 @@ var Prop = z5.union([
212
221
  // data source id
213
222
  value: z5.string()
214
223
  }),
224
+ z5.object({
225
+ ...baseProp,
226
+ type: z5.literal("expression"),
227
+ value: z5.string()
228
+ }),
215
229
  z5.object({
216
230
  ...baseProp,
217
231
  type: z5.literal("action"),
@@ -35,6 +35,15 @@ export declare const DataSourceVariableValue: z.ZodUnion<[z.ZodObject<{
35
35
  }, {
36
36
  value: string[];
37
37
  type: "string[]";
38
+ }>, z.ZodObject<{
39
+ type: z.ZodLiteral<"json">;
40
+ value: z.ZodUnknown;
41
+ }, "strip", z.ZodTypeAny, {
42
+ type: "json";
43
+ value?: unknown;
44
+ }, {
45
+ type: "json";
46
+ value?: unknown;
38
47
  }>]>;
39
48
  export declare const DataSource: z.ZodUnion<[z.ZodObject<{
40
49
  type: z.ZodLiteral<"variable">;
@@ -77,6 +86,15 @@ export declare const DataSource: z.ZodUnion<[z.ZodObject<{
77
86
  }, {
78
87
  value: string[];
79
88
  type: "string[]";
89
+ }>, z.ZodObject<{
90
+ type: z.ZodLiteral<"json">;
91
+ value: z.ZodUnknown;
92
+ }, "strip", z.ZodTypeAny, {
93
+ type: "json";
94
+ value?: unknown;
95
+ }, {
96
+ type: "json";
97
+ value?: unknown;
80
98
  }>]>;
81
99
  }, "strip", z.ZodTypeAny, {
82
100
  value: {
@@ -91,6 +109,9 @@ export declare const DataSource: z.ZodUnion<[z.ZodObject<{
91
109
  } | {
92
110
  value: string[];
93
111
  type: "string[]";
112
+ } | {
113
+ type: "json";
114
+ value?: unknown;
94
115
  };
95
116
  type: "variable";
96
117
  name: string;
@@ -109,6 +130,9 @@ export declare const DataSource: z.ZodUnion<[z.ZodObject<{
109
130
  } | {
110
131
  value: string[];
111
132
  type: "string[]";
133
+ } | {
134
+ type: "json";
135
+ value?: unknown;
112
136
  };
113
137
  type: "variable";
114
138
  name: string;
@@ -175,6 +199,15 @@ export declare const DataSources: z.ZodMap<z.ZodString, z.ZodUnion<[z.ZodObject<
175
199
  }, {
176
200
  value: string[];
177
201
  type: "string[]";
202
+ }>, z.ZodObject<{
203
+ type: z.ZodLiteral<"json">;
204
+ value: z.ZodUnknown;
205
+ }, "strip", z.ZodTypeAny, {
206
+ type: "json";
207
+ value?: unknown;
208
+ }, {
209
+ type: "json";
210
+ value?: unknown;
178
211
  }>]>;
179
212
  }, "strip", z.ZodTypeAny, {
180
213
  value: {
@@ -189,6 +222,9 @@ export declare const DataSources: z.ZodMap<z.ZodString, z.ZodUnion<[z.ZodObject<
189
222
  } | {
190
223
  value: string[];
191
224
  type: "string[]";
225
+ } | {
226
+ type: "json";
227
+ value?: unknown;
192
228
  };
193
229
  type: "variable";
194
230
  name: string;
@@ -207,6 +243,9 @@ export declare const DataSources: z.ZodMap<z.ZodString, z.ZodUnion<[z.ZodObject<
207
243
  } | {
208
244
  value: string[];
209
245
  type: "string[]";
246
+ } | {
247
+ type: "json";
248
+ value?: unknown;
210
249
  };
211
250
  type: "variable";
212
251
  name: string;
@@ -62,6 +62,27 @@ export declare const Prop: z.ZodUnion<[z.ZodObject<{
62
62
  id: string;
63
63
  instanceId: string;
64
64
  required?: boolean | undefined;
65
+ }>, z.ZodObject<{
66
+ type: z.ZodLiteral<"json">;
67
+ value: z.ZodUnknown;
68
+ id: z.ZodString;
69
+ instanceId: z.ZodString;
70
+ name: z.ZodString;
71
+ required: z.ZodOptional<z.ZodBoolean>;
72
+ }, "strip", z.ZodTypeAny, {
73
+ type: "json";
74
+ name: string;
75
+ id: string;
76
+ instanceId: string;
77
+ value?: unknown;
78
+ required?: boolean | undefined;
79
+ }, {
80
+ type: "json";
81
+ name: string;
82
+ id: string;
83
+ instanceId: string;
84
+ value?: unknown;
85
+ required?: boolean | undefined;
65
86
  }>, z.ZodObject<{
66
87
  type: z.ZodLiteral<"asset">;
67
88
  value: z.ZodString;
@@ -167,6 +188,27 @@ export declare const Prop: z.ZodUnion<[z.ZodObject<{
167
188
  id: string;
168
189
  instanceId: string;
169
190
  required?: boolean | undefined;
191
+ }>, z.ZodObject<{
192
+ type: z.ZodLiteral<"expression">;
193
+ value: z.ZodString;
194
+ id: z.ZodString;
195
+ instanceId: z.ZodString;
196
+ name: z.ZodString;
197
+ required: z.ZodOptional<z.ZodBoolean>;
198
+ }, "strip", z.ZodTypeAny, {
199
+ value: string;
200
+ type: "expression";
201
+ name: string;
202
+ id: string;
203
+ instanceId: string;
204
+ required?: boolean | undefined;
205
+ }, {
206
+ value: string;
207
+ type: "expression";
208
+ name: string;
209
+ id: string;
210
+ instanceId: string;
211
+ required?: boolean | undefined;
170
212
  }>, z.ZodObject<{
171
213
  type: z.ZodLiteral<"action">;
172
214
  value: z.ZodArray<z.ZodObject<{
@@ -273,6 +315,27 @@ export declare const Props: z.ZodMap<z.ZodString, z.ZodUnion<[z.ZodObject<{
273
315
  id: string;
274
316
  instanceId: string;
275
317
  required?: boolean | undefined;
318
+ }>, z.ZodObject<{
319
+ type: z.ZodLiteral<"json">;
320
+ value: z.ZodUnknown;
321
+ id: z.ZodString;
322
+ instanceId: z.ZodString;
323
+ name: z.ZodString;
324
+ required: z.ZodOptional<z.ZodBoolean>;
325
+ }, "strip", z.ZodTypeAny, {
326
+ type: "json";
327
+ name: string;
328
+ id: string;
329
+ instanceId: string;
330
+ value?: unknown;
331
+ required?: boolean | undefined;
332
+ }, {
333
+ type: "json";
334
+ name: string;
335
+ id: string;
336
+ instanceId: string;
337
+ value?: unknown;
338
+ required?: boolean | undefined;
276
339
  }>, z.ZodObject<{
277
340
  type: z.ZodLiteral<"asset">;
278
341
  value: z.ZodString;
@@ -378,6 +441,27 @@ export declare const Props: z.ZodMap<z.ZodString, z.ZodUnion<[z.ZodObject<{
378
441
  id: string;
379
442
  instanceId: string;
380
443
  required?: boolean | undefined;
444
+ }>, z.ZodObject<{
445
+ type: z.ZodLiteral<"expression">;
446
+ value: z.ZodString;
447
+ id: z.ZodString;
448
+ instanceId: z.ZodString;
449
+ name: z.ZodString;
450
+ required: z.ZodOptional<z.ZodBoolean>;
451
+ }, "strip", z.ZodTypeAny, {
452
+ value: string;
453
+ type: "expression";
454
+ name: string;
455
+ id: string;
456
+ instanceId: string;
457
+ required?: boolean | undefined;
458
+ }, {
459
+ value: string;
460
+ type: "expression";
461
+ name: string;
462
+ id: string;
463
+ instanceId: string;
464
+ required?: boolean | undefined;
381
465
  }>, z.ZodObject<{
382
466
  type: z.ZodLiteral<"action">;
383
467
  value: z.ZodArray<z.ZodObject<{
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@webstudio-is/sdk",
3
- "version": "0.114.0",
3
+ "version": "0.116.0",
4
4
  "description": "Webstudio site data schema",
5
5
  "author": "Webstudio <github@webstudio.is>",
6
6
  "homepage": "https://webstudio.is",
@@ -19,13 +19,13 @@
19
19
  "sideEffects": false,
20
20
  "dependencies": {
21
21
  "zod": "^3.21.4",
22
- "@webstudio-is/css-engine": "0.114.0",
23
- "@webstudio-is/fonts": "0.114.0"
22
+ "@webstudio-is/css-engine": "0.116.0",
23
+ "@webstudio-is/fonts": "0.116.0"
24
24
  },
25
25
  "devDependencies": {
26
26
  "@jest/globals": "^29.7.0",
27
- "@webstudio-is/jest-config": "1.0.7",
28
- "@webstudio-is/tsconfig": "1.0.7"
27
+ "@webstudio-is/tsconfig": "1.0.7",
28
+ "@webstudio-is/jest-config": "1.0.7"
29
29
  },
30
30
  "scripts": {
31
31
  "typecheck": "tsc",