import type { Rule } from '@unocss/core' ; import { colorResolver , handler as h } from '../utils' ; export const svgUtilities = [ [ /^fill-(.+)$/ , colorResolver ( 'fill' , 'fill' ) ] , [ /^fill-op(?:acity)?-?(.+)$/ , ( [ , opacity ] ) => ( { '--un-fill-opacity' : h . bracket . percent ( opacity ) } ) ] , [ 'fill-none' , { fill : 'none' } ] , [ /^stroke-(?:width-|size-)?(.+)$/ , ( [ , s ] ) => ( { 'stroke-width' : h . bracket . fraction . px . number ( s ) } ) ] , [ /^stroke-dash-(.+)$/ , ( [ , s ] ) => ( { 'stroke-dasharray' : h . bracket . cssvar . number ( s ) } ) ] , [ /^stroke-offset-(.+)$/ , ( [ , s ] ) => ( { 'stroke-dashoffset' : h . bracket . cssvar . px . numberWithUnit ( s ) } ) ] , [ /^stroke-(.+)$/ , colorResolver ( 'stroke' , 'stroke' ) ] , [ /^stroke-op(?:acity)?-?(.+)$/ , ( [ , opacity ] ) => ( { '--un-stroke-opacity' : h . bracket . percent ( opacity ) } ) ] , [ 'stroke-cap-square' , { 'stroke-linecap' : 'square' } ] , [ 'stroke-cap-round' , { 'stroke-linecap' : 'round' } ] , [ 'stroke-cap-auto' , { 'stroke-linecap' : 'butt' } ] , [ 'stroke-join-arcs' , { 'stroke-linejoin' : 'arcs' } ] , [ 'stroke-join-bevel' , { 'stroke-linejoin' : 'bevel' } ] , [ 'stroke-join-clip' , { 'stroke-linejoin' : 'miter-clip' } ] , [ 'stroke-join-round' , { 'stroke-linejoin' : 'round' } ] , [ 'stroke-join-auto' , { 'stroke-linejoin' : 'miter' } ] , [ 'stroke-none' , { stroke : 'none' } ] , ] ;