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

@tiptap/suggestion

Package Overview
Dependencies
Maintainers
5
Versions
239
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@tiptap/suggestion - npm Package Compare versions

Comparing version 2.5.0-beta.2 to 2.5.0-beta.3

dist/packages/core/src/CommandManager.d.ts

10

dist/index.js

@@ -74,5 +74,5 @@ import { PluginKey, Plugin } from '@tiptap/pm/state';

const changed = !started && !stopped && prev.query !== next.query;
const handleStart = started || moved;
const handleChange = changed && !moved;
const handleExit = stopped || moved;
const handleStart = started;
const handleChange = changed || moved;
const handleExit = stopped;
// Cancel when suggestion isn't active

@@ -182,3 +182,5 @@ if (!handleStart && !handleChange && !handleExit) {

// If we found a match, update the current state to show it
if (match && allow({ editor, state, range: match.range })) {
if (match && allow({
editor, state, range: match.range, isActive: prev.active,
})) {
next.active = true;

@@ -185,0 +187,0 @@ next.decorationId = prev.decorationId ? prev.decorationId : decorationId;

12

dist/index.umd.js

@@ -76,5 +76,5 @@ (function (global, factory) {

const changed = !started && !stopped && prev.query !== next.query;
const handleStart = started || moved;
const handleChange = changed && !moved;
const handleExit = stopped || moved;
const handleStart = started;
const handleChange = changed || moved;
const handleExit = stopped;
// Cancel when suggestion isn't active

@@ -184,3 +184,5 @@ if (!handleStart && !handleChange && !handleExit) {

// If we found a match, update the current state to show it
if (match && allow({ editor, state, range: match.range })) {
if (match && allow({
editor, state, range: match.range, isActive: prev.active,
})) {
next.active = true;

@@ -240,3 +242,3 @@ next.decorationId = prev.decorationId ? prev.decorationId : decorationId;

exports.SuggestionPluginKey = SuggestionPluginKey;
exports["default"] = Suggestion;
exports.default = Suggestion;
exports.findSuggestionMatch = findSuggestionMatch;

@@ -243,0 +245,0 @@

@@ -10,3 +10,3 @@ import { Range } from '@tiptap/core';

}
export declare type SuggestionMatch = {
export type SuggestionMatch = {
range: Range;

@@ -13,0 +13,0 @@ query: string;

@@ -0,0 +0,0 @@ import { Suggestion } from './suggestion.js';

@@ -100,2 +100,3 @@ import { Editor, Range } from '@tiptap/core';

range: Range;
isActive?: boolean;
}) => boolean;

@@ -102,0 +103,0 @@ findSuggestionMatch?: typeof defaultFindSuggestionMatch;

{
"name": "@tiptap/suggestion",
"description": "suggestion plugin for tiptap",
"version": "2.5.0-beta.2",
"version": "2.5.0-beta.3",
"homepage": "https://tiptap.dev",

@@ -32,4 +32,4 @@ "keywords": [

"devDependencies": {
"@tiptap/core": "^2.5.0-beta.2",
"@tiptap/pm": "^2.5.0-beta.2"
"@tiptap/core": "^2.5.0-beta.3",
"@tiptap/pm": "^2.5.0-beta.3"
},

@@ -36,0 +36,0 @@ "peerDependencies": {

@@ -102,3 +102,3 @@ import { Editor, Range } from '@tiptap/core'

*/
allow?: (props: { editor: Editor; state: EditorState; range: Range }) => boolean
allow?: (props: { editor: Editor; state: EditorState; range: Range, isActive?: boolean }) => boolean
findSuggestionMatch?: typeof defaultFindSuggestionMatch

@@ -198,6 +198,7 @@ }

const changed = !started && !stopped && prev.query !== next.query
const handleStart = started || moved
const handleChange = changed && !moved
const handleExit = stopped || moved
const handleStart = started
const handleChange = changed || moved
const handleExit = stopped
// Cancel when suggestion isn't active

@@ -334,3 +335,5 @@ if (!handleStart && !handleChange && !handleExit) {

// If we found a match, update the current state to show it
if (match && allow({ editor, state, range: match.range })) {
if (match && allow({
editor, state, range: match.range, isActive: prev.active,
})) {
next.active = true

@@ -337,0 +340,0 @@ next.decorationId = prev.decorationId ? prev.decorationId : decorationId

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