@contractspec/bundle.marketing 3.8.8 → 3.8.10

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 (96) hide show
  1. package/.turbo/turbo-build.log +73 -29
  2. package/CHANGELOG.md +63 -0
  3. package/dist/browser/components/templates/TemplateCard.js +83 -0
  4. package/dist/browser/components/templates/TemplateCommandDialog.js +110 -0
  5. package/dist/browser/components/templates/TemplatePreviewContent.js +96 -0
  6. package/dist/browser/components/templates/TemplatesBrowseControls.js +130 -0
  7. package/dist/browser/components/templates/TemplatesCatalogSection.js +307 -0
  8. package/dist/browser/components/templates/TemplatesClientPage.js +1020 -917
  9. package/dist/browser/components/templates/TemplatesHeroSection.js +87 -0
  10. package/dist/browser/components/templates/TemplatesNextStepsSection.js +126 -0
  11. package/dist/browser/components/templates/TemplatesOverlays.js +2874 -0
  12. package/dist/browser/components/templates/TemplatesPreviewModal.js +136 -126
  13. package/dist/browser/components/templates/index.js +1055 -952
  14. package/dist/browser/components/templates/template-catalog.js +83 -0
  15. package/dist/browser/components/templates/template-filters.js +99 -0
  16. package/dist/browser/components/templates/template-new.js +23 -0
  17. package/dist/browser/components/templates/template-preview.js +43 -0
  18. package/dist/browser/components/templates/template-source.js +19 -0
  19. package/dist/browser/components/templates/template-tag-visibility.js +40 -0
  20. package/dist/browser/components/templates/useTemplateBrowseState.js +191 -0
  21. package/dist/browser/index.js +1055 -952
  22. package/dist/components/templates/TemplateCard.d.ts +12 -0
  23. package/dist/components/templates/TemplateCard.js +78 -0
  24. package/dist/components/templates/TemplateCommandDialog.d.ts +6 -0
  25. package/dist/components/templates/TemplateCommandDialog.js +105 -0
  26. package/dist/components/templates/TemplatePreviewContent.d.ts +5 -0
  27. package/dist/components/templates/TemplatePreviewContent.js +91 -0
  28. package/dist/components/templates/TemplatesBrowseControls.d.ts +18 -0
  29. package/dist/components/templates/TemplatesBrowseControls.js +125 -0
  30. package/dist/components/templates/TemplatesCatalogSection.d.ts +17 -0
  31. package/dist/components/templates/TemplatesCatalogSection.js +302 -0
  32. package/dist/components/templates/TemplatesClientPage.js +1020 -917
  33. package/dist/components/templates/TemplatesHeroSection.d.ts +5 -0
  34. package/dist/components/templates/TemplatesHeroSection.js +82 -0
  35. package/dist/components/templates/TemplatesNextStepsSection.d.ts +1 -0
  36. package/dist/components/templates/TemplatesNextStepsSection.js +121 -0
  37. package/dist/components/templates/TemplatesOverlays.d.ts +10 -0
  38. package/dist/components/templates/TemplatesOverlays.js +2869 -0
  39. package/dist/components/templates/TemplatesPreviewModal.d.ts +3 -4
  40. package/dist/components/templates/TemplatesPreviewModal.js +136 -126
  41. package/dist/components/templates/index.js +1055 -952
  42. package/dist/components/templates/template-catalog.d.ts +28 -0
  43. package/dist/components/templates/template-catalog.js +78 -0
  44. package/dist/components/templates/template-catalog.test.d.ts +1 -0
  45. package/dist/components/templates/template-filters.d.ts +12 -0
  46. package/dist/components/templates/template-filters.js +94 -0
  47. package/dist/components/templates/template-new.d.ts +2 -0
  48. package/dist/components/templates/template-new.js +18 -0
  49. package/dist/components/templates/template-preview.d.ts +18 -0
  50. package/dist/components/templates/template-preview.js +38 -0
  51. package/dist/components/templates/template-source.d.ts +3 -0
  52. package/dist/components/templates/template-source.js +14 -0
  53. package/dist/components/templates/template-tag-visibility.d.ts +10 -0
  54. package/dist/components/templates/template-tag-visibility.js +35 -0
  55. package/dist/components/templates/useTemplateBrowseState.d.ts +22 -0
  56. package/dist/components/templates/useTemplateBrowseState.js +186 -0
  57. package/dist/index.js +1055 -952
  58. package/dist/node/components/templates/TemplateCard.js +78 -0
  59. package/dist/node/components/templates/TemplateCommandDialog.js +105 -0
  60. package/dist/node/components/templates/TemplatePreviewContent.js +91 -0
  61. package/dist/node/components/templates/TemplatesBrowseControls.js +125 -0
  62. package/dist/node/components/templates/TemplatesCatalogSection.js +302 -0
  63. package/dist/node/components/templates/TemplatesClientPage.js +1020 -917
  64. package/dist/node/components/templates/TemplatesHeroSection.js +82 -0
  65. package/dist/node/components/templates/TemplatesNextStepsSection.js +121 -0
  66. package/dist/node/components/templates/TemplatesOverlays.js +2869 -0
  67. package/dist/node/components/templates/TemplatesPreviewModal.js +136 -126
  68. package/dist/node/components/templates/index.js +1055 -952
  69. package/dist/node/components/templates/template-catalog.js +78 -0
  70. package/dist/node/components/templates/template-filters.js +94 -0
  71. package/dist/node/components/templates/template-new.js +18 -0
  72. package/dist/node/components/templates/template-preview.js +38 -0
  73. package/dist/node/components/templates/template-source.js +14 -0
  74. package/dist/node/components/templates/template-tag-visibility.js +35 -0
  75. package/dist/node/components/templates/useTemplateBrowseState.js +186 -0
  76. package/dist/node/index.js +1055 -952
  77. package/package.json +237 -26
  78. package/src/components/templates/TemplateCard.tsx +74 -0
  79. package/src/components/templates/TemplateCommandDialog.tsx +92 -0
  80. package/src/components/templates/TemplatePreviewContent.tsx +182 -0
  81. package/src/components/templates/TemplatesBrowseControls.tsx +144 -0
  82. package/src/components/templates/TemplatesCatalogSection.tsx +191 -0
  83. package/src/components/templates/TemplatesClientPage.tsx +85 -773
  84. package/src/components/templates/TemplatesHeroSection.tsx +41 -0
  85. package/src/components/templates/TemplatesNextStepsSection.tsx +80 -0
  86. package/src/components/templates/TemplatesOverlays.tsx +65 -0
  87. package/src/components/templates/TemplatesPreviewModal.tsx +19 -294
  88. package/src/components/templates/template-catalog.test.ts +162 -0
  89. package/src/components/templates/template-catalog.ts +140 -0
  90. package/src/components/templates/template-filters.ts +57 -0
  91. package/src/components/templates/template-new.ts +12 -0
  92. package/src/components/templates/template-preview.ts +57 -0
  93. package/src/components/templates/template-source.ts +13 -0
  94. package/src/components/templates/template-tag-visibility.ts +58 -0
  95. package/src/components/templates/useTemplateBrowseState.ts +101 -0
  96. 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.8",
