@kyro-cms/admin 0.6.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kyro-cms/admin",
3
- "version": "0.6.0",
3
+ "version": "0.8.0",
4
4
  "engines": {
5
5
  "node": ">=22"
6
6
  },
@@ -112,13 +112,13 @@
112
112
  "@types/react-dom": "^19.0.0",
113
113
  "dotenv-cli": "^11.0.0",
114
114
  "tsup": "^6.0.0",
115
- "typescript": "^6.0.3",
115
+ "typescript": "^5.7.3",
116
116
  "vitest": "^4.1.4"
117
117
  },
118
118
  "peerDependencies": {
119
119
  "@kyro-cms/core": "^0.6.0",
120
- "react": "^18.0.0",
121
- "react-dom": "^18.0.0"
120
+ "react": "^19.0.0",
121
+ "react-dom": "^19.0.0"
122
122
  },
123
123
  "repository": {
124
124
  "type": "git",
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 minimalCollections: Record<string, CollectionConfig>;
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(...coreSettingsGlobals, ...ecommerceSettingsGlobals);
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),