convex-cms 0.0.5-alpha.4 → 0.0.5-alpha.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -3
- package/admin/src/components/Sidebar.tsx +150 -58
- package/admin/src/components/ui/collapsible.tsx +7 -0
- package/admin/src/embed/components/EmbedSidebar.tsx +163 -68
- package/admin-dist/nitro.json +1 -1
- package/admin-dist/public/assets/{CmsEmptyState-CkqBIab3.js → CmsEmptyState-Do_erIgn.js} +1 -1
- package/admin-dist/public/assets/{CmsPageHeader-CUtl5MMG.js → CmsPageHeader-qDwPGi48.js} +1 -1
- package/admin-dist/public/assets/{CmsStatusBadge-CUYFgEe-.js → CmsStatusBadge-Dd9uToHE.js} +1 -1
- package/admin-dist/public/assets/{CmsSurface-CsJfAVa3.js → CmsSurface-DBy5Lumx.js} +1 -1
- package/admin-dist/public/assets/{CmsToolbar-CnfbcxeP.js → CmsToolbar-D1-Y-7SK.js} +1 -1
- package/admin-dist/public/assets/ContentEntryEditor-CWBiIx52.js +4 -0
- package/admin-dist/public/assets/{TaxonomyFilter-CWCxC5HZ.js → TaxonomyFilter-CdYQawxb.js} +1 -1
- package/admin-dist/public/assets/_contentTypeId-D9VMP6Gs.js +1 -0
- package/admin-dist/public/assets/_entryId-2FlCfqE7.js +1 -0
- package/admin-dist/public/assets/{alert-CF1BSzGR.js → alert-GxZx0y5c.js} +1 -1
- package/admin-dist/public/assets/{badge-CmuOIVKp.js → badge-BAlGIjop.js} +1 -1
- package/admin-dist/public/assets/{circle-check-big-BKDVG6DU.js → circle-check-big-CpLxAvEj.js} +1 -1
- package/admin-dist/public/assets/{command-XJxnF2Sd.js → command-di7XCqcv.js} +1 -1
- package/admin-dist/public/assets/content-D8zELsDG.js +1 -0
- package/admin-dist/public/assets/{content-types-CrNEm8Hf.js → content-types-BmzD0krT.js} +2 -2
- package/admin-dist/public/assets/globals-BvFfH-v9.css +1 -0
- package/admin-dist/public/assets/{index-C7xOwudI.js → index-zqfj4T_v.js} +1 -1
- package/admin-dist/public/assets/{label-CHCnXeBk.js → label-B6PPtKR5.js} +1 -1
- package/admin-dist/public/assets/{link-2-Bb34judH.js → link-2-W2fVnVOf.js} +1 -1
- package/admin-dist/public/assets/{list-9Pzt48ld.js → list-F8O0lZXC.js} +1 -1
- package/admin-dist/public/assets/main-dZT72bAG.js +97 -0
- package/admin-dist/public/assets/media-CETueFbV.js +1 -0
- package/admin-dist/public/assets/new._contentTypeId-BV2-TyyR.js +1 -0
- package/admin-dist/public/assets/{plus-Ceef7DHk.js → plus-AABQIF0N.js} +1 -1
- package/admin-dist/public/assets/{rotate-ccw-7k7-4VUq.js → rotate-ccw-BZpZtw0N.js} +1 -1
- package/admin-dist/public/assets/{scroll-area-CC6wujnp.js → scroll-area-CDfk-zrz.js} +1 -1
- package/admin-dist/public/assets/{search-DwoUV2pv.js → search-BvgYr-c9.js} +1 -1
- package/admin-dist/public/assets/{select-hOZTp8aC.js → select-BuiHcMzS.js} +1 -1
- package/admin-dist/public/assets/settings-DBxbYDvn.js +1 -0
- package/admin-dist/public/assets/{switch-jX2pDaNU.js → switch-DiJvolcs.js} +1 -1
- package/admin-dist/public/assets/tabs-Cgz6G_Xy.js +1 -0
- package/admin-dist/public/assets/{tanstack-adapter-B-Glm4kH.js → tanstack-adapter-BknsSgra.js} +1 -1
- package/admin-dist/public/assets/taxonomies-DOErsLl5.js +1 -0
- package/admin-dist/public/assets/{textarea-B6SfBmr0.js → textarea-CgggMxUX.js} +1 -1
- package/admin-dist/public/assets/{trash-BOCnIznD.js → trash-BU4ANuaW.js} +1 -1
- package/admin-dist/public/assets/{triangle-alert-CXFIO_Gu.js → triangle-alert-lvCbwp0s.js} +1 -1
- package/admin-dist/public/assets/{useBreadcrumbLabel-_6qBagc3.js → useBreadcrumbLabel-D00rvqjw.js} +1 -1
- package/admin-dist/public/assets/{usePermissions-M1ijZ7a6.js → usePermissions-D7tQowaF.js} +1 -1
- package/admin-dist/server/_chunks/_libs/@radix-ui/react-collapsible.mjs +144 -0
- package/admin-dist/server/_chunks/_libs/@radix-ui/react-slot.mjs +21 -21
- package/admin-dist/server/_libs/lucide-react.mjs +131 -124
- package/admin-dist/server/_ssr/{CmsButton-DOiTVKQq.mjs → CmsButton-DbzfJru_.mjs} +1 -1
- package/admin-dist/server/_ssr/{CmsEmptyState-fbnGt3LD.mjs → CmsEmptyState-CuvcXr3Z.mjs} +3 -3
- package/admin-dist/server/_ssr/{CmsPageHeader-DHRrdOZa.mjs → CmsPageHeader-ClNPU7Up.mjs} +1 -1
- package/admin-dist/server/_ssr/{CmsStatusBadge-s7obWbKZ.mjs → CmsStatusBadge-CojMbrY7.mjs} +2 -2
- package/admin-dist/server/_ssr/{CmsSurface-rFoYjb62.mjs → CmsSurface-Dcv440rp.mjs} +1 -1
- package/admin-dist/server/_ssr/{CmsToolbar-zTE45z2q.mjs → CmsToolbar-BKv1nL6u.mjs} +2 -2
- package/admin-dist/server/_ssr/{ContentEntryEditor-BLoEjT_m.mjs → ContentEntryEditor-weiXSBdZ.mjs} +35 -51
- package/admin-dist/server/_ssr/{TaxonomyFilter-XAtaJC2z.mjs → TaxonomyFilter-BPQ57Mwk.mjs} +7 -7
- package/admin-dist/server/_ssr/{_contentTypeId-Csl4822C.mjs → _contentTypeId-DyyauLOs.mjs} +24 -23
- package/admin-dist/server/_ssr/{_entryId-D8alLFBx.mjs → _entryId-9Cafwxmw.mjs} +22 -21
- package/admin-dist/server/_ssr/_tanstack-start-manifest_v-Dk-FIYPN.mjs +4 -0
- package/admin-dist/server/_ssr/{command-C0Di14--.mjs → command-CEf8YBxY.mjs} +1 -1
- package/admin-dist/server/_ssr/{content-CT-FPsmV.mjs → content-ZFWVzO25.mjs} +20 -19
- package/admin-dist/server/_ssr/{content-types-C8cBFdzE.mjs → content-types-D25lUE-j.mjs} +18 -17
- package/admin-dist/server/_ssr/{index-BJtcrEc-.mjs → index-BlSIlH4Z.mjs} +10 -9
- package/admin-dist/server/_ssr/index.mjs +2 -2
- package/admin-dist/server/_ssr/{label-qn2Afwl4.mjs → label-PblVvdRv.mjs} +1 -1
- package/admin-dist/server/_ssr/{media-qv5IAsMZ.mjs → media-CD2_NUMw.mjs} +683 -314
- package/admin-dist/server/_ssr/{new._contentTypeId-DdGyrhqs.mjs → new._contentTypeId-dmZy6PBX.mjs} +20 -19
- package/admin-dist/server/_ssr/{router-nSVkxb6Y.mjs → router-x6Ab8T4s.mjs} +109 -43
- package/admin-dist/server/_ssr/{scroll-area-BCinP455.mjs → scroll-area-BH_1K-WT.mjs} +1 -1
- package/admin-dist/server/_ssr/{select-BKQlQScw.mjs → select-CrfEkFJw.mjs} +2 -2
- package/admin-dist/server/_ssr/{settings-BCr2KQlk.mjs → settings-DVdsoWoh.mjs} +158 -105
- package/admin-dist/server/_ssr/{switch-BaOi42fE.mjs → switch-DX_X8vZl.mjs} +1 -1
- package/admin-dist/server/_ssr/{tabs-DYXEi9kq.mjs → tabs-4FWM0sn8.mjs} +3 -3
- package/admin-dist/server/_ssr/{tanstack-adapter-Bsz8kha-.mjs → tanstack-adapter-D3ZcKtbY.mjs} +1 -1
- package/admin-dist/server/_ssr/{taxonomies-CueMHTbE.mjs → taxonomies-BHFfO9Yr.mjs} +21 -20
- package/admin-dist/server/_ssr/{textarea-CI0Jqx2x.mjs → textarea-CZVaroMc.mjs} +1 -1
- package/admin-dist/server/_ssr/{trash-DE6W8GoX.mjs → trash-9tUB2KwI.mjs} +14 -13
- package/admin-dist/server/_ssr/{useBreadcrumbLabel-B5Yi72lM.mjs → useBreadcrumbLabel-DVme3DSb.mjs} +1 -1
- package/admin-dist/server/_ssr/{usePermissions-C3nZ-Izm.mjs → usePermissions-zAQj-ruE.mjs} +1 -1
- package/admin-dist/server/index.mjs +188 -188
- package/dist/cli/commands/init.d.ts +12 -2
- package/dist/cli/commands/init.d.ts.map +1 -1
- package/dist/cli/commands/init.js +136 -138
- package/dist/cli/commands/init.js.map +1 -1
- package/dist/cli/index.js +2 -1
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/templates/admin.d.ts +10 -0
- package/dist/cli/templates/admin.d.ts.map +1 -0
- package/dist/cli/templates/admin.js +212 -0
- package/dist/cli/templates/admin.js.map +1 -0
- package/dist/cli/templates/cmsClient.d.ts +7 -0
- package/dist/cli/templates/cmsClient.d.ts.map +1 -0
- package/dist/cli/templates/cmsClient.js +36 -0
- package/dist/cli/templates/cmsClient.js.map +1 -0
- package/dist/cli/templates/cmsConfig.d.ts +7 -0
- package/dist/cli/templates/cmsConfig.d.ts.map +1 -0
- package/dist/cli/templates/cmsConfig.js +86 -0
- package/dist/cli/templates/cmsConfig.js.map +1 -0
- package/dist/cli/templates/index.d.ts +10 -0
- package/dist/cli/templates/index.d.ts.map +1 -0
- package/dist/cli/templates/index.js +10 -0
- package/dist/cli/templates/index.js.map +1 -0
- package/dist/cli/templates/schemas/blog.d.ts +8 -0
- package/dist/cli/templates/schemas/blog.d.ts.map +1 -0
- package/dist/cli/templates/schemas/blog.js +103 -0
- package/dist/cli/templates/schemas/blog.js.map +1 -0
- package/dist/cli/templates/schemas/docs.d.ts +8 -0
- package/dist/cli/templates/schemas/docs.d.ts.map +1 -0
- package/dist/cli/templates/schemas/docs.js +110 -0
- package/dist/cli/templates/schemas/docs.js.map +1 -0
- package/dist/cli/templates/schemas/index.d.ts +11 -0
- package/dist/cli/templates/schemas/index.d.ts.map +1 -0
- package/dist/cli/templates/schemas/index.js +13 -0
- package/dist/cli/templates/schemas/index.js.map +1 -0
- package/dist/cli/templates/schemas/landing.d.ts +8 -0
- package/dist/cli/templates/schemas/landing.d.ts.map +1 -0
- package/dist/cli/templates/schemas/landing.js +135 -0
- package/dist/cli/templates/schemas/landing.js.map +1 -0
- package/dist/cli/utils/fileUtils.d.ts +21 -0
- package/dist/cli/utils/fileUtils.d.ts.map +1 -0
- package/dist/cli/utils/fileUtils.js +95 -0
- package/dist/cli/utils/fileUtils.js.map +1 -0
- package/dist/cli/utils/prompts.d.ts +25 -0
- package/dist/cli/utils/prompts.d.ts.map +1 -0
- package/dist/cli/utils/prompts.js +87 -0
- package/dist/cli/utils/prompts.js.map +1 -0
- package/dist/client/agentTools.d.ts +1 -1427
- package/dist/client/agentTools.d.ts.map +1 -1
- package/dist/component/contentTypeMutations.d.ts +1 -1
- package/dist/test.d.ts +5 -0
- package/dist/test.d.ts.map +1 -1
- package/dist/test.js +0 -1
- package/dist/test.js.map +1 -1
- package/package.json +28 -28
- package/admin/README.md +0 -99
- package/admin-dist/public/assets/ContentEntryEditor-BU220CCy.js +0 -4
- package/admin-dist/public/assets/_contentTypeId-DK8cskRt.js +0 -1
- package/admin-dist/public/assets/_entryId-CuVMExbb.js +0 -1
- package/admin-dist/public/assets/content-QBUxdxbS.js +0 -1
- package/admin-dist/public/assets/globals-B7Wsfh_v.css +0 -1
- package/admin-dist/public/assets/main-CjQ2VI9L.js +0 -97
- package/admin-dist/public/assets/media-Dc5PWt2Q.js +0 -1
- package/admin-dist/public/assets/new._contentTypeId-C_I4YxIa.js +0 -1
- package/admin-dist/public/assets/settings-t2PbCZh4.js +0 -1
- package/admin-dist/public/assets/tabs-q4EbZk7c.js +0 -1
- package/admin-dist/public/assets/taxonomies-kyk5P4ZW.js +0 -1
- package/admin-dist/server/_ssr/_tanstack-start-manifest_v-BffZedId.mjs +0 -4
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* CMS Config template
|
|
3
|
+
*
|
|
4
|
+
* Generated by: npx convex-cms init
|
|
5
|
+
*/
|
|
6
|
+
export declare const CMS_CONFIG_TEMPLATE = "/**\n * Unified CMS Configuration\n *\n * This file is the single source of truth for CMS settings.\n * It's used by both createCmsClient (for your app) and defineAdminAPI (for the admin UI).\n *\n * Generated by: npx convex-cms init\n */\n\nimport { defineCmsConfig } from \"convex-cms\";\n\nexport default defineCmsConfig({\n // =========================================================================\n // SHARED - Used by both createCmsClient and defineAdminAPI\n // =========================================================================\n\n features: {\n versioning: true,\n scheduling: true,\n localization: false,\n mediaManagement: true,\n softDelete: true,\n },\n\n // Uncomment to configure localization:\n // locale: {\n // defaultLocale: \"en-US\",\n // supportedLocales: [\"en-US\", \"es-ES\", \"fr-FR\"],\n // fallbackChains: {\n // \"es-ES\": [\"en-US\"],\n // \"fr-FR\": [\"en-US\"],\n // },\n // },\n\n limits: {\n maxVersionsPerEntry: 50,\n },\n\n // =========================================================================\n // CLIENT-SPECIFIC - Only used by createCmsClient\n // =========================================================================\n\n client: {\n // Uncomment to enable RBAC:\n // customRoles: [\n // {\n // name: \"editor\",\n // displayName: \"Editor\",\n // description: \"Can create and edit content\",\n // permissions: [\n // { resource: \"contentTypes\", action: \"read\" },\n // { resource: \"contentEntries\", action: \"create\" },\n // { resource: \"contentEntries\", action: \"read\" },\n // { resource: \"contentEntries\", action: \"update\" },\n // ],\n // },\n // ],\n\n // Uncomment to enable RBAC:\n // getUserRole: async (ctx, { userId }) => {\n // if (!userId) return null;\n // const user = await ctx.db.get(userId);\n // return user?.cmsRole ?? null;\n // },\n },\n\n // =========================================================================\n // ADMIN-SPECIFIC - Only used by defineAdminAPI\n // =========================================================================\n\n admin: {\n // Uncomment for production auth:\n // auth: async (ctx, operation) => {\n // const identity = await ctx.auth.getUserIdentity();\n // if (!identity) throw new Error(\"Not authenticated\");\n // return identity.subject;\n // },\n },\n});\n";
|
|
7
|
+
//# sourceMappingURL=cmsConfig.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cmsConfig.d.ts","sourceRoot":"","sources":["../../../src/cli/templates/cmsConfig.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,eAAO,MAAM,mBAAmB,i8EA+E/B,CAAC"}
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* CMS Config template
|
|
3
|
+
*
|
|
4
|
+
* Generated by: npx convex-cms init
|
|
5
|
+
*/
|
|
6
|
+
export const CMS_CONFIG_TEMPLATE = `/**
|
|
7
|
+
* Unified CMS Configuration
|
|
8
|
+
*
|
|
9
|
+
* This file is the single source of truth for CMS settings.
|
|
10
|
+
* It's used by both createCmsClient (for your app) and defineAdminAPI (for the admin UI).
|
|
11
|
+
*
|
|
12
|
+
* Generated by: npx convex-cms init
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
import { defineCmsConfig } from "convex-cms";
|
|
16
|
+
|
|
17
|
+
export default defineCmsConfig({
|
|
18
|
+
// =========================================================================
|
|
19
|
+
// SHARED - Used by both createCmsClient and defineAdminAPI
|
|
20
|
+
// =========================================================================
|
|
21
|
+
|
|
22
|
+
features: {
|
|
23
|
+
versioning: true,
|
|
24
|
+
scheduling: true,
|
|
25
|
+
localization: false,
|
|
26
|
+
mediaManagement: true,
|
|
27
|
+
softDelete: true,
|
|
28
|
+
},
|
|
29
|
+
|
|
30
|
+
// Uncomment to configure localization:
|
|
31
|
+
// locale: {
|
|
32
|
+
// defaultLocale: "en-US",
|
|
33
|
+
// supportedLocales: ["en-US", "es-ES", "fr-FR"],
|
|
34
|
+
// fallbackChains: {
|
|
35
|
+
// "es-ES": ["en-US"],
|
|
36
|
+
// "fr-FR": ["en-US"],
|
|
37
|
+
// },
|
|
38
|
+
// },
|
|
39
|
+
|
|
40
|
+
limits: {
|
|
41
|
+
maxVersionsPerEntry: 50,
|
|
42
|
+
},
|
|
43
|
+
|
|
44
|
+
// =========================================================================
|
|
45
|
+
// CLIENT-SPECIFIC - Only used by createCmsClient
|
|
46
|
+
// =========================================================================
|
|
47
|
+
|
|
48
|
+
client: {
|
|
49
|
+
// Uncomment to enable RBAC:
|
|
50
|
+
// customRoles: [
|
|
51
|
+
// {
|
|
52
|
+
// name: "editor",
|
|
53
|
+
// displayName: "Editor",
|
|
54
|
+
// description: "Can create and edit content",
|
|
55
|
+
// permissions: [
|
|
56
|
+
// { resource: "contentTypes", action: "read" },
|
|
57
|
+
// { resource: "contentEntries", action: "create" },
|
|
58
|
+
// { resource: "contentEntries", action: "read" },
|
|
59
|
+
// { resource: "contentEntries", action: "update" },
|
|
60
|
+
// ],
|
|
61
|
+
// },
|
|
62
|
+
// ],
|
|
63
|
+
|
|
64
|
+
// Uncomment to enable RBAC:
|
|
65
|
+
// getUserRole: async (ctx, { userId }) => {
|
|
66
|
+
// if (!userId) return null;
|
|
67
|
+
// const user = await ctx.db.get(userId);
|
|
68
|
+
// return user?.cmsRole ?? null;
|
|
69
|
+
// },
|
|
70
|
+
},
|
|
71
|
+
|
|
72
|
+
// =========================================================================
|
|
73
|
+
// ADMIN-SPECIFIC - Only used by defineAdminAPI
|
|
74
|
+
// =========================================================================
|
|
75
|
+
|
|
76
|
+
admin: {
|
|
77
|
+
// Uncomment for production auth:
|
|
78
|
+
// auth: async (ctx, operation) => {
|
|
79
|
+
// const identity = await ctx.auth.getUserIdentity();
|
|
80
|
+
// if (!identity) throw new Error("Not authenticated");
|
|
81
|
+
// return identity.subject;
|
|
82
|
+
// },
|
|
83
|
+
},
|
|
84
|
+
});
|
|
85
|
+
`;
|
|
86
|
+
//# sourceMappingURL=cmsConfig.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cmsConfig.js","sourceRoot":"","sources":["../../../src/cli/templates/cmsConfig.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,MAAM,CAAC,MAAM,mBAAmB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA+ElC,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* CLI Templates
|
|
3
|
+
*
|
|
4
|
+
* All templates for the init command.
|
|
5
|
+
*/
|
|
6
|
+
export { ADMIN_TEMPLATE } from "./admin.js";
|
|
7
|
+
export { CMS_CONFIG_TEMPLATE } from "./cmsConfig.js";
|
|
8
|
+
export { CMS_CLIENT_TEMPLATE } from "./cmsClient.js";
|
|
9
|
+
export { BLOG_SCHEMA_TEMPLATE, DOCS_SCHEMA_TEMPLATE, LANDING_SCHEMA_TEMPLATE, type SchemaTemplate, } from "./schemas/index.js";
|
|
10
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/cli/templates/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAC5C,OAAO,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AACrD,OAAO,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AACrD,OAAO,EACL,oBAAoB,EACpB,oBAAoB,EACpB,uBAAuB,EACvB,KAAK,cAAc,GACpB,MAAM,oBAAoB,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* CLI Templates
|
|
3
|
+
*
|
|
4
|
+
* All templates for the init command.
|
|
5
|
+
*/
|
|
6
|
+
export { ADMIN_TEMPLATE } from "./admin.js";
|
|
7
|
+
export { CMS_CONFIG_TEMPLATE } from "./cmsConfig.js";
|
|
8
|
+
export { CMS_CLIENT_TEMPLATE } from "./cmsClient.js";
|
|
9
|
+
export { BLOG_SCHEMA_TEMPLATE, DOCS_SCHEMA_TEMPLATE, LANDING_SCHEMA_TEMPLATE, } from "./schemas/index.js";
|
|
10
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/cli/templates/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAC5C,OAAO,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AACrD,OAAO,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AACrD,OAAO,EACL,oBAAoB,EACpB,oBAAoB,EACpB,uBAAuB,GAExB,MAAM,oBAAoB,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Blog schema template
|
|
3
|
+
*
|
|
4
|
+
* Content types: blog_post, author, category
|
|
5
|
+
*/
|
|
6
|
+
export declare const BLOG_SCHEMA_TEMPLATE = "/**\n * Blog Content Types\n *\n * Defines the content structure for a blog with posts, authors, and categories.\n * These definitions are code-first and type-safe using Convex validators.\n *\n * Generated by: npx convex-cms init --template blog\n */\n\nimport { v } from \"convex/values\";\nimport { defineContentType } from \"convex-cms\";\n\nexport const blogPost = defineContentType({\n name: \"blog_post\",\n validator: v.object({\n title: v.string(),\n slug: v.string(),\n excerpt: v.optional(v.string()),\n content: v.string(),\n featuredImage: v.optional(v.string()),\n publishedAt: v.optional(v.number()),\n author: v.optional(v.string()),\n tags: v.optional(v.array(v.string())),\n }),\n meta: {\n displayName: \"Blog Post\",\n titleField: \"title\",\n slugField: \"slug\",\n fields: {\n title: { label: \"Title\", maxLength: 200 },\n slug: { label: \"URL Slug\", description: \"URL-friendly identifier\" },\n excerpt: { label: \"Excerpt\", maxLength: 300 },\n content: { label: \"Content\", renderAs: \"richText\" },\n featuredImage: { label: \"Featured Image\", renderAs: \"media\" },\n publishedAt: { label: \"Publish Date\", renderAs: \"datetime\" },\n author: { label: \"Author\" },\n tags: { label: \"Tags\", renderAs: \"tags\" },\n },\n },\n});\n\nexport const author = defineContentType({\n name: \"author\",\n validator: v.object({\n name: v.string(),\n slug: v.string(),\n bio: v.optional(v.string()),\n avatar: v.optional(v.string()),\n email: v.optional(v.string()),\n socialLinks: v.optional(\n v.object({\n twitter: v.optional(v.string()),\n linkedin: v.optional(v.string()),\n github: v.optional(v.string()),\n website: v.optional(v.string()),\n })\n ),\n }),\n meta: {\n displayName: \"Author\",\n titleField: \"name\",\n slugField: \"slug\",\n fields: {\n name: { label: \"Full Name\" },\n slug: { label: \"URL Slug\" },\n bio: { label: \"Biography\", renderAs: \"richText\" },\n avatar: { label: \"Profile Photo\", renderAs: \"media\" },\n email: { label: \"Email Address\" },\n socialLinks: { label: \"Social Links\", renderAs: \"json\" },\n },\n },\n});\n\nexport const category = defineContentType({\n name: \"category\",\n validator: v.object({\n name: v.string(),\n slug: v.string(),\n description: v.optional(v.string()),\n color: v.optional(v.string()),\n parentCategory: v.optional(v.string()),\n }),\n meta: {\n displayName: \"Category\",\n titleField: \"name\",\n slugField: \"slug\",\n fields: {\n name: { label: \"Category Name\" },\n slug: { label: \"URL Slug\" },\n description: { label: \"Description\" },\n color: { label: \"Color\", description: \"Hex color for UI display\" },\n parentCategory: { label: \"Parent Category\" },\n },\n },\n});\n";
|
|
7
|
+
export declare const BLOG_SCHEMA_DESCRIPTION = "Blog (post, author, category)";
|
|
8
|
+
//# sourceMappingURL=blog.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"blog.d.ts","sourceRoot":"","sources":["../../../../src/cli/templates/schemas/blog.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,eAAO,MAAM,oBAAoB,o4FA+FhC,CAAC;AAEF,eAAO,MAAM,uBAAuB,kCAAkC,CAAC"}
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Blog schema template
|
|
3
|
+
*
|
|
4
|
+
* Content types: blog_post, author, category
|
|
5
|
+
*/
|
|
6
|
+
export const BLOG_SCHEMA_TEMPLATE = `/**
|
|
7
|
+
* Blog Content Types
|
|
8
|
+
*
|
|
9
|
+
* Defines the content structure for a blog with posts, authors, and categories.
|
|
10
|
+
* These definitions are code-first and type-safe using Convex validators.
|
|
11
|
+
*
|
|
12
|
+
* Generated by: npx convex-cms init --template blog
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
import { v } from "convex/values";
|
|
16
|
+
import { defineContentType } from "convex-cms";
|
|
17
|
+
|
|
18
|
+
export const blogPost = defineContentType({
|
|
19
|
+
name: "blog_post",
|
|
20
|
+
validator: v.object({
|
|
21
|
+
title: v.string(),
|
|
22
|
+
slug: v.string(),
|
|
23
|
+
excerpt: v.optional(v.string()),
|
|
24
|
+
content: v.string(),
|
|
25
|
+
featuredImage: v.optional(v.string()),
|
|
26
|
+
publishedAt: v.optional(v.number()),
|
|
27
|
+
author: v.optional(v.string()),
|
|
28
|
+
tags: v.optional(v.array(v.string())),
|
|
29
|
+
}),
|
|
30
|
+
meta: {
|
|
31
|
+
displayName: "Blog Post",
|
|
32
|
+
titleField: "title",
|
|
33
|
+
slugField: "slug",
|
|
34
|
+
fields: {
|
|
35
|
+
title: { label: "Title", maxLength: 200 },
|
|
36
|
+
slug: { label: "URL Slug", description: "URL-friendly identifier" },
|
|
37
|
+
excerpt: { label: "Excerpt", maxLength: 300 },
|
|
38
|
+
content: { label: "Content", renderAs: "richText" },
|
|
39
|
+
featuredImage: { label: "Featured Image", renderAs: "media" },
|
|
40
|
+
publishedAt: { label: "Publish Date", renderAs: "datetime" },
|
|
41
|
+
author: { label: "Author" },
|
|
42
|
+
tags: { label: "Tags", renderAs: "tags" },
|
|
43
|
+
},
|
|
44
|
+
},
|
|
45
|
+
});
|
|
46
|
+
|
|
47
|
+
export const author = defineContentType({
|
|
48
|
+
name: "author",
|
|
49
|
+
validator: v.object({
|
|
50
|
+
name: v.string(),
|
|
51
|
+
slug: v.string(),
|
|
52
|
+
bio: v.optional(v.string()),
|
|
53
|
+
avatar: v.optional(v.string()),
|
|
54
|
+
email: v.optional(v.string()),
|
|
55
|
+
socialLinks: v.optional(
|
|
56
|
+
v.object({
|
|
57
|
+
twitter: v.optional(v.string()),
|
|
58
|
+
linkedin: v.optional(v.string()),
|
|
59
|
+
github: v.optional(v.string()),
|
|
60
|
+
website: v.optional(v.string()),
|
|
61
|
+
})
|
|
62
|
+
),
|
|
63
|
+
}),
|
|
64
|
+
meta: {
|
|
65
|
+
displayName: "Author",
|
|
66
|
+
titleField: "name",
|
|
67
|
+
slugField: "slug",
|
|
68
|
+
fields: {
|
|
69
|
+
name: { label: "Full Name" },
|
|
70
|
+
slug: { label: "URL Slug" },
|
|
71
|
+
bio: { label: "Biography", renderAs: "richText" },
|
|
72
|
+
avatar: { label: "Profile Photo", renderAs: "media" },
|
|
73
|
+
email: { label: "Email Address" },
|
|
74
|
+
socialLinks: { label: "Social Links", renderAs: "json" },
|
|
75
|
+
},
|
|
76
|
+
},
|
|
77
|
+
});
|
|
78
|
+
|
|
79
|
+
export const category = defineContentType({
|
|
80
|
+
name: "category",
|
|
81
|
+
validator: v.object({
|
|
82
|
+
name: v.string(),
|
|
83
|
+
slug: v.string(),
|
|
84
|
+
description: v.optional(v.string()),
|
|
85
|
+
color: v.optional(v.string()),
|
|
86
|
+
parentCategory: v.optional(v.string()),
|
|
87
|
+
}),
|
|
88
|
+
meta: {
|
|
89
|
+
displayName: "Category",
|
|
90
|
+
titleField: "name",
|
|
91
|
+
slugField: "slug",
|
|
92
|
+
fields: {
|
|
93
|
+
name: { label: "Category Name" },
|
|
94
|
+
slug: { label: "URL Slug" },
|
|
95
|
+
description: { label: "Description" },
|
|
96
|
+
color: { label: "Color", description: "Hex color for UI display" },
|
|
97
|
+
parentCategory: { label: "Parent Category" },
|
|
98
|
+
},
|
|
99
|
+
},
|
|
100
|
+
});
|
|
101
|
+
`;
|
|
102
|
+
export const BLOG_SCHEMA_DESCRIPTION = "Blog (post, author, category)";
|
|
103
|
+
//# sourceMappingURL=blog.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"blog.js","sourceRoot":"","sources":["../../../../src/cli/templates/schemas/blog.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,MAAM,CAAC,MAAM,oBAAoB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA+FnC,CAAC;AAEF,MAAM,CAAC,MAAM,uBAAuB,GAAG,+BAA+B,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Documentation schema template
|
|
3
|
+
*
|
|
4
|
+
* Content types: doc_page, doc_section, doc_navigation
|
|
5
|
+
*/
|
|
6
|
+
export declare const DOCS_SCHEMA_TEMPLATE = "/**\n * Documentation Content Types\n *\n * Defines the content structure for technical documentation with pages,\n * sections, and navigation. Supports hierarchical organization.\n *\n * Generated by: npx convex-cms init --template docs\n */\n\nimport { v } from \"convex/values\";\nimport { defineContentType } from \"convex-cms\";\n\nexport const docPage = defineContentType({\n name: \"doc_page\",\n validator: v.object({\n title: v.string(),\n slug: v.string(),\n content: v.string(),\n order: v.number(),\n sectionId: v.optional(v.string()),\n parentPageId: v.optional(v.string()),\n description: v.optional(v.string()),\n lastUpdatedBy: v.optional(v.string()),\n tags: v.optional(v.array(v.string())),\n relatedPages: v.optional(v.array(v.string())),\n }),\n meta: {\n displayName: \"Documentation Page\",\n titleField: \"title\",\n slugField: \"slug\",\n fields: {\n title: { label: \"Page Title\", searchable: true },\n slug: { label: \"URL Slug\" },\n content: { label: \"Content\", renderAs: \"richText\", searchable: true },\n order: { label: \"Display Order\" },\n sectionId: { label: \"Section\" },\n parentPageId: { label: \"Parent Page\" },\n description: { label: \"Meta Description\", maxLength: 160 },\n lastUpdatedBy: { label: \"Last Updated By\" },\n tags: { label: \"Tags\", renderAs: \"tags\" },\n relatedPages: { label: \"Related Pages\", renderAs: \"json\" },\n },\n },\n});\n\nexport const docSection = defineContentType({\n name: \"doc_section\",\n validator: v.object({\n name: v.string(),\n slug: v.string(),\n order: v.number(),\n description: v.optional(v.string()),\n icon: v.optional(v.string()),\n isCollapsible: v.optional(v.boolean()),\n defaultExpanded: v.optional(v.boolean()),\n }),\n meta: {\n displayName: \"Documentation Section\",\n titleField: \"name\",\n slugField: \"slug\",\n fields: {\n name: { label: \"Section Name\" },\n slug: { label: \"URL Slug\" },\n order: { label: \"Display Order\" },\n description: { label: \"Description\" },\n icon: { label: \"Icon\", description: \"Icon name or emoji\" },\n isCollapsible: { label: \"Collapsible\" },\n defaultExpanded: { label: \"Expanded by Default\" },\n },\n },\n});\n\nexport const docNavigation = defineContentType({\n name: \"doc_navigation\",\n validator: v.object({\n name: v.string(),\n items: v.array(\n v.object({\n type: v.union(\n v.literal(\"page\"),\n v.literal(\"section\"),\n v.literal(\"link\"),\n v.literal(\"divider\")\n ),\n label: v.optional(v.string()),\n targetId: v.optional(v.string()),\n url: v.optional(v.string()),\n children: v.optional(v.array(v.string())),\n })\n ),\n isDefault: v.optional(v.boolean()),\n }),\n meta: {\n displayName: \"Navigation Tree\",\n titleField: \"name\",\n fields: {\n name: { label: \"Navigation Name\" },\n items: { label: \"Navigation Items\", renderAs: \"json\" },\n isDefault: { label: \"Default Navigation\" },\n },\n },\n});\n";
|
|
7
|
+
export declare const DOCS_SCHEMA_DESCRIPTION = "Documentation (page, section, navigation)";
|
|
8
|
+
//# sourceMappingURL=docs.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"docs.d.ts","sourceRoot":"","sources":["../../../../src/cli/templates/schemas/docs.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,eAAO,MAAM,oBAAoB,goGAsGhC,CAAC;AAEF,eAAO,MAAM,uBAAuB,8CAA8C,CAAC"}
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Documentation schema template
|
|
3
|
+
*
|
|
4
|
+
* Content types: doc_page, doc_section, doc_navigation
|
|
5
|
+
*/
|
|
6
|
+
export const DOCS_SCHEMA_TEMPLATE = `/**
|
|
7
|
+
* Documentation Content Types
|
|
8
|
+
*
|
|
9
|
+
* Defines the content structure for technical documentation with pages,
|
|
10
|
+
* sections, and navigation. Supports hierarchical organization.
|
|
11
|
+
*
|
|
12
|
+
* Generated by: npx convex-cms init --template docs
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
import { v } from "convex/values";
|
|
16
|
+
import { defineContentType } from "convex-cms";
|
|
17
|
+
|
|
18
|
+
export const docPage = defineContentType({
|
|
19
|
+
name: "doc_page",
|
|
20
|
+
validator: v.object({
|
|
21
|
+
title: v.string(),
|
|
22
|
+
slug: v.string(),
|
|
23
|
+
content: v.string(),
|
|
24
|
+
order: v.number(),
|
|
25
|
+
sectionId: v.optional(v.string()),
|
|
26
|
+
parentPageId: v.optional(v.string()),
|
|
27
|
+
description: v.optional(v.string()),
|
|
28
|
+
lastUpdatedBy: v.optional(v.string()),
|
|
29
|
+
tags: v.optional(v.array(v.string())),
|
|
30
|
+
relatedPages: v.optional(v.array(v.string())),
|
|
31
|
+
}),
|
|
32
|
+
meta: {
|
|
33
|
+
displayName: "Documentation Page",
|
|
34
|
+
titleField: "title",
|
|
35
|
+
slugField: "slug",
|
|
36
|
+
fields: {
|
|
37
|
+
title: { label: "Page Title", searchable: true },
|
|
38
|
+
slug: { label: "URL Slug" },
|
|
39
|
+
content: { label: "Content", renderAs: "richText", searchable: true },
|
|
40
|
+
order: { label: "Display Order" },
|
|
41
|
+
sectionId: { label: "Section" },
|
|
42
|
+
parentPageId: { label: "Parent Page" },
|
|
43
|
+
description: { label: "Meta Description", maxLength: 160 },
|
|
44
|
+
lastUpdatedBy: { label: "Last Updated By" },
|
|
45
|
+
tags: { label: "Tags", renderAs: "tags" },
|
|
46
|
+
relatedPages: { label: "Related Pages", renderAs: "json" },
|
|
47
|
+
},
|
|
48
|
+
},
|
|
49
|
+
});
|
|
50
|
+
|
|
51
|
+
export const docSection = defineContentType({
|
|
52
|
+
name: "doc_section",
|
|
53
|
+
validator: v.object({
|
|
54
|
+
name: v.string(),
|
|
55
|
+
slug: v.string(),
|
|
56
|
+
order: v.number(),
|
|
57
|
+
description: v.optional(v.string()),
|
|
58
|
+
icon: v.optional(v.string()),
|
|
59
|
+
isCollapsible: v.optional(v.boolean()),
|
|
60
|
+
defaultExpanded: v.optional(v.boolean()),
|
|
61
|
+
}),
|
|
62
|
+
meta: {
|
|
63
|
+
displayName: "Documentation Section",
|
|
64
|
+
titleField: "name",
|
|
65
|
+
slugField: "slug",
|
|
66
|
+
fields: {
|
|
67
|
+
name: { label: "Section Name" },
|
|
68
|
+
slug: { label: "URL Slug" },
|
|
69
|
+
order: { label: "Display Order" },
|
|
70
|
+
description: { label: "Description" },
|
|
71
|
+
icon: { label: "Icon", description: "Icon name or emoji" },
|
|
72
|
+
isCollapsible: { label: "Collapsible" },
|
|
73
|
+
defaultExpanded: { label: "Expanded by Default" },
|
|
74
|
+
},
|
|
75
|
+
},
|
|
76
|
+
});
|
|
77
|
+
|
|
78
|
+
export const docNavigation = defineContentType({
|
|
79
|
+
name: "doc_navigation",
|
|
80
|
+
validator: v.object({
|
|
81
|
+
name: v.string(),
|
|
82
|
+
items: v.array(
|
|
83
|
+
v.object({
|
|
84
|
+
type: v.union(
|
|
85
|
+
v.literal("page"),
|
|
86
|
+
v.literal("section"),
|
|
87
|
+
v.literal("link"),
|
|
88
|
+
v.literal("divider")
|
|
89
|
+
),
|
|
90
|
+
label: v.optional(v.string()),
|
|
91
|
+
targetId: v.optional(v.string()),
|
|
92
|
+
url: v.optional(v.string()),
|
|
93
|
+
children: v.optional(v.array(v.string())),
|
|
94
|
+
})
|
|
95
|
+
),
|
|
96
|
+
isDefault: v.optional(v.boolean()),
|
|
97
|
+
}),
|
|
98
|
+
meta: {
|
|
99
|
+
displayName: "Navigation Tree",
|
|
100
|
+
titleField: "name",
|
|
101
|
+
fields: {
|
|
102
|
+
name: { label: "Navigation Name" },
|
|
103
|
+
items: { label: "Navigation Items", renderAs: "json" },
|
|
104
|
+
isDefault: { label: "Default Navigation" },
|
|
105
|
+
},
|
|
106
|
+
},
|
|
107
|
+
});
|
|
108
|
+
`;
|
|
109
|
+
export const DOCS_SCHEMA_DESCRIPTION = "Documentation (page, section, navigation)";
|
|
110
|
+
//# sourceMappingURL=docs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"docs.js","sourceRoot":"","sources":["../../../../src/cli/templates/schemas/docs.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,MAAM,CAAC,MAAM,oBAAoB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAsGnC,CAAC;AAEF,MAAM,CAAC,MAAM,uBAAuB,GAAG,2CAA2C,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Schema templates index
|
|
3
|
+
*/
|
|
4
|
+
export { BLOG_SCHEMA_TEMPLATE, BLOG_SCHEMA_DESCRIPTION, } from "./blog.js";
|
|
5
|
+
export { DOCS_SCHEMA_TEMPLATE, DOCS_SCHEMA_DESCRIPTION, } from "./docs.js";
|
|
6
|
+
export { LANDING_SCHEMA_TEMPLATE, LANDING_SCHEMA_DESCRIPTION, } from "./landing.js";
|
|
7
|
+
export type SchemaTemplate = "blog" | "docs" | "landing" | "blank";
|
|
8
|
+
export declare const SCHEMA_TEMPLATE_INFO: Record<SchemaTemplate, {
|
|
9
|
+
description: string;
|
|
10
|
+
}>;
|
|
11
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/cli/templates/schemas/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EACL,oBAAoB,EACpB,uBAAuB,GACxB,MAAM,WAAW,CAAC;AAEnB,OAAO,EACL,oBAAoB,EACpB,uBAAuB,GACxB,MAAM,WAAW,CAAC;AAEnB,OAAO,EACL,uBAAuB,EACvB,0BAA0B,GAC3B,MAAM,cAAc,CAAC;AAEtB,MAAM,MAAM,cAAc,GAAG,MAAM,GAAG,MAAM,GAAG,SAAS,GAAG,OAAO,CAAC;AAEnE,eAAO,MAAM,oBAAoB,EAAE,MAAM,CACvC,cAAc,EACd;IAAE,WAAW,EAAE,MAAM,CAAA;CAAE,CAMxB,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Schema templates index
|
|
3
|
+
*/
|
|
4
|
+
export { BLOG_SCHEMA_TEMPLATE, BLOG_SCHEMA_DESCRIPTION, } from "./blog.js";
|
|
5
|
+
export { DOCS_SCHEMA_TEMPLATE, DOCS_SCHEMA_DESCRIPTION, } from "./docs.js";
|
|
6
|
+
export { LANDING_SCHEMA_TEMPLATE, LANDING_SCHEMA_DESCRIPTION, } from "./landing.js";
|
|
7
|
+
export const SCHEMA_TEMPLATE_INFO = {
|
|
8
|
+
blog: { description: "Blog (post, author, category)" },
|
|
9
|
+
docs: { description: "Documentation (page, section, navigation)" },
|
|
10
|
+
landing: { description: "Landing Page (hero, features, testimonials)" },
|
|
11
|
+
blank: { description: "Blank (no schemas)" },
|
|
12
|
+
};
|
|
13
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/cli/templates/schemas/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EACL,oBAAoB,EACpB,uBAAuB,GACxB,MAAM,WAAW,CAAC;AAEnB,OAAO,EACL,oBAAoB,EACpB,uBAAuB,GACxB,MAAM,WAAW,CAAC;AAEnB,OAAO,EACL,uBAAuB,EACvB,0BAA0B,GAC3B,MAAM,cAAc,CAAC;AAItB,MAAM,CAAC,MAAM,oBAAoB,GAG7B;IACF,IAAI,EAAE,EAAE,WAAW,EAAE,+BAA+B,EAAE;IACtD,IAAI,EAAE,EAAE,WAAW,EAAE,2CAA2C,EAAE;IAClE,OAAO,EAAE,EAAE,WAAW,EAAE,6CAA6C,EAAE;IACvE,KAAK,EAAE,EAAE,WAAW,EAAE,oBAAoB,EAAE;CAC7C,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Landing page schema template
|
|
3
|
+
*
|
|
4
|
+
* Content types: hero_section, feature_block, testimonial, cta_section
|
|
5
|
+
*/
|
|
6
|
+
export declare const LANDING_SCHEMA_TEMPLATE = "/**\n * Landing Page Content Types\n *\n * Defines the content structure for marketing landing pages with modular\n * components like hero sections, features, testimonials, and CTAs.\n *\n * Generated by: npx convex-cms init --template landing\n */\n\nimport { v } from \"convex/values\";\nimport { defineContentType } from \"convex-cms\";\n\nexport const heroSection = defineContentType({\n name: \"hero_section\",\n validator: v.object({\n headline: v.string(),\n subheadline: v.optional(v.string()),\n ctaText: v.optional(v.string()),\n ctaUrl: v.optional(v.string()),\n secondaryCtaText: v.optional(v.string()),\n secondaryCtaUrl: v.optional(v.string()),\n backgroundImage: v.optional(v.string()),\n backgroundVideo: v.optional(v.string()),\n alignment: v.optional(\n v.union(v.literal(\"left\"), v.literal(\"center\"), v.literal(\"right\"))\n ),\n theme: v.optional(v.union(v.literal(\"light\"), v.literal(\"dark\"))),\n }),\n meta: {\n displayName: \"Hero Section\",\n titleField: \"headline\",\n fields: {\n headline: { label: \"Headline\", searchable: true },\n subheadline: { label: \"Subheadline\" },\n ctaText: { label: \"Primary CTA Text\" },\n ctaUrl: { label: \"Primary CTA URL\" },\n secondaryCtaText: { label: \"Secondary CTA Text\" },\n secondaryCtaUrl: { label: \"Secondary CTA URL\" },\n backgroundImage: { label: \"Background Image\", renderAs: \"media\" },\n backgroundVideo: { label: \"Background Video URL\" },\n alignment: { label: \"Text Alignment\" },\n theme: { label: \"Color Theme\" },\n },\n },\n});\n\nexport const featureBlock = defineContentType({\n name: \"feature_block\",\n validator: v.object({\n title: v.string(),\n description: v.string(),\n icon: v.optional(v.string()),\n image: v.optional(v.string()),\n order: v.number(),\n link: v.optional(v.string()),\n linkText: v.optional(v.string()),\n }),\n meta: {\n displayName: \"Feature Block\",\n titleField: \"title\",\n fields: {\n title: { label: \"Feature Title\", searchable: true },\n description: { label: \"Description\", renderAs: \"richText\" },\n icon: { label: \"Icon\", description: \"Icon name or emoji\" },\n image: { label: \"Feature Image\", renderAs: \"media\" },\n order: { label: \"Display Order\" },\n link: { label: \"Learn More URL\" },\n linkText: { label: \"Link Text\" },\n },\n },\n});\n\nexport const testimonial = defineContentType({\n name: \"testimonial\",\n validator: v.object({\n quote: v.string(),\n authorName: v.string(),\n authorTitle: v.optional(v.string()),\n company: v.optional(v.string()),\n avatar: v.optional(v.string()),\n companyLogo: v.optional(v.string()),\n rating: v.optional(v.number()),\n featured: v.optional(v.boolean()),\n }),\n meta: {\n displayName: \"Testimonial\",\n titleField: \"authorName\",\n fields: {\n quote: { label: \"Quote\", renderAs: \"richText\" },\n authorName: { label: \"Author Name\" },\n authorTitle: { label: \"Author Title\" },\n company: { label: \"Company Name\" },\n avatar: { label: \"Author Photo\", renderAs: \"media\" },\n companyLogo: { label: \"Company Logo\", renderAs: \"media\" },\n rating: { label: \"Rating\", min: 1, max: 5 },\n featured: { label: \"Featured Testimonial\" },\n },\n },\n});\n\nexport const ctaSection = defineContentType({\n name: \"cta_section\",\n validator: v.object({\n headline: v.string(),\n description: v.optional(v.string()),\n buttonText: v.string(),\n buttonUrl: v.string(),\n secondaryText: v.optional(v.string()),\n secondaryUrl: v.optional(v.string()),\n backgroundColor: v.optional(v.string()),\n backgroundImage: v.optional(v.string()),\n }),\n meta: {\n displayName: \"CTA Section\",\n titleField: \"headline\",\n fields: {\n headline: { label: \"Headline\" },\n description: { label: \"Description\" },\n buttonText: { label: \"Button Text\" },\n buttonUrl: { label: \"Button URL\" },\n secondaryText: { label: \"Secondary Button Text\" },\n secondaryUrl: { label: \"Secondary Button URL\" },\n backgroundColor: { label: \"Background Color\" },\n backgroundImage: { label: \"Background Image\", renderAs: \"media\" },\n },\n },\n});\n";
|
|
7
|
+
export declare const LANDING_SCHEMA_DESCRIPTION = "Landing Page (hero, features, testimonials)";
|
|
8
|
+
//# sourceMappingURL=landing.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"landing.d.ts","sourceRoot":"","sources":["../../../../src/cli/templates/schemas/landing.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,eAAO,MAAM,uBAAuB,8yIA+HnC,CAAC;AAEF,eAAO,MAAM,0BAA0B,gDAAgD,CAAC"}
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Landing page schema template
|
|
3
|
+
*
|
|
4
|
+
* Content types: hero_section, feature_block, testimonial, cta_section
|
|
5
|
+
*/
|
|
6
|
+
export const LANDING_SCHEMA_TEMPLATE = `/**
|
|
7
|
+
* Landing Page Content Types
|
|
8
|
+
*
|
|
9
|
+
* Defines the content structure for marketing landing pages with modular
|
|
10
|
+
* components like hero sections, features, testimonials, and CTAs.
|
|
11
|
+
*
|
|
12
|
+
* Generated by: npx convex-cms init --template landing
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
import { v } from "convex/values";
|
|
16
|
+
import { defineContentType } from "convex-cms";
|
|
17
|
+
|
|
18
|
+
export const heroSection = defineContentType({
|
|
19
|
+
name: "hero_section",
|
|
20
|
+
validator: v.object({
|
|
21
|
+
headline: v.string(),
|
|
22
|
+
subheadline: v.optional(v.string()),
|
|
23
|
+
ctaText: v.optional(v.string()),
|
|
24
|
+
ctaUrl: v.optional(v.string()),
|
|
25
|
+
secondaryCtaText: v.optional(v.string()),
|
|
26
|
+
secondaryCtaUrl: v.optional(v.string()),
|
|
27
|
+
backgroundImage: v.optional(v.string()),
|
|
28
|
+
backgroundVideo: v.optional(v.string()),
|
|
29
|
+
alignment: v.optional(
|
|
30
|
+
v.union(v.literal("left"), v.literal("center"), v.literal("right"))
|
|
31
|
+
),
|
|
32
|
+
theme: v.optional(v.union(v.literal("light"), v.literal("dark"))),
|
|
33
|
+
}),
|
|
34
|
+
meta: {
|
|
35
|
+
displayName: "Hero Section",
|
|
36
|
+
titleField: "headline",
|
|
37
|
+
fields: {
|
|
38
|
+
headline: { label: "Headline", searchable: true },
|
|
39
|
+
subheadline: { label: "Subheadline" },
|
|
40
|
+
ctaText: { label: "Primary CTA Text" },
|
|
41
|
+
ctaUrl: { label: "Primary CTA URL" },
|
|
42
|
+
secondaryCtaText: { label: "Secondary CTA Text" },
|
|
43
|
+
secondaryCtaUrl: { label: "Secondary CTA URL" },
|
|
44
|
+
backgroundImage: { label: "Background Image", renderAs: "media" },
|
|
45
|
+
backgroundVideo: { label: "Background Video URL" },
|
|
46
|
+
alignment: { label: "Text Alignment" },
|
|
47
|
+
theme: { label: "Color Theme" },
|
|
48
|
+
},
|
|
49
|
+
},
|
|
50
|
+
});
|
|
51
|
+
|
|
52
|
+
export const featureBlock = defineContentType({
|
|
53
|
+
name: "feature_block",
|
|
54
|
+
validator: v.object({
|
|
55
|
+
title: v.string(),
|
|
56
|
+
description: v.string(),
|
|
57
|
+
icon: v.optional(v.string()),
|
|
58
|
+
image: v.optional(v.string()),
|
|
59
|
+
order: v.number(),
|
|
60
|
+
link: v.optional(v.string()),
|
|
61
|
+
linkText: v.optional(v.string()),
|
|
62
|
+
}),
|
|
63
|
+
meta: {
|
|
64
|
+
displayName: "Feature Block",
|
|
65
|
+
titleField: "title",
|
|
66
|
+
fields: {
|
|
67
|
+
title: { label: "Feature Title", searchable: true },
|
|
68
|
+
description: { label: "Description", renderAs: "richText" },
|
|
69
|
+
icon: { label: "Icon", description: "Icon name or emoji" },
|
|
70
|
+
image: { label: "Feature Image", renderAs: "media" },
|
|
71
|
+
order: { label: "Display Order" },
|
|
72
|
+
link: { label: "Learn More URL" },
|
|
73
|
+
linkText: { label: "Link Text" },
|
|
74
|
+
},
|
|
75
|
+
},
|
|
76
|
+
});
|
|
77
|
+
|
|
78
|
+
export const testimonial = defineContentType({
|
|
79
|
+
name: "testimonial",
|
|
80
|
+
validator: v.object({
|
|
81
|
+
quote: v.string(),
|
|
82
|
+
authorName: v.string(),
|
|
83
|
+
authorTitle: v.optional(v.string()),
|
|
84
|
+
company: v.optional(v.string()),
|
|
85
|
+
avatar: v.optional(v.string()),
|
|
86
|
+
companyLogo: v.optional(v.string()),
|
|
87
|
+
rating: v.optional(v.number()),
|
|
88
|
+
featured: v.optional(v.boolean()),
|
|
89
|
+
}),
|
|
90
|
+
meta: {
|
|
91
|
+
displayName: "Testimonial",
|
|
92
|
+
titleField: "authorName",
|
|
93
|
+
fields: {
|
|
94
|
+
quote: { label: "Quote", renderAs: "richText" },
|
|
95
|
+
authorName: { label: "Author Name" },
|
|
96
|
+
authorTitle: { label: "Author Title" },
|
|
97
|
+
company: { label: "Company Name" },
|
|
98
|
+
avatar: { label: "Author Photo", renderAs: "media" },
|
|
99
|
+
companyLogo: { label: "Company Logo", renderAs: "media" },
|
|
100
|
+
rating: { label: "Rating", min: 1, max: 5 },
|
|
101
|
+
featured: { label: "Featured Testimonial" },
|
|
102
|
+
},
|
|
103
|
+
},
|
|
104
|
+
});
|
|
105
|
+
|
|
106
|
+
export const ctaSection = defineContentType({
|
|
107
|
+
name: "cta_section",
|
|
108
|
+
validator: v.object({
|
|
109
|
+
headline: v.string(),
|
|
110
|
+
description: v.optional(v.string()),
|
|
111
|
+
buttonText: v.string(),
|
|
112
|
+
buttonUrl: v.string(),
|
|
113
|
+
secondaryText: v.optional(v.string()),
|
|
114
|
+
secondaryUrl: v.optional(v.string()),
|
|
115
|
+
backgroundColor: v.optional(v.string()),
|
|
116
|
+
backgroundImage: v.optional(v.string()),
|
|
117
|
+
}),
|
|
118
|
+
meta: {
|
|
119
|
+
displayName: "CTA Section",
|
|
120
|
+
titleField: "headline",
|
|
121
|
+
fields: {
|
|
122
|
+
headline: { label: "Headline" },
|
|
123
|
+
description: { label: "Description" },
|
|
124
|
+
buttonText: { label: "Button Text" },
|
|
125
|
+
buttonUrl: { label: "Button URL" },
|
|
126
|
+
secondaryText: { label: "Secondary Button Text" },
|
|
127
|
+
secondaryUrl: { label: "Secondary Button URL" },
|
|
128
|
+
backgroundColor: { label: "Background Color" },
|
|
129
|
+
backgroundImage: { label: "Background Image", renderAs: "media" },
|
|
130
|
+
},
|
|
131
|
+
},
|
|
132
|
+
});
|
|
133
|
+
`;
|
|
134
|
+
export const LANDING_SCHEMA_DESCRIPTION = "Landing Page (hero, features, testimonials)";
|
|
135
|
+
//# sourceMappingURL=landing.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"landing.js","sourceRoot":"","sources":["../../../../src/cli/templates/schemas/landing.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,MAAM,CAAC,MAAM,uBAAuB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA+HtC,CAAC;AAEF,MAAM,CAAC,MAAM,0BAA0B,GAAG,6CAA6C,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* File utilities for CLI
|
|
3
|
+
*/
|
|
4
|
+
export interface FileWriteResult {
|
|
5
|
+
path: string;
|
|
6
|
+
created: boolean;
|
|
7
|
+
modified: boolean;
|
|
8
|
+
skipped: boolean;
|
|
9
|
+
reason?: string;
|
|
10
|
+
}
|
|
11
|
+
export declare function ensureDirectory(dirPath: string): void;
|
|
12
|
+
export declare function fileExists(filePath: string): boolean;
|
|
13
|
+
export declare function readFile(filePath: string): string;
|
|
14
|
+
export declare function writeFile(filePath: string, content: string, options?: {
|
|
15
|
+
force?: boolean;
|
|
16
|
+
}): FileWriteResult;
|
|
17
|
+
export declare function updateConvexConfig(configPath: string, options?: {
|
|
18
|
+
force?: boolean;
|
|
19
|
+
}): FileWriteResult;
|
|
20
|
+
export declare function getRelativePath(from: string, to: string): string;
|
|
21
|
+
//# sourceMappingURL=fileUtils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fileUtils.d.ts","sourceRoot":"","sources":["../../../src/cli/utils/fileUtils.ts"],"names":[],"mappings":"AAAA;;GAEG;AAKH,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,OAAO,CAAC;IACjB,QAAQ,EAAE,OAAO,CAAC;IAClB,OAAO,EAAE,OAAO,CAAC;IACjB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,wBAAgB,eAAe,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAIrD;AAED,wBAAgB,UAAU,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAEpD;AAED,wBAAgB,QAAQ,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAEjD;AAED,wBAAgB,SAAS,CACvB,QAAQ,EAAE,MAAM,EAChB,OAAO,EAAE,MAAM,EACf,OAAO,GAAE;IAAE,KAAK,CAAC,EAAE,OAAO,CAAA;CAAO,GAChC,eAAe,CAsBjB;AAED,wBAAgB,kBAAkB,CAChC,UAAU,EAAE,MAAM,EAClB,OAAO,GAAE;IAAE,KAAK,CAAC,EAAE,OAAO,CAAA;CAAO,GAChC,eAAe,CA6DjB;AAED,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,GAAG,MAAM,CAEhE"}
|