Comparing version 0.8.2 to 0.8.3
@@ -1,2 +0,2 @@ | ||
import { Annotation, Theme, LanguageAlias, ThemeColors, Lines, Tokens, Token } from '@code-hike/lighter'; | ||
import { Annotation, Theme, LanguageAlias, getThemeColorsSync, Lines, Tokens, Token } from '@code-hike/lighter'; | ||
import { ReactNode, FunctionComponent } from 'react'; | ||
@@ -73,3 +73,3 @@ | ||
type BrightProps = Prettify<Omit<CodeProps, "subProps"> & { | ||
colors: Prettify<ThemeColors>; | ||
colors: Prettify<ReturnType<typeof getThemeColorsSync>>; | ||
lines: Lines; | ||
@@ -76,0 +76,0 @@ lineCount: number; |
@@ -43,3 +43,3 @@ "use strict"; | ||
function TitleBar(props) { | ||
const { activeTabForeground, editorGroupHeaderBackground, tabsBorder } = props.colors; | ||
const colors = props.colors; | ||
const { TitleBarContent: TitleBarContent2 } = props; | ||
@@ -49,4 +49,4 @@ const elementProps = { | ||
style: { | ||
background: editorGroupHeaderBackground, | ||
color: activeTabForeground, | ||
background: colors.editorGroupHeader.tabsBackground, | ||
color: colors.tab.activeForeground, | ||
position: "relative", | ||
@@ -67,3 +67,3 @@ display: "flex" | ||
pointerEvents: "none", | ||
background: tabsBorder, | ||
background: colors.tab.border, | ||
height: 1, | ||
@@ -282,8 +282,4 @@ zIndex: 9 | ||
const { code, lang, theme, annotations } = props; | ||
const { lines, colors } = await (0, import_lighter.annotatedHighlight)( | ||
code, | ||
lang, | ||
theme, | ||
annotations | ||
); | ||
const { lines } = await (0, import_lighter.highlight)(code, lang, theme, { annotations }); | ||
const colors = (0, import_lighter.getThemeColorsSync)(theme); | ||
const brightProps = { | ||
@@ -314,11 +310,11 @@ ...props, | ||
margin: "1em 0", | ||
["--selection-background"]: colors.selectionBackground, | ||
["--line-number-color"]: colors.lineNumberForeground, | ||
["--tab-border"]: colors.tabBorder, | ||
["--tab-background"]: colors.activeTabBackground, | ||
["--tab-color"]: colors.activeTabForeground, | ||
["--inactive-tab-background"]: colors.inactiveTabBackground, | ||
["--inactive-tab-color"]: colors.inactiveTabForeground, | ||
["--tab-top-border"]: colors.activeTabTopBorder, | ||
["--tab-bottom-border"]: colors.activeTabBorder, | ||
["--selection-background"]: colors.editor.selectionBackground, | ||
["--line-number-color"]: colors.editorLineNumber.foreground, | ||
["--tab-border"]: colors.tab.border, | ||
["--tab-background"]: colors.tab.activeBackground, | ||
["--tab-color"]: colors.tab.activeForeground, | ||
["--inactive-tab-background"]: colors.tab.inactiveBackground, | ||
["--inactive-tab-color"]: colors.tab.inactiveForeground, | ||
["--tab-top-border"]: colors.tab.activeBorderTop, | ||
["--tab-bottom-border"]: colors.tab.activeBorder, | ||
colorScheme: colors.colorScheme, | ||
@@ -325,0 +321,0 @@ ...style |
{ | ||
"name": "bright", | ||
"version": "0.8.2", | ||
"version": "0.8.3", | ||
"main": "./dist/index.js", | ||
@@ -19,3 +19,3 @@ "module": "./dist/index.mjs", | ||
"dependencies": { | ||
"@code-hike/lighter": "0.6.6", | ||
"@code-hike/lighter": "0.8.1", | ||
"server-only": "^0.0.1" | ||
@@ -22,0 +22,0 @@ }, |
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
37844
1202
+ Added@code-hike/lighter@0.8.1(transitive)
- Removed@code-hike/lighter@0.6.6(transitive)
Updated@code-hike/lighter@0.8.1