Fix build

This commit is contained in:
Nathan Bierema 2021-10-21 13:31:09 -04:00
parent eba402e8cc
commit 6a8ab006ed
2 changed files with 5 additions and 11 deletions

View File

@ -28,5 +28,5 @@ export type Theme = string | Base16Theme | StylingConfig;
export type StylingFunction = ( export type StylingFunction = (
keys: (string | false | undefined) | (string | false | undefined)[], keys: (string | false | undefined) | (string | false | undefined)[],
...rest: any[] ...rest: unknown[]
) => Styling; ) => Styling;

View File

@ -55,7 +55,7 @@ const getDefaultThemeStyling = (theme: Base16Theme): StylingConfig => {
backgroundColor: colors.BACKGROUND_COLOR, backgroundColor: colors.BACKGROUND_COLOR,
}, },
value: ({ style }, nodeType, keyPath: (string | number)[]) => ({ value: ({ style }, nodeType, keyPath) => ({
style: { style: {
...style, ...style,
paddingTop: '0.25em', paddingTop: '0.25em',
@ -64,7 +64,7 @@ const getDefaultThemeStyling = (theme: Base16Theme): StylingConfig => {
WebkitUserSelect: 'text', WebkitUserSelect: 'text',
MozUserSelect: 'text', MozUserSelect: 'text',
wordWrap: 'break-word', wordWrap: 'break-word',
paddingLeft: keyPath.length > 1 ? '2.125em' : '1.25em', paddingLeft: (keyPath as unknown[]).length > 1 ? '2.125em' : '1.25em',
textIndent: '-0.5em', textIndent: '-0.5em',
wordBreak: 'break-all', wordBreak: 'break-all',
}, },
@ -136,18 +136,12 @@ const getDefaultThemeStyling = (theme: Base16Theme): StylingConfig => {
left: '-0.4em', left: '-0.4em',
}, },
nestedNode: ( nestedNode: ({ style }, keyPath, nodeType, expanded, expandable) => ({
{ style },
keyPath: (string | number)[],
nodeType,
expanded,
expandable
) => ({
style: { style: {
...style, ...style,
position: 'relative', position: 'relative',
paddingTop: '0.25em', paddingTop: '0.25em',
marginLeft: keyPath.length > 1 ? '0.875em' : 0, marginLeft: (keyPath as unknown[]).length > 1 ? '0.875em' : 0,
paddingLeft: !expandable ? '1.125em' : 0, paddingLeft: !expandable ? '1.125em' : 0,
}, },
}), }),