@kyro-cms/admin 0.7.0 → 0.8.0
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/dist/index.cjs +6 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +7 -2
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/kyro-cms.d.ts +4 -2
- package/src/lib/config.ts +8 -3
package/package.json
CHANGED
package/src/kyro-cms.d.ts
CHANGED
|
@@ -190,15 +190,17 @@ declare module '@kyro-cms/core/client' {
|
|
|
190
190
|
declare module '@kyro-cms/core/templates' {
|
|
191
191
|
import type { CollectionConfig, GlobalConfig } from '@kyro-cms/core';
|
|
192
192
|
|
|
193
|
+
export const minimalCollections: Record<string, CollectionConfig>;
|
|
194
|
+
export const starterCollections: Record<string, CollectionConfig>;
|
|
193
195
|
export const blogCollections: Record<string, CollectionConfig>;
|
|
196
|
+
export const blogGlobals: GlobalConfig[];
|
|
194
197
|
export const ecommerceCollections: Record<string, CollectionConfig>;
|
|
195
|
-
export const
|
|
198
|
+
export const ecommerceGlobals: GlobalConfig[];
|
|
196
199
|
export const kitchenSinkCollections: Record<string, CollectionConfig>;
|
|
197
200
|
export const mediaCollections: Record<string, CollectionConfig>;
|
|
198
201
|
export const authCollections: Record<string, CollectionConfig>;
|
|
199
202
|
export const allSettingsGlobals: GlobalConfig[];
|
|
200
203
|
export const coreSettingsGlobals: GlobalConfig[];
|
|
201
|
-
export const ecommerceSettingsGlobals: GlobalConfig[];
|
|
202
204
|
}
|
|
203
205
|
|
|
204
206
|
// Ambient module for the Astro virtual import
|
package/src/lib/config.ts
CHANGED
|
@@ -3,12 +3,12 @@ import {
|
|
|
3
3
|
blogCollections,
|
|
4
4
|
ecommerceCollections,
|
|
5
5
|
minimalCollections,
|
|
6
|
+
starterCollections,
|
|
6
7
|
kitchenSinkCollections,
|
|
7
8
|
mediaCollections,
|
|
8
9
|
authCollections,
|
|
9
10
|
allSettingsGlobals,
|
|
10
11
|
coreSettingsGlobals,
|
|
11
|
-
ecommerceSettingsGlobals,
|
|
12
12
|
} from "@kyro-cms/core/templates";
|
|
13
13
|
|
|
14
14
|
type ConfigCollectionInput =
|
|
@@ -20,7 +20,7 @@ type ConfigGlobalInput =
|
|
|
20
20
|
| Record<string, GlobalConfig>
|
|
21
21
|
| undefined;
|
|
22
22
|
|
|
23
|
-
export type AdminTemplate = "minimal" | "blog" | "ecommerce" | "kitchen-sink";
|
|
23
|
+
export type AdminTemplate = "minimal" | "starter" | "blog" | "ecommerce" | "kitchen-sink";
|
|
24
24
|
|
|
25
25
|
export function toArray<T>(input: T[] | Record<string, T> | undefined): T[] {
|
|
26
26
|
if (!input) return [];
|
|
@@ -71,17 +71,22 @@ export function getAdminConfig(template: AdminTemplate = "blog") {
|
|
|
71
71
|
collections.push(...Object.values(minimalCollections));
|
|
72
72
|
globals.push(...coreSettingsGlobals);
|
|
73
73
|
break;
|
|
74
|
+
case "starter":
|
|
75
|
+
collections.push(...Object.values(starterCollections));
|
|
76
|
+
globals.push(...coreSettingsGlobals);
|
|
77
|
+
break;
|
|
74
78
|
case "blog":
|
|
75
79
|
collections.push(...Object.values(blogCollections));
|
|
76
80
|
globals.push(...coreSettingsGlobals);
|
|
77
81
|
break;
|
|
78
82
|
case "ecommerce":
|
|
79
83
|
collections.push(...Object.values(ecommerceCollections));
|
|
80
|
-
globals.push(...
|
|
84
|
+
globals.push(...allSettingsGlobals);
|
|
81
85
|
break;
|
|
82
86
|
case "kitchen-sink":
|
|
83
87
|
collections.push(
|
|
84
88
|
...Object.values(minimalCollections),
|
|
89
|
+
...Object.values(starterCollections),
|
|
85
90
|
...Object.values(blogCollections),
|
|
86
91
|
...Object.values(ecommerceCollections),
|
|
87
92
|
...Object.values(kitchenSinkCollections),
|