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

@prosekit/core

Package Overview
Dependencies
Maintainers
1
Versions
110
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@prosekit/core - npm Package Compare versions

Comparing version 0.1.5 to 0.1.6

2

dist/_tsup-dts-rollup.d.ts

@@ -896,2 +896,4 @@ import { AllSelection } from '@prosekit/pm/state';

export declare function setSelectionAround(tr: Transaction, pos: number): void;
/**

@@ -898,0 +900,0 @@ * @internal

@@ -40,3 +40,3 @@ // src/commands/add-mark.ts

// src/commands/insert-node.ts
import { TextSelection } from "@prosekit/pm/state";
import "@prosekit/pm/state";
import { insertPoint } from "@prosekit/pm/transform";

@@ -57,2 +57,11 @@

// src/utils/set-selection-around.ts
import { TextSelection } from "@prosekit/pm/state";
function setSelectionAround(tr, pos) {
const docSize = tr.doc.content.size;
const $pos = tr.doc.resolve(pos > docSize ? docSize : pos < 0 ? 0 : pos);
const selection = TextSelection.between($pos, $pos);
tr.setSelection(selection);
}
// src/commands/insert-node.ts

@@ -75,3 +84,3 @@ function insertNode(options) {

const tr = state.tr.insert(insertPos, node);
tr.setSelection(TextSelection.near(tr.doc.resolve(insertPos)));
setSelectionAround(tr, insertPos + node.nodeSize);
dispatch(tr);

@@ -78,0 +87,0 @@ }

2

package.json
{
"name": "@prosekit/core",
"type": "module",
"version": "0.1.5",
"version": "0.1.6",
"private": false,

@@ -6,0 +6,0 @@ "author": {

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