@ai-matrx/content-ir 0.19.26 → 0.19.27

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/index.js CHANGED
@@ -2407,7 +2407,12 @@ var IDENTIFIER_ACRONYMS = [
2407
2407
  "UUID",
2408
2408
  "ISO"
2409
2409
  ];
2410
- new Set(IDENTIFIER_ACRONYMS.map((a) => a.toLowerCase()));
2410
+ var IDENTIFIER_ACRONYM_SET = new Set(IDENTIFIER_ACRONYMS.map((a) => a.toLowerCase()));
2411
+ function humanizeIdentifier(identifier) {
2412
+ return identifier.replace(/([a-z\d])([A-Z])/g, "$1 $2").replace(/([A-Z]+)([A-Z][a-z])/g, "$1 $2").split(/[_\-.\s]+/).filter((part) => part.length > 0).map(
2413
+ (part) => IDENTIFIER_ACRONYM_SET.has(part.toLowerCase()) ? part.toUpperCase() : part.charAt(0).toUpperCase() + part.slice(1).toLowerCase()
2414
+ ).join(" ");
2415
+ }
2411
2416
 
2412
2417
  // core/schema-structure.ts
2413
2418
  function formatBlockLabel(key) {
@@ -5073,8 +5078,7 @@ function tryDecodeDirectiveContent(content, onError) {
5073
5078
 
5074
5079
  // directives/display.ts
5075
5080
  function titleCaseToken(token) {
5076
- const words = token.replace(/_/g, " ").trim();
5077
- return words ? words.charAt(0).toUpperCase() + words.slice(1) : token;
5081
+ return humanizeIdentifier(token) || token;
5078
5082
  }
5079
5083
  var ACTION_BY_CLASS = {
5080
5084
  reference: "Reference",