@udecode/plate-common
Advanced tools
Comparing version 6.4.1 to 7.0.0
# @udecode/plate-common | ||
## 7.0.0 | ||
### Minor Changes | ||
- [#1190](https://github.com/udecode/plate/pull/1190) by [@zbeyens](https://github.com/zbeyens) – | ||
- new utils: | ||
- `getOverrideProps` | ||
- new types: | ||
- `TransformOptions` | ||
- `OverridePropsOptions` | ||
- `GetOverridePropsOptions` | ||
- moved `RenderFunction` to `core` | ||
## 6.4.1 | ||
@@ -4,0 +17,0 @@ |
import React, { FunctionComponent } from 'react'; | ||
import { SPRenderElementProps } from '@udecode/plate-core'; | ||
export declare const createNodeHOC: <T>(HOC: React.FunctionComponent<T>) => (Component: any, props: T) => (childrenProps: SPRenderElementProps) => JSX.Element; | ||
import { PlateRenderElementProps } from '@udecode/plate-core'; | ||
export declare const createNodeHOC: <T>(HOC: React.FunctionComponent<T>) => (Component: any, props: T) => (childrenProps: PlateRenderElementProps) => JSX.Element; | ||
//# sourceMappingURL=createNodeHOC.d.ts.map |
@@ -1,6 +0,6 @@ | ||
import { SPEditor } from '@udecode/plate-core'; | ||
import { PlateEditor } from '@udecode/plate-core'; | ||
/** | ||
* Does the node match the type provided. | ||
*/ | ||
export declare const isType: (editor: SPEditor, node: any, pluginKey?: string | string[] | undefined) => boolean; | ||
export declare const isType: (editor: PlateEditor, node: any, pluginKey?: string | string[] | undefined) => boolean; | ||
//# sourceMappingURL=isType.d.ts.map |
@@ -6,8 +6,7 @@ /** | ||
export * from './ErrorHandler'; | ||
export * from './OverridePropsParams'; | ||
export * from './OverridePropsOptions'; | ||
export * from './QueryEditorOptions'; | ||
export * from './QueryNodeOptions'; | ||
export * from './Transforms.types'; | ||
export * from './RenderFunction'; | ||
export * from './node.types'; | ||
//# sourceMappingURL=index.d.ts.map |
import { CSSProperties } from 'react'; | ||
import { SPEditor } from '@udecode/plate-core'; | ||
import { GetOverridePropsParams } from '../types'; | ||
export declare function getOverrideProps(editor: SPEditor, { defaultOption, options, classNames, value, className, style, type, }: GetOverridePropsParams): { | ||
import { OverrideProps, TElement, TText } from '@udecode/plate-core'; | ||
export interface GetOverridePropsOptions { | ||
pluginKey?: string; | ||
/** | ||
* Existing className. | ||
*/ | ||
className?: string; | ||
styles?: CSSProperties; | ||
}; | ||
/** | ||
* Style value or className key. | ||
*/ | ||
element?: TElement; | ||
/** | ||
* Style value or className key. | ||
*/ | ||
text?: TText; | ||
/** | ||
* Existing style. | ||
*/ | ||
style?: CSSProperties; | ||
} | ||
export interface OverridePropsReturnType { | ||
className?: string; | ||
style?: CSSProperties; | ||
} | ||
/** | ||
* Util for `overrideProps`. | ||
* Return if `element`, `text`, `nodeKey` is defined. | ||
* Return if `node.type` is not in `validTypes` (if defined). | ||
* Return if `value = node[nodeKey]` is not in `validNodeValues` (if defined). | ||
* If `classNames[value]` is defined, override `className` with it. | ||
* If `styleKey` is defined, override `style` with `[styleKey]: value`. | ||
*/ | ||
export declare const getOverrideProps: (pluginKey: string) => OverrideProps; | ||
//# sourceMappingURL=getOverrideProps.d.ts.map |
/// <reference types="react" /> | ||
import { KeyboardHandler, SPEditor } from '@udecode/plate-core'; | ||
export declare const getToggleElementOnKeyDown: <T extends SPEditor = SPEditor>(pluginKeys: string | string[]) => (editor: T) => (event: import("react").KeyboardEvent<Element>) => import("@udecode/plate-core").HandlerReturnType; | ||
import { KeyboardHandler } from '@udecode/plate-core'; | ||
export declare const getToggleElementOnKeyDown: <T = {}>(pluginKeys: string | string[]) => (editor: import("@udecode/plate-core").PlateEditor<T>) => (event: import("react").KeyboardEvent<Element>) => import("@udecode/plate-core").HandlerReturnType; | ||
//# sourceMappingURL=getToggleElementOnKeyDown.d.ts.map |
/// <reference types="react" /> | ||
import { KeyboardHandler, SPEditor } from '@udecode/plate-core'; | ||
export declare const getToggleMarkOnKeyDown: <T extends SPEditor = SPEditor>(pluginKey: string) => (editor: T) => (event: import("react").KeyboardEvent<Element>) => import("@udecode/plate-core").HandlerReturnType; | ||
import { KeyboardHandler } from '@udecode/plate-core'; | ||
export declare const getToggleMarkOnKeyDown: <T = {}>(pluginKey: string) => (editor: import("@udecode/plate-core").PlateEditor<T>) => (event: import("react").KeyboardEvent<Element>) => import("@udecode/plate-core").HandlerReturnType; | ||
//# sourceMappingURL=getToggleMarkOnKeyDown.d.ts.map |
@@ -9,6 +9,4 @@ /** | ||
export * from './getElementDeserializer'; | ||
export * from './getElementOverrideProps'; | ||
export * from './getHandler'; | ||
export * from './getLeafDeserializer'; | ||
export * from './getLeafOverrideProps'; | ||
export * from './getNodeDeserializer'; | ||
@@ -15,0 +13,0 @@ export * from './getOverrideProps'; |
@@ -1,2 +0,2 @@ | ||
import { SPEditor } from '@udecode/plate-core'; | ||
import { PlateEditor } from '@udecode/plate-core'; | ||
import { Descendant } from 'slate'; | ||
@@ -6,5 +6,5 @@ /** | ||
*/ | ||
export declare const normalizeDescendantsToDocumentFragment: <T extends SPEditor = SPEditor>(editor: T, { descendants }: { | ||
export declare const normalizeDescendantsToDocumentFragment: <T = {}>(editor: PlateEditor<T>, { descendants }: { | ||
descendants: Descendant[]; | ||
}) => Descendant[]; | ||
//# sourceMappingURL=normalizeDescendantsToDocumentFragment.d.ts.map |
{ | ||
"name": "@udecode/plate-common", | ||
"version": "6.4.1", | ||
"version": "7.0.0", | ||
"description": "Common utilities used by Plate", | ||
@@ -35,3 +35,3 @@ "keywords": [ | ||
"dependencies": { | ||
"@udecode/plate-core": "6.4.1", | ||
"@udecode/plate-core": "7.0.0", | ||
"is-hotkey": "^0.1.6" | ||
@@ -38,0 +38,0 @@ }, |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
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
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
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1069597
201
11447
+ Added@udecode/plate-core@7.0.0(transitive)
- Removed@udecode/plate-core@6.4.1(transitive)
Updated@udecode/plate-core@7.0.0