createCompactLangNode = ({ lang, totalSize, hideProgress, index }) => {
  const percentage = ((lang.size / totalSize) * 100).toFixed(2);
  const staggerDelay = (index + 3) * 150;
  const color = lang.color || "#858585";

  return `
    <g class="stagger" style="animation-delay: ${staggerDelay}ms">
      <circle cx="5" cy="6" r="5" fill="${color}" />
      <text data-testid="lang-name" x="15" y="10" class='lang-name'>
        ${lang.name} ${hideProgress ? "" : percentage + "%"}
      </text>
    </g>
  `;
}
Creates compact text item for a programming language.

@param {object} props Function properties.
@param {Lang} props.lang Programming language object.
@param {number} props.totalSize Total size of all languages.
@param {boolean=} props.hideProgress Whether to hide percentage.
@param {number} props.index Index of the programming language.
@returns {string} Compact layout programming language SVG node.