New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@blocksuite/virgo

Package Overview
Dependencies
Maintainers
5
Versions
509
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@blocksuite/virgo - npm Package Compare versions

Comparing version 0.0.0-20230817030423-20f3821a-nightly to 0.0.0-20230817172832-20c2b2a5-nightly

2

dist/services/range.d.ts

@@ -17,3 +17,3 @@ import type { VRange } from '../types.js';

*/
setVRange: (vRange: VRange, sync?: boolean) => void;
setVRange: (vRange: VRange | null, sync?: boolean) => void;
/**

@@ -20,0 +20,0 @@ * sync the dom selection from vRange for **this Editor**

@@ -23,2 +23,13 @@ import { VirgoLine } from '../components/index.js';

}
if (this._vRange === null) {
const selectionRoot = findDocumentOrShadowRoot(this._editor);
const selection = selectionRoot.getSelection();
if (selection && selection.rangeCount > 0) {
const range = selection.getRangeAt(0);
if (range.intersectsNode(this._editor.rootElement)) {
selection.removeAllRanges();
}
}
return;
}
const fn = () => {

@@ -25,0 +36,0 @@ // There may be multiple range update events in one frame,

@@ -58,3 +58,3 @@ import type { NullablePartial } from '@blocksuite/global/utils';

getVRange: () => VRange | null;
setVRange: (vRange: VRange, sync?: boolean) => void;
setVRange: (vRange: VRange | null, sync?: boolean) => void;
syncVRange: () => void;

@@ -61,0 +61,0 @@ getDeltasByVRange: (vRange: VRange) => import("./types.js").DeltaEntry<TextAttributes>[];

{
"name": "@blocksuite/virgo",
"version": "0.0.0-20230817030423-20f3821a-nightly",
"version": "0.0.0-20230817172832-20c2b2a5-nightly",
"description": "A micro editor.",

@@ -28,3 +28,3 @@ "main": "dist/index.js",

"zod": "^3.21.4",
"@blocksuite/global": "0.0.0-20230817030423-20f3821a-nightly"
"@blocksuite/global": "0.0.0-20230817172832-20c2b2a5-nightly"
},

@@ -31,0 +31,0 @@ "scripts": {

@@ -42,2 +42,14 @@ import { VirgoLine } from '../components/index.js';

if (this._vRange === null) {
const selectionRoot = findDocumentOrShadowRoot(this._editor);
const selection = selectionRoot.getSelection();
if (selection && selection.rangeCount > 0) {
const range = selection.getRangeAt(0);
if (range.intersectsNode(this._editor.rootElement)) {
selection.removeAllRanges();
}
}
return;
}
const fn = () => {

@@ -64,3 +76,3 @@ // There may be multiple range update events in one frame,

*/
setVRange = (vRange: VRange, sync = true): void => {
setVRange = (vRange: VRange | null, sync = true): void => {
this._editor.slots.vRangeUpdated.emit([vRange, sync ? 'other' : 'silent']);

@@ -67,0 +79,0 @@ };

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

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