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

@remirror/core-constants

Package Overview
Dependencies
Maintainers
1
Versions
230
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@remirror/core-constants - npm Package Compare versions

Comparing version 1.0.0-next.60 to 1.0.0-pr706

dist/remirror-core-constants.browser.cjs.js

164

dist/declarations/src/core-constants.d.ts
/**
* The editor class name
*/
export declare const EDITOR_CLASS_NAME: "remirror-editor";
/**
* The editor class selector
*/
export declare const EDITOR_CLASS_SELECTOR: string;
/**
* The css class added to a node that is selected.

@@ -33,2 +25,10 @@ */

/**
* Indicates that a state update was caused by an override and not via
* transactions or user commands.
*
* This is the case when `setContent` is called and for all `controlled` updates
* within a `react` editor instance.
*/
export declare const STATE_OVERRIDE = "__state_override__";
/**
* A character useful for separating inline nodes.

@@ -67,3 +67,3 @@ *

*/
export declare type ExtensionTags = Remirror.ExtensionTags & typeof BaseExtensionTag;
export declare type ExtensionTag = Remirror.ExtensionTags & typeof BaseExtensionTag;
/**

@@ -73,3 +73,3 @@ * A method for updating the extension tags.

* ```tsx
* import { ExtensionTag, mutateTag } from 'remirror/core';
* import { ExtensionTag, mutateTag } from 'remirror';
*

@@ -93,3 +93,3 @@ * mutateTag((tag) => {

*/
export declare function mutateTag(mutator: (Tag: ExtensionTags) => void): void;
export declare function mutateTag(mutator: (Tag: ExtensionTag) => void): void;
declare const BaseExtensionTag: {

@@ -157,3 +157,3 @@ /**

/**
* Marks which store code.
* Marks and nodes which contain code.
*/

@@ -179,4 +179,12 @@ readonly Code: "code";

*/
readonly Block: "block";
/**
* @deprecate use `ExtensionTags.Block` instead.
*/
readonly BlockNode: "block";
/**
* Set this as a text block
*/
readonly TextBlock: "textBlock";
/**
* A tag that excludes this from input rules.

@@ -186,6 +194,10 @@ */

/**
* A mark that can be exited when at the end and beginning of the document
* with an arrow key.
* A mark or node that can't be exited when at the end and beginning of the
* document with an arrow key or backspace key.
*/
readonly MarkSupportsExit: "markSupportsExits";
readonly PreventExits: "preventsExits";
/**
* Represents a media compatible node.
*/
readonly Media: "media";
};

