prosemirror-suggest
Advanced tools
Comparing version 1.0.0-pr706.d0b3ea524 to 1.0.0
@@ -169,3 +169,3 @@ import { PluginKey, Selection, TextSelection } from 'prosemirror-state'; | ||
*/ | ||
setLastChangeFromAppend(): void; | ||
setLastChangeFromAppend: () => void; | ||
} | ||
@@ -172,0 +172,0 @@ /** |
@@ -730,16 +730,2 @@ /** | ||
/** | ||
* Keeps the partial properties of a type unchanged. Transforms the rest to | ||
* `never`. | ||
*/ | ||
declare type KeepPartialProperties<Type extends object> = { | ||
[Key in keyof Type]: Type[Key] extends undefined ? Type[Key] : never; | ||
}; | ||
/** | ||
* Pick the `partial` properties from the provided Type and make them all | ||
* required. | ||
*/ | ||
export declare type PickPartial<Type extends object> = { | ||
[Key in keyof import('type-fest').ConditionalExcept<KeepPartialProperties<Type>, never>]-?: Type[Key]; | ||
}; | ||
/** | ||
* Makes specified keys of an interface optional while the rest stay the same. | ||
@@ -814,2 +800,1 @@ */ | ||
} | ||
export {}; |
@@ -1,2 +0,3 @@ | ||
import type { CompareMatchProps, DocChangedProps, EditorSchema, EditorStateProps, PickPartial, ResolvedPos, ResolvedPosProps, ResolvedRangeWithCursor, Suggester, SuggestMatch, SuggestReasonMap } from './suggest-types'; | ||
import { PickPartial } from '@remirror/types'; | ||
import type { CompareMatchProps, DocChangedProps, EditorSchema, EditorStateProps, ResolvedPos, ResolvedPosProps, ResolvedRangeWithCursor, Suggester, SuggestMatch, SuggestReasonMap } from './suggest-types'; | ||
interface FindFromSuggestersProps<Schema extends EditorSchema = EditorSchema> extends ResolvedPosProps<Schema>, DocChangedProps { | ||
@@ -3,0 +4,0 @@ /** |
@@ -28,3 +28,29 @@ 'use strict'; | ||
*/ | ||
/** | ||
* A function for checking whether the next selection is valid. | ||
* | ||
* It is called for all registered suggesters before any of the onChange | ||
* handlers are fired. | ||
* | ||
* @param $pos - the next valid position that supports text selections. | ||
* @param tr - the transaction that can be mutated when `appendTransaction` is | ||
* set to true. | ||
* @param matches - the possibly undefined exit and change matcher names. These | ||
* can be used to check if the name matches the current suggester. | ||
*/ | ||
/** | ||
* A function that can be used to determine whether the decoration should be set | ||
* or not. | ||
* | ||
* @param match - the current active match | ||
* @param resolvedRange - the range of the match with each position resolved. | ||
*/ | ||
/** | ||
* The potential reasons for an exit of a mention. | ||
*/ | ||
exports.ExitReason = void 0; | ||
/** | ||
* The potential reason for changes | ||
@@ -44,2 +70,4 @@ */ | ||
})(exports.ExitReason || (exports.ExitReason = {})); | ||
exports.ChangeReason = void 0; | ||
/** | ||
@@ -418,3 +446,4 @@ * The parameters needed for the [[`SuggestIgnoreProps.addIgnored`]] action | ||
var _ref = updatedPrevious && updatedPrevious.query.full !== prev.query.full // has query changed | ||
? createInsertReason({ | ||
? // has query changed | ||
createInsertReason({ | ||
prev, | ||
@@ -986,3 +1015,3 @@ next: updatedPrevious, | ||
_defineProperty(this, "addIgnored", (_ref) => { | ||
_defineProperty(this, "addIgnored", _ref => { | ||
var from = _ref.from, | ||
@@ -1015,3 +1044,3 @@ name = _ref.name, | ||
_defineProperty(this, "removeIgnored", (_ref2) => { | ||
_defineProperty(this, "removeIgnored", _ref2 => { | ||
var from = _ref2.from, | ||
@@ -1046,3 +1075,3 @@ name = _ref2.name; | ||
var decorationsToClear = decorations.filter((_ref3) => { | ||
var decorationsToClear = decorations.filter(_ref3 => { | ||
var spec = _ref3.spec; | ||
@@ -1065,2 +1094,6 @@ return spec.name === name; | ||
_defineProperty(this, "setLastChangeFromAppend", () => { | ||
_classPrivateFieldSet(this, _lastChangeFromAppend, true); | ||
}); | ||
var mapper = createSuggesterMapper(); | ||
@@ -1251,3 +1284,3 @@ | ||
var invalid = decorations.filter((_ref4) => { | ||
var invalid = decorations.filter(_ref4 => { | ||
var from = _ref4.from, | ||
@@ -1289,3 +1322,3 @@ to = _ref4.to, | ||
return decorations.some((_ref6) => { | ||
var shouldIgnore = decorations.some(_ref6 => { | ||
var spec = _ref6.spec, | ||
@@ -1300,2 +1333,3 @@ from = _ref6.from; | ||
}); | ||
return shouldIgnore; | ||
} | ||
@@ -1474,6 +1508,2 @@ /** | ||
setLastChangeFromAppend() { | ||
_classPrivateFieldSet(this, _lastChangeFromAppend, true); | ||
} | ||
} | ||
@@ -1504,3 +1534,3 @@ | ||
var suggestPluginKey = /*#__PURE__*/new prosemirrorState.PluginKey('suggest'); | ||
var suggestPluginKey = new prosemirrorState.PluginKey('suggest'); | ||
@@ -1507,0 +1537,0 @@ /** |
@@ -436,3 +436,4 @@ import { TextSelection, Selection, PluginKey, Plugin } from 'prosemirror-state'; | ||
var _ref = updatedPrevious && updatedPrevious.query.full !== prev.query.full // has query changed | ||
? createInsertReason({ | ||
? // has query changed | ||
createInsertReason({ | ||
prev, | ||
@@ -1004,3 +1005,3 @@ next: updatedPrevious, | ||
_defineProperty(this, "addIgnored", (_ref) => { | ||
_defineProperty(this, "addIgnored", _ref => { | ||
var from = _ref.from, | ||
@@ -1033,3 +1034,3 @@ name = _ref.name, | ||
_defineProperty(this, "removeIgnored", (_ref2) => { | ||
_defineProperty(this, "removeIgnored", _ref2 => { | ||
var from = _ref2.from, | ||
@@ -1064,3 +1065,3 @@ name = _ref2.name; | ||
var decorationsToClear = decorations.filter((_ref3) => { | ||
var decorationsToClear = decorations.filter(_ref3 => { | ||
var spec = _ref3.spec; | ||
@@ -1083,2 +1084,6 @@ return spec.name === name; | ||
_defineProperty(this, "setLastChangeFromAppend", () => { | ||
_classPrivateFieldSet(this, _lastChangeFromAppend, true); | ||
}); | ||
var mapper = createSuggesterMapper(); | ||
@@ -1269,3 +1274,3 @@ | ||
var invalid = decorations.filter((_ref4) => { | ||
var invalid = decorations.filter(_ref4 => { | ||
var from = _ref4.from, | ||
@@ -1307,3 +1312,3 @@ to = _ref4.to, | ||
return decorations.some((_ref6) => { | ||
var shouldIgnore = decorations.some(_ref6 => { | ||
var spec = _ref6.spec, | ||
@@ -1318,2 +1323,3 @@ from = _ref6.from; | ||
}); | ||
return shouldIgnore; | ||
} | ||
@@ -1492,6 +1498,2 @@ /** | ||
setLastChangeFromAppend() { | ||
_classPrivateFieldSet(this, _lastChangeFromAppend, true); | ||
} | ||
} | ||
@@ -1522,3 +1524,3 @@ | ||
var suggestPluginKey = /*#__PURE__*/new PluginKey('suggest'); | ||
var suggestPluginKey = new PluginKey('suggest'); | ||
@@ -1525,0 +1527,0 @@ /** |
@@ -28,3 +28,29 @@ 'use strict'; | ||
*/ | ||
/** | ||
* A function for checking whether the next selection is valid. | ||
* | ||
* It is called for all registered suggesters before any of the onChange | ||
* handlers are fired. | ||
* | ||
* @param $pos - the next valid position that supports text selections. | ||
* @param tr - the transaction that can be mutated when `appendTransaction` is | ||
* set to true. | ||
* @param matches - the possibly undefined exit and change matcher names. These | ||
* can be used to check if the name matches the current suggester. | ||
*/ | ||
/** | ||
* A function that can be used to determine whether the decoration should be set | ||
* or not. | ||
* | ||
* @param match - the current active match | ||
* @param resolvedRange - the range of the match with each position resolved. | ||
*/ | ||
/** | ||
* The potential reasons for an exit of a mention. | ||
*/ | ||
exports.ExitReason = void 0; | ||
/** | ||
* The potential reason for changes | ||
@@ -44,2 +70,4 @@ */ | ||
})(exports.ExitReason || (exports.ExitReason = {})); | ||
exports.ChangeReason = void 0; | ||
/** | ||
@@ -418,3 +446,4 @@ * The parameters needed for the [[`SuggestIgnoreProps.addIgnored`]] action | ||
var _ref = updatedPrevious && updatedPrevious.query.full !== prev.query.full // has query changed | ||
? createInsertReason({ | ||
? // has query changed | ||
createInsertReason({ | ||
prev, | ||
@@ -986,3 +1015,3 @@ next: updatedPrevious, | ||
_defineProperty(this, "addIgnored", (_ref) => { | ||
_defineProperty(this, "addIgnored", _ref => { | ||
var from = _ref.from, | ||
@@ -1015,3 +1044,3 @@ name = _ref.name, | ||
_defineProperty(this, "removeIgnored", (_ref2) => { | ||
_defineProperty(this, "removeIgnored", _ref2 => { | ||
var from = _ref2.from, | ||
@@ -1046,3 +1075,3 @@ name = _ref2.name; | ||
var decorationsToClear = decorations.filter((_ref3) => { | ||
var decorationsToClear = decorations.filter(_ref3 => { | ||
var spec = _ref3.spec; | ||
@@ -1065,2 +1094,6 @@ return spec.name === name; | ||
_defineProperty(this, "setLastChangeFromAppend", () => { | ||
_classPrivateFieldSet(this, _lastChangeFromAppend, true); | ||
}); | ||
var mapper = createSuggesterMapper(); | ||
@@ -1251,3 +1284,3 @@ | ||
var invalid = decorations.filter((_ref4) => { | ||
var invalid = decorations.filter(_ref4 => { | ||
var from = _ref4.from, | ||
@@ -1289,3 +1322,3 @@ to = _ref4.to, | ||
return decorations.some((_ref6) => { | ||
var shouldIgnore = decorations.some(_ref6 => { | ||
var spec = _ref6.spec, | ||
@@ -1300,2 +1333,3 @@ from = _ref6.from; | ||
}); | ||
return shouldIgnore; | ||
} | ||
@@ -1474,6 +1508,2 @@ /** | ||
setLastChangeFromAppend() { | ||
_classPrivateFieldSet(this, _lastChangeFromAppend, true); | ||
} | ||
} | ||
@@ -1504,3 +1534,3 @@ | ||
var suggestPluginKey = /*#__PURE__*/new prosemirrorState.PluginKey('suggest'); | ||
var suggestPluginKey = new prosemirrorState.PluginKey('suggest'); | ||
@@ -1507,0 +1537,0 @@ /** |
@@ -28,3 +28,29 @@ 'use strict'; | ||
*/ | ||
/** | ||
* A function for checking whether the next selection is valid. | ||
* | ||
* It is called for all registered suggesters before any of the onChange | ||
* handlers are fired. | ||
* | ||
* @param $pos - the next valid position that supports text selections. | ||
* @param tr - the transaction that can be mutated when `appendTransaction` is | ||
* set to true. | ||
* @param matches - the possibly undefined exit and change matcher names. These | ||
* can be used to check if the name matches the current suggester. | ||
*/ | ||
/** | ||
* A function that can be used to determine whether the decoration should be set | ||
* or not. | ||
* | ||
* @param match - the current active match | ||
* @param resolvedRange - the range of the match with each position resolved. | ||
*/ | ||
/** | ||
* The potential reasons for an exit of a mention. | ||
*/ | ||
exports.ExitReason = void 0; | ||
/** | ||
* The potential reason for changes | ||
@@ -44,2 +70,4 @@ */ | ||
})(exports.ExitReason || (exports.ExitReason = {})); | ||
exports.ChangeReason = void 0; | ||
/** | ||
@@ -418,3 +446,4 @@ * The parameters needed for the [[`SuggestIgnoreProps.addIgnored`]] action | ||
var _ref = updatedPrevious && updatedPrevious.query.full !== prev.query.full // has query changed | ||
? createInsertReason({ | ||
? // has query changed | ||
createInsertReason({ | ||
prev, | ||
@@ -986,3 +1015,3 @@ next: updatedPrevious, | ||
_defineProperty(this, "addIgnored", (_ref) => { | ||
_defineProperty(this, "addIgnored", _ref => { | ||
var from = _ref.from, | ||
@@ -1015,3 +1044,3 @@ name = _ref.name, | ||
_defineProperty(this, "removeIgnored", (_ref2) => { | ||
_defineProperty(this, "removeIgnored", _ref2 => { | ||
var from = _ref2.from, | ||
@@ -1046,3 +1075,3 @@ name = _ref2.name; | ||
var decorationsToClear = decorations.filter((_ref3) => { | ||
var decorationsToClear = decorations.filter(_ref3 => { | ||
var spec = _ref3.spec; | ||
@@ -1065,2 +1094,6 @@ return spec.name === name; | ||
_defineProperty(this, "setLastChangeFromAppend", () => { | ||
_classPrivateFieldSet(this, _lastChangeFromAppend, true); | ||
}); | ||
var mapper = createSuggesterMapper(); | ||
@@ -1251,3 +1284,3 @@ | ||
var invalid = decorations.filter((_ref4) => { | ||
var invalid = decorations.filter(_ref4 => { | ||
var from = _ref4.from, | ||
@@ -1289,3 +1322,3 @@ to = _ref4.to, | ||
return decorations.some((_ref6) => { | ||
var shouldIgnore = decorations.some(_ref6 => { | ||
var spec = _ref6.spec, | ||
@@ -1300,2 +1333,3 @@ from = _ref6.from; | ||
}); | ||
return shouldIgnore; | ||
} | ||
@@ -1474,6 +1508,2 @@ /** | ||
setLastChangeFromAppend() { | ||
_classPrivateFieldSet(this, _lastChangeFromAppend, true); | ||
} | ||
} | ||
@@ -1504,3 +1534,3 @@ | ||
var suggestPluginKey = /*#__PURE__*/new prosemirrorState.PluginKey('suggest'); | ||
var suggestPluginKey = new prosemirrorState.PluginKey('suggest'); | ||
@@ -1507,0 +1537,0 @@ /** |
@@ -436,3 +436,4 @@ import { TextSelection, Selection, PluginKey, Plugin } from 'prosemirror-state'; | ||
var _ref = updatedPrevious && updatedPrevious.query.full !== prev.query.full // has query changed | ||
? createInsertReason({ | ||
? // has query changed | ||
createInsertReason({ | ||
prev, | ||
@@ -1004,3 +1005,3 @@ next: updatedPrevious, | ||
_defineProperty(this, "addIgnored", (_ref) => { | ||
_defineProperty(this, "addIgnored", _ref => { | ||
var from = _ref.from, | ||
@@ -1033,3 +1034,3 @@ name = _ref.name, | ||
_defineProperty(this, "removeIgnored", (_ref2) => { | ||
_defineProperty(this, "removeIgnored", _ref2 => { | ||
var from = _ref2.from, | ||
@@ -1064,3 +1065,3 @@ name = _ref2.name; | ||
var decorationsToClear = decorations.filter((_ref3) => { | ||
var decorationsToClear = decorations.filter(_ref3 => { | ||
var spec = _ref3.spec; | ||
@@ -1083,2 +1084,6 @@ return spec.name === name; | ||
_defineProperty(this, "setLastChangeFromAppend", () => { | ||
_classPrivateFieldSet(this, _lastChangeFromAppend, true); | ||
}); | ||
var mapper = createSuggesterMapper(); | ||
@@ -1269,3 +1274,3 @@ | ||
var invalid = decorations.filter((_ref4) => { | ||
var invalid = decorations.filter(_ref4 => { | ||
var from = _ref4.from, | ||
@@ -1307,3 +1312,3 @@ to = _ref4.to, | ||
return decorations.some((_ref6) => { | ||
var shouldIgnore = decorations.some(_ref6 => { | ||
var spec = _ref6.spec, | ||
@@ -1318,2 +1323,3 @@ from = _ref6.from; | ||
}); | ||
return shouldIgnore; | ||
} | ||
@@ -1492,6 +1498,2 @@ /** | ||
setLastChangeFromAppend() { | ||
_classPrivateFieldSet(this, _lastChangeFromAppend, true); | ||
} | ||
} | ||
@@ -1522,3 +1524,3 @@ | ||
var suggestPluginKey = /*#__PURE__*/new PluginKey('suggest'); | ||
var suggestPluginKey = new PluginKey('suggest'); | ||
@@ -1525,0 +1527,0 @@ /** |
{ | ||
"name": "prosemirror-suggest", | ||
"version": "1.0.0-pr706.d0b3ea524", | ||
"version": "1.0.0", | ||
"description": "Primitives for building your prosemirror suggestion and autocomplete functionality", | ||
@@ -34,24 +34,24 @@ "homepage": "https://github.com/remirror/remirror/tree/HEAD/packages/prosemirror-suggest", | ||
"dependencies": { | ||
"@babel/runtime": "^7.12.13", | ||
"@remirror/core-constants": "1.0.0-pr706.d0b3ea524", | ||
"@remirror/core-helpers": "1.0.0-pr706.d0b3ea524", | ||
"escape-string-regexp": "^4.0.0", | ||
"type-fest": "^0.20.2" | ||
"@babel/runtime": "^7.13.10", | ||
"@remirror/core-constants": "1.0.0", | ||
"@remirror/core-helpers": "1.0.0", | ||
"@remirror/types": "0.1.0", | ||
"escape-string-regexp": "^4.0.0" | ||
}, | ||
"devDependencies": { | ||
"@types/prosemirror-keymap": "^1.0.4", | ||
"@types/prosemirror-model": "^1.11.2", | ||
"@types/prosemirror-model": "^1.13.0", | ||
"@types/prosemirror-state": "^1.2.6", | ||
"@types/prosemirror-view": "^1.17.1", | ||
"prosemirror-model": "^1.13.1", | ||
"prosemirror-model": "^1.14.2", | ||
"prosemirror-state": "^1.3.4", | ||
"prosemirror-view": "^1.17.3" | ||
"prosemirror-view": "^1.18.7" | ||
}, | ||
"peerDependencies": { | ||
"@types/prosemirror-model": "^1.7.0", | ||
"@types/prosemirror-state": "^1.2.5", | ||
"@types/prosemirror-view": "^1.15.0", | ||
"prosemirror-model": "^1.11.0", | ||
"prosemirror-state": "^1.3.3", | ||
"prosemirror-view": "^1.14.9" | ||
"@types/prosemirror-model": "^1", | ||
"@types/prosemirror-state": "^1", | ||
"@types/prosemirror-view": "^1", | ||
"prosemirror-model": "^1", | ||
"prosemirror-state": "^1", | ||
"prosemirror-view": "^1" | ||
}, | ||
@@ -58,0 +58,0 @@ "peerDependenciesMeta": { |
@@ -7,4 +7,4 @@ # prosemirror-suggest | ||
[version]: https://flat.badgen.net/npm/v/prosemirror-suggest/next | ||
[npm]: https://npmjs.com/package/prosemirror-suggest/v/next | ||
[version]: https://flat.badgen.net/npm/v/prosemirror-suggest | ||
[npm]: https://npmjs.com/package/prosemirror-suggest | ||
[license]: https://flat.badgen.net/badge/license/MIT/purple | ||
@@ -11,0 +11,0 @@ [size]: https://bundlephobia.com/result?p=prosemirror-suggest |
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
Deprecated
MaintenanceThe maintainer of the package marked it as deprecated. This could indicate that a single version should not be used, or that the package is no longer maintained and any new vulnerabilities will not be fixed.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
7943
0
0
300029
16
+ Added@remirror/types@0.1.0
+ Added@linaria/core@3.0.0-beta.4(transitive)
+ Added@remirror/core-constants@1.0.0(transitive)
+ Added@remirror/core-helpers@1.0.0(transitive)
+ Added@remirror/types@0.1.0(transitive)
+ Addedtype-fest@1.4.0(transitive)
- Removedtype-fest@^0.20.2
- Removed@linaria/core@3.0.0-beta.22(transitive)
- Removed@linaria/logger@3.0.0-beta.20(transitive)
- Removed@linaria/utils@3.0.0-beta.20(transitive)
- Removed@remirror/core-constants@1.0.0-pr706.d0b3ea524(transitive)
- Removed@remirror/core-helpers@1.0.0-pr706.d0b3ea524(transitive)
- Removeddebug@4.4.0(transitive)
- Removedms@2.1.3(transitive)
- Removedpicocolors@1.1.1(transitive)
- Removedtype-fest@0.20.2(transitive)
Updated@babel/runtime@^7.13.10
Updated@remirror/core-helpers@1.0.0