@ai-matrx/content-ir 0.22.6 → 0.23.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/surfaces.js CHANGED
@@ -1,3 +1,5 @@
1
+ import { humanizeIdentifier } from '@ai-matrx/kit/text-case';
2
+
1
3
  // source/fence-nesting.ts
2
4
  var NESTING_FENCE_LANGUAGES = /* @__PURE__ */ new Set([
3
5
  "markdown",
@@ -1877,42 +1879,6 @@ function deriveInstanceTitle(data, explicit, titleKey) {
1877
1879
  }
1878
1880
  return null;
1879
1881
  }
1880
- var IDENTIFIER_ACRONYMS = [
1881
- "ID",
1882
- "URL",
1883
- "PDF",
1884
- "HTML",
1885
- "JSON",
1886
- "API",
1887
- "AI",
1888
- "UI",
1889
- "CSV",
1890
- "SMS",
1891
- "SEO",
1892
- "LLM",
1893
- "MCP",
1894
- "UUID",
1895
- "ISO"
1896
- ];
1897
- var IDENTIFIER_ACRONYM_SET = new Set(IDENTIFIER_ACRONYMS.map((a) => a.toLowerCase()));
1898
- function humanizeIdentifier(identifier) {
1899
- const text = (identifier ?? "").trim();
1900
- if (text === "") return "";
1901
- if (!text.includes("_") && /\s/.test(text)) {
1902
- return /^\p{Ll}/u.test(text) ? text.charAt(0).toUpperCase() + text.slice(1) : text;
1903
- }
1904
- return text.replace(/([a-z\d])([A-Z])/g, "$1 $2").replace(/([A-Z]+)(?![A-Z]s(?![a-z]))([A-Z][a-z])/g, "$1 $2").split(/[_\-.\s]+/).filter((part) => part.length > 0).map(identifierWord).join(" ");
1905
- }
1906
- function identifierWord(part) {
1907
- const lower = part.toLowerCase();
1908
- if (IDENTIFIER_ACRONYM_SET.has(lower)) return part.toUpperCase();
1909
- if (lower.length > 1 && lower.endsWith("s") && IDENTIFIER_ACRONYM_SET.has(lower.slice(0, -1))) {
1910
- return `${lower.slice(0, -1).toUpperCase()}s`;
1911
- }
1912
- return part.charAt(0).toUpperCase() + part.slice(1).toLowerCase();
1913
- }
1914
-
1915
- // surfaces/kind-markdown-utils.ts
1916
1882
  function isRecordValue(value) {
1917
1883
  return typeof value === "object" && value !== null && !Array.isArray(value);
1918
1884
  }
@@ -2540,8 +2506,6 @@ function kindTextPreview(raw) {
2540
2506
  const slug = firstKindSlug(md.slice(keyIndex));
2541
2507
  return { text: head.trimEnd(), pendingKind: slug, pendingUnnamed: slug === null };
2542
2508
  }
2543
-
2544
- // surfaces/kind-one-line.ts
2545
2509
  var UNNAMED = "Structured output";
2546
2510
  function kindName(slug) {
2547
2511
  return slug && humanizeIdentifier(slug) || UNNAMED;