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

@bangle.dev/collab-client

Package Overview
Dependencies
Maintainers
1
Versions
112
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@bangle.dev/collab-client - npm Package Compare versions

Comparing version 0.17.1 to 0.17.2

20

collab-extension.ts

@@ -8,3 +8,9 @@ import {

import { Step } from 'prosemirror-transform';
import { EditorState, Plugin, PluginKey, Selection } from 'prosemirror-state';
import {
EditorState,
Plugin,
PluginKey,
Selection,
TextSelection,
} from 'prosemirror-state';
import { EditorView } from 'prosemirror-view';

@@ -478,6 +484,12 @@ import { replaceDocument } from './helpers';

const { doc, version, managerId } = getDocumentResponse;
const prevSelection =
view.state.selection instanceof TextSelection
? view.state.selection
: undefined;
let tr = replaceDocument(view.state, doc, version);
if (oldSelection) {
let { from } = oldSelection;
const selection = oldSelection || prevSelection;
if (selection) {
let { from } = selection;
if (from >= tr.doc.content.size) {

@@ -484,0 +496,0 @@ tr = tr.setSelection(Selection.atEnd(tr.doc));

10

dist/collab-extension.js
import { collab, receiveTransaction, getVersion, sendableSteps, } from 'prosemirror-collab';
import { Step } from 'prosemirror-transform';
import { Plugin, PluginKey, Selection } from 'prosemirror-state';
import { Plugin, PluginKey, Selection, TextSelection, } from 'prosemirror-state';
import { replaceDocument } from './helpers';

@@ -312,5 +312,9 @@ import { CollabError, getIdleCallback, sleep, uuid, cancelablePromise, serialExecuteQueue, } from '@bangle.dev/collab-server';

const { doc, version, managerId } = getDocumentResponse;
const prevSelection = view.state.selection instanceof TextSelection
? view.state.selection
: undefined;
let tr = replaceDocument(view.state, doc, version);
if (oldSelection) {
let { from } = oldSelection;
const selection = oldSelection || prevSelection;
if (selection) {
let { from } = selection;
if (from >= tr.doc.content.size) {

@@ -317,0 +321,0 @@ tr = tr.setSelection(Selection.atEnd(tr.doc));

{
"name": "@bangle.dev/collab-client",
"version": "0.17.1",
"version": "0.17.2",
"homepage": "https://bangle.dev",

@@ -38,5 +38,5 @@ "authors": [

"devDependencies": {
"@bangle.dev/collab-server": "0.17.1",
"@bangle.dev/core": "0.17.1",
"@bangle.dev/disk": "0.17.1",
"@bangle.dev/collab-server": "0.17.2",
"@bangle.dev/core": "0.17.2",
"@bangle.dev/disk": "0.17.2",
"@types/jest": "^26.0.23",

@@ -43,0 +43,0 @@ "@types/node": "^15.6.1",

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