@depup/prosemirror-state 1.4.4-depup.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.tern-project +8 -0
- package/CHANGELOG.md +296 -0
- package/CONTRIBUTING.md +104 -0
- package/LICENSE +19 -0
- package/README.md +33 -0
- package/changes.json +18 -0
- package/dist/index.cjs +884 -0
- package/dist/index.d.cts +709 -0
- package/dist/index.d.ts +709 -0
- package/dist/index.js +1002 -0
- package/package.json +67 -0
- package/src/README.md +42 -0
- package/src/index.ts +7 -0
- package/src/plugin.ts +142 -0
- package/src/selection.ts +462 -0
- package/src/state.ts +266 -0
- package/src/transaction.ts +215 -0
package/.tern-project
ADDED
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,296 @@
|
|
|
1
|
+
## 1.4.4 (2025-10-23)
|
|
2
|
+
|
|
3
|
+
### Bug fixes
|
|
4
|
+
|
|
5
|
+
Avoid a problematic TypeScript compilation issue of `Selection.visible` in some configurations.
|
|
6
|
+
|
|
7
|
+
Fix an issue in `insertText` where it would always clear non-empty selections, even when not near the inserted text.
|
|
8
|
+
|
|
9
|
+
## 1.4.3 (2023-05-17)
|
|
10
|
+
|
|
11
|
+
### Bug fixes
|
|
12
|
+
|
|
13
|
+
Include CommonJS type declarations in the package to please new TypeScript resolution settings.
|
|
14
|
+
|
|
15
|
+
## 1.4.2 (2022-10-17)
|
|
16
|
+
|
|
17
|
+
### Bug fixes
|
|
18
|
+
|
|
19
|
+
Make sure the `this` bindings in editor props defined as part of a plugin spec refers to the proper plugin type.
|
|
20
|
+
|
|
21
|
+
## 1.4.1 (2022-06-23)
|
|
22
|
+
|
|
23
|
+
### Bug fixes
|
|
24
|
+
|
|
25
|
+
Make the `SelectionRange` constructor public in the types.
|
|
26
|
+
|
|
27
|
+
## 1.4.0 (2022-05-30)
|
|
28
|
+
|
|
29
|
+
### Bug fixes
|
|
30
|
+
|
|
31
|
+
Creating a `TextSelection` with endpoints that don't point at inline positions now emits a warning. (It is technically an error, but crashing on it might be too disruptive for some existing setups.)
|
|
32
|
+
|
|
33
|
+
### New features
|
|
34
|
+
|
|
35
|
+
Include TypeScript type declarations.
|
|
36
|
+
|
|
37
|
+
## 1.3.4 (2021-01-20)
|
|
38
|
+
|
|
39
|
+
### Bug fixes
|
|
40
|
+
|
|
41
|
+
Remove (broken, poorly conceptualized) `schema` option to `EditorState.reconfigure`.
|
|
42
|
+
|
|
43
|
+
## 1.3.3 (2020-03-18)
|
|
44
|
+
|
|
45
|
+
### Bug fixes
|
|
46
|
+
|
|
47
|
+
When deleting a whole-document-selection causes default content to be generated, make sure the selection is moved to the start of the document.
|
|
48
|
+
|
|
49
|
+
## 1.3.2 (2019-11-20)
|
|
50
|
+
|
|
51
|
+
### Bug fixes
|
|
52
|
+
|
|
53
|
+
Rename ES module files to use a .js extension, since Webpack gets confused by .mjs
|
|
54
|
+
|
|
55
|
+
## 1.3.1 (2019-11-19)
|
|
56
|
+
|
|
57
|
+
### Bug fixes
|
|
58
|
+
|
|
59
|
+
The file referred to in the package's `module` field now is compiled down to ES5.
|
|
60
|
+
|
|
61
|
+
## 1.3.0 (2019-11-08)
|
|
62
|
+
|
|
63
|
+
### New features
|
|
64
|
+
|
|
65
|
+
Add a `module` field to package json file.
|
|
66
|
+
|
|
67
|
+
## 1.2.4 (2019-08-12)
|
|
68
|
+
|
|
69
|
+
### Bug fixes
|
|
70
|
+
|
|
71
|
+
`Transaction.setSelection` now immediately checks whether the given selection points into the proper document, rather than silently accepting an invalid selection.
|
|
72
|
+
|
|
73
|
+
## 1.2.3 (2019-05-08)
|
|
74
|
+
|
|
75
|
+
### Bug fixes
|
|
76
|
+
|
|
77
|
+
The [`insertText`](https://prosemirror.net/docs/ref/#state.Transaction.insertText) method now collapses the selection to the end of the inserted text, even when given explicit start/end positions.
|
|
78
|
+
|
|
79
|
+
## 1.2.2 (2018-07-23)
|
|
80
|
+
|
|
81
|
+
### Bug fixes
|
|
82
|
+
|
|
83
|
+
The `"appendedTransaction"` meta property on appended transactions now points to the root transaction instead of at the transaction itself, which it accidentally did before.
|
|
84
|
+
|
|
85
|
+
## 1.2.1 (2018-07-02)
|
|
86
|
+
|
|
87
|
+
### Bug fixes
|
|
88
|
+
|
|
89
|
+
Fixes a bug in the default implementation of `Selection.getBookmark`.
|
|
90
|
+
|
|
91
|
+
## 1.2.0 (2018-04-05)
|
|
92
|
+
|
|
93
|
+
### New features
|
|
94
|
+
|
|
95
|
+
[`EditorState.create`](https://prosemirror.net/docs/ref/#state.EditorState^create) now accepts a `storedMark` option to set the state's stored marks.
|
|
96
|
+
|
|
97
|
+
[`EditorState.toJSON`](https://prosemirror.net/docs/ref/#state.EditorState.toJSON) and [`fromJSON`](https://prosemirror.net/docs/ref/#state.EditorState^fromJSON) persist the set of stored marks, when available.
|
|
98
|
+
|
|
99
|
+
## 1.1.1 (2018-03-15)
|
|
100
|
+
|
|
101
|
+
### Bug fixes
|
|
102
|
+
|
|
103
|
+
Throw errors, rather than constructing invalid objects, when deserializing from invalid JSON data.
|
|
104
|
+
|
|
105
|
+
## 1.1.0 (2018-01-22)
|
|
106
|
+
|
|
107
|
+
### New features
|
|
108
|
+
|
|
109
|
+
[`EditorState.toJSON`](https://prosemirror.net/docs/ref/#state.EditorState.toJSON) now accepts a string or number as argument to support the way `JSON.stringify` can call it.
|
|
110
|
+
|
|
111
|
+
## 1.0.2 (2017-12-13)
|
|
112
|
+
|
|
113
|
+
### Bug fixes
|
|
114
|
+
|
|
115
|
+
Fix issue where a character might be selected after overwriting across block nodes.
|
|
116
|
+
|
|
117
|
+
Make sure `replaceSelectionWith` doesn't needlessly copy unmarked nodes.
|
|
118
|
+
|
|
119
|
+
## 1.0.1 (2017-11-01)
|
|
120
|
+
|
|
121
|
+
### Bug fixes
|
|
122
|
+
|
|
123
|
+
Typing over marked text now properly makes the new text inherit the old text's marks.
|
|
124
|
+
|
|
125
|
+
## 0.21.0 (2017-05-03)
|
|
126
|
+
|
|
127
|
+
### Breaking changes
|
|
128
|
+
|
|
129
|
+
[`Selection.atStart`](https://prosemirror.net/docs/ref/version/0.21.0.html#state.Selection^atStart), and [`atEnd`](https://prosemirror.net/docs/ref/version/0.21.0.html#state.Selection^atEnd) no longer take a second `textOnly` parameter.
|
|
130
|
+
|
|
131
|
+
### New features
|
|
132
|
+
|
|
133
|
+
[`Selection.near`](https://prosemirror.net/docs/ref/version/0.21.0.html#state.Selection^near), [`atStart`](https://prosemirror.net/docs/ref/version/0.21.0.html#state.Selection^atStart), and [`atEnd`](https://prosemirror.net/docs/ref/version/0.21.0.html#state.Selection^atEnd) will now fall back to returning an [`AllSelection`](https://prosemirror.net/docs/ref/version/0.21.0.html#state.AllSelection) when unable to find a valid selection. This removes the (undocumented) requirement that documents always contain a valid selection position (though you'll probably still want to maintain this for practical UI reasons).
|
|
134
|
+
|
|
135
|
+
## 0.20.0 (2017-04-03)
|
|
136
|
+
|
|
137
|
+
### Breaking changes
|
|
138
|
+
|
|
139
|
+
[`Selection.near`](https://prosemirror.net/docs/ref/version/0.20.0.html#state.Selection^near) no longer accepts a `textOnly` parameter.
|
|
140
|
+
|
|
141
|
+
### Bug fixes
|
|
142
|
+
|
|
143
|
+
[`TextSelection.between`](https://prosemirror.net/docs/ref/version/0.20.0.html#state.TextSelection^between) may now return a node selection when the document does not contain a valid cursor position.
|
|
144
|
+
|
|
145
|
+
### New features
|
|
146
|
+
|
|
147
|
+
[`Selection`](https://prosemirror.net/docs/ref/version/0.20.0.html#model.Selection) objects now implement a [`content`](https://prosemirror.net/docs/ref/version/0.20.0.html#model.Selection.content) method that returns their content. This is used to determine what ends up on the clipboard when the selection is copied or dragged.
|
|
148
|
+
|
|
149
|
+
Selections may now specify multiple [ranges](https://prosemirror.net/docs/ref/version/0.20.0.html#state.Selection.ranges) that they cover, to generalize to more types of selections. The [`Selection`](https://prosemirror.net/docs/ref/version/0.20.0.html#state.Selection) superclass constructor takes an array of [ranges](https://prosemirror.net/docs/ref/version/0.20.0.html#state.SelectionRange) as optional third argument.
|
|
150
|
+
|
|
151
|
+
Selections gained new methods [`replace`](https://prosemirror.net/docs/ref/version/0.20.0.html#state.Selection.replace) and [`replaceWith`](https://prosemirror.net/docs/ref/version/0.20.0.html#state.Selection.replaceWith) to provide subclasses more control over how selections of that type respond to being deleted or overwritten.
|
|
152
|
+
|
|
153
|
+
Selections have a new method [`getBookmark`](https://prosemirror.net/docs/ref/version/0.20.0.html#state.Selection.getBookmark) that custom selection classes can implement to allow the undo history to accurately store and restore them.
|
|
154
|
+
|
|
155
|
+
The new selection class [`AllSelection`](https://prosemirror.net/docs/ref/version/0.20.0.html#state.AllSelection) can be used to select the entire document.
|
|
156
|
+
|
|
157
|
+
## 0.19.1 (2017-03-17)
|
|
158
|
+
|
|
159
|
+
### Bug fixes
|
|
160
|
+
|
|
161
|
+
Fix an issue where `ensureMarks` would fail to reset the marks to the empty set when turning off the last mark.
|
|
162
|
+
|
|
163
|
+
## 0.19.0 (2017-03-16)
|
|
164
|
+
|
|
165
|
+
### Breaking changes
|
|
166
|
+
|
|
167
|
+
`Selection.between` is now called [`TextSelection.between`](state.TextSelection^between), and only returns text selections.
|
|
168
|
+
|
|
169
|
+
The JSON representation of selections changed. [`fromJSON`](https://prosemirror.net/docs/ref/version/0.19.0.html#state.Selection^fromJSON) will continue to understand the old representation, but if your own code touches the JSON data, you'll have to adjust it.
|
|
170
|
+
|
|
171
|
+
All `Selection` objects now have [`$head`](https://prosemirror.net/docs/ref/version/0.19.0.html#state.Selection.$head)/[`$anchor`](https://prosemirror.net/docs/ref/version/0.19.0.html#state.Selection.$anchor) properties, so those can no longer be used to recognize text selections (use [`$cursor`](https://prosemirror.net/docs/ref/version/0.19.0.html#state.TextSelection.$cursor) or `instanceof`).
|
|
172
|
+
|
|
173
|
+
### New features
|
|
174
|
+
|
|
175
|
+
It is now possible to write your own [`Selection`](https://prosemirror.net/docs/ref/version/0.19.0.html#state.Selection) subclasses and set the editor selection to an instance of them (provided you implement all required methods and register them with [`Selection.jsonID`](https://prosemirror.net/docs/ref/version/0.19.0.html#state.Selection^jsonID)).
|
|
176
|
+
|
|
177
|
+
Text selections now have a [`$cursor`](https://prosemirror.net/docs/ref/version/0.19.0.html#state.TextSelection.$cursor) getter which returns a position only if this is a cursor selection.
|
|
178
|
+
|
|
179
|
+
The new [`Transaction.ensureMarks`](https://prosemirror.net/docs/ref/version/0.19.0.html#state.Transaction.ensureMarks) method makes it easier to ensure given set of active marks without needlessly setting `storedMarks`.
|
|
180
|
+
|
|
181
|
+
## 0.18.0 (2017-02-24)
|
|
182
|
+
|
|
183
|
+
### Breaking changes
|
|
184
|
+
|
|
185
|
+
Plugin objects now store their spec under a [`spec`](https://prosemirror.net/docs/ref/version/0.18.0.html#state.PluginSpec.spec) instead of an `options` property. The `options` property still works with a warning in this release.
|
|
186
|
+
|
|
187
|
+
## 0.17.1 (2017-02-08)
|
|
188
|
+
|
|
189
|
+
### Bug fixes
|
|
190
|
+
|
|
191
|
+
[`Transaction.scrolledIntoView`](https://prosemirror.net/docs/ref/version/0.17.0.html##state.Transaction.scrolledIntoView) no longer always returns true.
|
|
192
|
+
|
|
193
|
+
[`Selection.near`](https://prosemirror.net/docs/ref/version/0.17.0.html#state.Selection^neard) now takes a third `textOnly` argument, as the docs already claimed.
|
|
194
|
+
|
|
195
|
+
## 0.17.0 (2017-01-05)
|
|
196
|
+
|
|
197
|
+
### Breaking changes
|
|
198
|
+
|
|
199
|
+
The way state is updated was changed. Instead of applying an action (a raw object with a `type` property), it is now done by [applying](https://prosemirror.net/docs/ref/version/0.17.0.html#state.EditorState.apply) a [`Transaction`](https://prosemirror.net/docs/ref/version/0.17.0.html#state.Transaction).
|
|
200
|
+
|
|
201
|
+
The `EditorTransform` class was renamed [`Transaction`](https://prosemirror.net/docs/ref/version/0.17.0.html#state.Transaction), and extended to allow changing the set of stored marks and attaching custom metadata.
|
|
202
|
+
|
|
203
|
+
### New features
|
|
204
|
+
|
|
205
|
+
Plugins now accept a [`filterTransaction`](https://prosemirror.net/docs/ref/version/0.17.0.html#state.Plugin.constructor^options.filterTransaction) option that can be used to filter out transactions as they come in.
|
|
206
|
+
|
|
207
|
+
Plugins also got an [`appendTransaction`](https://prosemirror.net/docs/ref/version/0.17.0.html#state.Plugin.constructor^options.appendTransaction) option making it possible to follow up transactions with another transaction.
|
|
208
|
+
|
|
209
|
+
## 0.16.0 (2016-12-23)
|
|
210
|
+
|
|
211
|
+
### New features
|
|
212
|
+
|
|
213
|
+
Plugins now take a [`view` option](https://prosemirror.net/docs/ref/version/0.16.0.html#state.Plugin.constructor^options.view) that can be used to interact with the [editor view](https://prosemirror.net/docs/ref/version/0.16.0.html#view.EditorView).
|
|
214
|
+
|
|
215
|
+
## 0.15.0 (2016-12-10)
|
|
216
|
+
|
|
217
|
+
### Breaking changes
|
|
218
|
+
|
|
219
|
+
Selection actions no longer scroll the new selection into view by default (they never were supposed to, but due to a bug they did). Add a `scrollIntoView` property to the action to get this behavior.
|
|
220
|
+
|
|
221
|
+
## 0.14.0 (2016-11-28)
|
|
222
|
+
|
|
223
|
+
### New features
|
|
224
|
+
|
|
225
|
+
[Selection actions](https://prosemirror.net/docs/ref/version/0.14.0.html#state.SelectionAction) now have a `time` field and an (optional) `origin` field.
|
|
226
|
+
|
|
227
|
+
## 0.13.0 (2016-11-11)
|
|
228
|
+
|
|
229
|
+
### Breaking changes
|
|
230
|
+
|
|
231
|
+
[`EditorTransform.replaceSelection`](https://prosemirror.net/docs/ref/version/0.13.0.html#state.EditorTransform.replaceSelection) now takes a [slice](https://prosemirror.net/docs/ref/version/0.13.0.html#model.Slice), no longer a node. The new [`replaceSelectionWith`](https://prosemirror.net/docs/ref/version/0.13.0.html#state.EditorTransform.replaceSelectionWith) method should be used to replace the selection with a node. Until the next release, calling it the old way will still work and emit a warning.
|
|
232
|
+
|
|
233
|
+
### Bug fixes
|
|
234
|
+
|
|
235
|
+
The documentation for [`applyAction`](https://prosemirror.net/docs/ref/version/0.13.0.html#state.StateField.applyAction) now actually reflects the arguments this method is given.
|
|
236
|
+
|
|
237
|
+
### New features
|
|
238
|
+
|
|
239
|
+
A state field's [`applyAction`](https://prosemirror.net/docs/ref/version/0.13.0.html#state.StateField.applyAction) method is now passed the previous state as 4th argument, so that it has access to the new doc and selection.
|
|
240
|
+
|
|
241
|
+
[`EditorTransform.replaceSelection`](https://prosemirror.net/docs/ref/version/0.13.0.html#state.EditorTransform.replaceSelection) now accepts a slice (or, as before, as a node), and uses a revised algorithm, relying on the [`defining`](https://prosemirror.net/docs/ref/version/0.13.0.html#model.NodeSpec.defining) node flag.
|
|
242
|
+
|
|
243
|
+
The [`TextSelection`](https://prosemirror.net/docs/ref/version/0.13.0.html#state.TextSelection) and [`NodeSelection`](https://prosemirror.net/docs/ref/version/0.13.0.html#state.NodeSelection) classes now have a static [`create`](https://prosemirror.net/docs/ref/version/0.13.0.html#state.TextSelection^create) convenience method for creating selections from unresolved positions.
|
|
244
|
+
|
|
245
|
+
Allow [transform actions](https://prosemirror.net/docs/ref/version/0.13.0.html#state.TransformAction) to be extended during dispatch using [`extendTransformAction`](https://prosemirror.net/docs/ref/version/0.13.0.html#state.extendTransformAction). Introduce [`sealed`](https://prosemirror.net/docs/ref/version/0.13.0.html#state.TransformAction.sealed) flag to indicate when this is not safe.
|
|
246
|
+
|
|
247
|
+
A new utility function [`NodeSelection.isSelectable`](https://prosemirror.net/docs/ref/version/0.13.0.html#state.NodeSelection.isSelectable) can be used to test whether a node can be the target of a node selection.
|
|
248
|
+
|
|
249
|
+
## 0.12.0 (2016-10-21)
|
|
250
|
+
|
|
251
|
+
### Breaking changes
|
|
252
|
+
|
|
253
|
+
The interace to
|
|
254
|
+
[`EditorState.toJSON`](https://prosemirror.net/docs/ref/version/0.12.0.html#state.EditorState.toJSON) and
|
|
255
|
+
[`EditorState.fromJSON`](https://prosemirror.net/docs/ref/version/0.12.0.html#state.EditorState.fromJSON) has changed.
|
|
256
|
+
|
|
257
|
+
The way plugins declare their [state
|
|
258
|
+
field](https://prosemirror.net/docs/ref/version/0.12.0.html#state.Plugin.constructor.options.state) has changed. Only one
|
|
259
|
+
state field per plugin is supported, and state fields no longer have
|
|
260
|
+
hard-coded names. [`Plugin.getState`](https://prosemirror.net/docs/ref/version/0.12.0.html#state.Plugin.getState) is the
|
|
261
|
+
way to access plugin state now.
|
|
262
|
+
|
|
263
|
+
Plugin dependencies are no longer supported.
|
|
264
|
+
|
|
265
|
+
`Plugin.reconfigure` is gone. Plugins are now always created
|
|
266
|
+
with [`new Plugin`](https://prosemirror.net/docs/ref/version/0.12.0.html#state.Plugin.constructor).
|
|
267
|
+
|
|
268
|
+
Plugins no longer have a `config` field.
|
|
269
|
+
|
|
270
|
+
### Bug fixes
|
|
271
|
+
|
|
272
|
+
Node selections are now properly dropped when mapped over a
|
|
273
|
+
change that replaces their nodes.
|
|
274
|
+
|
|
275
|
+
### New features
|
|
276
|
+
|
|
277
|
+
[Plugin keys](https://prosemirror.net/docs/ref/version/0.12.0.html#state.PluginKey) can now be used to find
|
|
278
|
+
plugins by identity.
|
|
279
|
+
|
|
280
|
+
[Transform actions](https://prosemirror.net/docs/ref/version/0.12.0.html#state.TransformAction) now have a
|
|
281
|
+
`time` field containing the timestamp when the change was made.
|
|
282
|
+
|
|
283
|
+
## 0.11.0 (2016-09-21)
|
|
284
|
+
|
|
285
|
+
### Breaking changes
|
|
286
|
+
|
|
287
|
+
New module inheriting the [`Selection`](https://prosemirror.net/docs/ref/version/0.11.0.html#state.Selection) and
|
|
288
|
+
[`EditorTransform`](https://prosemirror.net/docs/ref/version/0.11.0.html#state.EditorTransform) abstraction, along with
|
|
289
|
+
the persistent [state](https://prosemirror.net/docs/ref/version/0.11.0.html#state.EditorState) value that is now separate
|
|
290
|
+
from the display logic, and the [plugin](https://prosemirror.net/docs/ref/version/0.11.0.html#state.Plugin) system.
|
|
291
|
+
|
|
292
|
+
`Selection.findAtStart`/`End` was renamed to
|
|
293
|
+
[`Selection.atStart`](https://prosemirror.net/docs/ref/version/0.11.0.html#state.Selection^atStart)/[`End`](https://prosemirror.net/docs/ref/version/0.11.0.html#state.Selection^atEnd),
|
|
294
|
+
and `Selection.findNear` to
|
|
295
|
+
[`Selection.near`](https://prosemirror.net/docs/ref/version/0.11.0.html#state.Selection^near).
|
|
296
|
+
|
package/CONTRIBUTING.md
ADDED
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
# How to contribute
|
|
2
|
+
|
|
3
|
+
- [Getting help](#getting-help)
|
|
4
|
+
- [Submitting bug reports](#submitting-bug-reports)
|
|
5
|
+
- [Contributing code](#contributing-code)
|
|
6
|
+
|
|
7
|
+
## Getting help
|
|
8
|
+
|
|
9
|
+
Community discussion, questions, and informal bug reporting is done on the
|
|
10
|
+
[discuss.ProseMirror forum](http://discuss.prosemirror.net).
|
|
11
|
+
|
|
12
|
+
## Submitting bug reports
|
|
13
|
+
|
|
14
|
+
Report bugs on the
|
|
15
|
+
[GitHub issue tracker](http://github.com/prosemirror/prosemirror/issues).
|
|
16
|
+
Before reporting a bug, please read these pointers.
|
|
17
|
+
|
|
18
|
+
- The issue tracker is for *bugs*, not requests for help. Questions
|
|
19
|
+
should be asked on the [forum](http://discuss.prosemirror.net).
|
|
20
|
+
|
|
21
|
+
- Include information about the version of the code that exhibits the
|
|
22
|
+
problem. For browser-related issues, include the browser and browser
|
|
23
|
+
version on which the problem occurred.
|
|
24
|
+
|
|
25
|
+
- Mention very precisely what went wrong. "X is broken" is not a good
|
|
26
|
+
bug report. What did you expect to happen? What happened instead?
|
|
27
|
+
Describe the exact steps a maintainer has to take to make the
|
|
28
|
+
problem occur. A screencast can be useful, but is no substitute for
|
|
29
|
+
a textual description.
|
|
30
|
+
|
|
31
|
+
- A great way to make it easy to reproduce your problem, if it can not
|
|
32
|
+
be trivially reproduced on the website demos, is to submit a script
|
|
33
|
+
that triggers the issue.
|
|
34
|
+
|
|
35
|
+
## Contributing code
|
|
36
|
+
|
|
37
|
+
If you want to make a change that involves a significant overhaul of
|
|
38
|
+
the code or introduces a user-visible new feature, create an
|
|
39
|
+
[RFC](https://github.com/ProseMirror/rfcs/) first with your proposal.
|
|
40
|
+
|
|
41
|
+
- Make sure you have a [GitHub Account](https://github.com/signup/free)
|
|
42
|
+
|
|
43
|
+
- Fork the relevant repository
|
|
44
|
+
([how to fork a repo](https://help.github.com/articles/fork-a-repo))
|
|
45
|
+
|
|
46
|
+
- Create a local checkout of the code. You can use the
|
|
47
|
+
[main repository](https://github.com/prosemirror/prosemirror) to
|
|
48
|
+
easily check out all core modules.
|
|
49
|
+
|
|
50
|
+
- Make your changes, and commit them
|
|
51
|
+
|
|
52
|
+
- Follow the code style of the rest of the project (see below). Run
|
|
53
|
+
`npm run lint` (in the main repository checkout) to make sure that
|
|
54
|
+
the linter is happy.
|
|
55
|
+
|
|
56
|
+
- If your changes are easy to test or likely to regress, add tests in
|
|
57
|
+
the relevant `test/` directory. Either put them in an existing
|
|
58
|
+
`test-*.js` file, if they fit there, or add a new file.
|
|
59
|
+
|
|
60
|
+
- Make sure all tests pass. Run `npm run test` to verify tests pass
|
|
61
|
+
(you will need Node.js v6+).
|
|
62
|
+
|
|
63
|
+
- Submit a pull request ([how to create a pull request](https://help.github.com/articles/fork-a-repo)).
|
|
64
|
+
Don't put more than one feature/fix in a single pull request.
|
|
65
|
+
|
|
66
|
+
By contributing code to ProseMirror you
|
|
67
|
+
|
|
68
|
+
- Agree to license the contributed code under the project's [MIT
|
|
69
|
+
license](https://github.com/ProseMirror/prosemirror/blob/master/LICENSE).
|
|
70
|
+
|
|
71
|
+
- Confirm that you have the right to contribute and license the code
|
|
72
|
+
in question. (Either you hold all rights on the code, or the rights
|
|
73
|
+
holder has explicitly granted the right to use it like this,
|
|
74
|
+
through a compatible open source license or through a direct
|
|
75
|
+
agreement with you.)
|
|
76
|
+
|
|
77
|
+
### Coding standards
|
|
78
|
+
|
|
79
|
+
- ES6 syntax, targeting an ES5 runtime (i.e. don't use library
|
|
80
|
+
elements added by ES6, don't use ES7/ES.next syntax).
|
|
81
|
+
|
|
82
|
+
- 2 spaces per indentation level, no tabs.
|
|
83
|
+
|
|
84
|
+
- No semicolons except when necessary.
|
|
85
|
+
|
|
86
|
+
- Follow the surrounding code when it comes to spacing, brace
|
|
87
|
+
placement, etc.
|
|
88
|
+
|
|
89
|
+
- Brace-less single-statement bodies are encouraged (whenever they
|
|
90
|
+
don't impact readability).
|
|
91
|
+
|
|
92
|
+
- [getdocs](https://github.com/marijnh/getdocs)-style doc comments
|
|
93
|
+
above items that are part of the public API.
|
|
94
|
+
|
|
95
|
+
- When documenting non-public items, you can put the type after a
|
|
96
|
+
single colon, so that getdocs doesn't pick it up and add it to the
|
|
97
|
+
API reference.
|
|
98
|
+
|
|
99
|
+
- The linter (`npm run lint`) complains about unused variables and
|
|
100
|
+
functions. Prefix their names with an underscore to muffle it.
|
|
101
|
+
|
|
102
|
+
- ProseMirror does *not* follow JSHint or JSLint prescribed style.
|
|
103
|
+
Patches that try to 'fix' code to pass one of these linters will not
|
|
104
|
+
be accepted.
|
package/LICENSE
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
Copyright (C) 2015-2017 by Marijn Haverbeke <marijn@haverbeke.berlin> and others
|
|
2
|
+
|
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
4
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
5
|
+
in the Software without restriction, including without limitation the rights
|
|
6
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
7
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
8
|
+
furnished to do so, subject to the following conditions:
|
|
9
|
+
|
|
10
|
+
The above copyright notice and this permission notice shall be included in
|
|
11
|
+
all copies or substantial portions of the Software.
|
|
12
|
+
|
|
13
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
14
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
15
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
16
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
17
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
18
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
19
|
+
THE SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# @depup/prosemirror-state
|
|
2
|
+
|
|
3
|
+
> Dependency-bumped version of [prosemirror-state](https://www.npmjs.com/package/prosemirror-state)
|
|
4
|
+
|
|
5
|
+
Generated by [DepUp](https://github.com/depup/npm) -- all production
|
|
6
|
+
dependencies bumped to latest versions.
|
|
7
|
+
|
|
8
|
+
## Installation
|
|
9
|
+
|
|
10
|
+
```bash
|
|
11
|
+
npm install @depup/prosemirror-state
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
| Field | Value |
|
|
15
|
+
|-------|-------|
|
|
16
|
+
| Original | [prosemirror-state](https://www.npmjs.com/package/prosemirror-state) @ 1.4.4 |
|
|
17
|
+
| Processed | 2026-03-18 |
|
|
18
|
+
| Smoke test | passed |
|
|
19
|
+
| Deps updated | 3 |
|
|
20
|
+
|
|
21
|
+
## Dependency Changes
|
|
22
|
+
|
|
23
|
+
| Dependency | From | To |
|
|
24
|
+
|------------|------|-----|
|
|
25
|
+
| prosemirror-model | ^1.0.0 | ^1.25.4 |
|
|
26
|
+
| prosemirror-transform | ^1.0.0 | ^1.11.0 |
|
|
27
|
+
| prosemirror-view | ^1.27.0 | ^1.41.7 |
|
|
28
|
+
|
|
29
|
+
---
|
|
30
|
+
|
|
31
|
+
Source: https://github.com/depup/npm | Original: https://www.npmjs.com/package/prosemirror-state
|
|
32
|
+
|
|
33
|
+
License inherited from the original package.
|
package/changes.json
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
{
|
|
2
|
+
"bumped": {
|
|
3
|
+
"prosemirror-model": {
|
|
4
|
+
"from": "^1.0.0",
|
|
5
|
+
"to": "^1.25.4"
|
|
6
|
+
},
|
|
7
|
+
"prosemirror-transform": {
|
|
8
|
+
"from": "^1.0.0",
|
|
9
|
+
"to": "^1.11.0"
|
|
10
|
+
},
|
|
11
|
+
"prosemirror-view": {
|
|
12
|
+
"from": "^1.27.0",
|
|
13
|
+
"to": "^1.41.7"
|
|
14
|
+
}
|
|
15
|
+
},
|
|
16
|
+
"timestamp": "2026-03-18T22:40:52.551Z",
|
|
17
|
+
"totalUpdated": 3
|
|
18
|
+
}
|