@code-hike/utils
Advanced tools
Comparing version 0.3.0--canary.126.19a4397.0 to 0.3.0--canary.129.45448ed.0
@@ -434,2 +434,12 @@ 'use strict'; | ||
} | ||
function getColorScheme(theme) { | ||
var themeType = getThemeType(theme); | ||
if (themeType === "dark") { | ||
return "dark"; | ||
} | ||
else if (themeType === "light") { | ||
return "light"; | ||
} | ||
return undefined; | ||
} | ||
function transparent(color, opacity) { | ||
@@ -471,2 +481,3 @@ var _opacity = Math.round(Math.min(Math.max(opacity || 1, 0), 1) * 255); | ||
exports.getColor = getColor; | ||
exports.getColorScheme = getColorScheme; | ||
exports.getFocusIndexes = getFocusIndexes; | ||
@@ -473,0 +484,0 @@ exports.hasColumns = hasColumns; |
@@ -430,2 +430,12 @@ function map(tween, fn) { | ||
} | ||
function getColorScheme(theme) { | ||
var themeType = getThemeType(theme); | ||
if (themeType === "dark") { | ||
return "dark"; | ||
} | ||
else if (themeType === "light") { | ||
return "light"; | ||
} | ||
return undefined; | ||
} | ||
function transparent(color, opacity) { | ||
@@ -465,2 +475,2 @@ var _opacity = Math.round(Math.min(Math.max(opacity || 1, 0), 1) * 255); | ||
export { ColorName, getCodeColors, getColor, getFocusIndexes, hasColumns, map, mapFocusToLineNumbers, mapWithDefault, mergeFocus, parseExtremes, parsePartToObject, relativeToAbsolute, splitParts, transparent, withDefault }; | ||
export { ColorName, getCodeColors, getColor, getColorScheme, getFocusIndexes, hasColumns, map, mapFocusToLineNumbers, mapWithDefault, mergeFocus, parseExtremes, parsePartToObject, relativeToAbsolute, splitParts, transparent, withDefault }; |
@@ -46,2 +46,3 @@ /** | ||
export declare function getColor(theme: EditorTheme, colorName: ColorName): Color; | ||
export declare function getColorScheme(theme: EditorTheme): string | undefined; | ||
export declare function transparent(color: Color, opacity: number): Color; | ||
@@ -48,0 +49,0 @@ export declare function getCodeColors(theme: EditorTheme): { |
{ | ||
"name": "@code-hike/utils", | ||
"version": "0.3.0--canary.126.19a4397.0", | ||
"version": "0.3.0--canary.129.45448ed.0", | ||
"main": "dist/index.cjs.js", | ||
@@ -16,3 +16,3 @@ "typings": "dist/index.d.ts", | ||
"devDependencies": { | ||
"@code-hike/script": "0.3.0--canary.126.19a4397.0", | ||
"@code-hike/script": "0.3.0--canary.129.45448ed.0", | ||
"@types/jest": "^24.0.15", | ||
@@ -41,3 +41,3 @@ "@types/react": "^17.0.2", | ||
}, | ||
"gitHead": "19a439797d7dc2abd29bc671d282b1022540eb0e" | ||
"gitHead": "45448ed8ae120c2c40cb7a951c6bc448b5d31301" | ||
} |
41375
1055