@getvitops/utils 8.2.0-alpha.0 → 8.3.0-alpha.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.
Files changed (115) hide show
  1. package/CHANGELOG.md +399 -23
  2. package/dist/{adc-D6aw2qgq.mjs → adc-BiW9BzqA.mjs} +2 -3
  3. package/dist/{adc-D6aw2qgq.mjs.map → adc-BiW9BzqA.mjs.map} +1 -1
  4. package/dist/{adc-BoEoogyo.d.mts → adc-DvX3-P7a.d.mts} +2 -4
  5. package/dist/adc-DvX3-P7a.d.mts.map +1 -0
  6. package/dist/ads/index.d.mts +37 -57
  7. package/dist/ads/index.d.mts.map +1 -1
  8. package/dist/ads/index.mjs +21 -10
  9. package/dist/ads/index.mjs.map +1 -1
  10. package/dist/audit/index.d.mts +180 -0
  11. package/dist/audit/index.d.mts.map +1 -0
  12. package/dist/audit/index.mjs +509 -0
  13. package/dist/audit/index.mjs.map +1 -0
  14. package/dist/color/index.d.mts +7 -5
  15. package/dist/color/index.d.mts.map +1 -1
  16. package/dist/color/index.mjs +10 -5
  17. package/dist/color/index.mjs.map +1 -1
  18. package/dist/content.d.mts +78 -0
  19. package/dist/content.d.mts.map +1 -0
  20. package/dist/content.mjs +45 -0
  21. package/dist/content.mjs.map +1 -0
  22. package/dist/crm/index.d.mts +5 -87
  23. package/dist/crm/index.d.mts.map +1 -1
  24. package/dist/crm/index.mjs +10 -19
  25. package/dist/crm/index.mjs.map +1 -1
  26. package/dist/email/index.d.mts +1 -11
  27. package/dist/email/index.d.mts.map +1 -1
  28. package/dist/email/index.mjs +6 -10
  29. package/dist/email/index.mjs.map +1 -1
  30. package/dist/favicon.d.mts +0 -2
  31. package/dist/favicon.d.mts.map +1 -1
  32. package/dist/favicon.mjs +1 -2
  33. package/dist/git/index.d.mts +0 -2
  34. package/dist/git/index.d.mts.map +1 -1
  35. package/dist/git/index.mjs +1 -2
  36. package/dist/hosting/index.d.mts +0 -8
  37. package/dist/hosting/index.d.mts.map +1 -1
  38. package/dist/hosting/index.mjs +4 -7
  39. package/dist/hosting/index.mjs.map +1 -1
  40. package/dist/{identity-BoRddTx3.mjs → identity-C4yInICW.mjs} +2 -3
  41. package/dist/{identity-BoRddTx3.mjs.map → identity-C4yInICW.mjs.map} +1 -1
  42. package/dist/index.d.mts +2 -88
  43. package/dist/index.d.mts.map +1 -1
  44. package/dist/index.mjs +36 -52
  45. package/dist/index.mjs.map +1 -1
  46. package/dist/indexing/index.d.mts +3 -42
  47. package/dist/indexing/index.d.mts.map +1 -1
  48. package/dist/indexing/index.mjs +8 -13
  49. package/dist/indexing/index.mjs.map +1 -1
  50. package/dist/{json-store-30CFCbZZ.mjs → json-store-VJKEaoVX.mjs} +2 -3
  51. package/dist/{json-store-30CFCbZZ.mjs.map → json-store-VJKEaoVX.mjs.map} +1 -1
  52. package/dist/media/index.d.mts +0 -12
  53. package/dist/media/index.d.mts.map +1 -1
  54. package/dist/media/index.mjs +7 -13
  55. package/dist/media/index.mjs.map +1 -1
  56. package/dist/notify/index.d.mts +64 -44
  57. package/dist/notify/index.d.mts.map +1 -1
  58. package/dist/notify/index.mjs +138 -11
  59. package/dist/notify/index.mjs.map +1 -1
  60. package/dist/onboarding/index.d.mts +26 -6
  61. package/dist/onboarding/index.d.mts.map +1 -1
  62. package/dist/onboarding/index.mjs +92 -5
  63. package/dist/onboarding/index.mjs.map +1 -1
  64. package/dist/{plan-BLKikoOG.mjs → plan-B9USuc17.mjs} +3 -4
  65. package/dist/{plan-BLKikoOG.mjs.map → plan-B9USuc17.mjs.map} +1 -1
  66. package/dist/{plan-Hq8Pb0Uw.d.mts → plan-CH3Wt5ZV.d.mts} +8 -30
  67. package/dist/plan-CH3Wt5ZV.d.mts.map +1 -0
  68. package/dist/plan-CddqsmJJ.d.mts +82 -0
  69. package/dist/plan-CddqsmJJ.d.mts.map +1 -0
  70. package/dist/plan-DpHv6NO8.mjs +93 -0
  71. package/dist/plan-DpHv6NO8.mjs.map +1 -0
  72. package/dist/{plan-format-A18SvJ7C.mjs → plan-format-CIz6Feg2.mjs} +2 -3
  73. package/dist/{plan-format-A18SvJ7C.mjs.map → plan-format-CIz6Feg2.mjs.map} +1 -1
  74. package/dist/{platform-0nlOIy8h.mjs → platform-Cb_RtsF1.mjs} +3 -5
  75. package/dist/{platform-0nlOIy8h.mjs.map → platform-Cb_RtsF1.mjs.map} +1 -1
  76. package/dist/reviews/index.d.mts +4 -120
  77. package/dist/reviews/index.d.mts.map +1 -1
  78. package/dist/reviews/index.mjs +6 -99
  79. package/dist/reviews/index.mjs.map +1 -1
  80. package/dist/reviews/select.d.mts +2 -0
  81. package/dist/reviews/select.mjs +3 -0
  82. package/dist/schema/index.d.mts +0 -12
  83. package/dist/schema/index.d.mts.map +1 -1
  84. package/dist/schema/index.mjs +6 -12
  85. package/dist/schema/index.mjs.map +1 -1
  86. package/dist/security/index.d.mts +0 -2
  87. package/dist/security/index.d.mts.map +1 -1
  88. package/dist/security/index.mjs +1 -2
  89. package/dist/{token-DmmoQ7um.d.mts → token-CHR1O4w5.d.mts} +3 -3
  90. package/dist/token-CHR1O4w5.d.mts.map +1 -0
  91. package/dist/{token-DkKC5m23.mjs → token-CJSl9eIS.mjs} +33 -14
  92. package/dist/token-CJSl9eIS.mjs.map +1 -0
  93. package/dist/tracking/index.d.mts +1 -9
  94. package/dist/tracking/index.d.mts.map +1 -1
  95. package/dist/tracking/index.mjs +3 -4
  96. package/dist/turnstile/index.d.mts +105 -0
  97. package/dist/turnstile/index.d.mts.map +1 -0
  98. package/dist/turnstile/index.mjs +281 -0
  99. package/dist/turnstile/index.mjs.map +1 -0
  100. package/dist/{types-7ELci8RQ.d.mts → types-oac2P5or.d.mts} +3 -23
  101. package/dist/types-oac2P5or.d.mts.map +1 -0
  102. package/dist/url/index.d.mts +18 -0
  103. package/dist/url/index.d.mts.map +1 -0
  104. package/dist/url/index.mjs +34 -0
  105. package/dist/url/index.mjs.map +1 -0
  106. package/package.json +43 -2
  107. package/dist/adc-BoEoogyo.d.mts.map +0 -1
  108. package/dist/cloudflare-BiK61Oq4.d.mts +0 -27
  109. package/dist/cloudflare-BiK61Oq4.d.mts.map +0 -1
  110. package/dist/cloudflare-CD8vwrgj.mjs +0 -92
  111. package/dist/cloudflare-CD8vwrgj.mjs.map +0 -1
  112. package/dist/plan-Hq8Pb0Uw.d.mts.map +0 -1
  113. package/dist/token-DkKC5m23.mjs.map +0 -1
  114. package/dist/token-DmmoQ7um.d.mts.map +0 -1
  115. package/dist/types-7ELci8RQ.d.mts.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","names":["s"],"sources":["../src/content.ts","../src/html.ts","../src/icons.ts","../src/scan.ts","../src/icons-scan.ts"],"sourcesContent":["/**\n * Framework-agnostic content-model types, guards, i18n, and part-attr resolution.\n *\n * Extracted from @getvitops/astro so the pure-TS helpers live in one place (no\n * Astro dependency). The Astro-typed element tag was `astro/types`' `HTMLTag`;\n * here it's a plain `string` (any tag name), keeping these fully framework-neutral.\n */\n\n// ── content-model types ──────────────────────────────────────────────────────\n\n/** A translatable value: a plain string, or a locale → string map. */\nexport type Localizable = string | Record<string, string>;\n\n/**\n * An HTML attribute bag. `class` may be a string or a class:list-style array\n * (falsy entries dropped); everything else is passed through to the element.\n */\nexport interface Attrs {\n class?: string | (string | false | null | undefined)[];\n [attr: string]: unknown;\n}\n\n/** An image reference used by image links. */\nexport interface ImageRef {\n src: string;\n alt?: Localizable;\n [key: string]: unknown;\n}\n\n/** A link with a text label. */\nexport interface TextLink {\n label: Localizable;\n href: string;\n attrs?: Attrs;\n [key: string]: unknown;\n}\n\n/** A link whose content is an image. */\nexport interface ImageLink {\n image: ImageRef;\n href: string;\n attrs?: Attrs;\n [key: string]: unknown;\n}\n\n/** Any link — text or image. */\nexport type Link = TextLink | ImageLink;\n\n/**\n * A generic content element wrapper (discriminated by `type: 'element'`),\n * carrying a payload `T` rendered as `Tag` (any HTML tag name).\n */\nexport interface Elmnt<T = unknown, Tag extends string = 'div'> {\n type: 'element';\n tag?: Tag;\n attrs?: Attrs;\n content?: T;\n [key: string]: unknown;\n}\n\n/**\n * A renderable node tree — a text string (Localizable) or an element with\n * optional attrs and either `text` shorthand or `children`.\n */\nexport type ContentNode =\n | string\n | {\n tag: string;\n attrs?: Attrs;\n text?: Localizable;\n children?: ContentNode[];\n };\n\n// ── type guards ──────────────────────────────────────────────────────────────\n\nexport function isElmnt<T, Tag extends string = 'div'>(item: any): item is Elmnt<T, Tag> {\n return item && item.type === 'element';\n}\n\nexport function isLink(item: any): item is Link {\n return item && ('label' in item || 'image' in item) && 'href' in item;\n}\n\nexport function isTextLink(item: any): item is TextLink {\n return item && 'label' in item && 'href' in item;\n}\n\nexport function isImageLink(item: any): item is ImageLink {\n return item && 'image' in item && 'href' in item;\n}\n\n// ── i18n ─────────────────────────────────────────────────────────────────────\n\n/**\n * Resolve a Localizable value to a string for the given locale. A plain string\n * is returned as-is; a locale map returns the best match (locale → default → '').\n */\nexport function t(value: Localizable | undefined, locale: string, defaultLocale: string): string {\n if (value == null) return '';\n if (typeof value === 'string') return value;\n return value[locale] ?? value[defaultLocale] ?? '';\n}\n\n// ── part-attr resolution ─────────────────────────────────────────────────────\n\n/**\n * Resolve per-part attrs from a presentation-type config. For the `root` part,\n * merges legacy `attrs` with `parts.root` (backward compat).\n */\nexport function partAttrs(\n present: { attrs?: Attrs; parts?: Record<string, Attrs> } | undefined,\n part: string,\n): Attrs {\n const fromParts = present?.parts?.[part];\n if (part === 'root') {\n const legacy = present?.attrs;\n if (!legacy && !fromParts) return {};\n const { class: lc, ...lr } = legacy ?? {};\n const { class: pc, ...pr } = fromParts ?? {};\n const classes = [lc, pc].flat().filter((c): c is string => typeof c === 'string' && c !== '');\n return {\n ...(classes.length ? { class: classes } : {}),\n ...lr,\n ...pr,\n };\n }\n return fromParts ?? {};\n}\n","/**\n * Framework-agnostic HTML/markup helpers (parse5-based). Extracted from\n * @getvitops/astro — no Astro runtime dependency; the Astro-typed `HTMLTag` /\n * `HTMLAttributes` are generalized to `string` / `Record<string, unknown>`.\n */\nimport { parseFragment, serialize as s, type DefaultTreeAdapterTypes } from 'parse5';\nimport type { Localizable, ContentNode } from './content.ts';\n\nexport type ChildNode = DefaultTreeAdapterTypes.ChildNode;\n\nexport function parseRenderedSlots(html: string): ChildNode[] {\n return parseFragment(html).childNodes;\n}\n\nexport function getAttribute(node: ChildNode, attrName: string): string | null {\n if ('attrs' in node) {\n const attr = node.attrs.find((a) => a.name === attrName);\n return attr ? attr.value : null;\n }\n return null;\n}\n\nexport function serialize(nodes: ChildNode | ChildNode[]): string[] {\n return (Array.isArray(nodes) ? nodes : [nodes]).map((node) =>\n s(node as DefaultTreeAdapterTypes.ParentNode),\n );\n}\n\n/** Style value types that can be combined (camelCase or --custom-prop keys). */\ntype StyleObject = Record<string, string | number | null | undefined>;\nexport type StyleValue = string | StyleObject | null | undefined;\nexport type StyleList = StyleValue | StyleValue[];\n\n/** camelCase → kebab-case, preserving CSS custom properties (`--var-name`). */\nfunction toKebabCase(str: string): string {\n if (str.startsWith('--')) return str;\n return str.replace(/([A-Z])/g, '-$1').toLowerCase();\n}\nfunction styleObjectToString(obj: StyleObject): string {\n return Object.entries(obj)\n .filter(([, value]) => value != null)\n .map(([key, value]) => `${toKebabCase(key)}: ${value}`)\n .join('; ');\n}\n\n/** Combine multiple style formats into one CSS string (like `class:list` for styles). */\nexport function styleList(...styles: StyleList[]): string {\n const result: string[] = [];\n const process = (item: StyleList): void => {\n if (item == null) return;\n if (Array.isArray(item)) {\n item.forEach(process);\n } else if (typeof item === 'string') {\n const trimmed = item.trim();\n if (trimmed) result.push(trimmed);\n } else {\n const str = styleObjectToString(item as StyleObject);\n if (str) result.push(str);\n }\n };\n styles.forEach(process);\n return result.join('; ');\n}\n\n/** Element descriptor: a tag name, text content, and optional attributes. */\nexport interface El<Tag extends string = string> {\n text: string;\n tag: Tag;\n attributes?: Record<string, unknown>;\n}\n\nfunction isEl(value: string | El): value is El {\n return typeof value === 'object' && value !== null && 'tag' in value && 'text' in value;\n}\n\nfunction attributesToString(attrs: Record<string, unknown>): string {\n const parts: string[] = [];\n for (const [key, value] of Object.entries(attrs)) {\n if (value == null || value === false) continue;\n if (value === true) {\n parts.push(key);\n } else if (key === 'style' && typeof value === 'object') {\n parts.push(`style=\"${styleList(value as StyleValue)}\"`);\n } else {\n const text = Array.isArray(value)\n ? value.filter((v): v is string => typeof v === 'string' && v !== '').join(' ')\n : typeof value === 'object'\n ? JSON.stringify(value)\n : String(value as string | number | boolean);\n parts.push(`${key}=\"${text.replace(/\"/g, '&quot;')}\"`);\n }\n }\n return parts.join(' ');\n}\n\n/** Normalize a string or `El` object into an HTML string (for `set:html`). */\nexport function toHtml<Tag extends string>(content: string | El<Tag>): string {\n if (!isEl(content)) return content;\n const { tag, text, attributes } = content;\n const attrStr = attributes ? attributesToString(attributes) : '';\n const t = String(tag);\n return attrStr ? `<${t} ${attrStr}>${text}</${t}>` : `<${t}>${text}</${t}>`;\n}\n\n// ── node-tree renderer — { tag, attrs, children } ────────────────────────────\nconst VOID_ELEMENTS = new Set([\n 'area',\n 'base',\n 'br',\n 'col',\n 'embed',\n 'hr',\n 'img',\n 'input',\n 'link',\n 'meta',\n 'param',\n 'source',\n 'track',\n 'wbr',\n]);\n\nfunction defaultResolveText(value: Localizable): string {\n if (typeof value === 'string') return value;\n const values = Object.values(value);\n return values[0] ?? '';\n}\n\nfunction escapeHtml(text: string): string {\n return text.replace(/&/g, '&amp;').replace(/</g, '&lt;').replace(/>/g, '&gt;');\n}\n\nfunction nodeToHtml(node: ContentNode, resolveText: (value: Localizable) => string): string {\n if (typeof node === 'string') return escapeHtml(resolveText(node));\n const { tag, attrs, text, children } = node;\n const attrStr = attrs ? attributesToString(attrs) : '';\n const open = attrStr ? `<${tag} ${attrStr}>` : `<${tag}>`;\n if (VOID_ELEMENTS.has(tag)) return open;\n let inner = '';\n if (text != null) inner = escapeHtml(resolveText(text));\n else if (children?.length)\n inner = children.map((child) => nodeToHtml(child, resolveText)).join('');\n return `${open}${inner}</${tag}>`;\n}\n\n/** Render an array of `ContentNode`s to an HTML string. */\nexport function nodesToHtml(\n nodes: ContentNode[],\n resolveText: (value: Localizable) => string = defaultResolveText,\n): string {\n return nodes.map((node) => nodeToHtml(node, resolveText)).join('');\n}\n","/**\n * Semantic icon name mapping across icon sets.\n *\n * Keys are functional/semantic names (what the icon means).\n * Values are the actual icon names in each set.\n *\n * Two consumers:\n * - `generateIconInclude()` (below) — build time. Turns the semantic names a project\n * declares into the `include` map astro-icon needs, so the icon set can be swapped\n * without touching call sites.\n * - `<wc-icon-picker>` (@getvitops/core) — browser. Its `semantic` mode lists these\n * keys so an icon can be chosen by meaning rather than by set-specific name.\n *\n * `resolveIcon`/`resolveBrandIcon` map one semantic name to a fully-qualified\n * `prefix:name` string for a given set.\n */\n\n/**\n * Maps astro-icon prefixes to iconMap lookup keys.\n * FA7 variants (fa7-solid, fa7-regular, etc.) all share the same icon names\n * and map to the 'fa7' key. Other sets map to themselves.\n */\nexport const prefixToMapKey: Record<string, string> = {\n 'fa7-solid': 'fa7',\n 'fa7-regular': 'fa7',\n 'fa7-light': 'fa7',\n 'fa7-thin': 'fa7',\n 'fa7-brands': 'fa7-brands',\n 'simple-icons': 'simple-icons',\n 'material-symbols': 'material-symbols',\n lucide: 'lucide',\n ph: 'ph',\n};\n\n/**\n * Sets whose weights are a name SUFFIX inside one collection rather than\n * separate prefixed collections. Phosphor is the case that forced this:\n * `ph:lightning`, `ph:lightning-bold`, `ph:lightning-fill` all live in `ph`,\n * whereas Font Awesome splits the same idea across `fa7-solid`/`fa7-regular`/…\n * (which is what `prefixToMapKey` collapses).\n *\n * The first entry is the unsuffixed default — asking for it adds nothing.\n */\nexport const WEIGHTED_SETS: Record<string, readonly string[]> = {\n ph: ['regular', 'bold', 'duotone', 'fill', 'light', 'thin'],\n};\n\nexport const iconMap = {\n fa7: {\n // Navigation / UI\n menu: 'bars',\n close: 'xmark',\n home: 'home',\n settings: 'gear',\n search: 'magnifying-glass',\n 'chevron-left': 'chevron-left',\n 'chevron-right': 'chevron-right',\n 'chevron-up': 'chevron-up',\n 'chevron-down': 'chevron-down',\n 'arrow-left': 'arrow-left',\n 'arrow-right': 'arrow-right',\n 'arrow-up': 'arrow-up',\n 'arrow-down': 'arrow-down',\n 'external-link': 'arrow-up-right-from-square',\n 'more-vert': 'ellipsis-vertical',\n 'more-horiz': 'ellipsis',\n\n // Actions\n add: 'plus',\n remove: 'minus',\n delete: 'trash',\n edit: 'pen',\n save: 'floppy-disk',\n copy: 'copy',\n paste: 'paste',\n attach: 'paperclip',\n upload: 'upload',\n download: 'download',\n share: 'share',\n bookmark: 'bookmark',\n favorite: 'heart',\n star: 'star',\n 'star-half': 'star-half-stroke',\n login: 'right-to-bracket',\n logout: 'right-from-bracket',\n\n // Communication\n email: 'envelope',\n phone: 'phone',\n location: 'location-dot',\n globe: 'globe',\n link: 'link',\n\n // Time\n clock: 'clock',\n calendar: 'calendar',\n schedule: 'calendar-days',\n\n // People\n person: 'user',\n group: 'users',\n\n // Content / Files\n file: 'file',\n 'file-add': 'file-circle-plus',\n folder: 'folder',\n 'folder-open': 'folder-open',\n 'folder-add': 'folder-plus',\n image: 'image',\n export: 'file-export',\n import: 'file-import',\n backup: 'cloud-arrow-up',\n compress: 'compress',\n\n // Status / Feedback\n check: 'check',\n error: 'circle-exclamation',\n warning: 'triangle-exclamation',\n info: 'circle-info',\n help: 'circle-question',\n\n // Commerce\n cart: 'cart-shopping',\n tag: 'tag',\n 'credit-card': 'credit-card',\n receipt: 'receipt',\n\n // Nature (landscaping context)\n leaf: 'leaf',\n tree: 'tree',\n seedling: 'seedling',\n trowel: 'trowel',\n droplet: 'droplet',\n snowflake: 'snowflake',\n sun: 'sun',\n cloud: 'cloud',\n\n // Layout / View\n grid: 'table-cells',\n list: 'list',\n filter: 'filter',\n sort: 'sort',\n fullscreen: 'expand',\n collapse: 'compress',\n\n // Misc\n building: 'building',\n video: 'video',\n lock: 'lock',\n unlock: 'lock-open',\n eye: 'eye',\n 'eye-off': 'eye-slash',\n print: 'print',\n code: 'code',\n palette: 'palette',\n lightbulb: 'lightbulb',\n lightning: 'bolt',\n },\n\n 'fa7-brands': {\n // Social Media\n facebook: 'facebook',\n instagram: 'instagram',\n x: 'x-twitter',\n bluesky: 'bluesky',\n threads: 'threads',\n mastodon: 'mastodon',\n linkedin: 'linkedin',\n youtube: 'youtube',\n tiktok: 'tiktok',\n pinterest: 'pinterest-p',\n reddit: 'reddit',\n snapchat: 'snapchat',\n github: 'github',\n\n // Messaging\n whatsapp: 'whatsapp',\n telegram: 'telegram',\n discord: 'discord',\n\n // Payment\n stripe: 'stripe',\n paypal: 'paypal',\n visa: 'cc-visa',\n mastercard: 'cc-mastercard',\n amex: 'cc-amex',\n discover: 'cc-discover',\n 'apple-pay': 'apple-pay',\n 'google-pay': 'google-pay',\n 'amazon-pay': 'amazon-pay',\n\n // Review / Directory\n yelp: 'yelp',\n google: 'google',\n\n // Platforms\n apple: 'apple',\n microsoft: 'microsoft',\n amazon: 'amazon',\n shopify: 'shopify',\n wordpress: 'wordpress',\n cloudflare: 'cloudflare',\n },\n\n 'simple-icons': {\n // Social Media\n facebook: 'facebook',\n instagram: 'instagram',\n x: 'x',\n bluesky: 'bluesky',\n threads: 'threads',\n mastodon: 'mastodon',\n linkedin: 'linkedin',\n youtube: 'youtube',\n tiktok: 'tiktok',\n pinterest: 'pinterest',\n reddit: 'reddit',\n snapchat: 'snapchat',\n github: 'github',\n\n // Messaging\n whatsapp: 'whatsapp',\n telegram: 'telegram',\n discord: 'discord',\n\n // Payment\n stripe: 'stripe',\n paypal: 'paypal',\n visa: 'visa',\n mastercard: 'mastercard',\n amex: 'americanexpress',\n discover: 'discover',\n 'apple-pay': 'applepay',\n 'google-pay': 'googlepay',\n 'amazon-pay': 'amazonpay',\n klarna: 'klarna',\n afterpay: 'afterpay',\n square: 'square',\n cashapp: 'cashapp',\n interac: 'interac',\n\n // Review / Directory\n yelp: 'yelp',\n google: 'google',\n tripadvisor: 'tripadvisor',\n trustpilot: 'trustpilot',\n 'google-maps': 'googlemaps',\n homeadvisor: 'homeadvisor',\n houzz: 'houzz',\n nextdoor: 'nextdoor',\n bbb: 'bbb',\n\n // Platforms\n apple: 'apple',\n microsoft: 'microsoft',\n amazon: 'amazon',\n shopify: 'shopify',\n wordpress: 'wordpress',\n cloudflare: 'cloudflare',\n waze: 'waze',\n },\n\n 'material-symbols': {\n // Navigation / UI\n menu: 'menu',\n close: 'close',\n home: 'home',\n settings: 'settings',\n search: 'search',\n 'chevron-left': 'chevron-left',\n 'chevron-right': 'chevron-right',\n // Material Symbols' chevrons are only named `chevron-*` on the horizontal\n // axis; the vertical pair is `expand-more`/`expand-less`, same glyph.\n 'chevron-up': 'expand-less',\n 'chevron-down': 'expand-more',\n 'arrow-left': 'arrow-back',\n 'arrow-right': 'arrow-forward',\n 'arrow-up': 'arrow-upward',\n 'arrow-down': 'arrow-downward',\n 'external-link': 'open-in-new',\n 'more-vert': 'more-vert',\n 'more-horiz': 'more-horiz',\n\n // Actions\n add: 'add',\n remove: 'remove',\n delete: 'delete',\n edit: 'edit',\n save: 'save',\n copy: 'content-copy',\n paste: 'content-paste',\n attach: 'attach-file',\n upload: 'upload',\n download: 'download',\n share: 'share',\n bookmark: 'bookmark',\n favorite: 'favorite',\n star: 'star',\n 'star-half': 'star-half',\n login: 'login',\n logout: 'logout',\n\n // Communication\n email: 'mail',\n phone: 'call',\n location: 'location-on',\n globe: 'language',\n link: 'link',\n\n // Time\n clock: 'schedule',\n calendar: 'calendar-today',\n schedule: 'calendar-month',\n\n // People\n person: 'person',\n group: 'group',\n\n // Content / Files\n file: 'description',\n 'file-add': 'note-add',\n folder: 'folder',\n 'folder-open': 'folder-open',\n 'folder-add': 'create-new-folder',\n image: 'image',\n export: 'upload-file',\n import: 'download',\n backup: 'backup',\n compress: 'compress',\n\n // Status / Feedback\n check: 'check-circle',\n error: 'error',\n warning: 'warning',\n info: 'info',\n help: 'help',\n\n // Commerce\n cart: 'shopping-cart',\n tag: 'sell',\n 'credit-card': 'credit-card',\n receipt: 'receipt-long',\n\n // Nature (landscaping context)\n leaf: 'eco',\n tree: 'forest',\n seedling: 'potted-plant',\n trowel: 'construction',\n droplet: 'water-drop',\n snowflake: 'ac-unit',\n sun: 'light-mode',\n cloud: 'cloud',\n\n // Layout / View\n grid: 'grid-view',\n list: 'list',\n filter: 'filter-list',\n sort: 'sort',\n fullscreen: 'fullscreen',\n collapse: 'fullscreen-exit',\n\n // Misc\n building: 'domain',\n video: 'videocam',\n lock: 'lock',\n unlock: 'lock-open',\n eye: 'visibility',\n 'eye-off': 'visibility-off',\n print: 'print',\n code: 'code',\n palette: 'palette',\n lightbulb: 'lightbulb',\n lightning: 'bolt',\n },\n lucide: {\n // Navigation / UI\n menu: 'menu',\n close: 'x',\n home: 'house',\n settings: 'settings',\n search: 'search',\n 'chevron-left': 'chevron-left',\n 'chevron-right': 'chevron-right',\n 'chevron-up': 'chevron-up',\n 'chevron-down': 'chevron-down',\n 'arrow-left': 'arrow-left',\n 'arrow-right': 'arrow-right',\n 'arrow-up': 'arrow-up',\n 'arrow-down': 'arrow-down',\n 'external-link': 'external-link',\n 'more-vert': 'ellipsis-vertical',\n 'more-horiz': 'ellipsis',\n\n // Actions\n add: 'plus',\n remove: 'minus',\n delete: 'trash-2',\n edit: 'pencil',\n save: 'save',\n copy: 'copy',\n paste: 'clipboard-paste',\n attach: 'paperclip',\n upload: 'upload',\n download: 'download',\n share: 'share-2',\n bookmark: 'bookmark',\n favorite: 'heart',\n star: 'star',\n 'star-half': 'star-half',\n login: 'log-in',\n logout: 'log-out',\n\n // Communication\n email: 'mail',\n phone: 'phone',\n location: 'map-pin',\n globe: 'globe',\n link: 'link',\n\n // Time\n clock: 'clock',\n calendar: 'calendar',\n schedule: 'calendar-days',\n\n // People\n person: 'user',\n group: 'users',\n\n // Content / Files\n file: 'file',\n 'file-add': 'file-plus',\n folder: 'folder',\n 'folder-open': 'folder-open',\n 'folder-add': 'folder-plus',\n image: 'image',\n export: 'file-output',\n import: 'file-input',\n backup: 'hard-drive-upload',\n compress: 'minimize-2',\n\n // Status / Feedback\n check: 'check-circle',\n error: 'circle-alert',\n warning: 'triangle-alert',\n info: 'info',\n help: 'circle-help',\n\n // Commerce\n cart: 'shopping-cart',\n tag: 'tag',\n 'credit-card': 'credit-card',\n receipt: 'receipt',\n\n // Nature (landscaping context)\n leaf: 'leaf',\n tree: 'tree-pine',\n seedling: 'sprout',\n trowel: 'shovel',\n droplet: 'droplet',\n snowflake: 'snowflake',\n sun: 'sun',\n cloud: 'cloud',\n\n // Layout / View\n grid: 'layout-grid',\n list: 'list',\n filter: 'filter',\n sort: 'arrow-up-down',\n fullscreen: 'maximize',\n collapse: 'minimize',\n\n // Misc\n building: 'building-2',\n video: 'video',\n lock: 'lock',\n unlock: 'lock-open',\n eye: 'eye',\n 'eye-off': 'eye-off',\n print: 'printer',\n code: 'code',\n palette: 'palette',\n lightbulb: 'lightbulb',\n lightning: 'zap',\n },\n // Phosphor. Unlike fa7, the weights are NOT separate collections — `ph` is one\n // collection and the weight is a name SUFFIX (`lightning`, `lightning-bold`,\n // `lightning-fill`, …), which is why `prefixToMapKey` maps `ph` to itself with\n // nothing to collapse. See WEIGHTED_SETS / resolveIcon's `weight` option.\n ph: {\n // Navigation / UI\n menu: 'list',\n close: 'x',\n home: 'house',\n settings: 'gear',\n search: 'magnifying-glass',\n // Phosphor's chevron is the `caret` family; `ph:chevron-*` doesn't exist.\n 'chevron-left': 'caret-left',\n 'chevron-right': 'caret-right',\n 'chevron-up': 'caret-up',\n 'chevron-down': 'caret-down',\n 'arrow-left': 'arrow-left',\n 'arrow-right': 'arrow-right',\n 'arrow-up': 'arrow-up',\n 'arrow-down': 'arrow-down',\n 'external-link': 'arrow-square-out',\n 'more-vert': 'dots-three-vertical',\n 'more-horiz': 'dots-three',\n // Actions\n add: 'plus',\n remove: 'minus',\n delete: 'trash',\n edit: 'pencil',\n save: 'floppy-disk',\n copy: 'copy',\n paste: 'clipboard',\n attach: 'paperclip',\n upload: 'upload',\n download: 'download',\n share: 'share',\n bookmark: 'bookmark',\n favorite: 'heart',\n star: 'star',\n 'star-half': 'star-half',\n login: 'sign-in',\n logout: 'sign-out',\n // Communication\n email: 'envelope',\n phone: 'phone',\n location: 'map-pin',\n globe: 'globe',\n link: 'link',\n // Time\n clock: 'clock',\n calendar: 'calendar',\n schedule: 'calendar-dots',\n // People\n person: 'person',\n group: 'users',\n // Content / files\n file: 'file',\n 'file-add': 'file-plus',\n folder: 'folder',\n 'folder-open': 'folder-open',\n 'folder-add': 'folder-plus',\n image: 'image',\n export: 'upload-simple',\n import: 'download-simple',\n backup: 'cloud-arrow-up',\n compress: 'arrows-in',\n // Status / feedback\n check: 'check',\n error: 'warning-circle',\n warning: 'warning',\n info: 'info',\n help: 'question',\n // Commerce\n cart: 'shopping-cart',\n tag: 'tag',\n 'credit-card': 'credit-card',\n receipt: 'receipt',\n // Nature (landscaping)\n leaf: 'leaf',\n tree: 'tree',\n seedling: 'plant',\n trowel: 'shovel',\n droplet: 'drop',\n snowflake: 'snowflake',\n sun: 'sun',\n cloud: 'cloud',\n // Layout / view\n grid: 'squares-four',\n list: 'list',\n filter: 'funnel',\n sort: 'arrows-down-up',\n fullscreen: 'corners-out',\n collapse: 'corners-in',\n // Misc\n building: 'building',\n video: 'video',\n lock: 'lock',\n unlock: 'lock-open',\n eye: 'eye',\n 'eye-off': 'eye-slash',\n print: 'printer',\n code: 'code',\n palette: 'palette',\n lightbulb: 'lightbulb',\n lightning: 'lightning',\n },\n} as const satisfies Record<string, Record<string, string>>;\n\nexport type IconSet = keyof typeof iconMap;\nexport type SemanticIcon = keyof (typeof iconMap)['fa7'];\nexport type BrandIcon = keyof (typeof iconMap)['simple-icons'];\n\n/**\n * Resolve a semantic icon name to a fully-qualified astro-icon string.\n * Names containing ':' are returned as-is (pass-through for fully-qualified names).\n *\n * @param name - Semantic name ('email') or fully-qualified ('fa7-solid:envelope')\n * @param prefix - astro-icon prefix, e.g. 'fa7-solid', 'material-symbols', 'lucide', 'ph'\n * @param opts.weight - Weight for suffix-weighted sets (see `WEIGHTED_SETS`), e.g.\n * `resolveIcon('menu', 'ph', { weight: 'bold' })` → `'ph:list-bold'`. Ignored for\n * sets that aren't suffix-weighted; an unknown weight throws rather than silently\n * resolving to the regular glyph, which would be indistinguishable from a typo.\n */\nexport function resolveIcon(name: string, prefix: string, opts?: { weight?: string }): string {\n if (name.includes(':')) return name;\n const mapKey = prefixToMapKey[prefix] as IconSet | undefined;\n if (!mapKey)\n throw new Error(\n `Unknown icon prefix \"${prefix}\". Valid: ${Object.keys(prefixToMapKey).join(', ')}`,\n );\n const map = iconMap[mapKey];\n const resolved = map[name as keyof typeof map];\n if (!resolved)\n throw new Error(`Icon \"${name}\" not found in set \"${prefix}\" (map key: \"${mapKey}\")`);\n return `${prefix}:${applyWeight(resolved, prefix, opts?.weight)}`;\n}\n\n/** Append a weight suffix for suffix-weighted sets. The first weight is the bare default. */\nfunction applyWeight(name: string, prefix: string, weight?: string): string {\n if (!weight) return name;\n const weights = WEIGHTED_SETS[prefix];\n if (!weights) return name;\n if (!weights.includes(weight))\n throw new Error(\n `Unknown weight \"${weight}\" for icon set \"${prefix}\". Valid: ${weights.join(', ')}.`,\n );\n return weight === weights[0] ? name : `${name}-${weight}`;\n}\n\n/**\n * Resolve a brand icon name to a fully-qualified astro-icon string.\n * Names containing ':' are returned as-is (pass-through).\n *\n * @param name - Semantic brand name ('facebook') or fully-qualified ('simple-icons:facebook')\n * @param prefix - astro-icon prefix, e.g. 'simple-icons', 'fa7-brands'\n */\nexport function resolveBrandIcon(name: string, prefix: string): string {\n if (name.includes(':')) return name;\n const mapKey = prefixToMapKey[prefix] as IconSet | undefined;\n if (!mapKey) throw new Error(`Unknown brand icon prefix \"${prefix}\"`);\n const map = iconMap[mapKey];\n const resolved = map[name as keyof typeof map];\n if (!resolved)\n throw new Error(`Brand icon \"${name}\" not found in set \"${prefix}\" (map key: \"${mapKey}\")`);\n return `${prefix}:${resolved}`;\n}\n\n/**\n * Generate the astro-icon `include` map from configured icon sets.\n *\n * Resolves two kinds of entries from the `icons` section of `site.config.yaml`:\n * - Per-set lists (e.g. `'fa7-solid': ['bars', 'plus']`) are passed through as-is.\n * - `semantic` names are looked up in the configured `ui` and `brand` prefix maps,\n * and the resolved icon names are merged into those sets' lists.\n *\n * Only explicitly configured icons are included — there is no fallback to all icons.\n *\n * @param iconsConfig - Icons config from site.config.yaml (icons section)\n * @returns Record<string, string[]> for astro-icon's `include` option\n */\nexport function generateIconInclude(iconsConfig?: {\n ui?: string;\n brand?: string;\n weight?: string;\n semantic?: string[];\n [prefix: string]: string | string[] | undefined;\n}): Record<string, string[]> {\n const uiPrefix = iconsConfig?.ui ?? 'fa7-solid';\n const brandPrefix = iconsConfig?.brand ?? 'simple-icons';\n const include: Record<string, string[]> = {};\n\n const addToInclude = (prefix: string, names: string[]) => {\n include[prefix] = [...new Set([...(include[prefix] ?? []), ...names])];\n };\n\n // Pass through per-set explicit lists directly\n for (const [key, val] of Object.entries(iconsConfig ?? {})) {\n if (\n key !== 'ui' &&\n key !== 'brand' &&\n key !== 'weight' &&\n key !== 'semantic' &&\n Array.isArray(val)\n ) {\n addToInclude(key, val as string[]);\n }\n }\n\n const uiMapKey = prefixToMapKey[uiPrefix] as IconSet | undefined;\n const brandMapKey = prefixToMapKey[brandPrefix] as IconSet | undefined;\n const unknownPrefix: string[] = [];\n if (!uiMapKey) unknownPrefix.push(`ui: '${uiPrefix}'`);\n if (!brandMapKey) unknownPrefix.push(`brand: '${brandPrefix}'`);\n if (unknownPrefix.length)\n throw new Error(\n `[vitops icons] Unknown icon set ${unknownPrefix.join(' and ')}. ` +\n `Known sets: ${Object.keys(prefixToMapKey).join(', ')}.`,\n );\n\n const unresolved: string[] = [];\n for (const name of iconsConfig?.semantic ?? []) {\n const ui = (iconMap[uiMapKey!] as Record<string, string>)[name];\n const brand = (iconMap[brandMapKey!] as Record<string, string>)[name];\n // The weight is part of the icon NAME for suffix-weighted sets, so the\n // bundled name has to carry it — including `ph:list-bold` but not\n // `ph:list` would ship the wrong glyph (or nothing) under output: 'server'.\n if (ui) addToInclude(uiPrefix, [applyWeight(ui, uiPrefix, iconsConfig?.weight)]);\n if (brand) addToInclude(brandPrefix, [applyWeight(brand, brandPrefix, iconsConfig?.weight)]);\n if (!ui && !brand) unresolved.push(name);\n }\n\n // Fail the build rather than silently omitting the icon. Skipping quietly is\n // what makes swapping icon sets frightening: the swap \"succeeds\" and the gaps\n // only show up as missing glyphs in production.\n if (unresolved.length)\n throw new Error(\n `[vitops icons] ${unresolved.length} semantic icon name(s) not found in ` +\n `ui set '${uiPrefix}' or brand set '${brandPrefix}': ${unresolved.join(', ')}.\\n` +\n `Either add them to iconMap in @getvitops/core, or drop them from the ` +\n `\\`semantic\\` list. Available in '${uiPrefix}': ` +\n `${Object.keys(iconMap[uiMapKey!]).slice(0, 12).join(', ')}…`,\n );\n\n return include;\n}\n","/**\n * Consumer source discovery.\n *\n * Lifted verbatim out of `@getvitops/cli`, where it was a private helper behind\n * `vitops lint`. It lives here now because a second caller needs it: the Astro\n * integration scans for icon usage during `astro:config:setup`, and it cannot\n * import the CLI — `@getvitops/cli` exposes only a `bin`, and its entry calls\n * `main()` at module scope, so importing it would run the CLI.\n *\n * Deliberately hand-rolled rather than a glob dependency: the whole job is one\n * `readdirSync` recursion with two allow/deny sets, and it runs synchronously\n * inside a config hook where an async glob would have to be awaited anyway.\n */\nimport { readFileSync, readdirSync } from 'node:fs';\nimport { extname, join } from 'node:path';\n\n/** A file the scanner found, with its contents already read. */\nexport interface SourceFile {\n path: string;\n text: string;\n}\n\nexport interface ScanOptions {\n /** File extensions to read. Defaults to `SCAN_EXT`. */\n exts?: Iterable<string>;\n /** Directory names to skip entirely. Defaults to `SCAN_SKIP`. */\n skipDirs?: Iterable<string>;\n}\n\n/**\n * Extensions worth scanning: every template language the framework's classes\n * and icon names can appear in, plus the markdown that can embed them.\n */\nexport const SCAN_EXT: ReadonlySet<string> = new Set([\n '.astro',\n '.html',\n '.htm',\n '.js',\n '.jsx',\n '.ts',\n '.tsx',\n '.vue',\n '.svelte',\n '.php',\n '.md',\n '.mdx',\n]);\n\n/** Directories that only ever hold dependencies or build output. */\nexport const SCAN_SKIP: ReadonlySet<string> = new Set([\n 'node_modules',\n 'dist',\n '.git',\n '.astro',\n 'build',\n 'coverage',\n]);\n\n/**\n * Recursively read every scannable file under `dir`.\n *\n * Dotfiles and dot-directories are skipped wholesale — they hold tooling config,\n * not templates, and `.astro`/`.git` would otherwise be walked twice over.\n */\nexport function scanFiles(dir: string, opts?: ScanOptions): SourceFile[] {\n const exts = opts?.exts ? new Set(opts.exts) : SCAN_EXT;\n const skip = opts?.skipDirs ? new Set(opts.skipDirs) : SCAN_SKIP;\n const acc: SourceFile[] = [];\n walk(dir, exts, skip, acc);\n return acc;\n}\n\nfunction walk(\n dir: string,\n exts: ReadonlySet<string>,\n skip: ReadonlySet<string>,\n acc: SourceFile[],\n): void {\n for (const e of readdirSync(dir, { withFileTypes: true })) {\n if (e.name.startsWith('.') && e.name !== '.') continue;\n const p = join(dir, e.name);\n if (e.isDirectory()) {\n if (!skip.has(e.name)) walk(p, exts, skip, acc);\n } else if (exts.has(extname(e.name))) {\n acc.push({ path: p, text: readFileSync(p, 'utf8') });\n }\n }\n}\n","/**\n * Find the icons a consumer's source actually uses.\n *\n * This exists for one reason: bundle size under `output: 'server'`. astro-icon\n * is zero-config for static builds, but on a server/hybrid build it bundles\n * EVERY icon in a set unless given an `include` map — so consumers hand-maintain\n * a list, and hand-maintained lists rot. Scanning derives it instead.\n *\n * The judgement call throughout is the same one `vitops lint`'s `extractClasses`\n * makes, and for the same reason: a template hole (`name={expr}`) is not a typo\n * and must not be guessed at. An unresolvable reference is REPORTED, never\n * invented — the caller warns and asks the author to declare it. Quietly\n * inferring would produce an `include` that is confidently wrong, which is worse\n * than one that is honestly incomplete.\n */\n\n/** How an icon reference was written. Useful for phrasing the warning. */\nexport type IconRefKind = 'component' | 'prop' | 'object' | 'sprite';\n\n/** A statically resolvable icon name. */\nexport interface IconRef {\n name: string;\n kind: IconRefKind;\n attr: string;\n file: string;\n line: number;\n}\n\n/** A reference whose name is computed at runtime and cannot be read statically. */\nexport interface DynamicIconRef {\n expr: string;\n attr: string;\n file: string;\n line: number;\n}\n\nexport interface IconScanResult {\n refs: IconRef[];\n dynamic: DynamicIconRef[];\n /** Unique static names, in first-seen order. */\n names: string[];\n}\n\nexport interface IconScanOptions {\n /** Extra prop names to treat as icon-bearing, beyond the defaults. */\n props?: string[];\n}\n\n/**\n * Props that carry an icon name. `icon` covers the component convention\n * (`Popover`/`Drawer`/`Details` triggers); the start/end pair covers adornments\n * on links and buttons.\n */\nconst DEFAULT_PROPS = ['icon', 'startIcon', 'endIcon', 'leadingIcon', 'trailingIcon'];\n\n/**\n * `<Icon …>` and any capitalised component whose name ends in `Icon`.\n * Requires a capital or the literal `Icon`, so `<iconButton>` and plain HTML\n * never match.\n */\nconst COMPONENT = /<([A-Z][\\w.]*Icon|Icon)\\b([^>]*?)\\/?>/g;\n\n/** Sprite references: `<use href=\"…/icons.svg#menu\">`, incl. legacy `xlink:href`. */\nconst SPRITE_USE = /<use\\b[^>]*?\\b(?:xlink:)?href\\s*=\\s*(?:\"([^\"#]*)#([^\"]*)\"|'([^'#]*)#([^']*)')/g;\n\n/**\n * An attribute value: a quoted literal, a braced single literal, or a braced\n * expression. The final alternative is what marks a value as dynamic — it is\n * matched on purpose so the reference can be REPORTED rather than skipped.\n *\n * That last alternative stops at the first `}`, so a reported expression\n * containing its own braces (`{\\`a:${b}\\`}`) is truncated in the warning text.\n * Deliberate: balancing braces with a regex buys nothing here, because the\n * actionable part of the report is the file and line, not the expression.\n */\nconst VALUE = String.raw`(?:\"([^\"]*)\"|'([^']*)'|\\{\\s*(?:\"([^\"]*)\"|'([^']*)'|\\`([^\\`$]*)\\`)\\s*\\}|(\\{[^}]*\\}))`;\n\n/**\n * `\\b` is not enough of a left boundary here: `-` is a non-word character, so\n * `\\bicon` happily matches inside `data-icon=` and `aria-icon=`. Requiring that\n * the previous character be neither a word character nor a hyphen keeps the\n * match to a genuine standalone prop.\n */\nconst LEFT = String.raw`(?<![\\w-])`;\n\nconst nameAttr = () => new RegExp(String.raw`${LEFT}name\\s*=\\s*${VALUE}`);\nconst iconProp = (props: string[]) =>\n new RegExp(String.raw`${LEFT}(${props.join('|')})\\s*=\\s*${VALUE}`, 'g');\n/** Object-literal form: `trigger={{ icon: 'bars' }}`, or a data array of `{ icon: '…' }`. */\nconst iconKey = (props: string[]) =>\n new RegExp(\n String.raw`${LEFT}(${props.join('|')})\\s*:\\s*(?:\"([^\"]*)\"|'([^']*)'|\\`([^\\`$]*)\\`)`,\n 'g',\n );\n\nconst lineOf = (src: string, index: number) => src.slice(0, index).split('\\n').length;\n\n/**\n * Pull the literal out of a VALUE match, or report it as dynamic.\n * Groups run: \"double\", 'single', {\"double\"}, {'single'}, {`template`}, {expr}.\n */\nfunction readValue(groups: (string | undefined)[]): { literal?: string; expr?: string } {\n const [dq, sq, bdq, bsq, btpl, expr] = groups;\n if (expr !== undefined) return { expr };\n const literal = dq ?? sq ?? bdq ?? bsq ?? btpl;\n if (literal === undefined) return {};\n // A template literal with an interpolation is dynamic even inside quotes.\n if (literal.includes('${')) return { expr: literal };\n return { literal };\n}\n\n/** Extract every icon reference from one file's text. */\nexport function extractIconRefs(\n src: string,\n file = '<source>',\n opts?: IconScanOptions,\n): { refs: IconRef[]; dynamic: DynamicIconRef[] } {\n const props = [...new Set([...DEFAULT_PROPS, ...(opts?.props ?? [])])];\n const refs: IconRef[] = [];\n const dynamic: DynamicIconRef[] = [];\n\n // 1. <Icon name=\"…\" /> — the name attribute inside an icon component tag.\n const NAME = nameAttr();\n for (const m of src.matchAll(COMPONENT)) {\n const attrs = m[2] ?? '';\n const hit = NAME.exec(attrs);\n if (!hit) continue;\n const line = lineOf(src, m.index!);\n const { literal, expr } = readValue(hit.slice(1));\n if (literal) refs.push({ name: literal, kind: 'component', attr: 'name', file, line });\n else if (expr) dynamic.push({ expr, attr: 'name', file, line });\n }\n\n // 2. icon= / startIcon= / endIcon= on any tag.\n for (const m of src.matchAll(iconProp(props))) {\n const line = lineOf(src, m.index!);\n const { literal, expr } = readValue(m.slice(2));\n if (literal) refs.push({ name: literal, kind: 'prop', attr: m[1]!, file, line });\n else if (expr) dynamic.push({ expr, attr: m[1]!, file, line });\n }\n\n // 3. `icon: '…'` inside an object literal or data array.\n for (const m of src.matchAll(iconKey(props))) {\n const literal = m[2] ?? m[3] ?? m[4];\n if (!literal || literal.includes('${')) continue;\n refs.push({ name: literal, kind: 'object', attr: m[1]!, file, line: lineOf(src, m.index!) });\n }\n\n // 4. Sprite <use href=\"…#id\">.\n for (const m of src.matchAll(SPRITE_USE)) {\n const id = m[2] ?? m[4];\n if (!id) continue;\n refs.push({ name: id, kind: 'sprite', attr: 'href', file, line: lineOf(src, m.index!) });\n }\n\n return { refs, dynamic };\n}\n\n/** Run `extractIconRefs` across a file set and collect unique names. */\nexport function collectIconRefs(\n files: readonly { path: string; text: string }[],\n opts?: IconScanOptions,\n): IconScanResult {\n const refs: IconRef[] = [];\n const dynamic: DynamicIconRef[] = [];\n for (const f of files) {\n const r = extractIconRefs(f.text, f.path, opts);\n refs.push(...r.refs);\n dynamic.push(...r.dynamic);\n }\n return { refs, dynamic, names: [...new Set(refs.map((r) => r.name))] };\n}\n"],"mappings":";;;;;;AA2EA,SAAgB,QAAuC,MAAkC;CACvF,OAAO,QAAQ,KAAK,SAAS;AAC/B;AAEA,SAAgB,OAAO,MAAyB;CAC9C,OAAO,SAAS,WAAW,QAAQ,WAAW,SAAS,UAAU;AACnE;AAEA,SAAgB,WAAW,MAA6B;CACtD,OAAO,QAAQ,WAAW,QAAQ,UAAU;AAC9C;AAEA,SAAgB,YAAY,MAA8B;CACxD,OAAO,QAAQ,WAAW,QAAQ,UAAU;AAC9C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;AACzB;;AAGA,SAAgB,gBACd,OACA,MACgB;CAChB,MAAM,OAAkB,CAAC;CACzB,MAAM,UAA4B,CAAC;CACnC,KAAK,MAAM,KAAK,OAAO;EACrB,MAAM,IAAI,gBAAgB,EAAE,MAAM,EAAE,MAAM,IAAI;EAC9C,KAAK,KAAK,GAAG,EAAE,IAAI;EACnB,QAAQ,KAAK,GAAG,EAAE,OAAO;CAC3B;CACA,OAAO;EAAE;EAAM;EAAS,OAAO,CAAC,GAAG,IAAI,IAAI,KAAK,KAAK,MAAM,EAAE,IAAI,CAAC,CAAC;CAAE;AACvE"}
