@slicemachine/adapter-nuxt 0.3.18-dev-next-release.6 → 0.3.18-dev-slice-templates-svelte-nuxt.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 (31) hide show
  1. package/dist/AlternateGrid/javascript.vue +228 -0
  2. package/dist/AlternateGrid/screenshot-default.png +0 -0
  3. package/dist/AlternateGrid/screenshot-imageRight.png +0 -0
  4. package/dist/AlternateGrid/typescript.vue +235 -0
  5. package/dist/CustomerLogos/javascript.vue +117 -0
  6. package/dist/CustomerLogos/screenshot-default.png +0 -0
  7. package/dist/CustomerLogos/typescript.vue +124 -0
  8. package/dist/plugin.cjs +4 -1
  9. package/dist/plugin.cjs.map +1 -1
  10. package/dist/plugin.js +4 -1
  11. package/dist/plugin.js.map +1 -1
  12. package/dist/sliceTemplates/AlternateGrid/index.cjs +436 -0
  13. package/dist/sliceTemplates/AlternateGrid/index.cjs.map +1 -0
  14. package/dist/sliceTemplates/AlternateGrid/index.d.ts +8 -0
  15. package/dist/sliceTemplates/AlternateGrid/index.js +436 -0
  16. package/dist/sliceTemplates/AlternateGrid/index.js.map +1 -0
  17. package/dist/sliceTemplates/CallToAction/index.cjs +264 -0
  18. package/dist/sliceTemplates/CallToAction/index.cjs.map +1 -0
  19. package/dist/sliceTemplates/CallToAction/index.d.ts +8 -0
  20. package/dist/sliceTemplates/CallToAction/index.js +264 -0
  21. package/dist/sliceTemplates/CallToAction/index.js.map +1 -0
  22. package/dist/sliceTemplates/CustomerLogos/index.cjs +314 -0
  23. package/dist/sliceTemplates/CustomerLogos/index.cjs.map +1 -0
  24. package/dist/sliceTemplates/CustomerLogos/index.d.ts +7 -0
  25. package/dist/sliceTemplates/CustomerLogos/index.js +314 -0
  26. package/dist/sliceTemplates/CustomerLogos/index.js.map +1 -0
  27. package/package.json +3 -3
  28. package/src/plugin.ts +4 -1
  29. package/src/sliceTemplates/AlternateGrid/index.ts +441 -0
  30. package/src/sliceTemplates/CallToAction/index.ts +265 -0
  31. package/src/sliceTemplates/CustomerLogos/index.ts +313 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@slicemachine/adapter-nuxt",
3
- "version": "0.3.18-dev-next-release.6",
3
+ "version": "0.3.18-dev-slice-templates-svelte-nuxt.0",
4
4
  "description": "Slice Machine adapter for Nuxt 3.",
