Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@blocksuite/inline

Package Overview
Dependencies
Maintainers
2
Versions
595
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@blocksuite/inline - npm Package Compare versions

Comparing version 0.11.0-nightly-202312150424-f13b992 to 0.11.0-nightly-202312152355-f444352

12

dist/inline-editor.js

@@ -92,5 +92,5 @@ import { assertExists, DisposableGroup, Slot } from '@blocksuite/global/utils';

}
Promise.resolve().then(() => {
this.deltaService.render();
});
Promise.resolve()
.then(() => this.deltaService.render())
.catch(console.error);
};

@@ -133,3 +133,3 @@ if (!yText.doc) {

this.slots.mounted.emit();
this._deltaService.render();
this._deltaService.render().catch(console.error);
}

@@ -145,3 +145,3 @@ unmount() {

requestUpdate(syncInlineRange = true) {
this._deltaService.render(syncInlineRange);
this._deltaService.render(syncInlineRange).catch(console.error);
}

@@ -228,3 +228,3 @@ async waitForUpdate() {

render(nothing, this.rootElement);
this._deltaService.render();
this._deltaService.render().catch(console.error);
}

@@ -231,0 +231,0 @@ _transact(fn) {

@@ -159,3 +159,3 @@ import { html, render } from 'lit';

}
catch (error) {
catch (_) {
// Lit may be crashed by IME input and we need to rerender whole editor for it

@@ -162,0 +162,0 @@ this.editor.rerenderWholeEditor();

@@ -19,3 +19,5 @@ import { assertExists } from '@blocksuite/global/utils';

this.editor.disposables.addFromEvent(rootElement, 'compositionstart', this._onCompositionStart);
this.editor.disposables.addFromEvent(rootElement, 'compositionend', this._onCompositionEnd);
this.editor.disposables.addFromEvent(rootElement, 'compositionend', (event) => {
this._onCompositionEnd(event).catch(console.error);
});
this.editor.disposables.addFromEvent(rootElement, 'keydown', this._onKeyDown);

@@ -22,0 +24,0 @@ this.editor.disposables.addFromEvent(rootElement, 'click', this._onClick);

@@ -65,3 +65,3 @@ import { expect, test } from '@playwright/test';

await type(page, 'bbb');
page.waitForTimeout(100);
await page.waitForTimeout(100);
expect(await editorA.innerText()).toBe('abc\n' + ZERO_WIDTH_SPACE + '\nbbb');

@@ -210,4 +210,4 @@ expect(await editorB.innerText()).toBe('abc\n' + ZERO_WIDTH_SPACE + '\nbbb');

await setInlineRichTextRange(page, { index: 2, length: 3 });
editorABold.click();
page.waitForTimeout(100);
await editorABold.click();
await page.waitForTimeout(100);
delta = await getDeltaFromInlineRichText(page);

@@ -228,4 +228,4 @@ expect(delta).toEqual([

]);
editorAItalic.click();
page.waitForTimeout(100);
await editorAItalic.click();
await page.waitForTimeout(100);
delta = await getDeltaFromInlineRichText(page);

@@ -247,4 +247,4 @@ expect(delta).toEqual([

]);
editorAUnderline.click();
page.waitForTimeout(100);
await editorAUnderline.click();
await page.waitForTimeout(100);
delta = await getDeltaFromInlineRichText(page);

@@ -267,4 +267,4 @@ expect(delta).toEqual([

]);
editorAStrike.click();
page.waitForTimeout(100);
await editorAStrike.click();
await page.waitForTimeout(100);
delta = await getDeltaFromInlineRichText(page);

@@ -288,4 +288,4 @@ expect(delta).toEqual([

]);
editorACode.click();
page.waitForTimeout(100);
await editorACode.click();
await page.waitForTimeout(100);
delta = await getDeltaFromInlineRichText(page);

@@ -310,6 +310,6 @@ expect(delta).toEqual([

]);
editorAUndo.click({
await editorAUndo.click({
clickCount: 5,
});
page.waitForTimeout(100);
await page.waitForTimeout(100);
delta = await getDeltaFromInlineRichText(page);

@@ -321,6 +321,6 @@ expect(delta).toEqual([

]);
editorARedo.click({
await editorARedo.click({
clickCount: 5,
});
page.waitForTimeout(100);
await page.waitForTimeout(100);
delta = await getDeltaFromInlineRichText(page);

@@ -345,4 +345,4 @@ expect(delta).toEqual([

]);
editorABold.click();
page.waitForTimeout(100);
await editorABold.click();
await page.waitForTimeout(100);
delta = await getDeltaFromInlineRichText(page);

@@ -366,4 +366,4 @@ expect(delta).toEqual([

]);
editorAItalic.click();
page.waitForTimeout(100);
await editorAItalic.click();
await page.waitForTimeout(100);
delta = await getDeltaFromInlineRichText(page);

@@ -386,4 +386,4 @@ expect(delta).toEqual([

]);
editorAUnderline.click();
page.waitForTimeout(100);
await editorAUnderline.click();
await page.waitForTimeout(100);
delta = await getDeltaFromInlineRichText(page);

@@ -405,4 +405,4 @@ expect(delta).toEqual([

]);
editorAStrike.click();
page.waitForTimeout(100);
await editorAStrike.click();
await page.waitForTimeout(100);
delta = await getDeltaFromInlineRichText(page);

@@ -423,4 +423,4 @@ expect(delta).toEqual([

]);
editorACode.click();
page.waitForTimeout(100);
await editorACode.click();
await page.waitForTimeout(100);
delta = await getDeltaFromInlineRichText(page);

@@ -455,3 +455,3 @@ expect(delta).toEqual([

await setInlineRichTextRange(page, { index: 1, length: 3 });
editorABold.click();
await editorABold.click();
delta = await getDeltaFromInlineRichText(page);

@@ -473,3 +473,3 @@ expect(delta).toEqual([

await setInlineRichTextRange(page, { index: 7, length: 3 });
editorABold.click();
await editorABold.click();
delta = await getDeltaFromInlineRichText(page);

@@ -500,3 +500,3 @@ expect(delta).toEqual([

await setInlineRichTextRange(page, { index: 3, length: 5 });
editorAItalic.click();
await editorAItalic.click();
delta = await getDeltaFromInlineRichText(page);

@@ -543,3 +543,3 @@ expect(delta).toEqual([

]);
editorAUndo.click({
await editorAUndo.click({
clickCount: 3,

@@ -553,3 +553,3 @@ });

]);
editorARedo.click({
await editorARedo.click({
clickCount: 3,

@@ -643,3 +643,3 @@ });

await press(page, 'ArrowLeft');
assertSelection(page, 0, 8);
await assertSelection(page, 0, 8);
/**

@@ -653,3 +653,3 @@ * |abc

await press(page, 'ArrowUp');
assertSelection(page, 0, 0, 8);
await assertSelection(page, 0, 0, 8);
/**

@@ -661,3 +661,3 @@ * a|bc

await press(page, 'ArrowRight');
assertSelection(page, 0, 1, 7);
await assertSelection(page, 0, 1, 7);
await press(page, 'Backspace');

@@ -732,7 +732,7 @@ await page.waitForTimeout(100);

await page.waitForTimeout(100);
page.keyboard.down('Shift');
await page.keyboard.down('Shift');
await press(page, 'ArrowLeft');
await press(page, 'ArrowLeft');
await press(page, 'ArrowLeft');
page.keyboard.up('Shift');
await page.keyboard.up('Shift');
await page.waitForTimeout(100);

@@ -739,0 +739,0 @@ await assertSelection(page, 0, 1, 3);

{
"name": "@blocksuite/inline",
"version": "0.11.0-nightly-202312150424-f13b992",
"version": "0.11.0-nightly-202312152355-f444352",
"description": "A micro editor.",

@@ -27,3 +27,3 @@ "type": "module",

"zod": "^3.22.4",
"@blocksuite/global": "0.11.0-nightly-202312150424-f13b992"
"@blocksuite/global": "0.11.0-nightly-202312152355-f444352"
},

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

@@ -220,3 +220,3 @@ import { assertExists, DisposableGroup, Slot } from '@blocksuite/global/utils';

this.slots.mounted.emit();
this._deltaService.render();
this._deltaService.render().catch(console.error);
}

@@ -234,3 +234,3 @@

requestUpdate(syncInlineRange = true): void {
this._deltaService.render(syncInlineRange);
this._deltaService.render(syncInlineRange).catch(console.error);
}

@@ -364,3 +364,3 @@

render(nothing, this.rootElement);
this._deltaService.render();
this._deltaService.render().catch(console.error);
}

@@ -375,5 +375,5 @@

Promise.resolve().then(() => {
this.deltaService.render();
});
Promise.resolve()
.then(() => this.deltaService.render())
.catch(console.error);
};

@@ -380,0 +380,0 @@

@@ -257,3 +257,3 @@ import { html, render } from 'lit';

);
} catch (error) {
} catch (_) {
// Lit may be crashed by IME input and we need to rerender whole editor for it

@@ -260,0 +260,0 @@ this.editor.rerenderWholeEditor();

@@ -51,3 +51,5 @@ import { assertExists } from '@blocksuite/global/utils';

'compositionend',
this._onCompositionEnd
(event: CompositionEvent) => {
this._onCompositionEnd(event).catch(console.error);
}
);

@@ -54,0 +56,0 @@ this.editor.disposables.addFromEvent(

@@ -104,3 +104,3 @@ import { expect, test } from '@playwright/test';

page.waitForTimeout(100);
await page.waitForTimeout(100);

@@ -301,4 +301,4 @@ expect(await editorA.innerText()).toBe('abc\n' + ZERO_WIDTH_SPACE + '\nbbb');

editorABold.click();
page.waitForTimeout(100);
await editorABold.click();
await page.waitForTimeout(100);
delta = await getDeltaFromInlineRichText(page);

@@ -320,4 +320,4 @@ expect(delta).toEqual([

editorAItalic.click();
page.waitForTimeout(100);
await editorAItalic.click();
await page.waitForTimeout(100);
delta = await getDeltaFromInlineRichText(page);

@@ -340,4 +340,4 @@ expect(delta).toEqual([

editorAUnderline.click();
page.waitForTimeout(100);
await editorAUnderline.click();
await page.waitForTimeout(100);
delta = await getDeltaFromInlineRichText(page);

@@ -361,4 +361,4 @@ expect(delta).toEqual([

editorAStrike.click();
page.waitForTimeout(100);
await editorAStrike.click();
await page.waitForTimeout(100);
delta = await getDeltaFromInlineRichText(page);

@@ -383,4 +383,4 @@ expect(delta).toEqual([

editorACode.click();
page.waitForTimeout(100);
await editorACode.click();
await page.waitForTimeout(100);
delta = await getDeltaFromInlineRichText(page);

@@ -406,6 +406,6 @@ expect(delta).toEqual([

editorAUndo.click({
await editorAUndo.click({
clickCount: 5,
});
page.waitForTimeout(100);
await page.waitForTimeout(100);
delta = await getDeltaFromInlineRichText(page);

@@ -418,6 +418,6 @@ expect(delta).toEqual([

editorARedo.click({
await editorARedo.click({
clickCount: 5,
});
page.waitForTimeout(100);
await page.waitForTimeout(100);
delta = await getDeltaFromInlineRichText(page);

@@ -443,4 +443,4 @@ expect(delta).toEqual([

editorABold.click();
page.waitForTimeout(100);
await editorABold.click();
await page.waitForTimeout(100);
delta = await getDeltaFromInlineRichText(page);

@@ -465,4 +465,4 @@ expect(delta).toEqual([

editorAItalic.click();
page.waitForTimeout(100);
await editorAItalic.click();
await page.waitForTimeout(100);
delta = await getDeltaFromInlineRichText(page);

@@ -486,4 +486,4 @@ expect(delta).toEqual([

editorAUnderline.click();
page.waitForTimeout(100);
await editorAUnderline.click();
await page.waitForTimeout(100);
delta = await getDeltaFromInlineRichText(page);

@@ -506,4 +506,4 @@ expect(delta).toEqual([

editorAStrike.click();
page.waitForTimeout(100);
await editorAStrike.click();
await page.waitForTimeout(100);
delta = await getDeltaFromInlineRichText(page);

@@ -525,4 +525,4 @@ expect(delta).toEqual([

editorACode.click();
page.waitForTimeout(100);
await editorACode.click();
await page.waitForTimeout(100);
delta = await getDeltaFromInlineRichText(page);

@@ -567,3 +567,3 @@ expect(delta).toEqual([

await setInlineRichTextRange(page, { index: 1, length: 3 });
editorABold.click();
await editorABold.click();

@@ -587,3 +587,3 @@ delta = await getDeltaFromInlineRichText(page);

await setInlineRichTextRange(page, { index: 7, length: 3 });
editorABold.click();
await editorABold.click();

@@ -616,3 +616,3 @@ delta = await getDeltaFromInlineRichText(page);

await setInlineRichTextRange(page, { index: 3, length: 5 });
editorAItalic.click();
await editorAItalic.click();

@@ -661,3 +661,3 @@ delta = await getDeltaFromInlineRichText(page);

editorAUndo.click({
await editorAUndo.click({
clickCount: 3,

@@ -672,3 +672,3 @@ });

editorARedo.click({
await editorARedo.click({
clickCount: 3,

@@ -778,3 +778,3 @@ });

await press(page, 'ArrowLeft');
assertSelection(page, 0, 8);
await assertSelection(page, 0, 8);

@@ -789,3 +789,3 @@ /**

await press(page, 'ArrowUp');
assertSelection(page, 0, 0, 8);
await assertSelection(page, 0, 0, 8);

@@ -798,3 +798,3 @@ /**

await press(page, 'ArrowRight');
assertSelection(page, 0, 1, 7);
await assertSelection(page, 0, 1, 7);
await press(page, 'Backspace');

@@ -892,7 +892,7 @@ await page.waitForTimeout(100);

await page.waitForTimeout(100);
page.keyboard.down('Shift');
await page.keyboard.down('Shift');
await press(page, 'ArrowLeft');
await press(page, 'ArrowLeft');
await press(page, 'ArrowLeft');
page.keyboard.up('Shift');
await page.keyboard.up('Shift');
await page.waitForTimeout(100);

@@ -899,0 +899,0 @@ await assertSelection(page, 0, 1, 3);

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

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