@pure-ds/core 0.4.15 → 0.4.17

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.
@@ -1,9 +1,9 @@
1
- declare var PDS2: {
1
+ declare var f: {
2
2
  addEventListener(type: string, callback: EventListenerOrEventListenerObject | null, options?: AddEventListenerOptions | boolean): void;
3
3
  dispatchEvent(event: Event): boolean;
4
4
  removeEventListener(type: string, callback: EventListenerOrEventListenerObject | null, options?: EventListenerOptions | boolean): void;
5
5
  };
6
- export function validateDesign(designConfig?: {}, options?: {}): {
6
+ declare function Et(n?: {}, e?: {}): {
7
7
  ok: boolean;
8
8
  issues: ({
9
9
  path: string;
@@ -19,5 +19,5 @@ export function validateDesign(designConfig?: {}, options?: {}): {
19
19
  context?: undefined;
20
20
  })[];
21
21
  };
22
- export { PDS2 as PDS };
22
+ export { f as PDS, Et as validateDesign };
23
23
  //# sourceMappingURL=pds.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"pds.d.ts","sourceRoot":"","sources":["../../../../../public/assets/js/pds.js"],"names":[],"mappings":"AAi7RA;;;;EAAyB;AAyKzB;;;;;;;;;;;;;;;EA+GC"}
1
+ {"version":3,"file":"pds.d.ts","sourceRoot":"","sources":["../../../../../public/assets/js/pds.js"],"names":[],"mappings":"AA8oG6nS;;;;EAAQ;AAAsnF;;;;;;;;;;;;;;;EAA8sE"}
@@ -1 +1 @@
1
- {"version":3,"file":"pds-generator.d.ts","sourceRoot":"","sources":["../../../../../src/js/pds-core/pds-generator.js"],"names":[],"mappings":"AAs2JA;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,4CAjBW,UAAU,qBACV,aAAa,EAAE,GACb,OAAO,CAAC,IAAI,CAAC,CAqCzB;AAED;;;;;;;;GAQG;AACH,wCALW,UAAU,WACV,MAAM,EAAE,qBACR,aAAa,EAAE,GACb,OAAO,CAAC,IAAI,CAAC,CAmDzB;AAED;;;;;;GAMG;AACH,sCAHW,MAAM,GACJ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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAEC;IAGD,oBAEC;IAiwBD,qBAEC;IACD,yBAEC;IACD,yBAEC;IACD,wBAEC;IACD,yBAMC;IAED;;;;;;OAMG;IACH,oBA6JC;IAGD,4BAEC;IACD,gCAEC;IACD,gCAEC;IACD,+BAEC;IAmBD;;;OAGG;IACH;;;;;;MAoBC;;CA2GF"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@pure-ds/core",
3
3
  "shortname": "pds",
4
- "version": "0.4.15",
4
+ "version": "0.4.17",
5
5
  "description": "Pure Design System - Why develop a Design System when you can generate one?",
6
6
  "repository": {
7
7
  "type": "git",
@@ -312,32 +312,30 @@ async function extractCSSClasses(ontology) {
312
312
  }
313
313
  }
314
314
 
315
- // Utilities
316
- if (ontology.utilities) {
317
- for (const utility of ontology.utilities) {
318
- if (utility.startsWith('.')) {
319
- const className = utility.slice(1);
320
-
321
- // Handle wildcard utilities
322
- if (className.includes('*')) {
323
- const baseClass = className.replace('*', '');
324
- const variants = generateUtilityVariants(baseClass);
325
- for (const variant of variants) {
326
- classes.push({
327
- name: variant.name,
328
- description: variant.description,
329
- category: 'Utilities'
330
- });
315
+ // Utilities - handle nested object structure
316
+ if (ontology.utilities && typeof ontology.utilities === 'object') {
317
+ // Recursively extract all selectors from nested utility categories
318
+ const extractSelectors = (obj, category = 'Utilities') => {
319
+ for (const [key, value] of Object.entries(obj)) {
320
+ if (Array.isArray(value)) {
321
+ // It's an array of selectors
322
+ for (const selector of value) {
323
+ if (typeof selector === 'string' && selector.startsWith('.')) {
324
+ const className = selector.slice(1);
325
+ classes.push({
326
+ name: className,
327
+ description: `${key} utility class`,
328
+ category
329
+ });
330
+ }
331
331
  }
332
- } else {
333
- classes.push({
334
- name: className,
335
- description: `${className} utility class`,
336
- category: 'Utilities'
337
- });
332
+ } else if (typeof value === 'object' && value !== null) {
333
+ // It's a nested object, recurse
334
+ extractSelectors(value, key);
338
335
  }
339
336
  }
340
- }
337
+ };
338
+ extractSelectors(ontology.utilities);
341
339
  }
342
340
 
343
341
  return classes;