nextjs-cms 0.6.8 → 0.6.9
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 +4 -10
- package/dist/core/config/config-loader.d.ts.map +1 -1
- package/dist/core/config/config-loader.js +14 -14
- package/dist/core/sections/category.d.ts +32 -32
- package/dist/core/sections/hasItems.d.ts +32 -32
- package/dist/core/sections/section.d.ts +16 -16
- package/dist/core/sections/simple.d.ts +8 -8
- package/dist/translations/client.d.ts +5178 -1
- package/dist/translations/client.d.ts.map +1 -1
- package/dist/translations/client.js +29 -4
- package/dist/translations/dict-store.d.ts +5 -1
- package/dist/translations/dict-store.d.ts.map +1 -1
- package/dist/translations/dict-store.js +30 -3
- package/dist/translations/index.d.ts +1 -1
- package/dist/translations/index.js +1 -1
- package/dist/translations/server.d.ts +5171 -1
- package/dist/translations/server.d.ts.map +1 -1
- package/dist/translations/server.js +26 -4
- package/package.json +3 -3
- package/dist/core/helpers/i18n.d.ts +0 -2
- package/dist/core/helpers/i18n.d.ts.map +0 -1
- package/dist/core/helpers/i18n.js +0 -3
- package/dist/core/localization.d.ts +0 -40
- package/dist/core/localization.d.ts.map +0 -1
- package/dist/core/localization.js +0 -48
- package/dist/logging/audit.d.ts +0 -20
- package/dist/logging/audit.d.ts.map +0 -1
- package/dist/logging/audit.js +0 -48
- package/dist/translations/localized-string.d.ts +0 -17
- package/dist/translations/localized-string.d.ts.map +0 -1
- package/dist/translations/localized-string.js +0 -32
- package/dist/translations/use-project-translation.d.ts +0 -19
- package/dist/translations/use-project-translation.d.ts.map +0 -1
- package/dist/translations/use-project-translation.js +0 -25
- package/dist/validators/types.d.ts +0 -7
- package/dist/validators/types.d.ts.map +0 -1
- package/dist/validators/types.js +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as z from 'zod';
|
|
2
2
|
import type { LocalizedString } from '../../translations/localization.js';
|
|
3
|
-
/** Locale codes for which we ship dictionaries
|
|
4
|
-
export declare const AVAILABLE_I18N_LOCALES: readonly ["en"
|
|
3
|
+
/** Locale codes for which we ship dictionaries in core. */
|
|
4
|
+
export declare const AVAILABLE_I18N_LOCALES: readonly ["en"];
|
|
5
5
|
export type AvailableLocale = (typeof AVAILABLE_I18N_LOCALES)[number];
|
|
6
6
|
declare const cmsConfigSchema: z.ZodObject<{
|
|
7
7
|
ui: z.ZodOptional<z.ZodObject<{
|
|
@@ -66,14 +66,8 @@ declare const cmsConfigSchema: z.ZodObject<{
|
|
|
66
66
|
}, z.core.$strip>>>;
|
|
67
67
|
}, z.core.$strip>>>;
|
|
68
68
|
i18n: z.ZodOptional<z.ZodObject<{
|
|
69
|
-
supportedLanguages: z.ZodOptional<z.
|
|
70
|
-
|
|
71
|
-
ar: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
72
|
-
}, z.core.$strip>>;
|
|
73
|
-
fallbackLanguage: z.ZodOptional<z.ZodEnum<{
|
|
74
|
-
en: "en";
|
|
75
|
-
ar: "ar";
|
|
76
|
-
}>>;
|
|
69
|
+
supportedLanguages: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodString>>>;
|
|
70
|
+
fallbackLanguage: z.ZodOptional<z.ZodString>;
|
|
77
71
|
}, z.core.$strip>>;
|
|
78
72
|
dashboard: z.ZodOptional<z.ZodObject<{
|
|
79
73
|
override: z.ZodOptional<z.ZodString>;
|
|
@@ -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;AAGxB,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,oCAAoC,CAAA;AAEzE,
|
|
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;AAGxB,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,oCAAoC,CAAA;AAEzE,2DAA2D;AAC3D,eAAO,MAAM,sBAAsB,iBAAkB,CAAA;AAErD,MAAM,MAAM,eAAe,GAAG,CAAC,OAAO,sBAAsB,CAAC,CAAC,MAAM,CAAC,CAAA;AAGrE,QAAA,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBA8OnB,CAAA;AAGF,MAAM,MAAM,SAAS,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,CAAA;AAEvD,MAAM,WAAW,mBAAmB;IAChC,KAAK,CAAC,EAAE,eAAe,CAAA;CAC1B;AAED,MAAM,WAAW,iBAAiB;IAC9B,OAAO,EAAE,MAAM,CAAA;IACf,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IACjC,iEAAiE;IACjE,KAAK,CAAC,EAAE,eAAe,CAAA;IACvB,+CAA+C;IAC/C,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,mBAAmB,CAAC,CAAA;CAC/C;AAGD,MAAM,WAAW,iBAAiB;IAC9B,EAAE,EAAE;QACA,KAAK,EAAE,MAAM,CAAA;QACb,YAAY,EAAE,MAAM,CAAA;QACpB,IAAI,EAAE,MAAM,CAAA;QACZ,QAAQ,EAAE,MAAM,CAAA;KACnB,CAAA;IACD,KAAK,EAAE,OAAO,CAAA;IACd,QAAQ,EAAE;QACN,IAAI,EAAE,MAAM,CAAA;QACZ,MAAM,EAAE,OAAO,CAAA;QACf,QAAQ,EAAE;YACN,oBAAoB,EAAE,OAAO,CAAA;SAChC,CAAA;KACJ,CAAA;IACD,KAAK,EAAE;QACH,MAAM,EAAE;YACJ,IAAI,EAAE,MAAM,CAAA;YACZ,iBAAiB,EAAE,OAAO,CAAA;SAC7B,CAAA;QACD,MAAM,EAAE;YACJ,UAAU,EAAE;gBAAE,CAAC,EAAE,MAAM,CAAC;gBAAC,CAAC,EAAE,MAAM,CAAC;gBAAC,CAAC,EAAE,MAAM,CAAC;gBAAC,KAAK,EAAE,MAAM,CAAA;aAAE,CAAA;YAC9D,SAAS,EAAE;gBACP,KAAK,EAAE,MAAM,CAAA;gBACb,MAAM,EAAE,MAAM,CAAA;gBACd,IAAI,EAAE,OAAO,CAAA;gBACb,OAAO,EAAE,MAAM,CAAA;aAClB,CAAA;YACD,SAAS,EAAE,OAAO,CAAA;SACrB,CAAA;KACJ,CAAA;IACD,gBAAgB,EAAE;QACd,OAAO,EAAE;YACL,OAAO,EAAE,OAAO,CAAA;YAChB,MAAM,EAAE,MAAM,CAAA;YACd,QAAQ,EAAE,MAAM,CAAA;YAChB,MAAM,EAAE;gBACJ,MAAM,EAAE,WAAW,GAAG,WAAW,GAAG,YAAY,CAAA;gBAChD,OAAO,EAAE,WAAW,GAAG,WAAW,GAAG,YAAY,CAAA;aACpD,CAAA;SACJ,CAAA;KACJ,CAAA;IACD,OAAO,EAAE,iBAAiB,EAAE,CAAA;IAC5B,IAAI,EAAE;QACF,kBAAkB,EAAE,SAAS,MAAM,EAAE,CAAA;QACrC,gBAAgB,EAAE,MAAM,CAAA;KAC3B,CAAA;IACD,SAAS,EAAE;QACP,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAA;KAC1B,CAAA;CACJ;AA4KD;;;;;;GAMG;AACH,wBAAsB,YAAY,IAAI,OAAO,CAAC,QAAQ,CAAC,iBAAiB,CAAC,CAAC,CAazE"}
|
|
@@ -6,8 +6,8 @@ if (typeof window !== 'undefined') {
|
|
|
6
6
|
import * as z from 'zod';
|
|
7
7
|
import { loadConfigModule, getConfigImportVersion } from './loader.js';
|
|
8
8
|
import { setConfigDicts } from '../../translations/dict-store.js';
|
|
9
|
-
/** Locale codes for which we ship dictionaries
|
|
10
|
-
export const AVAILABLE_I18N_LOCALES = ['en'
|
|
9
|
+
/** Locale codes for which we ship dictionaries in core. */
|
|
10
|
+
export const AVAILABLE_I18N_LOCALES = ['en'];
|
|
11
11
|
// 1. Define config schema
|
|
12
12
|
const cmsConfigSchema = z.object({
|
|
13
13
|
/**
|
|
@@ -191,20 +191,22 @@ const cmsConfigSchema = z.object({
|
|
|
191
191
|
.optional(),
|
|
192
192
|
/**
|
|
193
193
|
* Interface (admin UI) i18n configuration.
|
|
194
|
-
* Import
|
|
195
|
-
*
|
|
194
|
+
* Import dictionaries (core provides `en`) and pass them as supportedLanguages.
|
|
195
|
+
* Keys are locale codes; only those locales are offered.
|
|
196
196
|
*/
|
|
197
197
|
i18n: z
|
|
198
198
|
.object({
|
|
199
199
|
/**
|
|
200
200
|
* Supported locales and their translation dictionaries.
|
|
201
|
-
*
|
|
202
|
-
*
|
|
201
|
+
* Core ships `en`; additional locales should be installed and imported by the app.
|
|
202
|
+
* Example: `{ en, ar }`, `{ en, fr }`, etc. Keys = locale codes offered in the dropdown.
|
|
203
|
+
* Dictionaries can be partial overrides; they are merged with the built-in defaults.
|
|
204
|
+
* English is always included by core as the base fallback locale.
|
|
203
205
|
* At least one locale is required.
|
|
204
206
|
*/
|
|
205
207
|
supportedLanguages: z
|
|
206
|
-
.
|
|
207
|
-
.refine((v) =>
|
|
208
|
+
.record(z.string(), z.record(z.string(), z.string()))
|
|
209
|
+
.refine((v) => Object.keys(v).length > 0, {
|
|
208
210
|
message: 'i18n.supportedLanguages must have at least one locale',
|
|
209
211
|
})
|
|
210
212
|
.optional(),
|
|
@@ -213,7 +215,7 @@ const cmsConfigSchema = z.object({
|
|
|
213
215
|
* or when no session exists (e.g. login page).
|
|
214
216
|
* @default 'en'
|
|
215
217
|
*/
|
|
216
|
-
fallbackLanguage: z.
|
|
218
|
+
fallbackLanguage: z.string().optional(),
|
|
217
219
|
})
|
|
218
220
|
.optional(),
|
|
219
221
|
/**
|
|
@@ -232,21 +234,19 @@ const cmsConfigSchema = z.object({
|
|
|
232
234
|
.optional(),
|
|
233
235
|
});
|
|
234
236
|
function normalizeI18n(userConfig) {
|
|
235
|
-
const available = new Set(AVAILABLE_I18N_LOCALES);
|
|
236
237
|
const fallback = userConfig.i18n?.fallbackLanguage ?? 'en';
|
|
237
238
|
const record = userConfig.i18n?.supportedLanguages;
|
|
238
239
|
let supported;
|
|
239
240
|
if (record && Object.keys(record).length >= 1) {
|
|
240
|
-
supported = Object.keys(record).filter((
|
|
241
|
-
if (supported.length === 0)
|
|
242
|
-
supported = ['en'];
|
|
241
|
+
supported = ['en', ...Object.keys(record).filter((locale) => locale !== 'en')];
|
|
243
242
|
setConfigDicts(record);
|
|
244
243
|
}
|
|
245
244
|
else {
|
|
246
245
|
supported = ['en'];
|
|
246
|
+
setConfigDicts({});
|
|
247
247
|
}
|
|
248
248
|
const supportedSet = new Set(supported);
|
|
249
|
-
const effectiveFallback = supportedSet.has(fallback) ? fallback :
|
|
249
|
+
const effectiveFallback = supportedSet.has(fallback) ? fallback : 'en';
|
|
250
250
|
return {
|
|
251
251
|
supportedLanguages: supported,
|
|
252
252
|
fallbackLanguage: effectiveFallback,
|
|
@@ -118,9 +118,24 @@ declare const optionsSchema: z.ZodObject<{
|
|
|
118
118
|
*/
|
|
119
119
|
allowRecursiveDelete: z.ZodOptional<z.ZodBoolean>;
|
|
120
120
|
fields: z.ZodUnion<[z.ZodArray<z.ZodCustom<FieldConfig, FieldConfig>>, z.ZodArray<z.ZodCustom<FieldGroupConfig, FieldGroupConfig>>]>;
|
|
121
|
+
name: z.ZodString;
|
|
122
|
+
gallery: z.ZodOptional<z.ZodObject<{
|
|
123
|
+
db: z.ZodObject<{
|
|
124
|
+
tableName: z.ZodString;
|
|
125
|
+
identifierField: z.ZodOptional<z.ZodString>;
|
|
126
|
+
photoNameField: z.ZodOptional<z.ZodString>;
|
|
127
|
+
metaField: z.ZodOptional<z.ZodString>;
|
|
128
|
+
}, z.core.$strict>;
|
|
129
|
+
watermark: z.ZodOptional<z.ZodBoolean>;
|
|
130
|
+
thumbnail: z.ZodOptional<z.ZodObject<{
|
|
131
|
+
width: z.ZodNumber;
|
|
132
|
+
height: z.ZodNumber;
|
|
133
|
+
crop: z.ZodBoolean;
|
|
134
|
+
quality: z.ZodNumber;
|
|
135
|
+
}, z.core.$strict>>;
|
|
136
|
+
}, z.core.$strict>>;
|
|
121
137
|
readonly: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
|
|
122
138
|
icon: z.ZodOptional<z.ZodString>;
|
|
123
|
-
name: z.ZodString;
|
|
124
139
|
db: z.ZodObject<{
|
|
125
140
|
table: z.ZodString;
|
|
126
141
|
identifier: z.ZodOptional<z.ZodCustom<FieldConfig, FieldConfig>>;
|
|
@@ -146,21 +161,6 @@ declare const optionsSchema: z.ZodObject<{
|
|
|
146
161
|
}, z.core.$strict>;
|
|
147
162
|
variants: z.ZodOptional<z.ZodArray<z.ZodCustom<import("../types/index.js").Variant, import("../types/index.js").Variant>>>;
|
|
148
163
|
order: z.ZodNumber;
|
|
149
|
-
gallery: z.ZodOptional<z.ZodObject<{
|
|
150
|
-
db: z.ZodObject<{
|
|
151
|
-
tableName: z.ZodString;
|
|
152
|
-
identifierField: z.ZodOptional<z.ZodString>;
|
|
153
|
-
photoNameField: z.ZodOptional<z.ZodString>;
|
|
154
|
-
metaField: z.ZodOptional<z.ZodString>;
|
|
155
|
-
}, z.core.$strict>;
|
|
156
|
-
watermark: z.ZodOptional<z.ZodBoolean>;
|
|
157
|
-
thumbnail: z.ZodOptional<z.ZodObject<{
|
|
158
|
-
width: z.ZodNumber;
|
|
159
|
-
height: z.ZodNumber;
|
|
160
|
-
crop: z.ZodBoolean;
|
|
161
|
-
quality: z.ZodNumber;
|
|
162
|
-
}, z.core.$strict>>;
|
|
163
|
-
}, z.core.$strict>>;
|
|
164
164
|
hooks: z.ZodOptional<z.ZodCustom<import("./section.js").Hooks, import("./section.js").Hooks>>;
|
|
165
165
|
}, z.core.$strict>;
|
|
166
166
|
export declare const categorySectionConfigSchema: z.ZodObject<{
|
|
@@ -215,9 +215,24 @@ export declare const categorySectionConfigSchema: z.ZodObject<{
|
|
|
215
215
|
* @default false
|
|
216
216
|
*/
|
|
217
217
|
allowRecursiveDelete: z.ZodOptional<z.ZodBoolean>;
|
|
218
|
+
name: z.ZodString;
|
|
219
|
+
gallery: z.ZodOptional<z.ZodObject<{
|
|
220
|
+
db: z.ZodObject<{
|
|
221
|
+
tableName: z.ZodString;
|
|
222
|
+
identifierField: z.ZodOptional<z.ZodString>;
|
|
223
|
+
photoNameField: z.ZodOptional<z.ZodString>;
|
|
224
|
+
metaField: z.ZodOptional<z.ZodString>;
|
|
225
|
+
}, z.core.$strict>;
|
|
226
|
+
watermark: z.ZodOptional<z.ZodBoolean>;
|
|
227
|
+
thumbnail: z.ZodOptional<z.ZodObject<{
|
|
228
|
+
width: z.ZodNumber;
|
|
229
|
+
height: z.ZodNumber;
|
|
230
|
+
crop: z.ZodBoolean;
|
|
231
|
+
quality: z.ZodNumber;
|
|
232
|
+
}, z.core.$strict>>;
|
|
233
|
+
}, z.core.$strict>>;
|
|
218
234
|
readonly: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
|
|
219
235
|
icon: z.ZodOptional<z.ZodString>;
|
|
220
|
-
name: z.ZodString;
|
|
221
236
|
db: z.ZodObject<{
|
|
222
237
|
table: z.ZodString;
|
|
223
238
|
identifier: z.ZodOptional<z.ZodCustom<FieldConfig, FieldConfig>>;
|
|
@@ -243,21 +258,6 @@ export declare const categorySectionConfigSchema: z.ZodObject<{
|
|
|
243
258
|
}, z.core.$strict>;
|
|
244
259
|
variants: z.ZodOptional<z.ZodArray<z.ZodCustom<import("../types/index.js").Variant, import("../types/index.js").Variant>>>;
|
|
245
260
|
order: z.ZodNumber;
|
|
246
|
-
gallery: z.ZodOptional<z.ZodObject<{
|
|
247
|
-
db: z.ZodObject<{
|
|
248
|
-
tableName: z.ZodString;
|
|
249
|
-
identifierField: z.ZodOptional<z.ZodString>;
|
|
250
|
-
photoNameField: z.ZodOptional<z.ZodString>;
|
|
251
|
-
metaField: z.ZodOptional<z.ZodString>;
|
|
252
|
-
}, z.core.$strict>;
|
|
253
|
-
watermark: z.ZodOptional<z.ZodBoolean>;
|
|
254
|
-
thumbnail: z.ZodOptional<z.ZodObject<{
|
|
255
|
-
width: z.ZodNumber;
|
|
256
|
-
height: z.ZodNumber;
|
|
257
|
-
crop: z.ZodBoolean;
|
|
258
|
-
quality: z.ZodNumber;
|
|
259
|
-
}, z.core.$strict>>;
|
|
260
|
-
}, z.core.$strict>>;
|
|
261
261
|
hooks: z.ZodOptional<z.ZodCustom<import("./section.js").Hooks, import("./section.js").Hooks>>;
|
|
262
262
|
}, z.core.$strict>;
|
|
263
263
|
export type CategorySectionOptions = z.infer<typeof optionsSchema>;
|
|
@@ -417,9 +417,24 @@ declare const optionsSchema: z.ZodObject<{
|
|
|
417
417
|
}>>;
|
|
418
418
|
generateQR: z.ZodOptional<z.ZodBoolean>;
|
|
419
419
|
fields: z.ZodUnion<[z.ZodArray<z.ZodCustom<FieldConfig, FieldConfig>>, z.ZodArray<z.ZodCustom<FieldGroupConfig, FieldGroupConfig>>]>;
|
|
420
|
+
name: z.ZodString;
|
|
421
|
+
gallery: z.ZodOptional<z.ZodObject<{
|
|
422
|
+
db: z.ZodObject<{
|
|
423
|
+
tableName: z.ZodString;
|
|
424
|
+
identifierField: z.ZodOptional<z.ZodString>;
|
|
425
|
+
photoNameField: z.ZodOptional<z.ZodString>;
|
|
426
|
+
metaField: z.ZodOptional<z.ZodString>;
|
|
427
|
+
}, z.core.$strict>;
|
|
428
|
+
watermark: z.ZodOptional<z.ZodBoolean>;
|
|
429
|
+
thumbnail: z.ZodOptional<z.ZodObject<{
|
|
430
|
+
width: z.ZodNumber;
|
|
431
|
+
height: z.ZodNumber;
|
|
432
|
+
crop: z.ZodBoolean;
|
|
433
|
+
quality: z.ZodNumber;
|
|
434
|
+
}, z.core.$strict>>;
|
|
435
|
+
}, z.core.$strict>>;
|
|
420
436
|
readonly: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
|
|
421
437
|
icon: z.ZodOptional<z.ZodString>;
|
|
422
|
-
name: z.ZodString;
|
|
423
438
|
db: z.ZodObject<{
|
|
424
439
|
table: z.ZodString;
|
|
425
440
|
identifier: z.ZodOptional<z.ZodCustom<FieldConfig, FieldConfig>>;
|
|
@@ -445,21 +460,6 @@ declare const optionsSchema: z.ZodObject<{
|
|
|
445
460
|
}, z.core.$strict>;
|
|
446
461
|
variants: z.ZodOptional<z.ZodArray<z.ZodCustom<import("../types/index.js").Variant, import("../types/index.js").Variant>>>;
|
|
447
462
|
order: z.ZodNumber;
|
|
448
|
-
gallery: z.ZodOptional<z.ZodObject<{
|
|
449
|
-
db: z.ZodObject<{
|
|
450
|
-
tableName: z.ZodString;
|
|
451
|
-
identifierField: z.ZodOptional<z.ZodString>;
|
|
452
|
-
photoNameField: z.ZodOptional<z.ZodString>;
|
|
453
|
-
metaField: z.ZodOptional<z.ZodString>;
|
|
454
|
-
}, z.core.$strict>;
|
|
455
|
-
watermark: z.ZodOptional<z.ZodBoolean>;
|
|
456
|
-
thumbnail: z.ZodOptional<z.ZodObject<{
|
|
457
|
-
width: z.ZodNumber;
|
|
458
|
-
height: z.ZodNumber;
|
|
459
|
-
crop: z.ZodBoolean;
|
|
460
|
-
quality: z.ZodNumber;
|
|
461
|
-
}, z.core.$strict>>;
|
|
462
|
-
}, z.core.$strict>>;
|
|
463
463
|
hooks: z.ZodOptional<z.ZodCustom<import("./section.js").Hooks, import("./section.js").Hooks>>;
|
|
464
464
|
}, z.core.$strict>;
|
|
465
465
|
declare const hasItemsSectionConfigSchema: z.ZodObject<{
|
|
@@ -658,9 +658,24 @@ declare const hasItemsSectionConfigSchema: z.ZodObject<{
|
|
|
658
658
|
adminGenerated?: boolean | "readonly" | undefined;
|
|
659
659
|
}>>;
|
|
660
660
|
generateQR: z.ZodOptional<z.ZodBoolean>;
|
|
661
|
+
name: z.ZodString;
|
|
662
|
+
gallery: z.ZodOptional<z.ZodObject<{
|
|
663
|
+
db: z.ZodObject<{
|
|
664
|
+
tableName: z.ZodString;
|
|
665
|
+
identifierField: z.ZodOptional<z.ZodString>;
|
|
666
|
+
photoNameField: z.ZodOptional<z.ZodString>;
|
|
667
|
+
metaField: z.ZodOptional<z.ZodString>;
|
|
668
|
+
}, z.core.$strict>;
|
|
669
|
+
watermark: z.ZodOptional<z.ZodBoolean>;
|
|
670
|
+
thumbnail: z.ZodOptional<z.ZodObject<{
|
|
671
|
+
width: z.ZodNumber;
|
|
672
|
+
height: z.ZodNumber;
|
|
673
|
+
crop: z.ZodBoolean;
|
|
674
|
+
quality: z.ZodNumber;
|
|
675
|
+
}, z.core.$strict>>;
|
|
676
|
+
}, z.core.$strict>>;
|
|
661
677
|
readonly: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
|
|
662
678
|
icon: z.ZodOptional<z.ZodString>;
|
|
663
|
-
name: z.ZodString;
|
|
664
679
|
db: z.ZodObject<{
|
|
665
680
|
table: z.ZodString;
|
|
666
681
|
identifier: z.ZodOptional<z.ZodCustom<FieldConfig, FieldConfig>>;
|
|
@@ -686,21 +701,6 @@ declare const hasItemsSectionConfigSchema: z.ZodObject<{
|
|
|
686
701
|
}, z.core.$strict>;
|
|
687
702
|
variants: z.ZodOptional<z.ZodArray<z.ZodCustom<import("../types/index.js").Variant, import("../types/index.js").Variant>>>;
|
|
688
703
|
order: z.ZodNumber;
|
|
689
|
-
gallery: z.ZodOptional<z.ZodObject<{
|
|
690
|
-
db: z.ZodObject<{
|
|
691
|
-
tableName: z.ZodString;
|
|
692
|
-
identifierField: z.ZodOptional<z.ZodString>;
|
|
693
|
-
photoNameField: z.ZodOptional<z.ZodString>;
|
|
694
|
-
metaField: z.ZodOptional<z.ZodString>;
|
|
695
|
-
}, z.core.$strict>;
|
|
696
|
-
watermark: z.ZodOptional<z.ZodBoolean>;
|
|
697
|
-
thumbnail: z.ZodOptional<z.ZodObject<{
|
|
698
|
-
width: z.ZodNumber;
|
|
699
|
-
height: z.ZodNumber;
|
|
700
|
-
crop: z.ZodBoolean;
|
|
701
|
-
quality: z.ZodNumber;
|
|
702
|
-
}, z.core.$strict>>;
|
|
703
|
-
}, z.core.$strict>>;
|
|
704
704
|
hooks: z.ZodOptional<z.ZodCustom<import("./section.js").Hooks, import("./section.js").Hooks>>;
|
|
705
705
|
}, z.core.$strict>;
|
|
706
706
|
export type HasItemsSectionOptions = z.infer<typeof optionsSchema>;
|
|
@@ -62,9 +62,24 @@ 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
|
+
name: z.ZodString;
|
|
66
|
+
gallery: z.ZodOptional<z.ZodObject<{
|
|
67
|
+
db: z.ZodObject<{
|
|
68
|
+
tableName: z.ZodString;
|
|
69
|
+
identifierField: z.ZodOptional<z.ZodString>;
|
|
70
|
+
photoNameField: z.ZodOptional<z.ZodString>;
|
|
71
|
+
metaField: z.ZodOptional<z.ZodString>;
|
|
72
|
+
}, z.core.$strict>;
|
|
73
|
+
watermark: z.ZodOptional<z.ZodBoolean>;
|
|
74
|
+
thumbnail: z.ZodOptional<z.ZodObject<{
|
|
75
|
+
width: z.ZodNumber;
|
|
76
|
+
height: z.ZodNumber;
|
|
77
|
+
crop: z.ZodBoolean;
|
|
78
|
+
quality: z.ZodNumber;
|
|
79
|
+
}, z.core.$strict>>;
|
|
80
|
+
}, z.core.$strict>>;
|
|
65
81
|
readonly: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
|
|
66
82
|
icon: z.ZodOptional<z.ZodString>;
|
|
67
|
-
name: z.ZodString;
|
|
68
83
|
db: z.ZodObject<{
|
|
69
84
|
table: z.ZodString;
|
|
70
85
|
identifier: z.ZodOptional<z.ZodCustom<FieldConfig, FieldConfig>>;
|
|
@@ -90,21 +105,6 @@ export declare const baseHelperFunctionOptionsSchema: z.ZodObject<{
|
|
|
90
105
|
}, z.core.$strict>;
|
|
91
106
|
variants: z.ZodOptional<z.ZodArray<z.ZodCustom<Variant, Variant>>>;
|
|
92
107
|
order: z.ZodNumber;
|
|
93
|
-
gallery: z.ZodOptional<z.ZodObject<{
|
|
94
|
-
db: z.ZodObject<{
|
|
95
|
-
tableName: z.ZodString;
|
|
96
|
-
identifierField: z.ZodOptional<z.ZodString>;
|
|
97
|
-
photoNameField: z.ZodOptional<z.ZodString>;
|
|
98
|
-
metaField: z.ZodOptional<z.ZodString>;
|
|
99
|
-
}, z.core.$strict>;
|
|
100
|
-
watermark: z.ZodOptional<z.ZodBoolean>;
|
|
101
|
-
thumbnail: z.ZodOptional<z.ZodObject<{
|
|
102
|
-
width: z.ZodNumber;
|
|
103
|
-
height: z.ZodNumber;
|
|
104
|
-
crop: z.ZodBoolean;
|
|
105
|
-
quality: z.ZodNumber;
|
|
106
|
-
}, z.core.$strict>>;
|
|
107
|
-
}, z.core.$strict>>;
|
|
108
108
|
hooks: z.ZodOptional<z.ZodCustom<Hooks, Hooks>>;
|
|
109
109
|
}, z.core.$strict>;
|
|
110
110
|
export declare function validateSectionConfig(config: BaseSectionOptions): void;
|
|
@@ -23,11 +23,7 @@ declare const optionsSchema: z.ZodObject<{
|
|
|
23
23
|
table: z.ZodString;
|
|
24
24
|
}, z.core.$strict>;
|
|
25
25
|
fields: z.ZodUnion<[z.ZodArray<z.ZodCustom<FieldConfig, FieldConfig>>, z.ZodArray<z.ZodCustom<FieldGroupConfig, FieldGroupConfig>>]>;
|
|
26
|
-
readonly: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
|
|
27
|
-
icon: z.ZodOptional<z.ZodString>;
|
|
28
26
|
name: z.ZodString;
|
|
29
|
-
variants: z.ZodOptional<z.ZodArray<z.ZodCustom<import("../types/index.js").Variant, import("../types/index.js").Variant>>>;
|
|
30
|
-
order: z.ZodNumber;
|
|
31
27
|
gallery: z.ZodOptional<z.ZodObject<{
|
|
32
28
|
db: z.ZodObject<{
|
|
33
29
|
tableName: z.ZodString;
|
|
@@ -43,6 +39,10 @@ declare const optionsSchema: z.ZodObject<{
|
|
|
43
39
|
quality: z.ZodNumber;
|
|
44
40
|
}, z.core.$strict>>;
|
|
45
41
|
}, z.core.$strict>>;
|
|
42
|
+
readonly: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
|
|
43
|
+
icon: z.ZodOptional<z.ZodString>;
|
|
44
|
+
variants: z.ZodOptional<z.ZodArray<z.ZodCustom<import("../types/index.js").Variant, import("../types/index.js").Variant>>>;
|
|
45
|
+
order: z.ZodNumber;
|
|
46
46
|
hooks: z.ZodOptional<z.ZodCustom<import("./section.js").Hooks, import("./section.js").Hooks>>;
|
|
47
47
|
}, z.core.$strict>;
|
|
48
48
|
declare const simpleSectionConfigSchema: z.ZodObject<{
|
|
@@ -54,11 +54,7 @@ declare const simpleSectionConfigSchema: z.ZodObject<{
|
|
|
54
54
|
db: z.ZodObject<{
|
|
55
55
|
table: z.ZodString;
|
|
56
56
|
}, z.core.$strict>;
|
|
57
|
-
readonly: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
|
|
58
|
-
icon: z.ZodOptional<z.ZodString>;
|
|
59
57
|
name: z.ZodString;
|
|
60
|
-
variants: z.ZodOptional<z.ZodArray<z.ZodCustom<import("../types/index.js").Variant, import("../types/index.js").Variant>>>;
|
|
61
|
-
order: z.ZodNumber;
|
|
62
58
|
gallery: z.ZodOptional<z.ZodObject<{
|
|
63
59
|
db: z.ZodObject<{
|
|
64
60
|
tableName: z.ZodString;
|
|
@@ -74,6 +70,10 @@ declare const simpleSectionConfigSchema: z.ZodObject<{
|
|
|
74
70
|
quality: z.ZodNumber;
|
|
75
71
|
}, z.core.$strict>>;
|
|
76
72
|
}, z.core.$strict>>;
|
|
73
|
+
readonly: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
|
|
74
|
+
icon: z.ZodOptional<z.ZodString>;
|
|
75
|
+
variants: z.ZodOptional<z.ZodArray<z.ZodCustom<import("../types/index.js").Variant, import("../types/index.js").Variant>>>;
|
|
76
|
+
order: z.ZodNumber;
|
|
77
77
|
hooks: z.ZodOptional<z.ZodCustom<import("./section.js").Hooks, import("./section.js").Hooks>>;
|
|
78
78
|
}, z.core.$strict>;
|
|
79
79
|
export type SimpleSectionOptions = z.infer<typeof optionsSchema>;
|