@makeswift/runtime 0.23.12-canary.5 → 0.23.13

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.
Files changed (76) hide show
  1. package/dist/cjs/next/api-handler/handlers/clear-draft.js +64 -0
  2. package/dist/cjs/next/api-handler/handlers/clear-draft.js.map +1 -0
  3. package/dist/cjs/next/api-handler/handlers/manifest.js +1 -1
  4. package/dist/cjs/next/api-handler/handlers/redirect-draft.js +77 -0
  5. package/dist/cjs/next/api-handler/handlers/redirect-draft.js.map +1 -0
  6. package/dist/cjs/next/api-handler/handlers/redirect-preview.js +67 -0
  7. package/dist/cjs/next/api-handler/handlers/redirect-preview.js.map +1 -0
  8. package/dist/cjs/next/api-handler/handlers/utils/draft.js +53 -0
  9. package/dist/cjs/next/api-handler/handlers/utils/draft.js.map +1 -0
  10. package/dist/cjs/next/api-handler/handlers/webhook/site-published.js +2 -4
  11. package/dist/cjs/next/api-handler/handlers/webhook/site-published.js.map +1 -1
  12. package/dist/cjs/next/cache.js +29 -0
  13. package/dist/cjs/next/cache.js.map +1 -0
  14. package/dist/cjs/next/client.js +2 -2
  15. package/dist/cjs/next/client.js.map +1 -1
  16. package/dist/cjs/runtimes/react/components/draft-switcher/draft-switcher.js +72 -0
  17. package/dist/cjs/runtimes/react/components/draft-switcher/draft-switcher.js.map +1 -0
  18. package/dist/cjs/runtimes/react/components/draft-switcher/draft-toolbar.js +79 -0
  19. package/dist/cjs/runtimes/react/components/draft-switcher/draft-toolbar.js.map +1 -0
  20. package/dist/cjs/runtimes/react/components/hooks/use-builder-connection-ping.js +67 -0
  21. package/dist/cjs/runtimes/react/components/hooks/use-builder-connection-ping.js.map +1 -0
  22. package/dist/cjs/runtimes/react/components/hooks/use-builder-handshake.js +45 -0
  23. package/dist/cjs/runtimes/react/components/hooks/use-builder-handshake.js.map +1 -0
  24. package/dist/cjs/state/makeswift-api-client.js +2 -2
  25. package/dist/cjs/state/makeswift-api-client.js.map +1 -1
  26. package/dist/esm/next/api-handler/handlers/clear-draft.js +50 -0
  27. package/dist/esm/next/api-handler/handlers/clear-draft.js.map +1 -0
  28. package/dist/esm/next/api-handler/handlers/manifest.js +1 -1
  29. package/dist/esm/next/api-handler/handlers/redirect-draft.js +63 -0
  30. package/dist/esm/next/api-handler/handlers/redirect-draft.js.map +1 -0
  31. package/dist/esm/next/api-handler/handlers/redirect-preview.js +53 -0
  32. package/dist/esm/next/api-handler/handlers/redirect-preview.js.map +1 -0
  33. package/dist/esm/next/api-handler/handlers/utils/draft.js +24 -0
  34. package/dist/esm/next/api-handler/handlers/utils/draft.js.map +1 -0
  35. package/dist/esm/next/api-handler/handlers/webhook/site-published.js +1 -2
  36. package/dist/esm/next/api-handler/handlers/webhook/site-published.js.map +1 -1
  37. package/dist/esm/next/cache.js +5 -0
  38. package/dist/esm/next/cache.js.map +1 -0
  39. package/dist/esm/next/client.js +1 -1
  40. package/dist/esm/next/client.js.map +1 -1
  41. package/dist/esm/runtimes/react/components/draft-switcher/draft-switcher.js +48 -0
  42. package/dist/esm/runtimes/react/components/draft-switcher/draft-switcher.js.map +1 -0
  43. package/dist/esm/runtimes/react/components/draft-switcher/draft-toolbar.js +55 -0
  44. package/dist/esm/runtimes/react/components/draft-switcher/draft-toolbar.js.map +1 -0
  45. package/dist/esm/runtimes/react/components/hooks/use-builder-connection-ping.js +43 -0
  46. package/dist/esm/runtimes/react/components/hooks/use-builder-connection-ping.js.map +1 -0
  47. package/dist/esm/runtimes/react/components/hooks/use-builder-handshake.js +21 -0
  48. package/dist/esm/runtimes/react/components/hooks/use-builder-handshake.js.map +1 -0
  49. package/dist/esm/state/makeswift-api-client.js +1 -1
  50. package/dist/esm/state/makeswift-api-client.js.map +1 -1
  51. package/dist/types/locale.d.ts +1 -1
  52. package/dist/types/next/api-handler/handlers/clear-draft.d.ts +20 -0
  53. package/dist/types/next/api-handler/handlers/clear-draft.d.ts.map +1 -0
  54. package/dist/types/next/api-handler/handlers/redirect-draft.d.ts +18 -0
  55. package/dist/types/next/api-handler/handlers/redirect-draft.d.ts.map +1 -0
  56. package/dist/types/next/api-handler/handlers/redirect-preview.d.ts +18 -0
  57. package/dist/types/next/api-handler/handlers/redirect-preview.d.ts.map +1 -0
  58. package/dist/types/next/api-handler/handlers/utils/draft.d.ts +16 -0
  59. package/dist/types/next/api-handler/handlers/utils/draft.d.ts.map +1 -0
  60. package/dist/types/next/api-handler/handlers/webhook/site-published.d.ts +1 -2
  61. package/dist/types/next/api-handler/handlers/webhook/site-published.d.ts.map +1 -1
  62. package/dist/types/next/api-handler/handlers/webhook/types.d.ts +12 -12
  63. package/dist/types/next/cache.d.ts +2 -0
  64. package/dist/types/next/cache.d.ts.map +1 -0
  65. package/dist/types/next/client.d.ts +8 -8
  66. package/dist/types/next/types.d.ts +123 -0
  67. package/dist/types/next/types.d.ts.map +1 -0
  68. package/dist/types/runtimes/react/components/draft-switcher/draft-switcher.d.ts +4 -0
  69. package/dist/types/runtimes/react/components/draft-switcher/draft-switcher.d.ts.map +1 -0
  70. package/dist/types/runtimes/react/components/draft-switcher/draft-toolbar.d.ts +6 -0
  71. package/dist/types/runtimes/react/components/draft-switcher/draft-toolbar.d.ts.map +1 -0
  72. package/dist/types/runtimes/react/components/hooks/use-builder-connection-ping.d.ts +4 -0
  73. package/dist/types/runtimes/react/components/hooks/use-builder-connection-ping.d.ts.map +1 -0
  74. package/dist/types/runtimes/react/components/hooks/use-builder-handshake.d.ts +4 -0
  75. package/dist/types/runtimes/react/components/hooks/use-builder-handshake.d.ts.map +1 -0
  76. package/package.json +3 -3
