style-capture 0.0.1 → 0.0.3

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.
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cli.js","names":[],"sources":["../../../packages/core/dist/index.js","../src/capture.ts","../src/interactive.ts","../src/run.ts","../src/cli.ts"],"sourcesContent":["//#region src/claude-export.ts\nconst CAPTURE_NODE_ATTRIBUTE = \"data-lc\";\nconst MAX_TAILWIND_SUGGESTIONS = 6;\nconst MAX_OPEN_QUESTION_ITEMS = 8;\nconst CLAUDE_CAPTURE_INSTRUCTION = \"Recreate or refactor this UI faithfully. html_capture + css_capture are ground truth. Preserve structure unless simplifying is clearly better. Tailwind hints are hints. Use the smallest codebase-ready change and state ambiguities instead of inventing details.\";\nconst compactInlineText = (value) => value.replaceAll(/\\s+/g, \" \").trim();\nconst escapeXmlAttribute = (value) => value.replaceAll(\"&\", \"&amp;\").replaceAll(\"\\\"\", \"&quot;\").replaceAll(\"<\", \"&lt;\").replaceAll(\">\", \"&gt;\");\nconst compactSelector = (selector) => selector.replaceAll(/\\s*([>+~])\\s*/g, \"$1\").replaceAll(/,\\s+/g, \",\").replaceAll(/\\s+/g, \" \").trim();\nconst buildCompactRefs = (order) => {\n\tconst refs = {};\n\tfor (const [index, elementId] of order.entries()) refs[elementId] = index.toString(36);\n\treturn refs;\n};\nconst buildCompactSelector = (ref) => `[${CAPTURE_NODE_ATTRIBUTE}=\"${ref}\"]`;\nconst buildFallbackSelectors = (capture) => {\n\tconst selectors = {};\n\tfor (const elementId of capture.order) {\n\t\tconst snapshot = capture.elements[elementId];\n\t\tif (!snapshot) continue;\n\t\tselectors[elementId] = compactSelector(snapshot.selector);\n\t}\n\treturn selectors;\n};\nconst stripCommentNodes = (root) => {\n\tconst walker = root.ownerDocument.createTreeWalker(root, NodeFilter.SHOW_COMMENT);\n\tconst comments = [];\n\twhile (walker.nextNode()) if (walker.currentNode instanceof Comment) comments.push(walker.currentNode);\n\tfor (const comment of comments) comment.remove();\n};\nconst minifyHtmlString = (html) => html.replaceAll(/<!--[\\s\\S]*?-->/g, \"\").replaceAll(/>\\s+</g, \"><\").trim();\nconst elementMatchesSnapshot = (element, snapshot) => {\n\tif (element.tagName.toLowerCase() !== snapshot.tagName) return false;\n\tfor (const className of snapshot.classList) if (!element.classList.contains(className)) return false;\n\tfor (const [name, value] of Object.entries(snapshot.attributes)) {\n\t\tif (name === \"class\") continue;\n\t\tif (element.getAttribute(name) !== value) return false;\n\t}\n\treturn true;\n};\nconst findMatchingElementIndex = (candidates, snapshot, startIndex) => {\n\tfor (let index = startIndex; index < candidates.length; index += 1) if (elementMatchesSnapshot(candidates[index], snapshot)) return index;\n\treturn -1;\n};\nconst annotateCaptureHtml = (capture) => {\n\tconst refs = buildCompactRefs(capture.order);\n\tif (!capture.rootOuterHtml.trim()) return {\n\t\thtml: \"\",\n\t\trefs,\n\t\tselectors: buildFallbackSelectors(capture)\n\t};\n\tif (typeof DOMParser === \"undefined\") return {\n\t\thtml: minifyHtmlString(capture.rootOuterHtml),\n\t\trefs,\n\t\tselectors: buildFallbackSelectors(capture)\n\t};\n\tconst root = new DOMParser().parseFromString(capture.rootOuterHtml, \"text/html\").body.firstElementChild;\n\tif (!root) return {\n\t\thtml: minifyHtmlString(capture.rootOuterHtml),\n\t\trefs,\n\t\tselectors: buildFallbackSelectors(capture)\n\t};\n\tstripCommentNodes(root);\n\tconst candidates = [root, ...root.querySelectorAll(\"*\")];\n\tconst selectors = buildFallbackSelectors(capture);\n\tlet searchStartIndex = 0;\n\tfor (const elementId of capture.order) {\n\t\tconst snapshot = capture.elements[elementId];\n\t\tconst ref = refs[elementId];\n\t\tif (!(snapshot && ref)) continue;\n\t\tconst matchIndex = findMatchingElementIndex(candidates, snapshot, searchStartIndex);\n\t\tif (matchIndex === -1) continue;\n\t\tcandidates[matchIndex].setAttribute(CAPTURE_NODE_ATTRIBUTE, ref);\n\t\tselectors[elementId] = buildCompactSelector(ref);\n\t\tsearchStartIndex = matchIndex + 1;\n\t}\n\treturn {\n\t\thtml: minifyHtmlString(root.outerHTML),\n\t\trefs,\n\t\tselectors\n\t};\n};\nconst formatCssPropertyName = (property) => {\n\tif (property.includes(\"-\")) return property;\n\treturn property.replaceAll(/[A-Z]/g, (match) => `-${match.toLowerCase()}`);\n};\nconst formatDeclarationBlock = (styles) => Object.entries(styles).filter(([, value]) => value.trim().length > 0).toSorted(([left], [right]) => left.localeCompare(right)).map(([property, value]) => `${formatCssPropertyName(property)}:${compactInlineText(value)}`).join(\";\");\nconst formatPseudoBlock = (selector, pseudo) => {\n\tif (!pseudo) return \"\";\n\tconst declarationBlock = formatDeclarationBlock(pseudo.styles);\n\tif (!declarationBlock) return \"\";\n\treturn `${selector}::${pseudo.kind}{${declarationBlock}}`;\n};\nconst formatElementCssBlock = (snapshot, selector) => {\n\tconst parts = [];\n\tconst declarationBlock = formatDeclarationBlock(snapshot.styles);\n\tconst beforeBlock = formatPseudoBlock(selector, snapshot.pseudo.before);\n\tconst afterBlock = formatPseudoBlock(selector, snapshot.pseudo.after);\n\tif (declarationBlock) parts.push(`${selector}{${declarationBlock}}`);\n\tif (beforeBlock) parts.push(beforeBlock);\n\tif (afterBlock) parts.push(afterBlock);\n\treturn parts.join(\"\");\n};\nconst formatCaptureCss = (capture, selectors) => capture.order.map((elementId) => {\n\tconst snapshot = capture.elements[elementId];\n\tif (!snapshot) return \"\";\n\treturn formatElementCssBlock(snapshot, selectors[elementId] ?? snapshot.selector);\n}).filter(Boolean).join(\"\");\nconst buildTailwindHintEntries = (capture, mapping, refs) => {\n\tif (!mapping) return [];\n\tconst entries = [];\n\tconst rootMapping = mapping.elements[capture.rootElementId];\n\tif (rootMapping?.suggestedClassName || rootMapping?.className) entries.push({\n\t\tkey: \"root\",\n\t\tvalue: rootMapping.suggestedClassName || rootMapping.className\n\t});\n\tconst topSuggestions = capture.order.filter((elementId) => elementId !== capture.rootElementId).map((elementId) => mapping.elements[elementId]).filter((element) => Boolean(element?.suggestedClassName || element?.className)).slice(0, MAX_TAILWIND_SUGGESTIONS);\n\tfor (const suggestion of topSuggestions) entries.push({\n\t\tkey: refs[suggestion.elementId] ?? suggestion.elementId,\n\t\tvalue: suggestion.suggestedClassName || suggestion.className\n\t});\n\treturn entries;\n};\nconst buildOpenQuestionEntries = (mapping, refs) => {\n\tif (!mapping || mapping.reviewQueue.length === 0) return [];\n\treturn mapping.reviewQueue.slice(0, MAX_OPEN_QUESTION_ITEMS).map((item) => ({\n\t\tkey: refs[item.elementId] ?? item.elementId,\n\t\tvalue: item.reasons.join(\"; \")\n\t}));\n};\nconst buildClaudeCapturePrompt = (capture, mapping) => {\n\tconst annotation = annotateCaptureHtml(capture);\n\tconst rootElement = capture.elements[capture.rootElementId];\n\treturn {\n\t\tcssCapture: formatCaptureCss(capture, annotation.selectors),\n\t\thtmlCapture: annotation.html,\n\t\tinstruction: CLAUDE_CAPTURE_INSTRUCTION,\n\t\tmetadata: {\n\t\t\telementCount: capture.summary.elementCount,\n\t\t\tmode: capture.settings.captureMode,\n\t\t\tpseudoCount: capture.summary.pseudoElementCount,\n\t\t\trootRef: annotation.refs[capture.rootElementId] ?? capture.rootElementId,\n\t\t\trootSelector: rootElement?.selector ?? \"Unavailable\",\n\t\t\turl: capture.metadata.url\n\t\t},\n\t\topenQuestions: buildOpenQuestionEntries(mapping, annotation.refs),\n\t\ttailwindHints: buildTailwindHintEntries(capture, mapping, annotation.refs)\n\t};\n};\nconst formatCaptureForClaudeMarkdown = (capture, mapping) => {\n\tconst prompt = buildClaudeCapturePrompt(capture, mapping);\n\tconst sections = [\n\t\t`<style_capture url=\"${escapeXmlAttribute(prompt.metadata.url)}\" mode=\"${prompt.metadata.mode}\" root_ref=\"${prompt.metadata.rootRef}\" root_selector=\"${escapeXmlAttribute(prompt.metadata.rootSelector)}\" elements=\"${prompt.metadata.elementCount}\" pseudos=\"${prompt.metadata.pseudoCount}\">`,\n\t\tprompt.instruction,\n\t\t`<html_capture>${prompt.htmlCapture}</html_capture>`,\n\t\t`<css_capture>${prompt.cssCapture}</css_capture>`\n\t];\n\tif (prompt.tailwindHints.length > 0) sections.push(\"<tailwind_hints>\", ...prompt.tailwindHints.map((entry) => `${entry.key}=${compactInlineText(entry.value)}`), \"</tailwind_hints>\");\n\tif (prompt.openQuestions.length > 0) sections.push(\"<open_questions>\", ...prompt.openQuestions.map((entry) => `${entry.key}:${compactInlineText(entry.value)}`), \"</open_questions>\");\n\tsections.push(\"</style_capture>\");\n\treturn sections.join(\"\\n\").trim();\n};\n//#endregion\n//#region src/messages.ts\nconst MESSAGE_TYPE_CAPTURE_COMPLETED = \"capture/completed\";\nconst MESSAGE_TYPE_CAPTURE_CANCELLED = \"capture/cancelled\";\nconst MESSAGE_TYPE_CAPTURE_FAILED = \"capture/failed\";\nconst createDefaultSettings = () => ({\n\tcaptureMode: \"curated\",\n\tincludeHiddenElements: false,\n\tincludePseudoElements: true\n});\n//#endregion\n//#region src/tailwind-mapper.ts\nconst HIGH_CONFIDENCE = .92;\nconst MEDIUM_CONFIDENCE = .72;\nconst LOW_CONFIDENCE = .45;\nconst PASSIVE_CONFIDENCE = .84;\nconst LENGTH_PATTERN = /^(-?\\d*\\.?\\d+)(px|rem|em|%|vh|vw)?$/;\nconst RGB_PATTERN = /^rgba?\\((\\d+),\\s*(\\d+),\\s*(\\d+)(?:,\\s*([0-9.]+))?\\)$/;\nconst WHITESPACE_SPLIT_PATTERN = /\\s+/;\nconst SPACING_SCALE = new Map([\n\t[0, \"0\"],\n\t[1, \"px\"],\n\t[2, \"0.5\"],\n\t[4, \"1\"],\n\t[6, \"1.5\"],\n\t[8, \"2\"],\n\t[10, \"2.5\"],\n\t[12, \"3\"],\n\t[14, \"3.5\"],\n\t[16, \"4\"],\n\t[20, \"5\"],\n\t[24, \"6\"],\n\t[28, \"7\"],\n\t[32, \"8\"],\n\t[36, \"9\"],\n\t[40, \"10\"],\n\t[44, \"11\"],\n\t[48, \"12\"],\n\t[56, \"14\"],\n\t[64, \"16\"],\n\t[80, \"20\"],\n\t[96, \"24\"],\n\t[112, \"28\"],\n\t[128, \"32\"],\n\t[144, \"36\"],\n\t[160, \"40\"],\n\t[176, \"44\"],\n\t[192, \"48\"],\n\t[224, \"56\"],\n\t[256, \"64\"],\n\t[288, \"72\"],\n\t[320, \"80\"],\n\t[384, \"96\"]\n]);\nconst FONT_SIZE_SCALE = new Map([\n\t[12, \"xs\"],\n\t[14, \"sm\"],\n\t[16, \"base\"],\n\t[18, \"lg\"],\n\t[20, \"xl\"],\n\t[24, \"2xl\"],\n\t[30, \"3xl\"],\n\t[36, \"4xl\"],\n\t[48, \"5xl\"],\n\t[60, \"6xl\"],\n\t[72, \"7xl\"],\n\t[96, \"8xl\"],\n\t[128, \"9xl\"]\n]);\nconst LINE_HEIGHT_SCALE = new Map([\n\t[12, \"3\"],\n\t[16, \"4\"],\n\t[20, \"5\"],\n\t[24, \"6\"],\n\t[28, \"7\"],\n\t[32, \"8\"],\n\t[36, \"9\"],\n\t[40, \"10\"]\n]);\nconst RADIUS_SCALE = new Map([\n\t[0, \"none\"],\n\t[2, \"sm\"],\n\t[4, \"\"],\n\t[6, \"md\"],\n\t[8, \"lg\"],\n\t[12, \"xl\"],\n\t[16, \"2xl\"],\n\t[24, \"3xl\"]\n]);\nconst BORDER_WIDTH_SCALE = new Map([\n\t[1, \"\"],\n\t[2, \"2\"],\n\t[4, \"4\"],\n\t[8, \"8\"]\n]);\nconst Z_INDEX_SCALE = new Set([\n\t0,\n\t10,\n\t20,\n\t30,\n\t40,\n\t50\n]);\nconst OPACITY_SCALE = new Set([\n\t0,\n\t5,\n\t10,\n\t15,\n\t20,\n\t25,\n\t30,\n\t35,\n\t40,\n\t45,\n\t50,\n\t55,\n\t60,\n\t65,\n\t70,\n\t75,\n\t80,\n\t85,\n\t90,\n\t95,\n\t100\n]);\nconst CLEAN_ARBITRARY_SOURCE_PROPERTIES = new Set([\n\t\"background-color\",\n\t\"border-color\",\n\t\"color\",\n\t\"text-decoration-color\"\n]);\nconst REVIEW_ONLY_SOURCE_PROPERTIES = new Set([\n\t\"background-image\",\n\t\"bottom\",\n\t\"font-family\",\n\t\"grid-template-columns\",\n\t\"grid-template-rows\",\n\t\"height\",\n\t\"left\",\n\t\"pseudo-elements\",\n\t\"right\",\n\t\"top\",\n\t\"transform\",\n\t\"transform-origin\",\n\t\"width\"\n]);\nconst DISPLAY_MAP = {\n\tcontents: \"contents\",\n\tflex: \"flex\",\n\t\"flow-root\": \"flow-root\",\n\tgrid: \"grid\",\n\tinline: \"inline\",\n\t\"inline-block\": \"inline-block\",\n\t\"inline-flex\": \"inline-flex\",\n\t\"inline-grid\": \"inline-grid\",\n\tnone: \"hidden\"\n};\nconst POSITION_MAP = {\n\tabsolute: \"absolute\",\n\tfixed: \"fixed\",\n\trelative: \"relative\",\n\tsticky: \"sticky\"\n};\nconst FLEX_DIRECTION_MAP = {\n\tcolumn: \"flex-col\",\n\t\"column-reverse\": \"flex-col-reverse\",\n\t\"row-reverse\": \"flex-row-reverse\"\n};\nconst FLEX_WRAP_MAP = {\n\twrap: \"flex-wrap\",\n\t\"wrap-reverse\": \"flex-wrap-reverse\"\n};\nconst ALIGN_ITEMS_MAP = {\n\tbaseline: \"items-baseline\",\n\tcenter: \"items-center\",\n\tend: \"items-end\",\n\t\"flex-end\": \"items-end\",\n\t\"flex-start\": \"items-start\",\n\tstart: \"items-start\"\n};\nconst JUSTIFY_CONTENT_MAP = {\n\tcenter: \"justify-center\",\n\tend: \"justify-end\",\n\t\"flex-end\": \"justify-end\",\n\t\"flex-start\": \"justify-start\",\n\tleft: \"justify-start\",\n\tright: \"justify-end\",\n\t\"space-around\": \"justify-around\",\n\t\"space-between\": \"justify-between\",\n\t\"space-evenly\": \"justify-evenly\",\n\tstart: \"justify-start\"\n};\nconst GRID_AUTO_FLOW_MAP = {\n\tcolumn: \"grid-flow-col\",\n\t\"column dense\": \"grid-flow-col-dense\",\n\tdense: \"grid-flow-dense\",\n\t\"row dense\": \"grid-flow-row-dense\"\n};\nconst TEXT_ALIGN_MAP = {\n\tcenter: \"text-center\",\n\tend: \"text-end\",\n\tjustify: \"text-justify\",\n\tright: \"text-right\"\n};\nconst TEXT_TRANSFORM_MAP = {\n\tcapitalize: \"capitalize\",\n\tlowercase: \"lowercase\",\n\tuppercase: \"uppercase\"\n};\nconst WHITE_SPACE_MAP = {\n\t\"break-spaces\": \"whitespace-break-spaces\",\n\tnowrap: \"whitespace-nowrap\",\n\tpre: \"whitespace-pre\",\n\t\"pre-line\": \"whitespace-pre-line\",\n\t\"pre-wrap\": \"whitespace-pre-wrap\"\n};\nconst LIST_STYLE_MAP = {\n\tdecimal: \"list-decimal\",\n\tnone: \"list-none\"\n};\nconst OBJECT_FIT_MAP = {\n\tcontain: \"object-contain\",\n\tcover: \"object-cover\",\n\tnone: \"object-none\",\n\t\"scale-down\": \"object-scale-down\"\n};\nconst OVERFLOW_MAP = {\n\tauto: \"auto\",\n\tclip: \"clip\",\n\thidden: \"hidden\",\n\tscroll: \"scroll\",\n\tvisible: \"visible\"\n};\nconst BORDER_STYLE_MAP = {\n\tdashed: \"border-dashed\",\n\tdotted: \"border-dotted\",\n\tdouble: \"border-double\"\n};\nconst FONT_WEIGHT_MAP = {\n\t\"100\": \"thin\",\n\t\"200\": \"extralight\",\n\t\"300\": \"light\",\n\t\"500\": \"medium\",\n\t\"600\": \"semibold\",\n\t\"700\": \"bold\",\n\t\"800\": \"extrabold\",\n\t\"900\": \"black\"\n};\nconst POSITION_KEYWORD_MAP = {\n\t\"0% 0%\": \"top-left\",\n\t\"0% 100%\": \"bottom-left\",\n\t\"0% 50%\": \"left\",\n\t\"100% 0%\": \"top-right\",\n\t\"100% 100%\": \"bottom-right\",\n\t\"100% 50%\": \"right\",\n\t\"50% 0%\": \"top\",\n\t\"50% 100%\": \"bottom\"\n};\nconst DIMENSION_KEYWORD_MAP = {\n\t\"100%\": \"full\",\n\t\"100vh\": \"screen\",\n\t\"100vw\": \"screen\",\n\t\"fit-content\": \"fit\",\n\t\"max-content\": \"max\",\n\t\"min-content\": \"min\"\n};\nconst FONT_FAMILY_MAP = [\n\t{\n\t\tkeyword: \"monospace\",\n\t\tutility: \"font-mono\"\n\t},\n\t{\n\t\tkeyword: \"sans-serif\",\n\t\tutility: \"font-sans\"\n\t},\n\t{\n\t\tkeyword: \"system-ui\",\n\t\tutility: \"font-sans\"\n\t},\n\t{\n\t\tkeyword: \"serif\",\n\t\tutility: \"font-serif\"\n\t}\n];\nconst roundToTwo = (value) => Math.round(value * 100) / 100;\nconst dedupe = (values) => [...new Set((values ?? []).filter(Boolean))];\nconst allEqual = (values) => values.every((value) => value === values[0]);\nconst normalizeWhitespace = (value) => value.replaceAll(/\\s+/g, \" \").trim();\nconst parseLength = (value) => {\n\tconst match = value.trim().match(LENGTH_PATTERN);\n\tif (!match) return null;\n\treturn {\n\t\tunit: match[2] ?? \"px\",\n\t\tvalue: Number(match[1])\n\t};\n};\nconst isZeroLength = (value) => {\n\tconst length = parseLength(value);\n\treturn Boolean(length && Math.abs(length.value) <= .01);\n};\nconst isTransparentColor = (value) => {\n\tconst normalized = value.trim().replaceAll(/\\s+/g, \"\").toLowerCase();\n\treturn normalized === \"rgba(0,0,0,0)\" || normalized === \"transparent\";\n};\nconst normalizeColor = (value) => {\n\tconst trimmed = value.trim().toLowerCase();\n\tif (trimmed === \"transparent\" || isTransparentColor(trimmed)) return \"transparent\";\n\tconst rgbMatch = trimmed.match(RGB_PATTERN);\n\tif (!rgbMatch) return trimmed;\n\tconst { 1: redRaw, 2: greenRaw, 3: blueRaw, 4: alpha } = rgbMatch;\n\tconst red = Number(redRaw).toString(16).padStart(2, \"0\");\n\tconst green = Number(greenRaw).toString(16).padStart(2, \"0\");\n\tconst blue = Number(blueRaw).toString(16).padStart(2, \"0\");\n\tif (!alpha || alpha === \"1\") return `#${red}${green}${blue}`;\n\treturn trimmed.replaceAll(/\\s+/g, \"\");\n};\nconst sanitizeArbitraryValue = (value) => value.trim().replaceAll(/\\s*,\\s*/g, \",\").replaceAll(/\\s*\\/\\s*/g, \"/\").replaceAll(/\\s+/g, \"_\");\nconst createArbitraryUtility = (prefix, value) => `${prefix}-[${sanitizeArbitraryValue(value)}]`;\nconst createArbitraryPropertyClass = (property, value) => `[${property}:${sanitizeArbitraryValue(value)}]`;\nconst lookupMappedUtility = (map, value) => map[value] ?? null;\nconst labelFromConfidence = (confidence) => {\n\tif (confidence >= .85) return \"high\";\n\tif (confidence >= .62) return \"medium\";\n\treturn \"low\";\n};\nconst addMatch = (accumulator, match) => {\n\tconst utility = match.utility.trim();\n\tif (!utility) return;\n\tconst nextMatch = {\n\t\t...match,\n\t\tlabel: labelFromConfidence(match.confidence),\n\t\tnotes: dedupe(match.notes),\n\t\tsourceProperties: dedupe(match.sourceProperties),\n\t\tsourceValues: dedupe(match.sourceValues),\n\t\tutility\n\t};\n\tconst existing = accumulator.matches.find((entry) => entry.utility === utility);\n\tif (existing) {\n\t\texisting.confidence = Math.max(existing.confidence, nextMatch.confidence);\n\t\texisting.label = labelFromConfidence(existing.confidence);\n\t\texisting.notes = dedupe([...existing.notes, ...nextMatch.notes]);\n\t\texisting.sourceProperties = dedupe([...existing.sourceProperties, ...nextMatch.sourceProperties]);\n\t\texisting.sourceValues = dedupe([...existing.sourceValues, ...nextMatch.sourceValues]);\n\t} else accumulator.matches.push(nextMatch);\n\tif (accumulator.classSet.has(utility)) return;\n\taccumulator.classSet.add(utility);\n\taccumulator.classes.push(utility);\n};\nconst addUnsupported = (accumulator, property, value, reason) => {\n\tconst key = `${property}:${value}:${reason}`;\n\tif (accumulator.unsupported.some((entry) => `${entry.property}:${entry.value}:${entry.reason}` === key)) return;\n\taccumulator.unsupported.push({\n\t\tproperty,\n\t\treason,\n\t\tvalue\n\t});\n};\nconst addCandidateMatch = (accumulator, property, value, candidate) => {\n\tif (!(value && candidate)) return;\n\taddMatch(accumulator, {\n\t\tconfidence: candidate.confidence,\n\t\tnotes: candidate.notes ?? [],\n\t\tsourceProperties: property.includes(\"|\") ? property.split(\"|\") : [property],\n\t\tsourceValues: [value],\n\t\tstrategy: candidate.strategy,\n\t\tutility: candidate.utility\n\t});\n};\nconst addMappedUtility = (accumulator, property, value, map, shouldAdd = true) => {\n\tif (!(shouldAdd && value)) return;\n\tconst utility = lookupMappedUtility(map, value);\n\tif (!utility) {\n\t\taddUnsupported(accumulator, property, value, `${property} needs manual review.`);\n\t\treturn;\n\t}\n\taddMatch(accumulator, {\n\t\tconfidence: HIGH_CONFIDENCE,\n\t\tsourceProperties: [property],\n\t\tsourceValues: [value],\n\t\tstrategy: \"semantic\",\n\t\tutility\n\t});\n};\nconst addArbitraryPropertyMatch = (accumulator, property, value, note) => {\n\tif (!value || value === \"none\") return;\n\taddMatch(accumulator, {\n\t\tconfidence: LOW_CONFIDENCE,\n\t\tnotes: [note],\n\t\tsourceProperties: [property],\n\t\tsourceValues: [value],\n\t\tstrategy: \"arbitrary\",\n\t\tutility: createArbitraryPropertyClass(property, value)\n\t});\n};\nconst shouldEmitInheritedValue = (property, value, parentValue) => {\n\tif (!value) return false;\n\tif (!parentValue) return true;\n\tif (property === \"color\") return normalizeColor(value) !== normalizeColor(parentValue);\n\treturn value !== parentValue;\n};\nconst shouldMapDimension = (property, value) => {\n\tif (!value) return false;\n\tif (property.startsWith(\"min-\")) return value !== \"0px\" && value !== \"auto\";\n\tif (property.startsWith(\"max-\")) return value !== \"none\";\n\treturn value !== \"auto\";\n};\nconst buildSpacingCandidate = (prefix, value, allowNegative) => {\n\tif (isZeroLength(value)) return null;\n\tif (value === \"auto\" && prefix.startsWith(\"m\")) return {\n\t\tconfidence: HIGH_CONFIDENCE,\n\t\tstrategy: \"semantic\",\n\t\tutility: `${prefix}-auto`\n\t};\n\tconst length = parseLength(value);\n\tif (!length) return {\n\t\tconfidence: MEDIUM_CONFIDENCE,\n\t\tnotes: [\"Spacing required an arbitrary value.\"],\n\t\tstrategy: \"arbitrary\",\n\t\tutility: createArbitraryUtility(prefix, value)\n\t};\n\tif (length.value < 0 && !allowNegative) return null;\n\tconst token = length.unit === \"px\" ? SPACING_SCALE.get(Math.abs(length.value)) : null;\n\tif (!token) return {\n\t\tconfidence: MEDIUM_CONFIDENCE,\n\t\tnotes: [\"Spacing required an arbitrary value.\"],\n\t\tstrategy: \"arbitrary\",\n\t\tutility: createArbitraryUtility(prefix, value)\n\t};\n\tconst baseUtility = token === \"px\" ? `${prefix}-px` : `${prefix}-${token}`;\n\treturn {\n\t\tconfidence: HIGH_CONFIDENCE,\n\t\tstrategy: \"scale\",\n\t\tutility: length.value < 0 ? `-${baseUtility}` : baseUtility\n\t};\n};\nconst buildDimensionCandidate = (prefix, value, options) => {\n\tif (value === \"auto\") return {\n\t\tconfidence: HIGH_CONFIDENCE,\n\t\tstrategy: \"semantic\",\n\t\tutility: `${prefix}-auto`\n\t};\n\tconst keywordSuffix = DIMENSION_KEYWORD_MAP[value];\n\tif (keywordSuffix) return {\n\t\tconfidence: HIGH_CONFIDENCE,\n\t\tstrategy: \"semantic\",\n\t\tutility: `${prefix}-${keywordSuffix}`\n\t};\n\tconst length = parseLength(value);\n\tconst token = length && length.unit === \"px\" ? SPACING_SCALE.get(Math.abs(length.value)) : null;\n\tif (token) return {\n\t\tconfidence: options.confidence,\n\t\tnotes: options.note ? [options.note] : [],\n\t\tstrategy: \"scale\",\n\t\tutility: token === \"px\" ? `${prefix}-px` : `${prefix}-${token}`\n\t};\n\treturn {\n\t\tconfidence: options.confidence,\n\t\tnotes: options.note ? [options.note] : [\"Length required an arbitrary value.\"],\n\t\tstrategy: \"arbitrary\",\n\t\tutility: createArbitraryUtility(prefix, value)\n\t};\n};\nconst buildScaleCandidate = (prefix, value, scale, note) => {\n\tconst length = parseLength(value);\n\tconst token = length && length.unit === \"px\" ? scale.get(length.value) : null;\n\tif (token) return {\n\t\tconfidence: HIGH_CONFIDENCE,\n\t\tstrategy: \"scale\",\n\t\tutility: `${prefix}-${token}`\n\t};\n\treturn {\n\t\tconfidence: MEDIUM_CONFIDENCE,\n\t\tnotes: [note],\n\t\tstrategy: \"arbitrary\",\n\t\tutility: createArbitraryUtility(prefix, value)\n\t};\n};\nconst buildColorCandidate = (prefix, value) => {\n\tconst normalized = normalizeColor(value);\n\tlet semanticUtility = null;\n\tif (normalized === \"transparent\") semanticUtility = `${prefix}-transparent`;\n\telse if (normalized === \"#000000\") semanticUtility = `${prefix}-black`;\n\telse if (normalized === \"#ffffff\") semanticUtility = `${prefix}-white`;\n\tif (semanticUtility) return {\n\t\tconfidence: HIGH_CONFIDENCE,\n\t\tstrategy: \"semantic\",\n\t\tutility: semanticUtility\n\t};\n\treturn {\n\t\tconfidence: MEDIUM_CONFIDENCE,\n\t\tstrategy: \"arbitrary\",\n\t\tutility: createArbitraryUtility(prefix, normalized)\n\t};\n};\nconst buildFontFamilyCandidate = (value) => {\n\tconst normalized = value.toLowerCase();\n\tfor (const { keyword, utility } of FONT_FAMILY_MAP) if (normalized.includes(keyword)) return {\n\t\tconfidence: MEDIUM_CONFIDENCE,\n\t\tnotes: [\"Mapped to the nearest generic Tailwind family.\"],\n\t\tstrategy: \"heuristic\",\n\t\tutility\n\t};\n\treturn {\n\t\tconfidence: LOW_CONFIDENCE,\n\t\tnotes: [\"Font family required an arbitrary property utility.\"],\n\t\tstrategy: \"arbitrary\",\n\t\tutility: createArbitraryPropertyClass(\"font-family\", value)\n\t};\n};\nconst buildBorderWidthCandidate = (prefix, value) => {\n\tconst length = parseLength(value);\n\tconst token = length && length.unit === \"px\" ? BORDER_WIDTH_SCALE.get(length.value) : null;\n\tif (token !== void 0) return {\n\t\tconfidence: HIGH_CONFIDENCE,\n\t\tstrategy: \"scale\",\n\t\tutility: token ? `${prefix}-${token}` : prefix\n\t};\n\treturn {\n\t\tconfidence: MEDIUM_CONFIDENCE,\n\t\tnotes: [\"Border width required an arbitrary value.\"],\n\t\tstrategy: \"arbitrary\",\n\t\tutility: createArbitraryUtility(prefix, value)\n\t};\n};\nconst buildBorderColorCandidate = (value) => buildColorCandidate(\"border\", value);\nconst buildRadiusCandidate = (prefix, value) => {\n\tconst length = parseLength(value);\n\tif (length && length.value >= 9999) return {\n\t\tconfidence: HIGH_CONFIDENCE,\n\t\tstrategy: \"semantic\",\n\t\tutility: `${prefix}-full`\n\t};\n\tconst token = length && length.unit === \"px\" ? RADIUS_SCALE.get(length.value) : null;\n\tif (token !== void 0) return {\n\t\tconfidence: HIGH_CONFIDENCE,\n\t\tstrategy: \"scale\",\n\t\tutility: token ? `${prefix}-${token}` : prefix\n\t};\n\treturn {\n\t\tconfidence: MEDIUM_CONFIDENCE,\n\t\tnotes: [\"Border radius required an arbitrary value.\"],\n\t\tstrategy: \"arbitrary\",\n\t\tutility: createArbitraryUtility(prefix, value)\n\t};\n};\nconst buildZIndexCandidate = (value) => {\n\tconst numericValue = Number(value);\n\tif (Number.isFinite(numericValue) && Z_INDEX_SCALE.has(numericValue)) return {\n\t\tconfidence: HIGH_CONFIDENCE,\n\t\tstrategy: \"scale\",\n\t\tutility: `z-${numericValue}`\n\t};\n\treturn {\n\t\tconfidence: MEDIUM_CONFIDENCE,\n\t\tnotes: [\"Resolved z-index required an arbitrary value.\"],\n\t\tstrategy: \"arbitrary\",\n\t\tutility: `z-[${sanitizeArbitraryValue(value)}]`\n\t};\n};\nconst addGapMatches = (accumulator, gap, rowGap, columnGap) => {\n\tif (gap && gap !== \"normal\" && !isZeroLength(gap)) {\n\t\taddCandidateMatch(accumulator, \"gap\", gap, buildSpacingCandidate(\"gap\", gap, false));\n\t\treturn;\n\t}\n\taddCandidateMatch(accumulator, \"row-gap\", rowGap, rowGap ? buildSpacingCandidate(\"gap-y\", rowGap, false) : null);\n\taddCandidateMatch(accumulator, \"column-gap\", columnGap, columnGap ? buildSpacingCandidate(\"gap-x\", columnGap, false) : null);\n};\nconst addFlexNumberMatch = (accumulator, property, value, prefix) => {\n\tif (!value) return;\n\tlet utility = createArbitraryUtility(prefix, value);\n\tif (value === \"1\") utility = prefix;\n\telse if (value === \"0\") utility = `${prefix}-0`;\n\tconst confidence = value === \"0\" || value === \"1\" ? HIGH_CONFIDENCE : LOW_CONFIDENCE;\n\tconst strategy = value === \"0\" || value === \"1\" ? \"semantic\" : \"arbitrary\";\n\taddMatch(accumulator, {\n\t\tconfidence,\n\t\tnotes: strategy === \"semantic\" ? [] : [`${property} required an arbitrary value.`],\n\t\tsourceProperties: [property],\n\t\tsourceValues: [value],\n\t\tstrategy,\n\t\tutility\n\t});\n};\nconst addAxisSpacingMatch = (accumulator, prefix, first, second, allowNegative) => {\n\tif (!(first[1] && second[1]) || first[1] !== second[1]) return;\n\taddCandidateMatch(accumulator, `${first[0]}|${second[0]}`, first[1], buildSpacingCandidate(prefix, first[1], allowNegative));\n};\nconst addEdgeSpacingMatch = (accumulator, prefix, entry, allowNegative) => {\n\tif (!entry[1] || isZeroLength(entry[1])) return;\n\taddCandidateMatch(accumulator, entry[0], entry[1], buildSpacingCandidate(prefix, entry[1], allowNegative));\n};\nconst addBoxSpacingMatches = (accumulator, prefix, entries) => {\n\tconst values = entries.map((entry) => entry[1]);\n\tif (values.some((value) => !value)) return;\n\tconst normalizedValues = values;\n\tif (normalizedValues.every((value) => isZeroLength(value))) return;\n\tif (allEqual(normalizedValues)) {\n\t\taddCandidateMatch(accumulator, entries[0][0], normalizedValues[0], buildSpacingCandidate(prefix, normalizedValues[0], prefix === \"m\"));\n\t\treturn;\n\t}\n\taddAxisSpacingMatch(accumulator, `${prefix}y`, entries[0], entries[2], prefix === \"m\");\n\taddAxisSpacingMatch(accumulator, `${prefix}x`, entries[1], entries[3], prefix === \"m\");\n\taddEdgeSpacingMatch(accumulator, `${prefix}t`, entries[0], prefix === \"m\");\n\taddEdgeSpacingMatch(accumulator, `${prefix}r`, entries[1], prefix === \"m\");\n\taddEdgeSpacingMatch(accumulator, `${prefix}b`, entries[2], prefix === \"m\");\n\taddEdgeSpacingMatch(accumulator, `${prefix}l`, entries[3], prefix === \"m\");\n};\nconst addColorMatch = (accumulator, prefix, property, value, shouldAdd) => {\n\tif (!(shouldAdd && value)) return;\n\taddCandidateMatch(accumulator, property, value, buildColorCandidate(prefix, value));\n};\nconst addFontFamilyMatch = (accumulator, value, shouldAdd) => {\n\tif (!(shouldAdd && value)) return;\n\taddCandidateMatch(accumulator, \"font-family\", value, buildFontFamilyCandidate(value));\n};\nconst addScaleMatch = (accumulator, property, value, shouldAdd, scale, prefix, note) => {\n\tif (!(shouldAdd && value)) return;\n\taddCandidateMatch(accumulator, property, value, buildScaleCandidate(prefix, value, scale, note));\n};\nconst addFontWeightMatch = (accumulator, value, shouldAdd) => {\n\tif (!(shouldAdd && value) || value === \"400\") return;\n\tconst utility = lookupMappedUtility(FONT_WEIGHT_MAP, value);\n\taddMatch(accumulator, {\n\t\tconfidence: utility ? HIGH_CONFIDENCE : LOW_CONFIDENCE,\n\t\tnotes: utility ? [] : [\"Font weight required an arbitrary value.\"],\n\t\tsourceProperties: [\"font-weight\"],\n\t\tsourceValues: [value],\n\t\tstrategy: utility ? \"semantic\" : \"arbitrary\",\n\t\tutility: utility ? `font-${utility}` : createArbitraryUtility(\"font\", value)\n\t});\n};\nconst addFontStyleMatch = (accumulator, value, shouldAdd) => {\n\tif (!(shouldAdd && value) || value === \"normal\") return;\n\taddMatch(accumulator, {\n\t\tconfidence: HIGH_CONFIDENCE,\n\t\tsourceProperties: [\"font-style\"],\n\t\tsourceValues: [value],\n\t\tstrategy: \"semantic\",\n\t\tutility: value === \"italic\" ? \"italic\" : \"not-italic\"\n\t});\n};\nconst addTrackingMatch = (accumulator, value, shouldAdd) => {\n\tif (!(shouldAdd && value) || value === \"normal\" || isZeroLength(value)) return;\n\taddMatch(accumulator, {\n\t\tconfidence: LOW_CONFIDENCE,\n\t\tnotes: [\"Letter spacing required an arbitrary value.\"],\n\t\tsourceProperties: [\"letter-spacing\"],\n\t\tsourceValues: [value],\n\t\tstrategy: \"arbitrary\",\n\t\tutility: createArbitraryUtility(\"tracking\", value)\n\t});\n};\nconst addDecorationLineMatches = (accumulator, value) => {\n\tif (!value || value === \"none\") return;\n\tfor (const part of value.split(WHITESPACE_SPLIT_PATTERN)) {\n\t\tconst utility = {\n\t\t\t\"line-through\": \"line-through\",\n\t\t\toverline: \"overline\",\n\t\t\tunderline: \"underline\"\n\t\t}[part] ?? null;\n\t\tif (!utility) continue;\n\t\taddMatch(accumulator, {\n\t\t\tconfidence: HIGH_CONFIDENCE,\n\t\t\tsourceProperties: [\"text-decoration-line\"],\n\t\t\tsourceValues: [value],\n\t\t\tstrategy: \"semantic\",\n\t\t\tutility\n\t\t});\n\t}\n};\nconst addUniformBorderMatch = (element, accumulator) => {\n\tconst widths = [\n\t\telement.styles[\"border-top-width\"],\n\t\telement.styles[\"border-right-width\"],\n\t\telement.styles[\"border-bottom-width\"],\n\t\telement.styles[\"border-left-width\"]\n\t];\n\tconst styles = [\n\t\telement.styles[\"border-top-style\"],\n\t\telement.styles[\"border-right-style\"],\n\t\telement.styles[\"border-bottom-style\"],\n\t\telement.styles[\"border-left-style\"]\n\t];\n\tconst colors = [\n\t\telement.styles[\"border-top-color\"],\n\t\telement.styles[\"border-right-color\"],\n\t\telement.styles[\"border-bottom-color\"],\n\t\telement.styles[\"border-left-color\"]\n\t];\n\tif (widths.some((value) => !value || isZeroLength(value)) || styles.some((value) => !value || value === \"none\")) return;\n\tif (!(allEqual(widths) && allEqual(styles) && allEqual(colors))) {\n\t\taddUnsupported(accumulator, \"border\", \"mixed sides\", \"Per-side border variations need manual review.\");\n\t\treturn;\n\t}\n\tconst width = widths[0];\n\tconst borderStyle = styles[0];\n\tconst color = colors[0];\n\taddCandidateMatch(accumulator, \"border-width\", width, buildBorderWidthCandidate(\"border\", width));\n\tif (borderStyle !== \"solid\") {\n\t\tconst utility = lookupMappedUtility(BORDER_STYLE_MAP, borderStyle);\n\t\tif (utility) addMatch(accumulator, {\n\t\t\tconfidence: HIGH_CONFIDENCE,\n\t\t\tsourceProperties: [\"border-style\"],\n\t\t\tsourceValues: [borderStyle],\n\t\t\tstrategy: \"semantic\",\n\t\t\tutility\n\t\t});\n\t\telse addUnsupported(accumulator, \"border-style\", borderStyle, \"Border style needs manual review.\");\n\t}\n\taddCandidateMatch(accumulator, \"border-color\", color, buildBorderColorCandidate(color));\n};\nconst addRadiusMatches = (element, accumulator) => {\n\tconst values = [\n\t\telement.styles[\"border-top-left-radius\"],\n\t\telement.styles[\"border-top-right-radius\"],\n\t\telement.styles[\"border-bottom-right-radius\"],\n\t\telement.styles[\"border-bottom-left-radius\"]\n\t];\n\tif (values.some((value) => !value) || values.every((value) => isZeroLength(value))) return;\n\tconst radiusValues = values;\n\tif (allEqual(radiusValues)) {\n\t\taddCandidateMatch(accumulator, \"border-radius\", radiusValues[0], buildRadiusCandidate(\"rounded\", radiusValues[0]));\n\t\treturn;\n\t}\n\taddUnsupported(accumulator, \"border-radius\", radiusValues.join(\", \"), \"Mixed corner radii need manual review.\");\n};\nconst addShadowMatch = (accumulator, value) => {\n\tif (!value || value === \"none\") return;\n\taddMatch(accumulator, {\n\t\tconfidence: MEDIUM_CONFIDENCE,\n\t\tsourceProperties: [\"box-shadow\"],\n\t\tsourceValues: [value],\n\t\tstrategy: \"arbitrary\",\n\t\tutility: createArbitraryUtility(\"shadow\", value)\n\t});\n};\nconst addOpacityMatch = (accumulator, value) => {\n\tif (!value || value === \"1\") return;\n\tconst numericValue = Number(value);\n\tif (!Number.isFinite(numericValue)) return;\n\tconst percent = Math.round(numericValue * 100);\n\tconst semantic = OPACITY_SCALE.has(percent);\n\taddMatch(accumulator, {\n\t\tconfidence: semantic ? MEDIUM_CONFIDENCE : LOW_CONFIDENCE,\n\t\tnotes: semantic ? [] : [\"Opacity required an arbitrary value.\"],\n\t\tsourceProperties: [\"opacity\"],\n\t\tsourceValues: [value],\n\t\tstrategy: semantic ? \"scale\" : \"arbitrary\",\n\t\tutility: semantic ? `opacity-${percent}` : createArbitraryUtility(\"opacity\", value)\n\t});\n};\nconst addPositionMatch = (accumulator, prefix, property, value) => {\n\tif (!value || value === \"50% 50%\") return;\n\tconst keyword = POSITION_KEYWORD_MAP[normalizeWhitespace(value)];\n\tconst named = keyword ? `${prefix}-${keyword}` : null;\n\taddMatch(accumulator, {\n\t\tconfidence: named ? HIGH_CONFIDENCE : MEDIUM_CONFIDENCE,\n\t\tnotes: named ? [] : [`${property} required an arbitrary value.`],\n\t\tsourceProperties: [property],\n\t\tsourceValues: [value],\n\t\tstrategy: named ? \"semantic\" : \"arbitrary\",\n\t\tutility: named ?? createArbitraryUtility(prefix, value)\n\t});\n};\nconst addOverflowAxisMatch = (accumulator, property, value) => {\n\tif (value === \"visible\") return;\n\tconst suffix = lookupMappedUtility(OVERFLOW_MAP, value);\n\tif (!suffix) {\n\t\taddUnsupported(accumulator, property, value, \"Overflow needs manual review.\");\n\t\treturn;\n\t}\n\taddMatch(accumulator, {\n\t\tconfidence: HIGH_CONFIDENCE,\n\t\tsourceProperties: [property],\n\t\tsourceValues: [value],\n\t\tstrategy: \"semantic\",\n\t\tutility: `${property}-${suffix}`\n\t});\n};\nconst addObjectPositionMatch = (accumulator, value) => {\n\taddPositionMatch(accumulator, \"object\", \"object-position\", value);\n};\nconst mapDisplay = (context, accumulator) => {\n\tconst { display } = context.element.styles;\n\tif (!display || display === \"block\") return;\n\tconst utility = lookupMappedUtility(DISPLAY_MAP, display);\n\tif (utility) {\n\t\taddMatch(accumulator, {\n\t\t\tconfidence: HIGH_CONFIDENCE,\n\t\t\tsourceProperties: [\"display\"],\n\t\t\tsourceValues: [display],\n\t\t\tstrategy: \"semantic\",\n\t\t\tutility\n\t\t});\n\t\treturn;\n\t}\n\taddUnsupported(accumulator, \"display\", display, \"Display needs manual review.\");\n};\nconst mapPositioning = (context, accumulator) => {\n\tconst { styles } = context.element;\n\tconst { position } = styles;\n\tif (position && position !== \"static\") {\n\t\tconst utility = lookupMappedUtility(POSITION_MAP, position);\n\t\tif (utility) addMatch(accumulator, {\n\t\t\tconfidence: HIGH_CONFIDENCE,\n\t\t\tsourceProperties: [\"position\"],\n\t\t\tsourceValues: [position],\n\t\t\tstrategy: \"semantic\",\n\t\t\tutility\n\t\t});\n\t}\n\tif (!position || position === \"static\") return;\n\tfor (const property of [\n\t\t\"top\",\n\t\t\"right\",\n\t\t\"bottom\",\n\t\t\"left\"\n\t]) {\n\t\tconst value = styles[property];\n\t\tif (!value || value === \"auto\") continue;\n\t\taddCandidateMatch(accumulator, property, value, buildDimensionCandidate(property, value, {\n\t\t\tconfidence: LOW_CONFIDENCE,\n\t\t\tnote: \"Computed insets are layout-derived and need review.\"\n\t\t}));\n\t}\n\tconst zIndex = styles[\"z-index\"];\n\tif (!zIndex || zIndex === \"auto\") return;\n\taddCandidateMatch(accumulator, \"z-index\", zIndex, buildZIndexCandidate(zIndex));\n};\nconst mapFlexLayout = (context, accumulator) => {\n\tconst { styles } = context.element;\n\tconst { display } = styles;\n\tif (display !== \"flex\" && display !== \"inline-flex\") return;\n\taddMappedUtility(accumulator, \"flex-direction\", styles[\"flex-direction\"], FLEX_DIRECTION_MAP);\n\taddMappedUtility(accumulator, \"flex-wrap\", styles[\"flex-wrap\"], FLEX_WRAP_MAP);\n\taddMappedUtility(accumulator, \"justify-content\", styles[\"justify-content\"], JUSTIFY_CONTENT_MAP);\n\taddMappedUtility(accumulator, \"align-items\", styles[\"align-items\"], ALIGN_ITEMS_MAP);\n\taddGapMatches(accumulator, styles.gap, styles[\"row-gap\"], styles[\"column-gap\"]);\n\taddFlexNumberMatch(accumulator, \"flex-grow\", styles[\"flex-grow\"], \"grow\");\n\taddFlexNumberMatch(accumulator, \"flex-shrink\", styles[\"flex-shrink\"], \"shrink\");\n\tconst basis = styles[\"flex-basis\"];\n\tif (!basis || basis === \"auto\") return;\n\taddCandidateMatch(accumulator, \"flex-basis\", basis, buildDimensionCandidate(\"basis\", basis, { confidence: MEDIUM_CONFIDENCE }));\n};\nconst mapGridLayout = (context, accumulator) => {\n\tconst { styles } = context.element;\n\tconst { display } = styles;\n\tif (display !== \"grid\" && display !== \"inline-grid\") return;\n\taddGapMatches(accumulator, styles.gap, styles[\"row-gap\"], styles[\"column-gap\"]);\n\taddMappedUtility(accumulator, \"grid-auto-flow\", styles[\"grid-auto-flow\"], GRID_AUTO_FLOW_MAP);\n\tfor (const [property, prefix] of [\n\t\t[\"grid-column-start\", \"col-start\"],\n\t\t[\"grid-column-end\", \"col-end\"],\n\t\t[\"grid-row-start\", \"row-start\"],\n\t\t[\"grid-row-end\", \"row-end\"]\n\t]) {\n\t\tconst value = styles[property];\n\t\tif (!value || value === \"auto\") continue;\n\t\taddMatch(accumulator, {\n\t\t\tconfidence: MEDIUM_CONFIDENCE,\n\t\t\tsourceProperties: [property],\n\t\t\tsourceValues: [value],\n\t\t\tstrategy: \"arbitrary\",\n\t\t\tutility: createArbitraryUtility(prefix, value)\n\t\t});\n\t}\n\taddArbitraryPropertyMatch(accumulator, \"grid-template-columns\", styles[\"grid-template-columns\"], \"Computed grid tracks lose authored repeat syntax.\");\n\taddArbitraryPropertyMatch(accumulator, \"grid-template-rows\", styles[\"grid-template-rows\"], \"Computed grid tracks lose authored repeat syntax.\");\n};\nconst mapSpacing = (context, accumulator) => {\n\taddBoxSpacingMatches(accumulator, \"p\", [\n\t\t[\"padding-top\", context.element.styles[\"padding-top\"]],\n\t\t[\"padding-right\", context.element.styles[\"padding-right\"]],\n\t\t[\"padding-bottom\", context.element.styles[\"padding-bottom\"]],\n\t\t[\"padding-left\", context.element.styles[\"padding-left\"]]\n\t]);\n\taddBoxSpacingMatches(accumulator, \"m\", [\n\t\t[\"margin-top\", context.element.styles[\"margin-top\"]],\n\t\t[\"margin-right\", context.element.styles[\"margin-right\"]],\n\t\t[\"margin-bottom\", context.element.styles[\"margin-bottom\"]],\n\t\t[\"margin-left\", context.element.styles[\"margin-left\"]]\n\t]);\n};\nconst mapSizing = (context, accumulator) => {\n\tconst { styles } = context.element;\n\tfor (const [property, prefix, confidence] of [\n\t\t[\n\t\t\t\"min-width\",\n\t\t\t\"min-w\",\n\t\t\tMEDIUM_CONFIDENCE\n\t\t],\n\t\t[\n\t\t\t\"min-height\",\n\t\t\t\"min-h\",\n\t\t\tMEDIUM_CONFIDENCE\n\t\t],\n\t\t[\n\t\t\t\"max-width\",\n\t\t\t\"max-w\",\n\t\t\tMEDIUM_CONFIDENCE\n\t\t],\n\t\t[\n\t\t\t\"max-height\",\n\t\t\t\"max-h\",\n\t\t\tMEDIUM_CONFIDENCE\n\t\t],\n\t\t[\n\t\t\t\"width\",\n\t\t\t\"w\",\n\t\t\tLOW_CONFIDENCE\n\t\t],\n\t\t[\n\t\t\t\"height\",\n\t\t\t\"h\",\n\t\t\tLOW_CONFIDENCE\n\t\t]\n\t]) {\n\t\tconst value = styles[property];\n\t\tif (!shouldMapDimension(property, value)) continue;\n\t\taddCandidateMatch(accumulator, property, value, buildDimensionCandidate(prefix, value, {\n\t\t\tconfidence,\n\t\t\tnote: property === \"width\" || property === \"height\" ? \"Computed size values are often layout-dependent.\" : void 0\n\t\t}));\n\t}\n};\nconst mapTypographyBasics = (context, accumulator) => {\n\tconst { element, parent } = context;\n\taddColorMatch(accumulator, \"text\", \"color\", element.styles.color, shouldEmitInheritedValue(\"color\", element.styles.color, parent?.styles.color));\n\taddFontFamilyMatch(accumulator, element.styles[\"font-family\"], shouldEmitInheritedValue(\"font-family\", element.styles[\"font-family\"], parent?.styles[\"font-family\"]));\n\taddScaleMatch(accumulator, \"font-size\", element.styles[\"font-size\"], shouldEmitInheritedValue(\"font-size\", element.styles[\"font-size\"], parent?.styles[\"font-size\"]), FONT_SIZE_SCALE, \"text\", \"Font size required an arbitrary value.\");\n\taddFontWeightMatch(accumulator, element.styles[\"font-weight\"], shouldEmitInheritedValue(\"font-weight\", element.styles[\"font-weight\"], parent?.styles[\"font-weight\"]));\n\taddFontStyleMatch(accumulator, element.styles[\"font-style\"], shouldEmitInheritedValue(\"font-style\", element.styles[\"font-style\"], parent?.styles[\"font-style\"]));\n\taddScaleMatch(accumulator, \"line-height\", element.styles[\"line-height\"], shouldEmitInheritedValue(\"line-height\", element.styles[\"line-height\"], parent?.styles[\"line-height\"]) && element.styles[\"line-height\"] !== \"normal\", LINE_HEIGHT_SCALE, \"leading\", \"Line height required an arbitrary value.\");\n\taddTrackingMatch(accumulator, element.styles[\"letter-spacing\"], shouldEmitInheritedValue(\"letter-spacing\", element.styles[\"letter-spacing\"], parent?.styles[\"letter-spacing\"]));\n};\nconst mapTypographyPresentation = (context, accumulator) => {\n\tconst { element, parent } = context;\n\taddMappedUtility(accumulator, \"text-align\", element.styles[\"text-align\"], TEXT_ALIGN_MAP, shouldEmitInheritedValue(\"text-align\", element.styles[\"text-align\"], parent?.styles[\"text-align\"]) && ![\"left\", \"start\"].includes(element.styles[\"text-align\"] ?? \"\"));\n\taddMappedUtility(accumulator, \"text-transform\", element.styles[\"text-transform\"], TEXT_TRANSFORM_MAP, shouldEmitInheritedValue(\"text-transform\", element.styles[\"text-transform\"], parent?.styles[\"text-transform\"]) && element.styles[\"text-transform\"] !== \"none\");\n\taddMappedUtility(accumulator, \"white-space\", element.styles[\"white-space\"], WHITE_SPACE_MAP, shouldEmitInheritedValue(\"white-space\", element.styles[\"white-space\"], parent?.styles[\"white-space\"]) && element.styles[\"white-space\"] !== \"normal\");\n\taddMappedUtility(accumulator, \"list-style-type\", element.styles[\"list-style-type\"], LIST_STYLE_MAP, shouldEmitInheritedValue(\"list-style-type\", element.styles[\"list-style-type\"], parent?.styles[\"list-style-type\"]) && element.styles[\"list-style-type\"] !== \"disc\");\n\taddDecorationLineMatches(accumulator, element.styles[\"text-decoration-line\"]);\n\taddColorMatch(accumulator, \"decoration\", \"text-decoration-color\", element.styles[\"text-decoration-color\"], element.styles[\"text-decoration-line\"] !== \"none\" && Boolean(element.styles[\"text-decoration-color\"]));\n};\nconst mapBackground = (context, accumulator) => {\n\taddColorMatch(accumulator, \"bg\", \"background-color\", context.element.styles[\"background-color\"], !isTransparentColor(context.element.styles[\"background-color\"] ?? \"\"));\n\taddArbitraryPropertyMatch(accumulator, \"background-image\", context.element.styles[\"background-image\"], \"Background images are emitted as arbitrary properties.\");\n};\nconst mapBorder = (context, accumulator) => {\n\taddUniformBorderMatch(context.element, accumulator);\n\taddRadiusMatches(context.element, accumulator);\n};\nconst mapEffects = (context, accumulator) => {\n\tconst { styles } = context.element;\n\taddShadowMatch(accumulator, styles[\"box-shadow\"]);\n\taddOpacityMatch(accumulator, styles.opacity);\n\taddArbitraryPropertyMatch(accumulator, \"transform\", styles.transform, \"Computed transforms are emitted as raw properties.\");\n\taddPositionMatch(accumulator, \"origin\", \"transform-origin\", styles[\"transform-origin\"]);\n\tif (styles.visibility === \"hidden\") addMatch(accumulator, {\n\t\tconfidence: HIGH_CONFIDENCE,\n\t\tsourceProperties: [\"visibility\"],\n\t\tsourceValues: [\"hidden\"],\n\t\tstrategy: \"semantic\",\n\t\tutility: \"invisible\"\n\t});\n};\nconst mapOverflow = (context, accumulator) => {\n\tconst overflowX = context.element.styles[\"overflow-x\"];\n\tconst overflowY = context.element.styles[\"overflow-y\"];\n\tif (!(overflowX && overflowY)) return;\n\tif (overflowX === overflowY && overflowX !== \"visible\") {\n\t\tconst suffix = lookupMappedUtility(OVERFLOW_MAP, overflowX);\n\t\tif (suffix) addMatch(accumulator, {\n\t\t\tconfidence: HIGH_CONFIDENCE,\n\t\t\tsourceProperties: [\"overflow-x\", \"overflow-y\"],\n\t\t\tsourceValues: [overflowX, overflowY],\n\t\t\tstrategy: \"semantic\",\n\t\t\tutility: `overflow-${suffix}`\n\t\t});\n\t\treturn;\n\t}\n\taddOverflowAxisMatch(accumulator, \"overflow-x\", overflowX);\n\taddOverflowAxisMatch(accumulator, \"overflow-y\", overflowY);\n};\nconst mapObjectLayout = (context, accumulator) => {\n\tconst objectFit = context.element.styles[\"object-fit\"];\n\tif (objectFit && objectFit !== \"fill\") {\n\t\tconst utility = lookupMappedUtility(OBJECT_FIT_MAP, objectFit);\n\t\tif (utility) addMatch(accumulator, {\n\t\t\tconfidence: HIGH_CONFIDENCE,\n\t\t\tsourceProperties: [\"object-fit\"],\n\t\t\tsourceValues: [objectFit],\n\t\t\tstrategy: \"semantic\",\n\t\t\tutility\n\t\t});\n\t}\n\taddObjectPositionMatch(accumulator, context.element.styles[\"object-position\"]);\n};\nconst mapPseudoElements = (context, accumulator) => {\n\tconst pseudoKinds = Object.keys(context.element.pseudo);\n\tif (pseudoKinds.length === 0) return;\n\taddUnsupported(accumulator, \"pseudo-elements\", pseudoKinds.join(\", \"), \"Pseudo-elements were captured, but Tailwind output still needs manual content utilities.\");\n};\nconst isReviewOnlyNote = (note) => {\n\tconst normalizedNote = note.toLowerCase();\n\treturn normalizedNote.includes(\"manual review\") || normalizedNote.includes(\"layout-dependent\") || normalizedNote.includes(\"layout-derived\") || normalizedNote.includes(\"arbitrary property utility\") || normalizedNote.includes(\"required an arbitrary value\") || normalizedNote.includes(\"computed transforms\") || normalizedNote.includes(\"lose authored repeat syntax\");\n};\nconst shouldMoveMatchToReview = (match) => {\n\tif (match.label === \"low\" || match.utility.startsWith(\"[\")) return true;\n\tif (match.sourceProperties.some((property) => REVIEW_ONLY_SOURCE_PROPERTIES.has(property))) return true;\n\tif (match.strategy === \"arbitrary\" && !match.sourceProperties.every((property) => CLEAN_ARBITRARY_SOURCE_PROPERTIES.has(property))) return true;\n\treturn match.notes.some((note) => isReviewOnlyNote(note));\n};\nconst splitMatchesForSuggestion = (matches) => {\n\tconst reviewMatches = [];\n\tconst suggestedMatches = [];\n\tfor (const match of matches) if (shouldMoveMatchToReview(match)) reviewMatches.push(match);\n\telse suggestedMatches.push(match);\n\treturn {\n\t\treviewMatches,\n\t\tsuggestedMatches\n\t};\n};\nconst calculateElementConfidence = (accumulator) => {\n\tif (accumulator.matches.length === 0) return accumulator.unsupported.length > 0 ? LOW_CONFIDENCE : PASSIVE_CONFIDENCE;\n\tconst average = accumulator.matches.reduce((sum, match) => sum + match.confidence, 0) / accumulator.matches.length;\n\tif (accumulator.unsupported.length === 0) return roundToTwo(average);\n\treturn roundToTwo(Math.max(LOW_CONFIDENCE, average - .12));\n};\nconst buildReviewFallbackNote = (match) => {\n\tif (match.label === \"low\") return \"Low-confidence utility needs manual review.\";\n\tif (match.sourceProperties.some((property) => REVIEW_ONLY_SOURCE_PROPERTIES.has(property))) return \"Computed layout or custom CSS was kept out of the clean suggestion.\";\n\tif (match.strategy === \"arbitrary\") return \"Arbitrary utility was kept out of the clean suggestion.\";\n\treturn \"Utility was kept out of the clean suggestion for review.\";\n};\nconst buildReviewItem = (mapping) => {\n\tconst reasons = [...mapping.unsupported.map((entry) => `${entry.property}: ${entry.reason}`), ...mapping.matches.filter((match) => shouldMoveMatchToReview(match)).flatMap((match) => {\n\t\treturn (match.notes.length ? match.notes : [buildReviewFallbackNote(match)]).map((note) => `${match.utility}: ${note}`);\n\t})];\n\tif (reasons.length === 0) return null;\n\treturn {\n\t\tconfidence: mapping.confidence,\n\t\tconfidenceLabel: mapping.confidenceLabel,\n\t\telementId: mapping.elementId,\n\t\treasons: dedupe(reasons).slice(0, 6),\n\t\tselector: mapping.selector,\n\t\tunsupportedCount: mapping.unsupported.length\n\t};\n};\nconst createAccumulator = () => ({\n\tclassSet: /* @__PURE__ */ new Set(),\n\tclasses: [],\n\tmatches: [],\n\tunsupported: []\n});\nconst MAPPING_STEPS = [\n\tmapDisplay,\n\tmapPositioning,\n\tmapFlexLayout,\n\tmapGridLayout,\n\tmapSpacing,\n\tmapSizing,\n\tmapTypographyBasics,\n\tmapTypographyPresentation,\n\tmapBackground,\n\tmapBorder,\n\tmapEffects,\n\tmapOverflow,\n\tmapObjectLayout,\n\tmapPseudoElements\n];\nconst mapElementSnapshot = (context) => {\n\tconst accumulator = createAccumulator();\n\tfor (const step of MAPPING_STEPS) step(context, accumulator);\n\tconst confidence = calculateElementConfidence(accumulator);\n\tconst { reviewMatches, suggestedMatches } = splitMatchesForSuggestion(accumulator.matches);\n\treturn {\n\t\tclassName: accumulator.classes.join(\" \"),\n\t\tconfidence,\n\t\tconfidenceLabel: labelFromConfidence(confidence),\n\t\telementId: context.element.id,\n\t\tmatchCount: accumulator.matches.length,\n\t\tmatches: accumulator.matches,\n\t\treviewClassName: reviewMatches.map((match) => match.utility).join(\" \"),\n\t\treviewMatchCount: reviewMatches.length,\n\t\tselector: context.element.selector,\n\t\tsuggestedClassName: suggestedMatches.map((match) => match.utility).join(\" \"),\n\t\tsuggestedMatchCount: suggestedMatches.length,\n\t\ttagName: context.element.tagName,\n\t\tunsupported: accumulator.unsupported\n\t};\n};\nconst mapCaptureToTailwind = (capture) => {\n\tconst elements = {};\n\tconst reviewQueue = [];\n\tlet cleanUtilityCount = 0;\n\tlet confidenceSum = 0;\n\tlet lowConfidenceElementCount = 0;\n\tlet mappedElementCount = 0;\n\tlet reviewUtilityCount = 0;\n\tlet unsupportedPropertyCount = 0;\n\tlet utilityCount = 0;\n\tfor (const elementId of capture.order) {\n\t\tconst element = capture.elements[elementId];\n\t\tif (!element) continue;\n\t\tconst mapping = mapElementSnapshot({\n\t\t\telement,\n\t\t\tparent: element.parentId === null ? null : capture.elements[element.parentId] ?? null\n\t\t});\n\t\telements[elementId] = mapping;\n\t\tconfidenceSum += mapping.confidence;\n\t\tif (mapping.confidenceLabel === \"low\") lowConfidenceElementCount += 1;\n\t\tif (mapping.matchCount > 0) mappedElementCount += 1;\n\t\tunsupportedPropertyCount += mapping.unsupported.length;\n\t\tcleanUtilityCount += mapping.suggestedMatchCount;\n\t\treviewUtilityCount += mapping.reviewMatchCount;\n\t\tutilityCount += mapping.matches.length;\n\t\tconst reviewItem = buildReviewItem(mapping);\n\t\tif (reviewItem) reviewQueue.push(reviewItem);\n\t}\n\treviewQueue.sort((left, right) => {\n\t\tif (left.confidence !== right.confidence) return left.confidence - right.confidence;\n\t\treturn right.unsupportedCount - left.unsupportedCount;\n\t});\n\tconst elementCount = capture.order.length;\n\treturn {\n\t\telements,\n\t\torder: capture.order,\n\t\treviewQueue,\n\t\tsummary: {\n\t\t\taverageConfidence: elementCount ? roundToTwo(confidenceSum / elementCount) : 0,\n\t\t\tcleanUtilityCount,\n\t\t\telementCount,\n\t\t\tlowConfidenceElementCount,\n\t\t\tmappedElementCount,\n\t\t\treviewCount: reviewQueue.length,\n\t\t\treviewUtilityCount,\n\t\t\tunsupportedPropertyCount,\n\t\t\tutilityCount\n\t\t}\n\t};\n};\n//#endregion\nexport { MESSAGE_TYPE_CAPTURE_CANCELLED, MESSAGE_TYPE_CAPTURE_COMPLETED, MESSAGE_TYPE_CAPTURE_FAILED, buildClaudeCapturePrompt, createDefaultSettings, formatCaptureForClaudeMarkdown, mapCaptureToTailwind };\n\n//# sourceMappingURL=index.js.map","import type { CaptureResult, CaptureSettings } from \"@style-capture/core\";\nimport type { Page } from \"playwright\";\n\n/**\n * Runs the capture pipeline inside a Playwright page context.\n * This mirrors the extension's `buildCapture` from `run-picker.ts`,\n * adapted to run via `page.evaluate()`.\n */\nexport const captureElement = async (\n page: Page,\n selector: string,\n settings: CaptureSettings\n): Promise<CaptureResult> => {\n const result = await page.evaluate(\n ({ selector: sel, settings: opts }) => {\n const OMITTED_ELEMENT_NAMES = new Set([\n \"base\",\n \"iframe\",\n \"link\",\n \"meta\",\n \"noscript\",\n \"object\",\n \"script\",\n \"style\",\n \"template\",\n ]);\n const OMITTED_ATTRIBUTE_NAMES = new Set([\"checked\", \"selected\", \"value\"]);\n const OMITTED_URL_ATTRIBUTE_NAMES = new Set([\n \"action\",\n \"formaction\",\n \"href\",\n \"poster\",\n \"src\",\n \"srcdoc\",\n \"srcset\",\n \"xlink:href\",\n ]);\n const BASELINE_ATTRIBUTE_NAMES = [\n \"checked\",\n \"cols\",\n \"disabled\",\n \"multiple\",\n \"open\",\n \"rows\",\n \"selected\",\n \"size\",\n \"type\",\n \"wrap\",\n ] as const;\n const INHERITED_PROPERTIES = new Set([\n \"color\",\n \"font-family\",\n \"font-size\",\n \"font-style\",\n \"font-weight\",\n \"letter-spacing\",\n \"line-height\",\n \"list-style-type\",\n \"text-align\",\n \"text-decoration-color\",\n \"text-decoration-line\",\n \"text-transform\",\n \"visibility\",\n \"white-space\",\n ]);\n const CURATED_PROPERTIES = [\n \"align-items\",\n \"background-color\",\n \"background-image\",\n \"border-bottom-color\",\n \"border-bottom-left-radius\",\n \"border-bottom-right-radius\",\n \"border-bottom-style\",\n \"border-bottom-width\",\n \"border-left-color\",\n \"border-left-style\",\n \"border-left-width\",\n \"border-right-color\",\n \"border-right-style\",\n \"border-right-width\",\n \"border-top-color\",\n \"border-top-left-radius\",\n \"border-top-right-radius\",\n \"border-top-style\",\n \"border-top-width\",\n \"bottom\",\n \"box-shadow\",\n \"color\",\n \"column-gap\",\n \"display\",\n \"flex-basis\",\n \"flex-direction\",\n \"flex-grow\",\n \"flex-shrink\",\n \"flex-wrap\",\n \"font-family\",\n \"font-size\",\n \"font-style\",\n \"font-weight\",\n \"gap\",\n \"grid-auto-flow\",\n \"grid-column-end\",\n \"grid-column-start\",\n \"grid-row-end\",\n \"grid-row-start\",\n \"grid-template-columns\",\n \"grid-template-rows\",\n \"height\",\n \"justify-content\",\n \"left\",\n \"letter-spacing\",\n \"line-height\",\n \"list-style-type\",\n \"margin-bottom\",\n \"margin-left\",\n \"margin-right\",\n \"margin-top\",\n \"max-height\",\n \"max-width\",\n \"min-height\",\n \"min-width\",\n \"object-fit\",\n \"object-position\",\n \"opacity\",\n \"overflow-x\",\n \"overflow-y\",\n \"padding-bottom\",\n \"padding-left\",\n \"padding-right\",\n \"padding-top\",\n \"position\",\n \"right\",\n \"row-gap\",\n \"text-align\",\n \"text-decoration-color\",\n \"text-decoration-line\",\n \"text-transform\",\n \"top\",\n \"transform\",\n \"transform-origin\",\n \"visibility\",\n \"white-space\",\n \"width\",\n \"z-index\",\n ];\n\n const rootEl = document.querySelector(sel);\n if (!rootEl) {\n throw new Error(`No element found for selector: ${sel}`);\n }\n\n const elements: Record<\n string,\n {\n attributes: Record<string, string>;\n boundingBox: {\n bottom: number;\n height: number;\n left: number;\n right: number;\n top: number;\n width: number;\n x: number;\n y: number;\n };\n children: string[];\n classList: string[];\n id: string;\n parentId: string | null;\n pseudo: Record<\n string,\n {\n kind: \"before\" | \"after\";\n styles: Record<string, string>;\n }\n >;\n selector: string;\n styles: Record<string, string>;\n tagName: string;\n }\n > = {};\n const order: string[] = [];\n const idByElement = new WeakMap<Element, string>();\n let pseudoElementCount = 0;\n let nextId = 0;\n\n // Default style cache using hidden iframe\n const defaultStyleFrame = document.createElement(\"iframe\");\n defaultStyleFrame.setAttribute(\"aria-hidden\", \"true\");\n defaultStyleFrame.tabIndex = -1;\n defaultStyleFrame.style.cssText =\n \"position:fixed;top:-9999px;left:-9999px;width:0;height:0;border:0;opacity:0;pointer-events:none\";\n document.documentElement.append(defaultStyleFrame);\n const defaultDoc = defaultStyleFrame.contentDocument;\n if (defaultDoc) {\n defaultDoc.open();\n defaultDoc.write(\"<!doctype html><html><body></body></html>\");\n defaultDoc.close();\n }\n const defaultStyleCache = new Map<string, Record<string, string>>();\n\n const getDefaultStyles = (element: Element): Record<string, string> => {\n const parts = [element.tagName.toLowerCase()];\n for (const attr of BASELINE_ATTRIBUTE_NAMES) {\n if (element.hasAttribute(attr)) {\n parts.push(`${attr}=${element.getAttribute(attr) ?? \"\"}`);\n }\n }\n const key = parts.join(\"|\");\n\n const cached = defaultStyleCache.get(key);\n if (cached) {\n return cached;\n }\n\n const frameDoc = defaultStyleFrame.contentDocument;\n const frameWin = defaultStyleFrame.contentWindow;\n if (!(frameDoc && frameWin)) {\n return {};\n }\n\n const baseline = frameDoc.createElement(element.tagName.toLowerCase());\n for (const attr of BASELINE_ATTRIBUTE_NAMES) {\n if (element.hasAttribute(attr)) {\n baseline.setAttribute(attr, element.getAttribute(attr) ?? \"\");\n }\n }\n frameDoc.body.append(baseline);\n const computed = frameWin.getComputedStyle(baseline);\n const defaults: Record<string, string> = {};\n for (const prop of CURATED_PROPERTIES) {\n const val = computed.getPropertyValue(prop).trim();\n if (val) {\n defaults[prop] = val;\n }\n }\n baseline.remove();\n defaultStyleCache.set(key, defaults);\n return defaults;\n };\n\n const snapshotStyles = (\n element: Element,\n styles: CSSStyleDeclaration,\n includeAll: boolean,\n parentStyles: Record<string, string> | null\n ): Record<string, string> => {\n const output: Record<string, string> = {};\n const properties = includeAll ? [...styles] : [...CURATED_PROPERTIES];\n const defaultStyles = includeAll ? null : getDefaultStyles(element);\n\n for (const property of properties) {\n const value = styles.getPropertyValue(property);\n if (!value) {\n continue;\n }\n const trimmed = value.trim();\n if (!trimmed) {\n continue;\n }\n if (defaultStyles?.[property] === trimmed) {\n continue;\n }\n if (\n parentStyles &&\n INHERITED_PROPERTIES.has(property) &&\n parentStyles[property] === trimmed\n ) {\n continue;\n }\n output[property] = trimmed;\n }\n return output;\n };\n\n const snapshotPseudo = (\n element: Element,\n kind: \"before\" | \"after\",\n includeAll: boolean\n ): {\n kind: \"before\" | \"after\";\n styles: Record<string, string>;\n } | null => {\n const styles = window.getComputedStyle(element, `::${kind}`);\n const content = styles.getPropertyValue(\"content\").trim();\n const display = styles.getPropertyValue(\"display\").trim();\n const w = styles.getPropertyValue(\"width\").trim();\n const h = styles.getPropertyValue(\"height\").trim();\n const bg = styles.getPropertyValue(\"background-color\").trim();\n const bw = styles.getPropertyValue(\"border-top-width\").trim();\n\n if (\n content === \"none\" &&\n display === \"inline\" &&\n w === \"auto\" &&\n h === \"auto\" &&\n bg === \"rgba(0, 0, 0, 0)\" &&\n bw === \"0px\"\n ) {\n return null;\n }\n\n return {\n kind,\n styles: snapshotStyles(element, styles, includeAll, null),\n };\n };\n\n // eslint-disable-next-line unicorn/consistent-function-scoping -- must stay inside page.evaluate\n const buildSelector = (element: Element): string => {\n if (element.id) {\n return `#${CSS.escape(element.id)}`;\n }\n const segments: string[] = [];\n let current: Element | null = element;\n while (\n current &&\n current.nodeType === Node.ELEMENT_NODE &&\n segments.length < 4\n ) {\n const tag = current.tagName.toLowerCase();\n const classes = [...current.classList]\n .slice(0, 2)\n .map((c) => `.${CSS.escape(c)}`)\n .join(\"\");\n const idx = current.parentElement\n ? [...current.parentElement.children].indexOf(current) + 1\n : 1;\n segments.unshift(`${tag}${classes}:nth-child(${idx})`);\n current = current.parentElement;\n }\n return segments.join(\" > \");\n };\n\n const shouldOmitAttr = (name: string): boolean => {\n const n = name.toLowerCase();\n return (\n n.startsWith(\"on\") ||\n n === \"nonce\" ||\n OMITTED_ATTRIBUTE_NAMES.has(n) ||\n OMITTED_URL_ATTRIBUTE_NAMES.has(n)\n );\n };\n\n const getSafeAttributes = (el: Element): Record<string, string> => {\n const safe: Record<string, string> = {};\n for (const attr of el.attributes) {\n if (!shouldOmitAttr(attr.name)) {\n safe[attr.name] = attr.value;\n }\n }\n return safe;\n };\n\n // eslint-disable-next-line unicorn/consistent-function-scoping -- must stay inside page.evaluate\n const getBoundingBox = (rect: DOMRect) => ({\n bottom: rect.bottom,\n height: rect.height,\n left: rect.left,\n right: rect.right,\n top: rect.top,\n width: rect.width,\n x: rect.x,\n y: rect.y,\n });\n\n // eslint-disable-next-line unicorn/consistent-function-scoping -- must stay inside page.evaluate\n const isHidden = (el: Element): boolean => {\n const s = window.getComputedStyle(el);\n return s.display === \"none\" || s.visibility === \"hidden\";\n };\n\n const pruneExcludedDescendants = (\n sourceRoot: Element,\n cloneRoot: Element,\n includeHiddenElements: boolean\n ): void => {\n const sourceElements = [...sourceRoot.querySelectorAll(\"*\")];\n const cloneElements = [...cloneRoot.querySelectorAll(\"*\")];\n\n for (let index = cloneElements.length - 1; index >= 0; index -= 1) {\n const sourceElement = sourceElements[index];\n const cloneElement = cloneElements[index];\n\n if (!(sourceElement && cloneElement)) {\n continue;\n }\n\n if (\n OMITTED_ELEMENT_NAMES.has(sourceElement.tagName.toLowerCase()) ||\n (!includeHiddenElements && isHidden(sourceElement))\n ) {\n cloneElement.replaceWith(\n cloneElement.ownerDocument.createComment(\n cloneElement.tagName.toLowerCase()\n )\n );\n }\n }\n };\n\n const sanitizeOuterHtml = (\n el: Element,\n includeHiddenElements: boolean\n ): string => {\n const clone = el.cloneNode(true);\n if (!(clone instanceof Element)) {\n return \"\";\n }\n\n if (\n OMITTED_ELEMENT_NAMES.has(el.tagName.toLowerCase()) ||\n (!includeHiddenElements && isHidden(el))\n ) {\n return `<!--${el.tagName.toLowerCase()}-->`;\n }\n\n pruneExcludedDescendants(el, clone, includeHiddenElements);\n\n // Sanitize attributes — snapshot attributes since we modify during iteration\n const sanitize = (target: Element) => {\n // eslint-disable-next-line unicorn/no-useless-spread -- attributes is a live NamedNodeMap modified during iteration\n for (const attr of [...target.attributes]) {\n if (shouldOmitAttr(attr.name)) {\n target.removeAttribute(attr.name);\n }\n }\n if (target instanceof HTMLTextAreaElement) {\n target.textContent = \"\";\n }\n };\n sanitize(clone);\n for (const child of clone.querySelectorAll(\"*\")) {\n sanitize(child);\n }\n\n return clone.outerHTML;\n };\n\n const captureEl = (element: Element, parentId: string | null): string => {\n const id = `node-${nextId}`;\n nextId += 1;\n idByElement.set(element, id);\n order.push(id);\n\n const snapshot = {\n attributes: getSafeAttributes(element),\n boundingBox: getBoundingBox(element.getBoundingClientRect()),\n children: [] as string[],\n classList: [...element.classList],\n id,\n parentId,\n pseudo: {} as Record<\n string,\n {\n kind: \"before\" | \"after\";\n styles: Record<string, string>;\n }\n >,\n selector: buildSelector(element),\n styles: snapshotStyles(\n element,\n window.getComputedStyle(element),\n opts.captureMode === \"full\",\n parentId ? (elements[parentId]?.styles ?? null) : null\n ),\n tagName: element.tagName.toLowerCase(),\n };\n\n if (opts.includePseudoElements) {\n const before = snapshotPseudo(\n element,\n \"before\",\n opts.captureMode === \"full\"\n );\n const after = snapshotPseudo(\n element,\n \"after\",\n opts.captureMode === \"full\"\n );\n if (before) {\n snapshot.pseudo.before = before;\n pseudoElementCount += 1;\n }\n if (after) {\n snapshot.pseudo.after = after;\n pseudoElementCount += 1;\n }\n }\n\n elements[id] = snapshot;\n if (parentId && elements[parentId]) {\n elements[parentId].children.push(id);\n }\n return id;\n };\n\n const rootElementId = captureEl(rootEl, null);\n\n const walker = document.createTreeWalker(\n rootEl,\n NodeFilter.SHOW_ELEMENT,\n {\n acceptNode(node) {\n if (\n node instanceof Element &&\n node !== rootEl &&\n !opts.includeHiddenElements &&\n isHidden(node)\n ) {\n return NodeFilter.FILTER_REJECT;\n }\n return NodeFilter.FILTER_ACCEPT;\n },\n }\n );\n\n while (walker.nextNode()) {\n const current = walker.currentNode;\n if (!(current instanceof Element)) {\n continue;\n }\n const parentId = current.parentElement\n ? (idByElement.get(current.parentElement) ?? null)\n : null;\n captureEl(current, parentId);\n }\n\n // Cleanup\n defaultStyleFrame.remove();\n\n return {\n elements,\n metadata: {\n title: document.title,\n url: window.location.href,\n },\n order,\n rootElementId,\n rootOuterHtml: sanitizeOuterHtml(rootEl, opts.includeHiddenElements),\n settings: opts,\n summary: {\n elementCount: order.length,\n pseudoElementCount,\n },\n version: 1 as const,\n };\n },\n { selector, settings }\n );\n\n return result as CaptureResult;\n};\n","import {\n cancel,\n group,\n intro,\n log,\n outro,\n select,\n spinner,\n text,\n} from \"@clack/prompts\";\nimport type { CaptureSettings } from \"@style-capture/core\";\nimport {\n createDefaultSettings,\n formatCaptureForClaudeMarkdown,\n mapCaptureToTailwind,\n} from \"@style-capture/core\";\nimport { chromium } from \"playwright\";\n\nimport { captureElement } from \"./capture.ts\";\n\nexport const interactive = async (): Promise<void> => {\n intro(\"style-capture\");\n\n const inputs = await group(\n {\n mode: () =>\n select({\n message: \"Capture mode\",\n options: [\n {\n hint: \"Common visual properties only\",\n label: \"Curated\",\n value: \"curated\" as const,\n },\n {\n hint: \"All computed styles\",\n label: \"Full\",\n value: \"full\" as const,\n },\n ],\n }),\n output: () =>\n select({\n message: \"Output\",\n options: [\n { label: \"Clipboard\", value: \"clipboard\" as const },\n { label: \"Stdout\", value: \"stdout\" as const },\n ],\n }),\n selector: () =>\n text({\n message: \"CSS selector for target element\",\n placeholder: \"main, .hero, #app\",\n validate: (val) => {\n if (!val?.trim()) {\n return \"Selector is required\";\n }\n },\n }),\n url: () =>\n text({\n message: \"URL to capture\",\n placeholder: \"https://example.com\",\n validate: (val) => {\n if (!val) {\n return \"URL is required\";\n }\n if (!URL.canParse(val)) {\n return \"Please enter a valid URL\";\n }\n },\n }),\n },\n {\n onCancel: () => {\n cancel(\"Cancelled.\");\n process.exit(0);\n },\n }\n );\n\n const settings: CaptureSettings = {\n ...createDefaultSettings(),\n captureMode: inputs.mode,\n };\n\n const spin = spinner();\n spin.start(\"Launching browser\");\n\n const browser = await chromium.launch({ headless: true });\n\n try {\n const page = await browser.newPage();\n\n spin.message(`Loading ${inputs.url}`);\n await page.goto(inputs.url, { waitUntil: \"networkidle\" });\n\n spin.message(\"Verifying selector\");\n const found = await page.locator(inputs.selector).count();\n if (found === 0) {\n spin.stop(\"No element found\");\n log.error(\n `Selector \"${inputs.selector}\" matched 0 elements on ${inputs.url}`\n );\n await browser.close();\n process.exit(1);\n }\n\n if (found > 1) {\n log.warn(`Selector matched ${found} elements — capturing the first one`);\n }\n\n spin.message(`Capturing ${found} element(s)`);\n const capture = await captureElement(page, inputs.selector, settings);\n\n spin.message(\"Mapping to Tailwind\");\n const mapping = mapCaptureToTailwind(capture);\n\n spin.message(\"Formatting\");\n const markdown = formatCaptureForClaudeMarkdown(capture, mapping);\n\n spin.stop(\"Capture complete\");\n\n log.info(\n `${capture.summary.elementCount} elements, ${capture.summary.pseudoElementCount} pseudo-elements`\n );\n log.info(\n `Tailwind: ${mapping.summary.utilityCount} utilities mapped (${mapping.summary.averageConfidence.toFixed(0)}% avg confidence)`\n );\n\n if (inputs.output === \"clipboard\") {\n const { default: clipboardy } = await import(\"clipboardy\");\n await clipboardy.write(markdown);\n log.success(\"Copied to clipboard\");\n } else {\n console.log(`\\n${markdown}`);\n }\n } finally {\n await browser.close();\n }\n\n outro(\"Done\");\n};\n","import type { CaptureSettings } from \"@style-capture/core\";\nimport {\n createDefaultSettings,\n formatCaptureForClaudeMarkdown,\n mapCaptureToTailwind,\n} from \"@style-capture/core\";\nimport { chromium } from \"playwright\";\n\nimport { captureElement } from \"./capture.ts\";\n\nexport interface RunOptions {\n mode?: \"curated\" | \"full\";\n selector: string;\n url: string;\n}\n\n/**\n * Non-interactive capture — designed for agent/skill usage.\n * Returns the formatted style_capture prompt as a string.\n */\nexport const run = async (options: RunOptions): Promise<string> => {\n const settings: CaptureSettings = {\n ...createDefaultSettings(),\n captureMode: options.mode ?? \"curated\",\n };\n\n const browser = await chromium.launch({ headless: true });\n try {\n const page = await browser.newPage();\n await page.goto(options.url, { waitUntil: \"networkidle\" });\n\n const count = await page.locator(options.selector).count();\n if (count === 0) {\n throw new Error(\n `Selector \"${options.selector}\" matched 0 elements on ${options.url}`\n );\n }\n\n if (count > 1) {\n process.stderr.write(\n `Warning: selector matched ${count} elements, capturing the first\\n`\n );\n }\n\n const capture = await captureElement(page, options.selector, settings);\n const mapping = mapCaptureToTailwind(capture);\n const output = formatCaptureForClaudeMarkdown(capture, mapping);\n\n process.stderr.write(\n `Captured ${capture.summary.elementCount} elements, ${mapping.summary.utilityCount} Tailwind utilities mapped\\n`\n );\n\n return output;\n } finally {\n await browser.close();\n }\n};\n","import { Command } from \"commander\";\n\nimport { interactive } from \"./interactive.ts\";\nimport { run } from \"./run.ts\";\n\nconst program = new Command();\n\nprogram\n .name(\"style-capture\")\n .description(\n \"Capture computed CSS and HTML from web pages, map to Tailwind utilities\"\n )\n .version(\"0.0.1\")\n .argument(\"[url]\", \"URL to capture\")\n .argument(\"[selector]\", \"CSS selector for target element\")\n .option(\"-m, --mode <mode>\", \"capture mode: curated or full\", \"curated\")\n .action(\n async (url?: string, selector?: string, options?: { mode: string }) => {\n if (url && selector) {\n const result = await run({\n mode: (options?.mode as \"curated\" | \"full\") ?? \"curated\",\n selector,\n url,\n });\n process.stdout.write(result);\n } else {\n await interactive();\n }\n }\n );\n\nprogram.parse();\n"],"mappings":";;;;;AACA,MAAM,yBAAyB;AAC/B,MAAM,2BAA2B;AACjC,MAAM,0BAA0B;AAChC,MAAM,6BAA6B;AACnC,MAAM,qBAAqB,UAAU,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YAAY;AAChD,uBAAqB,QAAQ;AAC7B,wBAAsB,QAAQ;AAC9B,kBAAgB,QAAQ,QAAQ;EAChC,MAAM,aAAa,gBAAgB,QAAQ;AAC3C,MAAI,WAAY,aAAY,KAAK,WAAW;;AAE7C,aAAY,MAAM,MAAM,UAAU;AACjC,MAAI,KAAK,eAAe,MAAM,WAAY,QAAO,KAAK,aAAa,MAAM;AACzE,SAAO,MAAM,mBAAmB,KAAK;GACpC;CACF,MAAM,eAAe,QAAQ,MAAM;AACnC,QAAO;EACN;EACA,OAAO,QAAQ;EACf;EACA,SAAS;GACR,mBAAmB,eAAe,WAAW,gBAAgB,aAAa,GAAG;GAC7E;GACA;GACA;GACA;GACA,aAAa,YAAY;GACzB;GACA;GACA;GACA;EACD;;;;;;;;;AC9wCF,MAAa,iBAAiB,OAC5B,MACA,UACA,aAC2B;AA2hB3B,QA1hBe,MAAM,KAAK,UACvB,EAAE,UAAU,KAAK,UAAU,WAAW;EACrC,MAAM,wBAAwB,IAAI,IAAI;GACpC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACD,CAAC;EACF,MAAM,0BAA0B,IAAI,IAAI;GAAC;GAAW;GAAY;GAAQ,CAAC;EACzE,MAAM,8BAA8B,IAAI,IAAI;GAC1C;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACD,CAAC;EACF,MAAM,2BAA2B;GAC/B;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACD;EACD,MAAM,uBAAuB,IAAI,IAAI;GACnC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACD,CAAC;EACF,MAAM,qBAAqB;GACzB;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA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A6B,MAAM,kCACpC;EAGH,MAAM,UAAU,MAAM,eAAe,MAAM,QAAQ,UAAU,SAAS;EACtE,MAAM,UAAU,qBAAqB,QAAQ;EAC7C,MAAM,SAAS,+BAA+B,SAAS,QAAQ;AAE/D,UAAQ,OAAO,MACb,YAAY,QAAQ,QAAQ,aAAa,aAAa,QAAQ,QAAQ,aAAa,8BACpF;AAED,SAAO;WACC;AACR,QAAM,QAAQ,OAAO;;;;;ACjDzB,MAAM,UAAU,IAAI,SAAS;AAE7B,QACG,KAAK,gBAAgB,CACrB,YACC,0EACD,CACA,QAAQ,QAAQ,CAChB,SAAS,SAAS,iBAAiB,CACnC,SAAS,cAAc,kCAAkC,CACzD,OAAO,qBAAqB,iCAAiC,UAAU,CACvE,OACC,OAAO,KAAc,UAAmB,YAA+B;AACrE,KAAI,OAAO,UAAU;EACnB,MAAM,SAAS,MAAM,IAAI;GACvB,MAAO,SAAS,QAA+B;GAC/C;GACA;GACD,CAAC;AACF,UAAQ,OAAO,MAAM,OAAO;OAE5B,OAAM,aAAa;EAGxB;AAEH,QAAQ,OAAO"}
package/package.json CHANGED
@@ -1,33 +1,64 @@
1
1
  {
2
2
  "name": "style-capture",
3
- "version": "0.0.1",
4
- "private": false,
3
+ "version": "0.0.3",
4
+ "description": "Capture computed CSS and HTML from web pages, map to Tailwind utilities",
5
+ "keywords": [
6
+ "ai",
7
+ "claude",
8
+ "css",
9
+ "html",
10
+ "style-capture",
11
+ "tailwind"
12
+ ],
13
+ "homepage": "https://github.com/mblode/style-capture/tree/main/apps/cli",
14
+ "bugs": {
15
+ "url": "https://github.com/mblode/style-capture/issues"
16
+ },
17
+ "license": "MIT",
18
+ "repository": {
19
+ "type": "git",
20
+ "url": "git+https://github.com/mblode/style-capture.git",
21
+ "directory": "apps/cli"
22
+ },
5
23
  "bin": {
6
- "style-capture": "./dist/index.js"
24
+ "style-capture": "./dist/cli.js"
7
25
  },
26
+ "files": [
27
+ "dist"
28
+ ],
8
29
  "type": "module",
9
30
  "scripts": {
10
- "dev": "tsx src/index.ts",
11
- "build": "tsc -b",
12
- "check-types": "tsc -b --pretty false",
13
- "lint": "biome check .",
14
- "lint:fix": "biome check --write .",
15
- "test": "echo 'No tests yet'"
31
+ "build": "tsdown",
32
+ "dev": "tsdown --watch",
33
+ "start": "node dist/cli.js",
34
+ "check-types": "tsc --noEmit",
35
+ "test": "vitest run --passWithNoTests",
36
+ "lint": "oxlint .",
37
+ "lint:fix": "oxlint --fix .",
38
+ "format": "oxfmt --write .",
39
+ "format:check": "oxfmt --check .",
40
+ "check": "npm run lint && npm run format:check && npm run check-types && npm run test",
41
+ "fix": "npm run format && npm run lint:fix"
16
42
  },
17
43
  "dependencies": {
18
44
  "@clack/prompts": "^1.1.0",
19
- "@style-capture/core": "*",
20
45
  "clipboardy": "^4.0.0",
46
+ "commander": "^14.0.3",
21
47
  "playwright": "^1.52.0"
22
48
  },
23
49
  "devDependencies": {
24
50
  "@biomejs/biome": "^2.4.5",
51
+ "@style-capture/core": "*",
25
52
  "@types/node": "^24.12.0",
26
53
  "lefthook": "^2.1.4",
27
54
  "oxfmt": "^0.40.0",
28
55
  "oxlint": "^1.55.0",
29
- "tsx": "^4.20.6",
56
+ "tsdown": "^0.12.0",
30
57
  "typescript": "~5.9.3",
31
- "ultracite": "^7.3.0"
58
+ "ultracite": "^7.3.0",
59
+ "vitest": "^4.0.0"
60
+ },
61
+ "engines": {
62
+ "node": ">=22"
32
63
  }
33
64
  }