3
+ "version": "3.8.10",
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 prebuild && bun run build:bundle && bun run build:types",
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,83 @@
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-filters": {
215
+ "types": "./dist/components/templates/template-filters.d.ts",
216
+ "browser": "./dist/browser/components/templates/template-filters.js",
217
+ "bun": "./dist/components/templates/template-filters.js",
218
+ "node": "./dist/node/components/templates/template-filters.js",
219
+ "default": "./dist/components/templates/template-filters.js"
220
+ },
221
+ "./components/templates/template-new": {
222
+ "types": "./dist/components/templates/template-new.d.ts",
223
+ "browser": "./dist/browser/components/templates/template-new.js",
224
+ "bun": "./dist/components/templates/template-new.js",
225
+ "node": "./dist/node/components/templates/template-new.js",
226
+ "default": "./dist/components/templates/template-new.js"
227
+ },
228
+ "./components/templates/template-preview": {
229
+ "types": "./dist/components/templates/template-preview.d.ts",
230
+ "browser": "./dist/browser/components/templates/template-preview.js",
231
+ "bun": "./dist/components/templates/template-preview.js",
232
+ "node": "./dist/node/components/templates/template-preview.js",
233
+ "default": "./dist/components/templates/template-preview.js"
234
+ },
235
+ "./components/templates/template-source": {
236
+ "types": "./dist/components/templates/template-source.d.ts",
237
+ "browser": "./dist/browser/components/templates/template-source.js",
238
+ "bun": "./dist/components/templates/template-source.js",
239
+ "node": "./dist/node/components/templates/template-source.js",
240
+ "default": "./dist/components/templates/template-source.js"
241
+ },
242
+ "./components/templates/template-tag-visibility": {
243
+ "types": "./dist/components/templates/template-tag-visibility.d.ts",
244
+ "browser": "./dist/browser/components/templates/template-tag-visibility.js",
245
+ "bun": "./dist/components/templates/template-tag-visibility.js",
246
+ "node": "./dist/node/components/templates/template-tag-visibility.js",
247
+ "default": "./dist/components/templates/template-tag-visibility.js"
248
+ },
249
+ "./components/templates/TemplateCard": {
250
+ "types": "./dist/components/templates/TemplateCard.d.ts",
251
+ "browser": "./dist/browser/components/templates/TemplateCard.js",
252
+ "bun": "./dist/components/templates/TemplateCard.js",
253
+ "node": "./dist/node/components/templates/TemplateCard.js",
254
+ "default": "./dist/components/templates/TemplateCard.js"
255
+ },
256
+ "./components/templates/TemplateCommandDialog": {
257
+ "types": "./dist/components/templates/TemplateCommandDialog.d.ts",
258
+ "browser": "./dist/browser/components/templates/TemplateCommandDialog.js",
259
+ "bun": "./dist/components/templates/TemplateCommandDialog.js",
260
+ "node": "./dist/node/components/templates/TemplateCommandDialog.js",
261
+ "default": "./dist/components/templates/TemplateCommandDialog.js"
262
+ },
263
+ "./components/templates/TemplatePreviewContent": {
264
+ "types": "./dist/components/templates/TemplatePreviewContent.d.ts",
265
+ "browser": "./dist/browser/components/templates/TemplatePreviewContent.js",
266
+ "bun": "./dist/components/templates/TemplatePreviewContent.js",
267
+ "node": "./dist/node/components/templates/TemplatePreviewContent.js",
268
+ "default": "./dist/components/templates/TemplatePreviewContent.js"
269
+ },
270
+ "./components/templates/TemplatesBrowseControls": {
271
+ "types": "./dist/components/templates/TemplatesBrowseControls.d.ts",
272
+ "browser": "./dist/browser/components/templates/TemplatesBrowseControls.js",
273
+ "bun": "./dist/components/templates/TemplatesBrowseControls.js",
274
+ "node": "./dist/node/components/templates/TemplatesBrowseControls.js",
275
+ "default": "./dist/components/templates/TemplatesBrowseControls.js"
276
+ },
277
+ "./components/templates/TemplatesCatalogSection": {
278
+ "types": "./dist/components/templates/TemplatesCatalogSection.d.ts",
279
+ "browser": "./dist/browser/components/templates/TemplatesCatalogSection.js",
280
+ "bun": "./dist/components/templates/TemplatesCatalogSection.js",
281
+ "node": "./dist/node/components/templates/TemplatesCatalogSection.js",
282
+ "default": "./dist/components/templates/TemplatesCatalogSection.js"
283
+ },
207
284
  "./components/templates/TemplatesClientPage": {
208
285
  "types": "./dist/components/templates/TemplatesClientPage.d.ts",
209
286
  "browser": "./dist/browser/components/templates/TemplatesClientPage.js",
@@ -211,6 +288,27 @@
211
288
  "node": "./dist/node/components/templates/TemplatesClientPage.js",
212
289
  "default": "./dist/components/templates/TemplatesClientPage.js"
213
290
  },