@@ -0,0 +1,20 @@
1
+ import { NextApiRequest, NextApiResponse } from 'next';
2
+ import { NextRequest, NextResponse } from 'next/server';
3
+ type Context = {
4
+ params: {
5
+ [key: string]: string | string[];
6
+ };
7
+ };
8
+ type ClearDraftError = string;
9
+ type Response = {
10
+ __brand: 'ClearDraftResponse';
11
+ };
12
+ export type ClearDraftResponse = ClearDraftError | Response;
13
+ export default function clearDraftHandler(request: NextRequest, context: Context, { apiKey }: {
14
+ apiKey: string;
15
+ }): Promise<NextResponse<ClearDraftResponse>>;
16
+ export default function clearDraftHandler(req: NextApiRequest, res: NextApiResponse<ClearDraftResponse>, { apiKey }: {
17
+ apiKey: string;
18
+ }): Promise<void>;
19
+ export {};
20
+ //# sourceMappingURL=clear-draft.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"clear-draft.d.ts","sourceRoot":"","sources":["../../../../../src/next/api-handler/handlers/clear-draft.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,MAAM,CAAA;AACtD,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;AAgCvD,KAAK,OAAO,GAAG;IAAE,MAAM,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,EAAE,CAAA;KAAE,CAAA;CAAE,CAAA;AAE/D,KAAK,eAAe,GAAG,MAAM,CAAA;AAE7B,KAAK,QAAQ,GAAG;IAAE,OAAO,EAAE,oBAAoB,CAAA;CAAE,CAAA;AAEjD,MAAM,MAAM,kBAAkB,GAAG,eAAe,GAAG,QAAQ,CAAA;AAS3D,wBAA8B,iBAAiB,CAC7C,OAAO,EAAE,WAAW,EACpB,OAAO,EAAE,OAAO,EAChB,EAAE,MAAM,EAAE,EAAE;IAAE,MAAM,EAAE,MAAM,CAAA;CAAE,GAC7B,OAAO,CAAC,YAAY,CAAC,kBAAkB,CAAC,CAAC,CAAA;AAC5C,wBAA8B,iBAAiB,CAC7C,GAAG,EAAE,cAAc,EACnB,GAAG,EAAE,eAAe,CAAC,kBAAkB,CAAC,EACxC,EAAE,MAAM,EAAE,EAAE;IAAE,MAAM,EAAE,MAAM,CAAA;CAAE,GAC7B,OAAO,CAAC,IAAI,CAAC,CAAA"}
@@ -0,0 +1,18 @@
1
+ import { NextApiRequest, NextApiResponse } from 'next';
2
+ import { NextRequest, NextResponse } from 'next/server';
3
+ type Context = {
4
+ params: {
5
+ [key: string]: string | string[];
6
+ };
7
+ };
8
+ type RedirectDraftError = string;
9
+ type Response = unknown;
10
+ export type RedirectDraftResponse = RedirectDraftError | Response;
11
+ export default function redirectDraftHandler(request: NextRequest, context: Context, { apiKey }: {
12
+ apiKey: string;
13
+ }): Promise<NextResponse<RedirectDraftResponse>>;
14
+ export default function redirectDraftHandler(req: NextApiRequest, res: NextApiResponse<RedirectDraftResponse>, { apiKey }: {
15
+ apiKey: string;
16
+ }): Promise<void>;
17
+ export {};
18
+ //# sourceMappingURL=redirect-draft.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"redirect-draft.d.ts","sourceRoot":"","sources":["../../../../../src/next/api-handler/handlers/redirect-draft.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,MAAM,CAAA;AACtD,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;AAevD,KAAK,OAAO,GAAG;IAAE,MAAM,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,EAAE,CAAA;KAAE,CAAA;CAAE,CAAA;AAE/D,KAAK,kBAAkB,GAAG,MAAM,CAAA;AAEhC,KAAK,QAAQ,GAAG,OAAO,CAAA;AAEvB,MAAM,MAAM,qBAAqB,GAAG,kBAAkB,GAAG,QAAQ,CAAA;AASjE,wBAA8B,oBAAoB,CAChD,OAAO,EAAE,WAAW,EACpB,OAAO,EAAE,OAAO,EAChB,EAAE,MAAM,EAAE,EAAE;IAAE,MAAM,EAAE,MAAM,CAAA;CAAE,GAC7B,OAAO,CAAC,YAAY,CAAC,qBAAqB,CAAC,CAAC,CAAA;AAC/C,wBAA8B,oBAAoB,CAChD,GAAG,EAAE,cAAc,EACnB,GAAG,EAAE,eAAe,CAAC,qBAAqB,CAAC,EAC3C,EAAE,MAAM,EAAE,EAAE;IAAE,MAAM,EAAE,MAAM,CAAA;CAAE,GAC7B,OAAO,CAAC,IAAI,CAAC,CAAA"}
@@ -0,0 +1,18 @@
1
+ import { NextApiRequest, NextApiResponse } from 'next';
2
+ import { NextRequest, NextResponse } from 'next/server';
3
+ type Context = {
4
+ params: {
5
+ [key: string]: string | string[];
6
+ };
7
+ };
8
+ type RedirectPreviewError = string;
9
+ type Response = unknown;
10
+ export type RedirectPreviewResponse = RedirectPreviewError | Response;
11
+ export default function redirectPreviewHandler(request: NextRequest, context: Context, { apiKey }: {
12
+ apiKey: string;
13
+ }): Promise<NextResponse<RedirectPreviewResponse>>;
14
+ export default function redirectPreviewHandler(req: NextApiRequest, res: NextApiResponse<RedirectPreviewResponse>, { apiKey }: {
15
+ apiKey: string;
16
+ }): Promise<void>;
17
+ export {};
18
+ //# sourceMappingURL=redirect-preview.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"redirect-preview.d.ts","sourceRoot":"","sources":["../../../../../src/next/api-handler/handlers/redirect-preview.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,MAAM,CAAA;AACtD,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;AAevD,KAAK,OAAO,GAAG;IAAE,MAAM,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,EAAE,CAAA;KAAE,CAAA;CAAE,CAAA;AAE/D,KAAK,oBAAoB,GAAG,MAAM,CAAA;AAElC,KAAK,QAAQ,GAAG,OAAO,CAAA;AAEvB,MAAM,MAAM,uBAAuB,GAAG,oBAAoB,GAAG,QAAQ,CAAA;AASrE,wBAA8B,sBAAsB,CAClD,OAAO,EAAE,WAAW,EACpB,OAAO,EAAE,OAAO,EAChB,EAAE,MAAM,EAAE,EAAE;IAAE,MAAM,EAAE,MAAM,CAAA;CAAE,GAC7B,OAAO,CAAC,YAAY,CAAC,uBAAuB,CAAC,CAAC,CAAA;AACjD,wBAA8B,sBAAsB,CAClD,GAAG,EAAE,cAAc,EACnB,GAAG,EAAE,eAAe,CAAC,uBAAuB,CAAC,EAC7C,EAAE,MAAM,EAAE,EAAE;IAAE,MAAM,EAAE,MAAM,CAAA;CAAE,GAC7B,OAAO,CAAC,IAAI,CAAC,CAAA"}
@@ -0,0 +1,16 @@
1
+ export declare const PRERENDER_BYPASS_COOKIE = "__prerender_bypass";
2
+ export declare const PREVIEW_DATA_COOKIE = "__next_preview_data";
3
+ export declare const MAKESWIFT_DRAFT_DATA_COOKIE = "x-makeswift-draft-data";
4
+ export declare const SET_COOKIE_HEADER = "set-cookie";
5
+ export declare const SearchParams: {
6
+ readonly DraftMode: "x-makeswift-draft-mode";
7
+ readonly PreviewMode: "x-makeswift-preview-mode";
8
+ };
9
+ export declare const cookieSettingOptions: {
10
+ readonly path: "/";
11
+ readonly sameSite: "none";
12
+ readonly secure: true;
13
+ readonly httpOnly: true;
14
+ readonly partitioned: true;
15
+ };
16
+ //# sourceMappingURL=draft.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"draft.d.ts","sourceRoot":"","sources":["../../../../../../src/next/api-handler/handlers/utils/draft.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,uBAAuB,uBAAuB,CAAA;AAC3D,eAAO,MAAM,mBAAmB,wBAAwB,CAAA;AAExD,eAAO,MAAM,2BAA2B,2BAA2B,CAAA;AACnE,eAAO,MAAM,iBAAiB,eAAe,CAAA;AAE7C,eAAO,MAAM,YAAY;;;CAGf,CAAA;AAEV,eAAO,MAAM,oBAAoB;;;;;;CAMvB,CAAA"}
@@ -1,8 +1,7 @@
1
- import { OnPublish, SitePublishedWebhookPayload, WebhookHandlerResult } from './types';
1
+ import { type OnPublish, type SitePublishedWebhookPayload, type WebhookHandlerResult } from './types';
2
2
  type SitePublishedParams = {
3
3
  onPublish?: OnPublish;
4
4
  };
