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

prosemirror-safari-ime-span

Package Overview
Dependencies
Maintainers
0
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

prosemirror-safari-ime-span - npm Package Compare versions

Comparing version 1.0.1 to 1.0.2

2

dist/index.d.ts

@@ -11,4 +11,4 @@ import { Plugin } from 'prosemirror-state';

*/
declare const imeSpan: Plugin<boolean>;
declare const imeSpan: Plugin<undefined>;
export { imeSpan };

@@ -19,21 +19,13 @@ // src/index.ts

var key = new PluginKey("safari-ime-span");
var isComposing = false;
var spec = {
key,
state: {
init: () => {
return false;
},
apply: (tr, value) => {
const composing = tr.getMeta(key);
return composing != null ? composing : value;
}
},
props: {
decorations: createDecorations,
handleDOMEvents: {
compositionstart: (view) => {
view.dispatch(view.state.tr.setMeta(key, true));
compositionstart: () => {
isComposing = true;
},
compositionend: (view) => {
view.dispatch(view.state.tr.setMeta(key, false));
compositionend: () => {
isComposing = false;
}

@@ -45,4 +37,3 @@ }

const { $from, $to, to } = state.selection;
const composing = key.getState(state);
if (composing && $from.sameParent($to)) {
if (isComposing && $from.sameParent($to)) {
const deco = Decoration.widget(to, createSpan, {

@@ -49,0 +40,0 @@ ignoreSelection: true,

{
"name": "prosemirror-safari-ime-span",
"type": "module",
"version": "1.0.1",
"version": "1.0.2",
"packageManager": "pnpm@8.15.8",

@@ -6,0 +6,0 @@ "description": "",

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