Skip to content

Commit

Permalink
chore: update
Browse files Browse the repository at this point in the history
  • Loading branch information
zyyv committed Dec 26, 2023
1 parent 4527755 commit 810a99f
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
{
"name": "@unplugin-unocss-config/monorepo",
"type": "module",
"version": "0.0.10",
"private": true,
Expand Down
9 changes: 6 additions & 3 deletions packages/core/client.d.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/* Generated by 'unplugin-unocss-config' */

import type { Arrayable, CSSObject } from 'unocss'

interface ThemeAnimation {
Expand Down Expand Up @@ -77,11 +78,13 @@ interface Theme {
preflightBase?: Record<string, string | number>
}

declare const __UNO__: Pick<ReturnType<typeof import('unocss').createGenerator<Theme>>, 'config' | 'userConfig' | 'version' | 'blocked'>
declare global {
const __UNO__: Pick<ReturnType<typeof import('unocss').createGenerator<Theme>>, 'config' | 'userConfig' | 'version' | 'blocked'>

declare const __UNO_CONFIG__: import('unocss').UserConfig<Theme>
const __UNO_CONFIG__: import('unocss').UserConfig<Theme>

declare const __UNO_THEME__: Theme
const __UNO_THEME__: Theme
}

interface ImportMetaEnv {
readonly __UNO__: Pick<ReturnType<typeof import('unocss').createGenerator<Theme>>, 'config' | 'userConfig' | 'version' | 'blocked'>
Expand Down
5 changes: 2 additions & 3 deletions playground/app.vue
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
<script lang='ts' setup>
console.log(__UNO__)
console.log(import.meta.env.__UNO_THEME__)
console.log(import.meta.env.__UNO__)
console.log(__UNO_CONFIG__)
const presets = __UNO_CONFIG__.presets?.map((p: any) => p.name)
const transformers = import.meta.env.__UNO__.userConfig.transformers?.map((t: any) => t.name)
const transformers = import.meta.env.__UNO_CONFIG__.transformers?.map((t: any) => t.name)
</script>

<template>
Expand Down

0 comments on commit 810a99f

Please sign in to comment.