5
5
  export declare function handleSitePublished(_payload: SitePublishedWebhookPayload, { onPublish }: SitePublishedParams): Promise<WebhookHandlerResult>;
6
- export declare const MAKESWIFT_CACHE_TAG = "@@makeswift";
7
6
  export {};
8
7
  //# sourceMappingURL=site-published.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"site-published.d.ts","sourceRoot":"","sources":["../../../../../../src/next/api-handler/handlers/webhook/site-published.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,2BAA2B,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAA;AAEtF,KAAK,mBAAmB,GAAG;IACzB,SAAS,CAAC,EAAE,SAAS,CAAA;CACtB,CAAA;AAED,wBAAsB,mBAAmB,CACvC,QAAQ,EAAE,2BAA2B,EACrC,EAAE,SAAS,EAAE,EAAE,mBAAmB,GACjC,OAAO,CAAC,oBAAoB,CAAC,CAW/B;AAED,eAAO,MAAM,mBAAmB,gBAAgB,CAAA"}
1
+ {"version":3,"file":"site-published.d.ts","sourceRoot":"","sources":["../../../../../../src/next/api-handler/handlers/webhook/site-published.ts"],"names":[],"mappings":"AACA,OAAO,EACL,KAAK,SAAS,EACd,KAAK,2BAA2B,EAChC,KAAK,oBAAoB,EAC1B,MAAM,SAAS,CAAA;AAIhB,KAAK,mBAAmB,GAAG;IACzB,SAAS,CAAC,EAAE,SAAS,CAAA;CACtB,CAAA;AAED,wBAAsB,mBAAmB,CACvC,QAAQ,EAAE,2BAA2B,EACrC,EAAE,SAAS,EAAE,EAAE,mBAAmB,GACjC,OAAO,CAAC,oBAAoB,CAAC,CAW/B"}
@@ -10,26 +10,26 @@ export declare const sitePublishedWebhookPayloadSchema: z.ZodObject<{
10
10
  from: z.ZodNullable<z.ZodString>;
11
11
  to: z.ZodString;
12
12
  }, "strip", z.ZodTypeAny, {
13
- from: string | null;
14
13
  to: string;
15
- }, {
16
14
  from: string | null;
15
+ }, {
17
16
  to: string;
17
+ from: string | null;
18
18
  }>;