@@ -202,64 +214,8 @@ /**

*/
export declare const ExtensionTag: ExtensionTags;
export declare const ExtensionTag: ExtensionTag;
/**
* The string values which can be used as extension tags.
*/
export declare type ExtensionTagType = ExtensionTags[keyof ExtensionTags];
export declare type ExtensionTagType = ExtensionTag[keyof ExtensionTag];
/**
* Marks are categorized into different groups. One motivation for this was to
* allow the `code` mark to exclude other marks, without needing to explicitly
* name them. Explicit naming requires the named mark to exist in the schema.
* This is undesirable because we want to construct different schemas that have
* different sets of nodes/marks.
*
* @deprecated use `ExtensionTag` instead
*/
export declare enum MarkGroup {
/**
* Mark group for font styling (e.g. bold, italic, underline, superscript).
*/
FontStyle = "fontStyle",
/**
* Mark groups for links.
*/
Link = "link",
/**
* Mark groups for colors (text-color, background-color, etc).
*/
Color = "color",
/**
* Mark group for alignment.
*/
Alignment = "alignment",
/**
* Mark group for indentation.
*/
Indentation = "indentation",
/**
* Marks which affect behavior.
*/
Behavior = "behavior",
/**
* Marks which store code.
*/
Code = "code"
}
/**
* @deprecated use `ExtensionTag` instead
*/
export declare enum NodeGroup {
/**
* Whether this node is an inline node.
*
* @example
*
* `text` is an inline node, but `paragraph` is a block node.
*/
Inline = "inline",
/**
* Sets this as a block level node.
*/
Block = "block"
}
/**
* The identifier key which is used to check objects for whether they are a

@@ -402,7 +358,65 @@ * certain type.

* The manager is being destroyed.
*
* TODO not currently implemented
*/
Destroy = 4
}
/**
* The named shortcuts that can be used to update multiple commands.
*/
export declare enum NamedShortcut {
Undo = "_|undo|_",
Redo = "_|redo|_",
Bold = "_|bold|_",
Italic = "_|italic|_",
Underline = "_|underline|_",
Strike = "_|strike|_",
Code = "_|code|_",
Paragraph = "_|paragraph|_",
H1 = "_|h1|_",
H2 = "_|h2|_",
H3 = "_|h3|_",
H4 = "_|h4|_",
H5 = "_|h5|_",
H6 = "_|h6|_",
BulletList = "_|bullet|_",
OrderedList = "_|number|_",
Quote = "_|quote|_",
Divider = "_|divider|_",
Codeblock = "_|codeblock|_",
ClearFormatting = "_|clear|_",
Superscript = "_|sup|_",
Subscript = "_|sub|_",
LeftAlignment = "_|left-align|_",
CenterAlignment = "_|center-align|_",
RightAlignment = "_|right-align|_",
JustifyAlignment = "_|justify-align|_",
InsertLink = "_|link|_",
Find = "_|find|_",
FindBackwards = "_|find-backwards|_",
FindReplace = "_|find-replace|_",
AddFootnote = "_|footnote|_",
AddComment = "_|comment|_",
ContextMenu = "_|context-menu|_",
IncreaseFontSize = "_|inc-font-size|_",
DecreaseFontSize = "_|dec-font-size|_",
IncreaseIndent = "_|indent|_",
DecreaseIndent = "_|dedent|_",
Shortcuts = "_|shortcuts|_",
Copy = "_|copy|_",
Cut = "_|cut|_",
Paste = "_|paste|_",
PastePlain = "_|paste-plain|_",
SelectAll = "_|select-all|_",
/**
* A keyboard shortcut to trigger formatting the current block.
*
* @default 'Alt-Shift-F' (Mac) | 'Shift-Ctrl-F' (PC)
*/
Format = "_|format|_"
}
/**
* Helpful empty array for use when a default array value is needed.
*
* DO NOT MUTATE!
*/
export declare const EMPTY_ARRAY: never[];
declare global {

@@ -409,0 +423,0 @@ namespace Remirror {

@@ -39,14 +39,9 @@ /**

/**
* No directly invoking the editor manager with `new`. Instead use one of the
* static methods to create your instance.
* The user requested an invalid extension from the getExtensions method.
* Please check the `createExtensions` return method is returning an extension
* with the defined constructor.
*/
NEW_EDITOR_MANAGER = "RMR0009",
INVALID_GET_EXTENSION = "RMR0010",
/**
* The user requested an invalid extension from the preset. Please check the
* `createExtensions` return method is returning an extension with the defined
* constructor.
*/
INVALID_PRESET_EXTENSION = "RMR0010",
/**
* Invalid value passed into `Manager constructor`. Only `Presets` and
* Invalid value passed into `Manager constructor`. Only and
* `Extensions` are supported.

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

INVALID_MANAGER_EXTENSION = "RMR0014",
/** The user requested an invalid preset from the manager. */
INVALID_MANAGER_PRESET = "RMR0015",
/** Command method names must be unique within the editor. */

@@ -79,4 +72,2 @@ DUPLICATE_COMMAND_NAMES = "RMR0016",

INVALID_EXTENSION = "RMR0019",
/** The provided preset is invalid. */
INVALID_PRESET = "RMR0020",
/** The content provided to the editor is not supported. */

@@ -96,3 +87,3 @@ INVALID_CONTENT = "RMR0021",

* `useRemirror` was called outside of the remirror context. It can only be used
* within an active remirror context created by the `<RemirrorProvider />`.
* within an active remirror context created by the `<Remirror />`.
*/

@@ -117,2 +108,16 @@ REACT_PROVIDER_CONTEXT = "RMR0200",

/**
* You attempted to call `getContext` provided by the `useRemirror` prop
* during the first render of the editor. This is not possible and should only
* be after the editor first mounts.
*/
REACT_GET_CONTEXT = "RMR0205",
/**
* An error occurred when rendering the react components.
*/
REACT_COMPONENTS = "RMR0206",
/**
* An error occurred within a remirror hook.
*/
REACT_HOOKS = "RMR0207",
/**
* There is something wrong with your i18n setup.

@@ -119,0 +124,0 @@ */

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

export type { ExtensionTagType, ExtensionTags } from './core-constants';
export { EDITOR_CLASS_NAME, EDITOR_CLASS_SELECTOR, EMPTY_NODE, EMPTY_PARAGRAPH_NODE, ExtensionPriority, ExtensionTag, LEAF_NODE_REPLACING_CHARACTER, ManagerPhase, MarkGroup, mutateTag, NON_BREAKING_SPACE_CHAR, NULL_CHARACTER, NodeGroup, RemirrorIdentifier, SELECTED_NODE_CLASS_NAME, SELECTED_NODE_CLASS_SELECTOR, ZERO_WIDTH_SPACE_CHAR, __INTERNAL_REMIRROR_IDENTIFIER_KEY__, } from './core-constants';
export * from './core-constants';
export { ErrorConstant } from './error-constants';
{
"name": "@remirror/core-constants",
"version": "1.0.0-next.60",
"version": "1.0.0-pr706",
"description": "The core constants used throughout the remirror codebase",
"homepage": "https://github.com/remirror/remirror/tree/HEAD/packages/@remirror/core-constants",
"repository": "https://github.com/remirror/remirror/tree/HEAD/packages/@remirror/core-constants",
"homepage": "https://github.com/remirror/remirror/tree/HEAD/packages/remirror__core-constants",
"repository": "https://github.com/remirror/remirror/tree/HEAD/packages/remirror__core-constants",
"license": "MIT",

@@ -12,9 +12,20 @@ "contributors": [

"sideEffects": false,
"main": "dist/core-constants.cjs.js",
"module": "dist/core-constants.esm.js",
"exports": {
".": {
"import": "./dist/remirror-core-constants.esm.js",
"require": "./dist/remirror-core-constants.cjs.js",
"browser": "./dist/remirror-core-constants.browser.esm.js",
"types": "./dist/remirror-core-constants.cjs.d.ts",
"default": "./dist/remirror-core-constants.esm.js"
},
"./package.json": "./package.json",
"./types/*": "./dist/declarations/src/*.d.ts"
},
"main": "dist/remirror-core-constants.cjs.js",
"module": "dist/remirror-core-constants.esm.js",
"browser": {
"./dist/core-constants.cjs.js": "./dist/core-constants.browser.cjs.js",
"./dist/core-constants.esm.js": "./dist/core-constants.browser.esm.js"
"./dist/remirror-core-constants.cjs.js": "./dist/remirror-core-constants.browser.cjs.js",
"./dist/remirror-core-constants.esm.js": "./dist/remirror-core-constants.browser.esm.js"
},
"types": "dist/core-constants.cjs.d.ts",
"types": "dist/remirror-core-constants.cjs.d.ts",
"files": [

@@ -24,3 +35,4 @@ "dist"

"dependencies": {
"@babel/runtime": "^7.12.0"
"@babel/runtime": "^7.12.13",
"@linaria/core": "^3.0.0-beta.1"
},

@@ -30,5 +42,6 @@ "publishConfig": {

},
"meta": {
"@remirror": {
"sizeLimit": "2 KB"
}
},
"rn:dev": "src/index.ts"
}

@@ -10,4 +10,4 @@ # @remirror/core-constants

[license]: https://flat.badgen.net/badge/license/MIT/purple
[size]: https://bundlephobia.com/result?p=@remirror/core-constants@next
[size-badge]: https://flat.badgen.net/bundlephobia/minzip/@remirror/core-constants@next
[size]: https://bundlephobia.com/result?p=@remirror/core-constants
[size-badge]: https://flat.badgen.net/bundlephobia/minzip/@remirror/core-constants
[typescript]: https://flat.badgen.net/badge/icon/TypeScript?icon=typescript&label

@@ -14,0 +14,0 @@ [downloads-badge]: https://badgen.net/npm/dw/@remirror/core-constants/red?icon=npm

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