@webstudio-is/sdk 0.261.1 → 0.262.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
@@ -113,7 +113,7 @@ var DefaultPagePage = z2.string().refine((path) => path !== "", "Can't be empty"
113
113
  // And we cannot customize it due to bug in Remix: https://github.com/remix-run/remix/issues/2933
114
114
  (path) => path !== "/build" && path.startsWith("/build/") === false,
115
115
  "/build prefix is reserved for the system"
116
- );
116
+ ).refine((path) => path.length <= 255, "Path can't exceed 255 characters");
117
117
  var OldPagePath = z2.string().refine((path) => path !== "", "Can't be empty").refine((path) => path !== "/", "Can't be just a /").refine(
118
118
  (path) => path === "" || path.startsWith("/"),
119
119
  "Must start with a / or a full URL e.g. https://website.org"
@@ -612,7 +612,8 @@ var StyleSourceId = z9.string();
612
612
  var StyleSourceToken = z9.object({
613
613
  type: z9.literal("token"),
614
614
  id: StyleSourceId,
615
- name: z9.string()
615
+ name: z9.string(),
616
+ locked: z9.boolean().optional()
616
617
  });
617
618
  var StyleSourceLocal = z9.object({
618
619
  type: z9.literal("local"),
@@ -28,9 +28,9 @@ export declare const PageTitle: z.ZodEffects<z.ZodString, string, string>;
28
28
  export declare const documentTypes: readonly ["html", "xml"];
29
29
  export declare const HomePagePath: z.ZodEffects<z.ZodString, "", string>;
30
30
  export declare const OldPagePath: 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>;
31
- 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>;
31
+ export declare const PagePath: z.ZodEffects<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>, string, string>;
32
32
  declare const Page: z.ZodObject<{
33
- 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>;
33
+ path: z.ZodEffects<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>, string, string>;
34
34
  id: z.ZodString;
35
35
  name: z.ZodEffects<z.ZodString, string, string>;
36
36
  title: z.ZodEffects<z.ZodString, string, string>;
@@ -362,7 +362,7 @@ export declare const Pages: z.ZodObject<{
362
362
  } | undefined;
363
363
  }>;
364
364
  pages: z.ZodArray<z.ZodObject<{
365
- 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>;
365
+ path: z.ZodEffects<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>, string, string>;
366
366
  id: z.ZodString;
367
367
  name: z.ZodEffects<z.ZodString, string, string>;
368
368
  title: z.ZodEffects<z.ZodString, string, string>;
@@ -3,28 +3,34 @@ declare const StyleSourceToken: z.ZodObject<{
3
3
  type: z.ZodLiteral<"token">;
4
4
  id: z.ZodString;
5
5
  name: z.ZodString;
6
+ locked: z.ZodOptional<z.ZodBoolean>;
6
7
  }, "strip", z.ZodTypeAny, {
7
8
  type: "token";
8
9
  name: string;
9
10
  id: string;
11
+ locked?: boolean | undefined;
10
12
  }, {
11
13
  type: "token";
12
14
  name: string;
13
15
  id: string;
16
+ locked?: boolean | undefined;
14
17
  }>;
15
18
  export type StyleSourceToken = z.infer<typeof StyleSourceToken>;
16
19
  export declare const StyleSource: z.ZodUnion<[z.ZodObject<{
17
20
  type: z.ZodLiteral<"token">;
18
21
  id: z.ZodString;
19
22
  name: z.ZodString;
23
+ locked: z.ZodOptional<z.ZodBoolean>;
20
24
  }, "strip", z.ZodTypeAny, {
21
25
  type: "token";
22
26
  name: string;
23
27
  id: string;
28
+ locked?: boolean | undefined;
24
29
  }, {
25
30
  type: "token";
26
31
  name: string;
27
32
  id: string;
33
+ locked?: boolean | undefined;
28
34
  }>, z.ZodObject<{
29
35
  type: z.ZodLiteral<"local">;
30
36
  id: z.ZodString;
@@ -40,14 +46,17 @@ export declare const StyleSources: z.ZodMap<z.ZodString, z.ZodUnion<[z.ZodObject
40
46
  type: z.ZodLiteral<"token">;
41
47
  id: z.ZodString;
42
48
  name: z.ZodString;
49
+ locked: z.ZodOptional<z.ZodBoolean>;
43
50
  }, "strip", z.ZodTypeAny, {
44
51
  type: "token";
45
52
  name: string;
46
53
  id: string;
54
+ locked?: boolean | undefined;
47
55
  }, {
48
56
  type: "token";
49
57
  name: string;
50
58
  id: string;
59
+ locked?: boolean | undefined;
51
60
  }>, z.ZodObject<{
52
61
  type: z.ZodLiteral<"local">;
53
62
  id: z.ZodString;
@@ -19426,14 +19426,17 @@ export declare const WebstudioFragment: z.ZodObject<{
19426
19426
  type: z.ZodLiteral<"token">;
19427
19427
  id: z.ZodString;
19428
19428
  name: z.ZodString;
19429
+ locked: z.ZodOptional<z.ZodBoolean>;
19429
19430
  }, "strip", z.ZodTypeAny, {
19430
19431
  type: "token";
19431
19432
  name: string;
19432
19433
  id: string;
19434
+ locked?: boolean | undefined;
19433
19435
  }, {
19434
19436
  type: "token";
19435
19437
  name: string;
19436
19438
  id: string;
19439
+ locked?: boolean | undefined;
19437
19440
  }>, z.ZodObject<{
19438
19441
  type: z.ZodLiteral<"local">;
19439
19442
  id: z.ZodString;
@@ -22851,6 +22854,7 @@ export declare const WebstudioFragment: z.ZodObject<{
22851
22854
  type: "token";
22852
22855
  name: string;
22853
22856
  id: string;
22857
+ locked?: boolean | undefined;
22854
22858
  } | {
22855
22859
  type: "local";
22856
22860
  id: string;
@@ -25045,6 +25049,7 @@ export declare const WebstudioFragment: z.ZodObject<{
25045
25049
  type: "token";
25046
25050
  name: string;
25047
25051
  id: string;
25052
+ locked?: boolean | undefined;
25048
25053
  } | {
25049
25054
  type: "local";
25050
25055
  id: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@webstudio-is/sdk",
3
- "version": "0.261.1",
3
+ "version": "0.262.0",
4
4
  "description": "Webstudio project data schema",
5
5
  "author": "Webstudio <github@webstudio.is>",
6
6
  "homepage": "https://webstudio.is",
@@ -45,16 +45,16 @@
45
45
  "type-fest": "^4.37.0",
46
46
  "warn-once": "^0.1.1",
47
47
  "zod": "^3.24.2",
48
- "@webstudio-is/css-engine": "0.261.1",
49
- "@webstudio-is/fonts": "0.261.1",
50
- "@webstudio-is/icons": "0.261.1"
48
+ "@webstudio-is/css-engine": "0.262.0",
49
+ "@webstudio-is/icons": "0.262.0",
50
+ "@webstudio-is/fonts": "0.262.0"
51
51
  },
52
52
  "devDependencies": {
53
53
  "html-tags": "^4.0.0",
54
54
  "vitest": "^3.1.2",
55
- "@webstudio-is/template": "0.261.1",
56
- "@webstudio-is/tsconfig": "1.0.7",
57
- "@webstudio-is/css-data": "0.0.0"
55
+ "@webstudio-is/css-data": "0.0.0",
56
+ "@webstudio-is/template": "0.262.0",
57
+ "@webstudio-is/tsconfig": "1.0.7"
58
58
  },
59
59
  "scripts": {
60
60
  "typecheck": "tsgo --noEmit -p tsconfig.typecheck.json",