@caartzee/theme-sdk 0.0.0-stage → 1.2.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.
Files changed (179) hide show
  1. package/README.md +222 -2
  2. package/dist/bin/caartzee-theme.js +9223 -0
  3. package/dist/lib/index.js +11614 -0
  4. package/dist/types/src/auth/credentials-store.d.ts +18 -0
  5. package/dist/types/src/auth/index.d.ts +2 -0
  6. package/dist/types/src/auth/oauth-client.d.ts +39 -0
  7. package/dist/types/src/blocks/block-contract.d.ts +242 -0
  8. package/dist/types/src/candy/compatibility-matrix.d.ts +10 -0
  9. package/dist/types/src/candy/context-builder.d.ts +31 -0
  10. package/dist/types/src/candy/engine.d.ts +69 -0
  11. package/dist/types/src/candy/filters.d.ts +32 -0
  12. package/dist/types/src/candy/ide-support.d.ts +20 -0
  13. package/dist/types/src/candy/index.d.ts +9 -0
  14. package/dist/types/src/candy/schema-parser.d.ts +13 -0
  15. package/dist/types/src/candy/security.d.ts +54 -0
  16. package/dist/types/src/candy/tags.d.ts +11 -0
  17. package/dist/types/src/candy/types.d.ts +185 -0
  18. package/dist/types/src/cli/caartzee-cli.d.ts +9 -0
  19. package/dist/types/src/cli/candy-mcp.d.ts +2 -0
  20. package/dist/types/src/cli/candy-tool-server.d.ts +39 -0
  21. package/dist/types/src/cli/index.d.ts +1 -0
  22. package/dist/types/src/cli/mcp/component-tools.d.ts +2 -0
  23. package/dist/types/src/cli/mcp/docs-tools.d.ts +89 -0
  24. package/dist/types/src/cli/mcp/editor-tools.d.ts +22 -0
  25. package/dist/types/src/cli/mcp/resources-and-prompts.d.ts +2 -0
  26. package/dist/types/src/cli/mcp/testing-tools.d.ts +54 -0
  27. package/dist/types/src/cli/sdk-client.d.ts +12 -0
  28. package/dist/types/src/contracts/category-selection.d.ts +15 -0
  29. package/dist/types/src/contracts/commerce.d.ts +282 -0
  30. package/dist/types/src/contracts/footer-builder.d.ts +125 -0
  31. package/dist/types/src/contracts/hooks.d.ts +37 -0
  32. package/dist/types/src/contracts/manifest.d.ts +3127 -0
  33. package/dist/types/src/contracts/navigation.d.ts +39 -0
  34. package/dist/types/src/contracts/order-tracking.d.ts +40 -0
  35. package/dist/types/src/contracts/page.d.ts +262 -0
  36. package/dist/types/src/contracts/storefront-content.d.ts +60 -0
  37. package/dist/types/src/contracts/style-document.d.ts +2 -0
  38. package/dist/types/src/contracts/styles.d.ts +2002 -0
  39. package/dist/types/src/contracts/theme.d.ts +35 -0
  40. package/dist/types/src/dev-server/catalog-preview.d.ts +25 -0
  41. package/dist/types/src/dev-server/dev-server.d.ts +25 -0
  42. package/dist/types/src/dev-server/index.d.ts +1 -0
  43. package/dist/types/src/dev-server/local-commerce-runtime.d.ts +76 -0
  44. package/dist/types/src/dev-server/local-editor-server.d.ts +22 -0
  45. package/dist/types/src/dev-server/theme-preview.d.ts +8 -0
  46. package/dist/types/src/index.d.ts +27 -0
  47. package/dist/types/src/mock/index.d.ts +10 -0
  48. package/dist/types/src/mock/mock-categories.d.ts +2 -0
  49. package/dist/types/src/mock/mock-commerce.d.ts +55 -0
  50. package/dist/types/src/mock/mock-customer.d.ts +47 -0
  51. package/dist/types/src/mock/mock-hooks.d.ts +2 -0
  52. package/dist/types/src/mock/mock-products.d.ts +3 -0
  53. package/dist/types/src/rendering/commerce-pages.d.ts +16 -0
  54. package/dist/types/src/rendering/raw-html.d.ts +12 -0
  55. package/dist/types/src/rendering/section-wrapper.d.ts +30 -0
  56. package/dist/types/src/scaffold/candy-starter-assets.d.ts +2 -0
  57. package/dist/types/src/scaffold/commerce-generator.d.ts +3 -0
  58. package/dist/types/src/scaffold/index.d.ts +2 -0
  59. package/dist/types/src/scaffold/template-generator.d.ts +21 -0
  60. package/dist/types/src/sections/section-contract.d.ts +350 -0
  61. package/dist/types/src/settings/global-settings.d.ts +25 -0
  62. package/dist/types/src/templates/json-template.d.ts +991 -0
  63. package/dist/types/src/validation/package-validator.d.ts +53 -0
  64. package/dist/types/src/validation/rich-text.d.ts +24 -0
  65. package/package.json +29 -3
  66. package/templates/commerce/README.md +165 -0
  67. package/templates/commerce/assets/theme.css +1 -0
  68. package/templates/commerce/manifest.json +1 -0
  69. package/templates/commerce/src/blocks/index.ts +184 -0
  70. package/templates/commerce/src/config/settings-defaults.ts +25 -0
  71. package/templates/commerce/src/config/settings-schema.ts +102 -0
  72. package/templates/commerce/src/index.ts +90 -0
  73. package/templates/commerce/src/layouts/default.ts +275 -0
  74. package/templates/commerce/src/manifest.ts +976 -0
  75. package/templates/commerce/src/pages/account/components.ts +369 -0
  76. package/templates/commerce/src/pages/account/tabs.ts +792 -0
  77. package/templates/commerce/src/pages/account.ts +55 -0
  78. package/templates/commerce/src/pages/campaign.ts +423 -0
  79. package/templates/commerce/src/pages/cart.ts +261 -0
  80. package/templates/commerce/src/pages/category-detail.ts +124 -0
  81. package/templates/commerce/src/pages/category-list.ts +87 -0
  82. package/templates/commerce/src/pages/checkout.ts +712 -0
  83. package/templates/commerce/src/pages/commerce.ts +45 -0
  84. package/templates/commerce/src/pages/home.ts +160 -0
  85. package/templates/commerce/src/pages/index.ts +99 -0
  86. package/templates/commerce/src/pages/login.ts +204 -0
  87. package/templates/commerce/src/pages/order-success.ts +80 -0
  88. package/templates/commerce/src/pages/product-detail.ts +489 -0
  89. package/templates/commerce/src/pages/product-list.ts +125 -0
  90. package/templates/commerce/src/pages/search.ts +88 -0
  91. package/templates/commerce/src/pages/signup.ts +253 -0
  92. package/templates/commerce/src/pages/status.ts +7 -0
  93. package/templates/commerce/src/pages/theme-layout.ts +491 -0
  94. package/templates/commerce/src/pages/track-order.ts +196 -0
  95. package/templates/commerce/src/pages/wishlist.ts +83 -0
  96. package/templates/commerce/src/sections/about-story.ts +117 -0
  97. package/templates/commerce/src/sections/announcement-bar.ts +101 -0
  98. package/templates/commerce/src/sections/banner-grid.ts +319 -0
  99. package/templates/commerce/src/sections/campaign-banners.ts +158 -0
  100. package/templates/commerce/src/sections/category-slider.ts +144 -0
  101. package/templates/commerce/src/sections/content-builder.ts +123 -0
  102. package/templates/commerce/src/sections/content-controls.ts +45 -0
  103. package/templates/commerce/src/sections/custom-form.ts +59 -0
  104. package/templates/commerce/src/sections/faq-accordion.ts +123 -0
  105. package/templates/commerce/src/sections/footer.ts +728 -0
  106. package/templates/commerce/src/sections/header.ts +439 -0
  107. package/templates/commerce/src/sections/hero-slider.ts +492 -0
  108. package/templates/commerce/src/sections/hero.ts +137 -0
  109. package/templates/commerce/src/sections/index.ts +102 -0
  110. package/templates/commerce/src/sections/mobile-slider.ts +102 -0
  111. package/templates/commerce/src/sections/newsletter.ts +43 -0
  112. package/templates/commerce/src/sections/product-grid.ts +191 -0
  113. package/templates/commerce/src/sections/raw-html.ts +1 -0
  114. package/templates/commerce/src/sections/rich-text.ts +26 -0
  115. package/templates/commerce/src/sections/services-features.ts +211 -0
  116. package/templates/commerce/src/sections/testimonials.ts +194 -0
  117. package/templates/commerce/src/snippets/product-card.ts +178 -0
  118. package/templates/commerce/src/snippets/product-price.ts +46 -0
  119. package/templates/commerce/src/snippets/responsive-image.ts +29 -0
  120. package/templates/commerce/src/styles.ts +477 -0
  121. package/templates/commerce/src/templates/404.json +26 -0
  122. package/templates/commerce/src/templates/account.json +17 -0
  123. package/templates/commerce/src/templates/cart.json +17 -0
  124. package/templates/commerce/src/templates/category.json +16 -0
  125. package/templates/commerce/src/templates/checkout.json +15 -0
  126. package/templates/commerce/src/templates/collection.json +16 -0
  127. package/templates/commerce/src/templates/index.json +180 -0
  128. package/templates/commerce/src/templates/login.json +17 -0
  129. package/templates/commerce/src/templates/order-success.json +17 -0
  130. package/templates/commerce/src/templates/page.json +17 -0
  131. package/templates/commerce/src/templates/product.json +17 -0
  132. package/templates/commerce/src/templates/search.json +18 -0
  133. package/templates/commerce/src/templates/signup.json +17 -0
  134. package/templates/commerce/src/templates/track-order.json +17 -0
  135. package/templates/commerce/src/templates/wishlist.json +17 -0
  136. package/templates/commerce/src/templates.ts +510 -0
  137. package/templates/commerce/src/tokens.ts +22 -0
  138. package/templates/theme-candy-boilerplate/.editorconfig +14 -0
  139. package/templates/theme-candy-boilerplate/.gitattributes +1 -0
  140. package/templates/theme-candy-boilerplate/.vscode/extensions.json +7 -0
  141. package/templates/theme-candy-boilerplate/.vscode/settings.json +17 -0
  142. package/templates/theme-candy-boilerplate/assets/theme.css +78 -0
  143. package/templates/theme-candy-boilerplate/assets/theme.js +7 -0
  144. package/templates/theme-candy-boilerplate/candy.config.json +40 -0
  145. package/templates/theme-candy-boilerplate/index.ts +39 -0
  146. package/templates/theme-candy-boilerplate/layout/theme.candy +25 -0
  147. package/templates/theme-candy-boilerplate/locales/en.default.json +37 -0
  148. package/templates/theme-candy-boilerplate/manifest.json +123 -0
  149. package/templates/theme-candy-boilerplate/package.json +16 -0
  150. package/templates/theme-candy-boilerplate/schemas/settings_schema.json +36 -0
  151. package/templates/theme-candy-boilerplate/sections/featured-products.candy +89 -0
  152. package/templates/theme-candy-boilerplate/sections/footer.candy +50 -0
  153. package/templates/theme-candy-boilerplate/sections/header.candy +116 -0
  154. package/templates/theme-candy-boilerplate/sections/hero-banner.candy +135 -0
  155. package/templates/theme-candy-boilerplate/sections/image-with-text.candy +85 -0
  156. package/templates/theme-candy-boilerplate/snippets/price.candy +19 -0
  157. package/templates/theme-candy-boilerplate/snippets/product-card.candy +43 -0
  158. package/templates/theme-candy-boilerplate/templates/404.candy +12 -0
  159. package/templates/theme-candy-boilerplate/templates/cart.candy +51 -0
  160. package/templates/theme-candy-boilerplate/templates/collection.candy +51 -0
  161. package/templates/theme-candy-boilerplate/templates/index.candy +7 -0
  162. package/templates/theme-candy-boilerplate/templates/page.candy +10 -0
  163. package/templates/theme-candy-boilerplate/templates/product.candy +59 -0
  164. package/templates/theme-candy-boilerplate/templates/search.candy +40 -0
  165. package/templates/vscode-candy/LICENSE +21 -0
  166. package/templates/vscode-candy/README.md +22 -0
  167. package/templates/vscode-candy/extension.js +689 -0
  168. package/templates/vscode-candy/icons/candy-dark.svg +23 -0
  169. package/templates/vscode-candy/icons/candy-light.svg +23 -0
  170. package/templates/vscode-candy/icons/candy-logo.png +0 -0
  171. package/templates/vscode-candy/icons/candy-sweet-dark.svg +23 -0
  172. package/templates/vscode-candy/icons/candy-sweet-light.svg +23 -0
  173. package/templates/vscode-candy/language-configuration.json +47 -0
  174. package/templates/vscode-candy/package.json +118 -0
  175. package/templates/vscode-candy/schemas/candy-config.schema.json +56 -0
  176. package/templates/vscode-candy/schemas/candy-settings.schema.json +70 -0
  177. package/templates/vscode-candy/snippets/candy.code-snippets +270 -0
  178. package/templates/vscode-candy/syntaxes/candy.tmLanguage.json +296 -0
  179. package/templates/vscode-candy/vim/ftdetect/candy.vim +5 -0