1
+ {"version":3,"file":"index.mjs","names":["s"],"sources":["../src/html.ts","../src/icons.ts","../src/scan.ts","../src/icons-scan.ts"],"sourcesContent":["/**\n * Framework-agnostic HTML/markup helpers (parse5-based). Extracted from\n * @getvitops/astro — no Astro runtime dependency; the Astro-typed `HTMLTag` /\n * `HTMLAttributes` are generalized to `string` / `Record<string, unknown>`.\n */\nimport { parseFragment, serialize as s, type DefaultTreeAdapterTypes } from 'parse5';\nimport type { Localizable, ContentNode } from './content.ts';\nimport { safeHref } from './url/index.ts';\n\nexport type ChildNode = DefaultTreeAdapterTypes.ChildNode;\n\nexport function parseRenderedSlots(html: string): ChildNode[] {\n return parseFragment(html).childNodes;\n}\n\nexport function getAttribute(node: ChildNode, attrName: string): string | null {\n if ('attrs' in node) {\n const attr = node.attrs.find((a) => a.name === attrName);\n return attr ? attr.value : null;\n }\n return null;\n}\n\nexport function serialize(nodes: ChildNode | ChildNode[]): string[] {\n return (Array.isArray(nodes) ? nodes : [nodes]).map((node) =>\n s(node as DefaultTreeAdapterTypes.ParentNode),\n );\n}\n\n/** Style value types that can be combined (camelCase or --custom-prop keys). */\ntype StyleObject = Record<string, string | number | null | undefined>;\nexport type StyleValue = string | StyleObject | null | undefined;\nexport type StyleList = StyleValue | StyleValue[];\n\n/** camelCase → kebab-case, preserving CSS custom properties (`--var-name`). */\nfunction toKebabCase(str: string): string {\n if (str.startsWith('--')) return str;\n return str.replace(/([A-Z])/g, '-$1').toLowerCase();\n}\nfunction styleObjectToString(obj: StyleObject): string {\n return Object.entries(obj)\n .filter(([, value]) => value != null)\n .map(([key, value]) => `${toKebabCase(key)}: ${value}`)\n .join('; ');\n}\n\n/** Combine multiple style formats into one CSS string (like `class:list` for styles). */\nexport function styleList(...styles: StyleList[]): string {\n const result: string[] = [];\n const process = (item: StyleList): void => {\n if (item == null) return;\n if (Array.isArray(item)) {\n item.forEach(process);\n } else if (typeof item === 'string') {\n const trimmed = item.trim();\n if (trimmed) result.push(trimmed);\n } else {\n const str = styleObjectToString(item as StyleObject);\n if (str) result.push(str);\n }\n };\n styles.forEach(process);\n return result.join('; ');\n}\n\n/** Element descriptor: a tag name, text content, and optional attributes. */\nexport interface El<Tag extends string = string> {\n text: string;\n tag: Tag;\n attributes?: Record<string, unknown>;\n}\n\nfunction isEl(value: string | El): value is El {\n return typeof value === 'object' && value !== null && 'tag' in value && 'text' in value;\n}\n\nconst TAG_NAME = /^[a-z][a-z0-9-]*$/i;\nconst ATTR_NAME = /^[a-z_:][a-z0-9_:.-]*$/i;\n/** Attributes whose value is a URL the browser will follow or load. */\nconst URL_ATTRS = new Set(['href', 'src', 'action', 'formaction', 'poster', 'xlink:href', 'data']);\n\n/**\n * Names are interpolated into markup unescaped, so a hostile one (`x onload=…`, `img src=x\n * onerror=…`) would break out of the tag. They are validated, not escaped — there is no escaping\n * for a name. Callers pass authored data today; this keeps that from becoming load-bearing.\n */\nfunction assertTag(tag: string): void {\n if (!TAG_NAME.test(tag)) throw new Error(`nodesToHtml: invalid tag name ${JSON.stringify(tag)}`);\n}\n\nfunction attributesToString(attrs: Record<string, unknown>): string {\n const parts: string[] = [];\n for (const [key, value] of Object.entries(attrs)) {\n if (value == null || value === false) continue;\n if (!ATTR_NAME.test(key))\n throw new Error(`nodesToHtml: invalid attribute name ${JSON.stringify(key)}`);\n // Event handlers run script; markup that needs one belongs in a component, not a data tree.\n if (/^on/i.test(key))\n throw new Error(`nodesToHtml: event-handler attribute \"${key}\" is not allowed`);\n if (URL_ATTRS.has(key.toLowerCase()) && typeof value === 'string') {\n const safe = safeHref(value);\n if (safe === undefined) continue;\n parts.push(`${key}=\"${safe.replace(/&/g, '&amp;').replace(/\"/g, '&quot;')}\"`);\n continue;\n }\n if (value === true) {\n parts.push(key);\n } else if (key === 'style' && typeof value === 'object') {\n parts.push(`style=\"${styleList(value as StyleValue)}\"`);\n } else {\n const text = Array.isArray(value)\n ? value.filter((v): v is string => typeof v === 'string' && v !== '').join(' ')\n : typeof value === 'object'\n ? JSON.stringify(value)\n : String(value as string | number | boolean);\n parts.push(`${key}=\"${text.replace(/\"/g, '&quot;')}\"`);\n }\n }\n return parts.join(' ');\n}\n\n/** Normalize a string or `El` object into an HTML string (for `set:html`). */\nexport function toHtml<Tag extends string>(content: string | El<Tag>): string {\n if (!isEl(content)) return content;\n const { tag, text, attributes } = content;\n const attrStr = attributes ? attributesToString(attributes) : '';\n const t = String(tag);\n assertTag(t);\n return attrStr ? `<${t} ${attrStr}>${text}</${t}>` : `<${t}>${text}</${t}>`;\n}\n\n// ── node-tree renderer — { tag, attrs, children } ────────────────────────────\nconst VOID_ELEMENTS = new Set([\n 'area',\n 'base',\n 'br',\n 'col',\n 'embed',\n 'hr',\n 'img',\n 'input',\n 'link',\n 'meta',\n 'param',\n 'source',\n 'track',\n 'wbr',\n]);\n\nfunction defaultResolveText(value: Localizable): string {\n if (typeof value === 'string') return value;\n const values = Object.values(value);\n return values[0] ?? '';\n}\n\nfunction escapeHtml(text: string): string {\n return text.replace(/&/g, '&amp;').replace(/</g, '&lt;').replace(/>/g, '&gt;');\n}\n\nfunction nodeToHtml(node: ContentNode, resolveText: (value: Localizable) => string): string {\n if (typeof node === 'string') return escapeHtml(resolveText(node));\n const { tag, attrs, text, children } = node;\n assertTag(tag);\n const attrStr = attrs ? attributesToString(attrs) : '';\n const open = attrStr ? `<${tag} ${attrStr}>` : `<${tag}>`;\n if (VOID_ELEMENTS.has(tag)) return open;\n let inner = '';\n if (text != null) inner = escapeHtml(resolveText(text));\n else if (children?.length)\n inner = children.map((child) => nodeToHtml(child, resolveText)).join('');\n return `${open}${inner}</${tag}>`;\n}\n\n/** Render an array of `ContentNode`s to an HTML string. */\nexport function nodesToHtml(\n nodes: ContentNode[],\n resolveText: (value: Localizable) => string = defaultResolveText,\n): string {\n return nodes.map((node) => nodeToHtml(node, resolveText)).join('');\n}\n","/**\n * Semantic icon name mapping across icon sets.\n *\n * Keys are functional/semantic names (what the icon means).\n * Values are the actual icon names in each set.\n *\n * Two consumers:\n * - `generateIconInclude()` (below) — build time. Turns the semantic names a project\n * declares into the `include` map astro-icon needs, so the icon set can be swapped\n * without touching call sites.\n * - `<wc-icon-picker>` (@getvitops/core) — browser. Its `semantic` mode lists these\n * keys so an icon can be chosen by meaning rather than by set-specific name.\n *\n * `resolveIcon`/`resolveBrandIcon` map one semantic name to a fully-qualified\n * `prefix:name` string for a given set.\n */\n\n/**\n * Maps astro-icon prefixes to iconMap lookup keys.\n * FA7 variants (fa7-solid, fa7-regular, etc.) all share the same icon names\n * and map to the 'fa7' key. Other sets map to themselves.\n */\nexport const prefixToMapKey: Record<string, string> = {\n 'fa7-solid': 'fa7',\n 'fa7-regular': 'fa7',\n 'fa7-light': 'fa7',\n 'fa7-thin': 'fa7',\n 'fa7-brands': 'fa7-brands',\n 'simple-icons': 'simple-icons',\n 'material-symbols': 'material-symbols',\n lucide: 'lucide',\n ph: 'ph',\n};\n\n/**\n * Sets whose weights are a name SUFFIX inside one collection rather than\n * separate prefixed collections. Phosphor is the case that forced this:\n * `ph:lightning`, `ph:lightning-bold`, `ph:lightning-fill` all live in `ph`,\n * whereas Font Awesome splits the same idea across `fa7-solid`/`fa7-regular`/…\n * (which is what `prefixToMapKey` collapses).\n *\n * The first entry is the unsuffixed default — asking for it adds nothing.\n */\nexport const WEIGHTED_SETS: Record<string, readonly string[]> = {\n ph: ['regular', 'bold', 'duotone', 'fill', 'light', 'thin'],\n};\n\nexport const iconMap = {\n fa7: {\n // Navigation / UI\n menu: 'bars',\n close: 'xmark',\n home: 'home',\n settings: 'gear',\n search: 'magnifying-glass',\n 'chevron-left': 'chevron-left',\n 'chevron-right': 'chevron-right',\n 'chevron-up': 'chevron-up',\n 'chevron-down': 'chevron-down',\n 'arrow-left': 'arrow-left',\n 'arrow-right': 'arrow-right',\n 'arrow-up': 'arrow-up',\n 'arrow-down': 'arrow-down',\n 'external-link': 'arrow-up-right-from-square',\n 'more-vert': 'ellipsis-vertical',\n 'more-horiz': 'ellipsis',\n\n // Actions\n add: 'plus',\n remove: 'minus',\n delete: 'trash',\n edit: 'pen',\n save: 'floppy-disk',\n copy: 'copy',\n paste: 'paste',\n attach: 'paperclip',\n upload: 'upload',\n download: 'download',\n share: 'share',\n bookmark: 'bookmark',\n favorite: 'heart',\n star: 'star',\n 'star-half': 'star-half-stroke',\n login: 'right-to-bracket',\n logout: 'right-from-bracket',\n\n // Communication\n email: 'envelope',\n phone: 'phone',\n location: 'location-dot',\n globe: 'globe',\n link: 'link',\n\n // Time\n clock: 'clock',\n calendar: 'calendar',\n schedule: 'calendar-days',\n\n // People\n person: 'user',\n group: 'users',\n\n // Content / Files\n file: 'file',\n 'file-add': 'file-circle-plus',\n folder: 'folder',\n 'folder-open': 'folder-open',\n 'folder-add': 'folder-plus',\n image: 'image',\n export: 'file-export',\n import: 'file-import',\n backup: 'cloud-arrow-up',\n compress: 'compress',\n\n // Status / Feedback\n check: 'check',\n error: 'circle-exclamation',\n warning: 'triangle-exclamation',\n info: 'circle-info',\n help: 'circle-question',\n\n // Commerce\n cart: 'cart-shopping',\n tag: 'tag',\n 'credit-card': 'credit-card',\n receipt: 'receipt',\n\n // Nature (landscaping context)\n leaf: 'leaf',\n tree: 'tree',\n seedling: 'seedling',\n trowel: 'trowel',\n droplet: 'droplet',\n snowflake: 'snowflake',\n sun: 'sun',\n cloud: 'cloud',\n\n // Layout / View\n grid: 'table-cells',\n list: 'list',\n filter: 'filter',\n sort: 'sort',\n fullscreen: 'expand',\n collapse: 'compress',\n\n // Misc\n building: 'building',\n video: 'video',\n lock: 'lock',\n unlock: 'lock-open',\n eye: 'eye',\n 'eye-off': 'eye-slash',\n print: 'print',\n code: 'code',\n palette: 'palette',\n lightbulb: 'lightbulb',\n lightning: 'bolt',\n },\n\n 'fa7-brands': {\n // Social Media\n facebook: 'facebook',\n instagram: 'instagram',\n x: 'x-twitter',\n bluesky: 'bluesky',\n threads: 'threads',\n mastodon: 'mastodon',\n linkedin: 'linkedin',\n youtube: 'youtube',\n tiktok: 'tiktok',\n pinterest: 'pinterest-p',\n reddit: 'reddit',\n snapchat: 'snapchat',\n github: 'github',\n\n // Messaging\n whatsapp: 'whatsapp',\n telegram: 'telegram',\n discord: 'discord',\n\n // Payment\n stripe: 'stripe',\n paypal: 'paypal',\n visa: 'cc-visa',\n mastercard: 'cc-mastercard',\n amex: 'cc-amex',\n discover: 'cc-discover',\n 'apple-pay': 'apple-pay',\n 'google-pay': 'google-pay',\n 'amazon-pay': 'amazon-pay',\n\n // Review / Directory\n yelp: 'yelp',\n google: 'google',\n\n // Platforms\n apple: 'apple',\n microsoft: 'microsoft',\n amazon: 'amazon',\n shopify: 'shopify',\n wordpress: 'wordpress',\n cloudflare: 'cloudflare',\n },\n\n 'simple-icons': {\n // Social Media\n facebook: 'facebook',\n instagram: 'instagram',\n x: 'x',\n bluesky: 'bluesky',\n threads: 'threads',\n mastodon: 'mastodon',\n linkedin: 'linkedin',\n youtube: 'youtube',\n tiktok: 'tiktok',\n pinterest: 'pinterest',\n reddit: 'reddit',\n snapchat: 'snapchat',\n github: 'github',\n\n // Messaging\n whatsapp: 'whatsapp',\n telegram: 'telegram',\n discord: 'discord',\n\n // Payment\n stripe: 'stripe',\n paypal: 'paypal',\n visa: 'visa',\n mastercard: 'mastercard',\n amex: 'americanexpress',\n discover: 'discover',\n 'apple-pay': 'applepay',\n 'google-pay': 'googlepay',\n 'amazon-pay': 'amazonpay',\n klarna: 'klarna',\n afterpay: 'afterpay',\n square: 'square',\n cashapp: 'cashapp',\n interac: 'interac',\n\n // Review / Directory\n yelp: 'yelp',\n google: 'google',\n tripadvisor: 'tripadvisor',\n trustpilot: 'trustpilot',\n 'google-maps': 'googlemaps',\n homeadvisor: 'homeadvisor',\n houzz: 'houzz',\n nextdoor: 'nextdoor',\n bbb: 'bbb',\n\n // Platforms\n apple: 'apple',\n microsoft: 'microsoft',\n amazon: 'amazon',\n shopify: 'shopify',\n wordpress: 'wordpress',\n cloudflare: 'cloudflare',\n waze: 'waze',\n },\n\n 'material-symbols': {\n // Navigation / UI\n menu: 'menu',\n close: 'close',\n home: 'home',\n settings: 'settings',\n search: 'search',\n 'chevron-left': 'chevron-left',\n 'chevron-right': 'chevron-right',\n // Material Symbols' chevrons are only named `chevron-*` on the horizontal\n // axis; the vertical pair is `expand-more`/`expand-less`, same glyph.\n 'chevron-up': 'expand-less',\n 'chevron-down': 'expand-more',\n 'arrow-left': 'arrow-back',\n 'arrow-right': 'arrow-forward',\n 'arrow-up': 'arrow-upward',\n 'arrow-down': 'arrow-downward',\n 'external-link': 'open-in-new',\n 'more-vert': 'more-vert',\n 'more-horiz': 'more-horiz',\n\n // Actions\n add: 'add',\n remove: 'remove',\n delete: 'delete',\n edit: 'edit',\n save: 'save',\n copy: 'content-copy',\n paste: 'content-paste',\n attach: 'attach-file',\n upload: 'upload',\n download: 'download',\n share: 'share',\n bookmark: 'bookmark',\n favorite: 'favorite',\n star: 'star',\n 'star-half': 'star-half',\n login: 'login',\n logout: 'logout',\n\n // Communication\n email: 'mail',\n phone: 'call',\n location: 'location-on',\n globe: 'language',\n link: 'link',\n\n // Time\n clock: 'schedule',\n calendar: 'calendar-today',\n schedule: 'calendar-month',\n\n // People\n person: 'person',\n group: 'group',\n\n // Content / Files\n file: 'description',\n 'file-add': 'note-add',\n folder: 'folder',\n 'folder-open': 'folder-open',\n 'folder-add': 'create-new-folder',\n image: 'image',\n export: 'upload-file',\n import: 'download',\n backup: 'backup',\n compress: 'compress',\n\n // Status / Feedback\n check: 'check-circle',\n error: 'error',\n warning: 'warning',\n info: 'info',\n help: 'help',\n\n // Commerce\n cart: 'shopping-cart',\n tag: 'sell',\n 'credit-card': 'credit-card',\n receipt: 'receipt-long',\n\n // Nature (landscaping context)\n leaf: 'eco',\n tree: 'forest',\n seedling: 'potted-plant',\n trowel: 'construction',\n droplet: 'water-drop',\n snowflake: 'ac-unit',\n sun: 'light-mode',\n cloud: 'cloud',\n\n // Layout / View\n grid: 'grid-view',\n list: 'list',\n filter: 'filter-list',\n sort: 'sort',\n fullscreen: 'fullscreen',\n collapse: 'fullscreen-exit',\n\n // Misc\n building: 'domain',\n video: 'videocam',\n lock: 'lock',\n unlock: 'lock-open',\n eye: 'visibility',\n 'eye-off': 'visibility-off',\n print: 'print',\n code: 'code',\n palette: 'palette',\n lightbulb: 'lightbulb',\n lightning: 'bolt',\n },\n lucide: {\n // Navigation / UI\n menu: 'menu',\n close: 'x',\n home: 'house',\n settings: 'settings',\n search: 'search',\n 'chevron-left': 'chevron-left',\n 'chevron-right': 'chevron-right',\n 'chevron-up': 'chevron-up',\n 'chevron-down': 'chevron-down',\n 'arrow-left': 'arrow-left',\n 'arrow-right': 'arrow-right',\n 'arrow-up': 'arrow-up',\n 'arrow-down': 'arrow-down',\n 'external-link': 'external-link',\n 'more-vert': 'ellipsis-vertical',\n 'more-horiz': 'ellipsis',\n\n // Actions\n add: 'plus',\n remove: 'minus',\n delete: 'trash-2',\n edit: 'pencil',\n save: 'save',\n copy: 'copy',\n paste: 'clipboard-paste',\n attach: 'paperclip',\n upload: 'upload',\n download: 'download',\n share: 'share-2',\n bookmark: 'bookmark',\n favorite: 'heart',\n star: 'star',\n 'star-half': 'star-half',\n login: 'log-in',\n logout: 'log-out',\n\n // Communication\n email: 'mail',\n phone: 'phone',\n location: 'map-pin',\n globe: 'globe',\n link: 'link',\n\n // Time\n clock: 'clock',\n calendar: 'calendar',\n schedule: 'calendar-days',\n\n // People\n person: 'user',\n group: 'users',\n\n // Content / Files\n file: 'file',\n 'file-add': 'file-plus',\n folder: 'folder',\n 'folder-open': 'folder-open',\n 'folder-add': 'folder-plus',\n image: 'image',\n export: 'file-output',\n import: 'file-input',\n backup: 'hard-drive-upload',\n compress: 'minimize-2',\n\n // Status / Feedback\n check: 'check-circle',\n error: 'circle-alert',\n warning: 'triangle-alert',\n info: 'info',\n help: 'circle-help',\n\n // Commerce\n cart: 'shopping-cart',\n tag: 'tag',\n 'credit-card': 'credit-card',\n receipt: 'receipt',\n\n // Nature (landscaping context)\n leaf: 'leaf',\n tree: 'tree-pine',\n seedling: 'sprout',\n trowel: 'shovel',\n droplet: 'droplet',\n snowflake: 'snowflake',\n sun: 'sun',\n cloud: 'cloud',\n\n // Layout / View\n grid: 'layout-grid',\n list: 'list',\n filter: 'filter',\n sort: 'arrow-up-down',\n fullscreen: 'maximize',\n collapse: 'minimize',\n\n // Misc\n building: 'building-2',\n video: 'video',\n lock: 'lock',\n unlock: 'lock-open',\n eye: 'eye',\n 'eye-off': 'eye-off',\n print: 'printer',\n code: 'code',\n palette: 'palette',\n lightbulb: 'lightbulb',\n lightning: 'zap',\n },\n // Phosphor. Unlike fa7, the weights are NOT separate collections — `ph` is one\n // collection and the weight is a name SUFFIX (`lightning`, `lightning-bold`,\n // `lightning-fill`, …), which is why `prefixToMapKey` maps `ph` to itself with\n // nothing to collapse. See WEIGHTED_SETS / resolveIcon's `weight` option.\n ph: {\n // Navigation / UI\n menu: 'list',\n close: 'x',\n home: 'house',\n settings: 'gear',\n search: 'magnifying-glass',\n // Phosphor's chevron is the `caret` family; `ph:chevron-*` doesn't exist.\n 'chevron-left': 'caret-left',\n 'chevron-right': 'caret-right',\n 'chevron-up': 'caret-up',\n 'chevron-down': 'caret-down',\n 'arrow-left': 'arrow-left',\n 'arrow-right': 'arrow-right',\n 'arrow-up': 'arrow-up',\n 'arrow-down': 'arrow-down',\n 'external-link': 'arrow-square-out',\n 'more-vert': 'dots-three-vertical',\n 'more-horiz': 'dots-three',\n // Actions\n add: 'plus',\n remove: 'minus',\n delete: 'trash',\n edit: 'pencil',\n save: 'floppy-disk',\n copy: 'copy',\n paste: 'clipboard',\n attach: 'paperclip',\n upload: 'upload',\n download: 'download',\n share: 'share',\n bookmark: 'bookmark',\n favorite: 'heart',\n star: 'star',\n 'star-half': 'star-half',\n login: 'sign-in',\n logout: 'sign-out',\n // Communication\n email: 'envelope',\n phone: 'phone',\n location: 'map-pin',\n globe: 'globe',\n link: 'link',\n // Time\n clock: 'clock',\n calendar: 'calendar',\n schedule: 'calendar-dots',\n // People\n person: 'person',\n group: 'users',\n // Content / files\n file: 'file',\n 'file-add': 'file-plus',\n folder: 'folder',\n 'folder-open': 'folder-open',\n 'folder-add': 'folder-plus',\n image: 'image',\n export: 'upload-simple',\n import: 'download-simple',\n backup: 'cloud-arrow-up',\n compress: 'arrows-in',\n // Status / feedback\n check: 'check',\n error: 'warning-circle',\n warning: 'warning',\n info: 'info',\n help: 'question',\n // Commerce\n cart: 'shopping-cart',\n tag: 'tag',\n 'credit-card': 'credit-card',\n receipt: 'receipt',\n // Nature (landscaping)\n leaf: 'leaf',\n tree: 'tree',\n seedling: 'plant',\n trowel: 'shovel',\n droplet: 'drop',\n snowflake: 'snowflake',\n sun: 'sun',\n cloud: 'cloud',\n // Layout / view\n grid: 'squares-four',\n list: 'list',\n filter: 'funnel',\n sort: 'arrows-down-up',\n fullscreen: 'corners-out',\n collapse: 'corners-in',\n // Misc\n building: 'building',\n video: 'video',\n lock: 'lock',\n unlock: 'lock-open',\n eye: 'eye',\n 'eye-off': 'eye-slash',\n print: 'printer',\n code: 'code',\n palette: 'palette',\n lightbulb: 'lightbulb',\n lightning: 'lightning',\n },\n} as const satisfies Record<string, Record<string, string>>;\n\nexport type IconSet = keyof typeof iconMap;\nexport type SemanticIcon = keyof (typeof iconMap)['fa7'];\nexport type BrandIcon = keyof (typeof iconMap)['simple-icons'];\n\n/**\n * Resolve a semantic icon name to a fully-qualified astro-icon string.\n * Names containing ':' are returned as-is (pass-through for fully-qualified names).\n *\n * @param name - Semantic name ('email') or fully-qualified ('fa7-solid:envelope')\n * @param prefix - astro-icon prefix, e.g. 'fa7-solid', 'material-symbols', 'lucide', 'ph'\n * @param opts.weight - Weight for suffix-weighted sets (see `WEIGHTED_SETS`), e.g.\n * `resolveIcon('menu', 'ph', { weight: 'bold' })` → `'ph:list-bold'`. Ignored for\n * sets that aren't suffix-weighted; an unknown weight throws rather than silently\n * resolving to the regular glyph, which would be indistinguishable from a typo.\n */\nexport function resolveIcon(name: string, prefix: string, opts?: { weight?: string }): string {\n if (name.includes(':')) return name;\n const mapKey = prefixToMapKey[prefix] as IconSet | undefined;\n if (!mapKey)\n throw new Error(\n `Unknown icon prefix \"${prefix}\". Valid: ${Object.keys(prefixToMapKey).join(', ')}`,\n );\n const map = iconMap[mapKey];\n const resolved = map[name as keyof typeof map];\n if (!resolved)\n throw new Error(`Icon \"${name}\" not found in set \"${prefix}\" (map key: \"${mapKey}\")`);\n return `${prefix}:${applyWeight(resolved, prefix, opts?.weight)}`;\n}\n\n/** Append a weight suffix for suffix-weighted sets. The first weight is the bare default. */\nfunction applyWeight(name: string, prefix: string, weight?: string): string {\n if (!weight) return name;\n const weights = WEIGHTED_SETS[prefix];\n if (!weights) return name;\n if (!weights.includes(weight))\n throw new Error(\n `Unknown weight \"${weight}\" for icon set \"${prefix}\". Valid: ${weights.join(', ')}.`,\n );\n return weight === weights[0] ? name : `${name}-${weight}`;\n}\n\n/**\n * Resolve a brand icon name to a fully-qualified astro-icon string.\n * Names containing ':' are returned as-is (pass-through).\n *\n * @param name - Semantic brand name ('facebook') or fully-qualified ('simple-icons:facebook')\n * @param prefix - astro-icon prefix, e.g. 'simple-icons', 'fa7-brands'\n */\nexport function resolveBrandIcon(name: string, prefix: string): string {\n if (name.includes(':')) return name;\n const mapKey = prefixToMapKey[prefix] as IconSet | undefined;\n if (!mapKey) throw new Error(`Unknown brand icon prefix \"${prefix}\"`);\n const map = iconMap[mapKey];\n const resolved = map[name as keyof typeof map];\n if (!resolved)\n throw new Error(`Brand icon \"${name}\" not found in set \"${prefix}\" (map key: \"${mapKey}\")`);\n return `${prefix}:${resolved}`;\n}\n\n/**\n * Generate the astro-icon `include` map from configured icon sets.\n *\n * Resolves two kinds of entries from the `icons` section of `site.config.yaml`:\n * - Per-set lists (e.g. `'fa7-solid': ['bars', 'plus']`) are passed through as-is.\n * - `semantic` names are looked up in the configured `ui` and `brand` prefix maps,\n * and the resolved icon names are merged into those sets' lists.\n *\n * Only explicitly configured icons are included — there is no fallback to all icons.\n *\n * @param iconsConfig - Icons config from site.config.yaml (icons section)\n * @returns Record<string, string[]> for astro-icon's `include` option\n */\nexport function generateIconInclude(iconsConfig?: {\n ui?: string;\n brand?: string;\n weight?: string;\n semantic?: string[];\n [prefix: string]: string | string[] | undefined;\n}): Record<string, string[]> {\n const uiPrefix = iconsConfig?.ui ?? 'fa7-solid';\n const brandPrefix = iconsConfig?.brand ?? 'simple-icons';\n const include: Record<string, string[]> = {};\n\n const addToInclude = (prefix: string, names: string[]) => {\n include[prefix] = [...new Set([...(include[prefix] ?? []), ...names])];\n };\n\n // Pass through per-set explicit lists directly\n for (const [key, val] of Object.entries(iconsConfig ?? {})) {\n if (\n key !== 'ui' &&\n key !== 'brand' &&\n key !== 'weight' &&\n key !== 'semantic' &&\n Array.isArray(val)\n ) {\n addToInclude(key, val as string[]);\n }\n }\n\n const uiMapKey = prefixToMapKey[uiPrefix] as IconSet | undefined;\n const brandMapKey = prefixToMapKey[brandPrefix] as IconSet | undefined;\n const unknownPrefix: string[] = [];\n if (!uiMapKey) unknownPrefix.push(`ui: '${uiPrefix}'`);\n if (!brandMapKey) unknownPrefix.push(`brand: '${brandPrefix}'`);\n if (unknownPrefix.length)\n throw new Error(\n `[vitops icons] Unknown icon set ${unknownPrefix.join(' and ')}. ` +\n `Known sets: ${Object.keys(prefixToMapKey).join(', ')}.`,\n );\n\n const unresolved: string[] = [];\n for (const name of iconsConfig?.semantic ?? []) {\n const ui = (iconMap[uiMapKey!] as Record<string, string>)[name];\n const brand = (iconMap[brandMapKey!] as Record<string, string>)[name];\n // The weight is part of the icon NAME for suffix-weighted sets, so the\n // bundled name has to carry it — including `ph:list-bold` but not\n // `ph:list` would ship the wrong glyph (or nothing) under output: 'server'.\n if (ui) addToInclude(uiPrefix, [applyWeight(ui, uiPrefix, iconsConfig?.weight)]);\n if (brand) addToInclude(brandPrefix, [applyWeight(brand, brandPrefix, iconsConfig?.weight)]);\n if (!ui && !brand) unresolved.push(name);\n }\n\n // Fail the build rather than silently omitting the icon. Skipping quietly is\n // what makes swapping icon sets frightening: the swap \"succeeds\" and the gaps\n // only show up as missing glyphs in production.\n if (unresolved.length)\n throw new Error(\n `[vitops icons] ${unresolved.length} semantic icon name(s) not found in ` +\n `ui set '${uiPrefix}' or brand set '${brandPrefix}': ${unresolved.join(', ')}.\\n` +\n `Either add them to iconMap in @getvitops/core, or drop them from the ` +\n `\\`semantic\\` list. Available in '${uiPrefix}': ` +\n `${Object.keys(iconMap[uiMapKey!]).slice(0, 12).join(', ')}…`,\n );\n\n return include;\n}\n","/**\n * Consumer source discovery.\n *\n * Lifted verbatim out of `@getvitops/cli`, where it was a private helper behind\n * `vitops lint`. It lives here now because a second caller needs it: the Astro\n * integration scans for icon usage during `astro:config:setup`, and it cannot\n * import the CLI — `@getvitops/cli` exposes only a `bin`, and its entry calls\n * `main()` at module scope, so importing it would run the CLI.\n *\n * Deliberately hand-rolled rather than a glob dependency: the whole job is one\n * `readdirSync` recursion with two allow/deny sets, and it runs synchronously\n * inside a config hook where an async glob would have to be awaited anyway.\n */\nimport { readFileSync, readdirSync } from 'node:fs';\nimport { extname, join } from 'node:path';\n\n/** A file the scanner found, with its contents already read. */\nexport interface SourceFile {\n path: string;\n text: string;\n}\n\nexport interface ScanOptions {\n /** File extensions to read. Defaults to `SCAN_EXT`. */\n exts?: Iterable<string>;\n /** Directory names to skip entirely. Defaults to `SCAN_SKIP`. */\n skipDirs?: Iterable<string>;\n}\n\n/**\n * Extensions worth scanning: every template language the framework's classes\n * and icon names can appear in, plus the markdown that can embed them.\n */\nexport const SCAN_EXT: ReadonlySet<string> = new Set([\n '.astro',\n '.html',\n '.htm',\n '.js',\n '.jsx',\n '.ts',\n '.tsx',\n '.vue',\n '.svelte',\n '.php',\n '.md',\n '.mdx',\n]);\n\n/** Directories that only ever hold dependencies or build output. */\nexport const SCAN_SKIP: ReadonlySet<string> = new Set([\n 'node_modules',\n 'dist',\n '.git',\n '.astro',\n 'build',\n 'coverage',\n]);\n\n/**\n * Recursively read every scannable file under `dir`.\n *\n * Dotfiles and dot-directories are skipped wholesale — they hold tooling config,\n * not templates, and `.astro`/`.git` would otherwise be walked twice over.\n */\nexport function scanFiles(dir: string, opts?: ScanOptions): SourceFile[] {\n const exts = opts?.exts ? new Set(opts.exts) : SCAN_EXT;\n const skip = opts?.skipDirs ? new Set(opts.skipDirs) : SCAN_SKIP;\n const acc: SourceFile[] = [];\n walk(dir, exts, skip, acc);\n return acc;\n}\n\nfunction walk(\n dir: string,\n exts: ReadonlySet<string>,\n skip: ReadonlySet<string>,\n acc: SourceFile[],\n): void {\n for (const e of readdirSync(dir, { withFileTypes: true })) {\n if (e.name.startsWith('.') && e.name !== '.') continue;\n const p = join(dir, e.name);\n if (e.isDirectory()) {\n if (!skip.has(e.name)) walk(p, exts, skip, acc);\n } else if (exts.has(extname(e.name))) {\n acc.push({ path: p, text: readFileSync(p, 'utf8') });\n }\n }\n}\n","/**\n * Find the icons a consumer's source actually uses.\n *\n * This exists for one reason: bundle size under `output: 'server'`. astro-icon\n * is zero-config for static builds, but on a server/hybrid build it bundles\n * EVERY icon in a set unless given an `include` map — so consumers hand-maintain\n * a list, and hand-maintained lists rot. Scanning derives it instead.\n *\n * The judgement call throughout is the same one `vitops lint`'s `extractClasses`\n * makes, and for the same reason: a template hole (`name={expr}`) is not a typo\n * and must not be guessed at. An unresolvable reference is REPORTED, never\n * invented — the caller warns and asks the author to declare it. Quietly\n * inferring would produce an `include` that is confidently wrong, which is worse\n * than one that is honestly incomplete.\n */\n\n/** How an icon reference was written. Useful for phrasing the warning. */\nexport type IconRefKind = 'component' | 'prop' | 'object' | 'sprite';\n\n/** A statically resolvable icon name. */\nexport interface IconRef {\n name: string;\n kind: IconRefKind;\n attr: string;\n file: string;\n line: number;\n}\n\n/** A reference whose name is computed at runtime and cannot be read statically. */\nexport interface DynamicIconRef {\n expr: string;\n attr: string;\n file: string;\n line: number;\n}\n\nexport interface IconScanResult {\n refs: IconRef[];\n dynamic: DynamicIconRef[];\n /** Unique static names, in first-seen order. */\n names: string[];\n}\n\nexport interface IconScanOptions {\n /** Extra prop names to treat as icon-bearing, beyond the defaults. */\n props?: string[];\n}\n\n/**\n * Props that carry an icon name. `icon` covers the component convention\n * (`Popover`/`Drawer`/`Details` triggers); the start/end pair covers adornments\n * on links and buttons.\n */\nconst DEFAULT_PROPS = ['icon', 'startIcon', 'endIcon', 'leadingIcon', 'trailingIcon'];\n\n/**\n * `<Icon …>` and any capitalised component whose name ends in `Icon`.\n * Requires a capital or the literal `Icon`, so `<iconButton>` and plain HTML\n * never match.\n */\nconst COMPONENT = /<([A-Z][\\w.]*Icon|Icon)\\b([^>]*?)\\/?>/g;\n\n/** Sprite references: `<use href=\"…/icons.svg#menu\">`, incl. legacy `xlink:href`. */\nconst SPRITE_USE = /<use\\b[^>]*?\\b(?:xlink:)?href\\s*=\\s*(?:\"([^\"#]*)#([^\"]*)\"|'([^'#]*)#([^']*)')/g;\n\n/**\n * An attribute value: a quoted literal, a braced single literal, or a braced\n * expression. The final alternative is what marks a value as dynamic — it is\n * matched on purpose so the reference can be REPORTED rather than skipped.\n *\n * That last alternative stops at the first `}`, so a reported expression\n * containing its own braces (`{\\`a:${b}\\`}`) is truncated in the warning text.\n * Deliberate: balancing braces with a regex buys nothing here, because the\n * actionable part of the report is the file and line, not the expression.\n */\nconst VALUE = String.raw`(?:\"([^\"]*)\"|'([^']*)'|\\{\\s*(?:\"([^\"]*)\"|'([^']*)'|\\`([^\\`$]*)\\`)\\s*\\}|(\\{[^}]*\\}))`;\n\n/**\n * `\\b` is not enough of a left boundary here: `-` is a non-word character, so\n * `\\bicon` happily matches inside `data-icon=` and `aria-icon=`. Requiring that\n * the previous character be neither a word character nor a hyphen keeps the\n * match to a genuine standalone prop.\n */\nconst LEFT = String.raw`(?<![\\w-])`;\n\nconst nameAttr = () => new RegExp(String.raw`${LEFT}name\\s*=\\s*${VALUE}`);\nconst iconProp = (props: string[]) =>\n new RegExp(String.raw`${LEFT}(${props.join('|')})\\s*=\\s*${VALUE}`, 'g');\n/** Object-literal form: `trigger={{ icon: 'bars' }}`, or a data array of `{ icon: '…' }`. */\nconst iconKey = (props: string[]) =>\n new RegExp(\n String.raw`${LEFT}(${props.join('|')})\\s*:\\s*(?:\"([^\"]*)\"|'([^']*)'|\\`([^\\`$]*)\\`)`,\n 'g',\n );\n\nconst lineOf = (src: string, index: number) => src.slice(0, index).split('\\n').length;\n\n/**\n * Pull the literal out of a VALUE match, or report it as dynamic.\n * Groups run: \"double\", 'single', {\"double\"}, {'single'}, {`template`}, {expr}.\n */\nfunction readValue(groups: (string | undefined)[]): { literal?: string; expr?: string } {\n const [dq, sq, bdq, bsq, btpl, expr] = groups;\n if (expr !== undefined) return { expr };\n const literal = dq ?? sq ?? bdq ?? bsq ?? btpl;\n if (literal === undefined) return {};\n // A template literal with an interpolation is dynamic even inside quotes.\n if (literal.includes('${')) return { expr: literal };\n return { literal };\n}\n\n/** Extract every icon reference from one file's text. */\nexport function extractIconRefs(\n src: string,\n file = '<source>',\n opts?: IconScanOptions,\n): { refs: IconRef[]; dynamic: DynamicIconRef[] } {\n const props = [...new Set([...DEFAULT_PROPS, ...(opts?.props ?? [])])];\n const refs: IconRef[] = [];\n const dynamic: DynamicIconRef[] = [];\n\n // 1. <Icon name=\"…\" /> — the name attribute inside an icon component tag.\n const NAME = nameAttr();\n for (const m of src.matchAll(COMPONENT)) {\n const attrs = m[2] ?? '';\n const hit = NAME.exec(attrs);\n if (!hit) continue;\n const line = lineOf(src, m.index!);\n const { literal, expr } = readValue(hit.slice(1));\n if (literal) refs.push({ name: literal, kind: 'component', attr: 'name', file, line });\n else if (expr) dynamic.push({ expr, attr: 'name', file, line });\n }\n\n // 2. icon= / startIcon= / endIcon= on any tag.\n for (const m of src.matchAll(iconProp(props))) {\n const line = lineOf(src, m.index!);\n const { literal, expr } = readValue(m.slice(2));\n if (literal) refs.push({ name: literal, kind: 'prop', attr: m[1]!, file, line });\n else if (expr) dynamic.push({ expr, attr: m[1]!, file, line });\n }\n\n // 3. `icon: '…'` inside an object literal or data array.\n for (const m of src.matchAll(iconKey(props))) {\n const literal = m[2] ?? m[3] ?? m[4];\n if (!literal || literal.includes('${')) continue;\n refs.push({ name: literal, kind: 'object', attr: m[1]!, file, line: lineOf(src, m.index!) });\n }\n\n // 4. Sprite <use href=\"…#id\">.\n for (const m of src.matchAll(SPRITE_USE)) {\n const id = m[2] ?? m[4];\n if (!id) continue;\n refs.push({ name: id, kind: 'sprite', attr: 'href', file, line: lineOf(src, m.index!) });\n }\n\n return { refs, dynamic };\n}\n\n/** Run `extractIconRefs` across a file set and collect unique names. */\nexport function collectIconRefs(\n files: readonly { path: string; text: string }[],\n opts?: IconScanOptions,\n): IconScanResult {\n const refs: IconRef[] = [];\n const dynamic: DynamicIconRef[] = [];\n for (const f of files) {\n const r = extractIconRefs(f.text, f.path, opts);\n refs.push(...r.refs);\n dynamic.push(...r.dynamic);\n }\n return { refs, dynamic, names: [...new Set(refs.map((r) => r.name))] };\n}\n"],"mappings":";;;;;;;;;;;;;AAWA,SAAgB,mBAAmB,MAA2B;CAC5D,OAAO,cAAc,IAAI,CAAC,CAAC;AAC7B;AAEA,SAAgB,aAAa,MAAiB,UAAiC;CAC7E,IAAI,WAAW,MAAM;EACnB,MAAM,OAAO,KAAK,MAAM,MAAM,MAAM,EAAE,SAAS,QAAQ;EACvD,O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KAAK,GAAG,EAAE,IAAI;EACnB,QAAQ,KAAK,GAAG,EAAE,OAAO;CAC3B;CACA,OAAO;EAAE;EAAM;EAAS,OAAO,CAAC,GAAG,IAAI,IAAI,KAAK,KAAK,MAAM,EAAE,IAAI,CAAC,CAAC;CAAE;AACvE"}
@@ -1,34 +1,6 @@
1
- import { a as SCOPES, c as googleHeaders, i as GoogleOAuth, n as GoogleAuthLike, o as ServiceAccount, r as GoogleCredential, s as googleAccessToken, t as GoogleAuth } from "../token-DmmoQ7um.mjs";
2
- import { n as adcQuotaProject, r as parseAdcUser, t as adcCredentialsPath } from "../adc-BoEoogyo.mjs";
3
- //#region src/indexing/types.d.ts
4
- /**
5
- * The indexing module's own option surface.
6
- *
7
- * Deliberately structural rather than `Config['seo']['indexing']` imported
8
- * from `@getvitops/generator`: the generator already depends on this package, so
9
- * importing back would be a cycle. The vocabulary mirrors that block field for
10
- * field, so the CLI's adapter is a flat map — the same arrangement, and for the
11
- * same reason, as `GetvitopsSeoOptions` in `@getvitops/astro`.
12
- */
13
- /** IndexNow submission settings. The key is public by design — see `key`. */
14
- interface IndexNowConfig {
15
- /**
16
- * The IndexNow key. **Not a secret**: the engine fetches it back from
17
- * `keyLocation` to prove you control the host, so it is published either way.
18
- */
19
- key: string;
20
- /** Absolute URL of the key file. Defaults to `<canonical>/<key>.txt`. */
21
- keyLocation?: string | undefined;
22
- /** Endpoint (default `https://api.indexnow.org/indexnow`). */
23
- endpoint?: string | undefined;
24
- }
25
- /** Google Search Console property settings. The credential never lives here. */
26
- interface SearchConsoleConfig {
27
- /** `sc-domain:acme.ca`, or the URL-prefix form `https://acme.ca/`. */
28
- siteUrl: string;
29
- /** Re-submit the sitemap on each run (default true). */
30
- resubmitSitemap?: boolean | undefined;
31
- }
1
+ import { a as SCOPES, c as googleHeaders, i as GoogleOAuth, n as GoogleAuthLike, o as ServiceAccount, r as GoogleCredential, s as googleAccessToken, t as GoogleAuth } from "../token-CHR1O4w5.mjs";
2
+ import { n as adcQuotaProject, r as parseAdcUser, t as adcCredentialsPath } from "../adc-DvX3-P7a.mjs";
3
+ import { IndexNowConfig, SearchConsoleConfig } from "@getvitops/config";
32
4
  /** Everything `plan()` needs to decide what to do. */