19
19
  at: z.ZodNumber;
20
20
  }, "strip", z.ZodTypeAny, {
21
21
  at: number;
22
22
  siteId: string;
23
23
  publish: {
24
- from: string | null;
25
24
  to: string;
25
+ from: string | null;
26
26
  };
27
27
  }, {
28
28
  at: number;
29
29
  siteId: string;
30
30
  publish: {
31
- from: string | null;
32
31
  to: string;
32
+ from: string | null;
33
33
  };
34
34
  }>;
35
35
  }, "strip", z.ZodTypeAny, {
@@ -38,8 +38,8 @@ export declare const sitePublishedWebhookPayloadSchema: z.ZodObject<{
38
38
  at: number;
39
39
  siteId: string;
40
40
  publish: {
41
- from: string | null;
42
41
  to: string;
42
+ from: string | null;
43
43
  };
44
44
  };
45
45
  }, {
@@ -48,8 +48,8 @@ export declare const sitePublishedWebhookPayloadSchema: z.ZodObject<{
48
48
  at: number;
49
49
  siteId: string;
50
50
  publish: {
51
- from: string | null;
52
51
  to: string;
52
+ from: string | null;
53
53
  };
54
54
  };
55
55
  }>;
@@ -62,26 +62,26 @@ declare const webhookPayloadSchema: z.ZodObject<{
62
62
  from: z.ZodNullable<z.ZodString>;
63
63
  to: z.ZodString;
64
64
  }, "strip", z.ZodTypeAny, {
65
- from: string | null;
66
65
  to: string;
67
- }, {
68
66
  from: string | null;
67
+ }, {
69
68
  to: string;
69
+ from: string | null;
70
70
  }>;