@@ -0,0 +1,991 @@
1
+ import { z } from 'zod';
2
+ import type { PageDocument, SectionNode } from '../contracts/page';
3
+ export declare const JsonBlockInstanceSchema: z.ZodObject<{
4
+ id: z.ZodOptional<z.ZodString>;
5
+ type: z.ZodString;
6
+ disabled: z.ZodOptional<z.ZodBoolean>;
7
+ settings: z.ZodDefault<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
8
+ styles: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
9
+ }, "strip", z.ZodTypeAny, {
10
+ type: string;
11
+ settings: Record<string, unknown>;
12
+ id?: string | undefined;
13
+ disabled?: boolean | undefined;
14
+ styles?: Record<string, unknown> | undefined;
15
+ }, {
16
+ type: string;
17
+ id?: string | undefined;
18
+ disabled?: boolean | undefined;
19
+ settings?: Record<string, unknown> | undefined;
20
+ styles?: Record<string, unknown> | undefined;
21
+ }>;
22
+ export type JsonBlockInstance = z.infer<typeof JsonBlockInstanceSchema>;
23
+ export declare const JsonSectionInstanceSchema: z.ZodObject<{
24
+ id: z.ZodOptional<z.ZodString>;
25
+ type: z.ZodString;
26
+ disabled: z.ZodOptional<z.ZodBoolean>;
27
+ settings: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
28
+ styles: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
29
+ blocks: z.ZodOptional<z.ZodUnion<[z.ZodRecord<z.ZodString, z.ZodObject<{
30
+ id: z.ZodOptional<z.ZodString>;
31
+ type: z.ZodString;
32
+ disabled: z.ZodOptional<z.ZodBoolean>;
33
+ settings: z.ZodDefault<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
34
+ styles: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
35
+ }, "strip", z.ZodTypeAny, {
36
+ type: string;
37
+ settings: Record<string, unknown>;
38
+ id?: string | undefined;
39
+ disabled?: boolean | undefined;
40
+ styles?: Record<string, unknown> | undefined;
41
+ }, {
42
+ type: string;
43
+ id?: string | undefined;
44
+ disabled?: boolean | undefined;
45
+ settings?: Record<string, unknown> | undefined;
46
+ styles?: Record<string, unknown> | undefined;
47
+ }>>, z.ZodArray<z.ZodObject<{
48
+ id: z.ZodOptional<z.ZodString>;
49
+ type: z.ZodString;
50
+ disabled: z.ZodOptional<z.ZodBoolean>;
51
+ settings: z.ZodDefault<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
52
+ styles: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
53
+ }, "strip", z.ZodTypeAny, {
54
+ type: string;
55
+ settings: Record<string, unknown>;
56
+ id?: string | undefined;
57
+ disabled?: boolean | undefined;
58
+ styles?: Record<string, unknown> | undefined;
59
+ }, {
60
+ type: string;
61
+ id?: string | undefined;
62
+ disabled?: boolean | undefined;
63
+ settings?: Record<string, unknown> | undefined;
64
+ styles?: Record<string, unknown> | undefined;
65
+ }>, "many">]>>;
66
+ block_order: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
67
+ blockOrder: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
68
+ }, "strip", z.ZodTypeAny, {
69
+ type: string;
70
+ id?: string | undefined;
71
+ disabled?: boolean | undefined;
72
+ settings?: Record<string, unknown> | undefined;
73
+ styles?: Record<string, unknown> | undefined;
74
+ blocks?: Record<string, {
75
+ type: string;
76
+ settings: Record<string, unknown>;
77
+ id?: string | undefined;
78
+ disabled?: boolean | undefined;
79
+ styles?: Record<string, unknown> | undefined;
80
+ }> | {
81
+ type: string;
82
+ settings: Record<string, unknown>;
83
+ id?: string | undefined;
84
+ disabled?: boolean | undefined;
85
+ styles?: Record<string, unknown> | undefined;
86
+ }[] | undefined;
87
+ block_order?: string[] | undefined;
88
+ blockOrder?: string[] | undefined;
89
+ }, {
90
+ type: string;
91
+ id?: string | undefined;
92
+ disabled?: boolean | undefined;
93
+ settings?: Record<string, unknown> | undefined;
94
+ styles?: Record<string, unknown> | undefined;
95
+ blocks?: Record<string, {
96
+ type: string;
97
+ id?: string | undefined;
98
+ disabled?: boolean | undefined;
99
+ settings?: Record<string, unknown> | undefined;
100
+ styles?: Record<string, unknown> | undefined;
101
+ }> | {
102
+ type: string;
103
+ id?: string | undefined;
104
+ disabled?: boolean | undefined;
105
+ settings?: Record<string, unknown> | undefined;
106
+ styles?: Record<string, unknown> | undefined;
107
+ }[] | undefined;
108
+ block_order?: string[] | undefined;
109
+ blockOrder?: string[] | undefined;
110
+ }>;
111
+ export type JsonSectionInstance = z.infer<typeof JsonSectionInstanceSchema>;
112
+ export declare const JsonTemplateSchema: z.ZodObject<{
113
+ schemaVersion: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
114
+ name: z.ZodOptional<z.ZodString>;
115
+ layout: z.ZodDefault<z.ZodOptional<z.ZodString>>;
116
+ wrapper: z.ZodOptional<z.ZodString>;
117
+ sections: z.ZodRecord<z.ZodString, z.ZodObject<{
118
+ id: z.ZodOptional<z.ZodString>;
119
+ type: z.ZodString;
120
+ disabled: z.ZodOptional<z.ZodBoolean>;
121
+ settings: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
122
+ styles: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
123
+ blocks: z.ZodOptional<z.ZodUnion<[z.ZodRecord<z.ZodString, z.ZodObject<{
124
+ id: z.ZodOptional<z.ZodString>;
125
+ type: z.ZodString;
126
+ disabled: z.ZodOptional<z.ZodBoolean>;
127
+ settings: z.ZodDefault<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
128
+ styles: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
129
+ }, "strip", z.ZodTypeAny, {
130
+ type: string;
131
+ settings: Record<string, unknown>;
132
+ id?: string | undefined;
133
+ disabled?: boolean | undefined;
134
+ styles?: Record<string, unknown> | undefined;
135
+ }, {
136
+ type: string;
137
+ id?: string | undefined;
138
+ disabled?: boolean | undefined;
139
+ settings?: Record<string, unknown> | undefined;
140
+ styles?: Record<string, unknown> | undefined;
141
+ }>>, z.ZodArray<z.ZodObject<{
142
+ id: z.ZodOptional<z.ZodString>;
143
+ type: z.ZodString;
144
+ disabled: z.ZodOptional<z.ZodBoolean>;
145
+ settings: z.ZodDefault<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
146
+ styles: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
147
+ }, "strip", z.ZodTypeAny, {
148
+ type: string;
149
+ settings: Record<string, unknown>;
150
+ id?: string | undefined;
151
+ disabled?: boolean | undefined;
152
+ styles?: Record<string, unknown> | undefined;
153
+ }, {
154
+ type: string;
155
+ id?: string | undefined;
156
+ disabled?: boolean | undefined;
157
+ settings?: Record<string, unknown> | undefined;
158
+ styles?: Record<string, unknown> | undefined;
159
+ }>, "many">]>>;
160
+ block_order: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
161
+ blockOrder: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
162
+ }, "strip", z.ZodTypeAny, {
163
+ type: string;
164
+ id?: string | undefined;
165
+ disabled?: boolean | undefined;
166
+ settings?: Record<string, unknown> | undefined;
167
+ styles?: Record<string, unknown> | undefined;
168
+ blocks?: Record<string, {
169
+ type: string;
170
+ settings: Record<string, unknown>;
171
+ id?: string | undefined;
172
+ disabled?: boolean | undefined;
173
+ styles?: Record<string, unknown> | undefined;
174
+ }> | {
175
+ type: string;
176
+ settings: Record<string, unknown>;
177
+ id?: string | undefined;
178
+ disabled?: boolean | undefined;
179
+ styles?: Record<string, unknown> | undefined;
180
+ }[] | undefined;
181
+ block_order?: string[] | undefined;
182
+ blockOrder?: string[] | undefined;
183
+ }, {
184
+ type: string;
185
+ id?: string | undefined;
186
+ disabled?: boolean | undefined;
187
+ settings?: Record<string, unknown> | undefined;
188
+ styles?: Record<string, unknown> | undefined;
189
+ blocks?: Record<string, {
190
+ type: string;
191
+ id?: string | undefined;
192
+ disabled?: boolean | undefined;
193
+ settings?: Record<string, unknown> | undefined;
194
+ styles?: Record<string, unknown> | undefined;
195
+ }> | {
196
+ type: string;
197
+ id?: string | undefined;
198
+ disabled?: boolean | undefined;
199
+ settings?: Record<string, unknown> | undefined;
200
+ styles?: Record<string, unknown> | undefined;
201
+ }[] | undefined;
202
+ block_order?: string[] | undefined;
203
+ blockOrder?: string[] | undefined;
204
+ }>>;
205
+ order: z.ZodArray<z.ZodString, "many">;
206
+ }, "strip", z.ZodTypeAny, {
207
+ schemaVersion: number;
208
+ layout: string;
209
+ sections: Record<string, {
210
+ type: string;
211
+ id?: string | undefined;
212
+ disabled?: boolean | undefined;
213
+ settings?: Record<string, unknown> | undefined;
214
+ styles?: Record<string, unknown> | undefined;
215
+ blocks?: Record<string, {
216
+ type: string;
217
+ settings: Record<string, unknown>;
218
+ id?: string | undefined;
219
+ disabled?: boolean | undefined;
220
+ styles?: Record<string, unknown> | undefined;
221
+ }> | {
222
+ type: string;
223
+ settings: Record<string, unknown>;
224
+ id?: string | undefined;
225
+ disabled?: boolean | undefined;
226
+ styles?: Record<string, unknown> | undefined;
227
+ }[] | undefined;
228
+ block_order?: string[] | undefined;
229
+ blockOrder?: string[] | undefined;
230
+ }>;
231
+ order: string[];
232
+ name?: string | undefined;
233
+ wrapper?: string | undefined;
234
+ }, {
235
+ sections: Record<string, {
236
+ type: string;
237
+ id?: string | undefined;
238
+ disabled?: boolean | undefined;
239
+ settings?: Record<string, unknown> | undefined;
240
+ styles?: Record<string, unknown> | undefined;
241
+ blocks?: Record<string, {
242
+ type: string;
243
+ id?: string | undefined;
244
+ disabled?: boolean | undefined;
245
+ settings?: Record<string, unknown> | undefined;
246
+ styles?: Record<string, unknown> | undefined;
247
+ }> | {
248
+ type: string;
249
+ id?: string | undefined;
250
+ disabled?: boolean | undefined;
251
+ settings?: Record<string, unknown> | undefined;
252
+ styles?: Record<string, unknown> | undefined;
253
+ }[] | undefined;
254
+ block_order?: string[] | undefined;
255
+ blockOrder?: string[] | undefined;
256
+ }>;
257
+ order: string[];
258
+ schemaVersion?: number | undefined;
259
+ name?: string | undefined;
260
+ layout?: string | undefined;
261
+ wrapper?: string | undefined;
262
+ }>;
263
+ export type JsonTemplate = z.infer<typeof JsonTemplateSchema>;
264
+ export declare const JsonLayoutRegionObjectSchema: z.ZodObject<{
265
+ sections: z.ZodRecord<z.ZodString, z.ZodObject<{
266
+ id: z.ZodOptional<z.ZodString>;
267
+ type: z.ZodString;
268
+ disabled: z.ZodOptional<z.ZodBoolean>;
269
+ settings: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
270
+ styles: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
271
+ blocks: z.ZodOptional<z.ZodUnion<[z.ZodRecord<z.ZodString, z.ZodObject<{
272
+ id: z.ZodOptional<z.ZodString>;
273
+ type: z.ZodString;
274
+ disabled: z.ZodOptional<z.ZodBoolean>;
275
+ settings: z.ZodDefault<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
276
+ styles: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
277
+ }, "strip", z.ZodTypeAny, {
278
+ type: string;
279
+ settings: Record<string, unknown>;
280
+ id?: string | undefined;
281
+ disabled?: boolean | undefined;
282
+ styles?: Record<string, unknown> | undefined;
283
+ }, {
284
+ type: string;
285
+ id?: string | undefined;
286
+ disabled?: boolean | undefined;
287
+ settings?: Record<string, unknown> | undefined;
288
+ styles?: Record<string, unknown> | undefined;
289
+ }>>, z.ZodArray<z.ZodObject<{
290
+ id: z.ZodOptional<z.ZodString>;
291
+ type: z.ZodString;
292
+ disabled: z.ZodOptional<z.ZodBoolean>;
293
+ settings: z.ZodDefault<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
294
+ styles: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
295
+ }, "strip", z.ZodTypeAny, {
296
+ type: string;
297
+ settings: Record<string, unknown>;
298
+ id?: string | undefined;
299
+ disabled?: boolean | undefined;
300
+ styles?: Record<string, unknown> | undefined;
301
+ }, {
302
+ type: string;
303
+ id?: string | undefined;
304
+ disabled?: boolean | undefined;
305
+ settings?: Record<string, unknown> | undefined;
306
+ styles?: Record<string, unknown> | undefined;
307
+ }>, "many">]>>;
308
+ block_order: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
309
+ blockOrder: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
310
+ }, "strip", z.ZodTypeAny, {
311
+ type: string;
312
+ id?: string | undefined;
313
+ disabled?: boolean | undefined;
314
+ settings?: Record<string, unknown> | undefined;
315
+ styles?: Record<string, unknown> | undefined;
316
+ blocks?: Record<string, {
317
+ type: string;
318
+ settings: Record<string, unknown>;
319
+ id?: string | undefined;
320
+ disabled?: boolean | undefined;
321
+ styles?: Record<string, unknown> | undefined;
322
+ }> | {
323
+ type: string;
324
+ settings: Record<string, unknown>;
325
+ id?: string | undefined;
326
+ disabled?: boolean | undefined;
327
+ styles?: Record<string, unknown> | undefined;
328
+ }[] | undefined;
329
+ block_order?: string[] | undefined;
330
+ blockOrder?: string[] | undefined;
331
+ }, {
332
+ type: string;
333
+ id?: string | undefined;
334
+ disabled?: boolean | undefined;
335
+ settings?: Record<string, unknown> | undefined;
336
+ styles?: Record<string, unknown> | undefined;
337
+ blocks?: Record<string, {
338
+ type: string;
339
+ id?: string | undefined;
340
+ disabled?: boolean | undefined;
341
+ settings?: Record<string, unknown> | undefined;
342
+ styles?: Record<string, unknown> | undefined;
343
+ }> | {
344
+ type: string;
345
+ id?: string | undefined;
346
+ disabled?: boolean | undefined;
347
+ settings?: Record<string, unknown> | undefined;
348
+ styles?: Record<string, unknown> | undefined;
349
+ }[] | undefined;
350
+ block_order?: string[] | undefined;
351
+ blockOrder?: string[] | undefined;
352
+ }>>;
353
+ order: z.ZodArray<z.ZodString, "many">;
354
+ }, "strip", z.ZodTypeAny, {
355
+ sections: Record<string, {
356
+ type: string;
357
+ id?: string | undefined;
358
+ disabled?: boolean | undefined;
359
+ settings?: Record<string, unknown> | undefined;
360
+ styles?: Record<string, unknown> | undefined;
361
+ blocks?: Record<string, {
362
+ type: string;
363
+ settings: Record<string, unknown>;
364
+ id?: string | undefined;
365
+ disabled?: boolean | undefined;
366
+ styles?: Record<string, unknown> | undefined;
367
+ }> | {
368
+ type: string;
369
+ settings: Record<string, unknown>;
370
+ id?: string | undefined;
371
+ disabled?: boolean | undefined;
372
+ styles?: Record<string, unknown> | undefined;
373
+ }[] | undefined;
374
+ block_order?: string[] | undefined;
375
+ blockOrder?: string[] | undefined;
376
+ }>;
377
+ order: string[];
378
+ }, {
379
+ sections: Record<string, {
380
+ type: string;
381
+ id?: string | undefined;
382
+ disabled?: boolean | undefined;
383
+ settings?: Record<string, unknown> | undefined;
384
+ styles?: Record<string, unknown> | undefined;
385
+ blocks?: Record<string, {
386
+ type: string;
387
+ id?: string | undefined;
388
+ disabled?: boolean | undefined;
389
+ settings?: Record<string, unknown> | undefined;
390
+ styles?: Record<string, unknown> | undefined;
391
+ }> | {
392
+ type: string;
393
+ id?: string | undefined;
394
+ disabled?: boolean | undefined;
395
+ settings?: Record<string, unknown> | undefined;
396
+ styles?: Record<string, unknown> | undefined;
397
+ }[] | undefined;
398
+ block_order?: string[] | undefined;
399
+ blockOrder?: string[] | undefined;
400
+ }>;
401
+ order: string[];
402
+ }>;
403
+ export declare const JsonLayoutRegionSchema: z.ZodUnion<[z.ZodObject<{
404
+ sections: z.ZodRecord<z.ZodString, z.ZodObject<{
405
+ id: z.ZodOptional<z.ZodString>;
406
+ type: z.ZodString;
407
+ disabled: z.ZodOptional<z.ZodBoolean>;
408
+ settings: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
409
+ styles: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
410
+ blocks: z.ZodOptional<z.ZodUnion<[z.ZodRecord<z.ZodString, z.ZodObject<{
411
+ id: z.ZodOptional<z.ZodString>;
412
+ type: z.ZodString;
413
+ disabled: z.ZodOptional<z.ZodBoolean>;
414
+ settings: z.ZodDefault<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
415
+ styles: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
416
+ }, "strip", z.ZodTypeAny, {
417
+ type: string;
418
+ settings: Record<string, unknown>;
419
+ id?: string | undefined;
420
+ disabled?: boolean | undefined;
421
+ styles?: Record<string, unknown> | undefined;
422
+ }, {
423
+ type: string;
424
+ id?: string | undefined;
425
+ disabled?: boolean | undefined;
426
+ settings?: Record<string, unknown> | undefined;
427
+ styles?: Record<string, unknown> | undefined;
428
+ }>>, z.ZodArray<z.ZodObject<{
429
+ id: z.ZodOptional<z.ZodString>;
430
+ type: z.ZodString;
431
+ disabled: z.ZodOptional<z.ZodBoolean>;
432
+ settings: z.ZodDefault<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
433
+ styles: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
434
+ }, "strip", z.ZodTypeAny, {
435
+ type: string;
436
+ settings: Record<string, unknown>;
437
+ id?: string | undefined;
438
+ disabled?: boolean | undefined;
439
+ styles?: Record<string, unknown> | undefined;
440
+ }, {
441
+ type: string;
442
+ id?: string | undefined;
443
+ disabled?: boolean | undefined;
444
+ settings?: Record<string, unknown> | undefined;
445
+ styles?: Record<string, unknown> | undefined;
446
+ }>, "many">]>>;
447
+ block_order: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
448
+ blockOrder: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
449
+ }, "strip", z.ZodTypeAny, {
450
+ type: string;
451
+ id?: string | undefined;
452
+ disabled?: boolean | undefined;
453
+ settings?: Record<string, unknown> | undefined;
454
+ styles?: Record<string, unknown> | undefined;
455
+ blocks?: Record<string, {
456
+ type: string;
457
+ settings: Record<string, unknown>;
458
+ id?: string | undefined;
459
+ disabled?: boolean | undefined;
460
+ styles?: Record<string, unknown> | undefined;
461
+ }> | {
462
+ type: string;
463
+ settings: Record<string, unknown>;
464
+ id?: string | undefined;
465
+ disabled?: boolean | undefined;
466
+ styles?: Record<string, unknown> | undefined;
467
+ }[] | undefined;
468
+ block_order?: string[] | undefined;
469
+ blockOrder?: string[] | undefined;
470
+ }, {
471
+ type: string;
472
+ id?: string | undefined;
473
+ disabled?: boolean | undefined;
474
+ settings?: Record<string, unknown> | undefined;
475
+ styles?: Record<string, unknown> | undefined;
476
+ blocks?: Record<string, {
477
+ type: string;
478
+ id?: string | undefined;
479
+ disabled?: boolean | undefined;
480
+ settings?: Record<string, unknown> | undefined;
481
+ styles?: Record<string, unknown> | undefined;
482
+ }> | {
483
+ type: string;
484
+ id?: string | undefined;
485
+ disabled?: boolean | undefined;
486
+ settings?: Record<string, unknown> | undefined;
487
+ styles?: Record<string, unknown> | undefined;
488
+ }[] | undefined;
489
+ block_order?: string[] | undefined;
490
+ blockOrder?: string[] | undefined;
491
+ }>>;
492
+ order: z.ZodArray<z.ZodString, "many">;
493
+ }, "strip", z.ZodTypeAny, {
494
+ sections: Record<string, {
495
+ type: string;
496
+ id?: string | undefined;
497
+ disabled?: boolean | undefined;
498
+ settings?: Record<string, unknown> | undefined;
499
+ styles?: Record<string, unknown> | undefined;
500
+ blocks?: Record<string, {
501
+ type: string;
502
+ settings: Record<string, unknown>;
503
+ id?: string | undefined;
504
+ disabled?: boolean | undefined;
505
+ styles?: Record<string, unknown> | undefined;
506
+ }> | {
507
+ type: string;
508
+ settings: Record<string, unknown>;
509
+ id?: string | undefined;
510
+ disabled?: boolean | undefined;
511
+ styles?: Record<string, unknown> | undefined;
512
+ }[] | undefined;
513
+ block_order?: string[] | undefined;
514
+ blockOrder?: string[] | undefined;
515
+ }>;
516
+ order: string[];
517
+ }, {
518
+ sections: Record<string, {
519
+ type: string;
520
+ id?: string | undefined;
521
+ disabled?: boolean | undefined;
522
+ settings?: Record<string, unknown> | undefined;
523
+ styles?: Record<string, unknown> | undefined;
524
+ blocks?: Record<string, {
525
+ type: string;
526
+ id?: string | undefined;
527
+ disabled?: boolean | undefined;
528
+ settings?: Record<string, unknown> | undefined;
529
+ styles?: Record<string, unknown> | undefined;
530
+ }> | {
531
+ type: string;
532
+ id?: string | undefined;
533
+ disabled?: boolean | undefined;
534
+ settings?: Record<string, unknown> | undefined;
535
+ styles?: Record<string, unknown> | undefined;
536
+ }[] | undefined;
537
+ block_order?: string[] | undefined;
538
+ blockOrder?: string[] | undefined;
539
+ }>;
540
+ order: string[];
541
+ }>, z.ZodArray<z.ZodString, "many">]>;
542
+ export type JsonLayoutRegion = z.infer<typeof JsonLayoutRegionObjectSchema> | string[];
543
+ export declare const JsonLayoutTemplateSchema: z.ZodObject<{
544
+ schemaVersion: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
545
+ name: z.ZodOptional<z.ZodString>;
546
+ supportedRegions: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
547
+ regions: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodObject<{
548
+ sections: z.ZodRecord<z.ZodString, z.ZodObject<{
549
+ id: z.ZodOptional<z.ZodString>;
550
+ type: z.ZodString;
551
+ disabled: z.ZodOptional<z.ZodBoolean>;
552
+ settings: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
553
+ styles: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
554
+ blocks: z.ZodOptional<z.ZodUnion<[z.ZodRecord<z.ZodString, z.ZodObject<{
555
+ id: z.ZodOptional<z.ZodString>;
556
+ type: z.ZodString;
557
+ disabled: z.ZodOptional<z.ZodBoolean>;
558
+ settings: z.ZodDefault<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
559
+ styles: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
560
+ }, "strip", z.ZodTypeAny, {
561
+ type: string;
562
+ settings: Record<string, unknown>;
563
+ id?: string | undefined;
564
+ disabled?: boolean | undefined;
565
+ styles?: Record<string, unknown> | undefined;
566
+ }, {
567
+ type: string;
568
+ id?: string | undefined;
569
+ disabled?: boolean | undefined;
570
+ settings?: Record<string, unknown> | undefined;
571
+ styles?: Record<string, unknown> | undefined;
572
+ }>>, z.ZodArray<z.ZodObject<{
573
+ id: z.ZodOptional<z.ZodString>;
574
+ type: z.ZodString;
575
+ disabled: z.ZodOptional<z.ZodBoolean>;
576
+ settings: z.ZodDefault<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
577
+ styles: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
578
+ }, "strip", z.ZodTypeAny, {
579
+ type: string;
580
+ settings: Record<string, unknown>;
581
+ id?: string | undefined;
582
+ disabled?: boolean | undefined;
583
+ styles?: Record<string, unknown> | undefined;
584
+ }, {
585
+ type: string;
586
+ id?: string | undefined;
587
+ disabled?: boolean | undefined;
588
+ settings?: Record<string, unknown> | undefined;
589
+ styles?: Record<string, unknown> | undefined;
590
+ }>, "many">]>>;
591
+ block_order: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
592
+ blockOrder: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
593
+ }, "strip", z.ZodTypeAny, {
594
+ type: string;
595
+ id?: string | undefined;
596
+ disabled?: boolean | undefined;
597
+ settings?: Record<string, unknown> | undefined;
598
+ styles?: Record<string, unknown> | undefined;
599
+ blocks?: Record<string, {
600
+ type: string;
601
+ settings: Record<string, unknown>;
602
+ id?: string | undefined;
603
+ disabled?: boolean | undefined;
604
+ styles?: Record<string, unknown> | undefined;
605
+ }> | {
606
+ type: string;
607
+ settings: Record<string, unknown>;
608
+ id?: string | undefined;
609
+ disabled?: boolean | undefined;
610
+ styles?: Record<string, unknown> | undefined;
611
+ }[] | undefined;
612
+ block_order?: string[] | undefined;
613
+ blockOrder?: string[] | undefined;
614
+ }, {
615
+ type: string;
616
+ id?: string | undefined;
617
+ disabled?: boolean | undefined;
618
+ settings?: Record<string, unknown> | undefined;
619
+ styles?: Record<string, unknown> | undefined;
620
+ blocks?: Record<string, {
621
+ type: string;
622
+ id?: string | undefined;
623
+ disabled?: boolean | undefined;
624
+ settings?: Record<string, unknown> | undefined;
625
+ styles?: Record<string, unknown> | undefined;
626
+ }> | {
627
+ type: string;
628
+ id?: string | undefined;
629
+ disabled?: boolean | undefined;
630
+ settings?: Record<string, unknown> | undefined;
631
+ styles?: Record<string, unknown> | undefined;
632
+ }[] | undefined;
633
+ block_order?: string[] | undefined;
634
+ blockOrder?: string[] | undefined;
635
+ }>>;
636
+ order: z.ZodArray<z.ZodString, "many">;
637
+ }, "strip", z.ZodTypeAny, {
638
+ sections: Record<string, {
639
+ type: string;
640
+ id?: string | undefined;
641
+ disabled?: boolean | undefined;
642
+ settings?: Record<string, unknown> | undefined;
643
+ styles?: Record<string, unknown> | undefined;
644
+ blocks?: Record<string, {
645
+ type: string;
646
+ settings: Record<string, unknown>;
647
+ id?: string | undefined;
648
+ disabled?: boolean | undefined;
649
+ styles?: Record<string, unknown> | undefined;
650
+ }> | {
651
+ type: string;
652
+ settings: Record<string, unknown>;
653
+ id?: string | undefined;
654
+ disabled?: boolean | undefined;
655
+ styles?: Record<string, unknown> | undefined;
656
+ }[] | undefined;
657
+ block_order?: string[] | undefined;
658
+ blockOrder?: string[] | undefined;
659
+ }>;
660
+ order: string[];
661
+ }, {
662
+ sections: Record<string, {
663
+ type: string;
664
+ id?: string | undefined;
665
+ disabled?: boolean | undefined;
666
+ settings?: Record<string, unknown> | undefined;
667
+ styles?: Record<string, unknown> | undefined;
668
+ blocks?: Record<string, {
669
+ type: string;
670
+ id?: string | undefined;
671
+ disabled?: boolean | undefined;
672
+ settings?: Record<string, unknown> | undefined;
673
+ styles?: Record<string, unknown> | undefined;
674
+ }> | {
675
+ type: string;
676
+ id?: string | undefined;
677
+ disabled?: boolean | undefined;
678
+ settings?: Record<string, unknown> | undefined;
679
+ styles?: Record<string, unknown> | undefined;
680
+ }[] | undefined;
681
+ block_order?: string[] | undefined;
682
+ blockOrder?: string[] | undefined;
683
+ }>;
684
+ order: string[];
685
+ }>, z.ZodArray<z.ZodString, "many">]>>>;
686
+ sections: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
687
+ id: z.ZodOptional<z.ZodString>;
688
+ type: z.ZodString;
689
+ disabled: z.ZodOptional<z.ZodBoolean>;
690
+ settings: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
691
+ styles: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
692
+ blocks: z.ZodOptional<z.ZodUnion<[z.ZodRecord<z.ZodString, z.ZodObject<{
693
+ id: z.ZodOptional<z.ZodString>;
694
+ type: z.ZodString;
695
+ disabled: z.ZodOptional<z.ZodBoolean>;
696
+ settings: z.ZodDefault<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
697
+ styles: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
698
+ }, "strip", z.ZodTypeAny, {
699
+ type: string;
700
+ settings: Record<string, unknown>;
701
+ id?: string | undefined;
702
+ disabled?: boolean | undefined;
703
+ styles?: Record<string, unknown> | undefined;
704
+ }, {
705
+ type: string;
706
+ id?: string | undefined;
707
+ disabled?: boolean | undefined;
708
+ settings?: Record<string, unknown> | undefined;
709
+ styles?: Record<string, unknown> | undefined;
710
+ }>>, z.ZodArray<z.ZodObject<{
711
+ id: z.ZodOptional<z.ZodString>;
712
+ type: z.ZodString;
713
+ disabled: z.ZodOptional<z.ZodBoolean>;
714
+ settings: z.ZodDefault<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
715
+ styles: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
716
+ }, "strip", z.ZodTypeAny, {
717
+ type: string;
718
+ settings: Record<string, unknown>;
719
+ id?: string | undefined;
720
+ disabled?: boolean | undefined;
721
+ styles?: Record<string, unknown> | undefined;
722
+ }, {
723
+ type: string;
724
+ id?: string | undefined;
725
+ disabled?: boolean | undefined;
726
+ settings?: Record<string, unknown> | undefined;
727
+ styles?: Record<string, unknown> | undefined;
728
+ }>, "many">]>>;
729
+ block_order: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
730
+ blockOrder: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
731
+ }, "strip", z.ZodTypeAny, {
732
+ type: string;
733
+ id?: string | undefined;
734
+ disabled?: boolean | undefined;
735
+ settings?: Record<string, unknown> | undefined;
736
+ styles?: Record<string, unknown> | undefined;
737
+ blocks?: Record<string, {
738
+ type: string;
739
+ settings: Record<string, unknown>;
740
+ id?: string | undefined;
741
+ disabled?: boolean | undefined;
742
+ styles?: Record<string, unknown> | undefined;
743
+ }> | {
744
+ type: string;
745
+ settings: Record<string, unknown>;
746
+ id?: string | undefined;
747
+ disabled?: boolean | undefined;
748
+ styles?: Record<string, unknown> | undefined;
749
+ }[] | undefined;
750
+ block_order?: string[] | undefined;
751
+ blockOrder?: string[] | undefined;
752
+ }, {
753
+ type: string;
754
+ id?: string | undefined;
755
+ disabled?: boolean | undefined;
756
+ settings?: Record<string, unknown> | undefined;
757
+ styles?: Record<string, unknown> | undefined;
758
+ blocks?: Record<string, {
759
+ type: string;
760
+ id?: string | undefined;
761
+ disabled?: boolean | undefined;
762
+ settings?: Record<string, unknown> | undefined;
763
+ styles?: Record<string, unknown> | undefined;
764
+ }> | {
765
+ type: string;
766
+ id?: string | undefined;
767
+ disabled?: boolean | undefined;
768
+ settings?: Record<string, unknown> | undefined;
769
+ styles?: Record<string, unknown> | undefined;
770
+ }[] | undefined;
771
+ block_order?: string[] | undefined;
772
+ blockOrder?: string[] | undefined;
773
+ }>>>;
774
+ order: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
775
+ }, "strip", z.ZodTypeAny, {
776
+ schemaVersion: number;
777
+ name?: string | undefined;
778
+ sections?: Record<string, {
779
+ type: string;
780
+ id?: string | undefined;
781
+ disabled?: boolean | undefined;
782
+ settings?: Record<string, unknown> | undefined;
783
+ styles?: Record<string, unknown> | undefined;
784
+ blocks?: Record<string, {
785
+ type: string;
786
+ settings: Record<string, unknown>;
787
+ id?: string | undefined;
788
+ disabled?: boolean | undefined;
789
+ styles?: Record<string, unknown> | undefined;
790
+ }> | {
791
+ type: string;
792
+ settings: Record<string, unknown>;
793
+ id?: string | undefined;
794
+ disabled?: boolean | undefined;
795
+ styles?: Record<string, unknown> | undefined;
796
+ }[] | undefined;
797
+ block_order?: string[] | undefined;
798
+ blockOrder?: string[] | undefined;
799
+ }> | undefined;
800
+ order?: string[] | undefined;
801
+ supportedRegions?: string[] | undefined;
802
+ regions?: Record<string, string[] | {
803
+ sections: Record<string, {
804
+ type: string;
805
+ id?: string | undefined;
806
+ disabled?: boolean | undefined;
807
+ settings?: Record<string, unknown> | undefined;
808
+ styles?: Record<string, unknown> | undefined;
809
+ blocks?: Record<string, {
810
+ type: string;
811
+ settings: Record<string, unknown>;
812
+ id?: string | undefined;
813
+ disabled?: boolean | undefined;
814
+ styles?: Record<string, unknown> | undefined;
815
+ }> | {
816
+ type: string;
817
+ settings: Record<string, unknown>;
818
+ id?: string | undefined;
819
+ disabled?: boolean | undefined;
820
+ styles?: Record<string, unknown> | undefined;
821
+ }[] | undefined;
822
+ block_order?: string[] | undefined;
823
+ blockOrder?: string[] | undefined;
824
+ }>;
825
+ order: string[];
826
+ }> | undefined;
827
+ }, {
828
+ schemaVersion?: number | undefined;
829
+ name?: string | undefined;
830
+ sections?: Record<string, {
831
+ type: string;
832
+ id?: string | undefined;
833
+ disabled?: boolean | undefined;
834
+ settings?: Record<string, unknown> | undefined;
835
+ styles?: Record<string, unknown> | undefined;
836
+ blocks?: Record<string, {
837
+ type: string;
838
+ id?: string | undefined;
839
+ disabled?: boolean | undefined;
840
+ settings?: Record<string, unknown> | undefined;
841
+ styles?: Record<string, unknown> | undefined;
842
+ }> | {
843
+ type: string;
844
+ id?: string | undefined;
845
+ disabled?: boolean | undefined;
846
+ settings?: Record<string, unknown> | undefined;
847
+ styles?: Record<string, unknown> | undefined;
848
+ }[] | undefined;
849
+ block_order?: string[] | undefined;
850
+ blockOrder?: string[] | undefined;
851
+ }> | undefined;
852
+ order?: string[] | undefined;
853
+ supportedRegions?: string[] | undefined;
854
+ regions?: Record<string, string[] | {
855
+ sections: Record<string, {
856
+ type: string;
857
+ id?: string | undefined;
858
+ disabled?: boolean | undefined;
859
+ settings?: Record<string, unknown> | undefined;
860
+ styles?: Record<string, unknown> | undefined;
861
+ blocks?: Record<string, {
862
+ type: string;
863
+ id?: string | undefined;
864
+ disabled?: boolean | undefined;
865
+ settings?: Record<string, unknown> | undefined;
866
+ styles?: Record<string, unknown> | undefined;
867
+ }> | {
868
+ type: string;
869
+ id?: string | undefined;
870
+ disabled?: boolean | undefined;
871
+ settings?: Record<string, unknown> | undefined;
872
+ styles?: Record<string, unknown> | undefined;
873
+ }[] | undefined;
874
+ block_order?: string[] | undefined;
875
+ blockOrder?: string[] | undefined;
876
+ }>;
877
+ order: string[];
878
+ }> | undefined;
879
+ }>;
880
+ export type JsonLayoutTemplate = z.infer<typeof JsonLayoutTemplateSchema>;
881
+ /**
882
+ * Checks whether an unknown object matches the canonical JSON template structure.
883
+ */
884
+ export declare function isJsonTemplate(obj: unknown): obj is JsonTemplate;
885
+ /**
886
+ * Known legacy section aliases mapping legacy IDs to canonical IDs and vice-versa.
887
+ */
888
+ export declare const LEGACY_SECTION_ALIASES: Record<string, string>;
889
+ /**
890
+ * Normalizes section settings across legacy and modern property names.
891
+ */
892
+ export declare function normalizeSectionSettings(sectionType: string, settings?: Record<string, unknown>): Record<string, unknown>;
893
+ export type JsonTemplateInput = z.input<typeof JsonTemplateSchema>;
894
+ /**
895
+ * Converts a JSON template into an array of SectionNodes in explicit order,
896
+ * filtering out disabled sections and resolving nested blocks.
897
+ */
898
+ export declare function jsonTemplateToSectionNodes(template: JsonTemplate | JsonTemplateInput | {
899
+ sections?: Record<string, any>;
900
+ order?: string[];
901
+ layout?: string;
902
+ }): SectionNode[];
903
+ /**
904
+ * Converts a legacy PageDocument with `regions.body` into a canonical JSON Template.
905
+ */
906
+ export declare function pageDocumentToJsonTemplate(doc: PageDocument, options?: {
907
+ layout?: string;
908
+ name?: string;
909
+ }): JsonTemplate;
910
+ /**
911
+ * Validates a JSON template object, returning { valid: boolean, errors: string[] }.
912
+ */
913
+ export declare function validateJsonTemplateStructure(data: unknown): {
914
+ valid: boolean;
915
+ errors: string[];
916
+ template?: JsonTemplate;
917
+ };
918
+ /**
919
+ * Validates a JSON layout template object, returning { valid: boolean, errors: string[] }.
920
+ */
921
+ export declare function validateJsonLayoutStructure(data: unknown): {
922
+ valid: boolean;
923
+ errors: string[];
924
+ layout?: JsonLayoutTemplate;
925
+ };
926
+ /**
927
+ * Converts a canonical JSON template into a legacy PageDocument with `regions.body`.
928
+ */
929
+ export declare function jsonTemplateToPageDocument(template: JsonTemplate): PageDocument;
930
+ /**
931
+ * Converts a legacy LayoutDocument with header and footer arrays into a canonical JsonLayoutTemplate.
932
+ */
933
+ export declare function layoutDocumentToJsonLayout(doc: {
934
+ regions?: {
935
+ header?: SectionNode[];
936
+ footer?: SectionNode[];
937
+ };
938
+ }, options?: {
939
+ name?: string;
940
+ }): JsonLayoutTemplate;
941
+ /**
942
+ * Converts a canonical JsonLayoutTemplate into a legacy LayoutDocument.
943
+ */
944
+ export declare function jsonLayoutToLayoutDocument(template: JsonLayoutTemplate): {
945
+ regions: {
946
+ header: SectionNode[];
947
+ footer: SectionNode[];
948
+ };
949
+ };
950
+ /**
951
+ * Adds a new section instance to a JSON template at an optional target index.
952
+ */
953
+ export declare function addSectionToTemplate(template: JsonTemplate, sectionIdOrOptions: string | {
954
+ sectionId: string;
955
+ type: string;
956
+ settings?: Record<string, unknown>;
957
+ blocks?: any[];
958
+ }, sectionOrTargetIndex?: JsonSectionInstance | number, targetIndex?: number): JsonTemplate;
959
+ /**
960
+ * Removes a section instance from a JSON template.
961
+ */
962
+ export declare function removeSectionFromTemplate(template: JsonTemplate, sectionId: string): JsonTemplate;
963
+ /**
964
+ * Reorders a section instance or sets an explicit new order in a JSON template.
965
+ */
966
+ export declare function reorderSectionsInTemplate(template: JsonTemplate, sectionIdOrNewOrder: string | string[], toIndex?: number): JsonTemplate;
967
+ /**
968
+ * Duplicates a section instance within a JSON template, generating a unique ID.
969
+ */
970
+ export declare function duplicateSectionInTemplate(template: JsonTemplate, sectionId: string, newSectionId?: string): JsonTemplate;
971
+ /**
972
+ * Updates settings for a specific section instance in a JSON template.
973
+ */
974
+ export declare function updateSectionSettingsInTemplate(template: JsonTemplate, sectionId: string, newSettings: Record<string, unknown>): JsonTemplate;
975
+ /**
976
+ * Adds a block instance to a section in a JSON template.
977
+ */
978
+ export declare function addBlockToSection(template: JsonTemplate, sectionId: string, blockIdOrOptions: string | {
979
+ blockId: string;
980
+ type: string;
981
+ settings?: Record<string, unknown>;
982
+ id?: string;
983
+ }, blockOrTargetIndex?: JsonBlockInstance | number, targetIndex?: number): JsonTemplate;
984
+ /**
985
+ * Removes a block instance from a section in a JSON template.
986
+ */
987
+ export declare function removeBlockFromSection(template: JsonTemplate, sectionId: string, blockId: string): JsonTemplate;
988
+ /**
989
+ * Reorders a block instance or sets a new block order within a section in a JSON template.
990
+ */
991
+ export declare function reorderBlocksInSection(template: JsonTemplate, sectionId: string, blockIdOrNewOrder: string | string[], toIndex?: number): JsonTemplate;