@difizen/libro-raw-cell 0.1.30 → 0.1.32

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.
@@ -1,12 +1,12 @@
1
1
  import type { CodeEditorViewOptions, CodeEditorView } from '@difizen/libro-code-editor';
2
2
  import { CodeEditorManager } from '@difizen/libro-code-editor';
3
3
  import type { CellViewOptions } from '@difizen/libro-core';
4
- import { CellService, LibroEditorCellView, LirboContextKey } from '@difizen/libro-core';
4
+ import { CellService, LibroEditorCellView, LibroContextKey } from '@difizen/libro-core';
5
5
  import { ViewManager } from '@difizen/mana-app';
6
6
  import React from 'react';
7
7
  import type { LibroRawCellModel } from './raw-cell-model.js';
8
8
  export declare class LibroRawCellView extends LibroEditorCellView {
9
- protected readonly lirboContextKey: LirboContextKey;
9
+ protected readonly libroContextKey: LibroContextKey;
10
10
  model: LibroRawCellModel;
11
11
  view: React.ForwardRefExoticComponent<React.RefAttributes<HTMLDivElement>>;
12
12
  viewManager: ViewManager;
@@ -22,7 +22,7 @@ function _initializerWarningHelper(descriptor, context) { throw new Error('Decor
22
22
  /* eslint-disable @typescript-eslint/parameter-properties */
23
23
 
24
24
  import { CodeEditorManager } from '@difizen/libro-code-editor';
25
- import { CellService, LibroEditorCellView, LirboContextKey } from '@difizen/libro-core';
25
+ import { CellService, LibroEditorCellView, LibroContextKey } from '@difizen/libro-core';
26
26
  import { getOrigin, prop, useInject, watch } from '@difizen/mana-app';
27
27
  import { view, ViewInstance, ViewManager, ViewOption, ViewRender } from '@difizen/mana-app';
28
28
  import { inject, transient } from '@difizen/mana-app';
@@ -54,14 +54,14 @@ var CodeEditorViewComponent = /*#__PURE__*/React.forwardRef(function CodeEditorV
54
54
  children: /*#__PURE__*/_jsx(CellEditorMemo, {})
55
55
  });
56
56
  });
