@operato/input 1.18.0 → 1.19.6

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/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@operato/input",
3
3
  "description": "Webcomponents for input following open-wc recommendations",
4
4
  "author": "heartyoh@hatiolab.com",
5
- "version": "1.18.0",
5
+ "version": "1.19.6",
6
6
  "main": "dist/src/index.js",
7
7
  "module": "dist/src/index.js",
8
8
  "license": "MIT",
@@ -197,9 +197,9 @@
197
197
  "@material/mwc-icon": "^0.27.0",
198
198
  "@operato/color-picker": "^1.17.9",
199
199
  "@operato/i18n": "^1.17.9",
200
- "@operato/popup": "^1.18.0",
200
+ "@operato/popup": "^1.19.0",
201
201
  "@operato/styles": "^1.18.0",
202
- "@operato/utils": "^1.17.9",
202
+ "@operato/utils": "^1.19.0",
203
203
  "@polymer/paper-dropdown-menu": "^3.2.0",
204
204
  "@polymer/paper-item": "^3.0.1",
205
205
  "@thebespokepixel/es-tinycolor": "^3.1.0",
@@ -243,5 +243,5 @@
243
243
  "prettier --write"
244
244
  ]
245
245
  },
246
- "gitHead": "ab399d63caef33a3e72fb04f8ba2ea674c60161d"
246
+ "gitHead": "946e88721fb0d13bd75ca2723815a7f898313af2"
247
247
  }
@@ -5,6 +5,7 @@
5
5
  import { css, PropertyValues } from 'lit'
6
6
  import { customElement, property } from 'lit/decorators.js'
7
7
 
8
+ import { minimalSetup } from 'codemirror'
8
9
  import { history, historyKeymap, indentWithTab } from '@codemirror/commands'
9
10
  import { EditorView, highlightActiveLine, keymap } from '@codemirror/view'
10
11
  import { autocompletion, closeBrackets } from '@codemirror/autocomplete'
@@ -39,6 +40,8 @@ export class OxInputCode extends OxFormField {
39
40
  position: relative;
40
41
  background: white;
41
42
  overflow: auto;
43
+ border:1px solid var(--md-sys-color-outline, #111);
44
+ border-radius:var(--md-sys-shape-corner-small, 4px);
42
45
  }
43
46
 
44
47
  .cm-editor {
@@ -51,8 +54,7 @@ export class OxInputCode extends OxFormField {
51
54
  * `value`는 에디터에서 작성중인 contents이다.
52
55
  */
53
56
  @property({ type: String }) value: string = ''
54
- @property({ type: Number, attribute: 'tab-size' }) tabSize: number = 2
55
- @property({ type: Boolean, attribute: 'tab-as-space' }) tabAsSpace: boolean = true
57
+ @property({ type: Boolean, attribute: 'show-line-numbers' }) showLineNumbers: boolean = false
56
58
  @property({ type: String }) language?: string = 'javascript'
57
59
 
58
60
  private _self_changing: boolean = false
@@ -88,6 +90,7 @@ export class OxInputCode extends OxFormField {
88
90
  this._editor = new EditorView({
89
91
  doc: this.value,
90
92
  extensions: [
93
+ minimalSetup,
91
94
  ...language,
92
95
  bracketMatching(),
93
96
  closeBrackets(),
@@ -129,15 +132,6 @@ export class OxInputCode extends OxFormField {
129
132
  this.dispatchEvent(new CustomEvent('change', { bubbles: true, composed: true, detail: this.value }))
130
133
  })
131
134
 
132
- // this._editor.contentDOM.addEventListener('change', async e => {
133
- // this._self_changing = true
134
- // this._changed = true
135
-
136
- // await this.updateComplete
137
-
138
- // this._self_changing = false
139
- // })
140
-
141
135
  return this._editor
142
136
  }
143
137
  }