@leafer-ui/external
Advanced tools
+3
-3
| { | ||
| "name": "@leafer-ui/external", | ||
| "version": "1.4.0", | ||
| "version": "1.4.1", | ||
| "description": "@leafer-ui/external", | ||
@@ -25,7 +25,7 @@ "author": "Chao (Leafer) Wan", | ||
| "dependencies": { | ||
| "@leafer/core": "1.4.0" | ||
| "@leafer/core": "1.4.1" | ||
| }, | ||
| "devDependencies": { | ||
| "@leafer-ui/interface": "1.4.0" | ||
| "@leafer-ui/interface": "1.4.1" | ||
| } | ||
| } |
+11
-13
| // Implemented in partner | ||
| import { IPaintModule, IPaintImageModule, IPaintGradientModule, IEffectModule, ITextConvertModule, IExportModule, IColorConvertModule, IPathArrowModule, IStateModule, IUI, IString, IBoolean, IUnitData, ITransitionModule, ITransitionFunction } from "@leafer-ui/interface" | ||
| import { IPaintModule, IPaintImageModule, IPaintGradientModule, IEffectModule, ITextConvertModule, IExportModule, IColorConvertModule, IPathArrowModule, IStateModule, IUnitData, ITransitionModule, IFilterModule } from "@leafer-ui/interface" | ||
| import { Plugin } from '@leafer/core' | ||
| export const TextConvert = {} as ITextConvertModule | ||
@@ -10,8 +11,5 @@ | ||
| export const UnitConvert = { | ||
| number(value: number | IUnitData, percentRefer?: number): number { | ||
| if (typeof value === 'object') return value.type === 'percent' ? value.value * percentRefer : value.value | ||
| return value | ||
| return typeof value === 'object' ? (value.type === 'percent' ? value.value * percentRefer : value.value) : value | ||
| } | ||
| } | ||
@@ -31,13 +29,13 @@ | ||
| export const Filter = { | ||
| apply(): void { Plugin.need('filter') } | ||
| } as unknown as IFilterModule | ||
| export const Export = {} as IExportModule | ||
| export const State = { | ||
| setStyleName(_leaf: IUI, _styleName: IString, _value: IBoolean): void { return Plugin.need('state') }, | ||
| set(_leaf: IUI, _stateName: IString): void { return Plugin.need('state') } | ||
| } as IStateModule | ||
| setStyleName(): void { return Plugin.need('state') }, | ||
| set(): void { return Plugin.need('state') } | ||
| } as unknown as IStateModule | ||
| export const Transition = { | ||
| list: {}, | ||
| register(attrName: string, fn: ITransitionFunction): void { Transition.list[attrName] = fn }, | ||
| get(attrName: string): ITransitionFunction { return Transition.list[attrName] } | ||
| } as ITransitionModule | ||
| export const Transition = {} as ITransitionModule |
+3
-2
@@ -1,2 +0,2 @@ | ||
| import { ITextConvertModule, IColorConvertModule, IUnitData, IPathArrowModule, IPaintModule, IPaintImageModule, IPaintGradientModule, IEffectModule, IExportModule, IStateModule, ITransitionModule } from '@leafer-ui/interface'; | ||
| import { ITextConvertModule, IColorConvertModule, IUnitData, IPathArrowModule, IPaintModule, IPaintImageModule, IPaintGradientModule, IEffectModule, IFilterModule, IExportModule, IStateModule, ITransitionModule } from '@leafer-ui/interface'; | ||
@@ -13,2 +13,3 @@ declare const TextConvert: ITextConvertModule; | ||
| declare const Effect: IEffectModule; | ||
| declare const Filter: IFilterModule; | ||
| declare const Export: IExportModule; | ||
@@ -18,2 +19,2 @@ declare const State: IStateModule; | ||
| export { ColorConvert, Effect, Export, Paint, PaintGradient, PaintImage, PathArrow, State, TextConvert, Transition, UnitConvert }; | ||
| export { ColorConvert, Effect, Export, Filter, Paint, PaintGradient, PaintImage, PathArrow, State, TextConvert, Transition, UnitConvert }; |
3967
-3.69%39
-2.5%+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
Updated