nextjs-cms 0.5.72 → 0.5.74
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/core/config/config-loader.d.ts +2 -0
- package/dist/core/config/config-loader.d.ts.map +1 -1
- package/dist/core/config/config-loader.js +6 -0
- package/dist/core/fields/select.d.ts +1 -1
- package/dist/core/sections/category.d.ts +6 -6
- package/dist/core/sections/hasItems.d.ts +6 -6
- package/dist/core/sections/section.d.ts +3 -3
- package/dist/core/sections/simple.d.ts +4 -4
- package/package.json +3 -3
|
@@ -4,6 +4,7 @@ declare const cmsConfigSchema: z.ZodObject<{
|
|
|
4
4
|
title: z.ZodOptional<z.ZodString>;
|
|
5
5
|
defaultTheme: z.ZodOptional<z.ZodString>;
|
|
6
6
|
logo: z.ZodOptional<z.ZodString>;
|
|
7
|
+
logoText: z.ZodOptional<z.ZodString>;
|
|
7
8
|
}, z.core.$strip>>;
|
|
8
9
|
debug: z.ZodOptional<z.ZodBoolean>;
|
|
9
10
|
sections: z.ZodOptional<z.ZodObject<{
|
|
@@ -61,6 +62,7 @@ export interface ComputedCMSConfig {
|
|
|
61
62
|
title: string;
|
|
62
63
|
defaultTheme: string;
|
|
63
64
|
logo: string;
|
|
65
|
+
logoText: string;
|
|
64
66
|
};
|
|
65
67
|
debug: boolean;
|
|
66
68
|
sections: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config-loader.d.ts","sourceRoot":"","sources":["../../../src/core/config/config-loader.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAA;AAIxB,QAAA,MAAM,eAAe
|
|
1
|
+
{"version":3,"file":"config-loader.d.ts","sourceRoot":"","sources":["../../../src/core/config/config-loader.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAA;AAIxB,QAAA,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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,EAAE,CAAA;CAC/B;AAwID;;;;;;GAMG;AACH,wBAAsB,YAAY,IAAI,OAAO,CAAC,QAAQ,CAAC,iBAAiB,CAAC,CAAC,CAazE"}
|
|
@@ -24,6 +24,10 @@ const cmsConfigSchema = z.object({
|
|
|
24
24
|
* Path to the logo image (relative to public folder)
|
|
25
25
|
*/
|
|
26
26
|
logo: z.string().optional(),
|
|
27
|
+
/**
|
|
28
|
+
* Text to display next to the logo
|
|
29
|
+
*/
|
|
30
|
+
logoText: z.string().optional(),
|
|
27
31
|
})
|
|
28
32
|
.optional(),
|
|
29
33
|
/**
|
|
@@ -166,6 +170,7 @@ function mergeConfig(defaults, userConfig) {
|
|
|
166
170
|
title: userConfig.ui?.title ?? defaults.ui.title,
|
|
167
171
|
defaultTheme: userConfig.ui?.defaultTheme ?? defaults.ui.defaultTheme,
|
|
168
172
|
logo: userConfig.ui?.logo ?? defaults.ui.logo,
|
|
173
|
+
logoText: userConfig.ui?.logoText ?? defaults.ui.logoText,
|
|
169
174
|
},
|
|
170
175
|
debug: userConfig.debug ?? defaults.debug,
|
|
171
176
|
sections: {
|
|
@@ -213,6 +218,7 @@ const defaultConfig = {
|
|
|
213
218
|
title: 'nextjs-cms',
|
|
214
219
|
defaultTheme: 'dark',
|
|
215
220
|
logo: '/nextjscms.webp',
|
|
221
|
+
logoText: 'nextjs-cms',
|
|
216
222
|
},
|
|
217
223
|
debug: false,
|
|
218
224
|
sections: {
|
|
@@ -346,8 +346,8 @@ declare const selectFieldConfigSchema: z.ZodIntersection<z.ZodUnion<readonly [z.
|
|
|
346
346
|
}, z.core.$strict>]>, z.ZodObject<{
|
|
347
347
|
type: z.ZodLiteral<"select">;
|
|
348
348
|
optionsType: z.ZodEnum<{
|
|
349
|
-
section: "section";
|
|
350
349
|
db: "db";
|
|
350
|
+
section: "section";
|
|
351
351
|
static: "static";
|
|
352
352
|
}>;
|
|
353
353
|
build: z.ZodFunction<z.core.$ZodFunctionArgs, z.ZodCustom<SelectField, SelectField>>;
|
|
@@ -117,7 +117,10 @@ declare const optionsSchema: z.ZodObject<{
|
|
|
117
117
|
*/
|
|
118
118
|
allowRecursiveDelete: z.ZodOptional<z.ZodBoolean>;
|
|
119
119
|
fields: z.ZodUnion<[z.ZodArray<z.ZodCustom<FieldConfig, FieldConfig>>, z.ZodArray<z.ZodCustom<FieldGroupConfig, FieldGroupConfig>>]>;
|
|
120
|
+
readonly: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
|
|
121
|
+
variants: z.ZodOptional<z.ZodArray<z.ZodCustom<import("../types/index.js").Variant, import("../types/index.js").Variant>>>;
|
|
120
122
|
name: z.ZodString;
|
|
123
|
+
order: z.ZodNumber;
|
|
121
124
|
db: z.ZodObject<{
|
|
122
125
|
table: z.ZodString;
|
|
123
126
|
identifier: z.ZodOptional<z.ZodCustom<FieldConfig, FieldConfig>>;
|
|
@@ -141,9 +144,6 @@ declare const optionsSchema: z.ZodObject<{
|
|
|
141
144
|
name: z.ZodOptional<z.ZodString>;
|
|
142
145
|
}, z.core.$strict>>>;
|
|
143
146
|
}, z.core.$strict>;
|
|
144
|
-
variants: z.ZodOptional<z.ZodArray<z.ZodCustom<import("../types/index.js").Variant, import("../types/index.js").Variant>>>;
|
|
145
|
-
order: z.ZodNumber;
|
|
146
|
-
readonly: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
|
|
147
147
|
icon: z.ZodOptional<z.ZodString>;
|
|
148
148
|
gallery: z.ZodOptional<z.ZodObject<{
|
|
149
149
|
db: z.ZodObject<{
|
|
@@ -214,7 +214,10 @@ export declare const categorySectionConfigSchema: z.ZodObject<{
|
|
|
214
214
|
* @default false
|
|
215
215
|
*/
|
|
216
216
|
allowRecursiveDelete: z.ZodOptional<z.ZodBoolean>;
|
|
217
|
+
readonly: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
|
|
218
|
+
variants: z.ZodOptional<z.ZodArray<z.ZodCustom<import("../types/index.js").Variant, import("../types/index.js").Variant>>>;
|
|
217
219
|
name: z.ZodString;
|
|
220
|
+
order: z.ZodNumber;
|
|
218
221
|
db: z.ZodObject<{
|
|
219
222
|
table: z.ZodString;
|
|
220
223
|
identifier: z.ZodOptional<z.ZodCustom<FieldConfig, FieldConfig>>;
|
|
@@ -238,9 +241,6 @@ export declare const categorySectionConfigSchema: z.ZodObject<{
|
|
|
238
241
|
name: z.ZodOptional<z.ZodString>;
|
|
239
242
|
}, z.core.$strict>>>;
|
|
240
243
|
}, z.core.$strict>;
|
|
241
|
-
variants: z.ZodOptional<z.ZodArray<z.ZodCustom<import("../types/index.js").Variant, import("../types/index.js").Variant>>>;
|
|
242
|
-
order: z.ZodNumber;
|
|
243
|
-
readonly: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
|
|
244
244
|
icon: z.ZodOptional<z.ZodString>;
|
|
245
245
|
gallery: z.ZodOptional<z.ZodObject<{
|
|
246
246
|
db: z.ZodObject<{
|
|
@@ -355,7 +355,10 @@ declare const optionsSchema: z.ZodObject<{
|
|
|
355
355
|
}>>;
|
|
356
356
|
generateQR: z.ZodOptional<z.ZodBoolean>;
|
|
357
357
|
fields: z.ZodUnion<[z.ZodArray<z.ZodCustom<FieldConfig, FieldConfig>>, z.ZodArray<z.ZodCustom<FieldGroupConfig, FieldGroupConfig>>]>;
|
|
358
|
+
readonly: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
|
|
359
|
+
variants: z.ZodOptional<z.ZodArray<z.ZodCustom<import("../types/index.js").Variant, import("../types/index.js").Variant>>>;
|
|
358
360
|
name: z.ZodString;
|
|
361
|
+
order: z.ZodNumber;
|
|
359
362
|
db: z.ZodObject<{
|
|
360
363
|
table: z.ZodString;
|
|
361
364
|
identifier: z.ZodOptional<z.ZodCustom<FieldConfig, FieldConfig>>;
|
|
@@ -379,9 +382,6 @@ declare const optionsSchema: z.ZodObject<{
|
|
|
379
382
|
name: z.ZodOptional<z.ZodString>;
|
|
380
383
|
}, z.core.$strict>>>;
|
|
381
384
|
}, z.core.$strict>;
|
|
382
|
-
variants: z.ZodOptional<z.ZodArray<z.ZodCustom<import("../types/index.js").Variant, import("../types/index.js").Variant>>>;
|
|
383
|
-
order: z.ZodNumber;
|
|
384
|
-
readonly: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
|
|
385
385
|
icon: z.ZodOptional<z.ZodString>;
|
|
386
386
|
gallery: z.ZodOptional<z.ZodObject<{
|
|
387
387
|
db: z.ZodObject<{
|
|
@@ -569,7 +569,10 @@ declare const hasItemsSectionConfigSchema: z.ZodObject<{
|
|
|
569
569
|
adminGenerated?: boolean | "readonly" | undefined;
|
|
570
570
|
}>>;
|
|
571
571
|
generateQR: z.ZodOptional<z.ZodBoolean>;
|
|
572
|
+
readonly: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
|
|
573
|
+
variants: z.ZodOptional<z.ZodArray<z.ZodCustom<import("../types/index.js").Variant, import("../types/index.js").Variant>>>;
|
|
572
574
|
name: z.ZodString;
|
|
575
|
+
order: z.ZodNumber;
|
|
573
576
|
db: z.ZodObject<{
|
|
574
577
|
table: z.ZodString;
|
|
575
578
|
identifier: z.ZodOptional<z.ZodCustom<FieldConfig, FieldConfig>>;
|
|
@@ -593,9 +596,6 @@ declare const hasItemsSectionConfigSchema: z.ZodObject<{
|
|
|
593
596
|
name: z.ZodOptional<z.ZodString>;
|
|
594
597
|
}, z.core.$strict>>>;
|
|
595
598
|
}, z.core.$strict>;
|
|
596
|
-
variants: z.ZodOptional<z.ZodArray<z.ZodCustom<import("../types/index.js").Variant, import("../types/index.js").Variant>>>;
|
|
597
|
-
order: z.ZodNumber;
|
|
598
|
-
readonly: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
|
|
599
599
|
icon: z.ZodOptional<z.ZodString>;
|
|
600
600
|
gallery: z.ZodOptional<z.ZodObject<{
|
|
601
601
|
db: z.ZodObject<{
|
|
@@ -62,7 +62,10 @@ export declare const baseSectionOptionsSchema: z.ZodObject<{
|
|
|
62
62
|
*/
|
|
63
63
|
export declare const baseHelperFunctionOptionsSchema: z.ZodObject<{
|
|
64
64
|
fields: z.ZodUnion<[z.ZodArray<z.ZodCustom<FieldConfig, FieldConfig>>, z.ZodArray<z.ZodCustom<FieldGroupConfig, FieldGroupConfig>>]>;
|
|
65
|
+
readonly: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
|
|
66
|
+
variants: z.ZodOptional<z.ZodArray<z.ZodCustom<Variant, Variant>>>;
|
|
65
67
|
name: z.ZodString;
|
|
68
|
+
order: z.ZodNumber;
|
|
66
69
|
db: z.ZodObject<{
|
|
67
70
|
table: z.ZodString;
|
|
68
71
|
identifier: z.ZodOptional<z.ZodCustom<FieldConfig, FieldConfig>>;
|
|
@@ -86,9 +89,6 @@ export declare const baseHelperFunctionOptionsSchema: z.ZodObject<{
|
|
|
86
89
|
name: z.ZodOptional<z.ZodString>;
|
|
87
90
|
}, z.core.$strict>>>;
|
|
88
91
|
}, z.core.$strict>;
|
|
89
|
-
variants: z.ZodOptional<z.ZodArray<z.ZodCustom<Variant, Variant>>>;
|
|
90
|
-
order: z.ZodNumber;
|
|
91
|
-
readonly: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
|
|
92
92
|
icon: z.ZodOptional<z.ZodString>;
|
|
93
93
|
gallery: z.ZodOptional<z.ZodObject<{
|
|
94
94
|
db: z.ZodObject<{
|
|
@@ -22,10 +22,10 @@ declare const optionsSchema: z.ZodObject<{
|
|
|
22
22
|
table: z.ZodString;
|
|
23
23
|
}, z.core.$strict>;
|
|
24
24
|
fields: z.ZodUnion<[z.ZodArray<z.ZodCustom<FieldConfig, FieldConfig>>, z.ZodArray<z.ZodCustom<FieldGroupConfig, FieldGroupConfig>>]>;
|
|
25
|
-
|
|
25
|
+
readonly: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
|
|
26
26
|
variants: z.ZodOptional<z.ZodArray<z.ZodCustom<import("../types/index.js").Variant, import("../types/index.js").Variant>>>;
|
|
27
|
+
name: z.ZodString;
|
|
27
28
|
order: z.ZodNumber;
|
|
28
|
-
readonly: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
|
|
29
29
|
icon: z.ZodOptional<z.ZodString>;
|
|
30
30
|
gallery: z.ZodOptional<z.ZodObject<{
|
|
31
31
|
db: z.ZodObject<{
|
|
@@ -53,10 +53,10 @@ declare const simpleSectionConfigSchema: z.ZodObject<{
|
|
|
53
53
|
db: z.ZodObject<{
|
|
54
54
|
table: z.ZodString;
|
|
55
55
|
}, z.core.$strict>;
|
|
56
|
-
|
|
56
|
+
readonly: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
|
|
57
57
|
variants: z.ZodOptional<z.ZodArray<z.ZodCustom<import("../types/index.js").Variant, import("../types/index.js").Variant>>>;
|
|
58
|
+
name: z.ZodString;
|
|
58
59
|
order: z.ZodNumber;
|
|
59
|
-
readonly: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
|
|
60
60
|
icon: z.ZodOptional<z.ZodString>;
|
|
61
61
|
gallery: z.ZodOptional<z.ZodObject<{
|
|
62
62
|
db: z.ZodObject<{
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "nextjs-cms",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.74",
|
|
4
4
|
"main": "./dist/index.js",
|
|
5
5
|
"types": "./dist/index.d.ts",
|
|
6
6
|
"type": "module",
|
|
@@ -171,8 +171,8 @@
|
|
|
171
171
|
"tsx": "^4.20.6",
|
|
172
172
|
"typescript": "^5.9.2",
|
|
173
173
|
"@lzcms/eslint-config": "0.3.0",
|
|
174
|
-
"@lzcms/
|
|
175
|
-
"@lzcms/
|
|
174
|
+
"@lzcms/tsconfig": "0.1.0",
|
|
175
|
+
"@lzcms/prettier-config": "0.1.0"
|
|
176
176
|
},
|
|
177
177
|
"license": "MIT",
|
|
178
178
|
"keywords": [
|