@xh/hoist 79.0.0-SNAPSHOT.1765846827962 → 79.0.0-SNAPSHOT.1765854402334

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.
@@ -37,7 +37,6 @@ import {
37
37
  ViewPlugin,
38
38
  ViewUpdate
39
39
  } from '@codemirror/view';
40
- import {oneDark} from './impl/one-dark';
41
40
  import {HoistInputModel, HoistInputProps, useHoistInputModel} from '@xh/hoist/cmp/input';
42
41
  import {box, div, filler, fragment, frame, hbox, label, span, vbox} from '@xh/hoist/cmp/layout';
43
42
  import {hoistCmp, HoistProps, LayoutProps, managed, PlainObject, XH} from '@xh/hoist/core';
@@ -55,11 +54,8 @@ import classNames from 'classnames';
55
54
  import {compact, find, includes, isEmpty, isFunction, isObject} from 'lodash';
56
55
  import {ReactElement} from 'react';
57
56
  import './CodeInput.scss';
58
- import {javascript} from '@codemirror/lang-javascript';
59
- import {json} from '@codemirror/lang-json';
60
- import {html} from '@codemirror/lang-html';
61
- import {sql} from '@codemirror/lang-sql';
62
- import {css} from '@codemirror/lang-css';
57
+ import {githubLight, githubDark} from '@uiw/codemirror-theme-github';
58
+
63
59
  export interface CodeInputProps extends HoistProps, HoistInputProps, LayoutProps {
64
60
  /** True to focus the control on render. */
65
61
  autoFocus?: boolean;
@@ -490,19 +486,9 @@ class CodeInputModel extends HoistInputModel {
490
486
  }
491
487
 
492
488
  private getThemeExtension() {
493
- const lightTheme = EditorView.theme({}, {dark: false});
494
- return XH.darkTheme ? oneDark : lightTheme;
489
+ return XH.darkTheme ? githubDark : githubLight;
495
490
  }
496
491
 
497
- private LANGUAGE_EXTENSIONS: Record<string, () => LanguageSupport> = {
498
- js: javascript,
499
- javascript: javascript,
500
- html: html,
501
- css: css,
502
- json: json,
503
- sql: sql
504
- };
505
-
506
492
  private async getLanguageExtensionAsync(lang: string): Promise<LanguageSupport> {
507
493
  try {
508
494
  const langDesc: LanguageDescription | undefined = find(
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xh/hoist",
3
- "version": "79.0.0-SNAPSHOT.1765846827962",
3
+ "version": "79.0.0-SNAPSHOT.1765854402334",
4
4
  "description": "Hoist add-on for building and deploying React Applications.",
5
5
  "repository": "github:xh/hoist-react",
6
6
  "homepage": "https://xh.io",
@@ -49,6 +49,7 @@
49
49
  "@onsenui/fastclick": "~1.1.1",
50
50
  "@popperjs/core": "~2.11.0",
51
51
  "@seznam/compose-react-refs": "~1.0.5",
52
+ "@uiw/codemirror-theme-github": "^4.25.4",
52
53
  "ajv": "~8.17.1",
53
54
  "classnames": "~2.5.1",
54
55
  "clipboard-copy": "~4.0.1",