From 27c2db357133e7a2c243a74371cdd0a73a9c7c5e Mon Sep 17 00:00:00 2001 From: Chris Date: Mon, 26 Aug 2024 16:30:03 +0800 Subject: [PATCH] fix: update import module --- packages/core/package.json | 1 + packages/core/src/core/autocomplete.ts | 2 +- packages/core/src/core/extractors.ts | 2 +- packages/core/src/core/postprocess.ts | 2 +- packages/core/src/core/preflights/index.ts | 2 +- packages/core/src/core/preflights/reset.ts | 2 +- packages/core/src/core/rules.ts | 2 +- packages/core/src/core/shortcuts.ts | 2 +- packages/core/src/core/variants/active.ts | 2 +- packages/core/src/core/variants/index.ts | 2 +- packages/core/src/index.ts | 4 ++-- packages/core/src/meta.ts | 2 +- packages/core/src/types.ts | 2 +- packages/core/src/utils.ts | 2 +- pnpm-lock.yaml | 3 +++ 15 files changed, 18 insertions(+), 14 deletions(-) diff --git a/packages/core/package.json b/packages/core/package.json index bfddf7f..4f91005 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -49,6 +49,7 @@ "unocss": "^0.62.2" }, "dependencies": { + "@unocss/core": "^0.62.2", "@unocss/preset-attributify": "^0.62.2", "@unocss/preset-icons": "^0.62.2", "@unocss/preset-mini": "^0.62.2", diff --git a/packages/core/src/core/autocomplete.ts b/packages/core/src/core/autocomplete.ts index 83fc64e..f9ba4a8 100644 --- a/packages/core/src/core/autocomplete.ts +++ b/packages/core/src/core/autocomplete.ts @@ -1,4 +1,4 @@ -import type { UserConfig } from 'unocss' +import type { UserConfig } from '@unocss/core' import { magicAnimate } from './theme/magic-animate' const keyframes = magicAnimate()?.keyframes ?? {} diff --git a/packages/core/src/core/extractors.ts b/packages/core/src/core/extractors.ts index 8b1d090..c9f3f9c 100644 --- a/packages/core/src/core/extractors.ts +++ b/packages/core/src/core/extractors.ts @@ -1,4 +1,4 @@ -import type { Extractor } from 'unocss' +import type { Extractor } from '@unocss/core' // IN-README-START // https://github.com/unocss/unocss/pull/2485 diff --git a/packages/core/src/core/postprocess.ts b/packages/core/src/core/postprocess.ts index cb82859..2d30016 100644 --- a/packages/core/src/core/postprocess.ts +++ b/packages/core/src/core/postprocess.ts @@ -1,4 +1,4 @@ -import type { Postprocessor } from 'unocss' +import type { Postprocessor } from '@unocss/core' const rgbaRE = /rgba\(((?:\d+,?){3}),([^)]*)\)/ diff --git a/packages/core/src/core/preflights/index.ts b/packages/core/src/core/preflights/index.ts index fcfc629..f7bf683 100644 --- a/packages/core/src/core/preflights/index.ts +++ b/packages/core/src/core/preflights/index.ts @@ -1,4 +1,4 @@ -import type { Preflight } from 'unocss' +import type { Preflight } from '@unocss/core' import type { ResolvedOptions } from '../../types' import { resetPreflight } from './reset' diff --git a/packages/core/src/core/preflights/reset.ts b/packages/core/src/core/preflights/reset.ts index 151d668..21ff35d 100644 --- a/packages/core/src/core/preflights/reset.ts +++ b/packages/core/src/core/preflights/reset.ts @@ -1,4 +1,4 @@ -import type { Preflight } from 'unocss' +import type { Preflight } from '@unocss/core' import { layerMeta } from '../../meta' const resetCSS = ` diff --git a/packages/core/src/core/rules.ts b/packages/core/src/core/rules.ts index 5e05251..0603be6 100644 --- a/packages/core/src/core/rules.ts +++ b/packages/core/src/core/rules.ts @@ -1,5 +1,5 @@ import { parseColor } from '@unocss/preset-mini/utils' -import type { Rule, RuleMeta } from 'unocss' +import type { Rule, RuleMeta } from '@unocss/core' import { layerMeta } from '../meta' // IN-README-START diff --git a/packages/core/src/core/shortcuts.ts b/packages/core/src/core/shortcuts.ts index 3325443..3c29535 100644 --- a/packages/core/src/core/shortcuts.ts +++ b/packages/core/src/core/shortcuts.ts @@ -1,4 +1,4 @@ -import type { RuleMeta, StaticShortcut } from 'unocss' +import type { RuleMeta, StaticShortcut } from '@unocss/core' import { layerMeta } from '../meta' import type { CustomStaticShortcuts } from '../types' diff --git a/packages/core/src/core/variants/active.ts b/packages/core/src/core/variants/active.ts index e1cd34d..14b2224 100644 --- a/packages/core/src/core/variants/active.ts +++ b/packages/core/src/core/variants/active.ts @@ -1,4 +1,4 @@ -import type { VariantObject } from 'unocss' +import type { VariantObject } from '@unocss/core' export const v_active: VariantObject = { name: '@active', diff --git a/packages/core/src/core/variants/index.ts b/packages/core/src/core/variants/index.ts index 34aeb45..1045b20 100644 --- a/packages/core/src/core/variants/index.ts +++ b/packages/core/src/core/variants/index.ts @@ -1,4 +1,4 @@ -import type { Variant } from 'unocss' +import type { Variant } from '@unocss/core' import type { Theme } from '@unocss/preset-mini' import type { ResolvedOptions } from '../../types' import { v_active } from './active' diff --git a/packages/core/src/index.ts b/packages/core/src/index.ts index f730990..e7b700f 100644 --- a/packages/core/src/index.ts +++ b/packages/core/src/index.ts @@ -1,5 +1,5 @@ -import type { Postprocessor, PresetFactory } from 'unocss' -import { definePreset } from 'unocss' +import type { Postprocessor, PresetFactory } from '@unocss/core' +import { definePreset } from '@unocss/core' import { PRESET_NAME } from './meta' import { autocomplete, extractors, preflights, rules, shortcuts, variants } from './core' import { importantProcess, postprocessWithUnColor } from './core/postprocess' diff --git a/packages/core/src/meta.ts b/packages/core/src/meta.ts index 6a7b0a4..fbf173c 100644 --- a/packages/core/src/meta.ts +++ b/packages/core/src/meta.ts @@ -1,4 +1,4 @@ -import type { RuleMeta } from 'unocss' +import type { RuleMeta } from '@unocss/core' export const PRESET_NAME = 'useful' diff --git a/packages/core/src/types.ts b/packages/core/src/types.ts index 0894f25..317c209 100644 --- a/packages/core/src/types.ts +++ b/packages/core/src/types.ts @@ -7,7 +7,7 @@ import type { TagifyOptions } from '@unocss/preset-tagify' import type { RemToPxOptions } from '@unocss/preset-rem-to-px' import type { PresetScrollbarDefaultOption } from 'unocss-preset-scrollbar' import type { Theme } from '@unocss/preset-mini' -import type { CSSObject, Preset, SourceCodeTransformer, StaticShortcut } from 'unocss' +import type { CSSObject, Preset, SourceCodeTransformer, StaticShortcut } from '@unocss/core' import type { TransformerDirectivesOptions } from '@unocss/transformer-directives' import type { TransformerVariantGroupOptions } from '@unocss/transformer-variant-group' import type { CompileClassOptions } from '@unocss/transformer-compile-class' diff --git a/packages/core/src/utils.ts b/packages/core/src/utils.ts index f428f18..cf4c32a 100644 --- a/packages/core/src/utils.ts +++ b/packages/core/src/utils.ts @@ -1,7 +1,7 @@ import type { ThemeAnimation } from '@unocss/preset-mini' import postcss from 'postcss' import postcssJs, { objectify } from 'postcss-js' -import type { CSSObject } from 'unocss' +import type { CSSObject } from '@unocss/core' import type { CustomStaticShortcuts, DeepPartial, Objectiable } from './types' // name duration timing-function iteration-count diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 7323314..b17c74b 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -68,6 +68,9 @@ importers: packages/core: dependencies: + '@unocss/core': + specifier: ^0.62.2 + version: 0.62.2 '@unocss/preset-attributify': specifier: ^0.62.2 version: 0.62.2