@webstudio-is/sdk 0.163.0 → 0.167.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
@@ -56,6 +56,8 @@ var commonPageFields = {
56
56
  name: PageName,
57
57
  title: PageTitle,
58
58
  history: z2.optional(z2.array(z2.string())),
59
+ rootInstanceId: z2.string(),
60
+ systemDataSourceId: z2.string(),
59
61
  meta: z2.object({
60
62
  description: z2.string().optional(),
61
63
  title: z2.string().optional(),
@@ -73,8 +75,13 @@ var commonPageFields = {
73
75
  })
74
76
  ).optional()
75
77
  }),
76
- rootInstanceId: z2.string(),
77
- systemDataSourceId: z2.string()
78
+ marketplace: z2.optional(
79
+ z2.object({
80
+ include: z2.optional(z2.boolean()),
81
+ category: z2.optional(z2.string()),
82
+ thumbnailAssetId: z2.optional(z2.string())
83
+ })
84
+ )
78
85
  };
79
86
  var HomePagePath = z2.string().refine((path) => path === "", "Home page path must be empty");
80
87
  var HomePage = z2.object({
@@ -140,7 +147,8 @@ var Pages = z2.object({
140
147
  import { z as z3 } from "zod";
141
148
  var TextChild = z3.object({
142
149
  type: z3.literal("text"),
143
- value: z3.string()
150
+ value: z3.string(),
151
+ placeholder: z3.boolean().optional()
144
152
  });
145
153
  var InstanceId = z3.string();
146
154
  var IdChild = z3.object({
@@ -5,6 +5,7 @@ export declare const findTreeInstanceIds: (instances: Map<string, {
5
5
  children: ({
6
6
  value: string;
7
7
  type: "text";
8
+ placeholder?: boolean | undefined;
8
9
  } | {
9
10
  value: string;
10
11
  type: "id";
@@ -21,6 +22,7 @@ export declare const findTreeInstanceIdsExcludingSlotDescendants: (instances: Ma
21
22
  children: ({
22
23
  value: string;
23
24
  type: "text";
25
+ placeholder?: boolean | undefined;
24
26
  } | {
25
27
  value: string;
26
28
  type: "id";
@@ -2,12 +2,15 @@ import { z } from "zod";
2
2
  export declare const TextChild: z.ZodObject<{
3
3
  type: z.ZodLiteral<"text">;
4
4
  value: z.ZodString;
5
+ placeholder: z.ZodOptional<z.ZodBoolean>;
5
6
  }, "strip", z.ZodTypeAny, {
6
7
  value: string;
7
8
  type: "text";
9
+ placeholder?: boolean | undefined;
8
10
  }, {
9
11
  value: string;
10
12
  type: "text";
13
+ placeholder?: boolean | undefined;
11
14
  }>;
12
15
  export type TextChild = z.infer<typeof TextChild>;
13
16
  export declare const IdChild: z.ZodObject<{
@@ -44,12 +47,15 @@ export declare const InstanceChild: z.ZodUnion<[z.ZodObject<{
44
47
  }>, z.ZodObject<{
45
48
  type: z.ZodLiteral<"text">;
46
49
  value: z.ZodString;
50
+ placeholder: z.ZodOptional<z.ZodBoolean>;
47
51
  }, "strip", z.ZodTypeAny, {
48
52
  value: string;
49
53
  type: "text";
54
+ placeholder?: boolean | undefined;
50
55
  }, {
51
56
  value: string;
52
57
  type: "text";
58
+ placeholder?: boolean | undefined;
53
59
  }>, z.ZodObject<{
54
60
  type: z.ZodLiteral<"expression">;
55
61
  value: z.ZodString;
@@ -77,12 +83,15 @@ export declare const Instance: z.ZodObject<{
77
83
  }>, z.ZodObject<{
78
84
  type: z.ZodLiteral<"text">;
79
85
  value: z.ZodString;
86
+ placeholder: z.ZodOptional<z.ZodBoolean>;
80
87
  }, "strip", z.ZodTypeAny, {
81
88
  value: string;
82
89
  type: "text";
90
+ placeholder?: boolean | undefined;
83
91
  }, {
84
92
  value: string;
85
93
  type: "text";
94
+ placeholder?: boolean | undefined;
86
95
  }>, z.ZodObject<{
87
96
  type: z.ZodLiteral<"expression">;
88
97
  value: z.ZodString;
@@ -99,6 +108,7 @@ export declare const Instance: z.ZodObject<{
99
108
  children: ({
100
109
  value: string;
101
110
  type: "text";
111
+ placeholder?: boolean | undefined;
102
112
  } | {
103
113
  value: string;
104
114
  type: "id";
@@ -114,6 +124,7 @@ export declare const Instance: z.ZodObject<{
114
124
  children: ({
115
125
  value: string;
116
126
  type: "text";
127
+ placeholder?: boolean | undefined;
117
128
  } | {
118
129
  value: string;
119
130
  type: "id";
@@ -142,12 +153,15 @@ export declare const Instances: z.ZodMap<z.ZodString, z.ZodObject<{
142
153
  }>, z.ZodObject<{
143
154
  type: z.ZodLiteral<"text">;
144
155
  value: z.ZodString;
156
+ placeholder: z.ZodOptional<z.ZodBoolean>;
145
157
  }, "strip", z.ZodTypeAny, {
146
158
  value: string;
147
159
  type: "text";
160
+ placeholder?: boolean | undefined;
148
161
  }, {
149
162
  value: string;
150
163
  type: "text";
164
+ placeholder?: boolean | undefined;
151
165
  }>, z.ZodObject<{
152
166
  type: z.ZodLiteral<"expression">;
153
167
  value: z.ZodString;
@@ -164,6 +178,7 @@ export declare const Instances: z.ZodMap<z.ZodString, z.ZodObject<{
164
178
  children: ({
165
179
  value: string;
166
180
  type: "text";
181
+ placeholder?: boolean | undefined;
167
182
  } | {
168
183
  value: string;
169
184
  type: "id";
@@ -179,6 +194,7 @@ export declare const Instances: z.ZodMap<z.ZodString, z.ZodObject<{
179
194
  children: ({
180
195
  value: string;
181
196
  type: "text";
197
+ placeholder?: boolean | undefined;
182
198
  } | {
183
199
  value: string;
184
200
  type: "id";
@@ -33,6 +33,8 @@ declare const Page: z.ZodObject<{
33
33
  name: z.ZodEffects<z.ZodString, string, string>;
34
34
  title: z.ZodEffects<z.ZodString, string, string>;
35
35
  history: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
36
+ rootInstanceId: z.ZodString;
37
+ systemDataSourceId: z.ZodString;
36
38
  meta: z.ZodObject<{
37
39
  description: z.ZodOptional<z.ZodString>;
38
40
  title: z.ZodOptional<z.ZodString>;
@@ -82,8 +84,19 @@ declare const Page: z.ZodObject<{
82
84
  content: string;
83
85
  }[] | undefined;
84
86
  }>;
85
- rootInstanceId: z.ZodString;
86
- systemDataSourceId: z.ZodString;
87
+ marketplace: z.ZodOptional<z.ZodObject<{
88
+ include: z.ZodOptional<z.ZodBoolean>;
89
+ category: z.ZodOptional<z.ZodString>;
90
+ thumbnailAssetId: z.ZodOptional<z.ZodString>;
91
+ }, "strip", z.ZodTypeAny, {
92
+ include?: boolean | undefined;
93
+ category?: string | undefined;
94
+ thumbnailAssetId?: string | undefined;
95
+ }, {
96
+ include?: boolean | undefined;
97
+ category?: string | undefined;
98
+ thumbnailAssetId?: string | undefined;
99
+ }>>;
87
100
  }, "strip", z.ZodTypeAny, {
88
101
  path: string;
89
102
  id: string;
@@ -107,6 +120,11 @@ declare const Page: z.ZodObject<{
107
120
  rootInstanceId: string;
108
121
  systemDataSourceId: string;
109
122
  history?: string[] | undefined;
123
+ marketplace?: {
124
+ include?: boolean | undefined;
125
+ category?: string | undefined;
126
+ thumbnailAssetId?: string | undefined;
127
+ } | undefined;
110
128
  }, {
111
129
  path: string;
112
130
  id: string;
@@ -130,6 +148,11 @@ declare const Page: z.ZodObject<{
130
148
  rootInstanceId: string;
131
149
  systemDataSourceId: string;
132
150
  history?: string[] | undefined;
151
+ marketplace?: {
152
+ include?: boolean | undefined;
153
+ category?: string | undefined;
154
+ thumbnailAssetId?: string | undefined;
155
+ } | undefined;
133
156
  }>;
134
157
  declare const ProjectMeta: z.ZodObject<{
135
158
  siteName: z.ZodOptional<z.ZodString>;
@@ -215,6 +238,8 @@ export declare const Pages: z.ZodObject<{
215
238
  name: z.ZodEffects<z.ZodString, string, string>;
216
239
  title: z.ZodEffects<z.ZodString, string, string>;
217
240
  history: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
241
+ rootInstanceId: z.ZodString;
242
+ systemDataSourceId: z.ZodString;
218
243
  meta: z.ZodObject<{
219
244
  description: z.ZodOptional<z.ZodString>;
220
245
  title: z.ZodOptional<z.ZodString>;
@@ -264,8 +289,19 @@ export declare const Pages: z.ZodObject<{
264
289
  content: string;
265
290
  }[] | undefined;
266
291
  }>;
267
- rootInstanceId: z.ZodString;
268
- systemDataSourceId: z.ZodString;
292
+ marketplace: z.ZodOptional<z.ZodObject<{
293
+ include: z.ZodOptional<z.ZodBoolean>;
294
+ category: z.ZodOptional<z.ZodString>;
295
+ thumbnailAssetId: z.ZodOptional<z.ZodString>;
296
+ }, "strip", z.ZodTypeAny, {
297
+ include?: boolean | undefined;
298
+ category?: string | undefined;
299
+ thumbnailAssetId?: string | undefined;
300
+ }, {
301
+ include?: boolean | undefined;
302
+ category?: string | undefined;
303
+ thumbnailAssetId?: string | undefined;
304
+ }>>;
269
305
  }, "strip", z.ZodTypeAny, {
270
306
  path: string;
271
307
  id: string;
@@ -289,6 +325,11 @@ export declare const Pages: z.ZodObject<{
289
325
  rootInstanceId: string;
290
326
  systemDataSourceId: string;
291
327
  history?: string[] | undefined;
328
+ marketplace?: {
329
+ include?: boolean | undefined;
330
+ category?: string | undefined;
331
+ thumbnailAssetId?: string | undefined;
332
+ } | undefined;
292
333
  }, {
293
334
  path: string;
294
335
  id: string;
@@ -312,6 +353,11 @@ export declare const Pages: z.ZodObject<{
312
353
  rootInstanceId: string;
313
354
  systemDataSourceId: string;
314
355
  history?: string[] | undefined;
356
+ marketplace?: {
357
+ include?: boolean | undefined;
358
+ category?: string | undefined;
359
+ thumbnailAssetId?: string | undefined;
360
+ } | undefined;
315
361
  }>;
316
362
  pages: z.ZodArray<z.ZodObject<{
317
363
  path: z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>, string, string>, string, string>, string, string>, string, string>, string, string>, string, string>;
@@ -319,6 +365,8 @@ export declare const Pages: z.ZodObject<{
319
365
  name: z.ZodEffects<z.ZodString, string, string>;
320
366
  title: z.ZodEffects<z.ZodString, string, string>;
321
367
  history: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
368
+ rootInstanceId: z.ZodString;
369
+ systemDataSourceId: z.ZodString;
322
370
  meta: z.ZodObject<{
323
371
  description: z.ZodOptional<z.ZodString>;
324
372
  title: z.ZodOptional<z.ZodString>;
@@ -368,8 +416,19 @@ export declare const Pages: z.ZodObject<{
368
416
  content: string;
369
417
  }[] | undefined;
370
418
  }>;
371
- rootInstanceId: z.ZodString;
372
- systemDataSourceId: z.ZodString;
419
+ marketplace: z.ZodOptional<z.ZodObject<{
420
+ include: z.ZodOptional<z.ZodBoolean>;
421
+ category: z.ZodOptional<z.ZodString>;
422
+ thumbnailAssetId: z.ZodOptional<z.ZodString>;
423
+ }, "strip", z.ZodTypeAny, {
424
+ include?: boolean | undefined;
425
+ category?: string | undefined;
426
+ thumbnailAssetId?: string | undefined;
427
+ }, {
428
+ include?: boolean | undefined;
429
+ category?: string | undefined;
430
+ thumbnailAssetId?: string | undefined;
431
+ }>>;
373
432
  }, "strip", z.ZodTypeAny, {
374
433
  path: string;
375
434
  id: string;
@@ -393,6 +452,11 @@ export declare const Pages: z.ZodObject<{
393
452
  rootInstanceId: string;
394
453
  systemDataSourceId: string;
395
454
  history?: string[] | undefined;
455
+ marketplace?: {
456
+ include?: boolean | undefined;
457
+ category?: string | undefined;
458
+ thumbnailAssetId?: string | undefined;
459
+ } | undefined;
396
460
  }, {
397
461
  path: string;
398
462
  id: string;
@@ -416,6 +480,11 @@ export declare const Pages: z.ZodObject<{
416
480
  rootInstanceId: string;
417
481
  systemDataSourceId: string;
418
482
  history?: string[] | undefined;
483
+ marketplace?: {
484
+ include?: boolean | undefined;
485
+ category?: string | undefined;
486
+ thumbnailAssetId?: string | undefined;
487
+ } | undefined;
419
488
  }>, "many">;
420
489
  folders: z.ZodEffects<z.ZodArray<z.ZodObject<{
421
490
  id: z.ZodString;
@@ -467,6 +536,11 @@ export declare const Pages: z.ZodObject<{
467
536
  rootInstanceId: string;
468
537
  systemDataSourceId: string;
469
538
  history?: string[] | undefined;
539
+ marketplace?: {
540
+ include?: boolean | undefined;
541
+ category?: string | undefined;
542
+ thumbnailAssetId?: string | undefined;
543
+ } | undefined;
470
544
  };
471
545
  pages: {
472
546
  path: string;
@@ -491,6 +565,11 @@ export declare const Pages: z.ZodObject<{
491
565
  rootInstanceId: string;
492
566
  systemDataSourceId: string;
493
567
  history?: string[] | undefined;
568
+ marketplace?: {
569
+ include?: boolean | undefined;
570
+ category?: string | undefined;
571
+ thumbnailAssetId?: string | undefined;
572
+ } | undefined;
494
573
  }[];
495
574
  folders: {
496
575
  id: string;
@@ -536,6 +615,11 @@ export declare const Pages: z.ZodObject<{
536
615
  rootInstanceId: string;
537
616
  systemDataSourceId: string;
538
617
  history?: string[] | undefined;
618
+ marketplace?: {
619
+ include?: boolean | undefined;
620
+ category?: string | undefined;
621
+ thumbnailAssetId?: string | undefined;
622
+ } | undefined;
539
623
  };
540
624
  pages: {
541
625
  path: string;
@@ -560,6 +644,11 @@ export declare const Pages: z.ZodObject<{
560
644
  rootInstanceId: string;
561
645
  systemDataSourceId: string;
562
646
  history?: string[] | undefined;
647
+ marketplace?: {
648
+ include?: boolean | undefined;
649
+ category?: string | undefined;
650
+ thumbnailAssetId?: string | undefined;
651
+ } | undefined;
563
652
  }[];
564
653
  folders: {
565
654
  id: string;
@@ -26,12 +26,15 @@ export declare const WebstudioFragment: z.ZodObject<{
26
26
  }>, z.ZodObject<{
27
27
  type: z.ZodLiteral<"text">;
28
28
  value: z.ZodString;
29
+ placeholder: z.ZodOptional<z.ZodBoolean>;
29
30
  }, "strip", z.ZodTypeAny, {
30
31
  value: string;
31
32
  type: "text";
33
+ placeholder?: boolean | undefined;
32
34
  }, {
33
35
  value: string;
34
36
  type: "text";
37
+ placeholder?: boolean | undefined;
35
38
  }>, z.ZodObject<{
36
39
  type: z.ZodLiteral<"expression">;
37
40
  value: z.ZodString;
@@ -59,12 +62,15 @@ export declare const WebstudioFragment: z.ZodObject<{
59
62
  }>, z.ZodObject<{
60
63
  type: z.ZodLiteral<"text">;
61
64
  value: z.ZodString;
65
+ placeholder: z.ZodOptional<z.ZodBoolean>;
62
66
  }, "strip", z.ZodTypeAny, {
63
67
  value: string;
64
68
  type: "text";
69
+ placeholder?: boolean | undefined;
65
70
  }, {
66
71
  value: string;
67
72
  type: "text";
73
+ placeholder?: boolean | undefined;
68
74
  }>, z.ZodObject<{
69
75
  type: z.ZodLiteral<"expression">;
70
76
  value: z.ZodString;
@@ -81,6 +87,7 @@ export declare const WebstudioFragment: z.ZodObject<{
81
87
  children: ({
82
88
  value: string;
83
89
  type: "text";
90
+ placeholder?: boolean | undefined;
84
91
  } | {
85
92
  value: string;
86
93
  type: "id";
@@ -96,6 +103,7 @@ export declare const WebstudioFragment: z.ZodObject<{
96
103
  children: ({
97
104
  value: string;
98
105
  type: "text";
106
+ placeholder?: boolean | undefined;
99
107
  } | {
100
108
  value: string;
101
109
  type: "id";
@@ -1661,6 +1669,7 @@ export declare const WebstudioFragment: z.ZodObject<{
1661
1669
  children: ({
1662
1670
  value: string;
1663
1671
  type: "text";
1672
+ placeholder?: boolean | undefined;
1664
1673
  } | {
1665
1674
  value: string;
1666
1675
  type: "id";
@@ -1674,6 +1683,7 @@ export declare const WebstudioFragment: z.ZodObject<{
1674
1683
  children: ({
1675
1684
  value: string;
1676
1685
  type: "text";
1686
+ placeholder?: boolean | undefined;
1677
1687
  } | {
1678
1688
  value: string;
1679
1689
  type: "id";
@@ -2316,6 +2326,7 @@ export declare const WebstudioFragment: z.ZodObject<{
2316
2326
  children: ({
2317
2327
  value: string;
2318
2328
  type: "text";
2329
+ placeholder?: boolean | undefined;
2319
2330
  } | {
2320
2331
  value: string;
2321
2332
  type: "id";
@@ -2329,6 +2340,7 @@ export declare const WebstudioFragment: z.ZodObject<{
2329
2340
  children: ({
2330
2341
  value: string;
2331
2342
  type: "text";
2343
+ placeholder?: boolean | undefined;
2332
2344
  } | {
2333
2345
  value: string;
2334
2346
  type: "id";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@webstudio-is/sdk",
3
- "version": "0.163.0",
3
+ "version": "0.167.0",
4
4
  "description": "Webstudio project data schema",
5
5
  "author": "Webstudio <github@webstudio.is>",
6
6
  "homepage": "https://webstudio.is",
@@ -21,8 +21,8 @@
21
21
  "acorn-walk": "^8.3.2",
22
22
  "type-fest": "^4.3.1",
23
23
  "zod": "^3.22.4",
24
- "@webstudio-is/css-engine": "0.163.0",
25
- "@webstudio-is/fonts": "0.163.0"
24
+ "@webstudio-is/css-engine": "0.167.0",
25
+ "@webstudio-is/fonts": "0.167.0"
26
26
  },
27
27
  "devDependencies": {
28
28
  "@jest/globals": "^29.7.0",