291
+ "./components/templates/TemplatesHeroSection": {
292
+ "types": "./dist/components/templates/TemplatesHeroSection.d.ts",
293
+ "browser": "./dist/browser/components/templates/TemplatesHeroSection.js",
294
+ "bun": "./dist/components/templates/TemplatesHeroSection.js",
295
+ "node": "./dist/node/components/templates/TemplatesHeroSection.js",
296
+ "default": "./dist/components/templates/TemplatesHeroSection.js"
297
+ },
298
+ "./components/templates/TemplatesNextStepsSection": {
299
+ "types": "./dist/components/templates/TemplatesNextStepsSection.d.ts",
300
+ "browser": "./dist/browser/components/templates/TemplatesNextStepsSection.js",
301
+ "bun": "./dist/components/templates/TemplatesNextStepsSection.js",
302
+ "node": "./dist/node/components/templates/TemplatesNextStepsSection.js",
303
+ "default": "./dist/components/templates/TemplatesNextStepsSection.js"
304
+ },
305
+ "./components/templates/TemplatesOverlays": {
306
+ "types": "./dist/components/templates/TemplatesOverlays.d.ts",
307
+ "browser": "./dist/browser/components/templates/TemplatesOverlays.js",
308
+ "bun": "./dist/components/templates/TemplatesOverlays.js",
309
+ "node": "./dist/node/components/templates/TemplatesOverlays.js",
310
+ "default": "./dist/components/templates/TemplatesOverlays.js"
311
+ },
214
312
  "./components/templates/TemplatesPage": {
215
313
  "types": "./dist/components/templates/TemplatesPage.d.ts",
216
314
  "browser": "./dist/browser/components/templates/TemplatesPage.js",
@@ -225,6 +323,13 @@
225
323
  "node": "./dist/node/components/templates/TemplatesPreviewModal.js",
226
324
  "default": "./dist/components/templates/TemplatesPreviewModal.js"
227
325
  },
