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

@editorjs/editorjs

Package Overview
Dependencies
Maintainers
1
Versions
118
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@editorjs/editorjs - npm Package Compare versions

Comparing version 2.17.0 to 2.18.0

.eslintignore

55

package.json
{
"name": "@editorjs/editorjs",
"version": "2.17.0",
"version": "2.18.0",
"description": "Editor.js — Native JS, based on API and Open Source",

@@ -19,2 +19,5 @@ "main": "dist/editor.js",

"build:prod": "webpack --mode production",
"lint": "eslint src/ --ext .ts",
"lint:errors": "eslint src/ --ext .ts --quiet",
"lint:fix": "eslint src/ --ext .ts --fix",
"svg:win": "if not exist dist md dist && yarn svg",

@@ -32,22 +35,23 @@ "svg": "svg-sprite-generate -d src/assets/ -o dist/sprite.svg",

"devDependencies": {
"@babel/core": "^7.7.5",
"@babel/plugin-transform-runtime": "^7.7.5",
"@babel/polyfill": "^7.2.5",
"@babel/preset-env": "^7.7.5",
"@babel/register": "^7.0.0",
"@babel/runtime": "^7.7.5",
"@babel/core": "^7.9.0",
"@babel/plugin-transform-runtime": "^7.9.0",
"@babel/polyfill": "^7.8.7",
"@babel/preset-env": "^7.9.5",
"@babel/register": "^7.9.0",
"@babel/runtime": "^7.9.2",
"@codexteam/shortcuts": "^1.1.1",
"@types/webpack": "^4.4.25",
"@types/webpack-env": "^1.13.9",
"babel-loader": "^8.0.5",
"@types/webpack": "^4.41.12",
"@types/webpack-env": "^1.15.2",
"babel-loader": "^8.1.0",
"babel-plugin-add-module-exports": "^1.0.0",
"babel-plugin-class-display-name": "^2.1.0",
"core-js": "3",
"css-loader": "^3.2.1",
"core-js": "3.6.5",
"css-loader": "^3.5.3",
"cssnano": "^4.1.10",
"eslint": "^6.7.2",
"eslint-loader": "^3.0.3",
"eslint": "^6.8.0",
"eslint-config-codex": "^1.3.3",
"eslint-loader": "^4.0.2",
"extract-text-webpack-plugin": "^3.0.2",
"html-janitor": "^2.0.4",
"license-webpack-plugin": "^2.1.1",
"license-webpack-plugin": "^2.1.4",
"postcss-apply": "^0.12.0",

@@ -59,13 +63,12 @@ "postcss-import": "^12.0.1",

"postcss-preset-env": "^6.6.0",
"raw-loader": "^4.0.0",
"rimraf": "^3.0.0",
"stylelint": "^12.0.0",
"raw-loader": "^4.0.1",
"rimraf": "^3.0.2",
"stylelint": "^13.3.3",
"svg-sprite-generator": "^0.0.7",
"terser-webpack-plugin": "^2.2.2",
"ts-loader": "^6.2.1",
"tslint": "^5.14.0",
"tslint-loader": "^3.5.4",
"typescript": "^3.7.3",
"webpack": "^4.29.6",
"webpack-cli": "^3.2.3"
"terser-webpack-plugin": "^2.3.6",
"ts-loader": "^7.0.1",
"tslint": "^6.1.1",
"typescript": "3.8.3",
"webpack": "^4.43.0",
"webpack-cli": "^3.3.11"
},

@@ -78,4 +81,4 @@ "collective": {

"codex-notifier": "^1.1.2",
"codex-tooltip": "^1.0.0"
"codex-tooltip": "^1.0.1"
}
}
import {OutputData} from '../data-formats/output-data';
import {BlockToolData, ToolConfig} from "../tools";
import {BlockToolData, ToolConfig} from '../tools';
import {BlockAPI} from './block';

@@ -29,4 +30,5 @@ /**

* Removes current Block
* @param {number} index - index of a block to delete
*/
delete(): void;
delete(index?: number): void;

@@ -53,3 +55,3 @@ /**

*/
getBlockByIndex(index: number): HTMLElement;
getBlockByIndex(index: number): BlockAPI;

@@ -66,2 +68,4 @@ /**

* @param {boolean} status - stretch status
*
* @deprecated Use BlockAPI interface to stretch Blocks
*/

@@ -68,0 +72,0 @@ stretchBlock(index: number, status?: boolean): void;

@@ -13,1 +13,3 @@ export * from './blocks';

export * from './inline-toolbar';
export * from './block';
export * from './i18n';
import {ToolConstructable, ToolSettings} from '../tools';
import {LogLevels, OutputData, API} from '../index';
import {API, LogLevels, OutputData} from '../index';
import {SanitizerConfig} from './sanitizer-config';
import {I18nConfig} from './i18n-config';

