{"version":3,"file":"ngwr-icon-adapters-feather.mjs","sources":["../../../projects/lib/icon/adapters/feather/adapter.ts","../../../projects/lib/icon/adapters/feather/public-api.ts","../../../projects/lib/icon/adapters/feather/ngwr-icon-adapters-feather.ts"],"sourcesContent":["/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\nimport type { WrIconDef } from 'ngwr/icon';\n\n/**\n * Default SVG attributes Feather applies to every icon. Kept identical\n * to what `feather.replace()` emits in the browser so visual parity\n * with upstream is preserved.\n */\nconst SVG_ATTRS = [\n  'xmlns=\"http://www.w3.org/2000/svg\"',\n  'width=\"24\"',\n  'height=\"24\"',\n  'viewBox=\"0 0 24 24\"',\n  'fill=\"none\"',\n  'stroke=\"currentColor\"',\n  'stroke-width=\"2\"',\n  'stroke-linecap=\"round\"',\n  'stroke-linejoin=\"round\"',\n  'class=\"wr-icon__svg feather\"',\n].join(' ');\n\n/**\n * Wrap a single Feather icon (inner SVG markup) in a {@link WrIconDef}\n * envelope. Pair with the upstream `icons.json` map.\n *\n * @example\n * ```ts\n * import { feather } from 'ngwr/icon/adapters/feather';\n * // feather-icons ships an inner-SVG-only map under dist/icons.json:\n * //   { \"plus\": \"<line .../><line .../>\", \"trash\": \"...\", ... }\n * import featherIcons from 'feather-icons/dist/icons.json';\n *\n * provideWrIcons([feather('plus', featherIcons.plus)]);\n * ```\n */\nfunction feather(name: string, innerSvg: string): WrIconDef {\n  return { name, data: `<svg ${SVG_ATTRS}>${innerSvg}</svg>` };\n}\n\n/**\n * Bulk variant — pass a `{ alias: innerSvg }` object. Aliases (the\n * keys) become the registry names so you can use shorter or\n * project-specific names.\n *\n * @example\n * ```ts\n * import { featherIcons } from 'ngwr/icon/adapters/feather';\n * import featherSource from 'feather-icons/dist/icons.json';\n *\n * provideWrIcons(featherIcons({\n *   plus: featherSource.plus,\n *   trash: featherSource.trash,\n *   x: featherSource.x,\n * }));\n * ```\n */\nfunction featherIcons(icons: Record<string, string>): WrIconDef[] {\n  return Object.entries(icons).map(([name, innerSvg]) => feather(name, innerSvg));\n}\n\nexport { feather, featherIcons };\n","/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\nexport { feather, featherIcons } from './adapter';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":"AAAA;;;;;AAKG;AAIH;;;;AAIG;AACH,MAAM,SAAS,GAAG;IAChB,oCAAoC;IACpC,YAAY;IACZ,aAAa;IACb,qBAAqB;IACrB,aAAa;IACb,uBAAuB;IACvB,kBAAkB;IAClB,wBAAwB;IACxB,yBAAyB;IACzB,8BAA8B;AAC/B,CAAA,CAAC,IAAI,CAAC,GAAG,CAAC;AAEX;;;;;;;;;;;;;AAaG;AACH,SAAS,OAAO,CAAC,IAAY,EAAE,QAAgB,EAAA;IAC7C,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,CAAA,KAAA,EAAQ,SAAS,CAAA,CAAA,EAAI,QAAQ,CAAA,MAAA,CAAQ,EAAE;AAC9D;AAEA;;;;;;;;;;;;;;;;AAgBG;AACH,SAAS,YAAY,CAAC,KAA6B,EAAA;IACjD,OAAO,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,EAAE,QAAQ,CAAC,KAAK,OAAO,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;AACjF;;AChEA;;;;;AAKG;;ACLH;;AAEG;;;;"}