Socket
Socket
Sign inDemoInstall

@devbookhq/code-editor

Package Overview
Dependencies
Maintainers
2
Versions
45
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@devbookhq/code-editor - npm Package Compare versions

Comparing version 0.1.10 to 0.1.11

32

dist/index.d.ts
import * as react from 'react';
import { Extension } from '@codemirror/state';
import { Diagnostic } from '@codemirror/lint';
import { StateEffectType, Extension } from '@codemirror/state';
import { Session } from '@devbookhq/sdk';

@@ -7,7 +8,24 @@ import * as vscode_languageserver_protocol from 'vscode-languageserver-protocol';

import { CompletionContext, CompletionResult } from '@codemirror/autocomplete';
import { PluginValue, EditorView, ViewUpdate, Tooltip } from '@codemirror/view';
import { PluginValue, EditorView, Tooltip, ViewUpdate } from '@codemirror/view';
import { MessageConnection, Message, NotificationHandler, CancellationToken } from 'vscode-ws-jsonrpc';
declare class SignatureState implements PluginValue {
private readonly view;
private readonly getPlugin;
private readonly setSignatureHelp;
private lastSignature?;
constructor(view: EditorView, getPlugin: () => LanguageServerPlugin | null, setSignatureHelp: StateEffectType<Tooltip | null>);
/**
* Call this after the change to the textDocument is propagated to the language server
*/
handleUpdate(update: ViewUpdate): Promise<void>;
private updateSignature;
private getTooltip;
private setTooltip;
}
declare class LanguageServerPlugin implements PluginValue {
private view;
private readonly getSignatureState;
private readonly onDiagnosticsChange?;
readonly client: LanguageServerClient;

@@ -18,5 +36,5 @@ private readonly openPromise;

private diagnostics?;
constructor(view: EditorView, openFile: boolean);
constructor(view: EditorView, openFile: boolean, getSignatureState: () => SignatureState, onDiagnosticsChange?: ((diagnostics: Diagnostic[]) => void) | undefined);
private get nextDocumentVersion();
update({ docChanged, state }: ViewUpdate): Promise<void>;
update(viewUpdate: ViewUpdate): Promise<void>;
destroy(): void;

@@ -216,2 +234,4 @@ requestFormatting(view: EditorView): Promise<null | undefined>;

onContentChange?: (content: string) => void;
handleRun?: () => void;
onDiagnosticsChange?: (diagnostics: ExtendedCMDiagnostic[]) => void;
supportedLanguages: LanguageSetup[];

@@ -239,4 +259,8 @@ height?: string;

}
interface ExtendedCMDiagnostic extends Diagnostic {
filename: string;
}
interface Handler {
focus: () => void;
getDiagnostics: () => ExtendedCMDiagnostic[] | undefined;
}

@@ -243,0 +267,0 @@ declare const CodeEditor: react.ForwardRefExoticComponent<Props & react.RefAttributes<Handler>>;

2

package.json
{
"name": "@devbookhq/code-editor",
"version": "0.1.10",
"version": "0.1.11",
"main": "./dist/index.js",

@@ -5,0 +5,0 @@ "module": "./dist/index.mjs",

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc