{"version":3,"file":"dom.es.mjs","names":[],"sources":["../src/dom/getDynamicClasses.ts"],"sourcesContent":["/**\n * Reads the host's dynamic rich-text CSS classes from the rendered article DOM.\n *\n * Staffbase applies tenant/theme-specific classes to the article body; mirroring\n * them on the widget's own rich-text container keeps typography consistent with\n * the host. Falls back to the stable default classes when the element is absent\n * or when there is no DOM (SSR/tests), so callers always get a usable string.\n * @param {string} [query] - CSS selector locating the source element.\n * @param {string} [defaultClasses] - Classes returned when the element is not found.\n * @returns {string} The host's dynamic rich-text classes, or the defaults.\n */\nexport const getDynamicClasses = (\n  query = '.fullscreen-preview-wrapper section',\n  defaultClasses = 'rich-text news-detail-post-content',\n): string => {\n  if (typeof document === 'undefined') return defaultClasses\n\n  const sectionElement = document.querySelector(query)\n  return sectionElement?.className || defaultClasses\n}\n"],"mappings":";AAWA,IAAa,KACX,IAAQ,uCACR,IAAiB,yCAEb,OAAO,WAAa,MAAoB,IAErB,SAAS,cAAc,CACvC,GAAgB,aAAa"}