@uiw/codemirror-themes 4.21.16 → 4.21.18

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/README.md CHANGED
@@ -23,6 +23,7 @@ const myTheme = createTheme({
23
23
  theme: 'light',
24
24
  settings: {
25
25
  background: '#ffffff',
26
+ backgroundImage: '',
26
27
  foreground: '#75baff',
27
28
  caret: '#5d00ff',
28
29
  selection: '#036dd626',
@@ -70,6 +71,7 @@ const myTheme = createTheme({
70
71
  theme: 'light',
71
72
  settings: {
72
73
  background: '#ffffff',
74
+ backgroundImage: '',
73
75
  foreground: '#75baff',
74
76
  caret: '#5d00ff',
75
77
  selection: '#036dd626',
@@ -297,8 +299,10 @@ export interface CreateThemeOptions {
297
299
  }
298
300
  declare type Theme = 'light' | 'dark';
299
301
  export interface Settings {
300
- /** Editor background. */
302
+ /** Editor background color. */
301
303
  background: string;
304
+ /** Editor background image. */
305
+ backgroundImage?: string;
302
306
  /** Default text color. */
303
307
  foreground: string;
304
308
  /** Caret color. */
package/cjs/index.d.ts CHANGED
@@ -14,8 +14,10 @@ export interface CreateThemeOptions {
14
14
  }
15
15
  type Theme = 'light' | 'dark';
16
16
  export interface Settings {
17
- /** Editor background. */
17
+ /** Editor background color. */
18
18
  background?: string;
19
+ /** Editor background image. */
20
+ backgroundImage?: string;
19
21
  /** Default text color. */
20
22
  foreground?: string;
21
23
  /** Caret color. */
package/cjs/index.js CHANGED
@@ -19,6 +19,9 @@ var createTheme = function createTheme(_ref) {
19
19
  if (settings.background) {
20
20
  baseStyle.backgroundColor = settings.background;
21
21
  }
22
+ if (settings.backgroundImage) {
23
+ baseStyle.backgroundImage = settings.backgroundImage;
24
+ }
22
25
  if (settings.foreground) {
23
26
  baseStyle.color = settings.foreground;
24
27
  }
package/esm/index.d.ts CHANGED
@@ -14,8 +14,10 @@ export interface CreateThemeOptions {
14
14
  }
15
15
  type Theme = 'light' | 'dark';
16
16
  export interface Settings {
17
- /** Editor background. */
17
+ /** Editor background color. */
18
18
  background?: string;
19
+ /** Editor background image. */
20
+ backgroundImage?: string;
19
21
  /** Default text color. */
20
22
  foreground?: string;
21
23
  /** Caret color. */
package/esm/index.js CHANGED
@@ -13,6 +13,9 @@ export var createTheme = _ref => {
13
13
  if (settings.background) {
14
14
  baseStyle.backgroundColor = settings.background;
15
15
  }
16
+ if (settings.backgroundImage) {
17
+ baseStyle.backgroundImage = settings.backgroundImage;
18
+ }
16
19
  if (settings.foreground) {
17
20
  baseStyle.color = settings.foreground;
18
21
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uiw/codemirror-themes",
3
- "version": "4.21.16",
3
+ "version": "4.21.18",
4
4
  "description": "Themes for CodeMirror.",
5
5
  "homepage": "https://uiwjs.github.io/react-codemirror/#/theme/doc",
6
6
  "author": "kenny wong <wowohoo@qq.com>",
package/src/index.tsx CHANGED
@@ -19,8 +19,10 @@ export interface CreateThemeOptions {
19
19
  type Theme = 'light' | 'dark';
20
20
 
21
21
  export interface Settings {
22
- /** Editor background. */
22
+ /** Editor background color. */
23
23
  background?: string;
24
+ /** Editor background image. */
25
+ backgroundImage?: string;
24
26
  /** Default text color. */
25
27
  foreground?: string;
26
28
  /** Caret color. */
@@ -51,6 +53,9 @@ export const createTheme = ({ theme, settings = {}, styles = [] }: CreateThemeOp
51
53
  if (settings.background) {
52
54
  baseStyle.backgroundColor = settings.background;
53
55
  }
56
+ if (settings.backgroundImage) {
57
+ baseStyle.backgroundImage = settings.backgroundImage;
58
+ }
54
59
  if (settings.foreground) {
55
60
  baseStyle.color = settings.foreground;
56
61
  }