prosemirror-suggest
Advanced tools
Comparing version 1.0.2 to 1.0.3
@@ -0,0 +0,0 @@ /** |
@@ -0,0 +0,0 @@ import { Plugin } from 'prosemirror-state'; |
@@ -0,0 +0,0 @@ import { TextSelection } from 'prosemirror-state'; |
@@ -0,0 +0,0 @@ import { PluginKey, Selection, TextSelection } from 'prosemirror-state'; |
@@ -0,1 +1,4 @@ | ||
import * as PMModel from 'prosemirror-model'; | ||
import * as PMState from 'prosemirror-state'; | ||
import * as PMView from 'prosemirror-view'; | ||
/** | ||
@@ -735,5 +738,5 @@ * This [[`Suggester`]] interface defines all the options required to create a | ||
}; | ||
export declare type EditorSchema = import('prosemirror-model').Schema<string, string>; | ||
export declare type ProsemirrorNode<Schema extends EditorSchema = EditorSchema> = import('prosemirror-model').Node<Schema>; | ||
export declare type Transaction<Schema extends EditorSchema = EditorSchema> = import('prosemirror-state').Transaction<Schema>; | ||
export declare type EditorSchema = PMModel.Schema<string, string>; | ||
export declare type ProsemirrorNode<Schema extends EditorSchema = EditorSchema> = PMModel.Node<Schema>; | ||
export declare type Transaction<Schema extends EditorSchema = EditorSchema> = PMState.Transaction<Schema>; | ||
/** | ||
@@ -750,3 +753,3 @@ * A parameter builder interface containing the `tr` property. | ||
} | ||
export declare type EditorState<Schema extends EditorSchema = EditorSchema> = import('prosemirror-state').EditorState<Schema>; | ||
export declare type EditorState<Schema extends EditorSchema = EditorSchema> = PMState.EditorState<Schema>; | ||
/** | ||
@@ -763,3 +766,3 @@ * A parameter builder interface containing the `state` property. | ||
} | ||
export declare type ResolvedPos<Schema extends EditorSchema = EditorSchema> = import('prosemirror-model').ResolvedPos<Schema>; | ||
export declare type ResolvedPos<Schema extends EditorSchema = EditorSchema> = PMModel.ResolvedPos<Schema>; | ||
/** | ||
@@ -784,3 +787,3 @@ * @template Schema - the underlying editor schema. | ||
} | ||
export declare type EditorView<Schema extends EditorSchema = EditorSchema> = import('prosemirror-view').EditorView<Schema>; | ||
export declare type EditorView<Schema extends EditorSchema = EditorSchema> = PMView.EditorView<Schema>; | ||
/** | ||
@@ -801,3 +804,3 @@ * A parameter builder interface containing the `view` property. | ||
*/ | ||
selection: import('prosemirror-state').Selection<Schema>; | ||
selection: PMState.Selection<Schema>; | ||
} |
@@ -0,0 +0,0 @@ import { PickPartial } from '@remirror/types'; |
@@ -20,2 +20,13 @@ 'use strict'; | ||
function _checkPrivateRedeclaration(obj, privateCollection) { | ||
if (privateCollection.has(obj)) { | ||
throw new TypeError("Cannot initialize the same private elements twice on an object"); | ||
} | ||
} | ||
function _classPrivateFieldInitSpec(obj, privateMap, value) { | ||
_checkPrivateRedeclaration(obj, privateMap); | ||
privateMap.set(obj, value); | ||
} | ||
/** | ||
@@ -445,4 +456,3 @@ * This [[`Suggester`]] interface defines all the options required to create a | ||
var _ref = updatedPrevious && updatedPrevious.query.full !== prev.query.full // has query changed | ||
? // has query changed | ||
createInsertReason({ | ||
? createInsertReason({ | ||
prev, | ||
@@ -795,3 +805,3 @@ next: updatedPrevious, | ||
function getCharAsRegex(char) { | ||
return coreHelpers.isString(char) ? new RegExp(escapeStringRegex__default['default'](char)) : char; | ||
return coreHelpers.isString(char) ? new RegExp(escapeStringRegex__default["default"](char)) : char; | ||
} | ||
@@ -944,3 +954,3 @@ | ||
constructor(_suggesters2) { | ||
_docChanged.set(this, { | ||
_classPrivateFieldInitSpec(this, _docChanged, { | ||
writable: true, | ||
@@ -950,3 +960,3 @@ value: false | ||
_ignoreNextExit.set(this, { | ||
_classPrivateFieldInitSpec(this, _ignoreNextExit, { | ||
writable: true, | ||
@@ -956,3 +966,3 @@ value: false | ||
_suggesters.set(this, { | ||
_classPrivateFieldInitSpec(this, _suggesters, { | ||
writable: true, | ||
@@ -962,3 +972,3 @@ value: void 0 | ||
_next.set(this, { | ||
_classPrivateFieldInitSpec(this, _next, { | ||
writable: true, | ||
@@ -968,3 +978,3 @@ value: void 0 | ||
_prev.set(this, { | ||
_classPrivateFieldInitSpec(this, _prev, { | ||
writable: true, | ||
@@ -974,3 +984,3 @@ value: void 0 | ||
_handlerMatches.set(this, { | ||
_classPrivateFieldInitSpec(this, _handlerMatches, { | ||
writable: true, | ||
@@ -980,3 +990,3 @@ value: coreHelpers.object() | ||
_ignored.set(this, { | ||
_classPrivateFieldInitSpec(this, _ignored, { | ||
writable: true, | ||
@@ -986,3 +996,3 @@ value: prosemirrorView.DecorationSet.empty | ||
_removed.set(this, { | ||
_classPrivateFieldInitSpec(this, _removed, { | ||
writable: true, | ||
@@ -992,3 +1002,3 @@ value: false | ||
_lastChangeFromAppend.set(this, { | ||
_classPrivateFieldInitSpec(this, _lastChangeFromAppend, { | ||
writable: true, | ||
@@ -995,0 +1005,0 @@ value: false |
@@ -12,2 +12,13 @@ import { TextSelection, Selection, PluginKey, Plugin } from 'prosemirror-state'; | ||
function _checkPrivateRedeclaration(obj, privateCollection) { | ||
if (privateCollection.has(obj)) { | ||
throw new TypeError("Cannot initialize the same private elements twice on an object"); | ||
} | ||
} | ||
function _classPrivateFieldInitSpec(obj, privateMap, value) { | ||
_checkPrivateRedeclaration(obj, privateMap); | ||
privateMap.set(obj, value); | ||
} | ||
/** | ||
@@ -437,4 +448,3 @@ * This [[`Suggester`]] interface defines all the options required to create a | ||
var _ref = updatedPrevious && updatedPrevious.query.full !== prev.query.full // has query changed | ||
? // has query changed | ||
createInsertReason({ | ||
? createInsertReason({ | ||
prev, | ||
@@ -935,3 +945,3 @@ next: updatedPrevious, | ||
constructor(_suggesters2) { | ||
_docChanged.set(this, { | ||
_classPrivateFieldInitSpec(this, _docChanged, { | ||
writable: true, | ||
@@ -941,3 +951,3 @@ value: false | ||
_ignoreNextExit.set(this, { | ||
_classPrivateFieldInitSpec(this, _ignoreNextExit, { | ||
writable: true, | ||
@@ -947,3 +957,3 @@ value: false | ||
_suggesters.set(this, { | ||
_classPrivateFieldInitSpec(this, _suggesters, { | ||
writable: true, | ||
@@ -953,3 +963,3 @@ value: void 0 | ||
_next.set(this, { | ||
_classPrivateFieldInitSpec(this, _next, { | ||
writable: true, | ||
@@ -959,3 +969,3 @@ value: void 0 | ||
_prev.set(this, { | ||
_classPrivateFieldInitSpec(this, _prev, { | ||
writable: true, | ||
@@ -965,3 +975,3 @@ value: void 0 | ||
_handlerMatches.set(this, { | ||
_classPrivateFieldInitSpec(this, _handlerMatches, { | ||
writable: true, | ||
@@ -971,3 +981,3 @@ value: object() | ||
_ignored.set(this, { | ||
_classPrivateFieldInitSpec(this, _ignored, { | ||
writable: true, | ||
@@ -977,3 +987,3 @@ value: DecorationSet.empty | ||
_removed.set(this, { | ||
_classPrivateFieldInitSpec(this, _removed, { | ||
writable: true, | ||
@@ -983,3 +993,3 @@ value: false | ||
_lastChangeFromAppend.set(this, { | ||
_classPrivateFieldInitSpec(this, _lastChangeFromAppend, { | ||
writable: true, | ||
@@ -986,0 +996,0 @@ value: false |
@@ -20,2 +20,13 @@ 'use strict'; | ||
function _checkPrivateRedeclaration(obj, privateCollection) { | ||
if (privateCollection.has(obj)) { | ||
throw new TypeError("Cannot initialize the same private elements twice on an object"); | ||
} | ||
} | ||
function _classPrivateFieldInitSpec(obj, privateMap, value) { | ||
_checkPrivateRedeclaration(obj, privateMap); | ||
privateMap.set(obj, value); | ||
} | ||
/** | ||
@@ -445,4 +456,3 @@ * This [[`Suggester`]] interface defines all the options required to create a | ||
var _ref = updatedPrevious && updatedPrevious.query.full !== prev.query.full // has query changed | ||
? // has query changed | ||
createInsertReason({ | ||
? createInsertReason({ | ||
prev, | ||
@@ -795,3 +805,3 @@ next: updatedPrevious, | ||
function getCharAsRegex(char) { | ||
return coreHelpers.isString(char) ? new RegExp(escapeStringRegex__default['default'](char)) : char; | ||
return coreHelpers.isString(char) ? new RegExp(escapeStringRegex__default["default"](char)) : char; | ||
} | ||
@@ -944,3 +954,3 @@ | ||
constructor(_suggesters2) { | ||
_docChanged.set(this, { | ||
_classPrivateFieldInitSpec(this, _docChanged, { | ||
writable: true, | ||
@@ -950,3 +960,3 @@ value: false | ||
_ignoreNextExit.set(this, { | ||
_classPrivateFieldInitSpec(this, _ignoreNextExit, { | ||
writable: true, | ||
@@ -956,3 +966,3 @@ value: false | ||
_suggesters.set(this, { | ||
_classPrivateFieldInitSpec(this, _suggesters, { | ||
writable: true, | ||
@@ -962,3 +972,3 @@ value: void 0 | ||
_next.set(this, { | ||
_classPrivateFieldInitSpec(this, _next, { | ||
writable: true, | ||
@@ -968,3 +978,3 @@ value: void 0 | ||
_prev.set(this, { | ||
_classPrivateFieldInitSpec(this, _prev, { | ||
writable: true, | ||
@@ -974,3 +984,3 @@ value: void 0 | ||
_handlerMatches.set(this, { | ||
_classPrivateFieldInitSpec(this, _handlerMatches, { | ||
writable: true, | ||
@@ -980,3 +990,3 @@ value: coreHelpers.object() | ||
_ignored.set(this, { | ||
_classPrivateFieldInitSpec(this, _ignored, { | ||
writable: true, | ||
@@ -986,3 +996,3 @@ value: prosemirrorView.DecorationSet.empty | ||
_removed.set(this, { | ||
_classPrivateFieldInitSpec(this, _removed, { | ||
writable: true, | ||
@@ -992,3 +1002,3 @@ value: false | ||
_lastChangeFromAppend.set(this, { | ||
_classPrivateFieldInitSpec(this, _lastChangeFromAppend, { | ||
writable: true, | ||
@@ -995,0 +1005,0 @@ value: false |
@@ -20,2 +20,13 @@ 'use strict'; | ||
function _checkPrivateRedeclaration(obj, privateCollection) { | ||
if (privateCollection.has(obj)) { | ||
throw new TypeError("Cannot initialize the same private elements twice on an object"); | ||
} | ||
} | ||
function _classPrivateFieldInitSpec(obj, privateMap, value) { | ||
_checkPrivateRedeclaration(obj, privateMap); | ||
privateMap.set(obj, value); | ||
} | ||
/** | ||
@@ -445,4 +456,3 @@ * This [[`Suggester`]] interface defines all the options required to create a | ||
var _ref = updatedPrevious && updatedPrevious.query.full !== prev.query.full // has query changed | ||
? // has query changed | ||
createInsertReason({ | ||
? createInsertReason({ | ||
prev, | ||
@@ -795,3 +805,3 @@ next: updatedPrevious, | ||
function getCharAsRegex(char) { | ||
return coreHelpers.isString(char) ? new RegExp(escapeStringRegex__default['default'](char)) : char; | ||
return coreHelpers.isString(char) ? new RegExp(escapeStringRegex__default["default"](char)) : char; | ||
} | ||
@@ -944,3 +954,3 @@ | ||
constructor(_suggesters2) { | ||
_docChanged.set(this, { | ||
_classPrivateFieldInitSpec(this, _docChanged, { | ||
writable: true, | ||
@@ -950,3 +960,3 @@ value: false | ||
_ignoreNextExit.set(this, { | ||
_classPrivateFieldInitSpec(this, _ignoreNextExit, { | ||
writable: true, | ||
@@ -956,3 +966,3 @@ value: false | ||
_suggesters.set(this, { | ||
_classPrivateFieldInitSpec(this, _suggesters, { | ||
writable: true, | ||
@@ -962,3 +972,3 @@ value: void 0 | ||
_next.set(this, { | ||
_classPrivateFieldInitSpec(this, _next, { | ||
writable: true, | ||
@@ -968,3 +978,3 @@ value: void 0 | ||
_prev.set(this, { | ||
_classPrivateFieldInitSpec(this, _prev, { | ||
writable: true, | ||
@@ -974,3 +984,3 @@ value: void 0 | ||
_handlerMatches.set(this, { | ||
_classPrivateFieldInitSpec(this, _handlerMatches, { | ||
writable: true, | ||
@@ -980,3 +990,3 @@ value: coreHelpers.object() | ||
_ignored.set(this, { | ||
_classPrivateFieldInitSpec(this, _ignored, { | ||
writable: true, | ||
@@ -986,3 +996,3 @@ value: prosemirrorView.DecorationSet.empty | ||
_removed.set(this, { | ||
_classPrivateFieldInitSpec(this, _removed, { | ||
writable: true, | ||
@@ -992,3 +1002,3 @@ value: false | ||
_lastChangeFromAppend.set(this, { | ||
_classPrivateFieldInitSpec(this, _lastChangeFromAppend, { | ||
writable: true, | ||
@@ -995,0 +1005,0 @@ value: false |
@@ -12,2 +12,13 @@ import { TextSelection, Selection, PluginKey, Plugin } from 'prosemirror-state'; | ||
function _checkPrivateRedeclaration(obj, privateCollection) { | ||
if (privateCollection.has(obj)) { | ||
throw new TypeError("Cannot initialize the same private elements twice on an object"); | ||
} | ||
} | ||
function _classPrivateFieldInitSpec(obj, privateMap, value) { | ||
_checkPrivateRedeclaration(obj, privateMap); | ||
privateMap.set(obj, value); | ||
} | ||
/** | ||
@@ -437,4 +448,3 @@ * This [[`Suggester`]] interface defines all the options required to create a | ||
var _ref = updatedPrevious && updatedPrevious.query.full !== prev.query.full // has query changed | ||
? // has query changed | ||
createInsertReason({ | ||
? createInsertReason({ | ||
prev, | ||
@@ -935,3 +945,3 @@ next: updatedPrevious, | ||
constructor(_suggesters2) { | ||
_docChanged.set(this, { | ||
_classPrivateFieldInitSpec(this, _docChanged, { | ||
writable: true, | ||
@@ -941,3 +951,3 @@ value: false | ||
_ignoreNextExit.set(this, { | ||
_classPrivateFieldInitSpec(this, _ignoreNextExit, { | ||
writable: true, | ||
@@ -947,3 +957,3 @@ value: false | ||
_suggesters.set(this, { | ||
_classPrivateFieldInitSpec(this, _suggesters, { | ||
writable: true, | ||
@@ -953,3 +963,3 @@ value: void 0 | ||
_next.set(this, { | ||
_classPrivateFieldInitSpec(this, _next, { | ||
writable: true, | ||
@@ -959,3 +969,3 @@ value: void 0 | ||
_prev.set(this, { | ||
_classPrivateFieldInitSpec(this, _prev, { | ||
writable: true, | ||
@@ -965,3 +975,3 @@ value: void 0 | ||
_handlerMatches.set(this, { | ||
_classPrivateFieldInitSpec(this, _handlerMatches, { | ||
writable: true, | ||
@@ -971,3 +981,3 @@ value: object() | ||
_ignored.set(this, { | ||
_classPrivateFieldInitSpec(this, _ignored, { | ||
writable: true, | ||
@@ -977,3 +987,3 @@ value: DecorationSet.empty | ||
_removed.set(this, { | ||
_classPrivateFieldInitSpec(this, _removed, { | ||
writable: true, | ||
@@ -983,3 +993,3 @@ value: false | ||
_lastChangeFromAppend.set(this, { | ||
_classPrivateFieldInitSpec(this, _lastChangeFromAppend, { | ||
writable: true, | ||
@@ -986,0 +996,0 @@ value: false |
{ | ||
"name": "prosemirror-suggest", | ||
"version": "1.0.2", | ||
"version": "1.0.3", | ||
"description": "Primitives for building your prosemirror suggestion and autocomplete functionality", | ||
"homepage": "https://github.com/remirror/remirror/tree/HEAD/packages/prosemirror-suggest", | ||
"repository": "https://github.com/remirror/remirror/tree/HEAD/packages/prosemirror-suggest", | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/remirror/remirror.git", | ||
"directory": "packages/prosemirror-suggest" | ||
}, | ||
"license": "MIT", | ||
@@ -35,4 +39,4 @@ "contributors": [ | ||
"@babel/runtime": "^7.13.10", | ||
"@remirror/core-constants": "^1.0.0", | ||
"@remirror/core-helpers": "^1.0.1", | ||
"@remirror/core-constants": "^1.0.1", | ||
"@remirror/core-helpers": "^1.0.2", | ||
"@remirror/types": "^0.1.0", | ||
@@ -43,8 +47,8 @@ "escape-string-regexp": "^4.0.0" | ||
"@types/prosemirror-keymap": "^1.0.4", | ||
"@types/prosemirror-model": "^1.13.1", | ||
"@types/prosemirror-model": "^1.13.2", | ||
"@types/prosemirror-state": "^1.2.7", | ||
"@types/prosemirror-view": "^1.17.2", | ||
"prosemirror-model": "^1.14.2", | ||
"@types/prosemirror-view": "^1.18.0", | ||
"prosemirror-model": "^1.14.3", | ||
"prosemirror-state": "^1.3.4", | ||
"prosemirror-view": "^1.18.10" | ||
"prosemirror-view": "^1.19.3" | ||
}, | ||
@@ -77,2 +81,2 @@ "peerDependencies": { | ||
"rn:dev": "src/index.ts" | ||
} | ||
} |
@@ -50,3 +50,3 @@ # prosemirror-suggest | ||
`prosemirror-suggest` uses configuration objects called `Suggester`<!-- -->'s to define the behaviour of the suggesters you create. By calling the exported `suggest` method with all required `Suggester`<!-- -->'s the functionality is added to the editor in one plugin. | ||
`prosemirror-suggest` uses configuration objects called `Suggester`'s to define the behaviour of the suggesters you create. By calling the exported `suggest` method with all required `Suggester`'s the functionality is added to the editor in one plugin. | ||
@@ -53,0 +53,0 @@ In the following example we're creating an emoji suggestion plugin that responds to the colon character with a query and presents a list of matching emojis based on the query typed so far. |
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
No repository
Supply chain riskPackage does not have a linked source code repository. Without this field, a package will have no reference to the location of the source code use to generate the package.
Found 1 instance in 1 package
7986
1
301540
16