New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@udecode/plate-resizable

Package Overview
Dependencies
Maintainers
0
Versions
46
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@udecode/plate-resizable - npm Package Compare versions

Comparing version 43.0.0 to 44.0.0

49

dist/index.d.ts
import * as csstype from 'csstype';
import React from 'react';
import * as jotai from 'jotai';
import * as jotai_x from 'jotai-x';

@@ -7,5 +8,2 @@ import { TElement } from '@udecode/plate';

type ResizeDirection = 'bottom' | 'left' | 'right' | 'top';
type ResizeLengthStatic = number;
type ResizeLengthRelative = string;
type ResizeLength = ResizeLengthRelative | ResizeLengthStatic;
type ResizeEvent = {

@@ -17,2 +15,5 @@ delta: ResizeLengthStatic;

};
type ResizeLength = ResizeLengthRelative | ResizeLengthStatic;
type ResizeLengthRelative = string;
type ResizeLengthStatic = number;

@@ -44,3 +45,3 @@ interface ResizableOptions {

};
wrapperRef: React.RefObject<HTMLDivElement>;
wrapperRef: React.RefObject<HTMLDivElement | null>;
};

@@ -57,3 +58,14 @@ declare const Resizable: React.ForwardRefExoticComponent<{

}>>;
declare const useResizeHandleSet: <K extends "onResize">(key: K, options?: string | jotai_x.UseAtomOptions) => ({
onResize: jotai_x.SimpleWritableAtom<(event: ResizeEvent) => void>;
} & object)[K] extends jotai.WritableAtom<infer _V, infer A extends unknown[], infer R> ? (...args: A) => R : never;
declare const useResizeHandleStore: jotai_x.UseStoreApi<ResizeHandleStoreState, object>;
declare const useResizeHandleValue: <K extends "onResize", S = ({
onResize: jotai_x.SimpleWritableAtom<(event: ResizeEvent) => void>;
} & object)[K] extends jotai.Atom<infer V> ? V : never>(key: K, options?: ({
selector?: ((v: ({
onResize: jotai_x.SimpleWritableAtom<(event: ResizeEvent) => void>;
} & object)[K] extends jotai.Atom<infer V_1> ? V_1 : never, prevSelectorOutput?: S | undefined) => S) | undefined;
equalityFn?: ((prev: S, next: S) => boolean) | undefined;
} & jotai_x.UseAtomOptions) | undefined, deps?: unknown[]) => S;
type ResizeHandleOptions = {

@@ -100,10 +112,2 @@ direction?: ResizeDirection;

options?: ResizeHandleOptions | undefined;
setProps?: ((hookProps: {
onMouseDown: React.MouseEventHandler<Element>;
onMouseOut: () => void;
onMouseOver: () => void;
onTouchEnd: () => void;
onTouchMove: () => void;
onTouchStart: React.TouchEventHandler<Element>;
}) => Omit<React.HTMLAttributes<HTMLDivElement>, "onResize">) | undefined;
state?: {

@@ -126,2 +130,10 @@ direction: ResizeDirection;

style?: React.CSSProperties;
setProps?: ((hookProps: {
onMouseDown: React.MouseEventHandler<Element>;
onMouseOut: () => void;
onMouseOver: () => void;
onTouchEnd: () => void;
onTouchMove: () => void;
onTouchStart: React.TouchEventHandler<Element>;
}) => Omit<React.HTMLAttributes<HTMLDivElement>, "onResize">) | undefined;
} & Omit<React.HTMLAttributes<HTMLDivElement>, "onResize"> & React.RefAttributes<any>>;

@@ -141,5 +153,16 @@ type ResizeHandleProps = React.ComponentPropsWithRef<typeof ResizeHandle>;

}, object, "resizable">;
declare const useResizableSet: <K extends "width">(key: K, options?: string | jotai_x.UseAtomOptions) => ({
width: jotai_x.SimpleWritableAtom<csstype.Property.Width<string | number> | undefined>;
} & object)[K] extends jotai.WritableAtom<infer _V, infer A extends unknown[], infer R> ? (...args: A) => R : never;
declare const useResizableStore: jotai_x.UseStoreApi<{
width: React.CSSProperties["width"];
}, object>;
declare const useResizableValue: <K extends "width", S = ({
width: jotai_x.SimpleWritableAtom<csstype.Property.Width<string | number> | undefined>;
} & object)[K] extends jotai.Atom<infer V> ? V : never>(key: K, options?: ({
selector?: ((v: ({
width: jotai_x.SimpleWritableAtom<csstype.Property.Width<string | number> | undefined>;
} & object)[K] extends jotai.Atom<infer V_1> ? V_1 : never, prevSelectorOutput?: S | undefined) => S) | undefined;
equalityFn?: ((prev: S, next: S) => boolean) | undefined;
} & jotai_x.UseAtomOptions) | undefined, deps?: unknown[]) => S;

