@contractspec/bundle.marketing 3.8.9 → 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.
- package/.turbo/turbo-build.log +54 -42
- package/CHANGELOG.md +33 -0
- package/dist/browser/components/templates/TemplatesBrowseControls.js +37 -22
- package/dist/browser/components/templates/TemplatesCatalogSection.js +29 -6
- package/dist/browser/components/templates/TemplatesClientPage.js +269 -89
- package/dist/browser/components/templates/TemplatesOverlays.js +2874 -0
- package/dist/browser/components/templates/index.js +301 -121
- package/dist/browser/components/templates/template-catalog.js +5 -3
- package/dist/browser/components/templates/template-filters.js +99 -0
- package/dist/browser/components/templates/template-tag-visibility.js +40 -0
- package/dist/browser/components/templates/useTemplateBrowseState.js +191 -0
- package/dist/browser/index.js +301 -121
- package/dist/components/templates/TemplatesBrowseControls.d.ts +7 -2
- package/dist/components/templates/TemplatesBrowseControls.js +37 -22
- package/dist/components/templates/TemplatesCatalogSection.d.ts +4 -1
- package/dist/components/templates/TemplatesCatalogSection.js +29 -6
- package/dist/components/templates/TemplatesClientPage.js +269 -89
- package/dist/components/templates/TemplatesOverlays.d.ts +10 -0
- package/dist/components/templates/TemplatesOverlays.js +2869 -0
- package/dist/components/templates/index.js +301 -121
- package/dist/components/templates/template-catalog.d.ts +1 -0
- package/dist/components/templates/template-catalog.js +5 -3
- package/dist/components/templates/template-filters.d.ts +12 -0
- package/dist/components/templates/template-filters.js +94 -0
- package/dist/components/templates/template-tag-visibility.d.ts +10 -0
- package/dist/components/templates/template-tag-visibility.js +35 -0
- package/dist/components/templates/useTemplateBrowseState.d.ts +22 -0
- package/dist/components/templates/useTemplateBrowseState.js +186 -0
- package/dist/index.js +301 -121
- package/dist/node/components/templates/TemplatesBrowseControls.js +37 -22
- package/dist/node/components/templates/TemplatesCatalogSection.js +29 -6
- package/dist/node/components/templates/TemplatesClientPage.js +269 -89
- package/dist/node/components/templates/TemplatesOverlays.js +2869 -0
- package/dist/node/components/templates/index.js +301 -121
- package/dist/node/components/templates/template-catalog.js +5 -3
- package/dist/node/components/templates/template-filters.js +94 -0
- package/dist/node/components/templates/template-tag-visibility.js +35 -0
- package/dist/node/components/templates/useTemplateBrowseState.js +186 -0
- package/dist/node/index.js +301 -121
- package/package.json +82 -26
- package/src/components/templates/TemplatesBrowseControls.tsx +59 -35
- package/src/components/templates/TemplatesCatalogSection.tsx +29 -4
- package/src/components/templates/TemplatesClientPage.tsx +41 -97
- package/src/components/templates/TemplatesOverlays.tsx +65 -0
- package/src/components/templates/template-catalog.test.ts +96 -0
- package/src/components/templates/template-catalog.ts +14 -6
- package/src/components/templates/template-filters.ts +57 -0
- package/src/components/templates/template-tag-visibility.ts +58 -0
- package/src/components/templates/useTemplateBrowseState.ts +101 -0
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,33 +1,37 @@
|
|
|
1
1
|
$ contractspec-bun-build prebuild
|
|
2
2
|
$ bun run build:bundle && bun run build:types
|
|
3
3
|
$ contractspec-bun-build transpile
|
|
4
|
-
[contractspec-bun-build] transpile target=bun root=src entries=
|
|
5
|
-
Bundled
|
|
4
|
+
[contractspec-bun-build] transpile target=bun root=src entries=60 noBundle=false
|
|
5
|
+
Bundled 60 modules in 32ms
|
|
6
6
|
|
|
7
7
|
bundles/MarketingBundle.js 8.0 KB (entry point)
|
|
8
|
-
|
|
9
|
-
|
|
8
|
+
./index.js 225.25 KB (entry point)
|
|
9
|
+
libs/email/waitlist-application.js 11.18 KB (entry point)
|
|
10
|
+
libs/email/waitlist.js 7.48 KB (entry point)
|
|
10
11
|
registry/index.js 154.47 KB (entry point)
|
|
11
12
|
registry/types.js 8 bytes (entry point)
|
|
12
13
|
registry/utils.js 154.1 KB (entry point)
|
|
13
14
|
registry/engine.js 152.52 KB (entry point)
|
|
14
15
|
registry/registry.js 151.99 KB (entry point)
|
|
15
|
-
registry/registry-docs.js 27.11 KB (entry point)
|
|
16
16
|
registry/registry-landing.js 124.66 KB (entry point)
|
|
17
|
+
registry/registry-docs.js 27.11 KB (entry point)
|
|
17
18
|
registry/factory.js 1.35 KB (entry point)
|
|
18
19
|
libs/email/newsletter.js 6.88 KB (entry point)
|
|
19
|
-
libs/email/
|
|
20
|
-
|
|
21
|
-
components/templates/index.js 170.18 KB (entry point)
|
|
20
|
+
libs/email/types.js 49 bytes (entry point)
|
|
21
|
+
components/templates/index.js 176.50 KB (entry point)
|
|
22
22
|
components/templates/TemplatesPage.js 6.85 KB (entry point)
|
|
23
|
-
components/templates/TemplatesClientPage.js
|
|
24
|
-
components/templates/
|
|
23
|
+
components/templates/TemplatesClientPage.js 169.52 KB (entry point)
|
|
24
|
+
components/templates/useTemplateBrowseState.js 7.78 KB (entry point)
|
|
25
25
|
components/templates/template-source.js 379 bytes (entry point)
|
|
26
|
+
components/templates/template-tag-visibility.js 1.13 KB (entry point)
|
|
27
|
+
components/templates/TemplatesOverlays.js 134.37 KB (entry point)
|
|
28
|
+
components/templates/TemplatesPreviewModal.js 7.43 KB (entry point)
|
|
29
|
+
components/templates/template-filters.js 4.1 KB (entry point)
|
|
26
30
|
components/templates/TemplateCommandDialog.js 3.99 KB (entry point)
|
|
27
31
|
components/templates/TemplatePreviewContent.js 5.19 KB (entry point)
|
|
28
|
-
components/templates/TemplatesBrowseControls.js
|
|
29
|
-
components/templates/TemplatesCatalogSection.js
|
|
30
|
-
components/templates/template-catalog.js 3.
|
|
32
|
+
components/templates/TemplatesBrowseControls.js 6.0 KB (entry point)
|
|
33
|
+
components/templates/TemplatesCatalogSection.js 12.73 KB (entry point)
|
|
34
|
+
components/templates/template-catalog.js 3.20 KB (entry point)
|
|
31
35
|
components/templates/template-new.js 414 bytes (entry point)
|
|
32
36
|
components/templates/template-preview.js 1.1 KB (entry point)
|
|
33
37
|
components/templates/TemplateCard.js 2.92 KB (entry point)
|
|
@@ -54,40 +58,44 @@ Bundled 56 modules in 23ms
|
|
|
54
58
|
components/marketing/CofounderPage.js 10.29 KB (entry point)
|
|
55
59
|
components/marketing/ContactClient.js 19.15 KB (entry point)
|
|
56
60
|
libs/email/contact.js 6.12 KB (entry point)
|
|
57
|
-
libs/email/client.js 3.42 KB (entry point)
|
|
58
61
|
libs/email/utils.js 311 bytes (entry point)
|
|
62
|
+
libs/email/client.js 3.42 KB (entry point)
|
|
59
63
|
components/marketing/studio-signup-section.js 2.58 KB (entry point)
|
|
60
64
|
components/marketing/ContributePage.js 11.12 KB (entry point)
|
|
61
65
|
components/marketing/DesignPartnerPage.js 10.45 KB (entry point)
|
|
62
66
|
components/marketing/LandingPage.js 25.71 KB (entry point)
|
|
63
67
|
|
|
64
|
-
[contractspec-bun-build] transpile target=node root=src entries=
|
|
65
|
-
Bundled
|
|
68
|
+
[contractspec-bun-build] transpile target=node root=src entries=60 noBundle=false
|
|
69
|
+
Bundled 60 modules in 32ms
|
|
66
70
|
|
|
67
71
|
bundles/MarketingBundle.js 8.1 KB (entry point)
|
|
68
|
-
|
|
69
|
-
|
|
72
|
+
./index.js 225.22 KB (entry point)
|
|
73
|
+
libs/email/waitlist-application.js 11.23 KB (entry point)
|
|
74
|
+
libs/email/waitlist.js 7.53 KB (entry point)
|
|
70
75
|
registry/index.js 154.50 KB (entry point)
|
|
71
76
|
registry/types.js 0 KB (entry point)
|
|
72
77
|
registry/utils.js 154.1 KB (entry point)
|
|
73
78
|
registry/engine.js 152.56 KB (entry point)
|
|
74
79
|
registry/registry.js 152.0 KB (entry point)
|
|
75
|
-
registry/registry-docs.js 27.18 KB (entry point)
|
|
76
80
|
registry/registry-landing.js 124.69 KB (entry point)
|
|
81
|
+
registry/registry-docs.js 27.18 KB (entry point)
|
|
77
82
|
registry/factory.js 1.42 KB (entry point)
|
|
78
83
|
libs/email/newsletter.js 6.93 KB (entry point)
|
|
79
|
-
libs/email/
|
|
80
|
-
|
|
81
|
-
components/templates/index.js 170.20 KB (entry point)
|
|
84
|
+
libs/email/types.js 41 bytes (entry point)
|
|
85
|
+
components/templates/index.js 176.52 KB (entry point)
|
|
82
86
|
components/templates/TemplatesPage.js 6.91 KB (entry point)
|
|
83
|
-
components/templates/TemplatesClientPage.js
|
|
84
|
-
components/templates/
|
|
87
|
+
components/templates/TemplatesClientPage.js 169.54 KB (entry point)
|
|
88
|
+
components/templates/useTemplateBrowseState.js 7.84 KB (entry point)
|
|
85
89
|
components/templates/template-source.js 443 bytes (entry point)
|
|
90
|
+
components/templates/template-tag-visibility.js 1.19 KB (entry point)
|
|
91
|
+
components/templates/TemplatesOverlays.js 134.41 KB (entry point)
|
|
92
|
+
components/templates/TemplatesPreviewModal.js 7.50 KB (entry point)
|
|
93
|
+
components/templates/template-filters.js 4.13 KB (entry point)
|
|
86
94
|
components/templates/TemplateCommandDialog.js 4.1 KB (entry point)
|
|
87
95
|
components/templates/TemplatePreviewContent.js 5.26 KB (entry point)
|
|
88
|
-
components/templates/TemplatesBrowseControls.js
|
|
89
|
-
components/templates/TemplatesCatalogSection.js
|
|
90
|
-
components/templates/template-catalog.js 3.
|
|
96
|
+
components/templates/TemplatesBrowseControls.js 6.1 KB (entry point)
|
|
97
|
+
components/templates/TemplatesCatalogSection.js 12.79 KB (entry point)
|
|
98
|
+
components/templates/template-catalog.js 3.27 KB (entry point)
|
|
91
99
|
components/templates/template-new.js 478 bytes (entry point)
|
|
92
100
|
components/templates/template-preview.js 1.15 KB (entry point)
|
|
93
101
|
components/templates/TemplateCard.js 2.98 KB (entry point)
|
|
@@ -114,40 +122,44 @@ Bundled 56 modules in 21ms
|
|
|
114
122
|
components/marketing/CofounderPage.js 10.35 KB (entry point)
|
|
115
123
|
components/marketing/ContactClient.js 19.21 KB (entry point)
|
|
116
124
|
libs/email/contact.js 6.18 KB (entry point)
|
|
117
|
-
libs/email/client.js 3.48 KB (entry point)
|
|
118
125
|
libs/email/utils.js 375 bytes (entry point)
|
|
126
|
+
libs/email/client.js 3.48 KB (entry point)
|
|
119
127
|
components/marketing/studio-signup-section.js 2.64 KB (entry point)
|
|
120
128
|
components/marketing/ContributePage.js 11.19 KB (entry point)
|
|
121
129
|
components/marketing/DesignPartnerPage.js 10.51 KB (entry point)
|
|
122
130
|
components/marketing/LandingPage.js 25.76 KB (entry point)
|
|
123
131
|
|
|
124
|
-
[contractspec-bun-build] transpile target=browser root=src entries=
|
|
125
|
-
Bundled
|
|
132
|
+
[contractspec-bun-build] transpile target=browser root=src entries=60 noBundle=false
|
|
133
|
+
Bundled 60 modules in 29ms
|
|
126
134
|
|
|
127
135
|
bundles/MarketingBundle.js 8.36 KB (entry point)
|
|
128
|
-
|
|
129
|
-
|
|
136
|
+
./index.js 225.48 KB (entry point)
|
|
137
|
+
libs/email/waitlist-application.js 11.49 KB (entry point)
|
|
138
|
+
libs/email/waitlist.js 7.79 KB (entry point)
|
|
130
139
|
registry/index.js 154.76 KB (entry point)
|
|
131
140
|
registry/types.js 0 KB (entry point)
|
|
132
141
|
registry/utils.js 154.36 KB (entry point)
|
|
133
142
|
registry/engine.js 152.82 KB (entry point)
|
|
134
143
|
registry/registry.js 152.28 KB (entry point)
|
|
135
|
-
registry/registry-docs.js 27.44 KB (entry point)
|
|
136
144
|
registry/registry-landing.js 124.95 KB (entry point)
|
|
145
|
+
registry/registry-docs.js 27.44 KB (entry point)
|
|
137
146
|
registry/factory.js 1.68 KB (entry point)
|
|
138
147
|
libs/email/newsletter.js 7.19 KB (entry point)
|
|
139
|
-
libs/email/
|
|
140
|
-
|
|
141
|
-
components/templates/index.js 170.46 KB (entry point)
|
|
148
|
+
libs/email/types.js 41 bytes (entry point)
|
|
149
|
+
components/templates/index.js 176.78 KB (entry point)
|
|
142
150
|
components/templates/TemplatesPage.js 7.17 KB (entry point)
|
|
143
|
-
components/templates/TemplatesClientPage.js
|
|
144
|
-
components/templates/
|
|
151
|
+
components/templates/TemplatesClientPage.js 169.80 KB (entry point)
|
|
152
|
+
components/templates/useTemplateBrowseState.js 8.10 KB (entry point)
|
|
145
153
|
components/templates/template-source.js 0.70 KB (entry point)
|
|
154
|
+
components/templates/template-tag-visibility.js 1.45 KB (entry point)
|
|
155
|
+
components/templates/TemplatesOverlays.js 134.67 KB (entry point)
|
|
156
|
+
components/templates/TemplatesPreviewModal.js 7.76 KB (entry point)
|
|
157
|
+
components/templates/template-filters.js 4.39 KB (entry point)
|
|
146
158
|
components/templates/TemplateCommandDialog.js 4.31 KB (entry point)
|
|
147
159
|
components/templates/TemplatePreviewContent.js 5.52 KB (entry point)
|
|
148
|
-
components/templates/TemplatesBrowseControls.js
|
|
149
|
-
components/templates/TemplatesCatalogSection.js
|
|
150
|
-
components/templates/template-catalog.js 3.
|
|
160
|
+
components/templates/TemplatesBrowseControls.js 6.36 KB (entry point)
|
|
161
|
+
components/templates/TemplatesCatalogSection.js 13.0 KB (entry point)
|
|
162
|
+
components/templates/template-catalog.js 3.53 KB (entry point)
|
|
151
163
|
components/templates/template-new.js 0.74 KB (entry point)
|
|
152
164
|
components/templates/template-preview.js 1.41 KB (entry point)
|
|
153
165
|
components/templates/TemplateCard.js 3.24 KB (entry point)
|
|
@@ -174,8 +186,8 @@ Bundled 56 modules in 31ms
|
|
|
174
186
|
components/marketing/CofounderPage.js 10.61 KB (entry point)
|
|
175
187
|
components/marketing/ContactClient.js 19.47 KB (entry point)
|
|
176
188
|
libs/email/contact.js 6.44 KB (entry point)
|
|
177
|
-
libs/email/client.js 3.74 KB (entry point)
|
|
178
189
|
libs/email/utils.js 0.64 KB (entry point)
|
|
190
|
+
libs/email/client.js 3.74 KB (entry point)
|
|
179
191
|
components/marketing/studio-signup-section.js 2.90 KB (entry point)
|
|
180
192
|
components/marketing/ContributePage.js 11.45 KB (entry point)
|
|
181
193
|
components/marketing/DesignPartnerPage.js 10.77 KB (entry point)
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,38 @@
|
|
|
1
1
|
# @contractspec/bundle.marketing
|
|
2
2
|
|
|
3
|
+
## 3.8.10
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Fix workflow runtime imports for sandboxed workflow execution and keep workflow authoring on safe subpaths.
|
|
8
|
+
- Migration: Keep Node-only workflow runner code out of "use workflow" entrypoints.
|
|
9
|
+
- Deprecations: Importing the broad `@contractspec/lib.contracts-spec/workflow` barrel from sandboxed workflow entrypoints is discouraged.
|
|
10
|
+
- Updated dependencies because of Fix workflow runtime imports for sandboxed workflow execution and keep workflow authoring on safe subpaths.
|
|
11
|
+
- Updated dependencies because of Add versioning-backed release capsules, generated patch notes, and guided upgrade flows.
|
|
12
|
+
- @contractspec/lib.contracts-runtime-client-react@3.8.5
|
|
13
|
+
- @contractspec/example.visualization-showcase@3.9.9
|
|
14
|
+
- @contractspec/example.analytics-dashboard@3.9.9
|
|
15
|
+
- @contractspec/example.data-grid-showcase@3.8.9
|
|
16
|
+
- @contractspec/example.ai-chat-assistant@3.8.9
|
|
17
|
+
- @contractspec/example.saas-boilerplate@3.8.9
|
|
18
|
+
- @contractspec/example.integration-hub@3.8.9
|
|
19
|
+
- @contractspec/example.workflow-system@3.8.9
|
|
20
|
+
- @contractspec/example.agent-console@3.8.9
|
|
21
|
+
- @contractspec/lib.example-shared-ui@6.0.17
|
|
22
|
+
- @contractspec/example.crm-pipeline@3.7.17
|
|
23
|
+
- @contractspec/example.marketplace@3.8.9
|
|
24
|
+
- @contractspec/lib.runtime-sandbox@2.7.14
|
|
25
|
+
- @contractspec/lib.surface-runtime@0.5.17
|
|
26
|
+
- @contractspec/lib.contracts-spec@5.1.0
|
|
27
|
+
- @contractspec/lib.design-system@3.8.10
|
|
28
|
+
- @contractspec/lib.ui-kit-core@3.7.13
|
|
29
|
+
- @contractspec/module.examples@3.8.9
|
|
30
|
+
- @contractspec/bundle.library@3.8.10
|
|
31
|
+
- @contractspec/lib.ui-kit-web@3.9.9
|
|
32
|
+
- @contractspec/lib.ui-link@3.7.13
|
|
33
|
+
- @contractspec/lib.logger@3.7.13
|
|
34
|
+
- @contractspec/lib.email@3.7.13
|
|
35
|
+
|
|
3
36
|
## 3.8.9
|
|
4
37
|
|
|
5
38
|
### Patch Changes
|
|
@@ -20,7 +20,11 @@ function TemplatesBrowseControls({
|
|
|
20
20
|
onSearchChange,
|
|
21
21
|
selectedTag,
|
|
22
22
|
onTagChange,
|
|
23
|
-
|
|
23
|
+
showTagFilters,
|
|
24
|
+
visibleTagFacets,
|
|
25
|
+
hiddenTagFacets,
|
|
26
|
+
showAllTags,
|
|
27
|
+
onShowAllTagsChange
|
|
24
28
|
}) {
|
|
25
29
|
return /* @__PURE__ */ jsxDEV("section", {
|
|
26
30
|
className: "editorial-section",
|
|
@@ -81,29 +85,40 @@ function TemplatesBrowseControls({
|
|
|
81
85
|
}, undefined, false, undefined, this)
|
|
82
86
|
]
|
|
83
87
|
}, undefined, true, undefined, this),
|
|
84
|
-
/* @__PURE__ */ jsxDEV("div", {
|
|
85
|
-
className: "
|
|
88
|
+
showTagFilters ? /* @__PURE__ */ jsxDEV("div", {
|
|
89
|
+
className: "space-y-3",
|
|
86
90
|
children: [
|
|
87
|
-
/* @__PURE__ */ jsxDEV("
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
91
|
+
/* @__PURE__ */ jsxDEV("div", {
|
|
92
|
+
className: "flex flex-wrap gap-2",
|
|
93
|
+
children: [
|
|
94
|
+
/* @__PURE__ */ jsxDEV("button", {
|
|
95
|
+
onClick: () => onTagChange(null),
|
|
96
|
+
className: cn("rounded-full px-4 py-2 font-medium text-sm transition-colors", {
|
|
97
|
+
"bg-primary text-primary-foreground": selectedTag === null,
|
|
98
|
+
"border border-border bg-card hover:bg-card/80": selectedTag !== null
|
|
99
|
+
}),
|
|
100
|
+
"aria-pressed": selectedTag === null,
|
|
101
|
+
children: "All"
|
|
102
|
+
}, undefined, false, undefined, this),
|
|
103
|
+
visibleTagFacets.map((facet) => /* @__PURE__ */ jsxDEV("button", {
|
|
104
|
+
onClick: () => onTagChange(facet.tag),
|
|
105
|
+
className: cn("rounded-full px-4 py-2 font-medium text-sm transition-colors", {
|
|
106
|
+
"bg-primary text-primary-foreground": selectedTag === facet.tag,
|
|
107
|
+
"border border-border bg-card hover:bg-card/80": selectedTag !== facet.tag
|
|
108
|
+
}),
|
|
109
|
+
"aria-pressed": selectedTag === facet.tag,
|
|
110
|
+
children: facet.tag
|
|
111
|
+
}, facet.tag, false, undefined, this))
|
|
112
|
+
]
|
|
113
|
+
}, undefined, true, undefined, this),
|
|
114
|
+
hiddenTagFacets.length > 0 || showAllTags ? /* @__PURE__ */ jsxDEV("button", {
|
|
115
|
+
type: "button",
|
|
116
|
+
onClick: () => onShowAllTagsChange(!showAllTags),
|
|
117
|
+
className: "text-muted-foreground text-sm transition-colors hover:text-foreground",
|
|
118
|
+
children: showAllTags ? "Show fewer" : "More tags"
|
|
119
|
+
}, undefined, false, undefined, this) : null
|
|
105
120
|
]
|
|
106
|
-
}, undefined, true, undefined, this)
|
|
121
|
+
}, undefined, true, undefined, this) : null
|
|
107
122
|
]
|
|
108
123
|
}, undefined, true, undefined, this)
|
|
109
124
|
]
|
|
@@ -116,15 +116,16 @@ function buildLocalTemplateCatalog(examples = listExamples(), templates = listTe
|
|
|
116
116
|
}).sort(compareLocalTemplateCatalogItems);
|
|
117
117
|
}
|
|
118
118
|
function matchesTemplateFilters(template, search, selectedTag) {
|
|
119
|
+
return matchesTemplateSearch(template, search) && (selectedTag === null || template.tags.includes(selectedTag));
|
|
120
|
+
}
|
|
121
|
+
function matchesTemplateSearch(template, search) {
|
|
119
122
|
const haystack = [
|
|
120
123
|
template.title,
|
|
121
124
|
template.description,
|
|
122
125
|
template.tags.join(" ")
|
|
123
126
|
].join(" ").toLowerCase();
|
|
124
127
|
const searchTokens = search.trim().toLowerCase().split(/\s+/).filter(Boolean);
|
|
125
|
-
|
|
126
|
-
const matchesTag = selectedTag === null || template.tags.includes(selectedTag);
|
|
127
|
-
return matchesSearch && matchesTag;
|
|
128
|
+
return searchTokens.length === 0 || searchTokens.every((token) => haystack.includes(token));
|
|
128
129
|
}
|
|
129
130
|
function formatExampleKindLabel(kind) {
|
|
130
131
|
return kind.split("-").map((part) => part.charAt(0).toUpperCase() + part.slice(1)).join(" ");
|
|
@@ -185,13 +186,17 @@ function TemplatesCatalogSection({
|
|
|
185
186
|
source,
|
|
186
187
|
registryConfigured,
|
|
187
188
|
registryLoading,
|
|
189
|
+
registryHasTemplates,
|
|
188
190
|
localTemplates,
|
|
189
191
|
registryTemplates,
|
|
190
192
|
localTemplateById,
|
|
191
193
|
onPreview,
|
|
192
|
-
onUseTemplate
|
|
194
|
+
onUseTemplate,
|
|
195
|
+
hasSearch,
|
|
196
|
+
selectedTag
|
|
193
197
|
}) {
|
|
194
198
|
const showRegistry = source === "registry" && registryConfigured;
|
|
199
|
+
const emptyStateMessage = getEmptyStateMessage(hasSearch, selectedTag);
|
|
195
200
|
return /* @__PURE__ */ jsxDEV2("section", {
|
|
196
201
|
className: "section-padding",
|
|
197
202
|
children: /* @__PURE__ */ jsxDEV2("div", {
|
|
@@ -202,12 +207,18 @@ function TemplatesCatalogSection({
|
|
|
202
207
|
className: "text-muted-foreground",
|
|
203
208
|
children: "Loading community templates…"
|
|
204
209
|
}, undefined, false, undefined, this)
|
|
205
|
-
}, undefined, false, undefined, this) :
|
|
210
|
+
}, undefined, false, undefined, this) : !registryHasTemplates ? /* @__PURE__ */ jsxDEV2("div", {
|
|
206
211
|
className: "py-12 text-center",
|
|
207
212
|
children: /* @__PURE__ */ jsxDEV2("p", {
|
|
208
213
|
className: "text-muted-foreground",
|
|
209
214
|
children: "No community templates found."
|
|
210
215
|
}, undefined, false, undefined, this)
|
|
216
|
+
}, undefined, false, undefined, this) : registryTemplates.length === 0 ? /* @__PURE__ */ jsxDEV2("div", {
|
|
217
|
+
className: "py-12 text-center",
|
|
218
|
+
children: /* @__PURE__ */ jsxDEV2("p", {
|
|
219
|
+
className: "text-muted-foreground",
|
|
220
|
+
children: emptyStateMessage
|
|
221
|
+
}, undefined, false, undefined, this)
|
|
211
222
|
}, undefined, false, undefined, this) : /* @__PURE__ */ jsxDEV2("div", {
|
|
212
223
|
className: "grid gap-6 md:grid-cols-2 lg:grid-cols-3",
|
|
213
224
|
children: registryTemplates.map((template) => {
|
|
@@ -243,7 +254,7 @@ function TemplatesCatalogSection({
|
|
|
243
254
|
className: "py-12 text-center",
|
|
244
255
|
children: /* @__PURE__ */ jsxDEV2("p", {
|
|
245
256
|
className: "text-muted-foreground",
|
|
246
|
-
children:
|
|
257
|
+
children: emptyStateMessage
|
|
247
258
|
}, undefined, false, undefined, this)
|
|
248
259
|
}, undefined, false, undefined, this) : /* @__PURE__ */ jsxDEV2("div", {
|
|
249
260
|
className: "grid gap-6 md:grid-cols-2 lg:grid-cols-3",
|
|
@@ -279,6 +290,18 @@ function TemplatesCatalogSection({
|
|
|
279
290
|
}, undefined, false, undefined, this)
|
|
280
291
|
}, undefined, false, undefined, this);
|
|
281
292
|
}
|
|
293
|
+
function getEmptyStateMessage(hasSearch, selectedTag) {
|
|
294
|
+
if (selectedTag !== null && hasSearch) {
|
|
295
|
+
return "No templates match this tag for the current search.";
|
|
296
|
+
}
|
|
297
|
+
if (selectedTag !== null) {
|
|
298
|
+
return "No templates match this tag. Try another tag or reset filters.";
|
|
299
|
+
}
|
|
300
|
+
if (hasSearch) {
|
|
301
|
+
return "No templates match your search. Try a different keyword.";
|
|
302
|
+
}
|
|
303
|
+
return "No templates match your filters. Try a different search.";
|
|
304
|
+
}
|
|
282
305
|
export {
|
|
283
306
|
TemplatesCatalogSection
|
|
284
307
|
};
|