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

@udecode/plate-autoformat

Package Overview
Dependencies
Maintainers
2
Versions
155
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@udecode/plate-autoformat - npm Package Compare versions

Comparing version 36.5.6 to 37.0.0

dist/AutoformatPlugin-C3RmMfmF.d.mts

146

dist/index.d.ts

@@ -1,128 +0,6 @@

import * as _udecode_plate_common_server from '@udecode/plate-common/server';
import { Value, TEditor, PlateEditor, WithPlatePlugin, KeyboardHandlerReturnType } from '@udecode/plate-common/server';
import * as _udecode_slate from '@udecode/slate';
import * as slate from 'slate';
import { Point, Location } from 'slate';
import { A as AutoformatConfig, a as AutoformatRule, b as AutoformatBlockRule, c as AutoformatMarkRule, d as AutoformatTextRule, M as MatchRange } from './AutoformatPlugin-C3RmMfmF.js';
export { g as AutoformatCommonRule, e as AutoformatPlugin, h as AutoformatPluginOptions, f as AutoformatQueryOptions, G as GetMatchPointsReturnType, i as getMatchPoints } from './AutoformatPlugin-C3RmMfmF.js';
import { ExtendEditor, SlateEditor, TEditor } from '@udecode/plate-common';
import { Location } from 'slate';
type GetMatchPointsReturnType = {
afterStartMatchPoint: Point | undefined;
beforeEndMatchPoint: Point;
beforeStartMatchPoint: Point | undefined;
} | undefined;
declare const getMatchPoints: <V extends Value>(editor: TEditor<V>, { end, start }: MatchRange) => {
afterStartMatchPoint: slate.BasePoint | undefined;
beforeEndMatchPoint: slate.BasePoint;
beforeStartMatchPoint: slate.BasePoint | undefined;
} | undefined;
interface MatchRange {
end: string;
start: string;
}
interface AutoformatQueryOptions<V extends Value = Value, E extends PlateEditor<V> = PlateEditor<V>> extends Omit<AutoformatCommonRule<V, E>, 'query'> {
/** `insertText` text. */
text: string;
}
interface AutoformatCommonRule<V extends Value = Value, E extends PlateEditor<V> = PlateEditor<V>> {
/**
* The rule applies when the trigger and the text just before the cursor
* matches. For `mode: 'block'`: lookup for the end match(es) before the
* cursor. For `mode: 'text'`: lookup for the end match(es) before the cursor.
* If `format` is an array, also lookup for the start match(es). For `mode:
* 'mark'`: lookup for the start and end matches. Note: `'_*'`, `['_*']` and
* `{ start: '_*', end: '*_' }` are equivalent.
*/
match: MatchRange | MatchRange[] | string | string[];
/**
* If true, insert the triggering character after autoformatting.
*
* @default: false
*/
insertTrigger?: boolean;
/** Query to allow autoformat. */
query?: (editor: E, options: AutoformatQueryOptions<V, E>) => boolean;
/**
* Triggering character to autoformat.
*
* @default the last character of `match` or `match.end`
*/
trigger?: string | string[];
}
interface AutoformatBlockRule<V extends Value = Value, E extends PlateEditor<V> = PlateEditor<V>> extends AutoformatCommonRule<V, E> {
match: string | string[];
/**
* - Text: insert text.
* - Block: set block type or custom format.
* - Mark: insert mark(s) between matches.
*
* @default 'text'
*/
mode: 'block';
/**
* If true, allow to autoformat even if there is a block of the same type
* above the selected block.
*
* @default false
*/
allowSameTypeAbove?: boolean;
/**
* Custom formatting function.
*
* @default setNodes(editor, { type }, { match: (n) => isBlock(editor, n) })
*/
format?: (editor: E) => void;
/**
* If true, `match` will be interpreted as regex expression(s). Otherwise, it
* will be compared by string equality.
*
* @default false
*/
matchByRegex?: boolean;
/**
* Function called just before `format`. Generally used to reset the selected
* block.
*/
preFormat?: (editor: E) => void;
/**
* If true, the trigger should be at block start to allow autoformatting.
*
* @default true
*/
triggerAtBlockStart?: boolean;
/**
* For `mode: 'block'`: set block type. If `format` is defined, this field is
* ignored. For `mode: 'mark'`: Mark(s) to add.
*/
type?: string;
}
interface AutoformatMarkRule<V extends Value = Value, E extends PlateEditor<V> = PlateEditor<V>> extends AutoformatCommonRule<V, E> {
mode: 'mark';
/** Mark(s) to add. */
type: string | string[];
/** If false, do not format when the string can be trimmed. */
ignoreTrim?: boolean;
}
interface AutoformatTextRule<V extends Value = Value, E extends PlateEditor<V> = PlateEditor<V>> extends AutoformatCommonRule<V, E> {
/**
* String: the matched text is replaced by that string. string[]: the matched
* texts are replaced by these strings. function: called when there is a
* match.
*/
format: ((editor: E, options: GetMatchPointsReturnType) => void) | string | string[];
match: string | string[];
mode: 'text';
}
type AutoformatRule<V extends Value = Value, E extends PlateEditor<V> = PlateEditor<V>> = AutoformatBlockRule<V, E> | AutoformatMarkRule<V, E> | AutoformatTextRule<V, E>;
interface AutoformatPlugin<V extends Value = Value, E extends PlateEditor<V> = PlateEditor<V>> {
enableUndoOnDelete?: boolean;
/** A list of triggering rules. */
rules?: AutoformatRule<V, E>[];
}
declare const KEY_AUTOFORMAT = "autoformat";
/** @see {@link withAutoformat} */
declare const createAutoformatPlugin: <OP = AutoformatPlugin<_udecode_slate.Value, _udecode_plate_common_server.PlateEditor<_udecode_slate.Value>>, OV extends _udecode_slate.Value = _udecode_slate.Value, OE extends _udecode_plate_common_server.PlateEditor<OV> = _udecode_plate_common_server.PlateEditor<OV>>(override?: Partial<_udecode_plate_common_server.PlatePlugin<_udecode_plate_common_server.NoInfer<OP>, OV, OE>> | undefined, overrideByKey?: _udecode_plate_common_server.OverrideByKey<OV, OE> | undefined) => _udecode_plate_common_server.PlatePlugin<_udecode_plate_common_server.NoInfer<OP>, OV, OE>;
declare const onKeyDownAutoformat: <V extends Value = Value, E extends PlateEditor<V> = PlateEditor<V>>(editor: PlateEditor<V>, { options: { enableUndoOnDelete, rules }, }: WithPlatePlugin<AutoformatPlugin, V, E>) => KeyboardHandlerReturnType;
/**

@@ -132,3 +10,3 @@ * Enables support for autoformatting actions. Once a match rule is validated,

*/
declare const withAutoformat: <V extends Value = Value, E extends PlateEditor<V> = PlateEditor<V>>(editor: E, { options: { rules } }: WithPlatePlugin<AutoformatPlugin, V, E>) => E;
declare const withAutoformat: ExtendEditor<AutoformatConfig>;

