@contentful/experience-design-system-cli 2.11.4-dev-build-8cd3b18.0 → 2.11.4-dev-build-355c69b.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/dist/package.json
CHANGED
|
@@ -132,12 +132,23 @@ async function extractFromSvelteFile(filePath, source) {
|
|
|
132
132
|
// ---------------------------------------------------------------------------
|
|
133
133
|
// Component name
|
|
134
134
|
// ---------------------------------------------------------------------------
|
|
135
|
+
// Folder names that are pure scaffolding (anatomy / parts conventions popularized
|
|
136
|
+
// by Ark UI, Zag, Skeleton). When a component file sits directly inside one of
|
|
137
|
+
// these, the meaningful namespace is the grandparent directory.
|
|
138
|
+
const ANATOMY_FOLDERS = new Set(['anatomy', 'parts']);
|
|
135
139
|
function getSvelteComponentName(filePath) {
|
|
136
140
|
const file = basename(filePath, '.svelte');
|
|
141
|
+
const parentDir = basename(dirname(filePath));
|
|
137
142
|
// index.svelte → use parent directory name (mirrors index.vue behavior).
|
|
138
|
-
if (file === 'index')
|
|
139
|
-
|
|
140
|
-
|
|
143
|
+
if (file === 'index')
|
|
144
|
+
return toPascalCase(parentDir);
|
|
145
|
+
// accordion/anatomy/root.svelte → AccordionRoot (avoids massive collisions
|
|
146
|
+
// when a single library has dozens of components named Root/Item/Trigger).
|
|
147
|
+
if (ANATOMY_FOLDERS.has(parentDir)) {
|
|
148
|
+
const grandparent = basename(dirname(dirname(filePath)));
|
|
149
|
+
if (grandparent && grandparent !== '.' && grandparent !== '/') {
|
|
150
|
+
return `${toPascalCase(grandparent)}${toPascalCase(file)}`;
|
|
151
|
+
}
|
|
141
152
|
}
|
|
142
153
|
return toPascalCase(file);
|
|
143
154
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@contentful/experience-design-system-cli",
|
|
3
|
-
"version": "2.11.4-dev-build-
|
|
3
|
+
"version": "2.11.4-dev-build-355c69b.0",
|
|
4
4
|
"description": "Contentful Experiences design system import CLI",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"svelte": "^5.56.4",
|
|
38
38
|
"ts-morph": "^27.0.2",
|
|
39
39
|
"typescript": "^5.9.3",
|
|
40
|
-
"@contentful/experience-design-system-types": "2.11.4-dev-build-
|
|
40
|
+
"@contentful/experience-design-system-types": "2.11.4-dev-build-355c69b.0"
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|
|
43
43
|
"@tsconfig/node24": "^24.0.3",
|