From 8dafbc48452d351ebe7af042909701e0d13688d9 Mon Sep 17 00:00:00 2001 From: arvinxx Date: Sun, 19 Feb 2023 12:18:07 +0800 Subject: [PATCH] =?UTF-8?q?:sparkles:=20feat:=20=E7=A7=BB=E9=99=A4?= =?UTF-8?q?=E8=8B=A5=E5=B9=B2=E6=97=A0=E7=94=A8api=20=E5=B9=B6=E8=B0=83?= =?UTF-8?q?=E6=95=B4=E6=A0=B7=E5=BC=8F=E8=A1=A8=E5=AE=9E=E4=BE=8B=E4=B8=BA?= =?UTF-8?q?=20styleManager?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/functions/createInstance.ts | 11 ++--------- src/functions/index.ts | 10 ++-------- 2 files changed, 4 insertions(+), 17 deletions(-) diff --git a/src/functions/createInstance.ts b/src/functions/createInstance.ts index dcc9aeca..b6022192 100644 --- a/src/functions/createInstance.ts +++ b/src/functions/createInstance.ts @@ -41,8 +41,7 @@ export const createInstance = (options: CreateOptions) => { const emotion = createEmotion({ key: defaultKey, speedy: options.speedy }); - const { cache, sheet, hydrate, injectGlobal, keyframes, flush, merge, getRegisteredStyles } = - emotion; + const { cache, injectGlobal, keyframes } = emotion; const classNameGenerator = createClassNameGenerator(cache, options.hashPriority); const cx = createCX(classNameGenerator, emotion.cx); @@ -92,13 +91,7 @@ export const createInstance = (options: CreateOptions) => { //******************** // //**** 样式表管理 **** // //******************** // - cache, - sheet, - flush, - merge, - hydrate, - getRegisteredStyles, - styleInstance: emotion, + styleManager: emotion, // ******************** // // ***** 主题相关 ***** // // ******************** // diff --git a/src/functions/index.ts b/src/functions/index.ts index 4ab20511..1cdb65ac 100644 --- a/src/functions/index.ts +++ b/src/functions/index.ts @@ -14,19 +14,13 @@ export const { css, cx, keyframes, - //**** 样式表管理 **** // - styleInstance: emotion, /** * @deprecated */ injectGlobal, - flush, - hydrate, - sheet, - cache, - getRegisteredStyles, + //**** 样式表管理 **** // + styleManager, // ***** 主题相关 ***** // - EmotionContext, ThemeProvider, StyleProvider, useTheme,