@@ -161,6 +39,6 @@ declare const autoformatArrow: AutoformatRule[];

interface AutoformatBlockOptions<V extends Value = Value> extends AutoformatBlockRule<V> {
interface AutoformatBlockOptions extends AutoformatBlockRule {
text: string;
}
declare const autoformatBlock: <V extends Value>(editor: PlateEditor<V>, { allowSameTypeAbove, format, match: _match, matchByRegex, preFormat, text, trigger, triggerAtBlockStart, type, }: AutoformatBlockOptions<V>) => boolean;
declare const autoformatBlock: (editor: SlateEditor, { allowSameTypeAbove, format, match: _match, matchByRegex, preFormat, text, trigger, triggerAtBlockStart, type, }: AutoformatBlockOptions) => boolean;

@@ -170,8 +48,8 @@ interface AutoformatMarkOptions extends AutoformatMarkRule {

}
declare const autoformatMark: <V extends Value>(editor: TEditor<V>, { ignoreTrim, match: _match, text, trigger, type }: AutoformatMarkOptions) => boolean;
declare const autoformatMark: (editor: TEditor, { ignoreTrim, match: _match, text, trigger, type }: AutoformatMarkOptions) => boolean;
interface AutoformatTextOptions<V extends Value = Value> extends AutoformatTextRule<V> {
interface AutoformatTextOptions extends AutoformatTextRule {
text: string;
}
declare const autoformatText: <V extends Value>(editor: PlateEditor<V>, { format, match: _match, text, trigger }: AutoformatTextOptions<V>) => boolean;
declare const autoformatText: (editor: SlateEditor, { format, match: _match, text, trigger }: AutoformatTextOptions) => boolean;

@@ -187,4 +65,4 @@ declare const getMatchRange: ({ match, trigger, }: {

declare const isPreviousCharacterEmpty: <V extends Value>(editor: TEditor<V>, at: Location) => boolean;
declare const isPreviousCharacterEmpty: (editor: TEditor, at: Location) => boolean;
export { type AutoformatBlockOptions, type AutoformatBlockRule, type AutoformatCommonRule, type AutoformatMarkOptions, type AutoformatMarkRule, type AutoformatPlugin, type AutoformatQueryOptions, type AutoformatRule, type AutoformatTextOptions, type AutoformatTextRule, type GetMatchPointsReturnType, KEY_AUTOFORMAT, type MatchRange, autoformatArrow, autoformatBlock, autoformatComparison, autoformatDivision, autoformatEquality, autoformatFraction, autoformatLegal, autoformatLegalHtml, autoformatMark, autoformatMath, autoformatOperation, autoformatPunctuation, autoformatSmartQuotes, autoformatSubscriptNumbers, autoformatSubscriptSymbols, autoformatSuperscriptNumbers, autoformatSuperscriptSymbols, autoformatText, createAutoformatPlugin, getMatchPoints, getMatchRange, isPreviousCharacterEmpty, onKeyDownAutoformat, withAutoformat };
export { type AutoformatBlockOptions, AutoformatBlockRule, AutoformatConfig, type AutoformatMarkOptions, AutoformatMarkRule, AutoformatRule, type AutoformatTextOptions, AutoformatTextRule, MatchRange, autoformatArrow, autoformatBlock, autoformatComparison, autoformatDivision, autoformatEquality, autoformatFraction, autoformatLegal, autoformatLegalHtml, autoformatMark, autoformatMath, autoformatOperation, autoformatPunctuation, autoformatSmartQuotes, autoformatSubscriptNumbers, autoformatSubscriptSymbols, autoformatSuperscriptNumbers, autoformatSuperscriptSymbols, autoformatText, getMatchRange, isPreviousCharacterEmpty, withAutoformat };

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

__export(src_exports, {
KEY_AUTOFORMAT: () => KEY_AUTOFORMAT,
AutoformatPlugin: () => AutoformatPlugin,
autoformatArrow: () => autoformatArrow,

@@ -70,7 +70,5 @@ autoformatBlock: () => autoformatBlock,

autoformatText: () => autoformatText,
createAutoformatPlugin: () => createAutoformatPlugin,
getMatchPoints: () => getMatchPoints,
getMatchRange: () => getMatchRange,
isPreviousCharacterEmpty: () => isPreviousCharacterEmpty,
onKeyDownAutoformat: () => onKeyDownAutoformat,
withAutoformat: () => withAutoformat

@@ -80,68 +78,13 @@ });

// src/createAutoformatPlugin.ts
var import_server8 = require("@udecode/plate-common/server");
// src/lib/AutoformatPlugin.ts
var import_plate_common7 = require("@udecode/plate-common");
// src/onKeyDownAutoformat.ts
var import_server = require("@udecode/plate-common/server");
var import_slate = require("slate");
var onKeyDownAutoformat = (editor, {
options: { enableUndoOnDelete, rules }
}) => (e) => {
if (e.defaultPrevented)
return false;
if (!(0, import_server.isHotkey)("backspace", { byKey: true }, e))
return false;
if (!rules)
return false;
if (!enableUndoOnDelete)
return false;
const { selection } = editor;
if (!selection || !import_slate.Range.isCollapsed(selection))
return;
const [start, end] = import_slate.Range.edges(selection);
const before = (0, import_server.getPointBefore)(editor, end, {
distance: 1,
unit: "character"
});
if (!start)
return false;
if (!before)
return false;
const charRange = { anchor: before, focus: start };
if (!charRange)
return false;
const char = (0, import_server.getEditorString)(editor, charRange);
if (!char)
return false;
const matchers = [...rules].filter((rule2) => {
const textRule = rule2;
if (textRule) {
return textRule.mode === "text" && textRule.format === char;
}
return false;
});
if (!matchers || matchers.length === 0)
return false;
e.preventDefault();
(0, import_server.deleteBackward)(editor, { unit: "character" });
const rule = matchers[0];
if (rule && typeof rule.match === "string") {
(0, import_server.insertText)(editor, rule.match);
} else {
const matchArray = rule.match;
if (matchArray && matchArray.length > 0) {
(0, import_server.insertText)(editor, matchArray[0]);
}
}
return true;
};
// src/lib/withAutoformat.ts
var import_plate_common6 = require("@udecode/plate-common");
// src/withAutoformat.ts
var import_server7 = require("@udecode/plate-common/server");
// src/transforms/autoformatBlock.ts
var import_server2 = require("@udecode/plate-common/server");
// src/lib/transforms/autoformatBlock.ts
var import_plate_common = require("@udecode/plate-common");
var import_castArray2 = __toESM(require("lodash/castArray.js"));
// src/utils/getMatchRange.ts
// src/lib/utils/getMatchRange.ts
var import_castArray = __toESM(require("lodash/castArray.js"));

@@ -170,3 +113,3 @@ var getMatchRange = ({

// src/transforms/autoformatBlock.ts
// src/lib/transforms/autoformatBlock.ts
var autoformatBlock = (editor, {

@@ -181,3 +124,3 @@ allowSameTypeAbove = false,

triggerAtBlockStart = true,
type = import_server2.ELEMENT_DEFAULT
type = import_plate_common.ParagraphPlugin.key
}) => {

@@ -194,10 +137,10 @@ const matches = (0, import_castArray2.default)(_match);

if (triggerAtBlockStart) {
matchRange = (0, import_server2.getRangeFromBlockStart)(editor);
const hasVoidNode = (0, import_server2.someNode)(editor, {
matchRange = (0, import_plate_common.getRangeFromBlockStart)(editor);
const hasVoidNode = (0, import_plate_common.someNode)(editor, {
at: matchRange,
match: (n) => (0, import_server2.isVoid)(editor, n)
match: (n) => (0, import_plate_common.isVoid)(editor, n)
});
if (hasVoidNode)
continue;
const textFromBlockStart = (0, import_server2.getEditorString)(editor, matchRange);
const textFromBlockStart = (0, import_plate_common.getEditorString)(editor, matchRange);
const isMatched = matchByRegex ? !!textFromBlockStart.match(end) : end === textFromBlockStart;

@@ -207,3 +150,3 @@ if (!isMatched)

} else {
matchRange = (0, import_server2.getRangeBefore)(editor, editor.selection, {
matchRange = (0, import_plate_common.getRangeBefore)(editor, editor.selection, {
matchByRegex,

@@ -216,3 +159,3 @@ matchString: end

if (!allowSameTypeAbove) {
const isBelowSameBlockType = (0, import_server2.someNode)(editor, { match: { type } });
const isBelowSameBlockType = (0, import_plate_common.someNode)(editor, { match: { type } });
if (isBelowSameBlockType)

@@ -222,3 +165,3 @@ continue;

if (match.length > 1) {
(0, import_server2.deleteText)(editor, {
(0, import_plate_common.deleteText)(editor, {
at: matchRange

@@ -233,7 +176,7 @@ });

} else {
(0, import_server2.setElements)(
(0, import_plate_common.setElements)(
editor,
{ type },
{
match: (n) => (0, import_server2.isBlock)(editor, n)
match: (n) => (0, import_plate_common.isBlock)(editor, n)
}

@@ -247,15 +190,15 @@ );

// src/transforms/autoformatMark.ts
var import_server5 = require("@udecode/plate-common/server");
// src/lib/transforms/autoformatMark.ts
var import_plate_common4 = require("@udecode/plate-common");
var import_castArray3 = __toESM(require("lodash/castArray.js"));
// src/utils/getMatchPoints.ts
var import_server4 = require("@udecode/plate-common/server");
// src/lib/utils/getMatchPoints.ts
var import_plate_common3 = require("@udecode/plate-common");
// src/utils/isPreviousCharacterEmpty.ts
var import_server3 = require("@udecode/plate-common/server");
// src/lib/utils/isPreviousCharacterEmpty.ts
var import_plate_common2 = require("@udecode/plate-common");
var isPreviousCharacterEmpty = (editor, at) => {
const range = (0, import_server3.getRangeBefore)(editor, at);
const range = (0, import_plate_common2.getRangeBefore)(editor, at);
if (range) {
const text = (0, import_server3.getEditorString)(editor, range);
const text = (0, import_plate_common2.getEditorString)(editor, range);
if (text) {

@@ -269,3 +212,3 @@ const noWhiteSpaceRegex = new RegExp(`\\S+`);

// src/utils/getMatchPoints.ts
// src/lib/utils/getMatchPoints.ts
var getMatchPoints = (editor, { end, start }) => {

@@ -275,3 +218,3 @@ const selection = editor.selection;

if (end) {
beforeEndMatchPoint = (0, import_server4.getPointBeforeLocation)(editor, selection, {
beforeEndMatchPoint = (0, import_plate_common3.getPointBeforeLocation)(editor, selection, {
matchString: end

@@ -285,3 +228,3 @@ });

if (start) {
afterStartMatchPoint = (0, import_server4.getPointBeforeLocation)(editor, beforeEndMatchPoint, {
afterStartMatchPoint = (0, import_plate_common3.getPointBeforeLocation)(editor, beforeEndMatchPoint, {
afterMatch: true,

@@ -293,3 +236,3 @@ matchString: start,

return;
beforeStartMatchPoint = (0, import_server4.getPointBeforeLocation)(
beforeStartMatchPoint = (0, import_plate_common3.getPointBeforeLocation)(
editor,

@@ -312,3 +255,3 @@ beforeEndMatchPoint,

// src/transforms/autoformatMark.ts
// src/lib/transforms/autoformatMark.ts
var autoformatMark = (editor, { ignoreTrim, match: _match, text, trigger, type }) => {

@@ -335,3 +278,3 @@ if (!type)

if (!ignoreTrim) {
const matchText = (0, import_server5.getEditorString)(editor, matchRange);
const matchText = (0, import_plate_common4.getEditorString)(editor, matchRange);
if (matchText.trim() !== matchText)

@@ -341,3 +284,3 @@ continue;

if (end) {
(0, import_server5.deleteText)(editor, {
(0, import_plate_common4.deleteText)(editor, {
at: {

@@ -350,9 +293,9 @@ anchor: beforeEndMatchPoint,

const marks = (0, import_castArray3.default)(type);
(0, import_server5.select)(editor, matchRange);
(0, import_plate_common4.select)(editor, matchRange);
marks.forEach((mark) => {
editor.addMark(mark, true);
});
(0, import_server5.collapseSelection)(editor, { edge: "end" });
(0, import_server5.removeMark)(editor, { key: marks, shouldChange: false });
(0, import_server5.deleteText)(editor, {
(0, import_plate_common4.collapseSelection)(editor, { edge: "end" });
(0, import_plate_common4.removeMark)(editor, { key: marks, shouldChange: false });
(0, import_plate_common4.deleteText)(editor, {
at: {

@@ -368,4 +311,4 @@ anchor: beforeStartMatchPoint,

// src/transforms/autoformatText.ts
var import_server6 = require("@udecode/plate-common/server");
// src/lib/transforms/autoformatText.ts
var import_plate_common5 = require("@udecode/plate-common");
var import_castArray4 = __toESM(require("lodash/castArray.js"));

@@ -390,3 +333,3 @@ var autoformatText = (editor, { format, match: _match, text, trigger }) => {

if (end) {
(0, import_server6.deleteText)(editor, {
(0, import_plate_common5.deleteText)(editor, {
at: {

@@ -405,3 +348,3 @@ anchor: beforeEndMatchPoint,

const formatStart = Array.isArray(format) ? format[0] : format;
(0, import_server6.deleteText)(editor, {
(0, import_plate_common5.deleteText)(editor, {
at: {

@@ -412,3 +355,3 @@ anchor: beforeStartMatchPoint,

});
(0, import_server6.insertText)(editor, formatStart, {
(0, import_plate_common5.insertText)(editor, formatStart, {
at: beforeStartMatchPoint

@@ -423,10 +366,13 @@ });

// src/withAutoformat.ts
var withAutoformat = (editor, { options: { rules } }) => {
const { insertText: insertText3 } = editor;
// src/lib/withAutoformat.ts
var withAutoformat = ({
editor,
getOptions
}) => {
const { insertText: insertText2 } = editor;
editor.insertText = (text) => {
var _a;
if (!(0, import_server7.isCollapsed)(editor.selection))
return insertText3(text);
for (const rule of rules) {
if (!(0, import_plate_common6.isCollapsed)(editor.selection))
return insertText2(text);
for (const rule of getOptions().rules) {
const { insertTrigger, mode = "text", query } = rule;

@@ -443,6 +389,6 @@ if (query && !query(editor, __spreadProps(__spreadValues({}, rule), { text })))

}))) {
return insertTrigger && insertText3(text);
return insertTrigger && insertText2(text);
}
}
insertText3(text);
insertText2(text);
};

@@ -452,16 +398,12 @@ return editor;

// src/createAutoformatPlugin.ts
var KEY_AUTOFORMAT = "autoformat";
var createAutoformatPlugin = (0, import_server8.createPluginFactory)({
handlers: {
onKeyDown: onKeyDownAutoformat
},
key: KEY_AUTOFORMAT,
// src/lib/AutoformatPlugin.ts
var AutoformatPlugin = (0, import_plate_common7.createTSlatePlugin)({
extendEditor: withAutoformat,
key: "autoformat",
options: {
rules: []
},
withOverrides: withAutoformat
}
});
// src/rules/autoformatArrow.ts
// src/lib/rules/autoformatArrow.ts
var autoformatArrow = [

@@ -490,3 +432,3 @@ {

// src/rules/autoformatLegal.ts
// src/lib/rules/autoformatLegal.ts
var autoformatLegal = [

@@ -532,3 +474,3 @@ {

// src/rules/autoformatPunctuation.ts
// src/lib/rules/autoformatPunctuation.ts
var autoformatPunctuation = [

@@ -557,3 +499,3 @@ {

// src/rules/autoformatSmartQuotes.ts
// src/lib/rules/autoformatSmartQuotes.ts
var autoformatSmartQuotes = [

@@ -572,3 +514,3 @@ {

// src/rules/math/autoformatComparison.ts
// src/lib/rules/math/autoformatComparison.ts
var autoformatComparison = [

@@ -607,3 +549,3 @@ {

// src/rules/math/autoformatEquality.ts
// src/lib/rules/math/autoformatEquality.ts
var autoformatEquality = [

@@ -637,3 +579,3 @@ {

// src/rules/math/autoformatFraction.ts
// src/lib/rules/math/autoformatFraction.ts
var autoformatFraction = [

@@ -732,3 +674,3 @@ {

// src/rules/math/autoformatOperation.ts
// src/lib/rules/math/autoformatOperation.ts
var autoformatDivision = [

@@ -760,3 +702,3 @@ {

// src/rules/math/autoformatSubscript.ts
// src/lib/rules/math/autoformatSubscript.ts
var autoformatSubscriptNumbers = [

@@ -827,3 +769,3 @@ {

// src/rules/math/autoformatSuperscript.ts
// src/lib/rules/math/autoformatSuperscript.ts
var autoformatSuperscriptNumbers = [

@@ -899,3 +841,3 @@ {

// src/rules/math/autoformatMath.ts
// src/lib/rules/math/autoformatMath.ts
var autoformatMath = [

@@ -913,3 +855,3 @@ ...autoformatComparison,

0 && (module.exports = {
KEY_AUTOFORMAT,
AutoformatPlugin,
autoformatArrow,

@@ -933,9 +875,7 @@ autoformatBlock,

autoformatText,
createAutoformatPlugin,
getMatchPoints,
getMatchRange,
isPreviousCharacterEmpty,
onKeyDownAutoformat,
withAutoformat
});
//# sourceMappingURL=index.js.map
{
"name": "@udecode/plate-autoformat",
"version": "36.5.6",
"version": "37.0.0",
"description": "Autoformatting plugin for Plate",
"license": "MIT",
"keywords": [
"plate",
"plugin",
"slate"
],
"homepage": "https://platejs.org",
"bugs": {
"url": "https://github.com/udecode/plate/issues"
},
"repository": {

@@ -12,12 +19,4 @@ "type": "git",

},
"bugs": {
"url": "https://github.com/udecode/plate/issues"
},
"license": "MIT",
"sideEffects": false,
"main": "dist/index.js",
"module": "dist/index.mjs",
"types": "dist/index.d.ts",
"files": [
"dist/**/*"
],
"exports": {

@@ -29,8 +28,20 @@ ".": {

"require": "./dist/index.js"
},
"./react": {
"types": "./dist/react/index.d.ts",
"import": "./dist/react/index.mjs",
"module": "./dist/react/index.mjs",
"require": "./dist/react/index.js"
}
},
"main": "dist/index.js",
"module": "dist/index.mjs",
"types": "dist/index.d.ts",
"files": [
"dist/**/*"
],
"scripts": {
"brl": "yarn p:brl",
"build": "yarn p:build",
"build:watch": "yarn p:build:watch",
"brl": "yarn p:brl",
"clean": "yarn p:clean",

@@ -50,15 +61,10 @@ "lint": "yarn p:lint",

"peerDependencies": {
"@udecode/plate-common": ">=36.3.9",
"@udecode/plate-common": ">=37.0.0",
"react": ">=16.8.0",
"react-dom": ">=16.8.0",
"slate": ">=0.94.0",
"slate": ">=0.103.0",
"slate-history": ">=0.93.0",
"slate-hyperscript": ">=0.66.0",
"slate-react": ">=0.99.0"
"slate-react": ">=0.108.0"
},
"keywords": [
"plate",
"plugin",
"slate"
],
"publishConfig": {

@@ -65,0 +71,0 @@ "access": "public"

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