71
71
  at: z.ZodNumber;
72
72
  }, "strip", z.ZodTypeAny, {
73
73
  at: number;
74
74
  siteId: string;
75
75
  publish: {
76
- from: string | null;
77
76
  to: string;
77
+ from: string | null;
78
78
  };
79
79
  }, {
80
80
  at: number;
81
81
  siteId: string;
82
82
  publish: {
83
- from: string | null;
84
83
  to: string;
84
+ from: string | null;
85
85
  };
86
86
  }>;
87
87
  }, "strip", z.ZodTypeAny, {
@@ -90,8 +90,8 @@ declare const webhookPayloadSchema: z.ZodObject<{
90
90
  at: number;
91
91
  siteId: string;
92
92
  publish: {
93
- from: string | null;
94
93
  to: string;
94
+ from: string | null;
95
95
  };
96
96
  };
97
97
  }, {
@@ -100,8 +100,8 @@ declare const webhookPayloadSchema: z.ZodObject<{
100
100
  at: number;
101
101
  siteId: string;
102
102
  publish: {
103
- from: string | null;
104
103
  to: string;
104
+ from: string | null;
105
105
  };
106
106
  };
107
107
  }>;
@@ -0,0 +1,2 @@
1
+ export declare const MAKESWIFT_CACHE_TAG = "@@makeswift";
2
+ //# sourceMappingURL=cache.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cache.d.ts","sourceRoot":"","sources":["../../../src/next/cache.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,mBAAmB,gBAAgB,CAAA"}
@@ -40,7 +40,7 @@ declare const makeswiftPageResultSchema: z.ZodObject<{
40
40
  canonicalUrl: string | null;
41
41
  socialImageUrl: string | null;
42
42
  sitemapPriority: number | null;
43
- sitemapFrequency: "never" | "always" | "hourly" | "daily" | "weekly" | "monthly" | "yearly" | null;
43
+ sitemapFrequency: "always" | "never" | "hourly" | "daily" | "weekly" | "monthly" | "yearly" | null;
44
44
  createdAt: string;
45
45
  updatedAt: string;
46
46
  publishedAt: string | null;
@@ -59,7 +59,7 @@ declare const makeswiftPageResultSchema: z.ZodObject<{
59
59
  canonicalUrl: string | null;
60
60
  socialImageUrl: string | null;
61
61
  sitemapPriority: number | null;
62
- sitemapFrequency: "never" | "always" | "hourly" | "daily" | "weekly" | "monthly" | "yearly" | null;
62
+ sitemapFrequency: "always" | "never" | "hourly" | "daily" | "weekly" | "monthly" | "yearly" | null;
63
63
  createdAt: string;
64
64
  updatedAt: string;
65
65
  publishedAt: string | null;
@@ -105,7 +105,7 @@ declare const makeswiftGetPagesResultAPISchema: z.ZodObject<{
105
105
  canonicalUrl: string | null;
106
106
  socialImageUrl: string | null;
107
107
  sitemapPriority: number | null;
108
- sitemapFrequency: "never" | "always" | "hourly" | "daily" | "weekly" | "monthly" | "yearly" | null;
108
+ sitemapFrequency: "always" | "never" | "hourly" | "daily" | "weekly" | "monthly" | "yearly" | null;
109
109
  createdAt: string;
110
110
  updatedAt: string;
111
111
  publishedAt: string | null;
@@ -124,7 +124,7 @@ declare const makeswiftGetPagesResultAPISchema: z.ZodObject<{
124
124
  canonicalUrl: string | null;
125
125
  socialImageUrl: string | null;
126
126
  sitemapPriority: number | null;
127
- sitemapFrequency: "never" | "always" | "hourly" | "daily" | "weekly" | "monthly" | "yearly" | null;
127
+ sitemapFrequency: "always" | "never" | "hourly" | "daily" | "weekly" | "monthly" | "yearly" | null;
128
128
  createdAt: string;
129
129
  updatedAt: string;
130
130
  publishedAt: string | null;
@@ -146,7 +146,7 @@ declare const makeswiftGetPagesResultAPISchema: z.ZodObject<{
146
146
  canonicalUrl: string | null;
147
147
  socialImageUrl: string | null;
148
148
  sitemapPriority: number | null;
149
- sitemapFrequency: "never" | "always" | "hourly" | "daily" | "weekly" | "monthly" | "yearly" | null;
149
+ sitemapFrequency: "always" | "never" | "hourly" | "daily" | "weekly" | "monthly" | "yearly" | null;
150
150
  createdAt: string;
151
151
  updatedAt: string;
152
152
  publishedAt: string | null;
@@ -168,7 +168,7 @@ declare const makeswiftGetPagesResultAPISchema: z.ZodObject<{
168
168
  canonicalUrl: string | null;
169
169
  socialImageUrl: string | null;
170
170
  sitemapPriority: number | null;
171
- sitemapFrequency: "never" | "always" | "hourly" | "daily" | "weekly" | "monthly" | "yearly" | null;
171
+ sitemapFrequency: "always" | "never" | "hourly" | "daily" | "weekly" | "monthly" | "yearly" | null;
172
172
  createdAt: string;
173
173
  updatedAt: string;
174
174
  publishedAt: string | null;
@@ -617,7 +617,7 @@ export declare class Makeswift {
617
617
  canonicalUrl: string | null;
618
618
  socialImageUrl: string | null;
619
619
  sitemapPriority: number | null;
620
- sitemapFrequency: "never" | "always" | "hourly" | "daily" | "weekly" | "monthly" | "yearly" | null;
620
+ sitemapFrequency: "always" | "never" | "hourly" | "daily" | "weekly" | "monthly" | "yearly" | null;
621
621
  createdAt: string;
622
622
  updatedAt: string;
623
623
  publishedAt: string | null;
@@ -638,7 +638,7 @@ export declare class Makeswift {
638
638
  canonicalUrl: string | null;
639
639
  socialImageUrl: string | null;
640
640
  sitemapPriority: number | null;
641
- sitemapFrequency: "never" | "always" | "hourly" | "daily" | "weekly" | "monthly" | "yearly" | null;
641
+ sitemapFrequency: "always" | "never" | "hourly" | "daily" | "weekly" | "monthly" | "yearly" | null;
642
642
  createdAt: string;
643
643
  updatedAt: string;
644
644
  publishedAt: string | null;
@@ -0,0 +1,123 @@
1
+ import { z } from 'zod';
2
+ export declare const MAKESWIFT_CACHE_TAG = "@@makeswift";
3
+ export declare const WebhookEventType: {
4
+ readonly SITE_PUBLISHED: "site.published";
5
+ };
6
+ export declare const sitePublishedWebhookPayloadSchema: z.ZodObject<{
7
+ type: z.ZodLiteral<"site.published">;
8
+ data: z.ZodObject<{
9
+ siteId: z.ZodString;
10
+ publish: z.ZodObject<{
11
+ from: z.ZodNullable<z.ZodString>;
12
+ to: z.ZodString;
13
+ }, "strip", z.ZodTypeAny, {
14
+ from: string | null;
15
+ to: string;
16
+ }, {
17
+ from: string | null;
18
+ to: string;
19
+ }>;
20
+ at: z.ZodNumber;
21
+ }, "strip", z.ZodTypeAny, {
22
+ at: number;
23
+ siteId: string;
24
+ publish: {
25
+ from: string | null;
26
+ to: string;
27
+ };
28
+ }, {
29
+ at: number;
30
+ siteId: string;
31
+ publish: {
32
+ from: string | null;
33
+ to: string;
34
+ };
35
+ }>;
36
+ }, "strip", z.ZodTypeAny, {
37
+ type: "site.published";
38
+ data: {
39
+ at: number;
40
+ siteId: string;
41
+ publish: {
42
+ from: string | null;
43
+ to: string;
44
+ };
45
+ };
46
+ }, {
47
+ type: "site.published";
48
+ data: {
49
+ at: number;
50
+ siteId: string;
51
+ publish: {
52
+ from: string | null;
53
+ to: string;
54
+ };
55
+ };
56
+ }>;
57
+ export type SitePublishedWebhookPayload = z.infer<typeof sitePublishedWebhookPayloadSchema>;
58
+ declare const webhookPayloadSchema: z.ZodObject<{
59
+ type: z.ZodLiteral<"site.published">;
60
+ data: z.ZodObject<{
61
+ siteId: z.ZodString;
62
+ publish: z.ZodObject<{
63
+ from: z.ZodNullable<z.ZodString>;
64
+ to: z.ZodString;
65
+ }, "strip", z.ZodTypeAny, {
66
+ from: string | null;
67
+ to: string;
68
+ }, {
69
+ from: string | null;
70
+ to: string;
71
+ }>;
72
+ at: z.ZodNumber;
73
+ }, "strip", z.ZodTypeAny, {
74
+ at: number;
75
+ siteId: string;
76
+ publish: {
77
+ from: string | null;
78
+ to: string;
79
+ };
80
+ }, {
81
+ at: number;
82
+ siteId: string;
83
+ publish: {
84
+ from: string | null;
85
+ to: string;
86
+ };
87
+ }>;
88
+ }, "strip", z.ZodTypeAny, {
89
+ type: "site.published";
90
+ data: {
91
+ at: number;
92
+ siteId: string;
93
+ publish: {
94
+ from: string | null;
95
+ to: string;
96
+ };
97
+ };
98
+ }, {
99
+ type: "site.published";
100
+ data: {
101
+ at: number;
102
+ siteId: string;
103
+ publish: {
104
+ from: string | null;
105
+ to: string;
106
+ };
107
+ };
108
+ }>;
109
+ export type WebhookPayloadSchema = z.infer<typeof webhookPayloadSchema>;
110
+ type WebhookSuccessBody = {
111
+ success: true;
112
+ };
113
+ type WebhookErrorBody = {
114
+ message: string;
115
+ };
116
+ export type WebhookResponseBody = WebhookSuccessBody | WebhookErrorBody;
117
+ export type WebhookHandlerResult = {
118
+ body: WebhookResponseBody;
119
+ status: 200;
120
+ };
121
+ export type OnPublish = () => void | Promise<void>;
122
+ export {};
123
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/next/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAEvB,eAAO,MAAM,mBAAmB,gBAAgB,CAAA;AAEhD,eAAO,MAAM,gBAAgB;;CAEnB,CAAA;AAEV,eAAO,MAAM,iCAAiC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAU5C,CAAA;AAEF,MAAM,MAAM,2BAA2B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iCAAiC,CAAC,CAAA;AAE3F,QAAA,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAAoC,CAAA;AAE9D,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAA;AAEvE,KAAK,kBAAkB,GAAG;IAAE,OAAO,EAAE,IAAI,CAAA;CAAE,CAAA;AAE3C,KAAK,gBAAgB,GAAG;IAAE,OAAO,EAAE,MAAM,CAAA;CAAE,CAAA;AAE3C,MAAM,MAAM,mBAAmB,GAAG,kBAAkB,GAAG,gBAAgB,CAAA;AAEvE,MAAM,MAAM,oBAAoB,GAAG;IACjC,IAAI,EAAE,mBAAmB,CAAA;IACzB,MAAM,EAAE,GAAG,CAAA;CACZ,CAAA;AAED,MAAM,MAAM,SAAS,GAAG,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA"}
@@ -0,0 +1,4 @@
1
+ export declare function DraftSwitcher({ isDraft }: {
2
+ isDraft: boolean;
3
+ }): import("react/jsx-runtime").JSX.Element | null;
4
+ //# sourceMappingURL=draft-switcher.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"draft-switcher.d.ts","sourceRoot":"","sources":["../../../../../../src/runtimes/react/components/draft-switcher/draft-switcher.tsx"],"names":[],"mappings":"AAkBA,wBAAgB,aAAa,CAAC,EAAE,OAAO,EAAE,EAAE;IAAE,OAAO,EAAE,OAAO,CAAA;CAAE,kDAuC9D"}
@@ -0,0 +1,6 @@
1
+ type Props = {
2
+ onExitDraft: () => void;
3
+ };
4
+ export declare function DraftToolbar({ onExitDraft }: Props): import("react/jsx-runtime").JSX.Element;
5
+ export {};
6
+ //# sourceMappingURL=draft-toolbar.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"draft-toolbar.d.ts","sourceRoot":"","sources":["../../../../../../src/runtimes/react/components/draft-switcher/draft-toolbar.tsx"],"names":[],"mappings":"AA4CA,KAAK,KAAK,GAAG;IACX,WAAW,EAAE,MAAM,IAAI,CAAA;CACxB,CAAA;AAED,wBAAgB,YAAY,CAAC,EAAE,WAAW,EAAE,EAAE,KAAK,2CAYlD"}
@@ -0,0 +1,4 @@
1
+ export declare function useBuilderConnectionPing({ appOrigin }: {
2
+ appOrigin: string;
3
+ }): void;
4
+ //# sourceMappingURL=use-builder-connection-ping.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-builder-connection-ping.d.ts","sourceRoot":"","sources":["../../../../../../src/runtimes/react/components/hooks/use-builder-connection-ping.ts"],"names":[],"mappings":"AAKA,wBAAgB,wBAAwB,CAAC,EAAE,SAAS,EAAE,EAAE;IAAE,SAAS,EAAE,MAAM,CAAA;CAAE,QAuC5E"}
@@ -0,0 +1,4 @@
1
+ export declare function useBuilderHandshake({ appOrigin }: {
2
+ appOrigin: string;
3
+ }): void;
4
+ //# sourceMappingURL=use-builder-handshake.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-builder-handshake.d.ts","sourceRoot":"","sources":["../../../../../../src/runtimes/react/components/hooks/use-builder-handshake.ts"],"names":[],"mappings":"AAMA,wBAAgB,mBAAmB,CAAC,EAAE,SAAS,EAAE,EAAE;IAAE,SAAS,EAAE,MAAM,CAAA;CAAE,QAavE"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@makeswift/runtime",
3
- "version": "0.23.12-canary.5",
3
+ "version": "0.23.13",
4
4
  "license": "MIT",
5
5
  "files": [
6
6
  "dist",
@@ -163,9 +163,9 @@
163
163
  "use-sync-external-store": "^1.0.0-rc.0",
164
164
  "uuid": "^9.0.0",
165
165
  "zod": "^3.21.4",
166
- "@makeswift/next-plugin": "0.3.1",
166
+ "@makeswift/controls": "0.1.8",
167
167
  "@makeswift/prop-controllers": "0.4.1",
168
- "@makeswift/controls": "0.1.8"
168
+ "@makeswift/next-plugin": "0.3.1"
169
169
  },
170
170
  "devDependencies": {
171
171
  "@emotion/jest": "^11.11.0",