@getvitops/utils 8.1.0 → 8.2.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.
- package/CHANGELOG.md +264 -8
- package/dist/{adc-BFrzpMHq.d.mts → adc-BoEoogyo.d.mts} +2 -3
- package/dist/adc-BoEoogyo.d.mts.map +1 -0
- package/dist/ads/index.d.mts +50 -17
- package/dist/ads/index.d.mts.map +1 -1
- package/dist/ads/index.mjs +75 -7
- package/dist/ads/index.mjs.map +1 -1
- package/dist/cloudflare-BiK61Oq4.d.mts.map +1 -1
- package/dist/color/index.d.mts +34 -35
- package/dist/color/index.d.mts.map +1 -1
- package/dist/color/index.mjs +3 -1
- package/dist/color/index.mjs.map +1 -1
- package/dist/crm/index.d.mts +288 -0
- package/dist/crm/index.d.mts.map +1 -0
- package/dist/crm/index.mjs +731 -0
- package/dist/crm/index.mjs.map +1 -0
- package/dist/email/index.d.mts +216 -0
- package/dist/email/index.d.mts.map +1 -0
- package/dist/email/index.mjs +331 -0
- package/dist/email/index.mjs.map +1 -0
- package/dist/favicon.d.mts +8 -9
- package/dist/favicon.d.mts.map +1 -1
- package/dist/git/index.d.mts +65 -0
- package/dist/git/index.d.mts.map +1 -0
- package/dist/git/index.mjs +107 -0
- package/dist/git/index.mjs.map +1 -0
- package/dist/hosting/index.d.mts +29 -29
- package/dist/hosting/index.d.mts.map +1 -1
- package/dist/hosting/index.mjs +7 -4
- package/dist/hosting/index.mjs.map +1 -1
- package/dist/identity-BoRddTx3.mjs +35 -0
- package/dist/identity-BoRddTx3.mjs.map +1 -0
- package/dist/index.d.mts +24 -25
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +5 -5
- package/dist/index.mjs.map +1 -1
- package/dist/indexing/index.d.mts +23 -24
- package/dist/indexing/index.d.mts.map +1 -1
- package/dist/media/index.d.mts +24 -24
- package/dist/media/index.d.mts.map +1 -1
- package/dist/media/index.mjs +3 -3
- package/dist/media/index.mjs.map +1 -1
- package/dist/notify/index.d.mts +26 -15
- package/dist/notify/index.d.mts.map +1 -1
- package/dist/notify/index.mjs +50 -20
- package/dist/notify/index.mjs.map +1 -1
- package/dist/onboarding/index.d.mts +10 -141
- package/dist/onboarding/index.d.mts.map +1 -1
- package/dist/onboarding/index.mjs +1 -144
- package/dist/onboarding/index.mjs.map +1 -1
- package/dist/plan-BLKikoOG.mjs +150 -0
- package/dist/plan-BLKikoOG.mjs.map +1 -0
- package/dist/plan-Hq8Pb0Uw.d.mts +133 -0
- package/dist/plan-Hq8Pb0Uw.d.mts.map +1 -0
- package/dist/reviews/index.d.mts +12 -13
- package/dist/reviews/index.d.mts.map +1 -1
- package/dist/schema/index.d.mts +7 -7
- package/dist/schema/index.d.mts.map +1 -1
- package/dist/security/index.d.mts +2 -2
- package/dist/security/index.d.mts.map +1 -1
- package/dist/{token-Bz_-igw-.d.mts → token-DmmoQ7um.d.mts} +6 -3
- package/dist/token-DmmoQ7um.d.mts.map +1 -0
- package/dist/tracking/index.d.mts +43 -17
- package/dist/tracking/index.d.mts.map +1 -1
- package/dist/tracking/index.mjs +2 -1
- package/dist/tracking/index.mjs.map +1 -1
- package/dist/{types-CHHjzRrv.d.mts → types-7ELci8RQ.d.mts} +4 -2
- package/dist/types-7ELci8RQ.d.mts.map +1 -0
- package/package.json +14 -4
- package/dist/adc-BFrzpMHq.d.mts.map +0 -1
- package/dist/token-Bz_-igw-.d.mts.map +0 -1
- package/dist/types-CHHjzRrv.d.mts.map +0 -1
package/dist/index.mjs.map
CHANGED
|
@@ -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, '"')}\"`);\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, '&').replace(/</g, '<').replace(/>/g, '>');\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;;;;;AAQA,SAAgB,EAAE,OAAgC,QAAgB,eAA+B;CAC/F,IAAI,SAAS,MAAM,OAAO;CAC1B,IAAI,OAAO,UAAU,UAAU,OAAO;CACtC,OAAO,MAAM,WAAW,MAAM,kBAAkB;AAClD;;;;;AAQA,SAAgB,UACd,SACA,MACO;CACP,MAAM,YAAY,SAAS,QAAQ;CACnC,IAAI,SAAS,QAAQ;EACnB,MAAM,SAAS,SAAS;EACxB,IAAI,CAAC,UAAU,CAAC,WAAW,OAAO,CAAC;EACnC,MAAM,EAAE,OAAO,IAAI,GAAG,OAAO,UAAU,CAAC;EACxC,MAAM,EAAE,OAAO,IAAI,GAAG,OAAO,aAAa,CAAC;EAC3C,MAAM,UAAU,CAAC,IAAI,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,QAAQ,MAAmB,OAAO,MAAM,YAAY,MAAM,EAAE;EAC5F,OAAO;GACL,GAAI,QAAQ,SAAS,EAAE,OAAO,QAAQ,IAAI,CAAC;GAC3C,GAAG;GAC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QAAQ,KAAK;GAAE;GAAM,MAAM,EAAE;GAAK;GAAM;EAAK,CAAC;CAC/D;CAGA,KAAK,MAAM,KAAK,IAAI,SAAS,QAAQ,KAAK,CAAC,GAAG;EAC5C,MAAM,UAAU,EAAE,MAAM,EAAE,MAAM,EAAE;EAClC,IAAI,CAAC,WAAW,QAAQ,SAAS,IAAI,GAAG;EACxC,KAAK,KAAK;GAAE,MAAM;GAAS,MAAM;GAAU,MAAM,EAAE;GAAK;GAAM,MAAM,OAAO,KAAK,EAAE,KAAM;EAAE,CAAC;CAC7F;CAGA,KAAK,MAAM,KAAK,IAAI,SAAS,UAAU,GAAG;EACxC,MAAM,KAAK,EAAE,MAAM,EAAE;EACrB,IAAI,CAAC,IAAI;EACT,KAAK,KAAK;GAAE,MAAM;GAAI,MAAM;GAAU,MAAM;GAAQ;GAAM,MAAM,OAAO,KAAK,EAAE,KAAM;EAAE,CAAC;CACzF;CAEA,OAAO;EAAE;EAAM;CAAQ;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/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, '"')}\"`);\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, '&').replace(/</g, '<').replace(/>/g, '>');\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;;;;;AAQA,SAAgB,EAAE,OAAgC,QAAgB,eAA+B;CAC/F,IAAI,SAAS,MAAM,OAAO;CAC1B,IAAI,OAAO,UAAU,UAAU,OAAO;CACtC,OAAO,MAAM,WAAW,MAAM,kBAAkB;AAClD;;;;;AAQA,SAAgB,UACd,SACA,MACO;CACP,MAAM,YAAY,SAAS,QAAQ;CACnC,IAAI,SAAS,QAAQ;EACnB,MAAM,SAAS,SAAS;EACxB,IAAI,CAAC,UAAU,CAAC,WAAW,OAAO,CAAC;EACnC,MAAM,EAAE,OAAO,IAAI,GAAG,OAAO,UAAU,CAAC;EACxC,MAAM,EAAE,OAAO,IAAI,GAAG,OAAO,aAAa,CAAC;EAC3C,MAAM,UAAU,CAAC,IAAI,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,QAAQ,MAAmB,OAAO,MAAM,YAAY,MAAM,EAAE;EAC5F,OAAO;GACL,GAAI,QAAQ,SAAS,EAAE,OAAO,QAAQ,IAAI,CAAC;GAC3C,GAAG;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,MAAM,QAAQ,KAAK;GAAE;GAAM,MAAM,EAAE;GAAK;GAAM;EAAK,CAAC;CAC/D;CAGA,KAAK,MAAM,KAAK,IAAI,SAAS,QAAQ,KAAK,CAAC,GAAG;EAC5C,MAAM,UAAU,EAAE,MAAM,EAAE,MAAM,EAAE;EAClC,IAAI,CAAC,WAAW,QAAQ,SAAS,IAAI,GAAG;EACxC,KAAK,KAAK;GAAE,MAAM;GAAS,MAAM;GAAU,MAAM,EAAE;GAAK;GAAM,MAAM,OAAO,KAAK,EAAE,KAAM;EAAE,CAAC;CAC7F;CAGA,KAAK,MAAM,KAAK,IAAI,SAAS,UAAU,GAAG;EACxC,MAAM,KAAK,EAAE,MAAM,EAAE;EACrB,IAAI,CAAC,IAAI;EACT,KAAK,KAAK;GAAE,MAAM;GAAI,MAAM;GAAU,MAAM;GAAQ;GAAM,MAAM,OAAO,KAAK,EAAE,KAAM;EAAE,CAAC;CACzF;CAEA,OAAO;EAAE;EAAM;CAAQ;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,6 +1,5 @@
|
|
|
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-
|
|
2
|
-
import { n as adcQuotaProject, r as parseAdcUser, t as adcCredentialsPath } from "../adc-
|
|
3
|
-
|
|
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";
|
|
4
3
|
//#region src/indexing/types.d.ts
|
|
5
4
|
/**
|
|
6
5
|
* The indexing module's own option surface.
|
|
@@ -61,13 +60,13 @@ interface Snapshot {
|
|
|
61
60
|
}
|
|
62
61
|
//#endregion
|
|
63
62
|
//#region src/indexing/plan.d.ts
|
|
64
|
-
declare const INDEXNOW_ENDPOINT = "https://api.indexnow.org/indexnow";
|
|
63
|
+
export declare const INDEXNOW_ENDPOINT = "https://api.indexnow.org/indexnow";
|
|
65
64
|
/**
|
|
66
65
|
* IndexNow's own cap per submission. Batches larger than this are split rather
|
|
67
66
|
* than truncated — a silently dropped tail is the failure mode this command is
|
|
68
67
|
* meant to eliminate, not reproduce.
|
|
69
68
|
*/
|
|
70
|
-
declare const INDEXNOW_BATCH = 10000;
|
|
69
|
+
export declare const INDEXNOW_BATCH = 10000;
|
|
71
70
|
/** Why the URL set is what it is. */
|
|
72
71
|
type UrlReason = 'explicit' | 'all' | 'cold' | 'diff';
|
|
73
72
|
/** A channel's decision: on, or off with a stated reason. */
|
|
@@ -121,9 +120,9 @@ interface PlanInput {
|
|
|
121
120
|
* a flat `<urlset>` on a small site, which `parseSitemap` handles by reading the
|
|
122
121
|
* root element rather than the name.
|
|
123
122
|
*/
|
|
124
|
-
declare function resolveSitemapUrl(config: IndexingConfig): string | undefined;
|
|
123
|
+
export declare function resolveSitemapUrl(config: IndexingConfig): string | undefined;
|
|
125
124
|
/** Resolve the IndexNow key file URL. */
|
|
126
|
-
declare function resolveKeyLocation(config: IndexingConfig): string | undefined;
|
|
125
|
+
export declare function resolveKeyLocation(config: IndexingConfig): string | undefined;
|
|
127
126
|
/**
|
|
128
127
|
* Decide what this run should do.
|
|
129
128
|
*
|
|
@@ -132,9 +131,9 @@ declare function resolveKeyLocation(config: IndexingConfig): string | undefined;
|
|
|
132
131
|
* the diff, a cold snapshot is the tool having no basis to narrow, and the diff is
|
|
133
132
|
* the normal path. Each is reported in `reason` so `--dry` explains itself.
|
|
134
133
|
*/
|
|
135
|
-
declare function plan(input: PlanInput): IndexingPlan;
|
|
134
|
+
export declare function plan(input: PlanInput): IndexingPlan;
|
|
136
135
|
/** Render a plan as the human-readable block `--dry` prints. */
|
|
137
|
-
declare function formatPlan(p: IndexingPlan): string;
|
|
136
|
+
export declare function formatPlan(p: IndexingPlan): string;
|
|
138
137
|
//#endregion
|
|
139
138
|
//#region src/indexing/sitemap.d.ts
|
|
140
139
|
/** What a sitemap document turned out to be. */
|
|
@@ -152,7 +151,7 @@ interface ParsedSitemap {
|
|
|
152
151
|
* (@astrojs/sitemap emits an index only past `entryLimit`) that keying on the name
|
|
153
152
|
* would misread the single-file case as "no URLs".
|
|
154
153
|
*/
|
|
155
|
-
declare function parseSitemap(xml: string): ParsedSitemap;
|
|
154
|
+
export declare function parseSitemap(xml: string): ParsedSitemap;
|
|
156
155
|
/** Reads a sitemap from a URL or a local path. */
|
|
157
156
|
type SitemapReader = (source: string) => Promise<string>;
|
|
158
157
|
/**
|
|
@@ -163,14 +162,14 @@ type SitemapReader = (source: string) => Promise<string>;
|
|
|
163
162
|
* Child fetches run sequentially: a large site's index can list dozens of files,
|
|
164
163
|
* and hammering the consumer's own origin to save a second is a poor trade.
|
|
165
164
|
*/
|
|
166
|
-
declare function collectEntries(source: string, read: SitemapReader): Promise<{
|
|
165
|
+
export declare function collectEntries(source: string, read: SitemapReader): Promise<{
|
|
167
166
|
entries: SitemapEntry[];
|
|
168
167
|
sources: string[];
|
|
169
168
|
}>;
|
|
170
169
|
//#endregion
|
|
171
170
|
//#region src/indexing/snapshot.d.ts
|
|
172
171
|
/** Default location, relative to the consumer's project root. */
|
|
173
|
-
declare const SNAPSHOT_PATH = ".vitops/sitemap-snapshot.json";
|
|
172
|
+
export declare const SNAPSHOT_PATH = ".vitops/sitemap-snapshot.json";
|
|
174
173
|
/**
|
|
175
174
|
* Read a snapshot, or `undefined` when there isn't a usable one.
|
|
176
175
|
*
|
|
@@ -179,9 +178,9 @@ declare const SNAPSHOT_PATH = ".vitops/sitemap-snapshot.json";
|
|
|
179
178
|
* a site that legitimately has no URLs and submit nothing — the silent-success
|
|
180
179
|
* failure this whole command exists to remove.
|
|
181
180
|
*/
|
|
182
|
-
declare function readSnapshot(path: string): Snapshot | undefined;
|
|
181
|
+
export declare function readSnapshot(path: string): Snapshot | undefined;
|
|
183
182
|
/** Build a snapshot from the entries just read. */
|
|
184
|
-
declare function toSnapshot(sitemapUrl: string, entries: SitemapEntry[], takenAt: string): Snapshot;
|
|
183
|
+
export declare function toSnapshot(sitemapUrl: string, entries: SitemapEntry[], takenAt: string): Snapshot;
|
|
185
184
|
/**
|
|
186
185
|
* Write the snapshot, creating its directory.
|
|
187
186
|
*
|
|
@@ -190,13 +189,13 @@ declare function toSnapshot(sitemapUrl: string, entries: SitemapEntry[], takenAt
|
|
|
190
189
|
* it, those URLs would never be submitted again — a single transient 503 would
|
|
191
190
|
* silently drop a page from every future run.
|
|
192
191
|
*/
|
|
193
|
-
declare function writeSnapshot(path: string, snapshot: Snapshot): void;
|
|
192
|
+
export declare function writeSnapshot(path: string, snapshot: Snapshot): void;
|
|
194
193
|
//#endregion
|
|
195
194
|
//#region src/indexing/indexnow.d.ts
|
|
196
195
|
/** Generate a key. 32 hex characters, the conventional shape. */
|
|
197
|
-
declare function newKey(): string;
|
|
196
|
+
export declare function newKey(): string;
|
|
198
197
|
/** The body of the key file served at `keyLocation`: the key, and nothing else. */
|
|
199
|
-
declare const keyFileContents: (key: string) => string;
|
|
198
|
+
export declare const keyFileContents: (key: string) => string;
|
|
200
199
|
interface SubmitResult {
|
|
201
200
|
ok: boolean;
|
|
202
201
|
status: number;
|
|
@@ -212,7 +211,7 @@ interface SubmitResult {
|
|
|
212
211
|
* contents are stale is accepted with `202` and then silently discarded. Checking
|
|
213
212
|
* first is the only way to tell "submitted" from "submitted and ignored".
|
|
214
213
|
*/
|
|
215
|
-
declare function verifyKeyFile(keyLocation: string, key: string, fetchImpl?: typeof fetch): Promise<{
|
|
214
|
+
export declare function verifyKeyFile(keyLocation: string, key: string, fetchImpl?: typeof fetch): Promise<{
|
|
216
215
|
ok: boolean;
|
|
217
216
|
reason?: string;
|
|
218
217
|
}>;
|
|
@@ -220,7 +219,7 @@ declare function verifyKeyFile(keyLocation: string, key: string, fetchImpl?: typ
|
|
|
220
219
|
* Submit one batch. Callers iterate `plan.batches` — the split is the planner's
|
|
221
220
|
* job, so that what gets sent is decided in the pure layer and visible in `--dry`.
|
|
222
221
|
*/
|
|
223
|
-
declare function submitBatch(plan: IndexNowPlan, urls: string[], fetchImpl?: typeof fetch): Promise<SubmitResult>;
|
|
222
|
+
export declare function submitBatch(plan: IndexNowPlan, urls: string[], fetchImpl?: typeof fetch): Promise<SubmitResult>;
|
|
224
223
|
//#endregion
|
|
225
224
|
//#region src/indexing/gsc.d.ts
|
|
226
225
|
/**
|
|
@@ -231,13 +230,13 @@ declare function submitBatch(plan: IndexNowPlan, urls: string[], fetchImpl?: typ
|
|
|
231
230
|
* convention, and what a local `gcloud` setup already has). Supporting both means
|
|
232
231
|
* neither environment has to be reshaped to fit the tool.
|
|
233
232
|
*/
|
|
234
|
-
declare function parseServiceAccount(raw: string): ServiceAccount;
|
|
233
|
+
export declare function parseServiceAccount(raw: string): ServiceAccount;
|
|
235
234
|
/**
|
|
236
235
|
* Exchange a service-account key for an access token (RS256 JWT bearer flow).
|
|
237
236
|
*
|
|
238
237
|
* `now` is a parameter so this is testable without mocking the clock.
|
|
239
238
|
*/
|
|
240
|
-
declare function serviceAccountToken(account: ServiceAccount, fetchImpl?: typeof fetch, now?: number): Promise<string>;
|
|
239
|
+
export declare function serviceAccountToken(account: ServiceAccount, fetchImpl?: typeof fetch, now?: number): Promise<string>;
|
|
241
240
|
/**
|
|
242
241
|
* Re-submit a sitemap — the automated form of the manual resubmit in the UI.
|
|
243
242
|
*
|
|
@@ -245,7 +244,7 @@ declare function serviceAccountToken(account: ServiceAccount, fetchImpl?: typeof
|
|
|
245
244
|
* (`sc-domain:acme.ca` vs `https://acme.ca/`) or the service account isn't an
|
|
246
245
|
* owner of it, rather than that the sitemap is bad.
|
|
247
246
|
*/
|
|
248
|
-
declare function submitSitemap(auth: GoogleAuthLike, siteUrl: string, sitemapUrl: string, fetchImpl?: typeof fetch): Promise<{
|
|
247
|
+
export declare function submitSitemap(auth: GoogleAuthLike, siteUrl: string, sitemapUrl: string, fetchImpl?: typeof fetch): Promise<{
|
|
249
248
|
ok: boolean;
|
|
250
249
|
status: number;
|
|
251
250
|
message?: string;
|
|
@@ -267,7 +266,7 @@ interface InspectionResult {
|
|
|
267
266
|
* anything. Quota is 2000 queries/day per property, which is why the caller works
|
|
268
267
|
* from an explicit `priorityUrls` list rather than the whole sitemap.
|
|
269
268
|
*/
|
|
270
|
-
declare function inspectUrl(auth: GoogleAuthLike, siteUrl: string, inspectionUrl: string, fetchImpl?: typeof fetch): Promise<InspectionResult>;
|
|
269
|
+
export declare function inspectUrl(auth: GoogleAuthLike, siteUrl: string, inspectionUrl: string, fetchImpl?: typeof fetch): Promise<InspectionResult>;
|
|
271
270
|
//#endregion
|
|
272
|
-
export { type ChannelPlan, type GoogleAuth, type GoogleAuthLike, type GoogleCredential, type GoogleOAuth,
|
|
271
|
+
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 };
|
|
273
272
|
//# 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":"
|
|
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"}
|
package/dist/media/index.d.mts
CHANGED
|
@@ -10,9 +10,9 @@
|
|
|
10
10
|
/** What a source video is turned into. */
|
|
11
11
|
type OutputKind = 'webm' | 'mp4' | 'poster';
|
|
12
12
|
/** The default set: a modern codec, a universal fallback, and a poster frame. */
|
|
13
|
-
declare const DEFAULT_OUTPUTS: OutputKind[];
|
|
13
|
+
export declare const DEFAULT_OUTPUTS: OutputKind[];
|
|
14
14
|
/** File extension per output kind. */
|
|
15
|
-
declare const OUTPUT_EXT: Record<OutputKind, string>;
|
|
15
|
+
export declare const OUTPUT_EXT: Record<OutputKind, string>;
|
|
16
16
|
/**
|
|
17
17
|
* Bumped when the ffmpeg arguments in `ffmpeg.ts` change in a way that alters the
|
|
18
18
|
* output bytes. It is part of the settings hash, so bumping it re-encodes every
|
|
@@ -22,7 +22,7 @@ declare const OUTPUT_EXT: Record<OutputKind, string>;
|
|
|
22
22
|
* the README), so every bump is a large binary diff in someone's repository —
|
|
23
23
|
* that cost is worth paying for a real encoder fix and not for a tidy-up.
|
|
24
24
|
*/
|
|
25
|
-
declare const ENCODER_VERSION = 1;
|
|
25
|
+
export declare const ENCODER_VERSION = 1;
|
|
26
26
|
/** How to encode. Every field here feeds the settings hash. */
|
|
27
27
|
interface MediaConfig {
|
|
28
28
|
/**
|
|
@@ -116,18 +116,18 @@ interface MediaManifest {
|
|
|
116
116
|
//#endregion
|
|
117
117
|
//#region src/media/discover.d.ts
|
|
118
118
|
/** Container formats worth accepting as input. */
|
|
119
|
-
declare const VIDEO_EXT: ReadonlySet<string>;
|
|
119
|
+
export declare const VIDEO_EXT: ReadonlySet<string>;
|
|
120
120
|
/** Directories that never hold hand-managed source assets. */
|
|
121
|
-
declare const DISCOVER_SKIP: ReadonlySet<string>;
|
|
121
|
+
export declare const DISCOVER_SKIP: ReadonlySet<string>;
|
|
122
122
|
/** sha256 of the file contents, streamed. Truncated — 16 hex chars is 64 bits. */
|
|
123
|
-
declare function hashFile(path: string): Promise<string>;
|
|
123
|
+
export declare function hashFile(path: string): Promise<string>;
|
|
124
124
|
/**
|
|
125
125
|
* Every video under `dir`, with its content hash.
|
|
126
126
|
*
|
|
127
127
|
* Sorted by `id` so a plan — and therefore the manifest and the log — comes out in
|
|
128
128
|
* the same order on every machine, regardless of what the filesystem hands back.
|
|
129
129
|
*/
|
|
130
|
-
declare function discoverVideos(dir: string): Promise<MediaSource[]>;
|
|
130
|
+
export declare function discoverVideos(dir: string): Promise<MediaSource[]>;
|
|
131
131
|
//#endregion
|
|
132
132
|
//#region src/media/plan.d.ts
|
|
133
133
|
/** Defaults, resolved once so the settings hash is computed over real values. */
|
|
@@ -157,14 +157,14 @@ interface MediaPlanInput {
|
|
|
157
157
|
force?: boolean | undefined;
|
|
158
158
|
}
|
|
159
159
|
/** Fill in defaults. Exported because the encoder and the hash must agree on them. */
|
|
160
|
-
declare function resolveConfig(config?: MediaConfig): ResolvedMediaConfig;
|
|
160
|
+
export declare function resolveConfig(config?: MediaConfig): ResolvedMediaConfig;
|
|
161
161
|
/**
|
|
162
162
|
* Hash the settings that decide the output bytes.
|
|
163
163
|
*
|
|
164
164
|
* Order-independent in the one place it could bite (`outputs` is sorted), so
|
|
165
165
|
* re-ordering the list in a config doesn't re-encode a whole library.
|
|
166
166
|
*/
|
|
167
|
-
declare function settingsHash(config: ResolvedMediaConfig): string;
|
|
167
|
+
export declare function settingsHash(config: ResolvedMediaConfig): string;
|
|
168
168
|
/**
|
|
169
169
|
* Decide what to encode.
|
|
170
170
|
*
|
|
@@ -178,11 +178,11 @@ declare function settingsHash(config: ResolvedMediaConfig): string;
|
|
|
178
178
|
* the failure it would otherwise cause — two sources overwriting each other every
|
|
179
179
|
* run, each invalidating the other's cache entry — is invisible from the outside.
|
|
180
180
|
*/
|
|
181
|
-
declare function planMedia(input: MediaPlanInput): MediaPlan;
|
|
181
|
+
export declare function planMedia(input: MediaPlanInput): MediaPlan;
|
|
182
182
|
/** The jobs that will actually run. */
|
|
183
|
-
declare const pendingJobs: (plan: MediaPlan) => MediaJob[];
|
|
183
|
+
export declare const pendingJobs: (plan: MediaPlan) => MediaJob[];
|
|
184
184
|
/** Human-readable account of a plan, for `--dry` and for the run summary. */
|
|
185
|
-
declare function formatPlan(plan: MediaPlan): string;
|
|
185
|
+
export declare function formatPlan(plan: MediaPlan): string;
|
|
186
186
|
//#endregion
|
|
187
187
|
//#region src/media/ffmpeg.d.ts
|
|
188
188
|
/**
|
|
@@ -194,7 +194,7 @@ declare function formatPlan(plan: MediaPlan): string;
|
|
|
194
194
|
* output at all, and a build that carries on would ship the page referencing a
|
|
195
195
|
* video that was never encoded.
|
|
196
196
|
*/
|
|
197
|
-
declare function requireFfmpeg(): Promise<void>;
|
|
197
|
+
export declare function requireFfmpeg(): Promise<void>;
|
|
198
198
|
/**
|
|
199
199
|
* VP9/WebM, two passes.
|
|
200
200
|
*
|
|
@@ -203,7 +203,7 @@ declare function requireFfmpeg(): Promise<void>;
|
|
|
203
203
|
* makes two concurrent encodes silently share one log — the second encode's rate
|
|
204
204
|
* control then reads the first clip's statistics.
|
|
205
205
|
*/
|
|
206
|
-
declare function encodeWebm(input: string, output: string, config: ResolvedMediaConfig): Promise<void>;
|
|
206
|
+
export declare function encodeWebm(input: string, output: string, config: ResolvedMediaConfig): Promise<void>;
|
|
207
207
|
/**
|
|
208
208
|
* H.264/MP4 — the fallback that makes `<video>` work on older iOS and in the
|
|
209
209
|
* in-app webviews that still don't decode VP9.
|
|
@@ -212,13 +212,13 @@ declare function encodeWebm(input: string, output: string, config: ResolvedMedia
|
|
|
212
212
|
* download the whole file before it can show frame one, which on a hero video
|
|
213
213
|
* looks exactly like the optimisation didn't work.
|
|
214
214
|
*/
|
|
215
|
-
declare function encodeMp4(input: string, output: string, config: ResolvedMediaConfig): Promise<void>;
|
|
215
|
+
export declare function encodeMp4(input: string, output: string, config: ResolvedMediaConfig): Promise<void>;
|
|
216
216
|
/** The poster frame. `-ss` before `-i` so the seek is a fast one. */
|
|
217
|
-
declare function extractPoster(input: string, output: string, config: ResolvedMediaConfig): Promise<void>;
|
|
217
|
+
export declare function extractPoster(input: string, output: string, config: ResolvedMediaConfig): Promise<void>;
|
|
218
218
|
//#endregion
|
|
219
219
|
//#region src/media/manifest.d.ts
|
|
220
220
|
/** Default location, relative to the consumer's project root. */
|
|
221
|
-
declare const MEDIA_MANIFEST_PATH = ".vitops/media-manifest.json";
|
|
221
|
+
export declare const MEDIA_MANIFEST_PATH = ".vitops/media-manifest.json";
|
|
222
222
|
/**
|
|
223
223
|
* Read the manifest, or `undefined` when there isn't a usable one.
|
|
224
224
|
*
|
|
@@ -227,9 +227,9 @@ declare const MEDIA_MANIFEST_PATH = ".vitops/media-manifest.json";
|
|
|
227
227
|
* shape of bug `readSnapshot` avoids, except here it would be silent: nothing
|
|
228
228
|
* would encode, and the build would reference outputs that were never written.
|
|
229
229
|
*/
|
|
230
|
-
declare function readManifest(path: string): MediaManifest | undefined;
|
|
230
|
+
export declare function readManifest(path: string): MediaManifest | undefined;
|
|
231
231
|
/** Build a manifest with its keys and output lists in a stable order. */
|
|
232
|
-
declare function toManifest(entries: Record<string, MediaManifestEntry>): MediaManifest;
|
|
232
|
+
export declare function toManifest(entries: Record<string, MediaManifestEntry>): MediaManifest;
|
|
233
233
|
/**
|
|
234
234
|
* Write the manifest, creating its directory.
|
|
235
235
|
*
|
|
@@ -237,10 +237,10 @@ declare function toManifest(entries: Record<string, MediaManifestEntry>): MediaM
|
|
|
237
237
|
* source as encoded that isn't, and because the next run trusts this file, the
|
|
238
238
|
* result is a missing video that no rebuild ever fixes.
|
|
239
239
|
*/
|
|
240
|
-
declare function writeManifest(path: string, manifest: MediaManifest): void;
|
|
240
|
+
export declare function writeManifest(path: string, manifest: MediaManifest): void;
|
|
241
241
|
//#endregion
|
|
242
242
|
//#region src/media/index.d.ts
|
|
243
|
-
interface ProcessMediaOptions {
|
|
243
|
+
export interface ProcessMediaOptions {
|
|
244
244
|
/** Directory of unprocessed sources. Walked recursively. */
|
|
245
245
|
raw: string;
|
|
246
246
|
/** Where the encoded outputs go. Structure under `raw` is preserved. */
|
|
@@ -255,7 +255,7 @@ interface ProcessMediaOptions {
|
|
|
255
255
|
/** Called before each source is encoded — these take minutes, so say so. */
|
|
256
256
|
onProgress?: ((message: string) => void) | undefined;
|
|
257
257
|
}
|
|
258
|
-
interface ProcessMediaResult {
|
|
258
|
+
export interface ProcessMediaResult {
|
|
259
259
|
plan: MediaPlan;
|
|
260
260
|
/** Outputs written this run, relative to `out`. */
|
|
261
261
|
written: string[];
|
|
@@ -269,7 +269,7 @@ interface ProcessMediaResult {
|
|
|
269
269
|
* them: `vitops media` and the Astro integration are equally incremental, since
|
|
270
270
|
* they call this same function.
|
|
271
271
|
*/
|
|
272
|
-
declare function processMedia(options: ProcessMediaOptions): Promise<ProcessMediaResult>;
|
|
272
|
+
export declare function processMedia(options: ProcessMediaOptions): Promise<ProcessMediaResult>;
|
|
273
273
|
//#endregion
|
|
274
|
-
export {
|
|
274
|
+
export type { MediaConfig, MediaJob, MediaManifest, MediaManifestEntry, MediaOutput, MediaPlan, MediaPlanInput, MediaSource, OutputKind, OutputProbe, ResolvedMediaConfig };
|
|
275
275
|
//# sourceMappingURL=index.d.mts.map
|