@webstudio-is/sdk 0.151.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 +86 -9
- package/lib/types/expression.d.ts +10 -0
- package/lib/types/index.d.ts +1 -0
- package/lib/types/instances-utils.d.ts +2 -0
- package/lib/types/schema/assets.d.ts +9 -9
- package/lib/types/schema/instances.d.ts +16 -0
- package/lib/types/schema/pages.d.ts +128 -6
- package/lib/types/schema/resources.d.ts +8 -1
- package/lib/types/schema/webstudio.d.ts +22 -5
- package/lib/types/url-pattern.d.ts +2 -0
- package/lib/types/url-pattern.test.d.ts +1 -0
- package/package.json +4 -5
package/lib/index.js
CHANGED
|
@@ -50,10 +50,14 @@ var PageTitle = z2.string().refine(
|
|
|
50
50
|
(val) => val.length >= MIN_TITLE_LENGTH,
|
|
51
51
|
`Minimum ${MIN_TITLE_LENGTH} characters required`
|
|
52
52
|
);
|
|
53
|
+
var documentTypes = ["html", "xml"];
|
|
53
54
|
var commonPageFields = {
|
|
54
55
|
id: PageId,
|
|
55
56
|
name: PageName,
|
|
56
57
|
title: PageTitle,
|
|
58
|
+
history: z2.optional(z2.array(z2.string())),
|
|
59
|
+
rootInstanceId: z2.string(),
|
|
60
|
+
systemDataSourceId: z2.string(),
|
|
57
61
|
meta: z2.object({
|
|
58
62
|
description: z2.string().optional(),
|
|
59
63
|
title: z2.string().optional(),
|
|
@@ -63,6 +67,7 @@ var commonPageFields = {
|
|
|
63
67
|
socialImageUrl: z2.string().optional(),
|
|
64
68
|
status: z2.string().optional(),
|
|
65
69
|
redirect: z2.string().optional(),
|
|
70
|
+
documentType: z2.optional(z2.enum(documentTypes)),
|
|
66
71
|
custom: z2.array(
|
|
67
72
|
z2.object({
|
|
68
73
|
property: z2.string(),
|
|
@@ -70,8 +75,13 @@ var commonPageFields = {
|
|
|
70
75
|
})
|
|
71
76
|
).optional()
|
|
72
77
|
}),
|
|
73
|
-
|
|
74
|
-
|
|
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
|
+
)
|
|
75
85
|
};
|
|
76
86
|
var HomePagePath = z2.string().refine((path) => path === "", "Home page path must be empty");
|
|
77
87
|
var HomePage = z2.object({
|
|
@@ -79,8 +89,8 @@ var HomePage = z2.object({
|
|
|
79
89
|
path: HomePagePath
|
|
80
90
|
});
|
|
81
91
|
var PagePath = z2.string().refine((path) => path !== "", "Can't be empty").refine((path) => path !== "/", "Can't be just a /").refine((path) => path === "" || path.startsWith("/"), "Must start with a /").refine((path) => path.endsWith("/") === false, "Can't end with a /").refine((path) => path.includes("//") === false, "Can't contain repeating /").refine(
|
|
82
|
-
(path) => /^[-_a-z0-9
|
|
83
|
-
"Only a-z, 0-9, -, _, /, :,
|
|
92
|
+
(path) => /^[-_a-z0-9*:?\\/.]*$/.test(path),
|
|
93
|
+
"Only a-z, 0-9, -, _, /, :, ?, . and * are allowed"
|
|
84
94
|
).refine(
|
|
85
95
|
// We use /s for our system stuff like /s/css or /s/uploads
|
|
86
96
|
(path) => path !== "/s" && path.startsWith("/s/") === false,
|
|
@@ -137,7 +147,8 @@ var Pages = z2.object({
|
|
|
137
147
|
import { z as z3 } from "zod";
|
|
138
148
|
var TextChild = z3.object({
|
|
139
149
|
type: z3.literal("text"),
|
|
140
|
-
value: z3.string()
|
|
150
|
+
value: z3.string(),
|
|
151
|
+
placeholder: z3.boolean().optional()
|
|
141
152
|
});
|
|
142
153
|
var InstanceId = z3.string();
|
|
143
154
|
var IdChild = z3.object({
|
|
@@ -225,6 +236,7 @@ var Header = z5.object({
|
|
|
225
236
|
var Resource = z5.object({
|
|
226
237
|
id: ResourceId,
|
|
227
238
|
name: z5.string(),
|
|
239
|
+
control: z5.optional(z5.union([z5.literal("system"), z5.literal("graphql")])),
|
|
228
240
|
method: Method,
|
|
229
241
|
// expression
|
|
230
242
|
url: z5.string(),
|
|
@@ -242,7 +254,14 @@ var ResourceRequest = z5.object({
|
|
|
242
254
|
});
|
|
243
255
|
var Resources = z5.map(ResourceId, Resource);
|
|
244
256
|
var LOCAL_RESOURCE_PREFIX = "$resources";
|
|
245
|
-
var isLocalResource = (pathname, resourceName) =>
|
|
257
|
+
var isLocalResource = (pathname, resourceName) => {
|
|
258
|
+
const segments = pathname.split("/").filter(Boolean);
|
|
259
|
+
if (resourceName === void 0) {
|
|
260
|
+
return segments[0] === LOCAL_RESOURCE_PREFIX;
|
|
261
|
+
}
|
|
262
|
+
return segments.join("/") === `${LOCAL_RESOURCE_PREFIX}/${resourceName}`;
|
|
263
|
+
};
|
|
264
|
+
var sitemapResourceUrl = `/${LOCAL_RESOURCE_PREFIX}/sitemap.xml`;
|
|
246
265
|
|
|
247
266
|
// src/schema/props.ts
|
|
248
267
|
import { z as z6 } from "zod";
|
|
@@ -655,6 +674,50 @@ var transpileExpression = ({
|
|
|
655
674
|
}
|
|
656
675
|
return expression;
|
|
657
676
|
};
|
|
677
|
+
var parseObjectExpression = (expression) => {
|
|
678
|
+
const map = /* @__PURE__ */ new Map();
|
|
679
|
+
let root;
|
|
680
|
+
try {
|
|
681
|
+
root = parseExpressionAt(expression, 0, { ecmaVersion: "latest" });
|
|
682
|
+
} catch (error) {
|
|
683
|
+
return map;
|
|
684
|
+
}
|
|
685
|
+
if (root.type !== "ObjectExpression") {
|
|
686
|
+
return map;
|
|
687
|
+
}
|
|
688
|
+
for (const property of root.properties) {
|
|
689
|
+
if (property.type === "SpreadElement") {
|
|
690
|
+
continue;
|
|
691
|
+
}
|
|
692
|
+
if (property.computed) {
|
|
693
|
+
continue;
|
|
694
|
+
}
|
|
695
|
+
let key;
|
|
696
|
+
if (property.key.type === "Identifier") {
|
|
697
|
+
key = property.key.name;
|
|
698
|
+
} else if (property.key.type === "Literal" && typeof property.key.value === "string") {
|
|
699
|
+
key = property.key.value;
|
|
700
|
+
} else {
|
|
701
|
+
continue;
|
|
702
|
+
}
|
|
703
|
+
const valueExpression = expression.slice(
|
|
704
|
+
property.value.start,
|
|
705
|
+
property.value.end
|
|
706
|
+
);
|
|
707
|
+
map.set(key, valueExpression);
|
|
708
|
+
}
|
|
709
|
+
return map;
|
|
710
|
+
};
|
|
711
|
+
var generateObjectExpression = (map) => {
|
|
712
|
+
let generated = "{\n";
|
|
713
|
+
for (const [key, valueExpression] of map) {
|
|
714
|
+
const keyExpression = JSON.stringify(key);
|
|
715
|
+
generated += ` ${keyExpression}: ${valueExpression},
|
|
716
|
+
`;
|
|
717
|
+
}
|
|
718
|
+
generated += `}`;
|
|
719
|
+
return generated;
|
|
720
|
+
};
|
|
658
721
|
var dataSourceVariablePrefix = "$ws$dataSource$";
|
|
659
722
|
var encodeDataSourceVariable = (id) => {
|
|
660
723
|
const encoded = id.replaceAll("-", "__DASH__");
|
|
@@ -694,6 +757,14 @@ var executeExpression = (expression) => {
|
|
|
694
757
|
}
|
|
695
758
|
};
|
|
696
759
|
|
|
760
|
+
// src/url-pattern.ts
|
|
761
|
+
var tokenRegex = /:(?<name>\w+)(?<modifier>[?*]?)|(?<wildcard>(?<!:\w+)\*)/;
|
|
762
|
+
var isPathnamePattern = (pathname) => tokenRegex.test(pathname);
|
|
763
|
+
var tokenRegexGlobal = new RegExp(tokenRegex.source, "g");
|
|
764
|
+
var matchPathnameParams = (pathname) => {
|
|
765
|
+
return pathname.matchAll(tokenRegexGlobal);
|
|
766
|
+
};
|
|
767
|
+
|
|
697
768
|
// src/page-utils.ts
|
|
698
769
|
var ROOT_FOLDER_ID = "root";
|
|
699
770
|
var isRoot = (folder) => folder.id === ROOT_FOLDER_ID;
|
|
@@ -743,9 +814,9 @@ var getPagePath = (id, pages) => {
|
|
|
743
814
|
};
|
|
744
815
|
var getStaticSiteMapXml = (pages, updatedAt) => {
|
|
745
816
|
const allPages = [pages.homePage, ...pages.pages];
|
|
746
|
-
return allPages.filter(
|
|
817
|
+
return allPages.filter((page) => (page.meta.documentType ?? "html") === "html").filter(
|
|
747
818
|
(page) => executeExpression(page.meta.excludePageFromSearch) !== true
|
|
748
|
-
).map((page) => ({
|
|
819
|
+
).filter((page) => false === isPathnamePattern(page.path)).map((page) => ({
|
|
749
820
|
path: getPagePath(page.id, pages),
|
|
750
821
|
lastModified: updatedAt.split("T")[0]
|
|
751
822
|
}));
|
|
@@ -940,7 +1011,7 @@ var generateResourcesLoader = ({
|
|
|
940
1011
|
generated += `import { loadResource, isLocalResource, type System } from "@webstudio-is/sdk";
|
|
941
1012
|
`;
|
|
942
1013
|
if (hasResources) {
|
|
943
|
-
generated += `import { sitemap } from "
|
|
1014
|
+
generated += `import { sitemap } from "./$resources.sitemap.xml";
|
|
944
1015
|
`;
|
|
945
1016
|
}
|
|
946
1017
|
generated += `export const loadResources = async (_props: { system: System }) => {
|
|
@@ -1170,6 +1241,7 @@ export {
|
|
|
1170
1241
|
WebstudioFragment,
|
|
1171
1242
|
createScope,
|
|
1172
1243
|
decodeDataSourceVariable,
|
|
1244
|
+
documentTypes,
|
|
1173
1245
|
encodeDataSourceVariable,
|
|
1174
1246
|
executeExpression,
|
|
1175
1247
|
findPageByIdOrPath,
|
|
@@ -1178,6 +1250,7 @@ export {
|
|
|
1178
1250
|
findTreeInstanceIdsExcludingSlotDescendants,
|
|
1179
1251
|
generateExpression,
|
|
1180
1252
|
generateFormsProperties,
|
|
1253
|
+
generateObjectExpression,
|
|
1181
1254
|
generatePageMeta,
|
|
1182
1255
|
generateResourcesLoader,
|
|
1183
1256
|
getExpressionIdentifiers,
|
|
@@ -1187,9 +1260,13 @@ export {
|
|
|
1187
1260
|
initialBreakpoints,
|
|
1188
1261
|
isLiteralExpression,
|
|
1189
1262
|
isLocalResource,
|
|
1263
|
+
isPathnamePattern,
|
|
1190
1264
|
isRoot,
|
|
1191
1265
|
lintExpression,
|
|
1192
1266
|
loadResource,
|
|
1267
|
+
matchPathnameParams,
|
|
1193
1268
|
parseComponentName,
|
|
1269
|
+
parseObjectExpression,
|
|
1270
|
+
sitemapResourceUrl,
|
|
1194
1271
|
transpileExpression
|
|
1195
1272
|
};
|
|
@@ -32,6 +32,16 @@ export declare const transpileExpression: ({ expression, executable, replaceVari
|
|
|
32
32
|
executable?: boolean;
|
|
33
33
|
replaceVariable?: (identifier: string, assignee: boolean) => string | undefined | void;
|
|
34
34
|
}) => string;
|
|
35
|
+
/**
|
|
36
|
+
* parse object expression into key value map
|
|
37
|
+
* where each value is expression
|
|
38
|
+
*/
|
|
39
|
+
export declare const parseObjectExpression: (expression: string) => Map<string, string>;
|
|
40
|
+
/**
|
|
41
|
+
* generate key value map into object expression
|
|
42
|
+
* after updating individual value expressions
|
|
43
|
+
*/
|
|
44
|
+
export declare const generateObjectExpression: (map: Map<string, string>) => string;
|
|
35
45
|
export declare const encodeDataSourceVariable: (id: string) => string;
|
|
36
46
|
export declare const decodeDataSourceVariable: (name: string) => string | undefined;
|
|
37
47
|
export declare const generateExpression: ({ expression, dataSources, usedDataSources, scope, }: {
|
package/lib/types/index.d.ts
CHANGED
|
@@ -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";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
export declare const FontAsset: z.ZodObject<{
|
|
3
|
-
format: z.ZodUnion<[z.ZodLiteral<"ttf">, z.ZodLiteral<"woff">, z.ZodLiteral<"woff2"
|
|
3
|
+
format: z.ZodUnion<[z.ZodLiteral<"ttf">, z.ZodLiteral<"woff">, z.ZodLiteral<"woff2">]>;
|
|
4
4
|
meta: z.ZodUnion<[z.ZodObject<{
|
|
5
5
|
family: z.ZodString;
|
|
6
6
|
style: z.ZodEnum<["normal", "italic", "oblique"]>;
|
|
@@ -59,7 +59,7 @@ export declare const FontAsset: z.ZodObject<{
|
|
|
59
59
|
type: "font";
|
|
60
60
|
id: string;
|
|
61
61
|
name: string;
|
|
62
|
-
format: "ttf" | "woff" | "woff2"
|
|
62
|
+
format: "ttf" | "woff" | "woff2";
|
|
63
63
|
meta: ({
|
|
64
64
|
family: string;
|
|
65
65
|
style: "normal" | "italic" | "oblique";
|
|
@@ -93,7 +93,7 @@ export declare const FontAsset: z.ZodObject<{
|
|
|
93
93
|
type: "font";
|
|
94
94
|
id: string;
|
|
95
95
|
name: string;
|
|
96
|
-
format: "ttf" | "woff" | "woff2"
|
|
96
|
+
format: "ttf" | "woff" | "woff2";
|
|
97
97
|
meta: ({
|
|
98
98
|
family: string;
|
|
99
99
|
style: "normal" | "italic" | "oblique";
|
|
@@ -184,7 +184,7 @@ export declare const ImageAsset: z.ZodObject<{
|
|
|
184
184
|
}>;
|
|
185
185
|
export type ImageAsset = z.infer<typeof ImageAsset>;
|
|
186
186
|
export declare const Asset: z.ZodUnion<[z.ZodObject<{
|
|
187
|
-
format: z.ZodUnion<[z.ZodLiteral<"ttf">, z.ZodLiteral<"woff">, z.ZodLiteral<"woff2"
|
|
187
|
+
format: z.ZodUnion<[z.ZodLiteral<"ttf">, z.ZodLiteral<"woff">, z.ZodLiteral<"woff2">]>;
|
|
188
188
|
meta: z.ZodUnion<[z.ZodObject<{
|
|
189
189
|
family: z.ZodString;
|
|
190
190
|
style: z.ZodEnum<["normal", "italic", "oblique"]>;
|
|
@@ -243,7 +243,7 @@ export declare const Asset: z.ZodUnion<[z.ZodObject<{
|
|
|
243
243
|
type: "font";
|
|
244
244
|
id: string;
|
|
245
245
|
name: string;
|
|
246
|
-
format: "ttf" | "woff" | "woff2"
|
|
246
|
+
format: "ttf" | "woff" | "woff2";
|
|
247
247
|
meta: ({
|
|
248
248
|
family: string;
|
|
249
249
|
style: "normal" | "italic" | "oblique";
|
|
@@ -277,7 +277,7 @@ export declare const Asset: z.ZodUnion<[z.ZodObject<{
|
|
|
277
277
|
type: "font";
|
|
278
278
|
id: string;
|
|
279
279
|
name: string;
|
|
280
|
-
format: "ttf" | "woff" | "woff2"
|
|
280
|
+
format: "ttf" | "woff" | "woff2";
|
|
281
281
|
meta: ({
|
|
282
282
|
family: string;
|
|
283
283
|
style: "normal" | "italic" | "oblique";
|
|
@@ -355,7 +355,7 @@ export declare const Asset: z.ZodUnion<[z.ZodObject<{
|
|
|
355
355
|
}>]>;
|
|
356
356
|
export type Asset = z.infer<typeof Asset>;
|
|
357
357
|
export declare const Assets: z.ZodMap<z.ZodString, z.ZodUnion<[z.ZodObject<{
|
|
358
|
-
format: z.ZodUnion<[z.ZodLiteral<"ttf">, z.ZodLiteral<"woff">, z.ZodLiteral<"woff2"
|
|
358
|
+
format: z.ZodUnion<[z.ZodLiteral<"ttf">, z.ZodLiteral<"woff">, z.ZodLiteral<"woff2">]>;
|
|
359
359
|
meta: z.ZodUnion<[z.ZodObject<{
|
|
360
360
|
family: z.ZodString;
|
|
361
361
|
style: z.ZodEnum<["normal", "italic", "oblique"]>;
|
|
@@ -414,7 +414,7 @@ export declare const Assets: z.ZodMap<z.ZodString, z.ZodUnion<[z.ZodObject<{
|
|
|
414
414
|
type: "font";
|
|
415
415
|
id: string;
|
|
416
416
|
name: string;
|
|
417
|
-
format: "ttf" | "woff" | "woff2"
|
|
417
|
+
format: "ttf" | "woff" | "woff2";
|
|
418
418
|
meta: ({
|
|
419
419
|
family: string;
|
|
420
420
|
style: "normal" | "italic" | "oblique";
|
|
@@ -448,7 +448,7 @@ export declare const Assets: z.ZodMap<z.ZodString, z.ZodUnion<[z.ZodObject<{
|
|
|
448
448
|
type: "font";
|
|
449
449
|
id: string;
|
|
450
450
|
name: string;
|
|
451
|
-
format: "ttf" | "woff" | "woff2"
|
|
451
|
+
format: "ttf" | "woff" | "woff2";
|
|
452
452
|
meta: ({
|
|
453
453
|
family: string;
|
|
454
454
|
style: "normal" | "italic" | "oblique";
|
|
@@ -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";
|
|
@@ -24,6 +24,7 @@ export declare const Folder: z.ZodObject<{
|
|
|
24
24
|
export type Folder = z.infer<typeof Folder>;
|
|
25
25
|
export declare const PageName: z.ZodEffects<z.ZodString, string, string>;
|
|
26
26
|
export declare const PageTitle: z.ZodEffects<z.ZodString, string, string>;
|
|
27
|
+
export declare const documentTypes: readonly ["html", "xml"];
|
|
27
28
|
export declare const HomePagePath: z.ZodEffects<z.ZodString, string, string>;
|
|
28
29
|
export declare const PagePath: 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>;
|
|
29
30
|
declare const Page: z.ZodObject<{
|
|
@@ -31,6 +32,9 @@ declare const Page: z.ZodObject<{
|
|
|
31
32
|
id: z.ZodString;
|
|
32
33
|
name: z.ZodEffects<z.ZodString, string, string>;
|
|
33
34
|
title: z.ZodEffects<z.ZodString, string, string>;
|
|
35
|
+
history: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
36
|
+
rootInstanceId: z.ZodString;
|
|
37
|
+
systemDataSourceId: z.ZodString;
|
|
34
38
|
meta: z.ZodObject<{
|
|
35
39
|
description: z.ZodOptional<z.ZodString>;
|
|
36
40
|
title: z.ZodOptional<z.ZodString>;
|
|
@@ -40,6 +44,7 @@ declare const Page: z.ZodObject<{
|
|
|
40
44
|
socialImageUrl: z.ZodOptional<z.ZodString>;
|
|
41
45
|
status: z.ZodOptional<z.ZodString>;
|
|
42
46
|
redirect: z.ZodOptional<z.ZodString>;
|
|
47
|
+
documentType: z.ZodOptional<z.ZodEnum<["html", "xml"]>>;
|
|
43
48
|
custom: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
44
49
|
property: z.ZodString;
|
|
45
50
|
content: z.ZodString;
|
|
@@ -59,6 +64,7 @@ declare const Page: z.ZodObject<{
|
|
|
59
64
|
socialImageUrl?: string | undefined;
|
|
60
65
|
status?: string | undefined;
|
|
61
66
|
redirect?: string | undefined;
|
|
67
|
+
documentType?: "html" | "xml" | undefined;
|
|
62
68
|
custom?: {
|
|
63
69
|
property: string;
|
|
64
70
|
content: string;
|
|
@@ -72,13 +78,25 @@ declare const Page: z.ZodObject<{
|
|
|
72
78
|
socialImageUrl?: string | undefined;
|
|
73
79
|
status?: string | undefined;
|
|
74
80
|
redirect?: string | undefined;
|
|
81
|
+
documentType?: "html" | "xml" | undefined;
|
|
75
82
|
custom?: {
|
|
76
83
|
property: string;
|
|
77
84
|
content: string;
|
|
78
85
|
}[] | undefined;
|
|
79
86
|
}>;
|
|
80
|
-
|
|
81
|
-
|
|
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
|
+
}>>;
|
|
82
100
|
}, "strip", z.ZodTypeAny, {
|
|
83
101
|
path: string;
|
|
84
102
|
id: string;
|
|
@@ -92,6 +110,7 @@ declare const Page: z.ZodObject<{
|
|
|
92
110
|
socialImageUrl?: string | undefined;
|
|
93
111
|
status?: string | undefined;
|
|
94
112
|
redirect?: string | undefined;
|
|
113
|
+
documentType?: "html" | "xml" | undefined;
|
|
95
114
|
custom?: {
|
|
96
115
|
property: string;
|
|
97
116
|
content: string;
|
|
@@ -100,6 +119,12 @@ declare const Page: z.ZodObject<{
|
|
|
100
119
|
title: string;
|
|
101
120
|
rootInstanceId: string;
|
|
102
121
|
systemDataSourceId: string;
|
|
122
|
+
history?: string[] | undefined;
|
|
123
|
+
marketplace?: {
|
|
124
|
+
include?: boolean | undefined;
|
|
125
|
+
category?: string | undefined;
|
|
126
|
+
thumbnailAssetId?: string | undefined;
|
|
127
|
+
} | undefined;
|
|
103
128
|
}, {
|
|
104
129
|
path: string;
|
|
105
130
|
id: string;
|
|
@@ -113,6 +138,7 @@ declare const Page: z.ZodObject<{
|
|
|
113
138
|
socialImageUrl?: string | undefined;
|
|
114
139
|
status?: string | undefined;
|
|
115
140
|
redirect?: string | undefined;
|
|
141
|
+
documentType?: "html" | "xml" | undefined;
|
|
116
142
|
custom?: {
|
|
117
143
|
property: string;
|
|
118
144
|
content: string;
|
|
@@ -121,6 +147,12 @@ declare const Page: z.ZodObject<{
|
|
|
121
147
|
title: string;
|
|
122
148
|
rootInstanceId: string;
|
|
123
149
|
systemDataSourceId: string;
|
|
150
|
+
history?: string[] | undefined;
|
|
151
|
+
marketplace?: {
|
|
152
|
+
include?: boolean | undefined;
|
|
153
|
+
category?: string | undefined;
|
|
154
|
+
thumbnailAssetId?: string | undefined;
|
|
155
|
+
} | undefined;
|
|
124
156
|
}>;
|
|
125
157
|
declare const ProjectMeta: z.ZodObject<{
|
|
126
158
|
siteName: z.ZodOptional<z.ZodString>;
|
|
@@ -205,6 +237,9 @@ export declare const Pages: z.ZodObject<{
|
|
|
205
237
|
id: z.ZodString;
|
|
206
238
|
name: z.ZodEffects<z.ZodString, string, string>;
|
|
207
239
|
title: z.ZodEffects<z.ZodString, string, string>;
|
|
240
|
+
history: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
241
|
+
rootInstanceId: z.ZodString;
|
|
242
|
+
systemDataSourceId: z.ZodString;
|
|
208
243
|
meta: z.ZodObject<{
|
|
209
244
|
description: z.ZodOptional<z.ZodString>;
|
|
210
245
|
title: z.ZodOptional<z.ZodString>;
|
|
@@ -214,6 +249,7 @@ export declare const Pages: z.ZodObject<{
|
|
|
214
249
|
socialImageUrl: z.ZodOptional<z.ZodString>;
|
|
215
250
|
status: z.ZodOptional<z.ZodString>;
|
|
216
251
|
redirect: z.ZodOptional<z.ZodString>;
|
|
252
|
+
documentType: z.ZodOptional<z.ZodEnum<["html", "xml"]>>;
|
|
217
253
|
custom: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
218
254
|
property: z.ZodString;
|
|
219
255
|
content: z.ZodString;
|
|
@@ -233,6 +269,7 @@ export declare const Pages: z.ZodObject<{
|
|
|
233
269
|
socialImageUrl?: string | undefined;
|
|
234
270
|
status?: string | undefined;
|
|
235
271
|
redirect?: string | undefined;
|
|
272
|
+
documentType?: "html" | "xml" | undefined;
|
|
236
273
|
custom?: {
|
|
237
274
|
property: string;
|
|
238
275
|
content: string;
|
|
@@ -246,13 +283,25 @@ export declare const Pages: z.ZodObject<{
|
|
|
246
283
|
socialImageUrl?: string | undefined;
|
|
247
284
|
status?: string | undefined;
|
|
248
285
|
redirect?: string | undefined;
|
|
286
|
+
documentType?: "html" | "xml" | undefined;
|
|
249
287
|
custom?: {
|
|
250
288
|
property: string;
|
|
251
289
|
content: string;
|
|
252
290
|
}[] | undefined;
|
|
253
291
|
}>;
|
|
254
|
-
|
|
255
|
-
|
|
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
|
+
}>>;
|
|
256
305
|
}, "strip", z.ZodTypeAny, {
|
|
257
306
|
path: string;
|
|
258
307
|
id: string;
|
|
@@ -266,6 +315,7 @@ export declare const Pages: z.ZodObject<{
|
|
|
266
315
|
socialImageUrl?: string | undefined;
|
|
267
316
|
status?: string | undefined;
|
|
268
317
|
redirect?: string | undefined;
|
|
318
|
+
documentType?: "html" | "xml" | undefined;
|
|
269
319
|
custom?: {
|
|
270
320
|
property: string;
|
|
271
321
|
content: string;
|
|
@@ -274,6 +324,12 @@ export declare const Pages: z.ZodObject<{
|
|
|
274
324
|
title: string;
|
|
275
325
|
rootInstanceId: string;
|
|
276
326
|
systemDataSourceId: string;
|
|
327
|
+
history?: string[] | undefined;
|
|
328
|
+
marketplace?: {
|
|
329
|
+
include?: boolean | undefined;
|
|
330
|
+
category?: string | undefined;
|
|
331
|
+
thumbnailAssetId?: string | undefined;
|
|
332
|
+
} | undefined;
|
|
277
333
|
}, {
|
|
278
334
|
path: string;
|
|
279
335
|
id: string;
|
|
@@ -287,6 +343,7 @@ export declare const Pages: z.ZodObject<{
|
|
|
287
343
|
socialImageUrl?: string | undefined;
|
|
288
344
|
status?: string | undefined;
|
|
289
345
|
redirect?: string | undefined;
|
|
346
|
+
documentType?: "html" | "xml" | undefined;
|
|
290
347
|
custom?: {
|
|
291
348
|
property: string;
|
|
292
349
|
content: string;
|
|
@@ -295,12 +352,21 @@ export declare const Pages: z.ZodObject<{
|
|
|
295
352
|
title: string;
|
|
296
353
|
rootInstanceId: string;
|
|
297
354
|
systemDataSourceId: string;
|
|
355
|
+
history?: string[] | undefined;
|
|
356
|
+
marketplace?: {
|
|
357
|
+
include?: boolean | undefined;
|
|
358
|
+
category?: string | undefined;
|
|
359
|
+
thumbnailAssetId?: string | undefined;
|
|
360
|
+
} | undefined;
|
|
298
361
|
}>;
|
|
299
362
|
pages: z.ZodArray<z.ZodObject<{
|
|
300
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>;
|
|
301
364
|
id: z.ZodString;
|
|
302
365
|
name: z.ZodEffects<z.ZodString, string, string>;
|
|
303
366
|
title: z.ZodEffects<z.ZodString, string, string>;
|
|
367
|
+
history: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
368
|
+
rootInstanceId: z.ZodString;
|
|
369
|
+
systemDataSourceId: z.ZodString;
|
|
304
370
|
meta: z.ZodObject<{
|
|
305
371
|
description: z.ZodOptional<z.ZodString>;
|
|
306
372
|
title: z.ZodOptional<z.ZodString>;
|
|
@@ -310,6 +376,7 @@ export declare const Pages: z.ZodObject<{
|
|
|
310
376
|
socialImageUrl: z.ZodOptional<z.ZodString>;
|
|
311
377
|
status: z.ZodOptional<z.ZodString>;
|
|
312
378
|
redirect: z.ZodOptional<z.ZodString>;
|
|
379
|
+
documentType: z.ZodOptional<z.ZodEnum<["html", "xml"]>>;
|
|
313
380
|
custom: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
314
381
|
property: z.ZodString;
|
|
315
382
|
content: z.ZodString;
|
|
@@ -329,6 +396,7 @@ export declare const Pages: z.ZodObject<{
|
|
|
329
396
|
socialImageUrl?: string | undefined;
|
|
330
397
|
status?: string | undefined;
|
|
331
398
|
redirect?: string | undefined;
|
|
399
|
+
documentType?: "html" | "xml" | undefined;
|
|
332
400
|
custom?: {
|
|
333
401
|
property: string;
|
|
334
402
|
content: string;
|
|
@@ -342,13 +410,25 @@ export declare const Pages: z.ZodObject<{
|
|
|
342
410
|
socialImageUrl?: string | undefined;
|
|
343
411
|
status?: string | undefined;
|
|
344
412
|
redirect?: string | undefined;
|
|
413
|
+
documentType?: "html" | "xml" | undefined;
|
|
345
414
|
custom?: {
|
|
346
415
|
property: string;
|
|
347
416
|
content: string;
|
|
348
417
|
}[] | undefined;
|
|
349
418
|
}>;
|
|
350
|
-
|
|
351
|
-
|
|
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
|
+
}>>;
|
|
352
432
|
}, "strip", z.ZodTypeAny, {
|
|
353
433
|
path: string;
|
|
354
434
|
id: string;
|
|
@@ -362,6 +442,7 @@ export declare const Pages: z.ZodObject<{
|
|
|
362
442
|
socialImageUrl?: string | undefined;
|
|
363
443
|
status?: string | undefined;
|
|
364
444
|
redirect?: string | undefined;
|
|
445
|
+
documentType?: "html" | "xml" | undefined;
|
|
365
446
|
custom?: {
|
|
366
447
|
property: string;
|
|
367
448
|
content: string;
|
|
@@ -370,6 +451,12 @@ export declare const Pages: z.ZodObject<{
|
|
|
370
451
|
title: string;
|
|
371
452
|
rootInstanceId: string;
|
|
372
453
|
systemDataSourceId: string;
|
|
454
|
+
history?: string[] | undefined;
|
|
455
|
+
marketplace?: {
|
|
456
|
+
include?: boolean | undefined;
|
|
457
|
+
category?: string | undefined;
|
|
458
|
+
thumbnailAssetId?: string | undefined;
|
|
459
|
+
} | undefined;
|
|
373
460
|
}, {
|
|
374
461
|
path: string;
|
|
375
462
|
id: string;
|
|
@@ -383,6 +470,7 @@ export declare const Pages: z.ZodObject<{
|
|
|
383
470
|
socialImageUrl?: string | undefined;
|
|
384
471
|
status?: string | undefined;
|
|
385
472
|
redirect?: string | undefined;
|
|
473
|
+
documentType?: "html" | "xml" | undefined;
|
|
386
474
|
custom?: {
|
|
387
475
|
property: string;
|
|
388
476
|
content: string;
|
|
@@ -391,6 +479,12 @@ export declare const Pages: z.ZodObject<{
|
|
|
391
479
|
title: string;
|
|
392
480
|
rootInstanceId: string;
|
|
393
481
|
systemDataSourceId: string;
|
|
482
|
+
history?: string[] | undefined;
|
|
483
|
+
marketplace?: {
|
|
484
|
+
include?: boolean | undefined;
|
|
485
|
+
category?: string | undefined;
|
|
486
|
+
thumbnailAssetId?: string | undefined;
|
|
487
|
+
} | undefined;
|
|
394
488
|
}>, "many">;
|
|
395
489
|
folders: z.ZodEffects<z.ZodArray<z.ZodObject<{
|
|
396
490
|
id: z.ZodString;
|
|
@@ -432,6 +526,7 @@ export declare const Pages: z.ZodObject<{
|
|
|
432
526
|
socialImageUrl?: string | undefined;
|
|
433
527
|
status?: string | undefined;
|
|
434
528
|
redirect?: string | undefined;
|
|
529
|
+
documentType?: "html" | "xml" | undefined;
|
|
435
530
|
custom?: {
|
|
436
531
|
property: string;
|
|
437
532
|
content: string;
|
|
@@ -440,6 +535,12 @@ export declare const Pages: z.ZodObject<{
|
|
|
440
535
|
title: string;
|
|
441
536
|
rootInstanceId: string;
|
|
442
537
|
systemDataSourceId: string;
|
|
538
|
+
history?: string[] | undefined;
|
|
539
|
+
marketplace?: {
|
|
540
|
+
include?: boolean | undefined;
|
|
541
|
+
category?: string | undefined;
|
|
542
|
+
thumbnailAssetId?: string | undefined;
|
|
543
|
+
} | undefined;
|
|
443
544
|
};
|
|
444
545
|
pages: {
|
|
445
546
|
path: string;
|
|
@@ -454,6 +555,7 @@ export declare const Pages: z.ZodObject<{
|
|
|
454
555
|
socialImageUrl?: string | undefined;
|
|
455
556
|
status?: string | undefined;
|
|
456
557
|
redirect?: string | undefined;
|
|
558
|
+
documentType?: "html" | "xml" | undefined;
|
|
457
559
|
custom?: {
|
|
458
560
|
property: string;
|
|
459
561
|
content: string;
|
|
@@ -462,6 +564,12 @@ export declare const Pages: z.ZodObject<{
|
|
|
462
564
|
title: string;
|
|
463
565
|
rootInstanceId: string;
|
|
464
566
|
systemDataSourceId: string;
|
|
567
|
+
history?: string[] | undefined;
|
|
568
|
+
marketplace?: {
|
|
569
|
+
include?: boolean | undefined;
|
|
570
|
+
category?: string | undefined;
|
|
571
|
+
thumbnailAssetId?: string | undefined;
|
|
572
|
+
} | undefined;
|
|
465
573
|
}[];
|
|
466
574
|
folders: {
|
|
467
575
|
id: string;
|
|
@@ -497,6 +605,7 @@ export declare const Pages: z.ZodObject<{
|
|
|
497
605
|
socialImageUrl?: string | undefined;
|
|
498
606
|
status?: string | undefined;
|
|
499
607
|
redirect?: string | undefined;
|
|
608
|
+
documentType?: "html" | "xml" | undefined;
|
|
500
609
|
custom?: {
|
|
501
610
|
property: string;
|
|
502
611
|
content: string;
|
|
@@ -505,6 +614,12 @@ export declare const Pages: z.ZodObject<{
|
|
|
505
614
|
title: string;
|
|
506
615
|
rootInstanceId: string;
|
|
507
616
|
systemDataSourceId: string;
|
|
617
|
+
history?: string[] | undefined;
|
|
618
|
+
marketplace?: {
|
|
619
|
+
include?: boolean | undefined;
|
|
620
|
+
category?: string | undefined;
|
|
621
|
+
thumbnailAssetId?: string | undefined;
|
|
622
|
+
} | undefined;
|
|
508
623
|
};
|
|
509
624
|
pages: {
|
|
510
625
|
path: string;
|
|
@@ -519,6 +634,7 @@ export declare const Pages: z.ZodObject<{
|
|
|
519
634
|
socialImageUrl?: string | undefined;
|
|
520
635
|
status?: string | undefined;
|
|
521
636
|
redirect?: string | undefined;
|
|
637
|
+
documentType?: "html" | "xml" | undefined;
|
|
522
638
|
custom?: {
|
|
523
639
|
property: string;
|
|
524
640
|
content: string;
|
|
@@ -527,6 +643,12 @@ export declare const Pages: z.ZodObject<{
|
|
|
527
643
|
title: string;
|
|
528
644
|
rootInstanceId: string;
|
|
529
645
|
systemDataSourceId: string;
|
|
646
|
+
history?: string[] | undefined;
|
|
647
|
+
marketplace?: {
|
|
648
|
+
include?: boolean | undefined;
|
|
649
|
+
category?: string | undefined;
|
|
650
|
+
thumbnailAssetId?: string | undefined;
|
|
651
|
+
} | undefined;
|
|
530
652
|
}[];
|
|
531
653
|
folders: {
|
|
532
654
|
id: string;
|
|
@@ -2,6 +2,7 @@ import { z } from "zod";
|
|
|
2
2
|
export declare const Resource: z.ZodObject<{
|
|
3
3
|
id: z.ZodString;
|
|
4
4
|
name: z.ZodString;
|
|
5
|
+
control: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<"system">, z.ZodLiteral<"graphql">]>>;
|
|
5
6
|
method: z.ZodUnion<[z.ZodLiteral<"get">, z.ZodLiteral<"post">, z.ZodLiteral<"put">, z.ZodLiteral<"delete">]>;
|
|
6
7
|
url: z.ZodString;
|
|
7
8
|
headers: z.ZodArray<z.ZodObject<{
|
|
@@ -24,6 +25,7 @@ export declare const Resource: z.ZodObject<{
|
|
|
24
25
|
value: string;
|
|
25
26
|
name: string;
|
|
26
27
|
}[];
|
|
28
|
+
control?: "system" | "graphql" | undefined;
|
|
27
29
|
body?: string | undefined;
|
|
28
30
|
}, {
|
|
29
31
|
id: string;
|
|
@@ -34,6 +36,7 @@ export declare const Resource: z.ZodObject<{
|
|
|
34
36
|
value: string;
|
|
35
37
|
name: string;
|
|
36
38
|
}[];
|
|
39
|
+
control?: "system" | "graphql" | undefined;
|
|
37
40
|
body?: string | undefined;
|
|
38
41
|
}>;
|
|
39
42
|
export type Resource = z.infer<typeof Resource>;
|
|
@@ -78,6 +81,7 @@ export type ResourceRequest = z.infer<typeof ResourceRequest>;
|
|
|
78
81
|
export declare const Resources: z.ZodMap<z.ZodString, z.ZodObject<{
|
|
79
82
|
id: z.ZodString;
|
|
80
83
|
name: z.ZodString;
|
|
84
|
+
control: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<"system">, z.ZodLiteral<"graphql">]>>;
|
|
81
85
|
method: z.ZodUnion<[z.ZodLiteral<"get">, z.ZodLiteral<"post">, z.ZodLiteral<"put">, z.ZodLiteral<"delete">]>;
|
|
82
86
|
url: z.ZodString;
|
|
83
87
|
headers: z.ZodArray<z.ZodObject<{
|
|
@@ -100,6 +104,7 @@ export declare const Resources: z.ZodMap<z.ZodString, z.ZodObject<{
|
|
|
100
104
|
value: string;
|
|
101
105
|
name: string;
|
|
102
106
|
}[];
|
|
107
|
+
control?: "system" | "graphql" | undefined;
|
|
103
108
|
body?: string | undefined;
|
|
104
109
|
}, {
|
|
105
110
|
id: string;
|
|
@@ -110,10 +115,12 @@ export declare const Resources: z.ZodMap<z.ZodString, z.ZodObject<{
|
|
|
110
115
|
value: string;
|
|
111
116
|
name: string;
|
|
112
117
|
}[];
|
|
118
|
+
control?: "system" | "graphql" | undefined;
|
|
113
119
|
body?: string | undefined;
|
|
114
120
|
}>>;
|
|
115
121
|
export type Resources = z.infer<typeof Resources>;
|
|
116
122
|
/**
|
|
117
123
|
* Prevents fetch cycles by prefixing local resources.
|
|
118
124
|
*/
|
|
119
|
-
export declare const isLocalResource: (pathname: string, resourceName
|
|
125
|
+
export declare const isLocalResource: (pathname: string, resourceName?: string) => boolean;
|
|
126
|
+
export declare const sitemapResourceUrl = "/$resources/sitemap.xml";
|
|
@@ -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";
|
|
@@ -107,7 +115,7 @@ export declare const WebstudioFragment: z.ZodObject<{
|
|
|
107
115
|
label?: string | undefined;
|
|
108
116
|
}>, "many">;
|
|
109
117
|
assets: z.ZodArray<z.ZodUnion<[z.ZodObject<{
|
|
110
|
-
format: z.ZodUnion<[z.ZodLiteral<"ttf">, z.ZodLiteral<"woff">, z.ZodLiteral<"woff2"
|
|
118
|
+
format: z.ZodUnion<[z.ZodLiteral<"ttf">, z.ZodLiteral<"woff">, z.ZodLiteral<"woff2">]>;
|
|
111
119
|
meta: z.ZodUnion<[z.ZodObject<{
|
|
112
120
|
family: z.ZodString;
|
|
113
121
|
style: z.ZodEnum<["normal", "italic", "oblique"]>;
|
|
@@ -166,7 +174,7 @@ export declare const WebstudioFragment: z.ZodObject<{
|
|
|
166
174
|
type: "font";
|
|
167
175
|
id: string;
|
|
168
176
|
name: string;
|
|
169
|
-
format: "ttf" | "woff" | "woff2"
|
|
177
|
+
format: "ttf" | "woff" | "woff2";
|
|
170
178
|
meta: ({
|
|
171
179
|
family: string;
|
|
172
180
|
style: "normal" | "italic" | "oblique";
|
|
@@ -200,7 +208,7 @@ export declare const WebstudioFragment: z.ZodObject<{
|
|
|
200
208
|
type: "font";
|
|
201
209
|
id: string;
|
|
202
210
|
name: string;
|
|
203
|
-
format: "ttf" | "woff" | "woff2"
|
|
211
|
+
format: "ttf" | "woff" | "woff2";
|
|
204
212
|
meta: ({
|
|
205
213
|
family: string;
|
|
206
214
|
style: "normal" | "italic" | "oblique";
|
|
@@ -406,6 +414,7 @@ export declare const WebstudioFragment: z.ZodObject<{
|
|
|
406
414
|
resources: z.ZodArray<z.ZodObject<{
|
|
407
415
|
id: z.ZodString;
|
|
408
416
|
name: z.ZodString;
|
|
417
|
+
control: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<"system">, z.ZodLiteral<"graphql">]>>;
|
|
409
418
|
method: z.ZodUnion<[z.ZodLiteral<"get">, z.ZodLiteral<"post">, z.ZodLiteral<"put">, z.ZodLiteral<"delete">]>;
|
|
410
419
|
url: z.ZodString;
|
|
411
420
|
headers: z.ZodArray<z.ZodObject<{
|
|
@@ -428,6 +437,7 @@ export declare const WebstudioFragment: z.ZodObject<{
|
|
|
428
437
|
value: string;
|
|
429
438
|
name: string;
|
|
430
439
|
}[];
|
|
440
|
+
control?: "system" | "graphql" | undefined;
|
|
431
441
|
body?: string | undefined;
|
|
432
442
|
}, {
|
|
433
443
|
id: string;
|
|
@@ -438,6 +448,7 @@ export declare const WebstudioFragment: z.ZodObject<{
|
|
|
438
448
|
value: string;
|
|
439
449
|
name: string;
|
|
440
450
|
}[];
|
|
451
|
+
control?: "system" | "graphql" | undefined;
|
|
441
452
|
body?: string | undefined;
|
|
442
453
|
}>, "many">;
|
|
443
454
|
props: z.ZodArray<z.ZodUnion<[z.ZodObject<{
|
|
@@ -1658,6 +1669,7 @@ export declare const WebstudioFragment: z.ZodObject<{
|
|
|
1658
1669
|
children: ({
|
|
1659
1670
|
value: string;
|
|
1660
1671
|
type: "text";
|
|
1672
|
+
placeholder?: boolean | undefined;
|
|
1661
1673
|
} | {
|
|
1662
1674
|
value: string;
|
|
1663
1675
|
type: "id";
|
|
@@ -1671,6 +1683,7 @@ export declare const WebstudioFragment: z.ZodObject<{
|
|
|
1671
1683
|
children: ({
|
|
1672
1684
|
value: string;
|
|
1673
1685
|
type: "text";
|
|
1686
|
+
placeholder?: boolean | undefined;
|
|
1674
1687
|
} | {
|
|
1675
1688
|
value: string;
|
|
1676
1689
|
type: "id";
|
|
@@ -1685,7 +1698,7 @@ export declare const WebstudioFragment: z.ZodObject<{
|
|
|
1685
1698
|
type: "font";
|
|
1686
1699
|
id: string;
|
|
1687
1700
|
name: string;
|
|
1688
|
-
format: "ttf" | "woff" | "woff2"
|
|
1701
|
+
format: "ttf" | "woff" | "woff2";
|
|
1689
1702
|
meta: ({
|
|
1690
1703
|
family: string;
|
|
1691
1704
|
style: "normal" | "italic" | "oblique";
|
|
@@ -1738,6 +1751,7 @@ export declare const WebstudioFragment: z.ZodObject<{
|
|
|
1738
1751
|
value: string;
|
|
1739
1752
|
name: string;
|
|
1740
1753
|
}[];
|
|
1754
|
+
control?: "system" | "graphql" | undefined;
|
|
1741
1755
|
body?: string | undefined;
|
|
1742
1756
|
}[];
|
|
1743
1757
|
props: ({
|
|
@@ -2312,6 +2326,7 @@ export declare const WebstudioFragment: z.ZodObject<{
|
|
|
2312
2326
|
children: ({
|
|
2313
2327
|
value: string;
|
|
2314
2328
|
type: "text";
|
|
2329
|
+
placeholder?: boolean | undefined;
|
|
2315
2330
|
} | {
|
|
2316
2331
|
value: string;
|
|
2317
2332
|
type: "id";
|
|
@@ -2325,6 +2340,7 @@ export declare const WebstudioFragment: z.ZodObject<{
|
|
|
2325
2340
|
children: ({
|
|
2326
2341
|
value: string;
|
|
2327
2342
|
type: "text";
|
|
2343
|
+
placeholder?: boolean | undefined;
|
|
2328
2344
|
} | {
|
|
2329
2345
|
value: string;
|
|
2330
2346
|
type: "id";
|
|
@@ -2339,7 +2355,7 @@ export declare const WebstudioFragment: z.ZodObject<{
|
|
|
2339
2355
|
type: "font";
|
|
2340
2356
|
id: string;
|
|
2341
2357
|
name: string;
|
|
2342
|
-
format: "ttf" | "woff" | "woff2"
|
|
2358
|
+
format: "ttf" | "woff" | "woff2";
|
|
2343
2359
|
meta: ({
|
|
2344
2360
|
family: string;
|
|
2345
2361
|
style: "normal" | "italic" | "oblique";
|
|
@@ -2392,6 +2408,7 @@ export declare const WebstudioFragment: z.ZodObject<{
|
|
|
2392
2408
|
value: string;
|
|
2393
2409
|
name: string;
|
|
2394
2410
|
}[];
|
|
2411
|
+
control?: "system" | "graphql" | undefined;
|
|
2395
2412
|
body?: string | undefined;
|
|
2396
2413
|
}[];
|
|
2397
2414
|
props: ({
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@webstudio-is/sdk",
|
|
3
|
-
"version": "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",
|
|
@@ -9,8 +9,7 @@
|
|
|
9
9
|
"exports": {
|
|
10
10
|
"webstudio": "./src/index.ts",
|
|
11
11
|
"types": "./lib/types/index.d.ts",
|
|
12
|
-
"import": "./lib/index.js"
|
|
13
|
-
"require": "./lib/index.js"
|
|
12
|
+
"import": "./lib/index.js"
|
|
14
13
|
},
|
|
15
14
|
"files": [
|
|
16
15
|
"lib/*",
|
|
@@ -22,8 +21,8 @@
|
|
|
22
21
|
"acorn-walk": "^8.3.2",
|
|
23
22
|
"type-fest": "^4.3.1",
|
|
24
23
|
"zod": "^3.22.4",
|
|
25
|
-
"@webstudio-is/css-engine": "0.
|
|
26
|
-
"@webstudio-is/fonts": "0.
|
|
24
|
+
"@webstudio-is/css-engine": "0.167.0",
|
|
25
|
+
"@webstudio-is/fonts": "0.167.0"
|
|
27
26
|
},
|
|
28
27
|
"devDependencies": {
|
|
29
28
|
"@jest/globals": "^29.7.0",
|