🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

@udecode/plate-selection

Package Overview
Dependencies
Maintainers
0
Versions
118
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@udecode/plate-selection - npm Package Compare versions

Comparing version

to
36.0.8

5

dist/index.d.ts

@@ -370,4 +370,5 @@ import * as zustand_x from 'zustand-x';

declare const getSelectedBlocks: <V extends Value>(editor: TEditor<V>) => _udecode_slate.TNodeEntry<_udecode_slate.ENode<V>>[];
declare const isBlockSelected: (node: TElement) => unknown;
declare const isNodeBlockSelected: (node: TElement) => unknown;
declare const copySelectedBlocks: <V extends Value>(editor: PlateEditor<V>) => void;

@@ -390,2 +391,2 @@

export { ACTION_COPY, ACTION_DELETE, BlockSelectable, type BlockSelectableOptions, BlockSelection, BlockSelectionArea, type BlockSelectionAreaProps, type BlockSelectionPlugin, BlockStartArea, type BlockStartAreaState, type CommandItem, KEY_BLOCK_SELECTION, type Menu, SelectionArea, type SelectionAreaProps, blockContextMenuActions, blockContextMenuSelectors, blockContextMenuStore, blockSelectionActions, blockSelectionSelectors, blockSelectionStore, copySelectedBlocks, createBlockSelectionPlugin, extractSelectableId, extractSelectableIds, getAllSelectableDomNode, getSelectedBlocks, getSelectedDomNode, isBlockSelected, onCloseBlockSelection, onKeyDownSelection, openContextMenu, pasteSelectedBlocks, selectInsertedBlocks, useBlockContextMenu, useBlockContextMenuSelectors, useBlockContextMenuState, useBlockMenuItems, useBlockMenuItemsState, useBlockSelectable, useBlockSelectableState, useBlockSelected, useBlockSelectionArea, useBlockSelectionSelectors, useBlockStartArea, useHasBlockSelected, useHooksBlockSelection, withSelection };
export { ACTION_COPY, ACTION_DELETE, BlockSelectable, type BlockSelectableOptions, BlockSelection, BlockSelectionArea, type BlockSelectionAreaProps, type BlockSelectionPlugin, BlockStartArea, type BlockStartAreaState, type CommandItem, KEY_BLOCK_SELECTION, type Menu, SelectionArea, type SelectionAreaProps, blockContextMenuActions, blockContextMenuSelectors, blockContextMenuStore, blockSelectionActions, blockSelectionSelectors, blockSelectionStore, copySelectedBlocks, createBlockSelectionPlugin, extractSelectableId, extractSelectableIds, getAllSelectableDomNode, getSelectedBlocks, getSelectedDomNode, isNodeBlockSelected, onCloseBlockSelection, onKeyDownSelection, openContextMenu, pasteSelectedBlocks, selectInsertedBlocks, useBlockContextMenu, useBlockContextMenuSelectors, useBlockContextMenuState, useBlockMenuItems, useBlockMenuItemsState, useBlockSelectable, useBlockSelectableState, useBlockSelected, useBlockSelectionArea, useBlockSelectionSelectors, useBlockStartArea, useHasBlockSelected, useHooksBlockSelection, withSelection };

18

dist/index.js

@@ -80,3 +80,3 @@ "use strict";

getSelectedDomNode: () => getSelectedDomNode,
isBlockSelected: () => isBlockSelected,
isNodeBlockSelected: () => isNodeBlockSelected,
onCloseBlockSelection: () => onCloseBlockSelection,

@@ -122,6 +122,2 @@ onKeyDownSelection: () => onKeyDownSelection,

};
var isBlockSelected = (node) => {
const selectedIds = blockSelectionSelectors.selectedIds();
return node.id && selectedIds.has(node.id);
};

@@ -218,2 +214,10 @@ // src/utils/copySelectedBlocks.ts

var import_plate_common = require("@udecode/plate-common");
// src/queries/isNodeBlockSelected.ts
var isNodeBlockSelected = (node) => {
const selectedIds = blockSelectionSelectors.selectedIds();
return node.id && selectedIds.has(node.id);
};
// src/context-menu/useBlockContextMenu.ts
var useBlockContextMenuState = () => {

@@ -448,3 +452,3 @@ const editor = (0, import_plate_common.useEditorRef)();

if (nodeEntry && import_slate2.Path.isCommon(path, nodeEntry[1])) {
const isSelected2 = isBlockSelected(nodeEntry[0]);
const isSelected2 = isNodeBlockSelected(nodeEntry[0]);
const isOpenAlways = ((_b = event.target.dataset) == null ? void 0 : _b.openContextMenu) === "true";

@@ -929,3 +933,3 @@ if (!isSelected2 && !(0, import_server7.isVoid)(editor, nodeEntry[0]) && !isOpenAlways)

getSelectedDomNode,
isBlockSelected,
isNodeBlockSelected,
onCloseBlockSelection,

@@ -932,0 +936,0 @@ onKeyDownSelection,

{
"name": "@udecode/plate-selection",
"version": "36.0.0",
"version": "36.0.8",
"description": "Plate plugin to add a visual way of selecting blocks",

@@ -49,3 +49,3 @@ "license": "MIT",

"peerDependencies": {
"@udecode/plate-common": ">=36.0.0",
"@udecode/plate-common": ">=36.0.6",
"react": ">=16.8.0",

@@ -52,0 +52,0 @@ "react-dom": ">=16.8.0",

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