326
+ "./components/templates/useTemplateBrowseState": {
327
+ "types": "./dist/components/templates/useTemplateBrowseState.d.ts",
328
+ "browser": "./dist/browser/components/templates/useTemplateBrowseState.js",
329
+ "bun": "./dist/components/templates/useTemplateBrowseState.js",
330
+ "node": "./dist/node/components/templates/useTemplateBrowseState.js",
331
+ "default": "./dist/components/templates/useTemplateBrowseState.js"
332
+ },
228
333
  "./libs/email/client": {
229
334
  "types": "./dist/libs/email/client.d.ts",
230
335
  "browser": "./dist/browser/libs/email/client.js",
@@ -340,28 +445,29 @@
340
445
  },
341
446
  "types": "./dist/index.d.ts",
342
447
  "dependencies": {
343
- "@contractspec/bundle.library": "3.8.8",
344
- "@contractspec/lib.surface-runtime": "0.5.15",
345
- "@contractspec/example.agent-console": "3.8.7",
346
- "@contractspec/example.analytics-dashboard": "3.9.7",
347
- "@contractspec/example.crm-pipeline": "3.7.15",
348
- "@contractspec/example.data-grid-showcase": "3.8.7",
349
- "@contractspec/example.integration-hub": "3.8.7",
350
- "@contractspec/example.marketplace": "3.8.7",
351
- "@contractspec/example.saas-boilerplate": "3.8.7",
352
- "@contractspec/example.visualization-showcase": "3.9.7",
353
- "@contractspec/example.workflow-system": "3.8.7",
354
- "@contractspec/lib.contracts-spec": "5.0.3",
355
- "@contractspec/lib.contracts-runtime-client-react": "3.8.3",
356
- "@contractspec/lib.design-system": "3.8.8",
357
- "@contractspec/lib.email": "3.7.11",
358
- "@contractspec/lib.example-shared-ui": "6.0.15",
359
- "@contractspec/lib.logger": "3.7.11",
360
- "@contractspec/lib.runtime-sandbox": "2.7.12",
361
- "@contractspec/lib.ui-kit-core": "3.7.11",
362
- "@contractspec/lib.ui-kit-web": "3.9.7",
363
- "@contractspec/lib.ui-link": "3.7.11",
364
- "@contractspec/module.examples": "3.8.7",
448
+ "@contractspec/bundle.library": "3.8.10",
449
+ "@contractspec/lib.surface-runtime": "0.5.17",
450
+ "@contractspec/example.agent-console": "3.8.9",
451
+ "@contractspec/example.ai-chat-assistant": "3.8.9",
452
+ "@contractspec/example.analytics-dashboard": "3.9.9",
453
+ "@contractspec/example.crm-pipeline": "3.7.17",
454
+ "@contractspec/example.data-grid-showcase": "3.8.9",
455
+ "@contractspec/example.integration-hub": "3.8.9",
456
+ "@contractspec/example.marketplace": "3.8.9",
457
+ "@contractspec/example.saas-boilerplate": "3.8.9",
458
+ "@contractspec/example.visualization-showcase": "3.9.9",
459
+ "@contractspec/example.workflow-system": "3.8.9",
460
+ "@contractspec/lib.contracts-spec": "5.1.0",
461
+ "@contractspec/lib.contracts-runtime-client-react": "3.8.5",
462
+ "@contractspec/lib.design-system": "3.8.10",
463
+ "@contractspec/lib.email": "3.7.13",
464
+ "@contractspec/lib.example-shared-ui": "6.0.17",
465
+ "@contractspec/lib.logger": "3.7.13",
466
+ "@contractspec/lib.runtime-sandbox": "2.7.14",
467
+ "@contractspec/lib.ui-kit-core": "3.7.13",
468
+ "@contractspec/lib.ui-kit-web": "3.9.9",
469
+ "@contractspec/lib.ui-link": "3.7.13",
470
+ "@contractspec/module.examples": "3.8.9",
365
471
  "@electric-sql/pglite": "^0.4.2",
366
472
  "@hookform/resolvers": "^5.2.2",
367
473
  "@scaleway/sdk": "^3.4.1",
@@ -376,9 +482,9 @@
376
482
  },
