@ai-matrx/content-ir 0.19.25 → 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
@@ -2122,7 +2122,7 @@ function stripKindDeep(value) {
2122
2122
  return value;
2123
2123
  }
2124
2124
 
2125
- // utils/text-case-converter.ts
2125
+ // text-case.ts
2126
2126
  var DEFAULT_WORD_REPLACEMENTS = {
2127
2127
  // Acronyms & initialisms
2128
2128
  "api": "API",
@@ -2390,6 +2390,29 @@ function formatText(text, options = {}) {
2390
2390
  }
2391
2391
  return result;
2392
2392
  }
2393
+ var IDENTIFIER_ACRONYMS = [
2394
+ "ID",
2395
+ "URL",
2396
+ "PDF",
2397
+ "HTML",
2398
+ "JSON",
2399
+ "API",
2400
+ "AI",
2401
+ "UI",
2402
+ "CSV",
2403
+ "SMS",
2404
+ "SEO",
2405
+ "LLM",
2406
+ "MCP",
2407
+ "UUID",
2408
+ "ISO"
2409
+ ];
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
+ }
2393
2416
 
2394
2417
  // core/schema-structure.ts
2395
2418
  function formatBlockLabel(key) {
@@ -5055,8 +5078,7 @@ function tryDecodeDirectiveContent(content, onError) {
5055
5078
 
5056
5079
  // directives/display.ts
5057
5080
  function titleCaseToken(token) {
5058
- const words = token.replace(/_/g, " ").trim();
5059
- return words ? words.charAt(0).toUpperCase() + words.slice(1) : token;
5081
+ return humanizeIdentifier(token) || token;
5060
5082
  }
5061
5083
  var ACTION_BY_CLASS = {
5062
5084
  reference: "Reference",