@icestack/types
Advanced tools
Comparing version 0.4.5 to 0.4.6
@@ -10,8 +10,8 @@ import { Config as Config$1 } from 'tailwindcss/types/config'; | ||
} | ||
type IDefaults = { | ||
styled?: object; | ||
base?: object; | ||
utils?: object; | ||
type CssSchemaDefaults = { | ||
styled: object; | ||
base: object; | ||
utils: object; | ||
}; | ||
type IValue = string | { | ||
type CssSchemaValue = string | { | ||
apply: string | string[]; | ||
@@ -24,11 +24,11 @@ } | { | ||
}; | ||
type ISchema = { | ||
selector: string; | ||
defaults: IDefaults; | ||
type CssSchema = { | ||
selector?: string; | ||
defaults: Partial<CssSchemaDefaults>; | ||
}; | ||
type SchemaFnOptions = CreatePresetOptions & { | ||
type GetCssSchemaMethodOptions = CreatePresetOptions & { | ||
selector: string; | ||
params: Record<string, any>; | ||
}; | ||
type GetSchemaFn = (opts: SchemaFnOptions) => ISchema; | ||
type GetCssSchemaMethod = (opts: Partial<GetCssSchemaMethodOptions>) => CssSchema; | ||
@@ -45,3 +45,3 @@ interface PrefixerOptions { | ||
type Themes = Record<string, { | ||
type ThemeOptions = { | ||
selector: string; | ||
@@ -52,3 +52,4 @@ extraColors: Record<string, string>; | ||
types: Record<string, string | Record<string, string>>; | ||
}>; | ||
}; | ||
type Themes = Record<string, Partial<ThemeOptions>>; | ||
type BaseOptions = { | ||
@@ -65,2 +66,3 @@ themes: Themes; | ||
}; | ||
type ModeMergeOptions = string | ModeMergeValue | ((opts: Partial<GetCssSchemaMethodOptions>) => string | ModeMergeValue); | ||
type ComponentsValue = { | ||
@@ -79,26 +81,26 @@ prefix: PrefixerOptions; | ||
/** | ||
* @description use params | ||
* @description senior | ||
*/ | ||
params: Record<string, any>; | ||
override: ModeMergeOptions | ModeMergeOptions[]; | ||
/** | ||
* @description senior | ||
*/ | ||
override: CssValue | ModeMergeValue | ((opts: SchemaFnOptions) => CssValue | ModeMergeValue); | ||
extend: ModeMergeOptions | ModeMergeOptions[]; | ||
/** | ||
* @description senior | ||
* @description use params | ||
*/ | ||
extend: CssValue | ModeMergeValue | ((opts: SchemaFnOptions) => CssValue | ModeMergeValue); | ||
params: Record<string, any>; | ||
/** | ||
* @description senior | ||
*/ | ||
schema: GetSchemaFn; | ||
schema: GetCssSchemaMethod; | ||
}; | ||
type ComponentsOptions = Record<string, ComponentsValue | false>; | ||
type ComponentsOptions = Record<string, Partial<ComponentsValue> | false>; | ||
type GlobalOptions = { | ||
atMedia: { | ||
hover: boolean; | ||
hover?: boolean; | ||
}; | ||
selector: { | ||
universal: string; | ||
root: string; | ||
universal?: string; | ||
root?: string; | ||
}; | ||
@@ -110,3 +112,3 @@ }; | ||
type CodegenMode = 'styled' | 'base' | 'none'; | ||
type Preset = DeepPartial<Pick<CodegenOptions, 'base' | 'components' | 'global' | 'tailwindcssConfig'>>; | ||
type Preset = Partial<Pick<CodegenOptions, 'base' | 'components' | 'global' | 'tailwindcssConfig'>>; | ||
type CodegenOptions = { | ||
@@ -116,19 +118,19 @@ /** | ||
*/ | ||
mode: CodegenMode; | ||
mode?: CodegenMode; | ||
/** | ||
* @description custom all your components | ||
*/ | ||
components: ComponentsOptions; | ||
components?: ComponentsOptions; | ||
/** | ||
* @description css utilities | ||
*/ | ||
utilities: UtilitiesOptions; | ||
utilities?: Partial<UtilitiesOptions>; | ||
/** | ||
* @description set themes and all types | ||
*/ | ||
base: BaseOptions; | ||
base?: Partial<BaseOptions>; | ||
/** | ||
* @description global postcss options | ||
*/ | ||
global: GlobalOptions; | ||
global?: Partial<GlobalOptions>; | ||
/** | ||
@@ -139,3 +141,3 @@ * @description css var prefix | ||
*/ | ||
varPrefix: VarPrefixerOptions; | ||
varPrefix?: Partial<VarPrefixerOptions>; | ||
/** | ||
@@ -145,3 +147,3 @@ * @description if console.log some debug information | ||
*/ | ||
log: boolean; | ||
log?: boolean; | ||
/** | ||
@@ -151,7 +153,7 @@ * @type PrefixerOptions | ||
*/ | ||
prefix: PrefixerOptions; | ||
prefix?: Partial<PrefixerOptions>; | ||
/** | ||
* @description load presets | ||
*/ | ||
presets: (Preset | ((options?: any) => Preset))[]; | ||
presets?: (Preset | ((options?: any) => Preset))[]; | ||
/** | ||
@@ -165,9 +167,9 @@ * @description required! set output dir path. | ||
*/ | ||
dryRun: boolean; | ||
dryRun?: boolean; | ||
/** | ||
* @description your custom tailwindcss config to resolve `@apply` | ||
*/ | ||
tailwindcssConfig: Config$1; | ||
tailwindcssConfig?: Partial<Config$1>; | ||
}; | ||
type Config = Partial<CodegenOptions>; | ||
type Config = CodegenOptions; | ||
type TailwindcssPluginOptions = { | ||
@@ -185,2 +187,2 @@ loadDirectory: string; | ||
export type { BaseOptions, CodegenMode, CodegenOptions, ComponentsOptions, ComponentsValue, Config, CreatePresetOptions, CssValue, DeepPartial, DeepRequired, GetSchemaFn, GlobalOptions, IDefaults, ILayer, ISchema, IValue, ModeMergeValue, PrefixerOptions, Preset, SchemaFnOptions, TailwindcssPluginOptions, Themes, UtilitiesOptions, VarPrefixerOptions }; | ||
export type { BaseOptions, CodegenMode, CodegenOptions, ComponentsOptions, ComponentsValue, Config, CreatePresetOptions, CssSchema, CssSchemaDefaults, CssSchemaValue, CssValue, DeepPartial, DeepRequired, GetCssSchemaMethod, GetCssSchemaMethodOptions, GlobalOptions, ILayer, ModeMergeOptions, ModeMergeValue, PrefixerOptions, Preset, TailwindcssPluginOptions, ThemeOptions, Themes, UtilitiesOptions, VarPrefixerOptions }; |
{ | ||
"name": "@icestack/types", | ||
"description": "The types of @icestack/ui", | ||
"version": "0.4.5", | ||
"version": "0.4.6", | ||
"keywords": [ | ||
@@ -6,0 +6,0 @@ "types", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
16568
174