@@ -159,2 +182,2 @@ declare const isTouchEvent: (event: MouseEvent | TouchEvent) => event is TouchEvent;

export { Resizable, type ResizableOptions, ResizableProvider, type ResizeDirection, type ResizeEvent, ResizeHandle, type ResizeHandleOptions, type ResizeHandleProps, ResizeHandleProvider, type ResizeHandleStoreState, type ResizeLength, type ResizeLengthClampOptions, type ResizeLengthRelative, type ResizeLengthStatic, type TResizableElement, isTouchEvent, resizableStore, resizeLengthClamp, resizeLengthClampStatic, resizeLengthToRelative, resizeLengthToStatic, useResizable, useResizableState, useResizableStore, useResizeHandle, useResizeHandleState, useResizeHandleStore };
export { Resizable, type ResizableOptions, ResizableProvider, type ResizeDirection, type ResizeEvent, ResizeHandle, type ResizeHandleOptions, type ResizeHandleProps, ResizeHandleProvider, type ResizeHandleStoreState, type ResizeLength, type ResizeLengthClampOptions, type ResizeLengthRelative, type ResizeLengthStatic, type TResizableElement, isTouchEvent, resizableStore, resizeLengthClamp, resizeLengthClampStatic, resizeLengthToRelative, resizeLengthToStatic, useResizable, useResizableSet, useResizableState, useResizableStore, useResizableValue, useResizeHandle, useResizeHandleSet, useResizeHandleState, useResizeHandleStore, useResizeHandleValue };

@@ -44,7 +44,11 @@ "use strict";

useResizable: () => useResizable,
useResizableSet: () => useResizableSet,
useResizableState: () => useResizableState,
useResizableStore: () => useResizableStore,
useResizableValue: () => useResizableValue,
useResizeHandle: () => useResizeHandle,
useResizeHandleSet: () => useResizeHandleSet,
useResizeHandleState: () => useResizeHandleState,
useResizeHandleStore: () => useResizeHandleStore
useResizeHandleStore: () => useResizeHandleStore,
useResizeHandleValue: () => useResizeHandleValue
});

@@ -111,6 +115,11 @@ module.exports = __toCommonJS(index_exports);

};
var { ResizeHandleProvider, useResizeHandleStore } = (0, import_react2.createAtomStore)(
initialState,
{ name: "resizeHandle" }
);
var {
ResizeHandleProvider,
useResizeHandleSet,
useResizeHandleStore,
useResizeHandleValue
} = (0, import_react2.createAtomStore)(initialState, {
name: "resizeHandle",
suppressWarnings: true
});
var useResizeHandleState = ({

@@ -126,3 +135,3 @@ direction = "left",

const readOnly = (0, import_react2.useReadOnly)();
const onResizeStore = useResizeHandleStore().get.onResize();
const onResizeStore = useResizeHandleValue("onResize");
const onResize = onResizeProp ?? onResizeStore;

@@ -246,3 +255,9 @@ const [isResizing, setIsResizing] = import_react.default.useState(false);

var import_react3 = require("@udecode/plate/react");
var { ResizableProvider, resizableStore, useResizableStore } = (0, import_react3.createAtomStore)(
var {
ResizableProvider,
resizableStore,
useResizableSet,
useResizableStore,
useResizableValue
} = (0, import_react3.createAtomStore)(
{

@@ -264,3 +279,4 @@ width: 0

const nodeWidth = element?.width ?? "100%";
const [width, setWidth] = useResizableStore().use.width();
const width = useResizableValue("width");
const setWidth = useResizableSet("width");
const setNodeWidth = import_react4.default.useCallback(

@@ -355,8 +371,12 @@ (w) => {

useResizable,
useResizableSet,
useResizableState,
useResizableStore,
useResizableValue,
useResizeHandle,
useResizeHandleSet,
useResizeHandleState,
useResizeHandleStore
useResizeHandleStore,
useResizeHandleValue
});
//# sourceMappingURL=index.js.map
{
"name": "@udecode/plate-resizable",
"version": "43.0.0",
"version": "44.0.0",
"description": "Plate React resize components",

@@ -49,3 +49,3 @@ "keywords": [

"peerDependencies": {
"@udecode/plate": ">=43.0.0",
"@udecode/plate": ">=44.0.0",
"react": ">=18.0.0",

@@ -52,0 +52,0 @@ "react-dom": ">=18.0.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

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