@blockslides/ai-context 0.2.0 → 0.3.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/dist/index.cjs +987 -996
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +709 -191
- package/dist/index.d.ts +709 -191
- package/dist/index.js +987 -994
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/bundles/v1/all.ts +0 -1
- package/src/bundles/v1/allContexts.ts +1 -1
- package/src/bundles/v1/minimalCreate.ts +2 -2
- package/src/contexts/v1/blockquote.ts +10 -5
- package/src/contexts/v1/bulletList.ts +10 -5
- package/src/contexts/v1/codeBlock.ts +11 -3
- package/src/contexts/v1/column.ts +34 -14
- package/src/contexts/v1/columnGroup.ts +44 -0
- package/src/contexts/v1/core.ts +24 -4
- package/src/contexts/v1/editingRules.ts +5 -5
- package/src/contexts/v1/heading.ts +11 -4
- package/src/contexts/v1/horizontalRule.ts +9 -4
- package/src/contexts/v1/imageBlock.ts +31 -22
- package/src/contexts/v1/index.ts +1 -1
- package/src/contexts/v1/paragraph.ts +11 -5
- package/src/contexts/v1/slide.ts +5 -1
- package/src/contexts/v1/youtube.ts +14 -7
- package/src/index.ts +0 -3
- package/src/schemas/v1/blockquote.schema.json +13 -2
- package/src/schemas/v1/bulletList.schema.json +13 -2
- package/src/schemas/v1/codeBlock.schema.json +12 -3
- package/src/schemas/v1/column.schema.json +18 -14
- package/src/schemas/v1/columnGroup.schema.json +45 -0
- package/src/schemas/v1/heading.schema.json +12 -7
- package/src/schemas/v1/horizontalRule.schema.json +7 -2
- package/src/schemas/v1/imageBlock.schema.json +25 -15
- package/src/schemas/v1/index.ts +1 -1
- package/src/schemas/v1/paragraph.schema.json +13 -2
- package/src/schemas/v1/slide.schema.json +6 -0
- package/src/schemas/v1/youtube.schema.json +9 -6
- package/src/templates/v1/presetTemplateBuilder.ts +401 -443
- package/src/templates/v1/schemaBuilder.ts +195 -263
- package/src/types/v1.ts +40 -25
- package/src/contexts/v1/row.ts +0 -25
- package/src/examples/v1/flyers.ts +0 -30
- package/src/examples/v1/index.ts +0 -4
- package/src/examples/v1/slides.ts +0 -31
- package/src/recipes/v1/addTwoColumns.ts +0 -13
- package/src/recipes/v1/createSlide.ts +0 -29
- package/src/recipes/v1/editImageToCover.ts +0 -13
- package/src/recipes/v1/index.ts +0 -5
- package/src/schemas/v1/row.schema.json +0 -29
|
@@ -38,11 +38,13 @@ const titleAndSubheader: PresetTemplate = {
|
|
|
38
38
|
icon: titleAndSubheaderIcon,
|
|
39
39
|
build: () =>
|
|
40
40
|
slide.singleCol({
|
|
41
|
-
rowAttrs: { className: "min-h-[720px] items-center justify-center" },
|
|
42
41
|
columnAttrs: {
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
42
|
+
justify: "center",
|
|
43
|
+
align: "center",
|
|
44
|
+
gap: "md",
|
|
45
|
+
padding: "lg",
|
|
46
|
+
fill: true,
|
|
47
|
+
backgroundColor: "#ffffff",
|
|
46
48
|
},
|
|
47
49
|
content: [
|
|
48
50
|
blocks.heading("Lorem ipsum dolor sit amet", 1),
|
|
@@ -107,30 +109,30 @@ const imageAndText: PresetTemplate = {
|
|
|
107
109
|
description: "Image on left, text on right",
|
|
108
110
|
icon: imageTextIcon,
|
|
109
111
|
build: () =>
|
|
110
|
-
slide.twoCol(
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
112
|
+
slide.twoCol(
|
|
113
|
+
blocks.column(
|
|
114
|
+
[
|
|
115
|
+
blocks.imageBlock({
|
|
116
|
+
src: "https://placehold.co/640x480/png",
|
|
117
|
+
size: "fit",
|
|
118
|
+
}),
|
|
119
|
+
],
|
|
120
|
+
{
|
|
121
|
+
}
|
|
122
|
+
),
|
|
123
|
+
blocks.column(
|
|
124
|
+
[
|
|
125
|
+
blocks.heading("Lorem ipsum dolor sit amet", 2),
|
|
126
|
+
blocks.paragraph("Consectetur adipiscing elit. Sed do eiusmod tempor incididunt."),
|
|
127
|
+
blocks.paragraph("Ut enim ad minim veniam, quis nostrud exercitation."),
|
|
128
|
+
],
|
|
129
|
+
{
|
|
130
|
+
padding: "lg",
|
|
131
|
+
gap: "sm",
|
|
132
|
+
fill: true,
|
|
133
|
+
}
|
|
134
|
+
)
|
|
135
|
+
),
|
|
134
136
|
};
|
|
135
137
|
|
|
136
138
|
const textAndImage: PresetTemplate = {
|
|
@@ -139,30 +141,35 @@ const textAndImage: PresetTemplate = {
|
|
|
139
141
|
description: "Text on left, image on right",
|
|
140
142
|
icon: textImageIcon,
|
|
141
143
|
build: () =>
|
|
142
|
-
slide.twoCol(
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
144
|
+
slide.twoCol(
|
|
145
|
+
blocks.column(
|
|
146
|
+
[
|
|
147
|
+
blocks.heading("Lorem ipsum dolor sit amet", 2),
|
|
148
|
+
blocks.paragraph("Consectetur adipiscing elit. Sed do eiusmod tempor incididunt."),
|
|
149
|
+
blocks.paragraph("Ut enim ad minim veniam, quis nostrud exercitation."),
|
|
150
|
+
],
|
|
151
|
+
{
|
|
152
|
+
justify: "center",
|
|
153
|
+
padding: "lg",
|
|
154
|
+
gap: "sm",
|
|
155
|
+
fill: true,
|
|
156
|
+
}
|
|
157
|
+
),
|
|
158
|
+
blocks.column(
|
|
159
|
+
[
|
|
160
|
+
blocks.imageBlock({
|
|
161
|
+
src: "https://placehold.co/640x480/png",
|
|
162
|
+
size: "fit",
|
|
163
|
+
}),
|
|
164
|
+
],
|
|
165
|
+
{
|
|
166
|
+
align: "center",
|
|
167
|
+
justify: "center",
|
|
168
|
+
padding: "lg",
|
|
169
|
+
fill: true,
|
|
170
|
+
}
|
|
171
|
+
)
|
|
172
|
+
),
|
|
166
173
|
};
|
|
167
174
|
|
|
168
175
|
const twoColumns: PresetTemplate = {
|
|
@@ -170,37 +177,31 @@ const twoColumns: PresetTemplate = {
|
|
|
170
177
|
label: "Two Columns",
|
|
171
178
|
description: "Header above two balanced text columns",
|
|
172
179
|
icon: twoColumnsIcon,
|
|
173
|
-
build: () =>
|
|
174
|
-
slide
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
attrs: { className: "p-4 gap-3 w-full box-border" },
|
|
185
|
-
content: [
|
|
186
|
-
blocks.paragraph("Lorem ipsum dolor sit amet."),
|
|
187
|
-
blocks.paragraph("Consectetur adipiscing elit. Sed do eiusmod tempor incididunt."),
|
|
188
|
-
blocks.paragraph("Ut enim ad minim veniam, quis nostrud exercitation."),
|
|
189
|
-
],
|
|
190
|
-
},
|
|
191
|
-
{
|
|
192
|
-
type: "column",
|
|
193
|
-
attrs: { className: "p-4 gap-3 w-full box-border" },
|
|
194
|
-
content: [
|
|
195
|
-
blocks.paragraph("Lorem ipsum dolor sit amet."),
|
|
196
|
-
blocks.paragraph("Consectetur adipiscing elit. Sed do eiusmod tempor incididunt."),
|
|
197
|
-
blocks.paragraph("Ut enim ad minim veniam, quis nostrud exercitation."),
|
|
198
|
-
],
|
|
199
|
-
},
|
|
180
|
+
build: () => ({
|
|
181
|
+
type: "slide",
|
|
182
|
+
attrs: { id: "slide-1", size: "16x9" },
|
|
183
|
+
content: [
|
|
184
|
+
blocks.heading("Section heading", 2),
|
|
185
|
+
blocks.columnGroup([
|
|
186
|
+
blocks.column(
|
|
187
|
+
[
|
|
188
|
+
blocks.paragraph("Lorem ipsum dolor sit amet."),
|
|
189
|
+
blocks.paragraph("Consectetur adipiscing elit. Sed do eiusmod tempor incididunt."),
|
|
190
|
+
blocks.paragraph("Ut enim ad minim veniam, quis nostrud exercitation."),
|
|
200
191
|
],
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
192
|
+
{ padding: "md", gap: "sm", fill: true }
|
|
193
|
+
),
|
|
194
|
+
blocks.column(
|
|
195
|
+
[
|
|
196
|
+
blocks.paragraph("Lorem ipsum dolor sit amet."),
|
|
197
|
+
blocks.paragraph("Consectetur adipiscing elit. Sed do eiusmod tempor incididunt."),
|
|
198
|
+
blocks.paragraph("Ut enim ad minim veniam, quis nostrud exercitation."),
|
|
199
|
+
],
|
|
200
|
+
{ padding: "md", gap: "sm", fill: true }
|
|
201
|
+
),
|
|
202
|
+
]),
|
|
203
|
+
],
|
|
204
|
+
}),
|
|
204
205
|
};
|
|
205
206
|
|
|
206
207
|
const twoColumnsWithHeader: PresetTemplate = {
|
|
@@ -208,37 +209,31 @@ const twoColumnsWithHeader: PresetTemplate = {
|
|
|
208
209
|
label: "Two Columns + Header",
|
|
209
210
|
description: "Header plus two columns, each with its own heading",
|
|
210
211
|
icon: twoColumnsHeaderIcon,
|
|
211
|
-
build: () =>
|
|
212
|
-
slide
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
attrs: { className: "p-4 gap-3 w-full box-border" },
|
|
223
|
-
content: [
|
|
224
|
-
blocks.heading("Column heading", 4),
|
|
225
|
-
blocks.paragraph("Consectetur adipiscing elit. Sed do eiusmod tempor incididunt."),
|
|
226
|
-
blocks.paragraph("Ut enim ad minim veniam, quis nostrud exercitation."),
|
|
227
|
-
],
|
|
228
|
-
},
|
|
229
|
-
{
|
|
230
|
-
type: "column",
|
|
231
|
-
attrs: { className: "p-4 gap-3 w-full box-border" },
|
|
232
|
-
content: [
|
|
233
|
-
blocks.heading("Column heading", 4),
|
|
234
|
-
blocks.paragraph("Consectetur adipiscing elit. Sed do eiusmod tempor incididunt."),
|
|
235
|
-
blocks.paragraph("Ut enim ad minim veniam, quis nostrud exercitation."),
|
|
236
|
-
],
|
|
237
|
-
},
|
|
212
|
+
build: () => ({
|
|
213
|
+
type: "slide",
|
|
214
|
+
attrs: { id: "slide-1", size: "16x9" },
|
|
215
|
+
content: [
|
|
216
|
+
blocks.heading("Section heading", 2),
|
|
217
|
+
blocks.columnGroup([
|
|
218
|
+
blocks.column(
|
|
219
|
+
[
|
|
220
|
+
blocks.heading("Column heading", 4),
|
|
221
|
+
blocks.paragraph("Consectetur adipiscing elit. Sed do eiusmod tempor incididunt."),
|
|
222
|
+
blocks.paragraph("Ut enim ad minim veniam, quis nostrud exercitation."),
|
|
238
223
|
],
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
224
|
+
{ padding: "md", gap: "sm", fill: true }
|
|
225
|
+
),
|
|
226
|
+
blocks.column(
|
|
227
|
+
[
|
|
228
|
+
blocks.heading("Column heading", 4),
|
|
229
|
+
blocks.paragraph("Consectetur adipiscing elit. Sed do eiusmod tempor incididunt."),
|
|
230
|
+
blocks.paragraph("Ut enim ad minim veniam, quis nostrud exercitation."),
|
|
231
|
+
],
|
|
232
|
+
{ padding: "md", gap: "sm", fill: true }
|
|
233
|
+
),
|
|
234
|
+
]),
|
|
235
|
+
],
|
|
236
|
+
}),
|
|
242
237
|
};
|
|
243
238
|
|
|
244
239
|
const threeColumns: PresetTemplate = {
|
|
@@ -246,42 +241,35 @@ const threeColumns: PresetTemplate = {
|
|
|
246
241
|
label: "Three Columns",
|
|
247
242
|
description: "Balanced three-column text",
|
|
248
243
|
icon: threeColumnsIcon,
|
|
249
|
-
build: () =>
|
|
250
|
-
slide
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
type: "column",
|
|
259
|
-
attrs: { className: "p-3 gap-3 w-full box-border" },
|
|
260
|
-
content: [
|
|
261
|
-
blocks.paragraph("Lorem ipsum dolor sit amet."),
|
|
262
|
-
blocks.paragraph("Consectetur adipiscing elit. Sed do eiusmod tempor incididunt."),
|
|
263
|
-
],
|
|
264
|
-
},
|
|
265
|
-
{
|
|
266
|
-
type: "column",
|
|
267
|
-
attrs: { className: "p-3 gap-3 w-full box-border" },
|
|
268
|
-
content: [
|
|
269
|
-
blocks.paragraph("Ut enim ad minim veniam."),
|
|
270
|
-
blocks.paragraph("Quis nostrud exercitation ullamco laboris."),
|
|
271
|
-
],
|
|
272
|
-
},
|
|
273
|
-
{
|
|
274
|
-
type: "column",
|
|
275
|
-
attrs: { className: "p-3 gap-3 w-full box-border" },
|
|
276
|
-
content: [
|
|
277
|
-
blocks.paragraph("Nisi ut aliquip ex ea commodo consequat."),
|
|
278
|
-
blocks.paragraph("Duis aute irure dolor in reprehenderit."),
|
|
279
|
-
],
|
|
280
|
-
},
|
|
244
|
+
build: () => ({
|
|
245
|
+
type: "slide",
|
|
246
|
+
attrs: { id: "slide-1", size: "16x9" },
|
|
247
|
+
content: [
|
|
248
|
+
blocks.columnGroup([
|
|
249
|
+
blocks.column(
|
|
250
|
+
[
|
|
251
|
+
blocks.paragraph("Lorem ipsum dolor sit amet."),
|
|
252
|
+
blocks.paragraph("Consectetur adipiscing elit. Sed do eiusmod tempor incididunt."),
|
|
281
253
|
],
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
254
|
+
{ padding: "sm", gap: "sm", fill: true }
|
|
255
|
+
),
|
|
256
|
+
blocks.column(
|
|
257
|
+
[
|
|
258
|
+
blocks.paragraph("Ut enim ad minim veniam."),
|
|
259
|
+
blocks.paragraph("Quis nostrud exercitation ullamco laboris."),
|
|
260
|
+
],
|
|
261
|
+
{ padding: "sm", gap: "sm", fill: true }
|
|
262
|
+
),
|
|
263
|
+
blocks.column(
|
|
264
|
+
[
|
|
265
|
+
blocks.paragraph("Nisi ut aliquip ex ea commodo consequat."),
|
|
266
|
+
blocks.paragraph("Duis aute irure dolor in reprehenderit."),
|
|
267
|
+
],
|
|
268
|
+
{ padding: "sm", gap: "sm", fill: true }
|
|
269
|
+
),
|
|
270
|
+
]),
|
|
271
|
+
],
|
|
272
|
+
}),
|
|
285
273
|
};
|
|
286
274
|
|
|
287
275
|
const threeColumnsWithHeader: PresetTemplate = {
|
|
@@ -289,46 +277,39 @@ const threeColumnsWithHeader: PresetTemplate = {
|
|
|
289
277
|
label: "Three Columns + Header",
|
|
290
278
|
description: "Header plus three columns",
|
|
291
279
|
icon: threeColumnsHeaderIcon,
|
|
292
|
-
build: () =>
|
|
293
|
-
slide
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
attrs: { className: "p-3 gap-3 w-full box-border" },
|
|
304
|
-
content: [
|
|
305
|
-
blocks.heading("Column heading", 4),
|
|
306
|
-
blocks.paragraph("Lorem ipsum dolor sit amet."),
|
|
307
|
-
blocks.paragraph("Consectetur adipiscing elit. Sed do eiusmod tempor incididunt."),
|
|
308
|
-
],
|
|
309
|
-
},
|
|
310
|
-
{
|
|
311
|
-
type: "column",
|
|
312
|
-
attrs: { className: "p-3 gap-3 w-full box-border" },
|
|
313
|
-
content: [
|
|
314
|
-
blocks.heading("Column heading", 4),
|
|
315
|
-
blocks.paragraph("Ut enim ad minim veniam."),
|
|
316
|
-
blocks.paragraph("Quis nostrud exercitation ullamco laboris."),
|
|
317
|
-
],
|
|
318
|
-
},
|
|
319
|
-
{
|
|
320
|
-
type: "column",
|
|
321
|
-
attrs: { className: "p-3 gap-3 w-full box-border" },
|
|
322
|
-
content: [
|
|
323
|
-
blocks.heading("Column heading", 4),
|
|
324
|
-
blocks.paragraph("Nisi ut aliquip ex ea commodo consequat."),
|
|
325
|
-
blocks.paragraph("Duis aute irure dolor in reprehenderit."),
|
|
326
|
-
],
|
|
327
|
-
},
|
|
280
|
+
build: () => ({
|
|
281
|
+
type: "slide",
|
|
282
|
+
attrs: { id: "slide-1", size: "16x9" },
|
|
283
|
+
content: [
|
|
284
|
+
blocks.heading("Section heading", 2),
|
|
285
|
+
blocks.columnGroup([
|
|
286
|
+
blocks.column(
|
|
287
|
+
[
|
|
288
|
+
blocks.heading("Column heading", 4),
|
|
289
|
+
blocks.paragraph("Lorem ipsum dolor sit amet."),
|
|
290
|
+
blocks.paragraph("Consectetur adipiscing elit. Sed do eiusmod tempor incididunt."),
|
|
328
291
|
],
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
292
|
+
{ padding: "sm", gap: "sm", fill: true }
|
|
293
|
+
),
|
|
294
|
+
blocks.column(
|
|
295
|
+
[
|
|
296
|
+
blocks.heading("Column heading", 4),
|
|
297
|
+
blocks.paragraph("Ut enim ad minim veniam."),
|
|
298
|
+
blocks.paragraph("Quis nostrud exercitation ullamco laboris."),
|
|
299
|
+
],
|
|
300
|
+
{ padding: "sm", gap: "sm", fill: true }
|
|
301
|
+
),
|
|
302
|
+
blocks.column(
|
|
303
|
+
[
|
|
304
|
+
blocks.heading("Column heading", 4),
|
|
305
|
+
blocks.paragraph("Nisi ut aliquip ex ea commodo consequat."),
|
|
306
|
+
blocks.paragraph("Duis aute irure dolor in reprehenderit."),
|
|
307
|
+
],
|
|
308
|
+
{ padding: "sm", gap: "sm", fill: true }
|
|
309
|
+
),
|
|
310
|
+
]),
|
|
311
|
+
],
|
|
312
|
+
}),
|
|
332
313
|
};
|
|
333
314
|
|
|
334
315
|
const fourColumnsWithHeader: PresetTemplate = {
|
|
@@ -336,55 +317,47 @@ const fourColumnsWithHeader: PresetTemplate = {
|
|
|
336
317
|
label: "Four Columns + Header",
|
|
337
318
|
description: "Header plus four columns",
|
|
338
319
|
icon: fourColumnsHeaderIcon,
|
|
339
|
-
build: () =>
|
|
340
|
-
slide
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
attrs: { className: "p-3 gap-3 w-full box-border" },
|
|
351
|
-
content: [
|
|
352
|
-
blocks.heading("Column heading", 4),
|
|
353
|
-
blocks.paragraph("Lorem ipsum dolor sit amet."),
|
|
354
|
-
blocks.paragraph("Consectetur adipiscing elit."),
|
|
355
|
-
],
|
|
356
|
-
},
|
|
357
|
-
{
|
|
358
|
-
type: "column",
|
|
359
|
-
attrs: { className: "p-3 gap-3 w-full box-border" },
|
|
360
|
-
content: [
|
|
361
|
-
blocks.heading("Column heading", 4),
|
|
362
|
-
blocks.paragraph("Ut enim ad minim veniam."),
|
|
363
|
-
blocks.paragraph("Quis nostrud exercitation ullamco laboris."),
|
|
364
|
-
],
|
|
365
|
-
},
|
|
366
|
-
{
|
|
367
|
-
type: "column",
|
|
368
|
-
attrs: { className: "p-3 gap-3 w-full box-border" },
|
|
369
|
-
content: [
|
|
370
|
-
blocks.heading("Column heading", 4),
|
|
371
|
-
blocks.paragraph("Nisi ut aliquip ex ea commodo consequat."),
|
|
372
|
-
blocks.paragraph("Duis aute irure dolor in reprehenderit."),
|
|
373
|
-
],
|
|
374
|
-
},
|
|
375
|
-
{
|
|
376
|
-
type: "column",
|
|
377
|
-
attrs: { className: "p-3 gap-3 w-full box-border" },
|
|
378
|
-
content: [
|
|
379
|
-
blocks.heading("Column heading", 4),
|
|
380
|
-
blocks.paragraph("Excepteur sint occaecat cupidatat."),
|
|
381
|
-
blocks.paragraph("Sunt in culpa qui officia."),
|
|
382
|
-
],
|
|
383
|
-
},
|
|
320
|
+
build: () => ({
|
|
321
|
+
type: "slide",
|
|
322
|
+
attrs: { id: "slide-1", size: "16x9" },
|
|
323
|
+
content: [
|
|
324
|
+
blocks.heading("Section heading", 2),
|
|
325
|
+
blocks.columnGroup([
|
|
326
|
+
blocks.column(
|
|
327
|
+
[
|
|
328
|
+
blocks.heading("Column heading", 4),
|
|
329
|
+
blocks.paragraph("Lorem ipsum dolor sit amet."),
|
|
330
|
+
blocks.paragraph("Consectetur adipiscing elit."),
|
|
384
331
|
],
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
332
|
+
{ padding: "sm", gap: "sm", fill: true }
|
|
333
|
+
),
|
|
334
|
+
blocks.column(
|
|
335
|
+
[
|
|
336
|
+
blocks.heading("Column heading", 4),
|
|
337
|
+
blocks.paragraph("Ut enim ad minim veniam."),
|
|
338
|
+
blocks.paragraph("Quis nostrud exercitation ullamco laboris."),
|
|
339
|
+
],
|
|
340
|
+
{ padding: "sm", gap: "sm", fill: true }
|
|
341
|
+
),
|
|
342
|
+
blocks.column(
|
|
343
|
+
[
|
|
344
|
+
blocks.heading("Column heading", 4),
|
|
345
|
+
blocks.paragraph("Nisi ut aliquip ex ea commodo consequat."),
|
|
346
|
+
blocks.paragraph("Duis aute irure dolor in reprehenderit."),
|
|
347
|
+
],
|
|
348
|
+
{ padding: "sm", gap: "sm", fill: true }
|
|
349
|
+
),
|
|
350
|
+
blocks.column(
|
|
351
|
+
[
|
|
352
|
+
blocks.heading("Column heading", 4),
|
|
353
|
+
blocks.paragraph("Excepteur sint occaecat cupidatat."),
|
|
354
|
+
blocks.paragraph("Sunt in culpa qui officia."),
|
|
355
|
+
],
|
|
356
|
+
{ padding: "sm", gap: "sm", fill: true }
|
|
357
|
+
),
|
|
358
|
+
]),
|
|
359
|
+
],
|
|
360
|
+
}),
|
|
388
361
|
};
|
|
389
362
|
|
|
390
363
|
const fullImage: PresetTemplate = {
|
|
@@ -394,14 +367,12 @@ const fullImage: PresetTemplate = {
|
|
|
394
367
|
icon: fullImageIcon,
|
|
395
368
|
build: () =>
|
|
396
369
|
slide.singleCol({
|
|
397
|
-
|
|
398
|
-
columnAttrs: { className: "p-0 w-full h-full", horizontalAlign: "stretch" },
|
|
370
|
+
columnAttrs: { padding: "none", fill: true, align: "stretch" },
|
|
399
371
|
content: [
|
|
400
372
|
blocks.imageBlock({
|
|
401
373
|
src: "https://placehold.co/1920x1080/png",
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
align: "center",
|
|
374
|
+
size: "fill",
|
|
375
|
+
crop: "center",
|
|
405
376
|
}),
|
|
406
377
|
],
|
|
407
378
|
}),
|
|
@@ -412,24 +383,23 @@ const fourColumns: PresetTemplate = {
|
|
|
412
383
|
label: "Four Columns",
|
|
413
384
|
description: "Balanced four-column text",
|
|
414
385
|
icon: fourColumnsIcon,
|
|
415
|
-
build: () =>
|
|
416
|
-
slide
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
type: "column",
|
|
424
|
-
attrs: { className: "p-2.5 gap-2 w-full box-border" },
|
|
425
|
-
content: [
|
|
386
|
+
build: () => ({
|
|
387
|
+
type: "slide",
|
|
388
|
+
attrs: { id: "slide-1", size: "16x9" },
|
|
389
|
+
content: [
|
|
390
|
+
blocks.columnGroup(
|
|
391
|
+
Array.from({ length: 4 }).map(() =>
|
|
392
|
+
blocks.column(
|
|
393
|
+
[
|
|
426
394
|
blocks.paragraph("Lorem ipsum dolor sit amet."),
|
|
427
395
|
blocks.paragraph("Consectetur adipiscing elit."),
|
|
428
396
|
],
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
397
|
+
{ padding: "sm", gap: "sm", fill: true }
|
|
398
|
+
)
|
|
399
|
+
)
|
|
400
|
+
),
|
|
401
|
+
],
|
|
402
|
+
}),
|
|
433
403
|
};
|
|
434
404
|
|
|
435
405
|
const titleWithBullets: PresetTemplate = {
|
|
@@ -439,7 +409,7 @@ const titleWithBullets: PresetTemplate = {
|
|
|
439
409
|
icon: titleBulletsIcon,
|
|
440
410
|
build: () =>
|
|
441
411
|
slide.singleCol({
|
|
442
|
-
columnAttrs: {
|
|
412
|
+
columnAttrs: { padding: "md", gap: "md" },
|
|
443
413
|
content: [
|
|
444
414
|
blocks.heading("Lorem ipsum dolor sit amet", 2),
|
|
445
415
|
blocks.bulletList([
|
|
@@ -457,30 +427,33 @@ const titleBulletsAndImage: PresetTemplate = {
|
|
|
457
427
|
description: "Title with bullets and an image",
|
|
458
428
|
icon: titleBulletsImageIcon,
|
|
459
429
|
build: () =>
|
|
460
|
-
slide.twoCol(
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
430
|
+
slide.twoCol(
|
|
431
|
+
blocks.column(
|
|
432
|
+
[
|
|
433
|
+
blocks.heading("Lorem ipsum dolor sit amet", 2),
|
|
434
|
+
blocks.bulletList([
|
|
435
|
+
"Consectetur adipiscing elit.",
|
|
436
|
+
"Sed do eiusmod tempor incididunt.",
|
|
437
|
+
"Ut enim ad minim veniam.",
|
|
438
|
+
]),
|
|
439
|
+
],
|
|
440
|
+
{ padding: "md", gap: "sm", fill: true }
|
|
441
|
+
),
|
|
442
|
+
blocks.column(
|
|
443
|
+
[
|
|
444
|
+
blocks.imageBlock({
|
|
445
|
+
src: "https://placehold.co/480x360/png",
|
|
446
|
+
size: "fit",
|
|
447
|
+
}),
|
|
448
|
+
],
|
|
449
|
+
{
|
|
450
|
+
align: "center",
|
|
451
|
+
justify: "center",
|
|
452
|
+
padding: "md",
|
|
453
|
+
fill: true,
|
|
454
|
+
}
|
|
455
|
+
)
|
|
456
|
+
),
|
|
484
457
|
};
|
|
485
458
|
|
|
486
459
|
const accentLeft: PresetTemplate = {
|
|
@@ -489,28 +462,31 @@ const accentLeft: PresetTemplate = {
|
|
|
489
462
|
description: "Accent band with image on the left, text on the right",
|
|
490
463
|
icon: accentLeftIcon,
|
|
491
464
|
build: () =>
|
|
492
|
-
slide.twoCol(
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
align: "
|
|
506
|
-
}
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
465
|
+
slide.twoCol(
|
|
466
|
+
blocks.column(
|
|
467
|
+
[
|
|
468
|
+
blocks.imageBlock({
|
|
469
|
+
src: "https://placehold.co/320x240/png",
|
|
470
|
+
size: "fill",
|
|
471
|
+
crop: "center",
|
|
472
|
+
}),
|
|
473
|
+
],
|
|
474
|
+
{
|
|
475
|
+
backgroundColor: "#f1f5f9",
|
|
476
|
+
padding: "none",
|
|
477
|
+
fill: true,
|
|
478
|
+
align: "stretch",
|
|
479
|
+
}
|
|
480
|
+
),
|
|
481
|
+
blocks.column(
|
|
482
|
+
[
|
|
483
|
+
blocks.heading("Accent left", 3),
|
|
484
|
+
blocks.paragraph("Short supporting copy goes here."),
|
|
485
|
+
blocks.paragraph("Add one more line if needed."),
|
|
486
|
+
],
|
|
487
|
+
{ padding: "md", gap: "sm", fill: true, justify: "center" }
|
|
488
|
+
)
|
|
489
|
+
),
|
|
514
490
|
};
|
|
515
491
|
|
|
516
492
|
const accentRight: PresetTemplate = {
|
|
@@ -519,28 +495,31 @@ const accentRight: PresetTemplate = {
|
|
|
519
495
|
description: "Accent band with image on the right, text on the left",
|
|
520
496
|
icon: accentRightIcon,
|
|
521
497
|
build: () =>
|
|
522
|
-
slide.twoCol(
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
498
|
+
slide.twoCol(
|
|
499
|
+
blocks.column(
|
|
500
|
+
[
|
|
501
|
+
blocks.heading("Accent right", 3),
|
|
502
|
+
blocks.paragraph("Short supporting copy goes here."),
|
|
503
|
+
blocks.paragraph("Add one more line if needed."),
|
|
504
|
+
],
|
|
505
|
+
{ padding: "md", gap: "sm", fill: true, justify: "center" }
|
|
506
|
+
),
|
|
507
|
+
blocks.column(
|
|
508
|
+
[
|
|
509
|
+
blocks.imageBlock({
|
|
510
|
+
src: "https://placehold.co/320x240/png",
|
|
511
|
+
size: "fill",
|
|
512
|
+
crop: "center",
|
|
513
|
+
}),
|
|
514
|
+
],
|
|
515
|
+
{
|
|
516
|
+
backgroundColor: "#f1f5f9",
|
|
517
|
+
padding: "none",
|
|
518
|
+
fill: true,
|
|
519
|
+
align: "stretch",
|
|
520
|
+
}
|
|
521
|
+
)
|
|
522
|
+
),
|
|
544
523
|
};
|
|
545
524
|
|
|
546
525
|
const accentTop: PresetTemplate = {
|
|
@@ -551,39 +530,26 @@ const accentTop: PresetTemplate = {
|
|
|
551
530
|
build: () =>
|
|
552
531
|
({
|
|
553
532
|
type: "slide",
|
|
554
|
-
attrs: { id: "slide-1", size: "16x9"
|
|
533
|
+
attrs: { id: "slide-1", size: "16x9" },
|
|
555
534
|
content: [
|
|
556
535
|
{
|
|
557
|
-
type: "
|
|
558
|
-
attrs: {
|
|
536
|
+
type: "column",
|
|
537
|
+
attrs: { backgroundColor: "#f1f5f9", padding: "none", height: "200px", align: "stretch" },
|
|
559
538
|
content: [
|
|
560
|
-
{
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
src: "https://placehold.co/1200x400/png",
|
|
566
|
-
layout: "cover",
|
|
567
|
-
fullBleed: true,
|
|
568
|
-
align: "center",
|
|
569
|
-
}),
|
|
570
|
-
],
|
|
571
|
-
},
|
|
539
|
+
blocks.imageBlock({
|
|
540
|
+
src: "https://placehold.co/1200x400/png",
|
|
541
|
+
size: "fill",
|
|
542
|
+
crop: "center",
|
|
543
|
+
}),
|
|
572
544
|
],
|
|
573
545
|
},
|
|
574
546
|
{
|
|
575
|
-
type: "
|
|
576
|
-
attrs: {
|
|
547
|
+
type: "column",
|
|
548
|
+
attrs: { padding: "md", gap: "sm", fill: true, justify: "end" },
|
|
577
549
|
content: [
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
content: [
|
|
582
|
-
blocks.heading("Accent top", 3),
|
|
583
|
-
blocks.paragraph("Short supporting copy goes here."),
|
|
584
|
-
blocks.paragraph("Add one more line if needed."),
|
|
585
|
-
],
|
|
586
|
-
},
|
|
550
|
+
blocks.heading("Accent top", 3),
|
|
551
|
+
blocks.paragraph("Short supporting copy goes here."),
|
|
552
|
+
blocks.paragraph("Add one more line if needed."),
|
|
587
553
|
],
|
|
588
554
|
},
|
|
589
555
|
],
|
|
@@ -596,34 +562,35 @@ const accentRightFit: PresetTemplate = {
|
|
|
596
562
|
description: "Text with a tighter image card on the right",
|
|
597
563
|
icon: accentRightFitIcon,
|
|
598
564
|
build: () =>
|
|
599
|
-
slide.twoCol(
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
565
|
+
slide.twoCol(
|
|
566
|
+
blocks.column(
|
|
567
|
+
[
|
|
568
|
+
blocks.heading("Accent right (fit)", 3),
|
|
569
|
+
blocks.paragraph("Short supporting copy goes here."),
|
|
570
|
+
blocks.paragraph("Add one more line if needed."),
|
|
571
|
+
],
|
|
572
|
+
{ padding: "md", gap: "sm", fill: true, justify: "center" }
|
|
573
|
+
),
|
|
574
|
+
blocks.column(
|
|
575
|
+
[
|
|
576
|
+
blocks.column(
|
|
577
|
+
[
|
|
578
|
+
blocks.imageBlock({
|
|
579
|
+
src: "https://placehold.co/240x200/png",
|
|
580
|
+
size: "fit",
|
|
581
|
+
}),
|
|
582
|
+
],
|
|
583
|
+
{ backgroundColor: "#f1f5f9", padding: "md", gap: "sm", borderRadius: "lg", align: "center" }
|
|
584
|
+
),
|
|
585
|
+
],
|
|
613
586
|
{
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
align: "center",
|
|
622
|
-
}),
|
|
623
|
-
],
|
|
624
|
-
},
|
|
625
|
-
],
|
|
626
|
-
}),
|
|
587
|
+
padding: "md",
|
|
588
|
+
fill: true,
|
|
589
|
+
justify: "center",
|
|
590
|
+
align: "center",
|
|
591
|
+
}
|
|
592
|
+
)
|
|
593
|
+
),
|
|
627
594
|
};
|
|
628
595
|
|
|
629
596
|
const accentLeftFit: PresetTemplate = {
|
|
@@ -632,34 +599,35 @@ const accentLeftFit: PresetTemplate = {
|
|
|
632
599
|
description: "Compact image card on the left, text on the right",
|
|
633
600
|
icon: accentLeftFitIcon,
|
|
634
601
|
build: () =>
|
|
635
|
-
slide.twoCol(
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
602
|
+
slide.twoCol(
|
|
603
|
+
blocks.column(
|
|
604
|
+
[
|
|
605
|
+
blocks.column(
|
|
606
|
+
[
|
|
607
|
+
blocks.imageBlock({
|
|
608
|
+
src: "https://placehold.co/240x200/png",
|
|
609
|
+
size: "fit",
|
|
610
|
+
}),
|
|
611
|
+
],
|
|
612
|
+
{ backgroundColor: "#f1f5f9", padding: "md", gap: "sm", borderRadius: "lg", align: "center" }
|
|
613
|
+
),
|
|
614
|
+
],
|
|
644
615
|
{
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
blocks.paragraph("Add one more line if needed."),
|
|
661
|
-
],
|
|
662
|
-
}),
|
|
616
|
+
padding: "md",
|
|
617
|
+
fill: true,
|
|
618
|
+
justify: "center",
|
|
619
|
+
align: "center",
|
|
620
|
+
}
|
|
621
|
+
),
|
|
622
|
+
blocks.column(
|
|
623
|
+
[
|
|
624
|
+
blocks.heading("Accent left (fit)", 3),
|
|
625
|
+
blocks.paragraph("Short supporting copy goes here."),
|
|
626
|
+
blocks.paragraph("Add one more line if needed."),
|
|
627
|
+
],
|
|
628
|
+
{ padding: "md", gap: "sm", fill: true, justify: "center" }
|
|
629
|
+
)
|
|
630
|
+
),
|
|
663
631
|
};
|
|
664
632
|
|
|
665
633
|
const twoImageColumns: PresetTemplate = {
|
|
@@ -667,47 +635,37 @@ const twoImageColumns: PresetTemplate = {
|
|
|
667
635
|
label: "2 image columns",
|
|
668
636
|
description: "Header with two image cards",
|
|
669
637
|
icon: twoImageColumnsIcon,
|
|
670
|
-
build: () =>
|
|
671
|
-
slide
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
src: "https://placehold.co/640x360/png",
|
|
685
|
-
layout: "contain",
|
|
686
|
-
fullBleed: false,
|
|
687
|
-
align: "center",
|
|
688
|
-
}),
|
|
689
|
-
blocks.heading("Image title", 4),
|
|
690
|
-
blocks.paragraph("Short supporting copy goes here."),
|
|
691
|
-
],
|
|
692
|
-
},
|
|
693
|
-
{
|
|
694
|
-
type: "column",
|
|
695
|
-
attrs: { className: "p-4 gap-3 w-full box-border" },
|
|
696
|
-
content: [
|
|
697
|
-
blocks.imageBlock({
|
|
698
|
-
src: "https://placehold.co/640x360/png",
|
|
699
|
-
layout: "contain",
|
|
700
|
-
fullBleed: false,
|
|
701
|
-
align: "center",
|
|
702
|
-
}),
|
|
703
|
-
blocks.heading("Image title", 4),
|
|
704
|
-
blocks.paragraph("Short supporting copy goes here."),
|
|
705
|
-
],
|
|
706
|
-
},
|
|
638
|
+
build: () => ({
|
|
639
|
+
type: "slide",
|
|
640
|
+
attrs: { id: "slide-1", size: "16x9" },
|
|
641
|
+
content: [
|
|
642
|
+
blocks.heading("Images", 2),
|
|
643
|
+
blocks.columnGroup([
|
|
644
|
+
blocks.column(
|
|
645
|
+
[
|
|
646
|
+
blocks.imageBlock({
|
|
647
|
+
src: "https://placehold.co/640x360/png",
|
|
648
|
+
size: "fit",
|
|
649
|
+
}),
|
|
650
|
+
blocks.heading("Image title", 4),
|
|
651
|
+
blocks.paragraph("Short supporting copy goes here."),
|
|
707
652
|
],
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
653
|
+
{ padding: "md", gap: "sm", fill: true }
|
|
654
|
+
),
|
|
655
|
+
blocks.column(
|
|
656
|
+
[
|
|
657
|
+
blocks.imageBlock({
|
|
658
|
+
src: "https://placehold.co/640x360/png",
|
|
659
|
+
size: "fit",
|
|
660
|
+
}),
|
|
661
|
+
blocks.heading("Image title", 4),
|
|
662
|
+
blocks.paragraph("Short supporting copy goes here."),
|
|
663
|
+
],
|
|
664
|
+
{ padding: "md", gap: "sm", fill: true }
|
|
665
|
+
),
|
|
666
|
+
]),
|
|
667
|
+
],
|
|
668
|
+
}),
|
|
711
669
|
};
|
|
712
670
|
|
|
713
671
|
const registry: Record<PresetKey, PresetTemplate> = {
|