377
483
  "devDependencies": {
378
484
  "@types/react": "~19.2.14",
379
- "@contractspec/tool.typescript": "3.7.11",
485
+ "@contractspec/tool.typescript": "3.7.13",
380
486
  "typescript": "^5.9.3",
381
- "@contractspec/tool.bun": "3.7.11"
487
+ "@contractspec/tool.bun": "3.7.13"
382
488
  },
383
489
  "publishConfig": {
384
490
  "access": "public",
@@ -566,6 +672,83 @@
566
672
  "node": "./dist/node/components/templates/index.js",
567
673
  "default": "./dist/components/templates/index.js"
568
674
  },
675
+ "./components/templates/template-catalog": {
676
+ "types": "./dist/components/templates/template-catalog.d.ts",
677
+ "browser": "./dist/browser/components/templates/template-catalog.js",
678
+ "bun": "./dist/components/templates/template-catalog.js",
679
+ "node": "./dist/node/components/templates/template-catalog.js",
680
+ "default": "./dist/components/templates/template-catalog.js"
681
+ },
682
+ "./components/templates/template-filters": {
683
+ "types": "./dist/components/templates/template-filters.d.ts",
684
+ "browser": "./dist/browser/components/templates/template-filters.js",
685
+ "bun": "./dist/components/templates/template-filters.js",
686
+ "node": "./dist/node/components/templates/template-filters.js",
687
+ "default": "./dist/components/templates/template-filters.js"
688
+ },
689
+ "./components/templates/template-new": {
690
+ "types": "./dist/components/templates/template-new.d.ts",
691
+ "browser": "./dist/browser/components/templates/template-new.js",
692
+ "bun": "./dist/components/templates/template-new.js",
693
+ "node": "./dist/node/components/templates/template-new.js",
694
+ "default": "./dist/components/templates/template-new.js"
695
+ },
696
+ "./components/templates/template-preview": {
697
+ "types": "./dist/components/templates/template-preview.d.ts",
698
+ "browser": "./dist/browser/components/templates/template-preview.js",
699
+ "bun": "./dist/components/templates/template-preview.js",
700
+ "node": "./dist/node/components/templates/template-preview.js",
701
+ "default": "./dist/components/templates/template-preview.js"
702
+ },
703
+ "./components/templates/template-source": {
704
+ "types": "./dist/components/templates/template-source.d.ts",
705
+ "browser": "./dist/browser/components/templates/template-source.js",
706
+ "bun": "./dist/components/templates/template-source.js",
707
+ "node": "./dist/node/components/templates/template-source.js",
708
+ "default": "./dist/components/templates/template-source.js"
709
+ },
710
+ "./components/templates/template-tag-visibility": {
711
+ "types": "./dist/components/templates/template-tag-visibility.d.ts",
712
+ "browser": "./dist/browser/components/templates/template-tag-visibility.js",
713
+ "bun": "./dist/components/templates/template-tag-visibility.js",
714
+ "node": "./dist/node/components/templates/template-tag-visibility.js",
715
+ "default": "./dist/components/templates/template-tag-visibility.js"
716
+ },
717
+ "./components/templates/TemplateCard": {
718
+ "types": "./dist/components/templates/TemplateCard.d.ts",
719
+ "browser": "./dist/browser/components/templates/TemplateCard.js",
720
+ "bun": "./dist/components/templates/TemplateCard.js",
721
+ "node": "./dist/node/components/templates/TemplateCard.js",
722
+ "default": "./dist/components/templates/TemplateCard.js"
723
+ },
724
+ "./components/templates/TemplateCommandDialog": {
725
+ "types": "./dist/components/templates/TemplateCommandDialog.d.ts",
726
+ "browser": "./dist/browser/components/templates/TemplateCommandDialog.js",
727
+ "bun": "./dist/components/templates/TemplateCommandDialog.js",
728
+ "node": "./dist/node/components/templates/TemplateCommandDialog.js",
729
+ "default": "./dist/components/templates/TemplateCommandDialog.js"
730
+ },
731
+ "./components/templates/TemplatePreviewContent": {
732
+ "types": "./dist/components/templates/TemplatePreviewContent.d.ts",
733
+ "browser": "./dist/browser/components/templates/TemplatePreviewContent.js",
734
+ "bun": "./dist/components/templates/TemplatePreviewContent.js",
735
+ "node": "./dist/node/components/templates/TemplatePreviewContent.js",
736
+ "default": "./dist/components/templates/TemplatePreviewContent.js"
737
+ },
738
+ "./components/templates/TemplatesBrowseControls": {
739
+ "types": "./dist/components/templates/TemplatesBrowseControls.d.ts",
740
+ "browser": "./dist/browser/components/templates/TemplatesBrowseControls.js",
741
+ "bun": "./dist/components/templates/TemplatesBrowseControls.js",
742
+ "node": "./dist/node/components/templates/TemplatesBrowseControls.js",
743
+ "default": "./dist/components/templates/TemplatesBrowseControls.js"
744
+ },
745
+ "./components/templates/TemplatesCatalogSection": {
746
+ "types": "./dist/components/templates/TemplatesCatalogSection.d.ts",
747
+ "browser": "./dist/browser/components/templates/TemplatesCatalogSection.js",
748
+ "bun": "./dist/components/templates/TemplatesCatalogSection.js",
749
+ "node": "./dist/node/components/templates/TemplatesCatalogSection.js",
750
+ "default": "./dist/components/templates/TemplatesCatalogSection.js"
751
+ },
569
752
  "./components/templates/TemplatesClientPage": {
570
753
  "types": "./dist/components/templates/TemplatesClientPage.d.ts",
571
754
  "browser": "./dist/browser/components/templates/TemplatesClientPage.js",
@@ -573,6 +756,27 @@
573
756
  "node": "./dist/node/components/templates/TemplatesClientPage.js",
574
757
  "default": "./dist/components/templates/TemplatesClientPage.js"
575
758
  },
