Huge News!Announcing our $40M Series B led by Abstract Ventures.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.4.0-20230216093909-90a4996 to 0.4.0-20230216201306-ed1c8f8

15

dist/components/base-text.d.ts

@@ -8,5 +8,4 @@ import { LitElement } from 'lit';

underline: z.ZodOptional<z.ZodBoolean>;
strikethrough: z.ZodOptional<z.ZodBoolean>;
inlineCode: z.ZodOptional<z.ZodBoolean>;
color: z.ZodOptional<z.ZodString>;
strike: z.ZodOptional<z.ZodBoolean>;
code: z.ZodOptional<z.ZodBoolean>;
link: z.ZodOptional<z.ZodString>;

@@ -17,5 +16,4 @@ }, "strip", z.ZodTypeAny, {

underline?: boolean | undefined;
strikethrough?: boolean | undefined;
inlineCode?: boolean | undefined;
color?: string | undefined;
strike?: boolean | undefined;
code?: boolean | undefined;
link?: string | undefined;

@@ -26,5 +24,4 @@ }, {

underline?: boolean | undefined;
strikethrough?: boolean | undefined;
inlineCode?: boolean | undefined;
color?: string | undefined;
strike?: boolean | undefined;
code?: boolean | undefined;
link?: string | undefined;

@@ -31,0 +28,0 @@ }>;

9

dist/components/base-text.js

@@ -17,5 +17,4 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {

underline: z.boolean().optional(),
strikethrough: z.boolean().optional(),
inlineCode: z.boolean().optional(),
color: z.string().optional(),
strike: z.boolean().optional(),
code: z.boolean().optional(),
link: z.string().optional(),

@@ -28,7 +27,7 @@ });

}
if (props.strikethrough) {
if (props.strike) {
textDecorations += ' line-through';
}
let inlineCodeStyle = {};
if (props.inlineCode) {
if (props.code) {
inlineCodeStyle = {

@@ -35,0 +34,0 @@ 'font-family': '"SFMono-Regular", Menlo, Consolas, "PT Mono", "Liberation Mono", Courier, monospace',

@@ -85,2 +85,3 @@ import { Signal } from '@blocksuite/global/utils';

private _onSelectionChange;
private _onPaste;
private _onUpdateVRange;

@@ -87,0 +88,0 @@ private _transact;

@@ -46,2 +46,18 @@ import { assertExists, Signal } from '@blocksuite/global/utils';

};
this._onPaste = (event) => {
const data = event.clipboardData?.getData('text/plain');
if (data) {
const vRange = this._vRange;
if (vRange) {
this.insertText(vRange, data);
this.signals.updateVRange.emit([
{
index: vRange.index + data.length,
length: 0,
},
'input',
]);
}
}
};
this._onUpdateVRange = ([newRangStatic, origin]) => {

@@ -107,2 +123,5 @@ this._vRange = newRangStatic;

});
this._rootElement.addEventListener('paste', this._onPaste, {
signal: this._rootElementAbort.signal,
});
}

@@ -109,0 +128,0 @@ unmount() {

{
"name": "@blocksuite/virgo",
"version": "0.4.0-20230216093909-90a4996",
"version": "0.4.0-20230216201306-ed1c8f8",
"description": "A micro editor.",

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

"dependencies": {
"@blocksuite/global": "0.4.0-20230216093909-90a4996",
"@blocksuite/global": "0.4.0-20230216201306-ed1c8f8",
"zod": "^3.20.6"

@@ -29,0 +29,0 @@ },

@@ -14,5 +14,4 @@ import { html, LitElement } from 'lit';

underline: z.boolean().optional(),
strikethrough: z.boolean().optional(),
inlineCode: z.boolean().optional(),
color: z.string().optional(),
strike: z.boolean().optional(),
code: z.boolean().optional(),
link: z.string().optional(),

@@ -30,3 +29,3 @@ });

}
if (props.strikethrough) {
if (props.strike) {
textDecorations += ' line-through';

@@ -36,3 +35,3 @@ }

let inlineCodeStyle = {};
if (props.inlineCode) {
if (props.code) {
inlineCodeStyle = {

@@ -39,0 +38,0 @@ 'font-family':

@@ -117,2 +117,5 @@ import { assertExists, Signal } from '@blocksuite/global/utils';

});
this._rootElement.addEventListener('paste', this._onPaste, {
signal: this._rootElementAbort.signal,
});
}

@@ -656,2 +659,19 @@

private _onPaste = (event: ClipboardEvent) => {
const data = event.clipboardData?.getData('text/plain');
if (data) {
const vRange = this._vRange;
if (vRange) {
this.insertText(vRange, data);
this.signals.updateVRange.emit([
{
index: vRange.index + data.length,
length: 0,
},
'input',
]);
}
}
};
private _onUpdateVRange = ([newRangStatic, origin]: UpdateVRangeProp) => {

@@ -658,0 +678,0 @@ this._vRange = newRangStatic;

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

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