5
5
  "keywords": [
6
6
  "typescript",
@@ -61,7 +61,7 @@
61
61
  "dependencies": {
62
62
  "@prismicio/simulator": "^0.1.4",
63
63
  "@prismicio/types-internal": "^2.0.0",
64
- "@slicemachine/plugin-kit": "^0.4.18-dev-next-release.6",
64
+ "@slicemachine/plugin-kit": "^0.4.18-dev-slice-templates-svelte-nuxt.0",
65
65
  "common-tags": "^1.8.2",
66
66
  "fp-ts": "^2.13.1",
67
67
  "io-ts": "^2.2.20",
@@ -103,5 +103,5 @@
103
103
  "engines": {
104
104
  "node": ">=14.15.0"
105
105
  },
106
- "gitHead": "2dc0119b3dc5aaea1cababd8dc63f074c79ed592"
106
+ "gitHead": "f605a87ec7467b4dd4313abdce3c9bfbc27a7e75"
107
107
  }
package/src/plugin.ts CHANGED
@@ -36,6 +36,9 @@ import { sliceSimulatorSetupRead } from "./hooks/sliceSimulator-setup-read";
36
36
  import { snippetRead } from "./hooks/snippet-read";
37
37
 
38
38
  import * as Hero from "./sliceTemplates/Hero";
39
+ import * as CallToAction from "./sliceTemplates/CallToAction";
40
+ import * as AlternateGrid from "./sliceTemplates/AlternateGrid";
41
+ import * as CustomerLogos from "./sliceTemplates/CustomerLogos";
39
42
 
40
43
  export const plugin = defineSliceMachinePlugin<PluginOptions>({
41
44
  meta: {
@@ -170,7 +173,7 @@ export const plugin = defineSliceMachinePlugin<PluginOptions>({
170
173
  ...data,
171
174
  ...context,
172
175
  dirName: path.dirname(fileURLToPath(new URL(import.meta.url))),
173
- templates: [Hero],
176
+ templates: [Hero, CustomerLogos, AlternateGrid, CallToAction],
174
177
  componentFileNames: {
175
178
  js: "javascript.vue",
176
179
  ts: "typescript.vue",
@@ -0,0 +1,441 @@
1
+ import { SharedSliceContent } from "@prismicio/types-internal/lib/content";
2
+ import { SharedSlice } from "@prismicio/types-internal/lib/customtypes";
3
+
4
+ export const screenshotPaths = {
5
+ default: "AlternateGrid/screenshot-default.png",
6
+ imageRight: "AlternateGrid/screenshot-imageRight.png",
7
+ };
8
+
9
+ export const mocks: SharedSliceContent[] = [
10
+ {
11
+ __TYPE__: "SharedSliceContent",
12
+ variation: "default",
13
+ primary: {
14
+ title: {
15
+ __TYPE__: "StructuredTextContent",
16
+ value: [
17
+ {
18
+ type: "heading1",
19
+ content: {
20
+ text: "Alternate like a star",
21
+ spans: [],
22
+ },
23
+ direction: "ltr",
24
+ },
25
+ ],
26
+ },
27
+ description: {
28
+ __TYPE__: "StructuredTextContent",
29
+ value: [
30
+ {
31
+ type: "paragraph",
32
+ content: {
33
+ text: "A predesigned AlternateGrid component, that you can use to list your skills or features of a product.",
34
+ spans: [
35
+ {
36
+ type: "strong",
37
+ start: 44,
38
+ end: 47,
39
+ },
40
+ ],
41
+ },
42
+ direction: "ltr",
43
+ },
44
+ ],
45
+ },
46
+ eyebrowHeadline: {
47
+ __TYPE__: "FieldContent",
48
+ type: "Text",
49
+ value: "Eyebrow",
50
+ },
51
+ image: {
52
+ origin: {
53
+ id: "main",
54
+ url: "https://images.unsplash.com/photo-1486312338219-ce68d2c6f44d",
55
+ width: 4076,
56
+ height: 2712,
57
+ },
58
+ url: "https://images.unsplash.com/photo-1486312338219-ce68d2c6f44d",
59
+ width: 4076,
60
+ height: 2712,
61
+ edit: {
62
+ zoom: 1,
63
+ crop: {
64
+ x: 0,
65
+ y: 0,
66
+ },
67
+ background: "transparent",
68
+ },
69
+ credits: null,
70
+ alt: "Image of computer",
71
+ __TYPE__: "ImageContent",
72
+ thumbnails: {},
73
+ },
74
+ },
75
+ items: [
76
+ {
77
+ __TYPE__: "GroupItemContent",
78
+ value: [
79
+ [
80
+ "title",
81
+ {
82
+ __TYPE__: "StructuredTextContent",
83
+ value: [
84
+ {
85
+ type: "heading3",
86
+ content: {
87
+ text: "Integrate with the SliceZone",
88
+ spans: [],
89
+ },
90
+ direction: "ltr",
91
+ },
92
+ ],
93
+ },
94
+ ],
95
+ [
96
+ "description",
97
+ {
98
+ __TYPE__: "StructuredTextContent",
99
+ value: [
100
+ {
101
+ type: "paragraph",
102
+ content: {
103
+ text: "This component has been matched by the SliceZone. Its model has been fetched from SliceMachine next-adapter!",
104
+ spans: [],
105
+ },
106
+ direction: "ltr",
107
+ },
108
+ ],
109
+ },
110
+ ],
111
+ ],
112
+ },
113
+ {
114
+ __TYPE__: "GroupItemContent",
115
+ value: [
116
+ [
117
+ "title",
118
+ {
119
+ __TYPE__: "StructuredTextContent",
120
+ value: [
121
+ {
122
+ type: "heading3",
123
+ content: {
124
+ text: "Create your own",
125
+ spans: [],
126
+ },
127
+ direction: "ltr",
128
+ },
129
+ ],
130
+ },
131
+ ],
132
+ [
133
+ "description",
134
+ {
135
+ __TYPE__: "StructuredTextContent",
136
+ value: [
137
+ {
138
+ type: "paragraph",
139
+ content: {
140
+ text: "Feel free to use this component fully, or use it as an example! We're adding templates as often as we can.",
141
+ spans: [],
142
+ },
143
+ direction: "ltr",
144
+ },
145
+ ],
146
+ },
147
+ ],
148
+ ],
149
+ },
150
+ {
151
+ __TYPE__: "GroupItemContent",
152
+ value: [
153
+ [
154
+ "title",
155
+ {
156
+ __TYPE__: "StructuredTextContent",
157
+ value: [
158
+ {
159
+ type: "heading3",
160
+ content: {
161
+ text: "Add a variation",
162
+ spans: [],
163
+ },
164
+ direction: "ltr",
165
+ },
166
+ ],
167
+ },
168
+ ],
169
+ [
170
+ "description",
171
+ {
172
+ __TYPE__: "StructuredTextContent",
173
+ value: [
174
+ {
175
+ type: "paragraph",
176
+ content: {
177
+ text: 'This slice comes with a "Image Right" variation, which means editors can switch text/image direction!',
178
+ spans: [],
179
+ },
180
+ direction: "ltr",
181
+ },
182
+ ],
183
+ },
184
+ ],
185
+ ],
186
+ },
187
+ ],
188
+ },
189
+ {
190
+ __TYPE__: "SharedSliceContent",
191
+ variation: "imageRight",
192
+ primary: {
193
+ eyebrowHeadline: {
194
+ __TYPE__: "FieldContent",
195
+ value: "activity",
196
+ type: "Text",
197
+ },
198
+ title: {
199
+ __TYPE__: "StructuredTextContent",
200
+ value: [
201
+ {
202
+ type: "heading1",
203
+ content: {
204
+ text: "Alternate like a star",
205
+ spans: [],
206
+ },
207
+ direction: "ltr",
208
+ },
209
+ ],
210
+ },
211
+ description: {
212
+ __TYPE__: "StructuredTextContent",
213
+ value: [
214
+ {
215
+ type: "paragraph",
216
+ content: {
217
+ text: "A predesigned AlternateGrid component, that you can use to list your skills or features of a product.",
218
+ spans: [
219
+ {
220
+ type: "strong",
221
+ start: 44,
222
+ end: 47,
223
+ },
224
+ ],
225
+ },
226
+ direction: "ltr",
227
+ },
228
+ ],
229
+ },
230
+ image: {
231
+ origin: {
232
+ id: "main",
233
+ url: "https://images.unsplash.com/photo-1499951360447-b19be8fe80f5",
234
+ width: 5848,
235
+ height: 3899,
236
+ },
237
+ url: "https://images.unsplash.com/photo-1499951360447-b19be8fe80f5",
238
+ width: 5848,
239
+ height: 3899,
240
+ edit: {
241
+ zoom: 1,
242
+ crop: {
243
+ x: 0,
244
+ y: 0,
245
+ },
246
+ background: "transparent",
247
+ },
248
+ credits: null,
249
+ alt: "Image of computer",
250
+ __TYPE__: "ImageContent",
251
+ thumbnails: {},
252
+ },
253
+ },
254
+ items: [
255
+ {
256
+ __TYPE__: "GroupItemContent",
257
+ value: [
258
+ [
259
+ "title",
260
+ {
261
+ __TYPE__: "StructuredTextContent",
262
+ value: [
263
+ {
264
+ type: "heading3",
265
+ content: {
266
+ text: "Create a unique, high-performing site",
267
+ spans: [
268
+ {
269
+ type: "strong",
270
+ start: 9,
271
+ end: 15,
272
+ },
273
+ ],
274
+ },
275
+ direction: "ltr",
276
+ },
277
+ ],
278
+ },
279
+ ],
280
+ [
281
+ "description",
282
+ {
283
+ __TYPE__: "StructuredTextContent",
284
+ value: [
285
+ {
286
+ type: "paragraph",
287
+ content: {
288
+ text: "Prismic is the headless website builder designed to help developers and marketers create unique, high-performing websites that are easy to edit.",
289
+ spans: [],
290
+ },
291
+ direction: "ltr",
292
+ },
293
+ ],
294
+ },
295
+ ],
296
+ ],
297
+ },
298
+ ],
299
+ },
300
+ ];
301
+
302
+ export const model: SharedSlice = {
303
+ id: "alternate_grid",
304
+ type: "SharedSlice",
305
+ name: "AlternateGrid",
306
+ description: "AlternateGrid",
307
+ variations: [
308
+ {
309
+ id: "default",
310
+ name: "Default",
311
+ docURL: "...",
312
+ version: "initial",
313
+ description: "Default",
314
+ imageUrl: "",
315
+ primary: {
316
+ eyebrowHeadline: {
317
+ type: "Text",
318
+ config: {
319
+ label: "eyebrowHeadline",
320
+ placeholder: "Eyebrow",
321
+ },
322
+ },
323
+ title: {
324
+ type: "StructuredText",
325
+ config: {
326
+ label: "title",
327
+ placeholder: "",
328
+ allowTargetBlank: true,
329
+ single:
330
+ "heading1,heading2,heading3,heading4,heading5,heading6,strong,em",
331
+ },
332
+ },
333
+ description: {
334
+ type: "StructuredText",
335
+ config: {
336
+ label: "description",
337
+ placeholder: "",
338
+ allowTargetBlank: true,
339
+ multi:
340
+ "paragraph,preformatted,hyperlink,embed,rtl,strong,em,list-item,o-list-item",
341
+ },
342
+ },
343
+ image: {
344
+ type: "Image",
345
+ config: {
346
+ label: "image",
347
+ constraint: {},
348
+ thumbnails: [],
349
+ },
350
+ },
351
+ },
352
+ items: {
353
+ title: {
354
+ type: "StructuredText",
355
+ config: {
356
+ label: "title",
357
+ placeholder: "",
358
+ allowTargetBlank: true,
359
+ single: "heading2,heading3,heading4,heading5,heading6,strong,em",
360
+ },
361
+ },
362
+ description: {
363
+ type: "StructuredText",
364
+ config: {
365
+ label: "description",
366
+ placeholder: "",
367
+ allowTargetBlank: true,
368
+ multi:
369
+ "paragraph,preformatted,hyperlink,strong,em,list-item,o-list-item,rtl",
370
+ },
371
+ },
372
+ },
373
+ },
374
+ {
375
+ id: "imageRight",
376
+ name: "Image Right",
377
+ docURL: "...",
378
+ version: "initial",
379
+ description: "Default",
380
+ imageUrl: "",
381
+ primary: {
382
+ eyebrowHeadline: {
383
+ type: "Text",
384
+ config: {
385
+ label: "eyebrowHeadline",
386
+ placeholder: "Eyebrow",
387
+ },
388
+ },
389
+ title: {
390
+ type: "StructuredText",
391
+ config: {
392
+ label: "title",
393
+ placeholder: "",
394
+ allowTargetBlank: true,
395
+ single:
396
+ "heading1,heading2,heading3,heading4,heading5,heading6,strong,em",
397
+ },
398
+ },
399
+ description: {
400
+ type: "StructuredText",
401
+ config: {
402
+ label: "description",
403
+ placeholder: "",
404
+ allowTargetBlank: true,
405
+ multi:
406
+ "paragraph,preformatted,hyperlink,embed,rtl,strong,em,list-item,o-list-item",
407
+ },
408
+ },
409
+ image: {
410
+ type: "Image",
411
+ config: {
412
+ label: "image",
413
+ constraint: {},
414
+ thumbnails: [],
415
+ },
416
+ },
417
+ },
418
+ items: {
419
+ title: {
420
+ type: "StructuredText",
421
+ config: {
422
+ label: "title",
423
+ placeholder: "",
424
+ allowTargetBlank: true,
425
+ single: "heading2,heading3,heading4,heading5,heading6,strong,em",
426
+ },
427
+ },
428
+ description: {
429
+ type: "StructuredText",
430
+ config: {
431
+ label: "description",
432
+ placeholder: "",
433
+ allowTargetBlank: true,
434
+ multi:
435
+ "paragraph,preformatted,hyperlink,strong,em,list-item,o-list-item,rtl",
436
+ },
437
+ },
438
+ },
439
+ },
440
+ ],
441
+ };