@aesthetic/addon-direction
Advanced tools
Comparing version 0.3.11 to 0.4.0
@@ -5,6 +5,6 @@ /** | ||
*/ | ||
import { Direction, Value } from '@aesthetic/types'; | ||
import { Direction, NativeProperty, Value } from '@aesthetic/types'; | ||
declare const _default: { | ||
convert<T extends Value>(from: Direction, to: Direction, property: string, value: T): { | ||
property: string; | ||
convert<T extends Value>(from: Direction, to: Direction, property: NativeProperty, value: T): { | ||
property: NativeProperty; | ||
value: T; | ||
@@ -11,0 +11,0 @@ }; |
@@ -1,2 +0,2 @@ | ||
// Generated with Packemon: https://packemon.dev | ||
// Bundled with Packemon: https://packemon.dev | ||
// Platform: browser, Support: stable, Format: esm | ||
@@ -9,8 +9,8 @@ import { getPropertyDoppelganger, getValueDoppelganger } from 'rtl-css-js/core'; | ||
var index = { | ||
convert: function convert(from, to, property, value) { | ||
const index = { | ||
convert(from, to, property, value) { | ||
if (from === to) { | ||
return { | ||
property: property, | ||
value: value | ||
property, | ||
value | ||
}; | ||
@@ -24,4 +24,5 @@ } | ||
} | ||
}; | ||
export default index; | ||
//# sourceMappingURL=index.js.map |
{ | ||
"name": "@aesthetic/addon-direction", | ||
"version": "0.3.11", | ||
"version": "0.4.0", | ||
"description": "Aesthetic addon to convert direction between LTR and RTL.", | ||
@@ -19,3 +19,4 @@ "keywords": [ | ||
"license": "MIT", | ||
"main": "./lib/index.js", | ||
"type": "module", | ||
"main": "./esm/index.js", | ||
"module": "./esm/index.js", | ||
@@ -34,3 +35,3 @@ "types": "./dts/index.d.ts", | ||
"dependencies": { | ||
"@aesthetic/types": "^0.5.1", | ||
"@aesthetic/types": "^0.6.0", | ||
"rtl-css-js": "^1.14.1" | ||
@@ -45,3 +46,3 @@ }, | ||
}, | ||
"gitHead": "2eaa33fd8ca72a6fd657d9b1375c7caa2f346af4" | ||
"gitHead": "6fd0ed93f8f15446ba2f9f0be8054a091997cbec" | ||
} |
@@ -16,3 +16,3 @@ # Aesthetic - Direction Converter | ||
configure({ | ||
directionConverter, | ||
directionConverter, | ||
}); | ||
@@ -22,4 +22,4 @@ | ||
const engine = createClientEngine({ | ||
direction: 'ltr', // Base | ||
directionConverter, | ||
direction: 'ltr', // Default | ||
directionConverter, | ||
}); | ||
@@ -26,0 +26,0 @@ ``` |
@@ -7,15 +7,20 @@ /** | ||
import { getPropertyDoppelganger, getValueDoppelganger } from 'rtl-css-js/core'; | ||
import { Direction, Value } from '@aesthetic/types'; | ||
import { Direction, NativeProperty, Value } from '@aesthetic/types'; | ||
export default { | ||
convert<T extends Value>(from: Direction, to: Direction, property: string, value: T) { | ||
if (from === to) { | ||
return { property, value }; | ||
} | ||
convert<T extends Value>( | ||
from: Direction, | ||
to: Direction, | ||
property: NativeProperty, | ||
value: T, | ||
): { property: NativeProperty; value: T } { | ||
if (from === to) { | ||
return { property, value }; | ||
} | ||
return { | ||
property: getPropertyDoppelganger(property), | ||
value: getValueDoppelganger(property, value), | ||
}; | ||
}, | ||
return { | ||
property: getPropertyDoppelganger(property) as NativeProperty, | ||
value: getValueDoppelganger(property, value), | ||
}; | ||
}, | ||
}; |
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
Yes
5303
7
57
+ Added@aesthetic/types@0.6.7(transitive)
- Removed@aesthetic/types@0.5.1(transitive)
Updated@aesthetic/types@^0.6.0