@reverso/core 0.1.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/README.md +45 -0
- package/dist/config/defaults.d.ts +35 -0
- package/dist/config/defaults.d.ts.map +1 -0
- package/dist/config/defaults.js +104 -0
- package/dist/config/defaults.js.map +1 -0
- package/dist/config/define-config.d.ts +40 -0
- package/dist/config/define-config.d.ts.map +1 -0
- package/dist/config/define-config.js +44 -0
- package/dist/config/define-config.js.map +1 -0
- package/dist/config/index.d.ts +8 -0
- package/dist/config/index.d.ts.map +1 -0
- package/dist/config/index.js +8 -0
- package/dist/config/index.js.map +1 -0
- package/dist/config/loader.d.ts +41 -0
- package/dist/config/loader.d.ts.map +1 -0
- package/dist/config/loader.js +99 -0
- package/dist/config/loader.js.map +1 -0
- package/dist/config/validation.d.ts +325 -0
- package/dist/config/validation.d.ts.map +1 -0
- package/dist/config/validation.js +185 -0
- package/dist/config/validation.js.map +1 -0
- package/dist/constants.d.ts +84 -0
- package/dist/constants.d.ts.map +1 -0
- package/dist/constants.js +120 -0
- package/dist/constants.js.map +1 -0
- package/dist/index.d.ts +29 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +37 -0
- package/dist/index.js.map +1 -0
- package/dist/types/config.d.ts +285 -0
- package/dist/types/config.d.ts.map +1 -0
- package/dist/types/config.js +5 -0
- package/dist/types/config.js.map +1 -0
- package/dist/types/content.d.ts +288 -0
- package/dist/types/content.d.ts.map +1 -0
- package/dist/types/content.js +6 -0
- package/dist/types/content.js.map +1 -0
- package/dist/types/fields.d.ts +187 -0
- package/dist/types/fields.d.ts.map +1 -0
- package/dist/types/fields.js +6 -0
- package/dist/types/fields.js.map +1 -0
- package/dist/types/index.d.ts +8 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/index.js +5 -0
- package/dist/types/index.js.map +1 -0
- package/dist/types/schema.d.ts +193 -0
- package/dist/types/schema.d.ts.map +1 -0
- package/dist/types/schema.js +6 -0
- package/dist/types/schema.js.map +1 -0
- package/dist/utils/index.d.ts +7 -0
- package/dist/utils/index.d.ts.map +1 -0
- package/dist/utils/index.js +10 -0
- package/dist/utils/index.js.map +1 -0
- package/dist/utils/naming.d.ts +122 -0
- package/dist/utils/naming.d.ts.map +1 -0
- package/dist/utils/naming.js +302 -0
- package/dist/utils/naming.js.map +1 -0
- package/dist/utils/path.d.ts +79 -0
- package/dist/utils/path.d.ts.map +1 -0
- package/dist/utils/path.js +219 -0
- package/dist/utils/path.js.map +1 -0
- package/dist/utils/validation.d.ts +256 -0
- package/dist/utils/validation.d.ts.map +1 -0
- package/dist/utils/validation.js +245 -0
- package/dist/utils/validation.js.map +1 -0
- package/package.json +58 -0
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Path utilities for parsing and building field paths.
|
|
3
|
+
* Field paths follow the format: page.section.field or page.section.$.field for repeaters.
|
|
4
|
+
*/
|
|
5
|
+
import type { ParsedPath } from '../types/schema.js';
|
|
6
|
+
/**
|
|
7
|
+
* Parse a field path into its components.
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* ```ts
|
|
11
|
+
* parsePath('home.hero.title')
|
|
12
|
+
* // { page: 'home', section: 'hero', field: 'title', isRepeater: false, full: 'home.hero.title' }
|
|
13
|
+
*
|
|
14
|
+
* parsePath('home.features.$.title')
|
|
15
|
+
* // { page: 'home', section: 'features', field: '$', isRepeater: true, repeaterField: 'title', full: 'home.features.$.title' }
|
|
16
|
+
* ```
|
|
17
|
+
*/
|
|
18
|
+
export declare function parsePath(path: string): ParsedPath;
|
|
19
|
+
/**
|
|
20
|
+
* Build a field path from components.
|
|
21
|
+
*
|
|
22
|
+
* @example
|
|
23
|
+
* ```ts
|
|
24
|
+
* buildPath('home', 'hero', 'title')
|
|
25
|
+
* // 'home.hero.title'
|
|
26
|
+
*
|
|
27
|
+
* buildPath('home', 'features', '$', 'title')
|
|
28
|
+
* // 'home.features.$.title'
|
|
29
|
+
* ```
|
|
30
|
+
*/
|
|
31
|
+
export declare function buildPath(...parts: string[]): string;
|
|
32
|
+
/**
|
|
33
|
+
* Get the page from a field path.
|
|
34
|
+
*/
|
|
35
|
+
export declare function getPageFromPath(path: string): string;
|
|
36
|
+
/**
|
|
37
|
+
* Get the section from a field path.
|
|
38
|
+
*/
|
|
39
|
+
export declare function getSectionFromPath(path: string): string;
|
|
40
|
+
/**
|
|
41
|
+
* Get the field name from a field path.
|
|
42
|
+
*/
|
|
43
|
+
export declare function getFieldFromPath(path: string): string;
|
|
44
|
+
/**
|
|
45
|
+
* Check if a path is a repeater path.
|
|
46
|
+
*/
|
|
47
|
+
export declare function isRepeaterPath(path: string): boolean;
|
|
48
|
+
/**
|
|
49
|
+
* Get the parent path (page.section or page.section.$ for repeaters).
|
|
50
|
+
*/
|
|
51
|
+
export declare function getParentPath(path: string): string;
|
|
52
|
+
/**
|
|
53
|
+
* Get the page.section path.
|
|
54
|
+
*/
|
|
55
|
+
export declare function getPageSectionPath(path: string): string;
|
|
56
|
+
/**
|
|
57
|
+
* Check if a path matches a pattern (supports * wildcard).
|
|
58
|
+
*
|
|
59
|
+
* @example
|
|
60
|
+
* ```ts
|
|
61
|
+
* matchPath('home.hero.title', 'home.*.title') // true
|
|
62
|
+
* matchPath('home.hero.title', 'home.hero.*') // true
|
|
63
|
+
* matchPath('home.hero.title', '*.hero.*') // true
|
|
64
|
+
* ```
|
|
65
|
+
*/
|
|
66
|
+
export declare function matchPath(path: string, pattern: string): boolean;
|
|
67
|
+
/**
|
|
68
|
+
* Sort paths by page, then section, then field.
|
|
69
|
+
*/
|
|
70
|
+
export declare function sortPaths(paths: string[]): string[];
|
|
71
|
+
/**
|
|
72
|
+
* Group paths by page.
|
|
73
|
+
*/
|
|
74
|
+
export declare function groupPathsByPage(paths: string[]): Map<string, string[]>;
|
|
75
|
+
/**
|
|
76
|
+
* Group paths by page and section.
|
|
77
|
+
*/
|
|
78
|
+
export declare function groupPathsBySection(paths: string[]): Map<string, Map<string, string[]>>;
|
|
79
|
+
//# sourceMappingURL=path.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"path.d.ts","sourceRoot":"","sources":["../../src/utils/path.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAErD;;;;;;;;;;;GAWG;AACH,wBAAgB,SAAS,CAAC,IAAI,EAAE,MAAM,GAAG,UAAU,CAiElD;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,SAAS,CAAC,GAAG,KAAK,EAAE,MAAM,EAAE,GAAG,MAAM,CA0BpD;AAED;;GAEG;AACH,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAGpD;AAED;;GAEG;AACH,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAGvD;AAED;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAGrD;AAED;;GAEG;AACH,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAKpD;AAED;;GAEG;AACH,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAMlD;AAED;;GAEG;AACH,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAGvD;AAED;;;;;;;;;GASG;AACH,wBAAgB,SAAS,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAchE;AAED;;GAEG;AACH,wBAAgB,SAAS,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,MAAM,EAAE,CAoBnD;AAED;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,CAWvE;AAED;;GAEG;AACH,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,GAAG,CAAC,MAAM,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,CAAC,CAavF"}
|
|
@@ -0,0 +1,219 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Path utilities for parsing and building field paths.
|
|
3
|
+
* Field paths follow the format: page.section.field or page.section.$.field for repeaters.
|
|
4
|
+
*/
|
|
5
|
+
import { PATH_SEPARATOR, REPEATER_PLACEHOLDER } from '../constants.js';
|
|
6
|
+
/**
|
|
7
|
+
* Parse a field path into its components.
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* ```ts
|
|
11
|
+
* parsePath('home.hero.title')
|
|
12
|
+
* // { page: 'home', section: 'hero', field: 'title', isRepeater: false, full: 'home.hero.title' }
|
|
13
|
+
*
|
|
14
|
+
* parsePath('home.features.$.title')
|
|
15
|
+
* // { page: 'home', section: 'features', field: '$', isRepeater: true, repeaterField: 'title', full: 'home.features.$.title' }
|
|
16
|
+
* ```
|
|
17
|
+
*/
|
|
18
|
+
export function parsePath(path) {
|
|
19
|
+
const trimmed = path.trim();
|
|
20
|
+
if (!trimmed) {
|
|
21
|
+
throw new Error('Path cannot be empty');
|
|
22
|
+
}
|
|
23
|
+
const parts = trimmed.split(PATH_SEPARATOR);
|
|
24
|
+
if (parts.length < 3) {
|
|
25
|
+
throw new Error(`Invalid path "${path}": must have at least 3 parts (page.section.field)`);
|
|
26
|
+
}
|
|
27
|
+
// Check for empty parts (consecutive dots or leading/trailing dots)
|
|
28
|
+
for (let i = 0; i < parts.length; i++) {
|
|
29
|
+
const part = parts[i];
|
|
30
|
+
if (!part || (part !== REPEATER_PLACEHOLDER && part.trim() === '')) {
|
|
31
|
+
throw new Error(`Invalid path "${path}": contains empty segment at position ${i + 1}`);
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
const page = parts[0];
|
|
35
|
+
const section = parts[1];
|
|
36
|
+
// Count $ placeholders
|
|
37
|
+
const dollarCount = parts.filter((p) => p === REPEATER_PLACEHOLDER).length;
|
|
38
|
+
if (dollarCount > 1) {
|
|
39
|
+
throw new Error(`Invalid path "${path}": can only contain one $ repeater placeholder`);
|
|
40
|
+
}
|
|
41
|
+
const isRepeater = dollarCount === 1;
|
|
42
|
+
if (isRepeater) {
|
|
43
|
+
const repeaterIndex = parts.indexOf(REPEATER_PLACEHOLDER);
|
|
44
|
+
// $ must be at position 2 (third element: page.section.$)
|
|
45
|
+
if (repeaterIndex !== 2) {
|
|
46
|
+
throw new Error(`Invalid path "${path}": $ placeholder must be at position 3 (page.section.$)`);
|
|
47
|
+
}
|
|
48
|
+
const repeaterField = parts.slice(repeaterIndex + 1).join(PATH_SEPARATOR) || undefined;
|
|
49
|
+
return {
|
|
50
|
+
page,
|
|
51
|
+
section,
|
|
52
|
+
field: REPEATER_PLACEHOLDER,
|
|
53
|
+
isRepeater: true,
|
|
54
|
+
repeaterField,
|
|
55
|
+
full: trimmed,
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
// For non-repeaters: page.section.field
|
|
59
|
+
const field = parts.slice(2).join(PATH_SEPARATOR);
|
|
60
|
+
return {
|
|
61
|
+
page,
|
|
62
|
+
section,
|
|
63
|
+
field,
|
|
64
|
+
isRepeater: false,
|
|
65
|
+
full: trimmed,
|
|
66
|
+
};
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* Build a field path from components.
|
|
70
|
+
*
|
|
71
|
+
* @example
|
|
72
|
+
* ```ts
|
|
73
|
+
* buildPath('home', 'hero', 'title')
|
|
74
|
+
* // 'home.hero.title'
|
|
75
|
+
*
|
|
76
|
+
* buildPath('home', 'features', '$', 'title')
|
|
77
|
+
* // 'home.features.$.title'
|
|
78
|
+
* ```
|
|
79
|
+
*/
|
|
80
|
+
export function buildPath(...parts) {
|
|
81
|
+
// Check for empty parts first
|
|
82
|
+
for (let i = 0; i < parts.length; i++) {
|
|
83
|
+
if (!parts[i] || parts[i]?.trim() === '') {
|
|
84
|
+
throw new Error(`Path part at index ${i} cannot be empty`);
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
if (parts.length < 3) {
|
|
88
|
+
throw new Error('Path must have at least 3 parts (page.section.field)');
|
|
89
|
+
}
|
|
90
|
+
// Validate $ placeholder usage
|
|
91
|
+
const dollarIndices = parts
|
|
92
|
+
.map((part, index) => (part === REPEATER_PLACEHOLDER ? index : -1))
|
|
93
|
+
.filter((i) => i !== -1);
|
|
94
|
+
if (dollarIndices.length > 1) {
|
|
95
|
+
throw new Error('Path can only contain one $ repeater placeholder');
|
|
96
|
+
}
|
|
97
|
+
if (dollarIndices.length === 1 && dollarIndices[0] !== 2) {
|
|
98
|
+
throw new Error('Repeater placeholder $ must be at position 3 (page.section.$)');
|
|
99
|
+
}
|
|
100
|
+
return parts.join(PATH_SEPARATOR);
|
|
101
|
+
}
|
|
102
|
+
/**
|
|
103
|
+
* Get the page from a field path.
|
|
104
|
+
*/
|
|
105
|
+
export function getPageFromPath(path) {
|
|
106
|
+
const parsed = parsePath(path);
|
|
107
|
+
return parsed.page;
|
|
108
|
+
}
|
|
109
|
+
/**
|
|
110
|
+
* Get the section from a field path.
|
|
111
|
+
*/
|
|
112
|
+
export function getSectionFromPath(path) {
|
|
113
|
+
const parsed = parsePath(path);
|
|
114
|
+
return parsed.section;
|
|
115
|
+
}
|
|
116
|
+
/**
|
|
117
|
+
* Get the field name from a field path.
|
|
118
|
+
*/
|
|
119
|
+
export function getFieldFromPath(path) {
|
|
120
|
+
const parsed = parsePath(path);
|
|
121
|
+
return parsed.repeaterField ?? parsed.field;
|
|
122
|
+
}
|
|
123
|
+
/**
|
|
124
|
+
* Check if a path is a repeater path.
|
|
125
|
+
*/
|
|
126
|
+
export function isRepeaterPath(path) {
|
|
127
|
+
return (path.includes(`${PATH_SEPARATOR}${REPEATER_PLACEHOLDER}${PATH_SEPARATOR}`) ||
|
|
128
|
+
path.endsWith(`${PATH_SEPARATOR}${REPEATER_PLACEHOLDER}`));
|
|
129
|
+
}
|
|
130
|
+
/**
|
|
131
|
+
* Get the parent path (page.section or page.section.$ for repeaters).
|
|
132
|
+
*/
|
|
133
|
+
export function getParentPath(path) {
|
|
134
|
+
const parts = path.split(PATH_SEPARATOR);
|
|
135
|
+
if (parts.length <= 2) {
|
|
136
|
+
return parts[0] ?? '';
|
|
137
|
+
}
|
|
138
|
+
return parts.slice(0, -1).join(PATH_SEPARATOR);
|
|
139
|
+
}
|
|
140
|
+
/**
|
|
141
|
+
* Get the page.section path.
|
|
142
|
+
*/
|
|
143
|
+
export function getPageSectionPath(path) {
|
|
144
|
+
const parsed = parsePath(path);
|
|
145
|
+
return `${parsed.page}${PATH_SEPARATOR}${parsed.section}`;
|
|
146
|
+
}
|
|
147
|
+
/**
|
|
148
|
+
* Check if a path matches a pattern (supports * wildcard).
|
|
149
|
+
*
|
|
150
|
+
* @example
|
|
151
|
+
* ```ts
|
|
152
|
+
* matchPath('home.hero.title', 'home.*.title') // true
|
|
153
|
+
* matchPath('home.hero.title', 'home.hero.*') // true
|
|
154
|
+
* matchPath('home.hero.title', '*.hero.*') // true
|
|
155
|
+
* ```
|
|
156
|
+
*/
|
|
157
|
+
export function matchPath(path, pattern) {
|
|
158
|
+
const pathParts = path.split(PATH_SEPARATOR);
|
|
159
|
+
const patternParts = pattern.split(PATH_SEPARATOR);
|
|
160
|
+
if (pathParts.length !== patternParts.length) {
|
|
161
|
+
return false;
|
|
162
|
+
}
|
|
163
|
+
return patternParts.every((patternPart, index) => {
|
|
164
|
+
if (patternPart === '*') {
|
|
165
|
+
return true;
|
|
166
|
+
}
|
|
167
|
+
return patternPart === pathParts[index];
|
|
168
|
+
});
|
|
169
|
+
}
|
|
170
|
+
/**
|
|
171
|
+
* Sort paths by page, then section, then field.
|
|
172
|
+
*/
|
|
173
|
+
export function sortPaths(paths) {
|
|
174
|
+
return [...paths].sort((a, b) => {
|
|
175
|
+
const parsedA = parsePath(a);
|
|
176
|
+
const parsedB = parsePath(b);
|
|
177
|
+
// Sort by page
|
|
178
|
+
if (parsedA.page !== parsedB.page) {
|
|
179
|
+
return parsedA.page.localeCompare(parsedB.page);
|
|
180
|
+
}
|
|
181
|
+
// Sort by section
|
|
182
|
+
if (parsedA.section !== parsedB.section) {
|
|
183
|
+
return parsedA.section.localeCompare(parsedB.section);
|
|
184
|
+
}
|
|
185
|
+
// Sort by field
|
|
186
|
+
const fieldA = parsedA.repeaterField ?? parsedA.field;
|
|
187
|
+
const fieldB = parsedB.repeaterField ?? parsedB.field;
|
|
188
|
+
return fieldA.localeCompare(fieldB);
|
|
189
|
+
});
|
|
190
|
+
}
|
|
191
|
+
/**
|
|
192
|
+
* Group paths by page.
|
|
193
|
+
*/
|
|
194
|
+
export function groupPathsByPage(paths) {
|
|
195
|
+
const grouped = new Map();
|
|
196
|
+
for (const path of paths) {
|
|
197
|
+
const page = getPageFromPath(path);
|
|
198
|
+
const existing = grouped.get(page) ?? [];
|
|
199
|
+
existing.push(path);
|
|
200
|
+
grouped.set(page, existing);
|
|
201
|
+
}
|
|
202
|
+
return grouped;
|
|
203
|
+
}
|
|
204
|
+
/**
|
|
205
|
+
* Group paths by page and section.
|
|
206
|
+
*/
|
|
207
|
+
export function groupPathsBySection(paths) {
|
|
208
|
+
const grouped = new Map();
|
|
209
|
+
for (const path of paths) {
|
|
210
|
+
const parsed = parsePath(path);
|
|
211
|
+
const pageGroup = grouped.get(parsed.page) ?? new Map();
|
|
212
|
+
const sectionPaths = pageGroup.get(parsed.section) ?? [];
|
|
213
|
+
sectionPaths.push(path);
|
|
214
|
+
pageGroup.set(parsed.section, sectionPaths);
|
|
215
|
+
grouped.set(parsed.page, pageGroup);
|
|
216
|
+
}
|
|
217
|
+
return grouped;
|
|
218
|
+
}
|
|
219
|
+
//# sourceMappingURL=path.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"path.js","sourceRoot":"","sources":["../../src/utils/path.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,cAAc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AAC;IAED,OAAO,OAAO,CAAC;AACjB,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,mBAAmB,CAAC,KAAe;IACjD,MAAM,OAAO,GAAG,IAAI,GAAG,EAAiC,CAAC;IAEzD,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE,CAAC;QACzB,MAAM,MAAM,GAAG,SAAS,CAAC,IAAI,CAAC,CAAC;QAC/B,MAAM,SAAS,GAAG,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,IAAI,GAAG,EAAoB,CAAC;QAC1E,MAAM,YAAY,GAAG,SAAS,CAAC,GAAG,CAAC,MAAM,CAAC,OAAO,CAAC,IAAI,EAAE,CAAC;QACzD,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACxB,SAAS,CAAC,GAAG,CAAC,MAAM,CAAC,OAAO,EAAE,YAAY,CAAC,CAAC;QAC5C,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,IAAI,EAAE,SAAS,CAAC,CAAC;IACtC,CAAC;IAED,OAAO,OAAO,CAAC;AACjB,CAAC"}
|
|
@@ -0,0 +1,256 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Validation schemas and utilities using Zod.
|
|
3
|
+
*/
|
|
4
|
+
import { z } from 'zod';
|
|
5
|
+
import type { FieldType } from '../types/fields.js';
|
|
6
|
+
/**
|
|
7
|
+
* All valid field types.
|
|
8
|
+
*/
|
|
9
|
+
export declare const FIELD_TYPES: FieldType[];
|
|
10
|
+
/**
|
|
11
|
+
* Zod schema for field type validation.
|
|
12
|
+
*/
|
|
13
|
+
export declare const fieldTypeSchema: z.ZodEnum<{
|
|
14
|
+
number: "number";
|
|
15
|
+
boolean: "boolean";
|
|
16
|
+
text: "text";
|
|
17
|
+
textarea: "textarea";
|
|
18
|
+
range: "range";
|
|
19
|
+
email: "email";
|
|
20
|
+
url: "url";
|
|
21
|
+
phone: "phone";
|
|
22
|
+
wysiwyg: "wysiwyg";
|
|
23
|
+
markdown: "markdown";
|
|
24
|
+
code: "code";
|
|
25
|
+
blocks: "blocks";
|
|
26
|
+
select: "select";
|
|
27
|
+
multiselect: "multiselect";
|
|
28
|
+
checkbox: "checkbox";
|
|
29
|
+
checkboxgroup: "checkboxgroup";
|
|
30
|
+
radio: "radio";
|
|
31
|
+
image: "image";
|
|
32
|
+
file: "file";
|
|
33
|
+
gallery: "gallery";
|
|
34
|
+
video: "video";
|
|
35
|
+
audio: "audio";
|
|
36
|
+
oembed: "oembed";
|
|
37
|
+
date: "date";
|
|
38
|
+
datetime: "datetime";
|
|
39
|
+
time: "time";
|
|
40
|
+
relation: "relation";
|
|
41
|
+
taxonomy: "taxonomy";
|
|
42
|
+
link: "link";
|
|
43
|
+
pagelink: "pagelink";
|
|
44
|
+
user: "user";
|
|
45
|
+
color: "color";
|
|
46
|
+
map: "map";
|
|
47
|
+
repeater: "repeater";
|
|
48
|
+
group: "group";
|
|
49
|
+
flexible: "flexible";
|
|
50
|
+
message: "message";
|
|
51
|
+
tab: "tab";
|
|
52
|
+
accordion: "accordion";
|
|
53
|
+
buttongroup: "buttongroup";
|
|
54
|
+
}>;
|
|
55
|
+
/**
|
|
56
|
+
* Zod schema for field path validation.
|
|
57
|
+
*/
|
|
58
|
+
export declare const fieldPathSchema: z.ZodString;
|
|
59
|
+
/**
|
|
60
|
+
* Zod schema for field attributes validation.
|
|
61
|
+
*/
|
|
62
|
+
export declare const fieldAttributesSchema: z.ZodObject<{
|
|
63
|
+
type: z.ZodOptional<z.ZodEnum<{
|
|
64
|
+
number: "number";
|
|
65
|
+
boolean: "boolean";
|
|
66
|
+
text: "text";
|
|
67
|
+
textarea: "textarea";
|
|
68
|
+
range: "range";
|
|
69
|
+
email: "email";
|
|
70
|
+
url: "url";
|
|
71
|
+
phone: "phone";
|
|
72
|
+
wysiwyg: "wysiwyg";
|
|
73
|
+
markdown: "markdown";
|
|
74
|
+
code: "code";
|
|
75
|
+
blocks: "blocks";
|
|
76
|
+
select: "select";
|
|
77
|
+
multiselect: "multiselect";
|
|
78
|
+
checkbox: "checkbox";
|
|
79
|
+
checkboxgroup: "checkboxgroup";
|
|
80
|
+
radio: "radio";
|
|
81
|
+
image: "image";
|
|
82
|
+
file: "file";
|
|
83
|
+
gallery: "gallery";
|
|
84
|
+
video: "video";
|
|
85
|
+
audio: "audio";
|
|
86
|
+
oembed: "oembed";
|
|
87
|
+
date: "date";
|
|
88
|
+
datetime: "datetime";
|
|
89
|
+
time: "time";
|
|
90
|
+
relation: "relation";
|
|
91
|
+
taxonomy: "taxonomy";
|
|
92
|
+
link: "link";
|
|
93
|
+
pagelink: "pagelink";
|
|
94
|
+
user: "user";
|
|
95
|
+
color: "color";
|
|
96
|
+
map: "map";
|
|
97
|
+
repeater: "repeater";
|
|
98
|
+
group: "group";
|
|
99
|
+
flexible: "flexible";
|
|
100
|
+
message: "message";
|
|
101
|
+
tab: "tab";
|
|
102
|
+
accordion: "accordion";
|
|
103
|
+
buttongroup: "buttongroup";
|
|
104
|
+
}>>;
|
|
105
|
+
label: z.ZodOptional<z.ZodString>;
|
|
106
|
+
placeholder: z.ZodOptional<z.ZodString>;
|
|
107
|
+
required: z.ZodOptional<z.ZodCoercedBoolean<unknown>>;
|
|
108
|
+
validation: z.ZodOptional<z.ZodString>;
|
|
109
|
+
options: z.ZodOptional<z.ZodString>;
|
|
110
|
+
condition: z.ZodOptional<z.ZodString>;
|
|
111
|
+
default: z.ZodOptional<z.ZodString>;
|
|
112
|
+
help: z.ZodOptional<z.ZodString>;
|
|
113
|
+
min: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
|
|
114
|
+
max: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
|
|
115
|
+
step: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
|
|
116
|
+
accept: z.ZodOptional<z.ZodString>;
|
|
117
|
+
multiple: z.ZodOptional<z.ZodCoercedBoolean<unknown>>;
|
|
118
|
+
rows: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
|
|
119
|
+
width: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
|
|
120
|
+
readonly: z.ZodOptional<z.ZodCoercedBoolean<unknown>>;
|
|
121
|
+
hidden: z.ZodOptional<z.ZodCoercedBoolean<unknown>>;
|
|
122
|
+
}, z.core.$strip>;
|
|
123
|
+
/**
|
|
124
|
+
* Zod schema for a complete field schema.
|
|
125
|
+
*/
|
|
126
|
+
export declare const fieldSchema: z.ZodObject<{
|
|
127
|
+
label: z.ZodOptional<z.ZodString>;
|
|
128
|
+
placeholder: z.ZodOptional<z.ZodString>;
|
|
129
|
+
required: z.ZodOptional<z.ZodCoercedBoolean<unknown>>;
|
|
130
|
+
validation: z.ZodOptional<z.ZodString>;
|
|
131
|
+
options: z.ZodOptional<z.ZodString>;
|
|
132
|
+
condition: z.ZodOptional<z.ZodString>;
|
|
133
|
+
default: z.ZodOptional<z.ZodString>;
|
|
134
|
+
help: z.ZodOptional<z.ZodString>;
|
|
135
|
+
min: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
|
|
136
|
+
max: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
|
|
137
|
+
step: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
|
|
138
|
+
accept: z.ZodOptional<z.ZodString>;
|
|
139
|
+
multiple: z.ZodOptional<z.ZodCoercedBoolean<unknown>>;
|
|
140
|
+
rows: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
|
|
141
|
+
width: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
|
|
142
|
+
readonly: z.ZodOptional<z.ZodCoercedBoolean<unknown>>;
|
|
143
|
+
hidden: z.ZodOptional<z.ZodCoercedBoolean<unknown>>;
|
|
144
|
+
path: z.ZodString;
|
|
145
|
+
type: z.ZodEnum<{
|
|
146
|
+
number: "number";
|
|
147
|
+
boolean: "boolean";
|
|
148
|
+
text: "text";
|
|
149
|
+
textarea: "textarea";
|
|
150
|
+
range: "range";
|
|
151
|
+
email: "email";
|
|
152
|
+
url: "url";
|
|
153
|
+
phone: "phone";
|
|
154
|
+
wysiwyg: "wysiwyg";
|
|
155
|
+
markdown: "markdown";
|
|
156
|
+
code: "code";
|
|
157
|
+
blocks: "blocks";
|
|
158
|
+
select: "select";
|
|
159
|
+
multiselect: "multiselect";
|
|
160
|
+
checkbox: "checkbox";
|
|
161
|
+
checkboxgroup: "checkboxgroup";
|
|
162
|
+
radio: "radio";
|
|
163
|
+
image: "image";
|
|
164
|
+
file: "file";
|
|
165
|
+
gallery: "gallery";
|
|
166
|
+
video: "video";
|
|
167
|
+
audio: "audio";
|
|
168
|
+
oembed: "oembed";
|
|
169
|
+
date: "date";
|
|
170
|
+
datetime: "datetime";
|
|
171
|
+
time: "time";
|
|
172
|
+
relation: "relation";
|
|
173
|
+
taxonomy: "taxonomy";
|
|
174
|
+
link: "link";
|
|
175
|
+
pagelink: "pagelink";
|
|
176
|
+
user: "user";
|
|
177
|
+
color: "color";
|
|
178
|
+
map: "map";
|
|
179
|
+
repeater: "repeater";
|
|
180
|
+
group: "group";
|
|
181
|
+
flexible: "flexible";
|
|
182
|
+
message: "message";
|
|
183
|
+
tab: "tab";
|
|
184
|
+
accordion: "accordion";
|
|
185
|
+
buttongroup: "buttongroup";
|
|
186
|
+
}>;
|
|
187
|
+
file: z.ZodString;
|
|
188
|
+
line: z.ZodNumber;
|
|
189
|
+
column: z.ZodNumber;
|
|
190
|
+
element: z.ZodOptional<z.ZodString>;
|
|
191
|
+
defaultContent: z.ZodOptional<z.ZodString>;
|
|
192
|
+
}, z.core.$strip>;
|
|
193
|
+
/**
|
|
194
|
+
* Validate a field type string.
|
|
195
|
+
*/
|
|
196
|
+
export declare function isValidFieldType(type: string): type is FieldType;
|
|
197
|
+
/**
|
|
198
|
+
* Validate a field path string.
|
|
199
|
+
*/
|
|
200
|
+
export declare function isValidFieldPath(path: string): boolean;
|
|
201
|
+
/**
|
|
202
|
+
* Validate field attributes.
|
|
203
|
+
*/
|
|
204
|
+
export declare function validateFieldAttributes(attrs: Record<string, unknown>): {
|
|
205
|
+
success: boolean;
|
|
206
|
+
data?: z.infer<typeof fieldAttributesSchema>;
|
|
207
|
+
errors?: string[];
|
|
208
|
+
};
|
|
209
|
+
/**
|
|
210
|
+
* Validate a complete field schema.
|
|
211
|
+
*/
|
|
212
|
+
export declare function validateFieldSchema(schema: unknown): {
|
|
213
|
+
success: boolean;
|
|
214
|
+
data?: z.infer<typeof fieldSchema>;
|
|
215
|
+
errors?: string[];
|
|
216
|
+
};
|
|
217
|
+
/**
|
|
218
|
+
* Check if an attribute name is a valid data-reverso-* attribute.
|
|
219
|
+
*/
|
|
220
|
+
export declare function isValidAttribute(name: string): boolean;
|
|
221
|
+
/**
|
|
222
|
+
* Extract the attribute name from a data-reverso-* attribute.
|
|
223
|
+
*
|
|
224
|
+
* @example
|
|
225
|
+
* ```ts
|
|
226
|
+
* extractAttributeName('data-reverso-type') // 'type'
|
|
227
|
+
* extractAttributeName('data-reverso') // null
|
|
228
|
+
* extractAttributeName('data-other') // null
|
|
229
|
+
* ```
|
|
230
|
+
*/
|
|
231
|
+
export declare function extractAttributeName(attr: string): string | null;
|
|
232
|
+
/**
|
|
233
|
+
* Parse options string into array of option objects.
|
|
234
|
+
*
|
|
235
|
+
* @example
|
|
236
|
+
* ```ts
|
|
237
|
+
* parseOptions('red,green,blue')
|
|
238
|
+
* // [{ label: 'Red', value: 'red' }, { label: 'Green', value: 'green' }, { label: 'Blue', value: 'blue' }]
|
|
239
|
+
*
|
|
240
|
+
* parseOptions('[{"label":"Red","value":"#f00"}]')
|
|
241
|
+
* // [{ label: 'Red', value: '#f00' }]
|
|
242
|
+
* ```
|
|
243
|
+
*/
|
|
244
|
+
export declare function parseOptions(optionsStr: string): Array<{
|
|
245
|
+
label: string;
|
|
246
|
+
value: string;
|
|
247
|
+
}>;
|
|
248
|
+
/**
|
|
249
|
+
* Parse a condition string (basic format: field=value or field!=value).
|
|
250
|
+
*/
|
|
251
|
+
export declare function parseCondition(conditionStr: string): {
|
|
252
|
+
field: string;
|
|
253
|
+
operator: '=' | '!=' | '>' | '<' | '>=' | '<=';
|
|
254
|
+
value: string;
|
|
255
|
+
} | null;
|
|
256
|
+
//# sourceMappingURL=validation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"validation.d.ts","sourceRoot":"","sources":["../../src/utils/validation.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAEpD;;GAEG;AACH,eAAO,MAAM,WAAW,EAAE,SAAS,EAyClC,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAAqD,CAAC;AAElF;;GAEG;AACH,eAAO,MAAM,eAAe,aAU3B,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAmBhC,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAQtB,CAAC;AAEH;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,IAAI,SAAS,CAEhE;AAED;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAEtD;AAED;;GAEG;AACH,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG;IACvE,OAAO,EAAE,OAAO,CAAC;IACjB,IAAI,CAAC,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;IAC7C,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;CACnB,CASA;AAED;;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