Skip to content

Commit

Permalink
feat: support lsp
Browse files Browse the repository at this point in the history
  • Loading branch information
BroKun committed Dec 11, 2023
1 parent abd7280 commit 044fc16
Show file tree
Hide file tree
Showing 341 changed files with 31,050 additions and 1,662 deletions.
File renamed without changes.
15 changes: 15 additions & 0 deletions packages/libro-code-cell/.fatherrc.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
export default {
platform: 'browser',
esm: {
output: 'es',
},
extraBabelPlugins: [
['@babel/plugin-proposal-decorators', { legacy: true }],
['@babel/plugin-transform-flow-strip-types', { allowDeclareFields: true }],
['@babel/plugin-transform-class-properties', { loose: true }],
['@babel/plugin-transform-private-methods', { loose: true }],
['@babel/plugin-transform-private-property-in-object', { loose: true }],
['babel-plugin-parameter-decorator'],
],
extraBabelPresets: [['@babel/preset-typescript', { onlyRemoveTypeImports: true }]],
};
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "@difizen/libro-codemirror-raw-cell",
"name": "@difizen/libro-code-cell",
"version": "0.1.0",
"description": "",
"keywords": [
Expand Down Expand Up @@ -46,7 +46,6 @@
},
"dependencies": {
"@difizen/libro-code-editor": "^0.1.0",
"@difizen/libro-codemirror": "^0.1.0",
"@difizen/libro-common": "^0.1.0",
"@difizen/libro-core": "^0.1.0",
"@difizen/mana-app": "latest"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { inject, singleton } from '@difizen/mana-app';
import type { CellMeta, CellModel, CellOptions } from '@difizen/libro-core';
import { CellModelContribution, CellViewContribution } from '@difizen/libro-core';
import type { CellMeta, CellModel, CellOptions } from '@difizen/libro-core';
import { inject, singleton } from '@difizen/mana-app';

import { CodeCellModelFactory } from './code-cell-protocol.js';
import { LibroCodeCellView } from './code-cell-view.js';
Expand All @@ -9,12 +9,7 @@ import { LibroCodeCellView } from './code-cell-view.js';
export class CodeEditorCellContribution
implements CellModelContribution, CellViewContribution
{
protected libroCellModelFactory: CodeCellModelFactory;
constructor(
@inject(CodeCellModelFactory) libroCellModelFactory: CodeCellModelFactory,
) {
this.libroCellModelFactory = libroCellModelFactory;
}
@inject(CodeCellModelFactory) libroCellModelFactory: CodeCellModelFactory;

cellMeta: CellMeta = {
type: 'code',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import type { ICodeCell } from '@difizen/libro-common';
import type { ExecutionCount } from '@difizen/libro-common';
import { LibroCellModel, CellOptions } from '@difizen/libro-core';
import type { ICodeCell } from '@difizen/libro-common';
import type { ExecutableCellModel } from '@difizen/libro-core';
import { CellOptions, LibroCellModel } from '@difizen/libro-core';
import type { Event as ManaEvent } from '@difizen/mana-app';
import { inject, prop, transient, ViewManager } from '@difizen/mana-app';
import { Emitter } from '@difizen/mana-app';
import { prop, ViewManager, inject, transient } from '@difizen/mana-app';

/**
* 基础的可执行代码的cell, 带有执行能力
Expand All @@ -20,6 +20,8 @@ export class LibroCodeCellModel extends LibroCellModel implements ExecutableCell
@prop()
hasOutputsScrolled: boolean;

declare libroFormatType: string;

viewManager: ViewManager;

// Emitter Msg
Expand Down Expand Up @@ -48,7 +50,7 @@ export class LibroCodeCellModel extends LibroCellModel implements ExecutableCell
return {
id: this.id,
cell_type: this.type,
source: this.value,
source: this.source,
metadata: this.metadata,
execution_count: this.executeCount,
// outputs: this.outputs,
Expand Down
Loading

0 comments on commit 044fc16

Please sign in to comment.