@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,193 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Schema type definitions for pages and sections.
|
|
3
|
+
* Represents the hierarchical structure: Page > Section > Field
|
|
4
|
+
*/
|
|
5
|
+
import type { FieldSchema, FieldType } from './fields.js';
|
|
6
|
+
/**
|
|
7
|
+
* Path components extracted from a field path like "home.hero.title"
|
|
8
|
+
*/
|
|
9
|
+
export interface ParsedPath {
|
|
10
|
+
/** Page slug (e.g., "home") */
|
|
11
|
+
page: string;
|
|
12
|
+
/** Section slug (e.g., "hero") */
|
|
13
|
+
section: string;
|
|
14
|
+
/** Field name (e.g., "title") */
|
|
15
|
+
field: string;
|
|
16
|
+
/** Whether this is a repeater item (contains $) */
|
|
17
|
+
isRepeater: boolean;
|
|
18
|
+
/** Repeater item field (if applicable) */
|
|
19
|
+
repeaterField?: string;
|
|
20
|
+
/** Full original path */
|
|
21
|
+
full: string;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Schema for a section within a page.
|
|
25
|
+
*/
|
|
26
|
+
export interface SectionSchema {
|
|
27
|
+
/** Section slug (e.g., "hero") */
|
|
28
|
+
slug: string;
|
|
29
|
+
/** Human-readable name (e.g., "Hero Section") */
|
|
30
|
+
name: string;
|
|
31
|
+
/** Fields within this section */
|
|
32
|
+
fields: FieldSchema[];
|
|
33
|
+
/** Whether this section contains a repeater */
|
|
34
|
+
isRepeater: boolean;
|
|
35
|
+
/** Repeater configuration if applicable */
|
|
36
|
+
repeaterConfig?: {
|
|
37
|
+
min?: number;
|
|
38
|
+
max?: number;
|
|
39
|
+
itemLabel?: string;
|
|
40
|
+
};
|
|
41
|
+
/** Order of this section (for sorting) */
|
|
42
|
+
order: number;
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Schema for a page.
|
|
46
|
+
*/
|
|
47
|
+
export interface PageSchema {
|
|
48
|
+
/** Page slug (e.g., "home") */
|
|
49
|
+
slug: string;
|
|
50
|
+
/** Human-readable name (e.g., "Home Page") */
|
|
51
|
+
name: string;
|
|
52
|
+
/** Sections within this page */
|
|
53
|
+
sections: SectionSchema[];
|
|
54
|
+
/** Total field count across all sections */
|
|
55
|
+
fieldCount: number;
|
|
56
|
+
/** Source files containing this page's fields */
|
|
57
|
+
sourceFiles: string[];
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* Complete schema for the entire project.
|
|
61
|
+
*/
|
|
62
|
+
export interface ProjectSchema {
|
|
63
|
+
/** Schema version for compatibility checks */
|
|
64
|
+
version: string;
|
|
65
|
+
/** When the schema was generated */
|
|
66
|
+
generatedAt: string;
|
|
67
|
+
/** All pages in the project */
|
|
68
|
+
pages: PageSchema[];
|
|
69
|
+
/** Total page count */
|
|
70
|
+
pageCount: number;
|
|
71
|
+
/** Total field count */
|
|
72
|
+
totalFields: number;
|
|
73
|
+
/** Metadata about the scan */
|
|
74
|
+
meta: {
|
|
75
|
+
/** Source directory that was scanned */
|
|
76
|
+
srcDir: string;
|
|
77
|
+
/** Files that were scanned */
|
|
78
|
+
filesScanned: number;
|
|
79
|
+
/** Files that contained markers */
|
|
80
|
+
filesWithMarkers: number;
|
|
81
|
+
/** Scan duration in milliseconds */
|
|
82
|
+
scanDuration: number;
|
|
83
|
+
};
|
|
84
|
+
}
|
|
85
|
+
/**
|
|
86
|
+
* Result of a schema diff operation.
|
|
87
|
+
*/
|
|
88
|
+
export interface SchemaDiff {
|
|
89
|
+
/** Fields that were added */
|
|
90
|
+
added: FieldSchema[];
|
|
91
|
+
/** Fields that were removed */
|
|
92
|
+
removed: FieldSchema[];
|
|
93
|
+
/** Fields that were modified */
|
|
94
|
+
modified: Array<{
|
|
95
|
+
path: string;
|
|
96
|
+
before: FieldSchema;
|
|
97
|
+
after: FieldSchema;
|
|
98
|
+
changes: string[];
|
|
99
|
+
}>;
|
|
100
|
+
/** Whether there are any changes */
|
|
101
|
+
hasChanges: boolean;
|
|
102
|
+
}
|
|
103
|
+
/**
|
|
104
|
+
* Options for schema generation.
|
|
105
|
+
*/
|
|
106
|
+
export interface SchemaGeneratorOptions {
|
|
107
|
+
/** Include source file information */
|
|
108
|
+
includeSourceInfo?: boolean;
|
|
109
|
+
/** Include default content from JSX */
|
|
110
|
+
includeDefaults?: boolean;
|
|
111
|
+
/** Sort pages/sections/fields alphabetically */
|
|
112
|
+
sort?: boolean;
|
|
113
|
+
/** Default field type when not specified */
|
|
114
|
+
defaultFieldType?: FieldType;
|
|
115
|
+
}
|
|
116
|
+
/**
|
|
117
|
+
* A raw field detection before full schema generation.
|
|
118
|
+
*/
|
|
119
|
+
export interface DetectedField {
|
|
120
|
+
/** The data-reverso attribute value */
|
|
121
|
+
path: string;
|
|
122
|
+
/** All data-reverso-* attributes */
|
|
123
|
+
attributes: Record<string, string | undefined>;
|
|
124
|
+
/** Source file path */
|
|
125
|
+
file: string;
|
|
126
|
+
/** Line number */
|
|
127
|
+
line: number;
|
|
128
|
+
/** Column number */
|
|
129
|
+
column: number;
|
|
130
|
+
/** JSX element tag name */
|
|
131
|
+
element: string;
|
|
132
|
+
/** Text content of the element */
|
|
133
|
+
textContent?: string;
|
|
134
|
+
}
|
|
135
|
+
/**
|
|
136
|
+
* Result of scanning a single file.
|
|
137
|
+
*/
|
|
138
|
+
export interface FileScanResult {
|
|
139
|
+
/** File path */
|
|
140
|
+
file: string;
|
|
141
|
+
/** Detected fields */
|
|
142
|
+
fields: DetectedField[];
|
|
143
|
+
/** Any errors encountered */
|
|
144
|
+
errors: ScanError[];
|
|
145
|
+
/** Scan duration for this file in milliseconds */
|
|
146
|
+
duration: number;
|
|
147
|
+
}
|
|
148
|
+
/**
|
|
149
|
+
* Error encountered during scanning.
|
|
150
|
+
*/
|
|
151
|
+
export interface ScanError {
|
|
152
|
+
/** Error type */
|
|
153
|
+
type: 'parse' | 'validation' | 'io';
|
|
154
|
+
/** Error message */
|
|
155
|
+
message: string;
|
|
156
|
+
/** File path (if applicable) */
|
|
157
|
+
file?: string;
|
|
158
|
+
/** Line number (if applicable) */
|
|
159
|
+
line?: number;
|
|
160
|
+
/** Column number (if applicable) */
|
|
161
|
+
column?: number;
|
|
162
|
+
}
|
|
163
|
+
/**
|
|
164
|
+
* Options for the scan operation.
|
|
165
|
+
*/
|
|
166
|
+
export interface ScanOptions {
|
|
167
|
+
/** Directory to scan */
|
|
168
|
+
srcDir: string;
|
|
169
|
+
/** Glob patterns to include */
|
|
170
|
+
include?: string[];
|
|
171
|
+
/** Glob patterns to exclude */
|
|
172
|
+
exclude?: string[];
|
|
173
|
+
/** Watch for changes */
|
|
174
|
+
watch?: boolean;
|
|
175
|
+
/** Verbose logging */
|
|
176
|
+
verbose?: boolean;
|
|
177
|
+
/** Fail on errors instead of continuing */
|
|
178
|
+
strict?: boolean;
|
|
179
|
+
}
|
|
180
|
+
/**
|
|
181
|
+
* Result of a complete scan operation.
|
|
182
|
+
*/
|
|
183
|
+
export interface ScanResult {
|
|
184
|
+
/** Generated schema */
|
|
185
|
+
schema: ProjectSchema;
|
|
186
|
+
/** Individual file results */
|
|
187
|
+
files: FileScanResult[];
|
|
188
|
+
/** All errors encountered */
|
|
189
|
+
errors: ScanError[];
|
|
190
|
+
/** Whether the scan was successful */
|
|
191
|
+
success: boolean;
|
|
192
|
+
}
|
|
193
|
+
//# sourceMappingURL=sch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,aAAa,CAAC;IACtB,8BAA8B;IAC9B,KAAK,EAAE,cAAc,EAAE,CAAC;IACxB,6BAA6B;IAC7B,MAAM,EAAE,SAAS,EAAE,CAAC;IACpB,sCAAsC;IACtC,OAAO,EAAE,OAAO,CAAC;CAClB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schema.js","sourceRoot":"","sources":["../../src/types/schema.ts"],"names":[],"mappings":"AAAA;;;GAGG"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Utility exports for @reverso/core
|
|
3
|
+
*/
|
|
4
|
+
export { parsePath, buildPath, getPageFromPath, getSectionFromPath, getFieldFromPath, isRepeaterPath, getParentPath, getPageSectionPath, matchPath, sortPaths, groupPathsByPage, groupPathsBySection, } from './path.js';
|
|
5
|
+
export { formatLabel, slugify, camelCase, pascalCase, snakeCase, constantCase, kebabCase, pluralize, singularize, truncate, toIdentifier, } from './naming.js';
|
|
6
|
+
export { FIELD_TYPES, fieldTypeSchema, fieldPathSchema, fieldAttributesSchema, fieldSchema, isValidFieldType, isValidFieldPath, validateFieldAttributes, validateFieldSchema, isValidAttribute, extractAttributeName, parseOptions, parseCondition, } from './validation.js';
|
|
7
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAO,EACL,SAAS,EACT,SAAS,EACT,eAAe,EACf,kBAAkB,EAClB,gBAAgB,EAChB,cAAc,EACd,aAAa,EACb,kBAAkB,EAClB,SAAS,EACT,SAAS,EACT,gBAAgB,EAChB,mBAAmB,GACpB,MAAM,WAAW,CAAC;AAGnB,OAAO,EACL,WAAW,EACX,OAAO,EACP,SAAS,EACT,UAAU,EACV,SAAS,EACT,YAAY,EACZ,SAAS,EACT,SAAS,EACT,WAAW,EACX,QAAQ,EACR,YAAY,GACb,MAAM,aAAa,CAAC;AAGrB,OAAO,EACL,WAAW,EACX,eAAe,EACf,eAAe,EACf,qBAAqB,EACrB,WAAW,EACX,gBAAgB,EAChB,gBAAgB,EAChB,uBAAuB,EACvB,mBAAmB,EACnB,gBAAgB,EAChB,oBAAoB,EACpB,YAAY,EACZ,cAAc,GACf,MAAM,iBAAiB,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Utility exports for @reverso/core
|
|
3
|
+
*/
|
|
4
|
+
// Path utilities
|
|
5
|
+
export { parsePath, buildPath, getPageFromPath, getSectionFromPath, getFieldFromPath, isRepeaterPath, getParentPath, getPageSectionPath, matchPath, sortPaths, groupPathsByPage, groupPathsBySection, } from './path.js';
|
|
6
|
+
// Naming utilities
|
|
7
|
+
export { formatLabel, slugify, camelCase, pascalCase, snakeCase, constantCase, kebabCase, pluralize, singularize, truncate, toIdentifier, } from './naming.js';
|
|
8
|
+
// Validation utilities
|
|
9
|
+
export { FIELD_TYPES, fieldTypeSchema, fieldPathSchema, fieldAttributesSchema, fieldSchema, isValidFieldType, isValidFieldPath, validateFieldAttributes, validateFieldSchema, isValidAttribute, extractAttributeName, parseOptions, parseCondition, } from './validation.js';
|
|
10
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,iBAAiB;AACjB,OAAO,EACL,SAAS,EACT,SAAS,EACT,eAAe,EACf,kBAAkB,EAClB,gBAAgB,EAChB,cAAc,EACd,aAAa,EACb,kBAAkB,EAClB,SAAS,EACT,SAAS,EACT,gBAAgB,EAChB,mBAAmB,GACpB,MAAM,WAAW,CAAC;AAEnB,mBAAmB;AACnB,OAAO,EACL,WAAW,EACX,OAAO,EACP,SAAS,EACT,UAAU,EACV,SAAS,EACT,YAAY,EACZ,SAAS,EACT,SAAS,EACT,WAAW,EACX,QAAQ,EACR,YAAY,GACb,MAAM,aAAa,CAAC;AAErB,uBAAuB;AACvB,OAAO,EACL,WAAW,EACX,eAAe,EACf,eAAe,EACf,qBAAqB,EACrB,WAAW,EACX,gBAAgB,EAChB,gBAAgB,EAChB,uBAAuB,EACvB,mBAAmB,EACnB,gBAAgB,EAChB,oBAAoB,EACpB,YAAY,EACZ,cAAc,GACf,MAAM,iBAAiB,CAAC"}
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Naming utilities for converting between different naming conventions.
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* Convert a slug or identifier to a human-readable label.
|
|
6
|
+
*
|
|
7
|
+
* @example
|
|
8
|
+
* ```ts
|
|
9
|
+
* formatLabel('hero_title') // 'Hero Title'
|
|
10
|
+
* formatLabel('heroTitle') // 'Hero Title'
|
|
11
|
+
* formatLabel('hero-title') // 'Hero Title'
|
|
12
|
+
* formatLabel('HeroTitle') // 'Hero Title'
|
|
13
|
+
* ```
|
|
14
|
+
*/
|
|
15
|
+
export declare function formatLabel(input: string): string;
|
|
16
|
+
/**
|
|
17
|
+
* Convert a string to a URL-safe slug.
|
|
18
|
+
*
|
|
19
|
+
* @example
|
|
20
|
+
* ```ts
|
|
21
|
+
* slugify('Hero Title') // 'hero-title'
|
|
22
|
+
* slugify('Hello World!') // 'hello-world'
|
|
23
|
+
* slugify('café') // 'cafe'
|
|
24
|
+
* ```
|
|
25
|
+
*/
|
|
26
|
+
export declare function slugify(input: string): string;
|
|
27
|
+
/**
|
|
28
|
+
* Convert a string to camelCase.
|
|
29
|
+
*
|
|
30
|
+
* @example
|
|
31
|
+
* ```ts
|
|
32
|
+
* camelCase('hero-title') // 'heroTitle'
|
|
33
|
+
* camelCase('Hero Title') // 'heroTitle'
|
|
34
|
+
* camelCase('HERO_TITLE') // 'heroTitle'
|
|
35
|
+
* ```
|
|
36
|
+
*/
|
|
37
|
+
export declare function camelCase(input: string): string;
|
|
38
|
+
/**
|
|
39
|
+
* Convert a string to PascalCase.
|
|
40
|
+
*
|
|
41
|
+
* @example
|
|
42
|
+
* ```ts
|
|
43
|
+
* pascalCase('hero-title') // 'HeroTitle'
|
|
44
|
+
* pascalCase('hero title') // 'HeroTitle'
|
|
45
|
+
* pascalCase('heroTitle') // 'HeroTitle'
|
|
46
|
+
* ```
|
|
47
|
+
*/
|
|
48
|
+
export declare function pascalCase(input: string): string;
|
|
49
|
+
/**
|
|
50
|
+
* Convert a string to snake_case.
|
|
51
|
+
*
|
|
52
|
+
* @example
|
|
53
|
+
* ```ts
|
|
54
|
+
* snakeCase('heroTitle') // 'hero_title'
|
|
55
|
+
* snakeCase('Hero Title') // 'hero_title'
|
|
56
|
+
* snakeCase('hero-title') // 'hero_title'
|
|
57
|
+
* ```
|
|
58
|
+
*/
|
|
59
|
+
export declare function snakeCase(input: string): string;
|
|
60
|
+
/**
|
|
61
|
+
* Convert a string to CONSTANT_CASE.
|
|
62
|
+
*
|
|
63
|
+
* @example
|
|
64
|
+
* ```ts
|
|
65
|
+
* constantCase('heroTitle') // 'HERO_TITLE'
|
|
66
|
+
* constantCase('hero-title') // 'HERO_TITLE'
|
|
67
|
+
* ```
|
|
68
|
+
*/
|
|
69
|
+
export declare function constantCase(input: string): string;
|
|
70
|
+
/**
|
|
71
|
+
* Convert a string to kebab-case.
|
|
72
|
+
*
|
|
73
|
+
* @example
|
|
74
|
+
* ```ts
|
|
75
|
+
* kebabCase('heroTitle') // 'hero-title'
|
|
76
|
+
* kebabCase('Hero Title') // 'hero-title'
|
|
77
|
+
* ```
|
|
78
|
+
*/
|
|
79
|
+
export declare function kebabCase(input: string): string;
|
|
80
|
+
/**
|
|
81
|
+
* Pluralize a word (simple English rules).
|
|
82
|
+
*
|
|
83
|
+
* @example
|
|
84
|
+
* ```ts
|
|
85
|
+
* pluralize('item') // 'items'
|
|
86
|
+
* pluralize('category') // 'categories'
|
|
87
|
+
* pluralize('status') // 'statuses'
|
|
88
|
+
* ```
|
|
89
|
+
*/
|
|
90
|
+
export declare function pluralize(word: string): string;
|
|
91
|
+
/**
|
|
92
|
+
* Singularize a word (simple English rules).
|
|
93
|
+
*
|
|
94
|
+
* @example
|
|
95
|
+
* ```ts
|
|
96
|
+
* singularize('items') // 'item'
|
|
97
|
+
* singularize('categories') // 'category'
|
|
98
|
+
* ```
|
|
99
|
+
*/
|
|
100
|
+
export declare function singularize(word: string): string;
|
|
101
|
+
/**
|
|
102
|
+
* Truncate a string to a maximum length.
|
|
103
|
+
*
|
|
104
|
+
* @example
|
|
105
|
+
* ```ts
|
|
106
|
+
* truncate('Hello World', 8) // 'Hello...'
|
|
107
|
+
* truncate('Hello', 10) // 'Hello'
|
|
108
|
+
* ```
|
|
109
|
+
*/
|
|
110
|
+
export declare function truncate(input: string, maxLength: number, suffix?: string): string;
|
|
111
|
+
/**
|
|
112
|
+
* Generate a safe TypeScript identifier from a string.
|
|
113
|
+
*
|
|
114
|
+
* @example
|
|
115
|
+
* ```ts
|
|
116
|
+
* toIdentifier('hero-title') // 'heroTitle'
|
|
117
|
+
* toIdentifier('123start') // '_123start'
|
|
118
|
+
* toIdentifier('class') // '_class'
|
|
119
|
+
* ```
|
|
120
|
+
*/
|
|
121
|
+
export declare function toIdentifier(input: string): string;
|
|
122
|
+
//# sourceMappingURL=naming.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"naming.d.ts","sourceRoot":"","sources":["../../src/utils/naming.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH;;;;;;;;;;GAUG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAajD;AAED;;;;;;;;;GASG;AACH,wBAAgB,OAAO,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAe7C;AAED;;;;;;;;;GASG;AACH,wBAAgB,SAAS,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAE/C;AAED;;;;;;;;;GASG;AACH,wBAAgB,UAAU,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAGhD;AAED;;;;;;;;;GASG;AACH,wBAAgB,SAAS,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAa/C;AAED;;;;;;;;GAQG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAElD;AAED;;;;;;;;GAQG;AACH,wBAAgB,SAAS,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAE/C;AAED;;;;;;;;;GASG;AACH,wBAAgB,SAAS,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAyC9C;AAED;;;;;;;;GAQG;AACH,wBAAgB,WAAW,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CA4ChD;AAED;;;;;;;;GAQG;AACH,wBAAgB,QAAQ,CAAC,KAAK,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,SAAQ,GAAG,MAAM,CAKjF;AAED;;;;;;;;;GASG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CA+DlD"}
|
|
@@ -0,0 +1,302 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Naming utilities for converting between different naming conventions.
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* Convert a slug or identifier to a human-readable label.
|
|
6
|
+
*
|
|
7
|
+
* @example
|
|
8
|
+
* ```ts
|
|
9
|
+
* formatLabel('hero_title') // 'Hero Title'
|
|
10
|
+
* formatLabel('heroTitle') // 'Hero Title'
|
|
11
|
+
* formatLabel('hero-title') // 'Hero Title'
|
|
12
|
+
* formatLabel('HeroTitle') // 'Hero Title'
|
|
13
|
+
* ```
|
|
14
|
+
*/
|
|
15
|
+
export function formatLabel(input) {
|
|
16
|
+
return (input
|
|
17
|
+
// Insert space before uppercase letters in camelCase/PascalCase
|
|
18
|
+
.replace(/([a-z])([A-Z])/g, '$1 $2')
|
|
19
|
+
// Replace underscores and hyphens with spaces
|
|
20
|
+
.replace(/[_-]/g, ' ')
|
|
21
|
+
// Capitalize first letter of each word
|
|
22
|
+
.replace(/\b\w/g, (char) => char.toUpperCase())
|
|
23
|
+
// Clean up multiple spaces
|
|
24
|
+
.replace(/\s+/g, ' ')
|
|
25
|
+
.trim());
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Convert a string to a URL-safe slug.
|
|
29
|
+
*
|
|
30
|
+
* @example
|
|
31
|
+
* ```ts
|
|
32
|
+
* slugify('Hero Title') // 'hero-title'
|
|
33
|
+
* slugify('Hello World!') // 'hello-world'
|
|
34
|
+
* slugify('café') // 'cafe'
|
|
35
|
+
* ```
|
|
36
|
+
*/
|
|
37
|
+
export function slugify(input) {
|
|
38
|
+
return (input
|
|
39
|
+
.toLowerCase()
|
|
40
|
+
// Normalize unicode characters and remove diacritical marks
|
|
41
|
+
.normalize('NFD')
|
|
42
|
+
// biome-ignore lint/suspicious/noMisleadingCharacterClass: Valid pattern for combining diacritical marks
|
|
43
|
+
.replace(/[\u0300-\u036f]/g, '')
|
|
44
|
+
// Replace non-alphanumeric with hyphens
|
|
45
|
+
.replace(/[^a-z0-9]+/g, '-')
|
|
46
|
+
// Remove leading/trailing hyphens
|
|
47
|
+
.replace(/^-+|-+$/g, '')
|
|
48
|
+
// Remove duplicate hyphens
|
|
49
|
+
.replace(/-+/g, '-'));
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* Convert a string to camelCase.
|
|
53
|
+
*
|
|
54
|
+
* @example
|
|
55
|
+
* ```ts
|
|
56
|
+
* camelCase('hero-title') // 'heroTitle'
|
|
57
|
+
* camelCase('Hero Title') // 'heroTitle'
|
|
58
|
+
* camelCase('HERO_TITLE') // 'heroTitle'
|
|
59
|
+
* ```
|
|
60
|
+
*/
|
|
61
|
+
export function camelCase(input) {
|
|
62
|
+
return input.toLowerCase().replace(/[^a-z0-9]+(.)/g, (_, char) => char.toUpperCase());
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* Convert a string to PascalCase.
|
|
66
|
+
*
|
|
67
|
+
* @example
|
|
68
|
+
* ```ts
|
|
69
|
+
* pascalCase('hero-title') // 'HeroTitle'
|
|
70
|
+
* pascalCase('hero title') // 'HeroTitle'
|
|
71
|
+
* pascalCase('heroTitle') // 'HeroTitle'
|
|
72
|
+
* ```
|
|
73
|
+
*/
|
|
74
|
+
export function pascalCase(input) {
|
|
75
|
+
const camel = camelCase(input);
|
|
76
|
+
return camel.charAt(0).toUpperCase() + camel.slice(1);
|
|
77
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
* Convert a string to snake_case.
|
|
80
|
+
*
|
|
81
|
+
* @example
|
|
82
|
+
* ```ts
|
|
83
|
+
* snakeCase('heroTitle') // 'hero_title'
|
|
84
|
+
* snakeCase('Hero Title') // 'hero_title'
|
|
85
|
+
* snakeCase('hero-title') // 'hero_title'
|
|
86
|
+
* ```
|
|
87
|
+
*/
|
|
88
|
+
export function snakeCase(input) {
|
|
89
|
+
return (input
|
|
90
|
+
// Insert underscore before uppercase letters
|
|
91
|
+
.replace(/([a-z])([A-Z])/g, '$1_$2')
|
|
92
|
+
.toLowerCase()
|
|
93
|
+
// Replace non-alphanumeric with underscores
|
|
94
|
+
.replace(/[^a-z0-9]+/g, '_')
|
|
95
|
+
// Remove leading/trailing underscores
|
|
96
|
+
.replace(/^_+|_+$/g, '')
|
|
97
|
+
// Remove duplicate underscores
|
|
98
|
+
.replace(/_+/g, '_'));
|
|
99
|
+
}
|
|
100
|
+
/**
|
|
101
|
+
* Convert a string to CONSTANT_CASE.
|
|
102
|
+
*
|
|
103
|
+
* @example
|
|
104
|
+
* ```ts
|
|
105
|
+
* constantCase('heroTitle') // 'HERO_TITLE'
|
|
106
|
+
* constantCase('hero-title') // 'HERO_TITLE'
|
|
107
|
+
* ```
|
|
108
|
+
*/
|
|
109
|
+
export function constantCase(input) {
|
|
110
|
+
return snakeCase(input).toUpperCase();
|
|
111
|
+
}
|
|
112
|
+
/**
|
|
113
|
+
* Convert a string to kebab-case.
|
|
114
|
+
*
|
|
115
|
+
* @example
|
|
116
|
+
* ```ts
|
|
117
|
+
* kebabCase('heroTitle') // 'hero-title'
|
|
118
|
+
* kebabCase('Hero Title') // 'hero-title'
|
|
119
|
+
* ```
|
|
120
|
+
*/
|
|
121
|
+
export function kebabCase(input) {
|
|
122
|
+
return snakeCase(input).replace(/_/g, '-');
|
|
123
|
+
}
|
|
124
|
+
/**
|
|
125
|
+
* Pluralize a word (simple English rules).
|
|
126
|
+
*
|
|
127
|
+
* @example
|
|
128
|
+
* ```ts
|
|
129
|
+
* pluralize('item') // 'items'
|
|
130
|
+
* pluralize('category') // 'categories'
|
|
131
|
+
* pluralize('status') // 'statuses'
|
|
132
|
+
* ```
|
|
133
|
+
*/
|
|
134
|
+
export function pluralize(word) {
|
|
135
|
+
const lower = word.toLowerCase();
|
|
136
|
+
// Irregular plurals
|
|
137
|
+
const irregulars = {
|
|
138
|
+
child: 'children',
|
|
139
|
+
person: 'people',
|
|
140
|
+
man: 'men',
|
|
141
|
+
woman: 'women',
|
|
142
|
+
foot: 'feet',
|
|
143
|
+
tooth: 'teeth',
|
|
144
|
+
goose: 'geese',
|
|
145
|
+
mouse: 'mice',
|
|
146
|
+
};
|
|
147
|
+
if (irregulars[lower]) {
|
|
148
|
+
// Preserve original case
|
|
149
|
+
if (word[0] === word[0]?.toUpperCase()) {
|
|
150
|
+
const plural = irregulars[lower];
|
|
151
|
+
return (plural?.[0]?.toUpperCase() ?? '') + (plural?.slice(1) ?? '');
|
|
152
|
+
}
|
|
153
|
+
return irregulars[lower] ?? word;
|
|
154
|
+
}
|
|
155
|
+
// Words ending in -s, -x, -z, -ch, -sh
|
|
156
|
+
if (/(?:s|x|z|ch|sh)$/i.test(word)) {
|
|
157
|
+
return `${word}es`;
|
|
158
|
+
}
|
|
159
|
+
// Words ending in consonant + y
|
|
160
|
+
if (/[^aeiou]y$/i.test(word)) {
|
|
161
|
+
return `${word.slice(0, -1)}ies`;
|
|
162
|
+
}
|
|
163
|
+
// Words ending in -f or -fe
|
|
164
|
+
if (/(?:f|fe)$/i.test(word)) {
|
|
165
|
+
return word.replace(/(?:f|fe)$/i, 'ves');
|
|
166
|
+
}
|
|
167
|
+
// Default: add -s
|
|
168
|
+
return `${word}s`;
|
|
169
|
+
}
|
|
170
|
+
/**
|
|
171
|
+
* Singularize a word (simple English rules).
|
|
172
|
+
*
|
|
173
|
+
* @example
|
|
174
|
+
* ```ts
|
|
175
|
+
* singularize('items') // 'item'
|
|
176
|
+
* singularize('categories') // 'category'
|
|
177
|
+
* ```
|
|
178
|
+
*/
|
|
179
|
+
export function singularize(word) {
|
|
180
|
+
const lower = word.toLowerCase();
|
|
181
|
+
// Irregular singulars
|
|
182
|
+
const irregulars = {
|
|
183
|
+
children: 'child',
|
|
184
|
+
people: 'person',
|
|
185
|
+
men: 'man',
|
|
186
|
+
women: 'woman',
|
|
187
|
+
feet: 'foot',
|
|
188
|
+
teeth: 'tooth',
|
|
189
|
+
geese: 'goose',
|
|
190
|
+
mice: 'mouse',
|
|
191
|
+
};
|
|
192
|
+
if (irregulars[lower]) {
|
|
193
|
+
if (word[0] === word[0]?.toUpperCase()) {
|
|
194
|
+
const singular = irregulars[lower];
|
|
195
|
+
return (singular?.[0]?.toUpperCase() ?? '') + (singular?.slice(1) ?? '');
|
|
196
|
+
}
|
|
197
|
+
return irregulars[lower] ?? word;
|
|
198
|
+
}
|
|
199
|
+
// Words ending in -ies
|
|
200
|
+
if (/ies$/i.test(word)) {
|
|
201
|
+
return `${word.slice(0, -3)}y`;
|
|
202
|
+
}
|
|
203
|
+
// Words ending in -ves
|
|
204
|
+
if (/ves$/i.test(word)) {
|
|
205
|
+
return `${word.slice(0, -3)}f`;
|
|
206
|
+
}
|
|
207
|
+
// Words ending in -es (for -s, -x, -z, -ch, -sh)
|
|
208
|
+
if (/(?:s|x|z|ch|sh)es$/i.test(word)) {
|
|
209
|
+
return word.slice(0, -2);
|
|
210
|
+
}
|
|
211
|
+
// Words ending in -s
|
|
212
|
+
if (/s$/i.test(word) && !/ss$/i.test(word)) {
|
|
213
|
+
return word.slice(0, -1);
|
|
214
|
+
}
|
|
215
|
+
return word;
|
|
216
|
+
}
|
|
217
|
+
/**
|
|
218
|
+
* Truncate a string to a maximum length.
|
|
219
|
+
*
|
|
220
|
+
* @example
|
|
221
|
+
* ```ts
|
|
222
|
+
* truncate('Hello World', 8) // 'Hello...'
|
|
223
|
+
* truncate('Hello', 10) // 'Hello'
|
|
224
|
+
* ```
|
|
225
|
+
*/
|
|
226
|
+
export function truncate(input, maxLength, suffix = '...') {
|
|
227
|
+
if (input.length <= maxLength) {
|
|
228
|
+
return input;
|
|
229
|
+
}
|
|
230
|
+
return input.slice(0, maxLength - suffix.length) + suffix;
|
|
231
|
+
}
|
|
232
|
+
/**
|
|
233
|
+
* Generate a safe TypeScript identifier from a string.
|
|
234
|
+
*
|
|
235
|
+
* @example
|
|
236
|
+
* ```ts
|
|
237
|
+
* toIdentifier('hero-title') // 'heroTitle'
|
|
238
|
+
* toIdentifier('123start') // '_123start'
|
|
239
|
+
* toIdentifier('class') // '_class'
|
|
240
|
+
* ```
|
|
241
|
+
*/
|
|
242
|
+
export function toIdentifier(input) {
|
|
243
|
+
// Reserved words that cannot be used as identifiers
|
|
244
|
+
const reserved = new Set([
|
|
245
|
+
'break',
|
|
246
|
+
'case',
|
|
247
|
+
'catch',
|
|
248
|
+
'class',
|
|
249
|
+
'const',
|
|
250
|
+
'continue',
|
|
251
|
+
'debugger',
|
|
252
|
+
'default',
|
|
253
|
+
'delete',
|
|
254
|
+
'do',
|
|
255
|
+
'else',
|
|
256
|
+
'enum',
|
|
257
|
+
'export',
|
|
258
|
+
'extends',
|
|
259
|
+
'false',
|
|
260
|
+
'finally',
|
|
261
|
+
'for',
|
|
262
|
+
'function',
|
|
263
|
+
'if',
|
|
264
|
+
'import',
|
|
265
|
+
'in',
|
|
266
|
+
'instanceof',
|
|
267
|
+
'new',
|
|
268
|
+
'null',
|
|
269
|
+
'return',
|
|
270
|
+
'super',
|
|
271
|
+
'switch',
|
|
272
|
+
'this',
|
|
273
|
+
'throw',
|
|
274
|
+
'true',
|
|
275
|
+
'try',
|
|
276
|
+
'typeof',
|
|
277
|
+
'var',
|
|
278
|
+
'void',
|
|
279
|
+
'while',
|
|
280
|
+
'with',
|
|
281
|
+
'yield',
|
|
282
|
+
'let',
|
|
283
|
+
'static',
|
|
284
|
+
'implements',
|
|
285
|
+
'interface',
|
|
286
|
+
'package',
|
|
287
|
+
'private',
|
|
288
|
+
'protected',
|
|
289
|
+
'public',
|
|
290
|
+
]);
|
|
291
|
+
let identifier = camelCase(input);
|
|
292
|
+
// Prefix with underscore if starts with number
|
|
293
|
+
if (/^\d/.test(identifier)) {
|
|
294
|
+
identifier = `_${identifier}`;
|
|
295
|
+
}
|
|
296
|
+
// Prefix with underscore if reserved word
|
|
297
|
+
if (reserved.has(identifier)) {
|
|
298
|
+
identifier = `_${identifier}`;
|
|
299
|
+
}
|
|
300
|
+
return identifier;
|
|
301
|
+
}
|
|
302
|
+
//# sourceMappingURL=naming.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"naming.js","sourceRoot":"","sources":["../../src/utils/naming.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH;;;;;;;;;;GAUG;AACH,MAAM,UAAU,WAAW,CAAC,KAAa;IACvC,OAAO,CACL,KAAK;QACH,gEAAgE;SAC/D,OAAO,CAAC,iBAAiB,EAAE,OAAO,CAAC;QACpC,8CAA8C;SAC7C,OAAO,CAAC,OAAO,EAAE,GAAG,CAAC;QACtB,uCAAuC;SACtC,OAAO,CAAC,OAAO,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,WAAW,EAAE,CAAC;QAC/C,2BAA2B;SAC1B,OAAO,CAAC,MAAM,EAAE,GAAG,CAAC;SACpB,IAAI,EAAE,CACV,CAAC;AACJ,CAAC;AAED;;;;;;;;;GASG;AACH,MAAM,UAAU,OAAO,CAAC,KAAa;I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