@contractspec/bundle.marketing 3.8.8 → 3.8.9
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/.turbo/turbo-build.log +64 -32
- package/CHANGELOG.md +30 -0
- package/dist/browser/components/templates/TemplateCard.js +83 -0
- package/dist/browser/components/templates/TemplateCommandDialog.js +110 -0
- package/dist/browser/components/templates/TemplatePreviewContent.js +96 -0
- package/dist/browser/components/templates/TemplatesBrowseControls.js +115 -0
- package/dist/browser/components/templates/TemplatesCatalogSection.js +284 -0
- package/dist/browser/components/templates/TemplatesClientPage.js +840 -917
- package/dist/browser/components/templates/TemplatesHeroSection.js +87 -0
- package/dist/browser/components/templates/TemplatesNextStepsSection.js +126 -0
- package/dist/browser/components/templates/TemplatesPreviewModal.js +136 -126
- package/dist/browser/components/templates/index.js +873 -950
- package/dist/browser/components/templates/template-catalog.js +81 -0
- package/dist/browser/components/templates/template-new.js +23 -0
- package/dist/browser/components/templates/template-preview.js +43 -0
- package/dist/browser/components/templates/template-source.js +19 -0
- package/dist/browser/index.js +873 -950
- package/dist/components/templates/TemplateCard.d.ts +12 -0
- package/dist/components/templates/TemplateCard.js +78 -0
- package/dist/components/templates/TemplateCommandDialog.d.ts +6 -0
- package/dist/components/templates/TemplateCommandDialog.js +105 -0
- package/dist/components/templates/TemplatePreviewContent.d.ts +5 -0
- package/dist/components/templates/TemplatePreviewContent.js +91 -0
- package/dist/components/templates/TemplatesBrowseControls.d.ts +13 -0
- package/dist/components/templates/TemplatesBrowseControls.js +110 -0
- package/dist/components/templates/TemplatesCatalogSection.d.ts +14 -0
- package/dist/components/templates/TemplatesCatalogSection.js +279 -0
- package/dist/components/templates/TemplatesClientPage.js +840 -917
- package/dist/components/templates/TemplatesHeroSection.d.ts +5 -0
- package/dist/components/templates/TemplatesHeroSection.js +82 -0
- package/dist/components/templates/TemplatesNextStepsSection.d.ts +1 -0
- package/dist/components/templates/TemplatesNextStepsSection.js +121 -0
- package/dist/components/templates/TemplatesPreviewModal.d.ts +3 -4
- package/dist/components/templates/TemplatesPreviewModal.js +136 -126
- package/dist/components/templates/index.js +873 -950
- package/dist/components/templates/template-catalog.d.ts +27 -0
- package/dist/components/templates/template-catalog.js +76 -0
- package/dist/components/templates/template-catalog.test.d.ts +1 -0
- package/dist/components/templates/template-new.d.ts +2 -0
- package/dist/components/templates/template-new.js +18 -0
- package/dist/components/templates/template-preview.d.ts +18 -0
- package/dist/components/templates/template-preview.js +38 -0
- package/dist/components/templates/template-source.d.ts +3 -0
- package/dist/components/templates/template-source.js +14 -0
- package/dist/index.js +873 -950
- package/dist/node/components/templates/TemplateCard.js +78 -0
- package/dist/node/components/templates/TemplateCommandDialog.js +105 -0
- package/dist/node/components/templates/TemplatePreviewContent.js +91 -0
- package/dist/node/components/templates/TemplatesBrowseControls.js +110 -0
- package/dist/node/components/templates/TemplatesCatalogSection.js +279 -0
- package/dist/node/components/templates/TemplatesClientPage.js +840 -917
- package/dist/node/components/templates/TemplatesHeroSection.js +82 -0
- package/dist/node/components/templates/TemplatesNextStepsSection.js +121 -0
- package/dist/node/components/templates/TemplatesPreviewModal.js +136 -126
- package/dist/node/components/templates/index.js +873 -950
- package/dist/node/components/templates/template-catalog.js +76 -0
- package/dist/node/components/templates/template-new.js +18 -0
- package/dist/node/components/templates/template-preview.js +38 -0
- package/dist/node/components/templates/template-source.js +14 -0
- package/dist/node/index.js +873 -950
- package/package.json +181 -26
- package/src/components/templates/TemplateCard.tsx +74 -0
- package/src/components/templates/TemplateCommandDialog.tsx +92 -0
- package/src/components/templates/TemplatePreviewContent.tsx +182 -0
- package/src/components/templates/TemplatesBrowseControls.tsx +120 -0
- package/src/components/templates/TemplatesCatalogSection.tsx +166 -0
- package/src/components/templates/TemplatesClientPage.tsx +109 -741
- package/src/components/templates/TemplatesHeroSection.tsx +41 -0
- package/src/components/templates/TemplatesNextStepsSection.tsx +80 -0
- package/src/components/templates/TemplatesPreviewModal.tsx +19 -294
- package/src/components/templates/template-catalog.test.ts +66 -0
- package/src/components/templates/template-catalog.ts +132 -0
- package/src/components/templates/template-new.ts +12 -0
- package/src/components/templates/template-preview.ts +57 -0
- package/src/components/templates/template-source.ts +13 -0
- package/.turbo/turbo-prebuild.log +0 -1
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@contractspec/bundle.marketing",
|
|
3
|
-
"version": "3.8.
|
|
3
|
+
"version": "3.8.9",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"clean": "rm -rf dist",
|
|
7
7
|
"lint": "bun run lint:fix",
|
|
8
8
|
"lint:fix": "biome check --write --unsafe --only=nursery/useSortedClasses . && biome check --write .",
|
|
9
9
|
"lint:check": "biome check .",
|
|
10
|
-
"build": "bun run
|
|
10
|
+
"build": "bun run build:bundle && bun run build:types",
|
|
11
11
|
"build:bundle": "contractspec-bun-build transpile",
|
|
12
12
|
"build:types": "contractspec-bun-build types",
|
|
13
13
|
"publish:pkg": "bun publish --tolerate-republish --ignore-scripts --verbose",
|
|
@@ -204,6 +204,69 @@
|
|
|
204
204
|
"node": "./dist/node/components/templates/index.js",
|
|
205
205
|
"default": "./dist/components/templates/index.js"
|
|
206
206
|
},
|
|
207
|
+
"./components/templates/template-catalog": {
|
|
208
|
+
"types": "./dist/components/templates/template-catalog.d.ts",
|
|
209
|
+
"browser": "./dist/browser/components/templates/template-catalog.js",
|
|
210
|
+
"bun": "./dist/components/templates/template-catalog.js",
|
|
211
|
+
"node": "./dist/node/components/templates/template-catalog.js",
|
|
212
|
+
"default": "./dist/components/templates/template-catalog.js"
|
|
213
|
+
},
|
|
214
|
+
"./components/templates/template-new": {
|
|
215
|
+
"types": "./dist/components/templates/template-new.d.ts",
|
|
216
|
+
"browser": "./dist/browser/components/templates/template-new.js",
|
|
217
|
+
"bun": "./dist/components/templates/template-new.js",
|
|
218
|
+
"node": "./dist/node/components/templates/template-new.js",
|
|
219
|
+
"default": "./dist/components/templates/template-new.js"
|
|
220
|
+
},
|
|
221
|
+
"./components/templates/template-preview": {
|
|
222
|
+
"types": "./dist/components/templates/template-preview.d.ts",
|
|
223
|
+
"browser": "./dist/browser/components/templates/template-preview.js",
|
|
224
|
+
"bun": "./dist/components/templates/template-preview.js",
|
|
225
|
+
"node": "./dist/node/components/templates/template-preview.js",
|
|
226
|
+
"default": "./dist/components/templates/template-preview.js"
|
|
227
|
+
},
|
|
228
|
+
"./components/templates/template-source": {
|
|
229
|
+
"types": "./dist/components/templates/template-source.d.ts",
|
|
230
|
+
"browser": "./dist/browser/components/templates/template-source.js",
|
|
231
|
+
"bun": "./dist/components/templates/template-source.js",
|
|
232
|
+
"node": "./dist/node/components/templates/template-source.js",
|
|
233
|
+
"default": "./dist/components/templates/template-source.js"
|
|
234
|
+
},
|
|
235
|
+
"./components/templates/TemplateCard": {
|
|
236
|
+
"types": "./dist/components/templates/TemplateCard.d.ts",
|
|
237
|
+
"browser": "./dist/browser/components/templates/TemplateCard.js",
|
|
238
|
+
"bun": "./dist/components/templates/TemplateCard.js",
|
|
239
|
+
"node": "./dist/node/components/templates/TemplateCard.js",
|
|
240
|
+
"default": "./dist/components/templates/TemplateCard.js"
|
|
241
|
+
},
|
|
242
|
+
"./components/templates/TemplateCommandDialog": {
|
|
243
|
+
"types": "./dist/components/templates/TemplateCommandDialog.d.ts",
|
|
244
|
+
"browser": "./dist/browser/components/templates/TemplateCommandDialog.js",
|
|
245
|
+
"bun": "./dist/components/templates/TemplateCommandDialog.js",
|
|
246
|
+
"node": "./dist/node/components/templates/TemplateCommandDialog.js",
|
|
247
|
+
"default": "./dist/components/templates/TemplateCommandDialog.js"
|
|
248
|
+
},
|
|
249
|
+
"./components/templates/TemplatePreviewContent": {
|
|
250
|
+
"types": "./dist/components/templates/TemplatePreviewContent.d.ts",
|
|
251
|
+
"browser": "./dist/browser/components/templates/TemplatePreviewContent.js",
|
|
252
|
+
"bun": "./dist/components/templates/TemplatePreviewContent.js",
|
|
253
|
+
"node": "./dist/node/components/templates/TemplatePreviewContent.js",
|
|
254
|
+
"default": "./dist/components/templates/TemplatePreviewContent.js"
|
|
255
|
+
},
|
|
256
|
+
"./components/templates/TemplatesBrowseControls": {
|
|
257
|
+
"types": "./dist/components/templates/TemplatesBrowseControls.d.ts",
|
|
258
|
+
"browser": "./dist/browser/components/templates/TemplatesBrowseControls.js",
|
|
259
|
+
"bun": "./dist/components/templates/TemplatesBrowseControls.js",
|
|
260
|
+
"node": "./dist/node/components/templates/TemplatesBrowseControls.js",
|
|
261
|
+
"default": "./dist/components/templates/TemplatesBrowseControls.js"
|
|
262
|
+
},
|
|
263
|
+
"./components/templates/TemplatesCatalogSection": {
|
|
264
|
+
"types": "./dist/components/templates/TemplatesCatalogSection.d.ts",
|
|
265
|
+
"browser": "./dist/browser/components/templates/TemplatesCatalogSection.js",
|
|
266
|
+
"bun": "./dist/components/templates/TemplatesCatalogSection.js",
|
|
267
|
+
"node": "./dist/node/components/templates/TemplatesCatalogSection.js",
|
|
268
|
+
"default": "./dist/components/templates/TemplatesCatalogSection.js"
|
|
269
|
+
},
|
|
207
270
|
"./components/templates/TemplatesClientPage": {
|
|
208
271
|
"types": "./dist/components/templates/TemplatesClientPage.d.ts",
|
|
209
272
|
"browser": "./dist/browser/components/templates/TemplatesClientPage.js",
|
|
@@ -211,6 +274,20 @@
|
|
|
211
274
|
"node": "./dist/node/components/templates/TemplatesClientPage.js",
|
|
212
275
|
"default": "./dist/components/templates/TemplatesClientPage.js"
|
|
213
276
|
},
|
|
277
|
+
"./components/templates/TemplatesHeroSection": {
|
|
278
|
+
"types": "./dist/components/templates/TemplatesHeroSection.d.ts",
|
|
279
|
+
"browser": "./dist/browser/components/templates/TemplatesHeroSection.js",
|
|
280
|
+
"bun": "./dist/components/templates/TemplatesHeroSection.js",
|
|
281
|
+
"node": "./dist/node/components/templates/TemplatesHeroSection.js",
|
|
282
|
+
"default": "./dist/components/templates/TemplatesHeroSection.js"
|
|
283
|
+
},
|
|
284
|
+
"./components/templates/TemplatesNextStepsSection": {
|
|
285
|
+
"types": "./dist/components/templates/TemplatesNextStepsSection.d.ts",
|
|
286
|
+
"browser": "./dist/browser/components/templates/TemplatesNextStepsSection.js",
|
|
287
|
+
"bun": "./dist/components/templates/TemplatesNextStepsSection.js",
|
|
288
|
+
"node": "./dist/node/components/templates/TemplatesNextStepsSection.js",
|
|
289
|
+
"default": "./dist/components/templates/TemplatesNextStepsSection.js"
|
|
290
|
+
},
|
|
214
291
|
"./components/templates/TemplatesPage": {
|
|
215
292
|
"types": "./dist/components/templates/TemplatesPage.d.ts",
|
|
216
293
|
"browser": "./dist/browser/components/templates/TemplatesPage.js",
|
|
@@ -340,28 +417,29 @@
|
|
|
340
417
|
},
|
|
341
418
|
"types": "./dist/index.d.ts",
|
|
342
419
|
"dependencies": {
|
|
343
|
-
"@contractspec/bundle.library": "3.8.
|
|
344
|
-
"@contractspec/lib.surface-runtime": "0.5.
|
|
345
|
-
"@contractspec/example.agent-console": "3.8.
|
|
346
|
-
"@contractspec/example.
|
|
347
|
-
"@contractspec/example.
|
|
348
|
-
"@contractspec/example.
|
|
349
|
-
"@contractspec/example.
|
|
350
|
-
"@contractspec/example.
|
|
351
|
-
"@contractspec/example.
|
|
352
|
-
"@contractspec/example.
|
|
353
|
-
"@contractspec/example.
|
|
354
|
-
"@contractspec/
|
|
355
|
-
"@contractspec/lib.contracts-
|
|
356
|
-
"@contractspec/lib.
|
|
357
|
-
"@contractspec/lib.
|
|
358
|
-
"@contractspec/lib.
|
|
359
|
-
"@contractspec/lib.
|
|
360
|
-
"@contractspec/lib.
|
|
361
|
-
"@contractspec/lib.
|
|
362
|
-
"@contractspec/lib.ui-kit-
|
|
363
|
-
"@contractspec/lib.ui-
|
|
364
|
-
"@contractspec/
|
|
420
|
+
"@contractspec/bundle.library": "3.8.9",
|
|
421
|
+
"@contractspec/lib.surface-runtime": "0.5.16",
|
|
422
|
+
"@contractspec/example.agent-console": "3.8.8",
|
|
423
|
+
"@contractspec/example.ai-chat-assistant": "3.8.8",
|
|
424
|
+
"@contractspec/example.analytics-dashboard": "3.9.8",
|
|
425
|
+
"@contractspec/example.crm-pipeline": "3.7.16",
|
|
426
|
+
"@contractspec/example.data-grid-showcase": "3.8.8",
|
|
427
|
+
"@contractspec/example.integration-hub": "3.8.8",
|
|
428
|
+
"@contractspec/example.marketplace": "3.8.8",
|
|
429
|
+
"@contractspec/example.saas-boilerplate": "3.8.8",
|
|
430
|
+
"@contractspec/example.visualization-showcase": "3.9.8",
|
|
431
|
+
"@contractspec/example.workflow-system": "3.8.8",
|
|
432
|
+
"@contractspec/lib.contracts-spec": "5.0.4",
|
|
433
|
+
"@contractspec/lib.contracts-runtime-client-react": "3.8.4",
|
|
434
|
+
"@contractspec/lib.design-system": "3.8.9",
|
|
435
|
+
"@contractspec/lib.email": "3.7.12",
|
|
436
|
+
"@contractspec/lib.example-shared-ui": "6.0.16",
|
|
437
|
+
"@contractspec/lib.logger": "3.7.12",
|
|
438
|
+
"@contractspec/lib.runtime-sandbox": "2.7.13",
|
|
439
|
+
"@contractspec/lib.ui-kit-core": "3.7.12",
|
|
440
|
+
"@contractspec/lib.ui-kit-web": "3.9.8",
|
|
441
|
+
"@contractspec/lib.ui-link": "3.7.12",
|
|
442
|
+
"@contractspec/module.examples": "3.8.8",
|
|
365
443
|
"@electric-sql/pglite": "^0.4.2",
|
|
366
444
|
"@hookform/resolvers": "^5.2.2",
|
|
367
445
|
"@scaleway/sdk": "^3.4.1",
|
|
@@ -376,9 +454,9 @@
|
|
|
376
454
|
},
|
|
377
455
|
"devDependencies": {
|
|
378
456
|
"@types/react": "~19.2.14",
|
|
379
|
-
"@contractspec/tool.typescript": "3.7.
|
|
457
|
+
"@contractspec/tool.typescript": "3.7.12",
|
|
380
458
|
"typescript": "^5.9.3",
|
|
381
|
-
"@contractspec/tool.bun": "3.7.
|
|
459
|
+
"@contractspec/tool.bun": "3.7.12"
|
|
382
460
|
},
|
|
383
461
|
"publishConfig": {
|
|
384
462
|
"access": "public",
|
|
@@ -566,6 +644,69 @@
|
|
|
566
644
|
"node": "./dist/node/components/templates/index.js",
|
|
567
645
|
"default": "./dist/components/templates/index.js"
|
|
568
646
|
},
|
|
647
|
+
"./components/templates/template-catalog": {
|
|
648
|
+
"types": "./dist/components/templates/template-catalog.d.ts",
|
|
649
|
+
"browser": "./dist/browser/components/templates/template-catalog.js",
|
|
650
|
+
"bun": "./dist/components/templates/template-catalog.js",
|
|
651
|
+
"node": "./dist/node/components/templates/template-catalog.js",
|
|
652
|
+
"default": "./dist/components/templates/template-catalog.js"
|
|
653
|
+
},
|
|
654
|
+
"./components/templates/template-new": {
|
|
655
|
+
"types": "./dist/components/templates/template-new.d.ts",
|
|
656
|
+
"browser": "./dist/browser/components/templates/template-new.js",
|
|
657
|
+
"bun": "./dist/components/templates/template-new.js",
|
|
658
|
+
"node": "./dist/node/components/templates/template-new.js",
|
|
659
|
+
"default": "./dist/components/templates/template-new.js"
|
|
660
|
+
},
|
|
661
|
+
"./components/templates/template-preview": {
|
|
662
|
+
"types": "./dist/components/templates/template-preview.d.ts",
|
|
663
|
+
"browser": "./dist/browser/components/templates/template-preview.js",
|
|
664
|
+
"bun": "./dist/components/templates/template-preview.js",
|
|
665
|
+
"node": "./dist/node/components/templates/template-preview.js",
|
|
666
|
+
"default": "./dist/components/templates/template-preview.js"
|
|
667
|
+
},
|
|
668
|
+
"./components/templates/template-source": {
|
|
669
|
+
"types": "./dist/components/templates/template-source.d.ts",
|
|
670
|
+
"browser": "./dist/browser/components/templates/template-source.js",
|
|
671
|
+
"bun": "./dist/components/templates/template-source.js",
|
|
672
|
+
"node": "./dist/node/components/templates/template-source.js",
|
|
673
|
+
"default": "./dist/components/templates/template-source.js"
|
|
674
|
+
},
|
|
675
|
+
"./components/templates/TemplateCard": {
|
|
676
|
+
"types": "./dist/components/templates/TemplateCard.d.ts",
|
|
677
|
+
"browser": "./dist/browser/components/templates/TemplateCard.js",
|
|
678
|
+
"bun": "./dist/components/templates/TemplateCard.js",
|
|
679
|
+
"node": "./dist/node/components/templates/TemplateCard.js",
|
|
680
|
+
"default": "./dist/components/templates/TemplateCard.js"
|
|
681
|
+
},
|
|
682
|
+
"./components/templates/TemplateCommandDialog": {
|
|
683
|
+
"types": "./dist/components/templates/TemplateCommandDialog.d.ts",
|
|
684
|
+
"browser": "./dist/browser/components/templates/TemplateCommandDialog.js",
|
|
685
|
+
"bun": "./dist/components/templates/TemplateCommandDialog.js",
|
|
686
|
+
"node": "./dist/node/components/templates/TemplateCommandDialog.js",
|
|
687
|
+
"default": "./dist/components/templates/TemplateCommandDialog.js"
|
|
688
|
+
},
|
|
689
|
+
"./components/templates/TemplatePreviewContent": {
|
|
690
|
+
"types": "./dist/components/templates/TemplatePreviewContent.d.ts",
|
|
691
|
+
"browser": "./dist/browser/components/templates/TemplatePreviewContent.js",
|
|
692
|
+
"bun": "./dist/components/templates/TemplatePreviewContent.js",
|
|
693
|
+
"node": "./dist/node/components/templates/TemplatePreviewContent.js",
|
|
694
|
+
"default": "./dist/components/templates/TemplatePreviewContent.js"
|
|
695
|
+
},
|
|
696
|
+
"./components/templates/TemplatesBrowseControls": {
|
|
697
|
+
"types": "./dist/components/templates/TemplatesBrowseControls.d.ts",
|
|
698
|
+
"browser": "./dist/browser/components/templates/TemplatesBrowseControls.js",
|
|
699
|
+
"bun": "./dist/components/templates/TemplatesBrowseControls.js",
|
|
700
|
+
"node": "./dist/node/components/templates/TemplatesBrowseControls.js",
|
|
701
|
+
"default": "./dist/components/templates/TemplatesBrowseControls.js"
|
|
702
|
+
},
|
|
703
|
+
"./components/templates/TemplatesCatalogSection": {
|
|
704
|
+
"types": "./dist/components/templates/TemplatesCatalogSection.d.ts",
|
|
705
|
+
"browser": "./dist/browser/components/templates/TemplatesCatalogSection.js",
|
|
706
|
+
"bun": "./dist/components/templates/TemplatesCatalogSection.js",
|
|
707
|
+
"node": "./dist/node/components/templates/TemplatesCatalogSection.js",
|
|
708
|
+
"default": "./dist/components/templates/TemplatesCatalogSection.js"
|
|
709
|
+
},
|
|
569
710
|
"./components/templates/TemplatesClientPage": {
|
|
570
711
|
"types": "./dist/components/templates/TemplatesClientPage.d.ts",
|
|
571
712
|
"browser": "./dist/browser/components/templates/TemplatesClientPage.js",
|
|
@@ -573,6 +714,20 @@
|
|
|
573
714
|
"node": "./dist/node/components/templates/TemplatesClientPage.js",
|
|
574
715
|
"default": "./dist/components/templates/TemplatesClientPage.js"
|
|
575
716
|
},
|
|
717
|
+
"./components/templates/TemplatesHeroSection": {
|
|
718
|
+
"types": "./dist/components/templates/TemplatesHeroSection.d.ts",
|
|
719
|
+
"browser": "./dist/browser/components/templates/TemplatesHeroSection.js",
|
|
720
|
+
"bun": "./dist/components/templates/TemplatesHeroSection.js",
|
|
721
|
+
"node": "./dist/node/components/templates/TemplatesHeroSection.js",
|
|
722
|
+
"default": "./dist/components/templates/TemplatesHeroSection.js"
|
|
723
|
+
},
|
|
724
|
+
"./components/templates/TemplatesNextStepsSection": {
|
|
725
|
+
"types": "./dist/components/templates/TemplatesNextStepsSection.d.ts",
|
|
726
|
+
"browser": "./dist/browser/components/templates/TemplatesNextStepsSection.js",
|
|
727
|
+
"bun": "./dist/components/templates/TemplatesNextStepsSection.js",
|
|
728
|
+
"node": "./dist/node/components/templates/TemplatesNextStepsSection.js",
|
|
729
|
+
"default": "./dist/components/templates/TemplatesNextStepsSection.js"
|
|
730
|
+
},
|
|
576
731
|
"./components/templates/TemplatesPage": {
|
|
577
732
|
"types": "./dist/components/templates/TemplatesPage.d.ts",
|
|
578
733
|
"browser": "./dist/browser/components/templates/TemplatesPage.js",
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
import type { ReactNode } from 'react';
|
|
4
|
+
|
|
5
|
+
export interface TemplateCardProps {
|
|
6
|
+
title: string;
|
|
7
|
+
description: string;
|
|
8
|
+
metaBadges: readonly string[];
|
|
9
|
+
tags: readonly string[];
|
|
10
|
+
featureList?: readonly string[];
|
|
11
|
+
isNew?: boolean;
|
|
12
|
+
previewAction: ReactNode;
|
|
13
|
+
useAction: ReactNode;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export function TemplateCard({
|
|
17
|
+
title,
|
|
18
|
+
description,
|
|
19
|
+
metaBadges,
|
|
20
|
+
tags,
|
|
21
|
+
featureList = [],
|
|
22
|
+
isNew = false,
|
|
23
|
+
previewAction,
|
|
24
|
+
useAction,
|
|
25
|
+
}: TemplateCardProps) {
|
|
26
|
+
return (
|
|
27
|
+
<div className="editorial-panel relative flex flex-col space-y-4 transition-colors hover:border-[color:rgb(162_79_42_/_0.55)]">
|
|
28
|
+
{isNew ? (
|
|
29
|
+
<span className="absolute top-4 right-4 rounded-full bg-[color:var(--success)] px-2.5 py-1 font-medium text-[11px] text-white uppercase">
|
|
30
|
+
New
|
|
31
|
+
</span>
|
|
32
|
+
) : null}
|
|
33
|
+
|
|
34
|
+
<div>
|
|
35
|
+
<h3 className="font-serif text-2xl tracking-[-0.03em]">{title}</h3>
|
|
36
|
+
<p className="mt-1 text-muted-foreground text-sm">{description}</p>
|
|
37
|
+
</div>
|
|
38
|
+
|
|
39
|
+
<div className="flex-1 space-y-3">
|
|
40
|
+
<div className="flex flex-wrap gap-2">
|
|
41
|
+
{metaBadges.map((badge) => (
|
|
42
|
+
<span
|
|
43
|
+
key={badge}
|
|
44
|
+
className="rounded-full border border-border bg-background px-3 py-1 text-[11px] text-foreground"
|
|
45
|
+
>
|
|
46
|
+
{badge}
|
|
47
|
+
</span>
|
|
48
|
+
))}
|
|
49
|
+
</div>
|
|
50
|
+
{featureList.length > 0 ? (
|
|
51
|
+
<p className="text-muted-foreground text-xs">
|
|
52
|
+
<span className="font-medium text-foreground">Features:</span>{' '}
|
|
53
|
+
{featureList.join(', ')}
|
|
54
|
+
</p>
|
|
55
|
+
) : null}
|
|
56
|
+
<div className="flex flex-wrap gap-1">
|
|
57
|
+
{tags.map((tag) => (
|
|
58
|
+
<span
|
|
59
|
+
key={tag}
|
|
60
|
+
className="rounded-full border border-border bg-muted px-3 py-1 text-[11px] text-muted-foreground"
|
|
61
|
+
>
|
|
62
|
+
{tag}
|
|
63
|
+
</span>
|
|
64
|
+
))}
|
|
65
|
+
</div>
|
|
66
|
+
</div>
|
|
67
|
+
|
|
68
|
+
<div className="flex gap-2 pt-4">
|
|
69
|
+
{previewAction}
|
|
70
|
+
{useAction}
|
|
71
|
+
</div>
|
|
72
|
+
</div>
|
|
73
|
+
);
|
|
74
|
+
}
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
import {
|
|
4
|
+
analyticsEventNames,
|
|
5
|
+
captureAnalyticsEvent,
|
|
6
|
+
} from '@contractspec/bundle.library/libs/posthog/client';
|
|
7
|
+
import {
|
|
8
|
+
Dialog,
|
|
9
|
+
DialogContent,
|
|
10
|
+
DialogDescription,
|
|
11
|
+
DialogHeader,
|
|
12
|
+
DialogTitle,
|
|
13
|
+
} from '@contractspec/lib.ui-kit-web/ui/dialog';
|
|
14
|
+
|
|
15
|
+
export interface TemplateCommandDialogProps {
|
|
16
|
+
templateId: string | null;
|
|
17
|
+
onClose: () => void;
|
|
18
|
+
onDeployStudio: () => void;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export function TemplateCommandDialog({
|
|
22
|
+
templateId,
|
|
23
|
+
onClose,
|
|
24
|
+
onDeployStudio,
|
|
25
|
+
}: TemplateCommandDialogProps) {
|
|
26
|
+
const command = templateId
|
|
27
|
+
? `npx contractspec init --template ${templateId}`
|
|
28
|
+
: '';
|
|
29
|
+
|
|
30
|
+
return (
|
|
31
|
+
<Dialog open={!!templateId} onOpenChange={(open) => !open && onClose()}>
|
|
32
|
+
<DialogContent className="max-w-md">
|
|
33
|
+
<DialogHeader>
|
|
34
|
+
<DialogTitle>Use this template</DialogTitle>
|
|
35
|
+
<DialogDescription>
|
|
36
|
+
Initialize a new project with this template using the CLI.
|
|
37
|
+
</DialogDescription>
|
|
38
|
+
</DialogHeader>
|
|
39
|
+
<div className="space-y-4 pt-4">
|
|
40
|
+
<div className="rounded-md border border-zinc-800 bg-zinc-950 p-4 font-mono text-sm text-zinc-50">
|
|
41
|
+
{command}
|
|
42
|
+
</div>
|
|
43
|
+
<div className="flex gap-2">
|
|
44
|
+
<button
|
|
45
|
+
className="btn-secondary w-full"
|
|
46
|
+
onClick={() => {
|
|
47
|
+
if (!templateId) {
|
|
48
|
+
return;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
void navigator.clipboard.writeText(command);
|
|
52
|
+
captureAnalyticsEvent(analyticsEventNames.COPY_COMMAND_CLICK, {
|
|
53
|
+
surface: 'templates',
|
|
54
|
+
templateId,
|
|
55
|
+
filename: 'templates-cli',
|
|
56
|
+
});
|
|
57
|
+
}}
|
|
58
|
+
>
|
|
59
|
+
Copy Command
|
|
60
|
+
</button>
|
|
61
|
+
</div>
|
|
62
|
+
<div className="relative">
|
|
63
|
+
<div className="absolute inset-0 flex items-center">
|
|
64
|
+
<span className="w-full border-border border-t" />
|
|
65
|
+
</div>
|
|
66
|
+
<div className="relative flex justify-center text-xs uppercase">
|
|
67
|
+
<span className="bg-background px-2 text-muted-foreground">
|
|
68
|
+
Or
|
|
69
|
+
</span>
|
|
70
|
+
</div>
|
|
71
|
+
</div>
|
|
72
|
+
<button
|
|
73
|
+
className="btn-ghost w-full text-sm"
|
|
74
|
+
onClick={() => {
|
|
75
|
+
if (!templateId) {
|
|
76
|
+
return;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
captureAnalyticsEvent(analyticsEventNames.CTA_STUDIO_CLICK, {
|
|
80
|
+
surface: 'templates',
|
|
81
|
+
templateId,
|
|
82
|
+
});
|
|
83
|
+
onDeployStudio();
|
|
84
|
+
}}
|
|
85
|
+
>
|
|
86
|
+
Deploy to Studio
|
|
87
|
+
</button>
|
|
88
|
+
</div>
|
|
89
|
+
</DialogContent>
|
|
90
|
+
</Dialog>
|
|
91
|
+
);
|
|
92
|
+
}
|
|
@@ -0,0 +1,182 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
import {
|
|
4
|
+
type TemplateId,
|
|
5
|
+
TemplateShell,
|
|
6
|
+
} from '@contractspec/lib.example-shared-ui';
|
|
7
|
+
import { LoadingSpinner } from '@contractspec/lib.ui-kit-web/ui/atoms/LoadingSpinner';
|
|
8
|
+
import dynamic from 'next/dynamic';
|
|
9
|
+
import type { ComponentType } from 'react';
|
|
10
|
+
|
|
11
|
+
const SaasDashboard = dynamic(
|
|
12
|
+
() =>
|
|
13
|
+
import('@contractspec/example.saas-boilerplate').then(
|
|
14
|
+
(module) => module.SaasDashboard
|
|
15
|
+
),
|
|
16
|
+
{ ssr: false, loading: () => <LoadingSpinner /> }
|
|
17
|
+
);
|
|
18
|
+
|
|
19
|
+
const CrmDashboard = dynamic(
|
|
20
|
+
() =>
|
|
21
|
+
import('@contractspec/example.crm-pipeline').then(
|
|
22
|
+
(module) => module.CrmDashboard
|
|
23
|
+
),
|
|
24
|
+
{ ssr: false, loading: () => <LoadingSpinner /> }
|
|
25
|
+
);
|
|
26
|
+
|
|
27
|
+
const DataGridShowcase = dynamic(
|
|
28
|
+
() =>
|
|
29
|
+
import('@contractspec/example.data-grid-showcase/ui').then(
|
|
30
|
+
(module) => module.DataGridShowcase
|
|
31
|
+
),
|
|
32
|
+
{ ssr: false, loading: () => <LoadingSpinner /> }
|
|
33
|
+
);
|
|
34
|
+
|
|
35
|
+
const VisualizationShowcase = dynamic(
|
|
36
|
+
() =>
|
|
37
|
+
import('@contractspec/example.visualization-showcase/ui').then(
|
|
38
|
+
(module) => module.VisualizationShowcase
|
|
39
|
+
),
|
|
40
|
+
{ ssr: false, loading: () => <LoadingSpinner /> }
|
|
41
|
+
);
|
|
42
|
+
|
|
43
|
+
const AgentDashboard = dynamic(
|
|
44
|
+
() =>
|
|
45
|
+
import('@contractspec/example.agent-console/ui').then(
|
|
46
|
+
(module) => module.AgentDashboard
|
|
47
|
+
),
|
|
48
|
+
{ ssr: false, loading: () => <LoadingSpinner /> }
|
|
49
|
+
);
|
|
50
|
+
|
|
51
|
+
const AiChatAssistantDashboard = dynamic(
|
|
52
|
+
() =>
|
|
53
|
+
import('@contractspec/example.ai-chat-assistant').then(
|
|
54
|
+
(module) => module.AiChatAssistantDashboard
|
|
55
|
+
),
|
|
56
|
+
{ ssr: false, loading: () => <LoadingSpinner /> }
|
|
57
|
+
);
|
|
58
|
+
|
|
59
|
+
const WorkflowDashboard = dynamic(
|
|
60
|
+
() =>
|
|
61
|
+
import('@contractspec/example.workflow-system/ui').then(
|
|
62
|
+
(module) => module.WorkflowDashboard
|
|
63
|
+
),
|
|
64
|
+
{ ssr: false, loading: () => <LoadingSpinner /> }
|
|
65
|
+
);
|
|
66
|
+
|
|
67
|
+
const MarketplaceDashboard = dynamic(
|
|
68
|
+
() =>
|
|
69
|
+
import('@contractspec/example.marketplace/ui').then(
|
|
70
|
+
(module) => module.MarketplaceDashboard
|
|
71
|
+
),
|
|
72
|
+
{ ssr: false, loading: () => <LoadingSpinner /> }
|
|
73
|
+
);
|
|
74
|
+
|
|
75
|
+
const IntegrationDashboard = dynamic(
|
|
76
|
+
() =>
|
|
77
|
+
import('@contractspec/example.integration-hub/ui').then(
|
|
78
|
+
(module) => module.IntegrationDashboard
|
|
79
|
+
),
|
|
80
|
+
{ ssr: false, loading: () => <LoadingSpinner /> }
|
|
81
|
+
);
|
|
82
|
+
|
|
83
|
+
const AnalyticsDashboard = dynamic(
|
|
84
|
+
() =>
|
|
85
|
+
import('@contractspec/example.analytics-dashboard').then(
|
|
86
|
+
(module) => module.AnalyticsDashboard
|
|
87
|
+
),
|
|
88
|
+
{ ssr: false, loading: () => <LoadingSpinner /> }
|
|
89
|
+
);
|
|
90
|
+
|
|
91
|
+
interface PreviewDefinition {
|
|
92
|
+
title: string;
|
|
93
|
+
description: string;
|
|
94
|
+
component: ComponentType;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
const PREVIEW_DEFINITIONS: Partial<Record<TemplateId, PreviewDefinition>> = {
|
|
98
|
+
'saas-boilerplate': {
|
|
99
|
+
title: 'SaaS Boilerplate',
|
|
100
|
+
description:
|
|
101
|
+
'Multi-tenant organizations, projects, settings, and billing usage tracking.',
|
|
102
|
+
component: SaasDashboard,
|
|
103
|
+
},
|
|
104
|
+
'crm-pipeline': {
|
|
105
|
+
title: 'CRM Pipeline',
|
|
106
|
+
description:
|
|
107
|
+
'Sales CRM with contacts, companies, deals, and pipeline stages.',
|
|
108
|
+
component: CrmDashboard,
|
|
109
|
+
},
|
|
110
|
+
'data-grid-showcase': {
|
|
111
|
+
title: 'Data Grid Showcase',
|
|
112
|
+
description:
|
|
113
|
+
'Shared ContractSpec table primitives with client, server, and DataView-driven lanes.',
|
|
114
|
+
component: DataGridShowcase,
|
|
115
|
+
},
|
|
116
|
+
'visualization-showcase': {
|
|
117
|
+
title: 'Visualization Showcase',
|
|
118
|
+
description:
|
|
119
|
+
'ContractSpec-owned chart primitives rendered through shared visualization contracts and design-system wrappers.',
|
|
120
|
+
component: VisualizationShowcase,
|
|
121
|
+
},
|
|
122
|
+
'agent-console': {
|
|
123
|
+
title: 'AI Agent Console',
|
|
124
|
+
description:
|
|
125
|
+
'AI agent orchestration with tools, agents, runs, and execution logs.',
|
|
126
|
+
component: AgentDashboard,
|
|
127
|
+
},
|
|
128
|
+
'ai-chat-assistant': {
|
|
129
|
+
title: 'AI Chat Assistant',
|
|
130
|
+
description:
|
|
131
|
+
'Focused assistant surface with reasoning, sources, suggestions, and MCP-aware tools.',
|
|
132
|
+
component: AiChatAssistantDashboard,
|
|
133
|
+
},
|
|
134
|
+
'workflow-system': {
|
|
135
|
+
title: 'Workflow System',
|
|
136
|
+
description: 'Multi-step workflows with role-based approvals.',
|
|
137
|
+
component: WorkflowDashboard,
|
|
138
|
+
},
|
|
139
|
+
marketplace: {
|
|
140
|
+
title: 'Marketplace',
|
|
141
|
+
description:
|
|
142
|
+
'Two-sided marketplace with stores, products, orders, and payouts.',
|
|
143
|
+
component: MarketplaceDashboard,
|
|
144
|
+
},
|
|
145
|
+
'integration-hub': {
|
|
146
|
+
title: 'Integration Hub',
|
|
147
|
+
description:
|
|
148
|
+
'Third-party integrations with connections, sync configs, and field mapping.',
|
|
149
|
+
component: IntegrationDashboard,
|
|
150
|
+
},
|
|
151
|
+
'analytics-dashboard': {
|
|
152
|
+
title: 'Analytics Dashboard',
|
|
153
|
+
description: 'Custom dashboards with widgets and queries.',
|
|
154
|
+
component: AnalyticsDashboard,
|
|
155
|
+
},
|
|
156
|
+
};
|
|
157
|
+
|
|
158
|
+
export interface TemplatePreviewContentProps {
|
|
159
|
+
templateId: TemplateId;
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
export function TemplatePreviewContent({
|
|
163
|
+
templateId,
|
|
164
|
+
}: TemplatePreviewContentProps) {
|
|
165
|
+
const preview = PREVIEW_DEFINITIONS[templateId];
|
|
166
|
+
|
|
167
|
+
if (!preview) {
|
|
168
|
+
return null;
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
const PreviewComponent = preview.component;
|
|
172
|
+
|
|
173
|
+
return (
|
|
174
|
+
<TemplateShell
|
|
175
|
+
title={preview.title}
|
|
176
|
+
description={preview.description}
|
|
177
|
+
showSaveAction={false}
|
|
178
|
+
>
|
|
179
|
+
<PreviewComponent />
|
|
180
|
+
</TemplateShell>
|
|
181
|
+
);
|
|
182
|
+
}
|