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

@udecode/plate-floating

Package Overview
Dependencies
Maintainers
0
Versions
97
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@udecode/plate-floating - npm Package Compare versions

Comparing version 34.0.6 to 34.1.1

5

dist/index.d.ts

@@ -5,5 +5,3 @@ import { ClientRectObject } from '@floating-ui/core';

import React from 'react';
import * as _udecode_plate_common from '@udecode/plate-common';
import { TReactEditor } from '@udecode/plate-common';
import * as _udecode_slate from '@udecode/slate';
import { Value } from '@udecode/plate-common/server';

@@ -55,3 +53,2 @@ import { Location, Range } from 'slate';

} & FloatingToolbarState) => {
editor: _udecode_plate_common.PlateEditor<_udecode_slate.Value>;
editorId: string;

@@ -72,3 +69,3 @@ floating: UseVirtualFloatingReturn<ReferenceType>;

};
declare const useFloatingToolbar: ({ editor, editorId, floating, focusedEditorId, hideToolbar, ignoreReadOnly, mousedown, open, selectionExpanded, selectionText, setMousedown, setOpen, setWaitForCollapsedSelection, waitForCollapsedSelection, }: ReturnType<typeof useFloatingToolbarState>) => {
declare const useFloatingToolbar: ({ editorId, floating, focusedEditorId, hideToolbar, ignoreReadOnly, mousedown, open, selectionExpanded, selectionText, setMousedown, setOpen, setWaitForCollapsedSelection, waitForCollapsedSelection, }: ReturnType<typeof useFloatingToolbarState>) => {
hidden: boolean;

@@ -75,0 +72,0 @@ props: {

12

dist/index.js

@@ -142,3 +142,2 @@ "use strict";

const focused = (0, import_slate_react.useFocused)();
const editor = (0, import_plate_common.useEditorRef)();
const [open, setOpen] = import_react.default.useState(false);

@@ -158,3 +157,2 @@ const [waitForCollapsedSelection, setWaitForCollapsedSelection] = import_react.default.useState(false);

return {
editor,
editorId,

@@ -177,3 +175,2 @@ floating,

var useFloatingToolbar = ({
editor,
editorId,

@@ -209,12 +206,9 @@ floating,

import_react.default.useEffect(() => {
const container = (0, import_plate_common.toDOMNode)(editor, editor);
const mouseup = () => setMousedown(false);
const mousedown2 = () => setMousedown(true);
if (!container)
return;
container.addEventListener("mouseup", mouseup);
document.addEventListener("mouseup", mouseup);
document.addEventListener("mousedown", mousedown2);
return () => {
container.removeEventListener("mouseup", mouseup);
container.removeEventListener("mousedown", mousedown2);
document.removeEventListener("mouseup", mouseup);
document.removeEventListener("mousedown", mousedown2);
};

@@ -221,0 +215,0 @@ }, []);

{
"name": "@udecode/plate-floating",
"version": "34.0.6",
"version": "34.1.1",
"description": "Floating UI for Plate",

@@ -5,0 +5,0 @@ "license": "MIT",

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