diff --git a/.playground/assets/js/breakpoints.js b/.playground/assets/js/breakpoints.cjs similarity index 100% rename from .playground/assets/js/breakpoints.js rename to .playground/assets/js/breakpoints.cjs diff --git a/.playground/uno.config.js b/.playground/uno.config.js index 5e045d8..56e7f2b 100644 --- a/.playground/uno.config.js +++ b/.playground/uno.config.js @@ -1,6 +1,6 @@ import { defineConfig } from 'unocss'; -import presetCore from '../assets/js/unocss/preset-core'; -import breakpoints from './assets/js/breakpoints'; +import presetCore from '../assets/js/unocss/preset-core.mjs'; +import breakpoints from './assets/js/breakpoints.cjs'; export default defineConfig({ presets: [presetCore({ breakpoints })], diff --git a/assets/js/unocss/TransformerDirectives/apply.mjs b/assets/js/unocss/TransformerDirectives/apply.mjs new file mode 100644 index 0000000..4be8466 --- /dev/null +++ b/assets/js/unocss/TransformerDirectives/apply.mjs @@ -0,0 +1,124 @@ +import { expandVariantGroup, notNull, regexScopePlaceholder } from '@unocss/core'; +import { clone, generate, List, parse } from 'css-tree'; +import { transformDirectives } from './transform.mjs'; + +export async function handleApply(ctx, node) { + const { code, uno, options, filename } = ctx; + + await Promise.all( + node.block.children.map(async (childNode) => { + if (childNode.type === 'Raw') + return transformDirectives(code, uno, options, filename, childNode.value, childNode.loc.start.offset); + await parseApply(ctx, node, childNode); + }).toArray(), + ); +} + +export async function parseApply({ code, uno, applyVariable }, node, childNode) { + const {original} = code; + + let body; + if (childNode.type === 'Atrule' && childNode.name === 'apply' && childNode.prelude && childNode.prelude.type === 'Raw') { + body = removeQuotes(childNode.prelude.value.trim()); + } + + else if (childNode.type === 'Declaration' && applyVariable.includes(childNode.property) && (childNode.value.type === 'Value' || childNode.value.type === 'Raw')) { + let rawValue = original.slice( + childNode.value.loc.start.offset, + childNode.value.loc.end.offset, + ).trim(); + rawValue = removeQuotes(rawValue); + const items = rawValue + .split(/\s+/g) + .filter(Boolean) + .map(i => removeQuotes(i)); + body = items.join(' '); + } + + if (!body) + return; + + body = removeComments(body); + + const classNames = expandVariantGroup(body) + .split(/\s+/g) + .map(className => className.trim().replace(/\\/, '')); + + const utils = ( + await Promise.all( + classNames.map(i => uno.parseToken(i, '-')), + )) + .filter(notNull) + .flat() + .sort((a, b) => a[0] - b[0]) + .sort((a, b) => (a[3] ? uno.parentOrders.get(a[3]) ?? 0 : 0) - (b[3] ? uno.parentOrders.get(b[3]) ?? 0 : 0)) + .reduce((acc, item) => { + const target = acc.find(i => i[1] === item[1] && i[3] === item[3]); + if (target) + target[2] += item[2]; + else + acc.push([...item]); + return acc; + }, []); + + if (!utils.length) + return; + + let simicolonOffset = original[childNode.loc.end.offset] === ';' + ? 1 + : original[childNode.loc.end.offset] === '@' + ? -1 + : 0; + + for (const i of utils) { + const [, _selector, body, parent] = i; + const selectorOrGroup = _selector?.replace(regexScopePlaceholder, ' ') || _selector; + if (parent || (selectorOrGroup && selectorOrGroup !== '.\\-')) { + let newSelector = generate(node.prelude); + const className = code.slice(node.prelude.loc.start.offset, node.prelude.loc.end.offset); + if (selectorOrGroup && selectorOrGroup !== '.\\-') { + const ruleAST = parse(`${selectorOrGroup}{}`, { + context: 'rule', + }); + + const prelude = clone(node.prelude); + + prelude.children?.forEach((child) => { + const selectorListAst = clone(ruleAST.prelude); + const classSelectors = new List(); + + selectorListAst.children.forEach((selectorAst) => { + classSelectors.appendList((selectorAst).children.filter(i => i.type === 'ClassSelector' && i.name === '\\-')); + }); + classSelectors.forEach(i => Object.assign(i, clone(child))); + + Object.assign(child, selectorListAst); + }); + newSelector = generate(prelude); + } + let css = `${newSelector.replace(/.\\-/g, className)}{${body}}`; + if (parent) + css = `${parent}{${css}}`; + simicolonOffset = 0; + code.appendLeft(node.loc.end.offset, css); + } + else { + if (body.includes('@')) + code.appendRight(original.length, body); + else + code.appendRight(childNode.loc.end.offset + simicolonOffset, body); + } + } + code.remove( + childNode.loc.start.offset, + childNode.loc.end.offset + simicolonOffset, + ); +} + +function removeQuotes(value) { + return value.replace(/^(['"])(.*)\1$/, '$2'); +} + +function removeComments(value) { + return value.replace(/(\/\*(?:.|\n)*?\*\/)|(\/\/.*)/g, ''); +} diff --git a/assets/js/unocss/TransformerDirectives/apply.mts b/assets/js/unocss/TransformerDirectives/apply.mts deleted file mode 100644 index 9ba4f15..0000000 --- a/assets/js/unocss/TransformerDirectives/apply.mts +++ /dev/null @@ -1,134 +0,0 @@ -import type { StringifiedUtil } from '@unocss/core' -import type { CssNode, Rule, Selector, SelectorList } from 'css-tree' -import type { TransformerDirectivesContext } from './types.mjs' -import { expandVariantGroup, notNull, regexScopePlaceholder } from '@unocss/core' -import { clone, generate, List, parse } from 'css-tree' -import { transformDirectives } from './transform.mjs' - -type Writeable = { -readonly [P in keyof T]: T[P] } - -export async function handleApply(ctx: TransformerDirectivesContext, node: Rule) { - const { code, uno, options, filename } = ctx - - await Promise.all( - node.block.children.map(async (childNode) => { - if (childNode.type === 'Raw') - return transformDirectives(code, uno, options, filename, childNode.value, childNode.loc!.start.offset) - await parseApply(ctx, node, childNode) - }).toArray(), - ) -} - -export async function parseApply({ code, uno, applyVariable }: TransformerDirectivesContext, node: Rule, childNode: CssNode) { - const original = code.original - - let body: string | undefined - if (childNode.type === 'Atrule' && childNode.name === 'apply' && childNode.prelude && childNode.prelude.type === 'Raw') { - body = removeQuotes(childNode.prelude.value.trim()) - } - - else if (childNode!.type === 'Declaration' && applyVariable.includes(childNode.property) && (childNode.value.type === 'Value' || childNode.value.type === 'Raw')) { - // Get raw value of the declaration - // as csstree would try to parse the content with operators, but we don't need them. - let rawValue = original.slice( - childNode.value.loc!.start.offset, - childNode.value.loc!.end.offset, - ).trim() - rawValue = removeQuotes(rawValue) - const items = rawValue - .split(/\s+/g) - .filter(Boolean) - .map(i => removeQuotes(i)) - body = items.join(' ') - } - - if (!body) - return - - body = removeComments(body) - - const classNames = expandVariantGroup(body) - .split(/\s+/g) - .map(className => className.trim().replace(/\\/, '')) - - const utils = ( - await Promise.all( - classNames.map(i => uno.parseToken(i, '-')), - )) - .filter(notNull) - .flat() - .sort((a, b) => a[0] - b[0]) - .sort((a, b) => (a[3] ? uno.parentOrders.get(a[3]) ?? 0 : 0) - (b[3] ? uno.parentOrders.get(b[3]) ?? 0 : 0)) - .reduce((acc, item) => { - const target = acc.find(i => i[1] === item[1] && i[3] === item[3]) - if (target) - target[2] += item[2] - else - // use spread operator to prevent reassign to uno internal cache - acc.push([...item] as Writeable) - return acc - }, [] as Writeable[]) - - if (!utils.length) - return - - let simicolonOffset = original[childNode.loc!.end.offset] === ';' - ? 1 - : original[childNode.loc!.end.offset] === '@' - ? -1 - : 0 - - for (const i of utils) { - const [, _selector, body, parent] = i - const selectorOrGroup = _selector?.replace(regexScopePlaceholder, ' ') || _selector - if (parent || (selectorOrGroup && selectorOrGroup !== '.\\-')) { - let newSelector = generate(node.prelude) - const className = code.slice(node.prelude.loc!.start.offset, node.prelude.loc!.end.offset) - if (selectorOrGroup && selectorOrGroup !== '.\\-') { - // use rule context since it could be a selector(.foo) or a selector group(.foo, .bar) - const ruleAST = parse(`${selectorOrGroup}{}`, { - context: 'rule', - }) as Rule - - const prelude = clone(node.prelude) as SelectorList - - prelude.children?.forEach((child) => { - const selectorListAst = clone(ruleAST.prelude) as SelectorList - const classSelectors: List = new List() - - selectorListAst.children.forEach((selectorAst) => { - classSelectors.appendList((selectorAst as Selector).children.filter(i => i.type === 'ClassSelector' && i.name === '\\-')) - }) - classSelectors.forEach(i => Object.assign(i, clone(child))) - - Object.assign(child, selectorListAst) - }) - newSelector = generate(prelude) - } - let css = `${newSelector.replace(/.\\-/g, className)}{${body}}` - if (parent) - css = `${parent}{${css}}` - simicolonOffset = 0 - code.appendLeft(node.loc!.end.offset, css) - } - else { - // If nested css was scoped, put them last. - if (body.includes('@')) - code.appendRight(original.length, body) - else - code.appendRight(childNode!.loc!.end.offset + simicolonOffset, body) - } - } - code.remove( - childNode!.loc!.start.offset, - childNode!.loc!.end.offset + simicolonOffset, - ) -} - -function removeQuotes(value: string) { - return value.replace(/^(['"])(.*)\1$/, '$2') -} - -function removeComments(value: string) { - return value.replace(/(\/\*(?:.|\n)*?\*\/)|(\/\/.*)/g, '') -} diff --git a/assets/js/unocss/TransformerDirectives/functions.mjs b/assets/js/unocss/TransformerDirectives/functions.mjs new file mode 100644 index 0000000..1be323d --- /dev/null +++ b/assets/js/unocss/TransformerDirectives/functions.mjs @@ -0,0 +1,18 @@ +import { transformThemeString } from '@unocss/rule-utils'; + +export function handleFunction(context, node) { + const { code, uno, options } = context; + const { throwOnMissing = true } = options; + + switch (node.name) { + case 'theme': { + if (node.children.size !== 1) + throw new Error('theme() expect exact one argument'); + + const themeStr = node.children.first.value; + const value = transformThemeString(themeStr, uno.config.theme, throwOnMissing); + if (value) + code.overwrite(node.loc.start.offset, node.loc.end.offset, value); + } + } +} diff --git a/assets/js/unocss/TransformerDirectives/functions.mts b/assets/js/unocss/TransformerDirectives/functions.mts deleted file mode 100644 index f874af6..0000000 --- a/assets/js/unocss/TransformerDirectives/functions.mts +++ /dev/null @@ -1,19 +0,0 @@ -import type { FunctionNode, StringNode } from 'css-tree' -import type { TransformerDirectivesContext } from './types.mjs' -import { transformThemeString } from '@unocss/rule-utils' - -export function handleFunction({ code, uno, options }: TransformerDirectivesContext, node: FunctionNode) { - const { throwOnMissing = true } = options - - switch (node.name) { - case 'theme': { - if (node.children.size !== 1) - throw new Error('theme() expect exact one argument') - - const themeStr = (node.children.first as StringNode).value - const value = transformThemeString(themeStr, uno.config.theme, throwOnMissing) - if (value) - code.overwrite(node.loc!.start.offset, node.loc!.end.offset, value) - } - } -} diff --git a/assets/js/unocss/TransformerDirectives/index.mjs b/assets/js/unocss/TransformerDirectives/index.mjs new file mode 100644 index 0000000..899e3a7 --- /dev/null +++ b/assets/js/unocss/TransformerDirectives/index.mjs @@ -0,0 +1,13 @@ +import { cssIdRE } from '@unocss/core'; +import { transformDirectives } from './transform.mjs'; + +export default function transformerDirectives(options = {}) { + return { + name: '@unocss/transformer-directives', + enforce: options?.enforce, + idFilter: id => cssIdRE.test(id), + transform: (code, id, ctx) => { + return transformDirectives(code, ctx.uno, options, id); + }, + }; +} diff --git a/assets/js/unocss/TransformerDirectives/index.mts b/assets/js/unocss/TransformerDirectives/index.mts deleted file mode 100644 index 24ea700..0000000 --- a/assets/js/unocss/TransformerDirectives/index.mts +++ /dev/null @@ -1,17 +0,0 @@ -import type { SourceCodeTransformer } from '@unocss/core' -import type { TransformerDirectivesOptions } from './types.mjs' -import { cssIdRE } from '@unocss/core' -import { transformDirectives } from './transform.mjs' - -export * from './types.mjs' - -export default function transformerDirectives(options: TransformerDirectivesOptions = {}): SourceCodeTransformer { - return { - name: '@unocss/transformer-directives', - enforce: options?.enforce, - idFilter: id => cssIdRE.test(id), - transform: (code, id, ctx) => { - return transformDirectives(code, ctx.uno, options, id) - }, - } -} diff --git a/assets/js/unocss/TransformerDirectives/screen.mjs b/assets/js/unocss/TransformerDirectives/screen.mjs new file mode 100644 index 0000000..f23e131 --- /dev/null +++ b/assets/js/unocss/TransformerDirectives/screen.mjs @@ -0,0 +1,79 @@ +const screenRuleRE = /(@screen [^{]+)(.+)/g; + +export function handleScreen({ code, uno }, node) { + let breakpointName = ''; + let prefix = ''; + + if (node.name === 'screen' && node.prelude?.type === 'Raw') + breakpointName = node.prelude.value.trim(); + + if (!breakpointName) + return; + + const match = breakpointName.match(/^(?:(lt|at)-)?(\w+)$/); + if (match) { + prefix = match[1]; + breakpointName = match[2]; + } + + if (!prefix) { + const match = breakpointName.match(/^<(\d+)$/); + if (match) { + prefix = 'lt'; + breakpointName = match[1]; + } + } + + const resolveBreakpoints = () => { + let breakpoints; + if (uno.userConfig && uno.userConfig.theme) + breakpoints = uno.userConfig.theme.breakpoints; + + if (!breakpoints) + breakpoints = uno.config.theme.breakpoints; + + return breakpoints + ? Object.entries(breakpoints) + .sort((a, b) => Number.parseInt(a[1].replace(/[a-z]+/gi, '')) - Number.parseInt(b[1].replace(/[a-z]+/gi, ''))) + .map(([point, size]) => ({ point, size })) + : undefined; + }; + const variantEntries = (resolveBreakpoints() ?? []).map(({ point, size }, idx) => [point, size, idx]); + const generateMediaQuery = (breakpointName, prefix) => { + const [, size, idx] = variantEntries.find(i => i[0] === breakpointName); + if (prefix) { + if (prefix === 'lt') + return `@media (max-width: ${calcMaxWidthBySize(size)})`; + else if (prefix === 'at') + return `@media (min-width: ${size})${variantEntries[idx + 1] ? ` and (max-width: ${calcMaxWidthBySize(variantEntries[idx + 1][1])})` : ''}`; + + else throw new Error(`breakpoint variant not supported: ${prefix}`); + } + return `@media (min-width: ${size})`; + }; + + if (!variantEntries.find(i => i[0] === breakpointName)) + throw new Error(`breakpoint ${breakpointName} not found`); + + const {offset} = node.loc.start; + const str = code.original.slice(offset, node.loc.end.offset); + const matches = Array.from(str.matchAll(screenRuleRE)); + + if (!matches.length) + return; + + for (const match of matches) { + code.overwrite( + offset + match.index, + offset + match.index + match[1].length, + `${generateMediaQuery(breakpointName, prefix)}`, + ); + } +} + +function calcMaxWidthBySize(size) { + const value = size.match(/^-?\d+\.?\d*/)?.[0] || ''; + const unit = size.slice(value.length); + const maxWidth = (Number.parseFloat(value) - 0.1); + return Number.isNaN(maxWidth) ? size : `${maxWidth}${unit}`; +} diff --git a/assets/js/unocss/TransformerDirectives/screen.mts b/assets/js/unocss/TransformerDirectives/screen.mts deleted file mode 100644 index 58f39a0..0000000 --- a/assets/js/unocss/TransformerDirectives/screen.mts +++ /dev/null @@ -1,84 +0,0 @@ -import type { Theme } from '@unocss/preset-mini' -import type { Atrule } from 'css-tree' -import type { TransformerDirectivesContext } from './types.mjs' - -// eslint-disable-next-line regexp/no-misleading-capturing-group -const screenRuleRE = /(@screen [^{]+)(.+)/g - -export function handleScreen({ code, uno }: TransformerDirectivesContext, node: Atrule) { - let breakpointName = '' - let prefix = '' - - if (node.name === 'screen' && node.prelude?.type === 'Raw') - breakpointName = node.prelude.value.trim() - - if (!breakpointName) - return - - const match = breakpointName.match(/^(?:(lt|at)-)?(\w+)$/) - if (match) { - prefix = match[1] - breakpointName = match[2] - } - - if (!prefix) { - const match = breakpointName.match(/^<(\d+)$/) - if (match) { - prefix = 'lt' - breakpointName = match[1] - } - } - - const resolveBreakpoints = () => { - let breakpoints: Record | undefined - if (uno.userConfig && uno.userConfig.theme) - breakpoints = (uno.userConfig.theme as Theme).breakpoints - - if (!breakpoints) - breakpoints = (uno.config.theme as Theme).breakpoints - - return breakpoints - ? Object.entries(breakpoints) - .sort((a, b) => Number.parseInt(a[1].replace(/[a-z]+/gi, '')) - Number.parseInt(b[1].replace(/[a-z]+/gi, ''))) - .map(([point, size]) => ({ point, size })) - : undefined - } - const variantEntries: Array<[string, string, number]> = (resolveBreakpoints() ?? []).map(({ point, size }, idx) => [point, size, idx]) - const generateMediaQuery = (breakpointName: string, prefix?: string) => { - const [, size, idx] = variantEntries.find(i => i[0] === breakpointName)! - if (prefix) { - if (prefix === 'lt') - return `@media (max-width: ${calcMaxWidthBySize(size)})` - else if (prefix === 'at') - return `@media (min-width: ${size})${variantEntries[idx + 1] ? ` and (max-width: ${calcMaxWidthBySize(variantEntries[idx + 1][1])})` : ''}` - - else throw new Error(`breakpoint variant not supported: ${prefix}`) - } - return `@media (min-width: ${size})` - } - - if (!variantEntries.find(i => i[0] === breakpointName)) - throw new Error(`breakpoint ${breakpointName} not found`) - - const offset = node.loc!.start.offset - const str = code.original.slice(offset, node.loc!.end.offset) - const matches = Array.from(str.matchAll(screenRuleRE)) - - if (!matches.length) - return - - for (const match of matches) { - code.overwrite( - offset + match.index!, - offset + match.index! + match[1].length, - `${generateMediaQuery(breakpointName, prefix)}`, - ) - } -} - -function calcMaxWidthBySize(size: string) { - const value = size.match(/^-?\d+\.?\d*/)?.[0] || '' - const unit = size.slice(value.length) - const maxWidth = (Number.parseFloat(value) - 0.1) - return Number.isNaN(maxWidth) ? size : `${maxWidth}${unit}` -} diff --git a/assets/js/unocss/TransformerDirectives/transform.mjs b/assets/js/unocss/TransformerDirectives/transform.mjs new file mode 100644 index 0000000..b16f477 --- /dev/null +++ b/assets/js/unocss/TransformerDirectives/transform.mjs @@ -0,0 +1,69 @@ +import { toArray } from '@unocss/core'; +import { hasThemeFn as hasThemeFunction } from '@unocss/rule-utils'; +import { parse, walk } from 'css-tree'; +import { handleApply } from './apply.mjs'; +import { handleFunction } from './functions.mjs'; +import { handleScreen } from './screen.mjs'; + +export async function transformDirectives( + code, + uno, + options, + filename, + originalCode, + offset, +) { + let { applyVariable } = options; + const {varStyle} = options; + if (applyVariable === undefined) { + if (varStyle !== undefined) + applyVariable = varStyle ? [`${varStyle}apply`] : []; + applyVariable = ['--at-apply', '--uno-apply', '--uno']; + } + applyVariable = toArray(applyVariable || []); + + const parseCode = originalCode || code.original; + const hasApply = parseCode.includes('@apply') || applyVariable.some(s => parseCode.includes(s)); + const hasScreen = parseCode.includes('@screen'); + const hasThemeFn = hasThemeFunction(parseCode); + + if (!hasApply && !hasThemeFn && !hasScreen) + return; + + const ast = parse(parseCode, { + parseCustomProperty: true, + parseAtrulePrelude: false, + positions: true, + filename, + offset, + }); + + if (ast.type !== 'StyleSheet') + return; + + const stack = []; + + const ctx = { + options, + applyVariable, + uno, + code, + filename, + offset, + }; + + const processNode = async (node, _item, _list) => { + if (hasScreen && node.type === 'Atrule') + handleScreen(ctx, node); + + if (node.type === 'Function') + handleFunction(ctx, node); + + if (hasApply && node.type === 'Rule') + await handleApply(ctx, node); + }; + + walk(ast, (...args) => stack.push(processNode(...args))); + + await Promise.all(stack); +} diff --git a/assets/js/unocss/TransformerDirectives/transform.mts b/assets/js/unocss/TransformerDirectives/transform.mts deleted file mode 100644 index 84224e4..0000000 --- a/assets/js/unocss/TransformerDirectives/transform.mts +++ /dev/null @@ -1,73 +0,0 @@ -import type { UnoGenerator } from '@unocss/core' -import type { CssNode, List, ListItem } from 'css-tree' -import type MagicString from 'magic-string' -import type { TransformerDirectivesContext, TransformerDirectivesOptions } from './types.mjs' -import { toArray } from '@unocss/core' -import { hasThemeFn as hasThemeFunction } from '@unocss/rule-utils' -import { parse, walk } from 'css-tree' -import { handleApply } from './apply.mjs' -import { handleFunction } from './functions.mjs' -import { handleScreen } from './screen.mjs' - -export async function transformDirectives( - code: MagicString, - uno: UnoGenerator, - options: TransformerDirectivesOptions, - filename?: string, - originalCode?: string, - offset?: number, -) { - let { applyVariable } = options - const varStyle = options.varStyle - if (applyVariable === undefined) { - if (varStyle !== undefined) - applyVariable = varStyle ? [`${varStyle}apply`] : [] - applyVariable = ['--at-apply', '--uno-apply', '--uno'] - } - applyVariable = toArray(applyVariable || []) - - const parseCode = originalCode || code.original - const hasApply = parseCode.includes('@apply') || applyVariable.some(s => parseCode.includes(s)) - const hasScreen = parseCode.includes('@screen') - const hasThemeFn = hasThemeFunction(parseCode) - - if (!hasApply && !hasThemeFn && !hasScreen) - return - - const ast = parse(parseCode, { - parseCustomProperty: true, - parseAtrulePrelude: false, - positions: true, - filename, - offset, - }) - - if (ast.type !== 'StyleSheet') - return - - const stack: Promise[] = [] - - const ctx: TransformerDirectivesContext = { - options, - applyVariable, - uno, - code, - filename, - offset, - } - - const processNode = async (node: CssNode, _item: ListItem, _list: List) => { - if (hasScreen && node.type === 'Atrule') - handleScreen(ctx, node) - - if (node.type === 'Function') - handleFunction(ctx, node) - - if (hasApply && node.type === 'Rule') - await handleApply(ctx, node) - } - - walk(ast, (...args) => stack.push(processNode(...args))) - - await Promise.all(stack) -} diff --git a/assets/js/unocss/TransformerDirectives/types.mts b/assets/js/unocss/TransformerDirectives/types.mts deleted file mode 100644 index d0c6a4b..0000000 --- a/assets/js/unocss/TransformerDirectives/types.mts +++ /dev/null @@ -1,41 +0,0 @@ -import type { SourceCodeTransformer, UnoGenerator } from '@unocss/core' -import type MagicString from 'magic-string' - -export interface TransformerDirectivesOptions { - enforce?: SourceCodeTransformer['enforce'] - - /** - * Throw an error if utils or themes are not found. - * - * @default true - */ - throwOnMissing?: boolean - - /** - * Treat CSS custom properties as @apply directives for CSS syntax compatibility. - * - * Pass `false` to disable. - * - * @default ['--at-apply', '--uno-apply', '--uno'] - */ - applyVariable?: false | string | string[] - - /** - * Treat CSS custom properties as directives for CSS syntax compatibility. - * - * Pass `false` to disable, or a string to use as a prefix. - * - * @deprecated use `applyVariable` to specify the full var name instead. - * @default '--at-' - */ - varStyle?: false | string -} - -export interface TransformerDirectivesContext { - code: MagicString - uno: UnoGenerator - options: TransformerDirectivesOptions - applyVariable: string[] - offset?: number - filename?: string -} diff --git a/assets/js/unocss/preset-core.mjs b/assets/js/unocss/preset-core.mjs index 302d9c9..e0553b8 100644 --- a/assets/js/unocss/preset-core.mjs +++ b/assets/js/unocss/preset-core.mjs @@ -1,8 +1,8 @@ import presetWind from '@unocss/preset-wind'; -import presetNoDefaultRem from './preset-no-default-rem'; +import presetNoDefaultRem from './preset-no-default-rem.mjs'; import transformerVariantGroup from '@unocss/transformer-variant-group'; -import transformerDirectives from './TransformerDirectives/index'; +import transformerDirectives from './TransformerDirectives/index.mjs'; function presetCore(options = {}) { // Assign to the default options @@ -273,5 +273,5 @@ function presetCore(options = {}) { }; } -exports['default'] = presetCore; -exports.presetCore = presetCore; +export default presetCore; +export { presetCore }; diff --git a/assets/js/unocss/preset-no-default-rem.mjs b/assets/js/unocss/preset-no-default-rem.mjs index 3298e97..5e6ef8f 100644 --- a/assets/js/unocss/preset-no-default-rem.mjs +++ b/assets/js/unocss/preset-no-default-rem.mjs @@ -49,5 +49,5 @@ function presetNoDefaultRem(options = {}) { }; } -exports['default'] = presetNoDefaultRem; -exports.presetNoDefaultRem = presetNoDefaultRem; +export default presetNoDefaultRem; +export { presetNoDefaultRem }; diff --git a/package.json b/package.json index 78df8d4..4c34d43 100644 --- a/package.json +++ b/package.json @@ -34,7 +34,7 @@ "vite-svg-loader": "^5.1.0" }, "devDependencies": { - "nuxt": "^3.13.2", - "@unocss/nuxt": "0.60.3" + "@unocss/nuxt": "^0.62.4", + "nuxt": "^3.13.2" } } diff --git a/uno.config.js b/uno.config.js index 185d2e5..f027625 100644 --- a/uno.config.js +++ b/uno.config.js @@ -1,5 +1,5 @@ import { defineConfig } from 'unocss'; -import presetCore from './assets/js/unocss/preset-core'; +import presetCore from './assets/js/unocss/preset-core.mjs'; export default defineConfig({ presets: [presetCore()], diff --git a/yarn.lock b/yarn.lock index 9d9480a..0732dd1 100644 --- a/yarn.lock +++ b/yarn.lock @@ -18,7 +18,7 @@ package-manager-detector "^0.2.0" tinyexec "^0.3.0" -"@antfu/utils@^0.7.10", "@antfu/utils@^0.7.7": +"@antfu/utils@^0.7.10": version "0.7.10" resolved "https://registry.yarnpkg.com/@antfu/utils/-/utils-0.7.10.tgz#ae829f170158e297a9b6a28f161a8e487d00814d" integrity sha512-+562v9k4aI80m1+VuMHehNJWLOFjBnXn3tdOitzD0il5b7smkSBal4+a3oKiQTbrwMmN/TBUMDvbdoWDehgOww== @@ -36,7 +36,7 @@ resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.25.4.tgz#7d2a80ce229890edcf4cc259d4d696cb4dae2fcb" integrity sha512-+LGRog6RAsCJrrrg/IO6LGmpphNe5DiK30dGjCoxxeGv49B10/3XYGxPsAwrDlMFcFEvdAUavDT8r9k/hSyQqQ== -"@babel/core@^7.23.0", "@babel/core@^7.23.7", "@babel/core@^7.24.5", "@babel/core@^7.24.7": +"@babel/core@^7.23.0", "@babel/core@^7.23.7", "@babel/core@^7.24.7": version "7.25.2" resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.25.2.tgz#ed8eec275118d7613e77a352894cd12ded8eba77" integrity sha512-BBt3opiCOxUr9euZ5/ro/Xv8/V7yJ5bjYMqG/C1YAo8MIKAnumZalCN+msbci3Pigy4lIQfPUpfMM27HMGaYEA== @@ -114,7 +114,7 @@ "@babel/traverse" "^7.24.7" "@babel/types" "^7.24.7" -"@babel/helper-module-transforms@^7.24.8", "@babel/helper-module-transforms@^7.25.2": +"@babel/helper-module-transforms@^7.25.2": version "7.25.2" resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.25.2.tgz#ee713c29768100f2776edf04d4eb23b8d27a66e6" integrity sha512-BjyRAbix6j/wv83ftcVJmBt72QtHI56C7JXZoG2xATiLpmoC7dpd8WnkikExHDVPpi/3qCmO6WY1EaXOluiecQ== @@ -171,7 +171,7 @@ resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.24.7.tgz#75b889cfaf9e35c2aaf42cf0d72c8e91719251db" integrity sha512-rR+PBcQ1SMQDDyF6X0wxtG8QyLCgUB0eRAGguqRLfkCA87l7yAP7ehq8SNj96OOGTO8OBV70KhuFYcIkHXOg0w== -"@babel/helper-validator-option@^7.24.7", "@babel/helper-validator-option@^7.24.8": +"@babel/helper-validator-option@^7.24.8": version "7.24.8" resolved "https://registry.yarnpkg.com/@babel/helper-validator-option/-/helper-validator-option-7.24.8.tgz#3725cdeea8b480e86d34df15304806a06975e33d" integrity sha512-xb8t9tD1MHLungh/AIoWYN+gVHaB9kwlu8gffXGSt3FFEIT7RjS+xWbc2vUD1UTZdIpKj/ab3rdqJ7ufngyi2Q== @@ -231,7 +231,7 @@ dependencies: "@babel/helper-plugin-utils" "^7.10.4" -"@babel/plugin-syntax-jsx@^7.24.1", "@babel/plugin-syntax-jsx@^7.24.7": +"@babel/plugin-syntax-jsx@^7.24.7": version "7.24.7" resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.24.7.tgz#39a1fa4a7e3d3d7f34e2acc6be585b718d30e02d" integrity sha512-6ddciUPe/mpMnOKv/U+RSd2vvVy+Yw/JfBB0ZHYjEZt9NLHmCUylNYlsbqCCS1Bffjlb0fCwC9Vqz+sBz6PsiQ== @@ -245,15 +245,6 @@ dependencies: "@babel/helper-plugin-utils" "^7.24.8" -"@babel/plugin-transform-modules-commonjs@^7.24.7": - version "7.24.8" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.24.8.tgz#ab6421e564b717cb475d6fff70ae7f103536ea3c" - integrity sha512-WHsk9H8XxRs3JXKWFiqtQebdh9b/pTk4EgueygFzYlTKAg0Ud985mSevdNjdXdFBATSKVJGQXP1tv6aGbssLKA== - dependencies: - "@babel/helper-module-transforms" "^7.24.8" - "@babel/helper-plugin-utils" "^7.24.8" - "@babel/helper-simple-access" "^7.24.7" - "@babel/plugin-transform-typescript@^7.22.15", "@babel/plugin-transform-typescript@^7.24.7": version "7.25.2" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-typescript/-/plugin-transform-typescript-7.25.2.tgz#237c5d10de6d493be31637c6b9fa30b6c5461add" @@ -265,17 +256,6 @@ "@babel/helper-skip-transparent-expression-wrappers" "^7.24.7" "@babel/plugin-syntax-typescript" "^7.24.7" -"@babel/preset-typescript@^7.24.1": - version "7.24.7" - resolved "https://registry.yarnpkg.com/@babel/preset-typescript/-/preset-typescript-7.24.7.tgz#66cd86ea8f8c014855671d5ea9a737139cbbfef1" - integrity sha512-SyXRe3OdWwIwalxDg5UtJnJQO+YPcTfwiIY2B0Xlddh9o7jpWLvv8X1RthIeDOxQ+O1ML5BLPCONToObyVQVuQ== - dependencies: - "@babel/helper-plugin-utils" "^7.24.7" - "@babel/helper-validator-option" "^7.24.7" - "@babel/plugin-syntax-jsx" "^7.24.7" - "@babel/plugin-transform-modules-commonjs" "^7.24.7" - "@babel/plugin-transform-typescript" "^7.24.7" - "@babel/standalone@^7.23.8": version "7.25.6" resolved "https://registry.yarnpkg.com/@babel/standalone/-/standalone-7.25.6.tgz#b81f6cefd3b667ae5334979d01b3633c70bb231f" @@ -771,7 +751,7 @@ resolved "https://registry.yarnpkg.com/@iconify/types/-/types-2.0.0.tgz#ab0e9ea681d6c8a1214f30cd741fe3a20cc57f57" integrity sha512-+wluvCrRhXrhyOmRDJ3q8mux9JkKy5SJ/v8ol2tu4FVjyYvtEzkc/3pK15ET6RKg4b4w4BmTk1+gsCUhf21Ykg== -"@iconify/utils@^2.1.23": +"@iconify/utils@^2.1.33": version "2.1.33" resolved "https://registry.yarnpkg.com/@iconify/utils/-/utils-2.1.33.tgz#cbf7242a52fd0ec58c42d37d28e4406b5327e8c0" integrity sha512-jP9h6v/g0BIZx0p7XGJJVtkVnydtbgTgt9mVNcGDYwaa7UhdHdI9dvoq+gKj9sijMSJKxUPEG2JyjsgXjxL7Kw== @@ -1042,7 +1022,7 @@ unimport "^2.0.1" untyped "^1.2.2" -"@nuxt/kit@3.13.2", "@nuxt/kit@^3.11.2", "@nuxt/kit@^3.12.1", "@nuxt/kit@^3.13.0", "@nuxt/kit@^3.13.1", "@nuxt/kit@^3.13.2", "@nuxt/kit@^3.9.0": +"@nuxt/kit@3.13.2", "@nuxt/kit@^3.12.1", "@nuxt/kit@^3.13.0", "@nuxt/kit@^3.13.1", "@nuxt/kit@^3.13.2", "@nuxt/kit@^3.9.0": version "3.13.2" resolved "https://registry.yarnpkg.com/@nuxt/kit/-/kit-3.13.2.tgz#4c019a87e08c33ec14d1059497ba40568b82bfed" integrity sha512-KvRw21zU//wdz25IeE1E5m/aFSzhJloBRAQtv+evcFeZvuroIxpIQuUqhbzuwznaUwpiWbmwlcsp5uOWmi4vwA== @@ -1585,41 +1565,33 @@ hookable "^5.5.3" unhead "1.11.6" -"@unocss/astro@0.60.3": - version "0.60.3" - resolved "https://registry.yarnpkg.com/@unocss/astro/-/astro-0.60.3.tgz#c9946863b58315216c80adf5e3af5a6903f01435" - integrity sha512-duFuyVhqYqQ15JZqx41UNgIxndqYRbOwDkJ7Y+R5N+u59a27vImz8B9eOFkHaZCFBWyH5jywkT8LVK1sfddFaw== +"@unocss/astro@0.62.4": + version "0.62.4" + resolved "https://registry.yarnpkg.com/@unocss/astro/-/astro-0.62.4.tgz#6f1b0a53b79d7946ea822e3edaafb80cb8be8bf2" + integrity sha512-98KfkbrNhBLx2+uYxMiGsldIeIZ6/PbL4yaGRHeHoiHd7p4HmIyCF+auYe4Psntx3Yr8kU+XSIAhGDYebvTidQ== dependencies: - "@unocss/core" "0.60.3" - "@unocss/reset" "0.60.3" - "@unocss/vite" "0.60.3" + "@unocss/core" "0.62.4" + "@unocss/reset" "0.62.4" + "@unocss/vite" "0.62.4" -"@unocss/cli@0.60.3": - version "0.60.3" - resolved "https://registry.yarnpkg.com/@unocss/cli/-/cli-0.60.3.tgz#4e00be54317f29012c7b35766523987ea7cf5e8e" - integrity sha512-bN829zn6k4hrvDTLnUcI2uAJnSevHwlkOCaYxN/C+v11uGxIewk5Xum6Vm5kZ8JTpCR1jEu/i7wIBNde3XKN5g== +"@unocss/cli@0.62.4": + version "0.62.4" + resolved "https://registry.yarnpkg.com/@unocss/cli/-/cli-0.62.4.tgz#d86fa69158f92818d353ec8d25d3dbc9a3137e99" + integrity sha512-p4VyS40mzn4LCOkIsbIRzN0Zi50rRepesREi2S1+R4Kpvd4QFeeuxTuZNHEyi2uCboQ9ZWl1gfStCXIrNECwTg== dependencies: "@ampproject/remapping" "^2.3.0" "@rollup/pluginutils" "^5.1.0" - "@unocss/config" "0.60.3" - "@unocss/core" "0.60.3" - "@unocss/preset-uno" "0.60.3" + "@unocss/config" "0.62.4" + "@unocss/core" "0.62.4" + "@unocss/preset-uno" "0.62.4" cac "^6.7.14" chokidar "^3.6.0" colorette "^2.0.20" consola "^3.2.3" - fast-glob "^3.3.2" - magic-string "^0.30.10" + magic-string "^0.30.11" pathe "^1.1.2" perfect-debounce "^1.0.0" - -"@unocss/config@0.60.3": - version "0.60.3" - resolved "https://registry.yarnpkg.com/@unocss/config/-/config-0.60.3.tgz#1d06827a2ab557b45454307b36511231fc560af9" - integrity sha512-3RGD7h3bS4qZA/Khcqhn1EgLgyPc85FSz5rubdywHRdHlpY9sdmuGEJahvqSLMN4MmdYQDmqEIEAJjENrdgZeQ== - dependencies: - "@unocss/core" "0.60.3" - unconfig "^0.3.13" + tinyglobby "^0.2.6" "@unocss/config@0.62.4": version "0.62.4" @@ -1629,21 +1601,11 @@ "@unocss/core" "0.62.4" unconfig "^0.5.5" -"@unocss/core@0.60.3": - version "0.60.3" - resolved "https://registry.yarnpkg.com/@unocss/core/-/core-0.60.3.tgz#f3c748a9ebf9809c196aadf5c3a92ffeebfc8d4b" - integrity sha512-4bBX1pavDl2DSCozEII7bxYGT0IkyO7kKlUuCtooTePWyLjf2F7essdzHkJ00EpNR64kkebR9V0lqBMBo07VPw== - "@unocss/core@0.62.4", "@unocss/core@^0.62.4": version "0.62.4" resolved "https://registry.yarnpkg.com/@unocss/core/-/core-0.62.4.tgz#306eaafe9dd5c564526b77c5685555b4704668f9" integrity sha512-Cc+Vo6XlaQpyVejkJrrzzWtiK9pgMWzVVBpm9VCVtwZPUjD4GSc+g7VQCPXSsr7m03tmSuRySJx72QcASmauNQ== -"@unocss/core@^0.60.3": - version "0.60.4" - resolved "https://registry.yarnpkg.com/@unocss/core/-/core-0.60.4.tgz#01ff57305225beb0635f4686dea6806e4016abe4" - integrity sha512-6tz8KTzC30oB0YikwRQoIpJ6Y6Dg+ZiK3NfCIsH+UX11bh2J2M53as2EL/5VQCqtiUn3YP0ZEzR2d1AWX78RCA== - "@unocss/eslint-config@^0.62.4": version "0.62.4" resolved "https://registry.yarnpkg.com/@unocss/eslint-config/-/eslint-config-0.62.4.tgz#0e8ece9b7877de0626ba7b834972fc49b3484b57" @@ -1662,13 +1624,6 @@ magic-string "^0.30.11" synckit "^0.9.1" -"@unocss/extractor-arbitrary-variants@0.60.3": - version "0.60.3" - resolved "https://registry.yarnpkg.com/@unocss/extractor-arbitrary-variants/-/extractor-arbitrary-variants-0.60.3.tgz#8145937f71db8213ef2346a53172a8678eca5c93" - integrity sha512-PnwNwkeAHmbJbrf5XN0xQG1KT1VQEye8neYn5yz1MHnT8Cj2nqjrqoCRGLCLhpOUg3/MNj+bpiA7hGnFbXWaCQ== - dependencies: - "@unocss/core" "0.60.3" - "@unocss/extractor-arbitrary-variants@0.62.4": version "0.62.4" resolved "https://registry.yarnpkg.com/@unocss/extractor-arbitrary-variants/-/extractor-arbitrary-variants-0.62.4.tgz#09196441619f043dfa7a375aeb402e113f57410b" @@ -1676,74 +1631,64 @@ dependencies: "@unocss/core" "0.62.4" -"@unocss/inspector@0.60.3": - version "0.60.3" - resolved "https://registry.yarnpkg.com/@unocss/inspector/-/inspector-0.60.3.tgz#2669458816a7f026babf8b2fb3c4b91bc219f9c3" - integrity sha512-2cXAPA1yddB79mmpMXxPpSpizn4TskAsB7aSocbprOTYIU2Ff53gfkkijnLixrBvbG8xw91d9oPuI5Hm9GCyMQ== +"@unocss/inspector@0.62.4": + version "0.62.4" + resolved "https://registry.yarnpkg.com/@unocss/inspector/-/inspector-0.62.4.tgz#c584d38ff3ada8de82d2890d46caf5d04b7b41e2" + integrity sha512-bRcnI99gZecNzrUr6kDMdwGHkhUuTPyvvadRdaOxHc9Ow3ANNyqymeFM1q5anZEUZt8h15TYN0mdyQyIWkU3zg== dependencies: - "@unocss/core" "0.60.3" - "@unocss/rule-utils" "0.60.3" + "@unocss/core" "0.62.4" + "@unocss/rule-utils" "0.62.4" gzip-size "^6.0.0" sirv "^2.0.4" -"@unocss/nuxt@0.60.3": - version "0.60.3" - resolved "https://registry.yarnpkg.com/@unocss/nuxt/-/nuxt-0.60.3.tgz#953bf15e520d664534514220c220f8def1d19b82" - integrity sha512-hUqtH4G3bKPmQTieyaNbdD4ATcpIQ1X/CCKidxJDR3NiAHw1kccEEeIBQIFuj1En5MzqFEERsgIA7Nx+VvI49g== - dependencies: - "@nuxt/kit" "^3.11.2" - "@unocss/config" "0.60.3" - "@unocss/core" "0.60.3" - "@unocss/preset-attributify" "0.60.3" - "@unocss/preset-icons" "0.60.3" - "@unocss/preset-tagify" "0.60.3" - "@unocss/preset-typography" "0.60.3" - "@unocss/preset-uno" "0.60.3" - "@unocss/preset-web-fonts" "0.60.3" - "@unocss/preset-wind" "0.60.3" - "@unocss/reset" "0.60.3" - "@unocss/vite" "0.60.3" - "@unocss/webpack" "0.60.3" - unocss "0.60.3" - -"@unocss/postcss@0.60.3": - version "0.60.3" - resolved "https://registry.yarnpkg.com/@unocss/postcss/-/postcss-0.60.3.tgz#1e6266968573278326e7c71039e612ca44dd7e47" - integrity sha512-7jRsKgMz4wr3Rvnr/RpK/7g6o8bMrqjTb01imgHeaw7cmQsa9sH1HPCp+4lvHh2/QKKLwwRAC+fdnNmsf8JKjA== - dependencies: - "@unocss/config" "0.60.3" - "@unocss/core" "0.60.3" - "@unocss/rule-utils" "0.60.3" +"@unocss/nuxt@^0.62.4": + version "0.62.4" + resolved "https://registry.yarnpkg.com/@unocss/nuxt/-/nuxt-0.62.4.tgz#3e202710a722399f191e852f06c7cd5bcb9b3515" + integrity sha512-ZNfXu/f2kIRc8rnstToR/s2ubcvWDaCPmV5jXL+SQytSPb1ONCkK7ITNgB2TtrTEqQyhNX33VlnHNF8KsM8PNA== + dependencies: + "@nuxt/kit" "^3.13.2" + "@unocss/config" "0.62.4" + "@unocss/core" "0.62.4" + "@unocss/preset-attributify" "0.62.4" + "@unocss/preset-icons" "0.62.4" + "@unocss/preset-tagify" "0.62.4" + "@unocss/preset-typography" "0.62.4" + "@unocss/preset-uno" "0.62.4" + "@unocss/preset-web-fonts" "0.62.4" + "@unocss/preset-wind" "0.62.4" + "@unocss/reset" "0.62.4" + "@unocss/vite" "0.62.4" + "@unocss/webpack" "0.62.4" + unocss "0.62.4" + +"@unocss/postcss@0.62.4": + version "0.62.4" + resolved "https://registry.yarnpkg.com/@unocss/postcss/-/postcss-0.62.4.tgz#003c46e958af19d8f9e8af5046e477abdc0a2a48" + integrity sha512-kWdHy7UsSP4bDu8I7sCKeO0VuzvVpNHmn2rifK5gNstUx5dZ1H/SoyXTHx5sKtgfZBRzdNXFu2nZ3PzYGvEFbw== + dependencies: + "@unocss/config" "0.62.4" + "@unocss/core" "0.62.4" + "@unocss/rule-utils" "0.62.4" css-tree "^2.3.1" - fast-glob "^3.3.2" - magic-string "^0.30.10" - postcss "^8.4.38" + postcss "^8.4.47" + tinyglobby "^0.2.6" -"@unocss/preset-attributify@0.60.3": - version "0.60.3" - resolved "https://registry.yarnpkg.com/@unocss/preset-attributify/-/preset-attributify-0.60.3.tgz#efec79c5fca01bb2ba82127a5827b698606ceb5c" - integrity sha512-G/Lx9xq/tVKvjp/CcACyLU+p3mcrpgkMvy+Z3NSHfBAZAmbieBMFhwROxt5R8Bny66q3fYDtxxx+likpokpOAQ== +"@unocss/preset-attributify@0.62.4": + version "0.62.4" + resolved "https://registry.yarnpkg.com/@unocss/preset-attributify/-/preset-attributify-0.62.4.tgz#673d9c3faafb61f50a30d46b56f895d1697eb631" + integrity sha512-ei5nNT58GON9iyCGRRiIrphzyQbBIZ9iEqSBhIY0flcfi1uAPUXV32aO2slqJnWWAIwbRSb1GMpwYR8mmfuz8g== dependencies: - "@unocss/core" "0.60.3" + "@unocss/core" "0.62.4" -"@unocss/preset-icons@0.60.3": - version "0.60.3" - resolved "https://registry.yarnpkg.com/@unocss/preset-icons/-/preset-icons-0.60.3.tgz#7f5e5ac7ee0897c1e9e5e9db64fc75db072ad835" - integrity sha512-L3Ecr36xC+Y8v5WMQcNsGoOzu0HpgNLh5RlC2abs8OyBDGn1k3UqdEFdrhRt3bXpln9b8JkstHO7ZwYPgr2/Cg== +"@unocss/preset-icons@0.62.4": + version "0.62.4" + resolved "https://registry.yarnpkg.com/@unocss/preset-icons/-/preset-icons-0.62.4.tgz#991921aded8606aceaf4f99f21c0a1d4cb6b3a3c" + integrity sha512-n9m2nRTxyiw0sqOwSioO3rro0kaPW0JJzWlzcfdwQ+ZORNR5WyJL298fLXYUFbZG3EOF+zSPg6CMDWudKk/tlA== dependencies: - "@iconify/utils" "^2.1.23" - "@unocss/core" "0.60.3" + "@iconify/utils" "^2.1.33" + "@unocss/core" "0.62.4" ofetch "^1.3.4" -"@unocss/preset-mini@0.60.3": - version "0.60.3" - resolved "https://registry.yarnpkg.com/@unocss/preset-mini/-/preset-mini-0.60.3.tgz#c757f7a430b7476791893dab164d10badb637400" - integrity sha512-7en8KBX3lN1Y6eCprbzA1QVfyXZD03B+oAxFXH8QPv5jRIL8Lm8sbXqE+VTsSME/OVp4DnS6LdGtDAm9mvIOSw== - dependencies: - "@unocss/core" "0.60.3" - "@unocss/extractor-arbitrary-variants" "0.60.3" - "@unocss/rule-utils" "0.60.3" - "@unocss/preset-mini@0.62.4": version "0.62.4" resolved "https://registry.yarnpkg.com/@unocss/preset-mini/-/preset-mini-0.62.4.tgz#e7804172b8f7f62fcf1788485195efcf5af2d9e3" @@ -1760,49 +1705,40 @@ dependencies: "@unocss/core" "0.62.4" -"@unocss/preset-tagify@0.60.3": - version "0.60.3" - resolved "https://registry.yarnpkg.com/@unocss/preset-tagify/-/preset-tagify-0.60.3.tgz#33afdf532e5bad0462c1e3def4f7a105184d8f69" - integrity sha512-pzD6bgtGuIk7M1n/JQiR6EpwnVvafSTHoM70Jhf+T8MSuatDb+KFJCn3VELV2v38aikcUY5cTf95jqHQdzOAhQ== +"@unocss/preset-tagify@0.62.4": + version "0.62.4" + resolved "https://registry.yarnpkg.com/@unocss/preset-tagify/-/preset-tagify-0.62.4.tgz#9179aa57bdf3070d4193af0eed46703588881cc2" + integrity sha512-8b2Kcsvt93xu1JqDqcD3QvvW0L5rqvH7ev3BlNEVx6n8ayBqfB5HEd4ILKr7wSC90re+EnCgnMm7EP2FiQAJkw== dependencies: - "@unocss/core" "0.60.3" + "@unocss/core" "0.62.4" -"@unocss/preset-typography@0.60.3": - version "0.60.3" - resolved "https://registry.yarnpkg.com/@unocss/preset-typography/-/preset-typography-0.60.3.tgz#e93f0c2448d90bf2d53bffba4f771fe537b9e5e4" - integrity sha512-cOXOnxkgH0ZiYg/oHBbabzXi1q6oTZWgQ4fqrVxGI2CD4oiWYaPU/wzKsx930D6uBSIlBVDX/cov2j0dPWjgJg== +"@unocss/preset-typography@0.62.4": + version "0.62.4" + resolved "https://registry.yarnpkg.com/@unocss/preset-typography/-/preset-typography-0.62.4.tgz#8b91042b2c2b022f0715c55c08136a6461a93ba5" + integrity sha512-ZVh+NbcibMmD6ve8Deub/G+XAFcGPuzE2Fx/tMAfWfYlfyOAtrMxuL+AARMthpRxdE0JOtggXNTrJb0ZhGYl9g== dependencies: - "@unocss/core" "0.60.3" - "@unocss/preset-mini" "0.60.3" + "@unocss/core" "0.62.4" + "@unocss/preset-mini" "0.62.4" -"@unocss/preset-uno@0.60.3": - version "0.60.3" - resolved "https://registry.yarnpkg.com/@unocss/preset-uno/-/preset-uno-0.60.3.tgz#e0012d493e796adfbaaf3739aebbb829c5a5fb35" - integrity sha512-PJSR78uaIRTsD9RFSQLwsrGAsjQoW5nWenU4n4GyZeskDsyQVgOcaKtvh+0aYjYdWBa1UvxeUL8Y+m29K4HnAA== +"@unocss/preset-uno@0.62.4": + version "0.62.4" + resolved "https://registry.yarnpkg.com/@unocss/preset-uno/-/preset-uno-0.62.4.tgz#aa393a6dca7025e1227eba7cad910f6e2ea310eb" + integrity sha512-2S6+molIz8dH/al0nfkU7i/pMS0oERPr4k9iW80Byt4cKDIhh/0jhZrC83kgZRtCf5hclSBO4oCoMTi1JF7SBw== dependencies: - "@unocss/core" "0.60.3" - "@unocss/preset-mini" "0.60.3" - "@unocss/preset-wind" "0.60.3" - "@unocss/rule-utils" "0.60.3" + "@unocss/core" "0.62.4" + "@unocss/preset-mini" "0.62.4" + "@unocss/preset-wind" "0.62.4" + "@unocss/rule-utils" "0.62.4" -"@unocss/preset-web-fonts@0.60.3": - version "0.60.3" - resolved "https://registry.yarnpkg.com/@unocss/preset-web-fonts/-/preset-web-fonts-0.60.3.tgz#6bd559d7ae9367cfabea85f5753a94441c09afe3" - integrity sha512-uYHvnqgLDawG3o9oBbasPWbSZ93kzk2JQBcH6xmHh7xqYtRdHqVbUjVU1zIqSjXm19SxFriSrNTl4ct2+/pJIg== +"@unocss/preset-web-fonts@0.62.4": + version "0.62.4" + resolved "https://registry.yarnpkg.com/@unocss/preset-web-fonts/-/preset-web-fonts-0.62.4.tgz#3360ede20c79a7aee1c7ff8b7fced1e52b0c5f31" + integrity sha512-kaxgYBVyMdBlErseN8kWLiaS2N5OMlwg5ktAxUlei275fMoY7inQjOwppnjDVveJbN9SP6TcqqFpBIPfUayPkQ== dependencies: - "@unocss/core" "0.60.3" + "@unocss/core" "0.62.4" ofetch "^1.3.4" -"@unocss/preset-wind@0.60.3": - version "0.60.3" - resolved "https://registry.yarnpkg.com/@unocss/preset-wind/-/preset-wind-0.60.3.tgz#6100ba1290888052eeb2da07f66d3b2ae5e15a90" - integrity sha512-q7yDJ/SyEkPmPBJvIeHd9Bt50LAu65q7WwKxJYfJkjfJvJUMj6DO8FgPnpeiwBeJh9897m2Ap6zoQ3JqBjPLHQ== - dependencies: - "@unocss/core" "0.60.3" - "@unocss/preset-mini" "0.60.3" - "@unocss/rule-utils" "0.60.3" - -"@unocss/preset-wind@^0.62.4": +"@unocss/preset-wind@0.62.4", "@unocss/preset-wind@^0.62.4": version "0.62.4" resolved "https://registry.yarnpkg.com/@unocss/preset-wind/-/preset-wind-0.62.4.tgz#a77dd0008a1e54f80eef7e4ba199c9298587d999" integrity sha512-YOzfQ11AmAnl1ZkcWLMMxCdezLjRKavLNk38LumUMtcdsa0DAy+1JjTp+KEvVQAnD+Et/ld5X+YcBWJkVy5WFQ== @@ -1811,18 +1747,10 @@ "@unocss/preset-mini" "0.62.4" "@unocss/rule-utils" "0.62.4" -"@unocss/reset@0.60.3": - version "0.60.3" - resolved "https://registry.yarnpkg.com/@unocss/reset/-/reset-0.60.3.tgz#2addaa351ecb968cc08e54fee70c7350ab03f8d1" - integrity sha512-EuC8gkh8L8WvPOcjS/KqprEJXIKcpBPm+ou5G9D6WgDmJ+TgQrri5oR+QUmOmEnueQkVL7bnkFkIKeg71SJLFA== - -"@unocss/rule-utils@0.60.3": - version "0.60.3" - resolved "https://registry.yarnpkg.com/@unocss/rule-utils/-/rule-utils-0.60.3.tgz#db23267b1dce2636af7e995964b34c248f2ca745" - integrity sha512-I47/DcKQ2z12W80+Ffth0K6LzNvqcQPYRWk7KwVemVoEiGYamMV8/s+SbB26Fk9KUFjh+Ns/pGAo4iJZo0ueUQ== - dependencies: - "@unocss/core" "^0.60.3" - magic-string "^0.30.10" +"@unocss/reset@0.62.4": + version "0.62.4" + resolved "https://registry.yarnpkg.com/@unocss/reset/-/reset-0.62.4.tgz#10cfea862e9ff04dda7f33b4d7f6ff3f5d5462de" + integrity sha512-CtxjeDgN39fY/eZDLIXN4wy7C8W7+SD+41AlzGVU5JwhcXmnb1XoDpOd2lzMxc/Yy3F5dIJt2+MRDj9RnpX9Ew== "@unocss/rule-utils@0.62.4": version "0.62.4" @@ -1832,87 +1760,63 @@ "@unocss/core" "^0.62.4" magic-string "^0.30.11" -"@unocss/scope@0.60.3": - version "0.60.3" - resolved "https://registry.yarnpkg.com/@unocss/scope/-/scope-0.60.3.tgz#0b25079d692e1004af422a5fb64bc01f8b19c6ab" - integrity sha512-uDUcBkFe8nRwNiU4YQyrOCjY7/+qFJI/Qr0eouMPOSEsQ6uIXQEWjykqUBJg2fvm0S2vbfBGO9tO/wCDIk5O3w== - -"@unocss/transformer-attributify-jsx-babel@0.60.3": - version "0.60.3" - resolved "https://registry.yarnpkg.com/@unocss/transformer-attributify-jsx-babel/-/transformer-attributify-jsx-babel-0.60.3.tgz#143ee8896577caa98ad6ca353c0810523e93b2e1" - integrity sha512-6WcEFPSaxscGR22dRUcNqY0ippC3/Q/LBVFVSCJh++hoIPVCZbxF505cPq/bOdF2bpNzj9yXW0OJt03nB505Hg== - dependencies: - "@babel/core" "^7.24.5" - "@babel/plugin-syntax-jsx" "^7.24.1" - "@babel/preset-typescript" "^7.24.1" - "@unocss/core" "0.60.3" - -"@unocss/transformer-attributify-jsx@0.60.3": - version "0.60.3" - resolved "https://registry.yarnpkg.com/@unocss/transformer-attributify-jsx/-/transformer-attributify-jsx-0.60.3.tgz#7c777348bca376dff66c6f73d74fb901c3a678ca" - integrity sha512-zcPu4tUm/1EnqcFpf6+XzUzfb2BzJBcfNMkFzl/5BSTMECEDgdj4QGBWxnTuSlSZs4digRABGtuAHUO7k1qfgA== +"@unocss/transformer-attributify-jsx@0.62.4": + version "0.62.4" + resolved "https://registry.yarnpkg.com/@unocss/transformer-attributify-jsx/-/transformer-attributify-jsx-0.62.4.tgz#127cb50491bb207d604a51eacdf81bc76491b278" + integrity sha512-z9DDqS2DibDR9gno55diKfAVegeJ9uoyQXQhH3R0KY4YMF49N1fWy/t74gOiHtlPmvjQtDRZYgjgaMCc2w8oWg== dependencies: - "@unocss/core" "0.60.3" + "@unocss/core" "0.62.4" -"@unocss/transformer-compile-class@0.60.3": - version "0.60.3" - resolved "https://registry.yarnpkg.com/@unocss/transformer-compile-class/-/transformer-compile-class-0.60.3.tgz#2a5239d99822b7c790b8ee520f4f2ba55e26930e" - integrity sha512-j6wiYgtNqMlrctaZUuN4S+vANW0DMb9wW3KbJ2XvB7lXftfY1bbZ3IKenAyFp0ZLdKs69B6irJbCbIS5OAKKXQ== +"@unocss/transformer-compile-class@0.62.4": + version "0.62.4" + resolved "https://registry.yarnpkg.com/@unocss/transformer-compile-class/-/transformer-compile-class-0.62.4.tgz#14c81f8df74263d7c5420cfaaa1700198e8f55e7" + integrity sha512-8yadY9T7LToJwSsrmYU3rUKlnDgPGVRvON7z9g1IjUCmFCGx7Gpg84x9KpKUG6eUTshPQFUI0YUHocrYFevAEA== dependencies: - "@unocss/core" "0.60.3" + "@unocss/core" "0.62.4" -"@unocss/transformer-directives@0.60.3": - version "0.60.3" - resolved "https://registry.yarnpkg.com/@unocss/transformer-directives/-/transformer-directives-0.60.3.tgz#bedb2c18e91804b7bac398b0a0949c69a3a29fbe" - integrity sha512-JuFpxyB1yvS2YoiguO5+8Ou6k9yyojZCnnDYXXZqMGLp1KdLiDcAPZQyShoD5HLzPGHtAbQELUz9TcX3VMLEoQ== +"@unocss/transformer-directives@0.62.4": + version "0.62.4" + resolved "https://registry.yarnpkg.com/@unocss/transformer-directives/-/transformer-directives-0.62.4.tgz#35e4c7c540a445f7c562c5a3e566e6ee80a350c8" + integrity sha512-bq9ZDG6/mr6X2mAogAo0PBVrLSLT0900MPqnj/ixadYHc7mRpX+y6bc/1AgWytZIFYSdNzf7XDoquZuwf42Ucg== dependencies: - "@unocss/core" "0.60.3" - "@unocss/rule-utils" "0.60.3" + "@unocss/core" "0.62.4" + "@unocss/rule-utils" "0.62.4" css-tree "^2.3.1" -"@unocss/transformer-variant-group@0.60.3": - version "0.60.3" - resolved "https://registry.yarnpkg.com/@unocss/transformer-variant-group/-/transformer-variant-group-0.60.3.tgz#6bb5a595fda45e86fdf9c36bc0bdd88470630202" - integrity sha512-jQg0+W49jA7Z+4mRQbZWZKV6aXJXQfAHRC3oo4C9vEyTXL2jb952K12XVcJhXnbLYpnUKwytR+vbshXMIHWZwA== - dependencies: - "@unocss/core" "0.60.3" - -"@unocss/transformer-variant-group@^0.62.4": +"@unocss/transformer-variant-group@0.62.4", "@unocss/transformer-variant-group@^0.62.4": version "0.62.4" resolved "https://registry.yarnpkg.com/@unocss/transformer-variant-group/-/transformer-variant-group-0.62.4.tgz#746efd83c46a331a1e81a7705c6807df1ca93ece" integrity sha512-W1fxMc2Lzxu4E+6JBQEBzK+AwoCQYI+EL2FT2BCUsAno37f3JdnwFFEVscck0epSdmdtidsSLDognyX8h10r8A== dependencies: "@unocss/core" "0.62.4" -"@unocss/vite@0.60.3": - version "0.60.3" - resolved "https://registry.yarnpkg.com/@unocss/vite/-/vite-0.60.3.tgz#07d6975ea6f18b82b85622335c49439d88406e02" - integrity sha512-I3EOR3g245IGDp3DS17AQAMwNQrh6L6kIlXG3+wt5IZ1zu1ahZmKA8/xxh6oo2TNdu4rI6nQbcLIRn+8eSyfQw== +"@unocss/vite@0.62.4": + version "0.62.4" + resolved "https://registry.yarnpkg.com/@unocss/vite/-/vite-0.62.4.tgz#10131bf52f305984e9d520d7e62d46e68e9c5736" + integrity sha512-JKq3V6bcevYl9X5Jl3p9crArbhzI8JVWQkOxKV2nGLFaqvnc47vMSDxlU4MUdRWp3aQvzDw132tcx27oSbrojw== dependencies: "@ampproject/remapping" "^2.3.0" "@rollup/pluginutils" "^5.1.0" - "@unocss/config" "0.60.3" - "@unocss/core" "0.60.3" - "@unocss/inspector" "0.60.3" - "@unocss/scope" "0.60.3" - "@unocss/transformer-directives" "0.60.3" + "@unocss/config" "0.62.4" + "@unocss/core" "0.62.4" + "@unocss/inspector" "0.62.4" chokidar "^3.6.0" - fast-glob "^3.3.2" - magic-string "^0.30.10" + magic-string "^0.30.11" + tinyglobby "^0.2.6" -"@unocss/webpack@0.60.3": - version "0.60.3" - resolved "https://registry.yarnpkg.com/@unocss/webpack/-/webpack-0.60.3.tgz#fbf398850ac5663d95aefc9250997be2e2170b82" - integrity sha512-ZAGFfosulC9cN8dlKHyLdY/4KT0Ku/XbefjgX2t4VpramatzwXvc/V4wm2+Wmmb7lucXUFLhD7uoERJe/JgHFA== +"@unocss/webpack@0.62.4": + version "0.62.4" + resolved "https://registry.yarnpkg.com/@unocss/webpack/-/webpack-0.62.4.tgz#6cf0b4461d59f194891e69f2df5472890d43b750" + integrity sha512-hccXqpssqi1DyPJOwyIB3IhYe5SWND2JwTPxVTg8wO9fI1JvEK5DxK8FflJpXVps7QjotCmB/AXp0ezD0SutUg== dependencies: "@ampproject/remapping" "^2.3.0" "@rollup/pluginutils" "^5.1.0" - "@unocss/config" "0.60.3" - "@unocss/core" "0.60.3" + "@unocss/config" "0.62.4" + "@unocss/core" "0.62.4" chokidar "^3.6.0" - fast-glob "^3.3.2" - magic-string "^0.30.10" - unplugin "^1.10.1" + magic-string "^0.30.11" + tinyglobby "^0.2.6" + unplugin "^1.14.1" webpack-sources "^3.2.3" "@vercel/nft@^0.26.5": @@ -5435,7 +5339,7 @@ postcss-value-parser@^4.2.0: resolved "https://registry.yarnpkg.com/postcss-value-parser/-/postcss-value-parser-4.2.0.tgz#723c09920836ba6d3e5af019f92bc0971c02e514" integrity sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ== -postcss@^8.4.38, postcss@^8.4.43, postcss@^8.4.47: +postcss@^8.4.43, postcss@^8.4.47: version "8.4.47" resolved "https://registry.yarnpkg.com/postcss/-/postcss-8.4.47.tgz#5bf6c9a010f3e724c503bf03ef7947dcb0fea365" integrity sha512-56rxCq7G/XfB4EkXq9Egn5GCqugWvDFjafDOThIdMBsI15iqPqR5r15TfSr1YPYeEI19YeaXMCbY6u88Y76GLQ== @@ -6313,15 +6217,6 @@ ultrahtml@^1.5.3: resolved "https://registry.yarnpkg.com/ultrahtml/-/ultrahtml-1.5.3.tgz#e7a903a4b28a0e49b71b0801b444050bb0a369c7" integrity sha512-GykOvZwgDWZlTQMtp5jrD4BVL+gNn2NVlVafjcFUJ7taY20tqYdwdoWBFy6GBJsNTZe1GkGPkSl5knQAjtgceg== -unconfig@^0.3.13: - version "0.3.13" - resolved "https://registry.yarnpkg.com/unconfig/-/unconfig-0.3.13.tgz#8612d57811c1316f30d95f45bb96ce8ce8afc10c" - integrity sha512-N9Ph5NC4+sqtcOjPfHrRcHekBCadCXWTBzp2VYYbySOHW0PfD9XLCeXshTXjkPYwLrBr9AtSeU0CZmkYECJhng== - dependencies: - "@antfu/utils" "^0.7.7" - defu "^6.1.4" - jiti "^1.21.0" - unconfig@^0.5.5: version "0.5.5" resolved "https://registry.yarnpkg.com/unconfig/-/unconfig-0.5.5.tgz#5026af9c50211fc7f2c866953674b17f6b49f09a" @@ -6441,31 +6336,28 @@ universalify@^2.0.0: resolved "https://registry.yarnpkg.com/universalify/-/universalify-2.0.1.tgz#168efc2180964e6386d061e094df61afe239b18d" integrity sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw== -unocss@0.60.3: - version "0.60.3" - resolved "https://registry.yarnpkg.com/unocss/-/unocss-0.60.3.tgz#bbe5d53bf0c3facd8c124fdbe9e679977ce40d34" - integrity sha512-pUBbpgGRKCa6oB/LrGEFBWP2/2E1ZOY8XO7aVJKo2x10rqLS8tGykn1VoBUgbGJsv/8W8tskTVz+RFbCyKP+kA== - dependencies: - "@unocss/astro" "0.60.3" - "@unocss/cli" "0.60.3" - "@unocss/core" "0.60.3" - "@unocss/extractor-arbitrary-variants" "0.60.3" - "@unocss/postcss" "0.60.3" - "@unocss/preset-attributify" "0.60.3" - "@unocss/preset-icons" "0.60.3" - "@unocss/preset-mini" "0.60.3" - "@unocss/preset-tagify" "0.60.3" - "@unocss/preset-typography" "0.60.3" - "@unocss/preset-uno" "0.60.3" - "@unocss/preset-web-fonts" "0.60.3" - "@unocss/preset-wind" "0.60.3" - "@unocss/reset" "0.60.3" - "@unocss/transformer-attributify-jsx" "0.60.3" - "@unocss/transformer-attributify-jsx-babel" "0.60.3" - "@unocss/transformer-compile-class" "0.60.3" - "@unocss/transformer-directives" "0.60.3" - "@unocss/transformer-variant-group" "0.60.3" - "@unocss/vite" "0.60.3" +unocss@0.62.4: + version "0.62.4" + resolved "https://registry.yarnpkg.com/unocss/-/unocss-0.62.4.tgz#5afc20dda5513ff23f84613f2975951682cb2a75" + integrity sha512-SaGbxXQkk8GDPeJpWsBCZ8a23Knu4ixVTt6pvcQWKjOCGTd9XBd+vLZzN2WwdwgBPVwmMmx5wp+/gPHKFNOmIw== + dependencies: + "@unocss/astro" "0.62.4" + "@unocss/cli" "0.62.4" + "@unocss/core" "0.62.4" + "@unocss/postcss" "0.62.4" + "@unocss/preset-attributify" "0.62.4" + "@unocss/preset-icons" "0.62.4" + "@unocss/preset-mini" "0.62.4" + "@unocss/preset-tagify" "0.62.4" + "@unocss/preset-typography" "0.62.4" + "@unocss/preset-uno" "0.62.4" + "@unocss/preset-web-fonts" "0.62.4" + "@unocss/preset-wind" "0.62.4" + "@unocss/transformer-attributify-jsx" "0.62.4" + "@unocss/transformer-compile-class" "0.62.4" + "@unocss/transformer-directives" "0.62.4" + "@unocss/transformer-variant-group" "0.62.4" + "@unocss/vite" "0.62.4" unplugin-vue-router@^0.10.8: version "0.10.8" @@ -6487,7 +6379,7 @@ unplugin-vue-router@^0.10.8: unplugin "^1.12.2" yaml "^2.5.0" -unplugin@^1.0.1, unplugin@^1.10.0, unplugin@^1.10.1, unplugin@^1.12.2, unplugin@^1.14.1, unplugin@^1.3.1, unplugin@^1.8.3: +unplugin@^1.0.1, unplugin@^1.10.0, unplugin@^1.12.2, unplugin@^1.14.1, unplugin@^1.3.1, unplugin@^1.8.3: version "1.14.1" resolved "https://registry.yarnpkg.com/unplugin/-/unplugin-1.14.1.tgz#c76d6155a661e43e6a897bce6b767a1ecc344c1a" integrity sha512-lBlHbfSFPToDYp9pjXlUEFVxYLaue9f9T1HC+4OHlmj+HnMDdz9oZY+erXfoCe/5V/7gKUSY2jpXPb9S7f0f/w==