@@ -8,3 +9,3 @@ export interface EditorConfig {

* Element where Editor will be append
* @deprecated property will be removed in next major release, use holder instead
* @deprecated property will be removed in the next major release, use holder instead
*/

@@ -67,2 +68,7 @@ holderId?: string | HTMLElement;

/**
* Internalization config
*/
i18n?: I18nConfig;
/**
* Fires when Editor is ready to work

@@ -69,0 +75,0 @@ */

@@ -6,1 +6,3 @@ export * from './editor-config';

export * from './log-levels';
export * from './i18n-config';
export * from './i18n-dictionary';

@@ -1,3 +0,1 @@

import {BlockToolData} from '../index';
/**

@@ -4,0 +2,0 @@ * Tool onPaste configuration object

import {BlockToolData} from '../tools';
/**
* Output of one Tool
*/
export interface OutputBlockData {
/**
* Too type
*/
type: string;
/**
* Saved Block data
*/
data: BlockToolData;
}
export interface OutputData {

@@ -17,6 +31,3 @@ /**

*/
blocks: Array<{
type: string;
data: BlockToolData
}>;
blocks: OutputBlockData[];
}

@@ -7,4 +7,10 @@ /**

import {EditorConfig} from './configs';
import {
EditorConfig,
I18nDictionary,
Dictionary,
DictValue,
I18nConfig,
} from './configs';
import {
Blocks,

@@ -22,2 +28,3 @@ Caret,

Tooltip,
I18n,
} from './api';

@@ -34,3 +41,5 @@ import {OutputData} from './data-formats/output-data';

InlineToolConstructable,
InlineToolConstructorOptions,
BlockToolConstructable,
BlockToolConstructorOptions,
BlockTool,

@@ -53,4 +62,15 @@ BlockToolData,

export {BlockTune, BlockTuneConstructable} from './block-tunes';
export {EditorConfig, SanitizerConfig, PasteConfig, LogLevels, ConversionConfig} from './configs';
export {OutputData} from './data-formats/output-data';
export {
EditorConfig,
SanitizerConfig,
PasteConfig,
LogLevels,
ConversionConfig,
I18nDictionary,
Dictionary,
DictValue,
I18nConfig,
} from './configs';
export {OutputData, OutputBlockData} from './data-formats/output-data';
export { BlockAPI } from './api'

@@ -74,2 +94,3 @@ /**

tooltip: Tooltip;
i18n: I18n;
}

@@ -76,0 +97,0 @@

@@ -5,2 +5,2 @@ /**

*/
export type BlockToolData = object;
export type BlockToolData<T extends object = any> = T;
import { ConversionConfig, PasteConfig, SanitizerConfig } from '../configs';
import { BlockToolData } from './block-tool-data';
import { BaseTool, BaseToolConstructable } from './tool';
import {BaseTool, BaseToolConstructable} from './tool';
import { ToolConfig } from './tool-config';
import { API } from '../index';
import {API, BlockAPI} from '../index';
import { PasteEvent } from './paste-events';
import { MoveEvent } from './hook-events';
/**

@@ -76,2 +77,12 @@ * Describe Block Tool object

/**
* Describe constructor parameters
*/
export interface BlockToolConstructorOptions<D extends object = any, C extends object = any> {
api: API;
data: BlockToolData<D>;
config?: ToolConfig<C>;
block?: BlockAPI;
}
export interface BlockToolConstructable extends BaseToolConstructable {

@@ -105,5 +116,8 @@ /**

* @constructor
*
* @param {BlockToolConstructorOptions} config - constructor parameters
*
* @return {BlockTool}
*/
new(config: { api: API, config: ToolConfig, data: BlockToolData }): BlockTool;
new(config: BlockToolConstructorOptions): BlockTool;
}

@@ -14,3 +14,3 @@ import {BlockTool, BlockToolConstructable} from './block-tool';

export type Tool = BaseTool | BlockTool | InlineTool;
export type ToolConstructable = BaseToolConstructable | BlockToolConstructable | InlineToolConstructable;
export type Tool = BlockTool | InlineTool;
export type ToolConstructable = BlockToolConstructable | InlineToolConstructable;
import {BaseTool, BaseToolConstructable} from './tool';
import {API, ToolConfig} from "../index";
/**

@@ -37,2 +38,18 @@ * Base structure for the Inline Toolbar Tool

export interface InlineToolConstructable extends BaseToolConstructable {}
/**
* Describe constructor parameters
*/
export interface InlineToolConstructorOptions {
api: API;
config?: ToolConfig;
}
export interface InlineToolConstructable extends BaseToolConstructable {
/**
* Constructor
*
* @param {InlineToolConstructorOptions} config - constructor parameters
*/
new(config: InlineToolConstructorOptions): BaseTool;
}
/**
* Tool configuration object. Specified by Tool developer, so leave it as object
*/
export type ToolConfig = object;
export type ToolConfig<T extends object = any> = T;

@@ -1,2 +0,2 @@

import {API, ToolSettings} from '../index';
import {API} from '../index';
import {ToolConfig} from './tool-config';

@@ -36,3 +36,3 @@ import {SanitizerConfig} from '../configs';

*/
new (config: {api: API, config?: ToolSettings}): BaseTool;
new (config: {api: API, config?: ToolConfig}): BaseTool;

@@ -39,0 +39,0 @@ /**

Sorry, the diff of this file is too big to display

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