{"version":3,"file":"warnSemanticTag.cjs","sources":["../../../../src/components/utils/warnSemanticTag.ts"],"sourcesContent":["// Dev-only guard: warn when a `tag` override replaces a component's semantic\n// element with a non-semantic one (e.g. <List tag=\"div\">, <Blockquote tag=\"div\">,\n// <Label tag=\"div\">). Such overrides silently produce invalid / meaningless\n// markup — a <li> outside a <ul>/<ol>, a quote with no <blockquote>, a label\n// with no <label> association. Only fires for string tags outside the allowed\n// semantic set; component tags (e.g. a router Link) are left alone.\nexport function warnSemanticTagOverride(\n  componentName: string,\n  tag: unknown,\n  allowed: readonly string[],\n): void {\n  if (process.env.NODE_ENV === 'production') return;\n  if (typeof tag !== 'string' || allowed.includes(tag)) return;\n  console.warn(\n    `VaneUI: <${componentName} tag=\"${tag}\"> drops the component's semantic element ` +\n    `(expected ${allowed.map((t) => `<${t}>`).join(' / ')}). The rendered markup loses its ` +\n    `${componentName} semantics — keep the default tag or use a semantic equivalent.`\n  );\n}\n"],"names":[],"mappings":";;AAMO,SAAS,uBAAA,CACd,aAAA,EACA,GAAA,EACA,OAAA,EACM;AACN,EAAA,IAAI,OAAA,CAAQ,GAAA,CAAI,QAAA,KAAa,YAAA,EAAc;AAC3C,EAAA,IAAI,OAAO,GAAA,KAAQ,QAAA,IAAY,OAAA,CAAQ,QAAA,CAAS,GAAG,CAAA,EAAG;AACtD,EAAA,OAAA,CAAQ,IAAA;AAAA,IACN,YAAY,aAAa,CAAA,MAAA,EAAS,GAAG,CAAA,oDAAA,EACxB,QAAQ,GAAA,CAAI,CAAC,CAAA,KAAM,CAAA,CAAA,EAAI,CAAC,CAAA,CAAA,CAAG,CAAA,CAAE,KAAK,KAAK,CAAC,oCAClD,aAAa,CAAA,oEAAA;AAAA,GAClB;AACF;;;;"}