57
- export var LibroRawCellView = (_dec = transient(), _dec2 = view('raw-cell-view'), _dec3 = inject(LirboContextKey), _dec4 = prop(), _dec(_class = _dec2(_class = (_class2 = /*#__PURE__*/function (_LibroEditorCellView) {
57
+ export var LibroRawCellView = (_dec = transient(), _dec2 = view('raw-cell-view'), _dec3 = inject(LibroContextKey), _dec4 = prop(), _dec(_class = _dec2(_class = (_class2 = /*#__PURE__*/function (_LibroEditorCellView) {
58
58
  _inherits(LibroRawCellView, _LibroEditorCellView);
59
59
  var _super = _createSuper(LibroRawCellView);
60
60
  function LibroRawCellView(options, cellService, viewManager, codeEditorManager) {
61
61
  var _this;
62
62
  _classCallCheck(this, LibroRawCellView);
63
63
  _this = _super.call(this, options, cellService);
64
- _initializerDefineProperty(_this, "lirboContextKey", _descriptor, _assertThisInitialized(_this));
64
+ _initializerDefineProperty(_this, "libroContextKey", _descriptor, _assertThisInitialized(_this));
65
65
  _this.view = CodeEditorViewComponent;
66
66
  _this.viewManager = void 0;
67
67
  _this.codeEditorManager = void 0;
@@ -179,7 +179,7 @@ export var LibroRawCellView = (_dec = transient(), _dec2 = view('raw-cell-view')
179
179
  value: function focusEditor() {
180
180
  var _this$editorView, _this$parent$model$ac2;
181
181
  //选中cell、编辑模式、非只读时才focus
182
- if ((_this$editorView = this.editorView) !== null && _this$editorView !== void 0 && _this$editorView.editor && this.editorView.editorStatus === 'ready' && ((_this$parent$model$ac2 = this.parent.model.active) === null || _this$parent$model$ac2 === void 0 ? void 0 : _this$parent$model$ac2.id) === this.id && !this.parent.model.commandMode && this.lirboContextKey.commandModeEnabled === true &&
182
+ if ((_this$editorView = this.editorView) !== null && _this$editorView !== void 0 && _this$editorView.editor && this.editorView.editorStatus === 'ready' && ((_this$parent$model$ac2 = this.parent.model.active) === null || _this$parent$model$ac2 === void 0 ? void 0 : _this$parent$model$ac2.id) === this.id && !this.parent.model.commandMode && this.libroContextKey.commandModeEnabled === true &&
183
183
  // 排除弹窗等情况
184
184
  this.parent.model.readOnly === false) {
185
185
  var _this$editorView2, _this$editorView3, _this$editorView4;
@@ -190,7 +190,7 @@ export var LibroRawCellView = (_dec = transient(), _dec2 = view('raw-cell-view')
190
190
  }
191
191
  }]);
192
192
  return LibroRawCellView;
193
- }(LibroEditorCellView), (_descriptor = _applyDecoratedDescriptor(_class2.prototype, "lirboContextKey", [_dec3], {
193
+ }(LibroEditorCellView), (_descriptor = _applyDecoratedDescriptor(_class2.prototype, "libroContextKey", [_dec3], {
194
194
  configurable: true,
195
195
  enumerable: true,
196
196
  writable: true,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@difizen/libro-raw-cell",
3
- "version": "0.1.30",
3
+ "version": "0.1.32",
4
4
  "description": "",
5
5
  "keywords": [
6
6
  "libro",
@@ -32,9 +32,9 @@
32
32
  "src"
33
33
  ],
34
34
  "dependencies": {
35
- "@difizen/libro-code-editor": "^0.1.30",
36
- "@difizen/libro-common": "^0.1.30",
37
- "@difizen/libro-core": "^0.1.30",
35
+ "@difizen/libro-code-editor": "^0.1.32",
36
+ "@difizen/libro-common": "^0.1.32",
37
+ "@difizen/libro-core": "^0.1.32",
38
38
  "@difizen/mana-app": "latest"
39
39
  },
40
40
  "peerDependencies": {
@@ -3,7 +3,7 @@
3
3
  import type { CodeEditorViewOptions, CodeEditorView } from '@difizen/libro-code-editor';
4
4
  import { CodeEditorManager } from '@difizen/libro-code-editor';
5
5
  import type { CellViewOptions } from '@difizen/libro-core';
6
- import { CellService, LibroEditorCellView, LirboContextKey } from '@difizen/libro-core';
6
+ import { CellService, LibroEditorCellView, LibroContextKey } from '@difizen/libro-core';
7
7
  import { getOrigin, prop, useInject, watch } from '@difizen/mana-app';
8
8
  import {
9
9
  view,
@@ -43,7 +43,7 @@ const CodeEditorViewComponent = React.forwardRef<HTMLDivElement>(
43
43
  @transient()
44
44
  @view('raw-cell-view')
45
45
  export class LibroRawCellView extends LibroEditorCellView {
46
- @inject(LirboContextKey) protected readonly lirboContextKey: LirboContextKey;
46
+ @inject(LibroContextKey) protected readonly libroContextKey: LibroContextKey;
47
47
  declare model: LibroRawCellModel;
48
48
  override view = CodeEditorViewComponent;
49
49
 
@@ -126,7 +126,7 @@ export class LibroRawCellView extends LibroEditorCellView {
126
126
  this.editorView.editorStatus === 'ready' &&
127
127
  this.parent.model.active?.id === this.id &&
128
128
  !this.parent.model.commandMode &&
129
- this.lirboContextKey.commandModeEnabled === true && // 排除弹窗等情况
129
+ this.libroContextKey.commandModeEnabled === true && // 排除弹窗等情况
130
130
  this.parent.model.readOnly === false
131
131
  ) {
132
132
  this.editorView?.editor.setOption('styleActiveLine', true);