33
5
  interface IndexingConfig {
34
6
  /** `domains.canonical` — the origin every default is derived from. */
@@ -58,8 +30,6 @@ interface Snapshot {
58
30
  /** `loc` → `lastmod`, or `''` when the entry carried none. */
59
31
  entries: Record<string, string>;
60
32
  }
61
- //#endregion
62
- //#region src/indexing/plan.d.ts
63
33
  export declare const INDEXNOW_ENDPOINT = "https://api.indexnow.org/indexnow";
64
34
  /**
65
35
  * IndexNow's own cap per submission. Batches larger than this are split rather
@@ -134,8 +104,6 @@ export declare function resolveKeyLocation(config: IndexingConfig): string | und
134
104
  export declare function plan(input: PlanInput): IndexingPlan;
135
105
  /** Render a plan as the human-readable block `--dry` prints. */
136
106
  export declare function formatPlan(p: IndexingPlan): string;
137
- //#endregion
138
- //#region src/indexing/sitemap.d.ts
139
107
  /** What a sitemap document turned out to be. */
140
108
  interface ParsedSitemap {
141
109
  /** `<url>` entries, when this was a `<urlset>`. */
@@ -166,8 +134,6 @@ export declare function collectEntries(source: string, read: SitemapReader): Pro
166
134
  entries: SitemapEntry[];
167
135
  sources: string[];
168
136
  }>;
169
- //#endregion
170
- //#region src/indexing/snapshot.d.ts
171
137
  /** Default location, relative to the consumer's project root. */
172
138
  export declare const SNAPSHOT_PATH = ".vitops/sitemap-snapshot.json";
173
139
  /**
@@ -190,8 +156,6 @@ export declare function toSnapshot(sitemapUrl: string, entries: SitemapEntry[],
190
156
  * silently drop a page from every future run.
191
157
  */
192
158
  export declare function writeSnapshot(path: string, snapshot: Snapshot): void;
193
- //#endregion
194
- //#region src/indexing/indexnow.d.ts
195
159
  /** Generate a key. 32 hex characters, the conventional shape. */
196
160
  export declare function newKey(): string;
197
161
  /** The body of the key file served at `keyLocation`: the key, and nothing else. */
@@ -220,8 +184,6 @@ export declare function verifyKeyFile(keyLocation: string, key: string, fetchImp
220
184
  * job, so that what gets sent is decided in the pure layer and visible in `--dry`.
221
185
  */
222
186
  export declare function submitBatch(plan: IndexNowPlan, urls: string[], fetchImpl?: typeof fetch): Promise<SubmitResult>;
223
- //#endregion
224
- //#region src/indexing/gsc.d.ts
225
187
  /**
226
188
  * Parse a service-account credential from its two supported sources.
227
189
  *
@@ -267,6 +229,5 @@ interface InspectionResult {
267
229
  * from an explicit `priorityUrls` list rather than the whole sitemap.
268
230
  */
269
231
  export declare function inspectUrl(auth: GoogleAuthLike, siteUrl: string, inspectionUrl: string, fetchImpl?: typeof fetch): Promise<InspectionResult>;
270
- //#endregion
271
232
  export { type ChannelPlan, type GoogleAuth, type GoogleAuthLike, type GoogleCredential, type GoogleOAuth, type IndexNowConfig, type IndexNowPlan, type IndexingConfig, type IndexingPlan, type InspectionResult, type ParsedSitemap, type PlanInput, SCOPES, type SearchConsoleConfig, type SearchConsolePlan, type ServiceAccount, type SitemapEntry, type SitemapReader, type Snapshot, type SubmitResult, type UrlReason, adcCredentialsPath, adcQuotaProject, googleAccessToken, googleHeaders, parseAdcUser };
272
233
  //# sourceMappingURL=index.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.mts","names":[],"sources":["../../src/indexing/types.ts","../../src/indexing/plan.ts","../../src/indexing/sitemap.ts","../../src/indexing/snapshot.ts","../../src/indexing/indexnow.ts","../../src/indexing/gsc.ts"],"mappings":";;;;;;;;;;;;;UAoBiB;;;;;EAKf;;EAEA;;EAEA;;;UAIe;;EAEf;;EAEA;;;UAIe;;EAEf;;EAEA;EACA,WAAW;EACX,gBAAgB;;EAEhB;;;;;EAKA;;;UAIe;EACf;EACA;;;UAIe;EACf;EACA;EACA;;EAEA,SAAS;;;;qBCtDE;;;;;;qBAOA;;KAGD;;UAGK;EACf;;EAEA;;UAGe,qBAAqB;EACpC;EACA;EACA;EACA;;EAEA;;UAGe,0BAA0B;EACzC;;UAGe;;EAEf;;EAEA;;EAEA;EACA,QAAQ;;EAER;EACA,UAAU;EACV,eAAe;;EAEf;;EAEA;;UAGe;EACf,QAAQ;EACR,SAAS;EACT,WAAW;;EAEX;;EAEA;;;;;;;;;;wBA4Bc,kBAAkB,QAAQ;;wBAO1B,mBAAmB,QAAQ;;;;;;;;;wBA6B3B,KAAK,OAAO,YAAY;;wBA6KxB,WAAW,GAAG;;;;UCxSb;;EAEf,SAAS;;EAET;;;;;;;;;;wBA6Cc,aAAa,cAAc;;KAoB/B,iBAAiB,mBAAmB;;;;;;;;;wBAU1B,eACpB,gBACA,MAAM,gBACL;EAAU,SAAS;EAAgB;;;;;qBCjFzB;;;;;;;;;wBAUG,aAAa,eAAe;;wBAK5B,WAAW,oBAAoB,SAAS,gBAAgB,kBAAkB;;;;;;;;;wBAc1E,cAAc,cAAc,UAAU;;;;wBC5BtC;;qBAKH,kBAAmB;UAEf;EACf;EACA;EACA;;EAEA;;;;;;;;;;wBAmCoB,cACpB,qBACA,aACA,mBAAkB,QACjB;EAAU;EAAa;;;;;;wBAqBJ,YACpB,MAAM,cACN,gBACA,mBAAkB,QACjB,QAAQ;;;;;;;;;;;wBCpDK,oBAAoB,cAAc;;;;;;wBAiBlC,oBACd,SAAS,gBACT,mBAAkB,OAClB,eACC;;;;;;;;wBAemB,cACpB,MAAM,gBACN,iBACA,oBACA,mBAAkB,QACjB;EAAU;EAAa;EAAgB;;;UAgBzB;EACf;;EAEA;;EAEA;EACA;;EAEA;EACA;;;;;;;wBAQoB,WACpB,MAAM,gBACN,iBACA,uBACA,mBAAkB,QACjB,QAAQ"}
1
+ {"version":3,"file":"index.d.mts","names":[],"sources":["../../src/indexing/types.ts","../../src/indexing/plan.ts","../../src/indexing/sitemap.ts","../../src/indexing/snapshot.ts","../../src/indexing/indexnow.ts","../../src/indexing/gsc.ts"],"mappings":";;;;UA0BiB;;EAEf;;EAEA;EACA,WAAW;EACX,gBAAgB;;EAEhB;;;;;EAKA;;;UAIe;EACf;EACA;;;UAIe;EACf;EACA;EACA;;EAEA,SAAS;;qBCvCE;;;;;;qBAOA;;KAGD;;UAGK;EACf;;EAEA;;UAGe,qBAAqB;EACpC;EACA;EACA;EACA;;EAEA;;UAGe,0BAA0B;EACzC;;UAGe;;EAEf;;EAEA;;EAEA;EACA,QAAQ;;EAER;EACA,UAAU;EACV,eAAe;;EAEf;;EAEA;;UAGe;EACf,QAAQ;EACR,SAAS;EACT,WAAW;;EAEX;;EAEA;;;;;;;;;;wBA4Bc,kBAAkB,QAAQ;;wBAO1B,mBAAmB,QAAQ;;;;;;;;;wBA6B3B,KAAK,OAAO,YAAY;;wBA6KxB,WAAW,GAAG;;UCxSb;;EAEf,SAAS;;EAET;;;;;;;;;;wBA6Cc,aAAa,cAAc;;KAoB/B,iBAAiB,mBAAmB;;;;;;;;;wBAU1B,eACpB,gBACA,MAAM,gBACL;EAAU,SAAS;EAAgB;;;qBCjFzB;;;;;;;;;wBAUG,aAAa,eAAe;;wBAK5B,WAAW,oBAAoB,SAAS,gBAAgB,kBAAkB;;;;;;;;;wBAc1E,cAAc,cAAc,UAAU;;wBC5BtC;;qBAKH,kBAAmB;UAEf;EACf;EACA;EACA;;EAEA;;;;;;;;;;wBAmCoB,cACpB,qBACA,aACA,mBAAkB,QACjB;EAAU;EAAa;;;;;;wBAqBJ,YACpB,MAAM,cACN,gBACA,mBAAkB,QACjB,QAAQ;;;;;;;;;wBCpDK,oBAAoB,cAAc;;;;;;wBAiBlC,oBACd,SAAS,gBACT,mBAAkB,OAClB,eACC;;;;;;;;wBAemB,cACpB,MAAM,gBACN,iBACA,oBACA,mBAAkB,QACjB;EAAU;EAAa;EAAgB;;;UAgBzB;EACf;;EAEA;;EAEA;EACA;;EAEA;EACA;;;;;;;wBAQoB,WACpB,MAAM,gBACN,iBACA,uBACA,mBAAkB,QACjB,QAAQ"}
@@ -1,9 +1,9 @@
1
- import { n as writeVersioned, t as readVersioned } from "../json-store-30CFCbZZ.mjs";
2
- import { a as googleHeaders, i as googleAccessToken, n as encodeSite, r as errorDetail, t as SCOPES } from "../token-DkKC5m23.mjs";
3
- import { n as adcQuotaProject, r as parseAdcUser, t as adcCredentialsPath } from "../adc-D6aw2qgq.mjs";
1
+ import { n as writeVersioned, t as readVersioned } from "../json-store-VJKEaoVX.mjs";
2
+ import { a as googleHeaders, i as googleAccessToken, n as encodeSite, r as errorDetail, t as SCOPES } from "../token-CJSl9eIS.mjs";
3
+ import { n as adcQuotaProject, r as parseAdcUser, t as adcCredentialsPath } from "../adc-BiW9BzqA.mjs";
4
4
  import { randomBytes } from "node:crypto";
5
5
 
6
- //#region src/indexing/plan.ts
6
+ // src/indexing/plan.ts
7
7
  const INDEXNOW_ENDPOINT = "https://api.indexnow.org/indexnow";
8
8
  /**
9
9
  * IndexNow's own cap per submission. Batches larger than this are split rather
@@ -189,8 +189,7 @@ function formatPlan(p) {
189
189
  return lines.join("\n");
190
190
  }
191
191
 
192
- //#endregion
193
- //#region src/indexing/sitemap.ts
192
+ // src/indexing/sitemap.ts
194
193
  /**
195
194
  * The five predefined XML entities, plus numeric character references.
196
195
  *
@@ -267,8 +266,7 @@ async function collectEntries(source, read) {
267
266
  };
268
267
  }
269
268
 
270
- //#endregion
271
- //#region src/indexing/snapshot.ts
269
+ // src/indexing/snapshot.ts
272
270
  /** Default location, relative to the consumer's project root. */
273
271
  const SNAPSHOT_PATH = ".vitops/sitemap-snapshot.json";
274
272
  /**
@@ -305,8 +303,7 @@ function writeSnapshot(path, snapshot) {
305
303
  writeVersioned(path, snapshot);
306
304
  }
307
305
 
308
- //#endregion
309
- //#region src/indexing/indexnow.ts
306
+ // src/indexing/indexnow.ts
310
307
  /**
311
308
  * IndexNow submission.
312
309
  *
@@ -395,8 +392,7 @@ async function submitBatch(plan, urls, fetchImpl = fetch) {
395
392
  };
396
393
  }
397
394
 
398
- //#endregion
399
- //#region src/indexing/gsc.ts
395
+ // src/indexing/gsc.ts
400
396
  /**
401
397
  * Google Search Console — the two things its API will actually do.
402
398
  *
@@ -501,6 +497,5 @@ async function inspectUrl(auth, siteUrl, inspectionUrl, fetchImpl = fetch) {
501
497
  };
502
498
  }
503
499
 
504
- //#endregion
505
500
  export { INDEXNOW_BATCH, INDEXNOW_ENDPOINT, SCOPES, SNAPSHOT_PATH, adcCredentialsPath, adcQuotaProject, collectEntries, formatPlan, googleAccessToken, googleHeaders, inspectUrl, keyFileContents, newKey, parseAdcUser, parseServiceAccount, parseSitemap, plan, readSnapshot, resolveKeyLocation, resolveSitemapUrl, serviceAccountToken, submitBatch, submitSitemap, toSnapshot, verifyKeyFile, writeSnapshot };
506
501
  //# sourceMappingURL=index.mjs.map