Skip to content
This repository was archived by the owner on Jan 30, 2025. It is now read-only.

Commit efc120c

Browse files
committed
feat(*): Changed filename and function name at sheetCompiler and styleCompiler
1 parent ebcc0b6 commit efc120c

File tree

7 files changed

+13
-13
lines changed

7 files changed

+13
-13
lines changed

src/_internal/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,5 @@ export { genBase62Hash } from './utils/hash';
55
export { injectCSS } from './utils/inject-css';
66
export { injectCSSGlobal } from './utils/inject-css-global';
77
export { buildIn } from './utils/build-in';
8-
export { cssCodeGenSheet } from './utils/css-codegen-sheet';
9-
export { cssCodeGenStyle } from './utils/css-codegen-style';
8+
export { sheetCompiler } from './utils/sheet-compiler';
9+
export { styleCompiler } from './utils/style-compiler';
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { pseudo, camelToKebabCase, isClassesObjectType, exception } from '..';
2-
import type { PropertyType, ClassesObjectType, CustomCSSProperties, CustomHTMLType } from '../types';
2+
import type { PropertyType, ClassesObjectType, CustomCSSProperties, CustomHTMLType } from '..';
33

4-
export function cssCodeGenSheet(object: ClassesObjectType | CustomHTMLType, base62Hash?: string, core?: string) {
4+
export function sheetCompiler(object: ClassesObjectType | CustomHTMLType, base62Hash?: string, core?: string) {
55
let styleSheet = '';
66
let bigIndent = false;
77
const mediaQueries: Record<string, string> = {};
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { camelToKebabCase, exception, pseudo } from '..';
22
import type { CustomCSSProperties, PropertyType } from '..';
33

4-
export function cssCodeGenStyle<T extends CustomCSSProperties>(object: T, base62Hash?: string, root?: string) {
4+
export function styleCompiler<T extends CustomCSSProperties>(object: T, base62Hash?: string, root?: string) {
55
const classNameType = () => {
66
if (root === '--root') return ':root';
77
else return '._' + base62Hash;

src/core/method/create.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
import type { ReturnStyleType, ClassesObjectType, ExactClassesObjectType } from '../../_internal';
2-
import { cssCodeGenSheet, isInDevelopment, injectCSS, genBase62Hash } from '../../_internal';
2+
import { sheetCompiler, isInDevelopment, injectCSS, genBase62Hash } from '../../_internal';
33
import styles from '../styles/style.module.css';
44
import { createGlobalStyleSheetPromise, globalStyleSheetPromise, resolveGlobalStyleSheet } from './create-build-in-helper';
55

66
export function create<T extends ClassesObjectType>(object: ExactClassesObjectType<T> | ClassesObjectType): ReturnStyleType<T> {
77
const base62Hash = genBase62Hash(object, 5);
8-
const { styleSheet } = cssCodeGenSheet(object, base62Hash);
8+
const { styleSheet } = sheetCompiler(object, base62Hash);
99
if (typeof globalStyleSheetPromise === 'undefined') createGlobalStyleSheetPromise();
1010
resolveGlobalStyleSheet(styleSheet);
1111

src/core/method/global.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
import type { CustomHTMLType } from '../../_internal';
2-
import { isInDevelopment, injectCSSGlobal, cssCodeGenSheet } from '../../_internal';
2+
import { isInDevelopment, injectCSSGlobal, sheetCompiler } from '../../_internal';
33
import { resolveGlobalStyleSheet, globalStyleSheetPromise, createGlobalStyleSheetPromise } from './global-build-in-helper';
44

55
export function global(object: CustomHTMLType): void {
6-
const { styleSheet } = cssCodeGenSheet(object, undefined, '--global');
6+
const { styleSheet } = sheetCompiler(object, undefined, '--global');
77
if (typeof globalStyleSheetPromise === 'undefined') createGlobalStyleSheetPromise();
88
resolveGlobalStyleSheet([styleSheet, '--global']);
99

src/core/method/root.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
import type { CustomCSSProperties } from '../../_internal';
2-
import { isInDevelopment, injectCSSGlobal, cssCodeGenStyle } from '../../_internal';
2+
import { isInDevelopment, injectCSSGlobal, styleCompiler } from '../../_internal';
33
import { resolveGlobalStyleSheet, globalStyleSheetPromise, createGlobalStyleSheetPromise } from './root-build-in-helper';
44

55
export function root(object: CustomCSSProperties): void {
6-
const { styleSheet } = cssCodeGenStyle(object, undefined, '--root');
6+
const { styleSheet } = styleCompiler(object, undefined, '--root');
77
if (typeof globalStyleSheetPromise === 'undefined') createGlobalStyleSheetPromise();
88
resolveGlobalStyleSheet([styleSheet, '--global']);
99

src/core/method/set.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
import type { CustomCSSProperties } from '../../_internal';
2-
import { isInDevelopment, injectCSS, cssCodeGenStyle, genBase62Hash } from '../../_internal';
2+
import { isInDevelopment, injectCSS, styleCompiler, genBase62Hash } from '../../_internal';
33
import styles from '../styles/style.module.css';
44
import { createGlobalStyleSheetPromise, globalStyleSheetPromise, resolveGlobalStyleSheet } from './set-build-in-helper';
55

66
export function set(object: CustomCSSProperties): string {
77
const base62Hash = genBase62Hash(object, 5);
8-
const { styleSheet } = cssCodeGenStyle(object, base62Hash);
8+
const { styleSheet } = styleCompiler(object, base62Hash);
99
const className = '_' + base62Hash;
1010
if (typeof globalStyleSheetPromise === 'undefined') createGlobalStyleSheetPromise();
1111
resolveGlobalStyleSheet(styleSheet);

0 commit comments

Comments
 (0)