759
+ "./components/templates/TemplatesHeroSection": {
760
+ "types": "./dist/components/templates/TemplatesHeroSection.d.ts",
761
+ "browser": "./dist/browser/components/templates/TemplatesHeroSection.js",
762
+ "bun": "./dist/components/templates/TemplatesHeroSection.js",
763
+ "node": "./dist/node/components/templates/TemplatesHeroSection.js",
764
+ "default": "./dist/components/templates/TemplatesHeroSection.js"
765
+ },
766
+ "./components/templates/TemplatesNextStepsSection": {
767
+ "types": "./dist/components/templates/TemplatesNextStepsSection.d.ts",
768
+ "browser": "./dist/browser/components/templates/TemplatesNextStepsSection.js",
769
+ "bun": "./dist/components/templates/TemplatesNextStepsSection.js",
770
+ "node": "./dist/node/components/templates/TemplatesNextStepsSection.js",
771
+ "default": "./dist/components/templates/TemplatesNextStepsSection.js"
772
+ },
773
+ "./components/templates/TemplatesOverlays": {
774
+ "types": "./dist/components/templates/TemplatesOverlays.d.ts",
775
+ "browser": "./dist/browser/components/templates/TemplatesOverlays.js",
776
+ "bun": "./dist/components/templates/TemplatesOverlays.js",
777
+ "node": "./dist/node/components/templates/TemplatesOverlays.js",
778
+ "default": "./dist/components/templates/TemplatesOverlays.js"
779
+ },
576
780
  "./components/templates/TemplatesPage": {
577
781
  "types": "./dist/components/templates/TemplatesPage.d.ts",
578
782
  "browser": "./dist/browser/components/templates/TemplatesPage.js",
@@ -587,6 +791,13 @@
587
791
  "node": "./dist/node/components/templates/TemplatesPreviewModal.js",
588
792
  "default": "./dist/components/templates/TemplatesPreviewModal.js"
589
793
  },
794
+ "./components/templates/useTemplateBrowseState": {
795
+ "types": "./dist/components/templates/useTemplateBrowseState.d.ts",
796
+ "browser": "./dist/browser/components/templates/useTemplateBrowseState.js",
797
+ "bun": "./dist/components/templates/useTemplateBrowseState.js",
798
+ "node": "./dist/node/components/templates/useTemplateBrowseState.js",
799
+ "default": "./dist/components/templates/useTemplateBrowseState.js"
800
+ },
590
801
  "./libs/email/client": {
591
802
  "types": "./dist/libs/email/client.d.ts",
592
803
  "browser": "./dist/browser/libs/email/client.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
+ }