@leafer-ui/external 1.0.4 → 1.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +6 -6
- package/src/index.ts +11 -1
- package/types/index.d.ts +5 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@leafer-ui/external",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.6",
|
|
4
4
|
"description": "@leafer-ui/external",
|
|
5
5
|
"author": "Chao (Leafer) Wan",
|
|
6
6
|
"license": "MIT",
|
|
@@ -13,18 +13,18 @@
|
|
|
13
13
|
],
|
|
14
14
|
"repository": {
|
|
15
15
|
"type": "git",
|
|
16
|
-
"url": "https://github.com/leaferjs/ui.git"
|
|
16
|
+
"url": "https://github.com/leaferjs/leafer-ui.git"
|
|
17
17
|
},
|
|
18
|
-
"homepage": "https://github.com/leaferjs/ui/tree/main/packages/external",
|
|
19
|
-
"bugs": "https://github.com/leaferjs/ui/issues",
|
|
18
|
+
"homepage": "https://github.com/leaferjs/leafer-ui/tree/main/packages/external",
|
|
19
|
+
"bugs": "https://github.com/leaferjs/leafer-ui/issues",
|
|
20
20
|
"keywords": [
|
|
21
21
|
"leafer-ui",
|
|
22
22
|
"leaferjs"
|
|
23
23
|
],
|
|
24
24
|
"dependencies": {
|
|
25
|
-
"@leafer/core": "1.0.
|
|
25
|
+
"@leafer/core": "1.0.6"
|
|
26
26
|
},
|
|
27
27
|
"devDependencies": {
|
|
28
|
-
"@leafer-ui/interface": "1.0.
|
|
28
|
+
"@leafer-ui/interface": "1.0.6"
|
|
29
29
|
}
|
|
30
30
|
}
|
package/src/index.ts
CHANGED
|
@@ -1,11 +1,21 @@
|
|
|
1
1
|
// Implemented in partner
|
|
2
|
-
import { IPaintModule, IPaintImageModule, IPaintGradientModule, IEffectModule, ITextConvertModule, IExportModule, IColorConvertModule, IPathArrowModule, IStateModule, IUI, IString, IBoolean, ITransitionModule, ITransitionFunction } from "@leafer-ui/interface"
|
|
2
|
+
import { IPaintModule, IPaintImageModule, IPaintGradientModule, IEffectModule, ITextConvertModule, IExportModule, IColorConvertModule, IPathArrowModule, IStateModule, IUI, IString, IBoolean, IUnitData, ITransitionModule, ITransitionFunction } from "@leafer-ui/interface"
|
|
3
3
|
import { needPlugin } from '@leafer/core'
|
|
4
4
|
|
|
5
5
|
export const TextConvert = {} as ITextConvertModule
|
|
6
6
|
|
|
7
7
|
export const ColorConvert = {} as IColorConvertModule
|
|
8
8
|
|
|
9
|
+
export const UnitConvert = {
|
|
10
|
+
|
|
11
|
+
number(value: number | IUnitData, percentRefer?: number): number {
|
|
12
|
+
if (typeof value === 'object') return value.type === 'percent' ? value.value * percentRefer : value.value
|
|
13
|
+
return value
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
|
|
9
19
|
export const PathArrow = {} as IPathArrowModule
|
|
10
20
|
|
|
11
21
|
|
package/types/index.d.ts
CHANGED
|
@@ -1,7 +1,10 @@
|
|
|
1
|
-
import { ITextConvertModule, IColorConvertModule, IPathArrowModule, IPaintModule, IPaintImageModule, IPaintGradientModule, IEffectModule, IExportModule, IStateModule, ITransitionModule } from '@leafer-ui/interface';
|
|
1
|
+
import { ITextConvertModule, IColorConvertModule, IUnitData, IPathArrowModule, IPaintModule, IPaintImageModule, IPaintGradientModule, IEffectModule, IExportModule, IStateModule, ITransitionModule } from '@leafer-ui/interface';
|
|
2
2
|
|
|
3
3
|
declare const TextConvert: ITextConvertModule;
|
|
4
4
|
declare const ColorConvert: IColorConvertModule;
|
|
5
|
+
declare const UnitConvert: {
|
|
6
|
+
number(value: number | IUnitData, percentRefer?: number): number;
|
|
7
|
+
};
|
|
5
8
|
declare const PathArrow: IPathArrowModule;
|
|
6
9
|
declare const Paint: IPaintModule;
|
|
7
10
|
declare const PaintImage: IPaintImageModule;
|
|
@@ -11,4 +14,4 @@ declare const Export: IExportModule;
|
|
|
11
14
|
declare const State: IStateModule;
|
|
12
15
|
declare const Transition: ITransitionModule;
|
|
13
16
|
|
|
14
|
-
export { ColorConvert, Effect, Export, Paint, PaintGradient, PaintImage, PathArrow, State, TextConvert, Transition };
|
|
17
|
+
export { ColorConvert, Effect, Export, Paint, PaintGradient, PaintImage, PathArrow, State, TextConvert, Transition, UnitConvert };
|