@contentrain/astro-kit 0.1.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/README.md +89 -0
- package/catalog.json +1780 -0
- package/components/_shared/Button.astro +37 -0
- package/components/_shared/KitImage.astro +21 -0
- package/components/_shared/Section.astro +43 -0
- package/components/_shared/types.ts +26 -0
- package/components/breadcrumb/Breadcrumb.astro +56 -0
- package/components/breadcrumb/fixtures.json +5 -0
- package/components/breadcrumb/meta.json +27 -0
- package/components/card-grid/CardGrid.astro +82 -0
- package/components/card-grid/fixtures.json +6 -0
- package/components/card-grid/meta.json +123 -0
- package/components/contact-form/ContactForm.astro +79 -0
- package/components/contact-form/fixtures.json +18 -0
- package/components/contact-form/meta.json +28 -0
- package/components/cta/Cta.astro +64 -0
- package/components/cta/fixtures.json +6 -0
- package/components/cta/meta.json +28 -0
- package/components/faq/Faq.astro +79 -0
- package/components/faq/fixtures.json +36 -0
- package/components/faq/meta.json +30 -0
- package/components/footer/Footer.astro +87 -0
- package/components/footer/fixtures.json +5 -0
- package/components/footer/meta.json +31 -0
- package/components/gallery/Gallery.astro +88 -0
- package/components/gallery/fixtures.json +191 -0
- package/components/gallery/meta.json +30 -0
- package/components/header/Header.astro +62 -0
- package/components/header/fixtures.json +125 -0
- package/components/header/meta.json +34 -0
- package/components/hero/Hero.astro +84 -0
- package/components/hero/fixtures.json +95 -0
- package/components/hero/meta.json +127 -0
- package/components/nav/Nav.astro +102 -0
- package/components/nav/fixtures.json +80 -0
- package/components/nav/meta.json +30 -0
- package/components/pagination/Pagination.astro +69 -0
- package/components/pagination/fixtures.json +6 -0
- package/components/pagination/meta.json +31 -0
- package/components/post-card/PostCard.astro +67 -0
- package/components/post-card/fixtures.json +54 -0
- package/components/post-card/meta.json +32 -0
- package/components/prose/Prose.astro +30 -0
- package/components/prose/fixtures.json +4 -0
- package/components/prose/meta.json +69 -0
- package/components/slider/Slider.astro +136 -0
- package/components/slider/fixtures.json +5 -0
- package/components/slider/meta.json +32 -0
- package/components/tabs/Tabs.astro +101 -0
- package/components/tabs/fixtures.json +37 -0
- package/components/tabs/meta.json +28 -0
- package/components/testimonial/Testimonial.astro +70 -0
- package/components/testimonial/fixtures.json +26 -0
- package/components/testimonial/meta.json +97 -0
- package/dist/index.d.mts +150 -0
- package/dist/index.d.mts.map +1 -0
- package/dist/index.mjs +199 -0
- package/dist/index.mjs.map +1 -0
- package/mapping/classic.json +261 -0
- package/mapping/divi.json +295 -0
- package/mapping/elementor.json +322 -0
- package/mapping/gutenberg.json +395 -0
- package/package.json +63 -0
|
@@ -0,0 +1,395 @@
|
|
|
1
|
+
{
|
|
2
|
+
"format": "astro-kit-mapping@1",
|
|
3
|
+
"builder": "gutenberg",
|
|
4
|
+
"version": "3",
|
|
5
|
+
"fallback": "prose",
|
|
6
|
+
"rules": [
|
|
7
|
+
{
|
|
8
|
+
"match": "core/template-part:header",
|
|
9
|
+
"component": "header",
|
|
10
|
+
"props": {
|
|
11
|
+
"siteName": "site:title",
|
|
12
|
+
"logo": "site:logo",
|
|
13
|
+
"items": "menu:primary",
|
|
14
|
+
"navLabel": "ui:nav.label",
|
|
15
|
+
"menuLabel": "ui:nav.menu",
|
|
16
|
+
"closeLabel": "ui:nav.close"
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
"match": "core/site-title",
|
|
21
|
+
"component": "header",
|
|
22
|
+
"props": {
|
|
23
|
+
"siteName": "site:title",
|
|
24
|
+
"logo": "site:logo",
|
|
25
|
+
"items": "menu:primary",
|
|
26
|
+
"navLabel": "ui:nav.label",
|
|
27
|
+
"menuLabel": "ui:nav.menu",
|
|
28
|
+
"closeLabel": "ui:nav.close"
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
"match": "core/site-logo",
|
|
33
|
+
"component": "header",
|
|
34
|
+
"props": {
|
|
35
|
+
"siteName": "site:title",
|
|
36
|
+
"logo": "site:logo",
|
|
37
|
+
"items": "menu:primary",
|
|
38
|
+
"navLabel": "ui:nav.label",
|
|
39
|
+
"menuLabel": "ui:nav.menu",
|
|
40
|
+
"closeLabel": "ui:nav.close"
|
|
41
|
+
}
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
"match": "core/navigation",
|
|
45
|
+
"component": "nav",
|
|
46
|
+
"props": {
|
|
47
|
+
"items": "menu:primary",
|
|
48
|
+
"label": "ui:nav.label",
|
|
49
|
+
"menuLabel": "ui:nav.menu",
|
|
50
|
+
"closeLabel": "ui:nav.close"
|
|
51
|
+
}
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
"match": "core/page-list",
|
|
55
|
+
"component": "nav",
|
|
56
|
+
"props": {
|
|
57
|
+
"items": "menu:primary",
|
|
58
|
+
"label": "ui:nav.label",
|
|
59
|
+
"menuLabel": "ui:nav.menu",
|
|
60
|
+
"closeLabel": "ui:nav.close"
|
|
61
|
+
}
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
"match": "core/template-part:footer",
|
|
65
|
+
"component": "footer",
|
|
66
|
+
"props": {
|
|
67
|
+
"siteName": "site:title",
|
|
68
|
+
"tagline": "site:description",
|
|
69
|
+
"links": "menu:footer",
|
|
70
|
+
"copyright": "ui:footer.copyright",
|
|
71
|
+
"navLabel": "ui:footer.nav"
|
|
72
|
+
}
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
"match": "core/social-links",
|
|
76
|
+
"component": "footer",
|
|
77
|
+
"props": {
|
|
78
|
+
"siteName": "site:title"
|
|
79
|
+
},
|
|
80
|
+
"into": "social",
|
|
81
|
+
"each": ".wp-block-social-link",
|
|
82
|
+
"item": {
|
|
83
|
+
"label": "dom:.wp-block-social-link-label",
|
|
84
|
+
"href": "dom:a@href"
|
|
85
|
+
}
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
"match": "core/columns",
|
|
89
|
+
"component": "card-grid",
|
|
90
|
+
"variant": {
|
|
91
|
+
"style": "plain"
|
|
92
|
+
},
|
|
93
|
+
"into": "items",
|
|
94
|
+
"each": ".wp-block-column",
|
|
95
|
+
"item": {
|
|
96
|
+
"title": "dom:h2,h3,h4",
|
|
97
|
+
"text": "dom:p",
|
|
98
|
+
"href": "dom:a@href",
|
|
99
|
+
"image": "img:img"
|
|
100
|
+
}
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
"match": "core/media-text",
|
|
104
|
+
"component": "hero",
|
|
105
|
+
"variant": {
|
|
106
|
+
"layout": "split"
|
|
107
|
+
},
|
|
108
|
+
"props": {
|
|
109
|
+
"heading": "dom:h1,h2,h3",
|
|
110
|
+
"lead": "dom:p",
|
|
111
|
+
"image": "img:.wp-block-media-text__media img"
|
|
112
|
+
},
|
|
113
|
+
"into": "actions",
|
|
114
|
+
"each": ".wp-block-button__link",
|
|
115
|
+
"item": {
|
|
116
|
+
"label": "dom:",
|
|
117
|
+
"href": "dom:@href"
|
|
118
|
+
}
|
|
119
|
+
},
|
|
120
|
+
{
|
|
121
|
+
"match": "core/query",
|
|
122
|
+
"component": "post-card",
|
|
123
|
+
"bind": "collection:posts",
|
|
124
|
+
"item": {
|
|
125
|
+
"title": "field:title",
|
|
126
|
+
"href": "href:self",
|
|
127
|
+
"excerpt": "field:excerpt",
|
|
128
|
+
"date": "field:date",
|
|
129
|
+
"image": "media:featured_image",
|
|
130
|
+
"author": "ref:author.name",
|
|
131
|
+
"category": "term:categories"
|
|
132
|
+
}
|
|
133
|
+
},
|
|
134
|
+
{
|
|
135
|
+
"match": "core/post-template",
|
|
136
|
+
"component": "post-card",
|
|
137
|
+
"bind": "collection:posts",
|
|
138
|
+
"item": {
|
|
139
|
+
"title": "field:title",
|
|
140
|
+
"href": "href:self",
|
|
141
|
+
"excerpt": "field:excerpt",
|
|
142
|
+
"date": "field:date",
|
|
143
|
+
"image": "media:featured_image",
|
|
144
|
+
"author": "ref:author.name",
|
|
145
|
+
"category": "term:categories"
|
|
146
|
+
}
|
|
147
|
+
},
|
|
148
|
+
{
|
|
149
|
+
"match": "core/latest-posts",
|
|
150
|
+
"component": "post-card",
|
|
151
|
+
"bind": "collection:posts",
|
|
152
|
+
"item": {
|
|
153
|
+
"title": "field:title",
|
|
154
|
+
"href": "href:self",
|
|
155
|
+
"excerpt": "field:excerpt",
|
|
156
|
+
"date": "field:date",
|
|
157
|
+
"image": "media:featured_image",
|
|
158
|
+
"author": "ref:author.name",
|
|
159
|
+
"category": "term:categories"
|
|
160
|
+
}
|
|
161
|
+
},
|
|
162
|
+
{
|
|
163
|
+
"match": "core/query-pagination",
|
|
164
|
+
"component": "pagination",
|
|
165
|
+
"props": {
|
|
166
|
+
"base": "page:base",
|
|
167
|
+
"current": "page:current",
|
|
168
|
+
"total": "page:total",
|
|
169
|
+
"label": "ui:pagination.label",
|
|
170
|
+
"prevLabel": "ui:pagination.prev",
|
|
171
|
+
"nextLabel": "ui:pagination.next",
|
|
172
|
+
"pageLabel": "ui:pagination.page"
|
|
173
|
+
}
|
|
174
|
+
},
|
|
175
|
+
{
|
|
176
|
+
"match": "yoast-seo/breadcrumbs",
|
|
177
|
+
"component": "breadcrumb",
|
|
178
|
+
"props": {
|
|
179
|
+
"items": "page:breadcrumb",
|
|
180
|
+
"current": "field:title",
|
|
181
|
+
"label": "ui:breadcrumb.label"
|
|
182
|
+
}
|
|
183
|
+
},
|
|
184
|
+
{
|
|
185
|
+
"match": "rank-math/breadcrumb",
|
|
186
|
+
"component": "breadcrumb",
|
|
187
|
+
"props": {
|
|
188
|
+
"items": "page:breadcrumb",
|
|
189
|
+
"current": "field:title",
|
|
190
|
+
"label": "ui:breadcrumb.label"
|
|
191
|
+
}
|
|
192
|
+
},
|
|
193
|
+
{
|
|
194
|
+
"match": "core/gallery:carousel",
|
|
195
|
+
"component": "slider",
|
|
196
|
+
"when": {
|
|
197
|
+
"class": "is-style-carousel"
|
|
198
|
+
},
|
|
199
|
+
"props": {
|
|
200
|
+
"label": "ui:slider.label",
|
|
201
|
+
"prevLabel": "ui:slider.prev",
|
|
202
|
+
"nextLabel": "ui:slider.next",
|
|
203
|
+
"slideLabel": "ui:slider.slide",
|
|
204
|
+
"ofLabel": "ui:slider.of"
|
|
205
|
+
},
|
|
206
|
+
"into": "slides",
|
|
207
|
+
"each": "figure.wp-block-image",
|
|
208
|
+
"item": {
|
|
209
|
+
"image": "img:img",
|
|
210
|
+
"text": "dom:figcaption"
|
|
211
|
+
}
|
|
212
|
+
},
|
|
213
|
+
{
|
|
214
|
+
"match": "core/cover",
|
|
215
|
+
"component": "hero",
|
|
216
|
+
"variant": {
|
|
217
|
+
"layout": "cover"
|
|
218
|
+
},
|
|
219
|
+
"props": {
|
|
220
|
+
"heading": "dom:h1,h2",
|
|
221
|
+
"lead": "dom:p",
|
|
222
|
+
"image": "img:.wp-block-cover__image-background,img"
|
|
223
|
+
},
|
|
224
|
+
"into": "actions",
|
|
225
|
+
"each": ".wp-block-button__link",
|
|
226
|
+
"item": {
|
|
227
|
+
"label": "dom:",
|
|
228
|
+
"href": "dom:@href"
|
|
229
|
+
}
|
|
230
|
+
},
|
|
231
|
+
{
|
|
232
|
+
"match": "core/details",
|
|
233
|
+
"component": "faq",
|
|
234
|
+
"group": "siblings",
|
|
235
|
+
"into": "items",
|
|
236
|
+
"item": {
|
|
237
|
+
"question": "dom:summary",
|
|
238
|
+
"answer": "html::scope > :not(summary)"
|
|
239
|
+
}
|
|
240
|
+
},
|
|
241
|
+
{
|
|
242
|
+
"match": "core/gallery",
|
|
243
|
+
"component": "gallery",
|
|
244
|
+
"props": {
|
|
245
|
+
"closeLabel": "ui:gallery.close"
|
|
246
|
+
},
|
|
247
|
+
"into": "items",
|
|
248
|
+
"each": "figure.wp-block-image",
|
|
249
|
+
"item": {
|
|
250
|
+
"image": "img:img",
|
|
251
|
+
"caption": "dom:figcaption"
|
|
252
|
+
}
|
|
253
|
+
},
|
|
254
|
+
{
|
|
255
|
+
"match": "core/paragraph",
|
|
256
|
+
"component": "prose",
|
|
257
|
+
"props": {
|
|
258
|
+
"html": "html:"
|
|
259
|
+
}
|
|
260
|
+
},
|
|
261
|
+
{
|
|
262
|
+
"match": "core/heading",
|
|
263
|
+
"component": "prose",
|
|
264
|
+
"props": {
|
|
265
|
+
"html": "html:"
|
|
266
|
+
}
|
|
267
|
+
},
|
|
268
|
+
{
|
|
269
|
+
"match": "core/list",
|
|
270
|
+
"component": "prose",
|
|
271
|
+
"props": {
|
|
272
|
+
"html": "html:"
|
|
273
|
+
}
|
|
274
|
+
},
|
|
275
|
+
{
|
|
276
|
+
"match": "core/list-item",
|
|
277
|
+
"component": "prose",
|
|
278
|
+
"props": {
|
|
279
|
+
"html": "html:"
|
|
280
|
+
}
|
|
281
|
+
},
|
|
282
|
+
{
|
|
283
|
+
"match": "core/quote",
|
|
284
|
+
"component": "prose",
|
|
285
|
+
"props": {
|
|
286
|
+
"html": "html:"
|
|
287
|
+
}
|
|
288
|
+
},
|
|
289
|
+
{
|
|
290
|
+
"match": "core/pullquote",
|
|
291
|
+
"component": "prose",
|
|
292
|
+
"props": {
|
|
293
|
+
"html": "html:"
|
|
294
|
+
}
|
|
295
|
+
},
|
|
296
|
+
{
|
|
297
|
+
"match": "core/image",
|
|
298
|
+
"component": "prose",
|
|
299
|
+
"props": {
|
|
300
|
+
"html": "html:"
|
|
301
|
+
}
|
|
302
|
+
},
|
|
303
|
+
{
|
|
304
|
+
"match": "core/table",
|
|
305
|
+
"component": "prose",
|
|
306
|
+
"props": {
|
|
307
|
+
"html": "html:"
|
|
308
|
+
}
|
|
309
|
+
},
|
|
310
|
+
{
|
|
311
|
+
"match": "core/code",
|
|
312
|
+
"component": "prose",
|
|
313
|
+
"props": {
|
|
314
|
+
"html": "html:"
|
|
315
|
+
}
|
|
316
|
+
},
|
|
317
|
+
{
|
|
318
|
+
"match": "core/preformatted",
|
|
319
|
+
"component": "prose",
|
|
320
|
+
"props": {
|
|
321
|
+
"html": "html:"
|
|
322
|
+
}
|
|
323
|
+
},
|
|
324
|
+
{
|
|
325
|
+
"match": "core/verse",
|
|
326
|
+
"component": "prose",
|
|
327
|
+
"props": {
|
|
328
|
+
"html": "html:"
|
|
329
|
+
}
|
|
330
|
+
},
|
|
331
|
+
{
|
|
332
|
+
"match": "core/separator",
|
|
333
|
+
"component": "prose",
|
|
334
|
+
"props": {
|
|
335
|
+
"html": "html:"
|
|
336
|
+
}
|
|
337
|
+
},
|
|
338
|
+
{
|
|
339
|
+
"match": "core/spacer",
|
|
340
|
+
"component": "prose",
|
|
341
|
+
"props": {
|
|
342
|
+
"html": "html:"
|
|
343
|
+
}
|
|
344
|
+
},
|
|
345
|
+
{
|
|
346
|
+
"match": "core/embed",
|
|
347
|
+
"component": "prose",
|
|
348
|
+
"props": {
|
|
349
|
+
"html": "html:"
|
|
350
|
+
}
|
|
351
|
+
},
|
|
352
|
+
{
|
|
353
|
+
"match": "core/video",
|
|
354
|
+
"component": "prose",
|
|
355
|
+
"props": {
|
|
356
|
+
"html": "html:"
|
|
357
|
+
}
|
|
358
|
+
},
|
|
359
|
+
{
|
|
360
|
+
"match": "core/audio",
|
|
361
|
+
"component": "prose",
|
|
362
|
+
"props": {
|
|
363
|
+
"html": "html:"
|
|
364
|
+
}
|
|
365
|
+
},
|
|
366
|
+
{
|
|
367
|
+
"match": "core/file",
|
|
368
|
+
"component": "prose",
|
|
369
|
+
"props": {
|
|
370
|
+
"html": "html:"
|
|
371
|
+
}
|
|
372
|
+
},
|
|
373
|
+
{
|
|
374
|
+
"match": "core/html",
|
|
375
|
+
"component": "prose",
|
|
376
|
+
"props": {
|
|
377
|
+
"html": "html:"
|
|
378
|
+
}
|
|
379
|
+
},
|
|
380
|
+
{
|
|
381
|
+
"match": "core/freeform",
|
|
382
|
+
"component": "prose",
|
|
383
|
+
"props": {
|
|
384
|
+
"html": "html:"
|
|
385
|
+
}
|
|
386
|
+
},
|
|
387
|
+
{
|
|
388
|
+
"match": "core/post-content",
|
|
389
|
+
"component": "prose",
|
|
390
|
+
"props": {
|
|
391
|
+
"html": "html:"
|
|
392
|
+
}
|
|
393
|
+
}
|
|
394
|
+
]
|
|
395
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@contentrain/astro-kit",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"license": "MIT",
|
|
5
|
+
"description": "Copy-in Astro components for Contentrain sites (shadcn model): typed props, tailwind-variants, zero JavaScript by default — with a machine-readable catalog",
|
|
6
|
+
"type": "module",
|
|
7
|
+
"repository": {
|
|
8
|
+
"type": "git",
|
|
9
|
+
"url": "git+https://github.com/Contentrain/ai.git",
|
|
10
|
+
"directory": "packages/astro-kit"
|
|
11
|
+
},
|
|
12
|
+
"homepage": "https://ai.contentrain.io",
|
|
13
|
+
"bugs": {
|
|
14
|
+
"url": "https://github.com/Contentrain/ai/issues"
|
|
15
|
+
},
|
|
16
|
+
"keywords": [
|
|
17
|
+
"contentrain",
|
|
18
|
+
"astro",
|
|
19
|
+
"components",
|
|
20
|
+
"tailwindcss",
|
|
21
|
+
"copy-in",
|
|
22
|
+
"migration",
|
|
23
|
+
"wordpress"
|
|
24
|
+
],
|
|
25
|
+
"sideEffects": false,
|
|
26
|
+
"publishConfig": {
|
|
27
|
+
"access": "public"
|
|
28
|
+
},
|
|
29
|
+
"exports": {
|
|
30
|
+
".": {
|
|
31
|
+
"types": "./dist/index.d.mts",
|
|
32
|
+
"import": "./dist/index.mjs"
|
|
33
|
+
},
|
|
34
|
+
"./catalog.json": "./catalog.json"
|
|
35
|
+
},
|
|
36
|
+
"main": "./dist/index.mjs",
|
|
37
|
+
"types": "./dist/index.d.mts",
|
|
38
|
+
"files": [
|
|
39
|
+
"dist",
|
|
40
|
+
"components",
|
|
41
|
+
"catalog.json",
|
|
42
|
+
"mapping"
|
|
43
|
+
],
|
|
44
|
+
"scripts": {
|
|
45
|
+
"build": "node scripts/build-catalog.mjs && tsdown src/index.ts --format esm --dts",
|
|
46
|
+
"catalog": "node scripts/build-catalog.mjs",
|
|
47
|
+
"test": "vitest run",
|
|
48
|
+
"typecheck": "tsc --noEmit",
|
|
49
|
+
"clean": "rm -rf dist",
|
|
50
|
+
"visual": "node scripts/visual.mjs"
|
|
51
|
+
},
|
|
52
|
+
"dependencies": {
|
|
53
|
+
"@contentrain/types": "workspace:*"
|
|
54
|
+
},
|
|
55
|
+
"devDependencies": {
|
|
56
|
+
"@types/node": "^22.10.0",
|
|
57
|
+
"pixelmatch": "^7.2.0",
|
|
58
|
+
"playwright": "^1.63.0",
|
|
59
|
+
"pngjs": "^7.0.0",
|
|
60
|
+
"tsdown": "^0.21.0",
|
|
61
|
+
"typescript": "^5.7.0"
|
|
62
|
+
}
|
|
63
|
+
}
|