@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
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import type {
|
|
2
|
+
RegistryTemplate,
|
|
3
|
+
TemplateId,
|
|
4
|
+
} from '@contractspec/lib.example-shared-ui';
|
|
5
|
+
import type { LocalTemplateCatalogItem } from './template-catalog';
|
|
6
|
+
|
|
7
|
+
export type TemplatePreviewAction =
|
|
8
|
+
| { kind: 'modal'; templateId: TemplateId }
|
|
9
|
+
| { kind: 'sandbox'; href: string }
|
|
10
|
+
| { kind: 'disabled' };
|
|
11
|
+
|
|
12
|
+
export type LocalTemplatePreviewAction = Exclude<
|
|
13
|
+
TemplatePreviewAction,
|
|
14
|
+
{ kind: 'disabled' }
|
|
15
|
+
>;
|
|
16
|
+
|
|
17
|
+
export const INLINE_TEMPLATE_PREVIEW_IDS = [
|
|
18
|
+
'agent-console',
|
|
19
|
+
'ai-chat-assistant',
|
|
20
|
+
'analytics-dashboard',
|
|
21
|
+
'crm-pipeline',
|
|
22
|
+
'data-grid-showcase',
|
|
23
|
+
'integration-hub',
|
|
24
|
+
'marketplace',
|
|
25
|
+
'saas-boilerplate',
|
|
26
|
+
'visualization-showcase',
|
|
27
|
+
'workflow-system',
|
|
28
|
+
] as const;
|
|
29
|
+
|
|
30
|
+
const INLINE_TEMPLATE_PREVIEW_SET = new Set<string>(
|
|
31
|
+
INLINE_TEMPLATE_PREVIEW_IDS
|
|
32
|
+
);
|
|
33
|
+
|
|
34
|
+
export function supportsInlineTemplatePreview(templateId: TemplateId): boolean {
|
|
35
|
+
return INLINE_TEMPLATE_PREVIEW_SET.has(templateId);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export function getLocalTemplatePreviewAction(
|
|
39
|
+
template: LocalTemplateCatalogItem
|
|
40
|
+
): LocalTemplatePreviewAction {
|
|
41
|
+
if (supportsInlineTemplatePreview(template.id)) {
|
|
42
|
+
return { kind: 'modal', templateId: template.id };
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
return { kind: 'sandbox', href: template.previewUrl };
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
export function getRegistryTemplatePreviewAction(
|
|
49
|
+
template: RegistryTemplate,
|
|
50
|
+
localTemplate?: LocalTemplateCatalogItem
|
|
51
|
+
): TemplatePreviewAction {
|
|
52
|
+
if (!localTemplate) {
|
|
53
|
+
return { kind: 'disabled' };
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
return getLocalTemplatePreviewAction(localTemplate);
|
|
57
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export type TemplateSource = 'local' | 'registry';
|
|
2
|
+
|
|
3
|
+
export function isRegistryConfigured(
|
|
4
|
+
registryUrl: string | null | undefined
|
|
5
|
+
): boolean {
|
|
6
|
+
return Boolean(registryUrl?.trim());
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export function getAvailableTemplateSources(
|
|
10
|
+
registryUrl: string | null | undefined
|
|
11
|
+
): readonly TemplateSource[] {
|
|
12
|
+
return isRegistryConfigured(registryUrl) ? ['local', 'registry'] : ['local'];
|
|
13
|
+
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
$ contractspec-bun-build prebuild
|