@prosekit/extensions 0.7.22 → 0.7.24

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.
Files changed (38) hide show
  1. package/dist/_tsup-dts-rollup.d.ts +38 -15
  2. package/dist/{chunk-4WHSS2ZE.js → chunk-6UYLCVBX.js} +2 -2
  3. package/dist/{chunk-LAQZC3ZM.js → chunk-BV3SHIMW.js} +1 -2
  4. package/dist/{chunk-RE23OQPF.js → chunk-D54VSLLS.js} +2 -2
  5. package/dist/{chunk-HHZL6V6B.js → chunk-HFAZX2J3.js} +27 -16
  6. package/dist/prosekit-extensions-autocomplete.js +13 -11
  7. package/dist/prosekit-extensions-blockquote.js +14 -6
  8. package/dist/prosekit-extensions-bold.js +15 -5
  9. package/dist/prosekit-extensions-code-block.js +22 -9
  10. package/dist/prosekit-extensions-code.js +15 -5
  11. package/dist/prosekit-extensions-commit.js +8 -5
  12. package/dist/prosekit-extensions-drop-cursor.d.ts +2 -2
  13. package/dist/prosekit-extensions-drop-cursor.js +3 -1
  14. package/dist/prosekit-extensions-enter-rule.js +1 -1
  15. package/dist/prosekit-extensions-file.d.ts +5 -5
  16. package/dist/prosekit-extensions-file.js +23 -25
  17. package/dist/prosekit-extensions-gap-cursor.js +3 -1
  18. package/dist/prosekit-extensions-heading.js +10 -7
  19. package/dist/prosekit-extensions-horizontal-rule.js +19 -6
  20. package/dist/prosekit-extensions-image.js +10 -3
  21. package/dist/prosekit-extensions-input-rule.js +1 -1
  22. package/dist/prosekit-extensions-italic.js +15 -5
  23. package/dist/prosekit-extensions-link.js +3 -3
  24. package/dist/prosekit-extensions-list.d.ts +1 -0
  25. package/dist/prosekit-extensions-list.js +83 -13
  26. package/dist/prosekit-extensions-loro.d.ts +4 -4
  27. package/dist/prosekit-extensions-loro.js +33 -13
  28. package/dist/prosekit-extensions-mark-rule.js +1 -1
  29. package/dist/prosekit-extensions-mod-click-prevention.js +8 -2
  30. package/dist/prosekit-extensions-placeholder.js +16 -7
  31. package/dist/prosekit-extensions-readonly.js +4 -1
  32. package/dist/prosekit-extensions-search.js +7 -4
  33. package/dist/prosekit-extensions-strike.js +3 -3
  34. package/dist/prosekit-extensions-table.d.ts +1 -1
  35. package/dist/prosekit-extensions-table.js +1 -1
  36. package/dist/prosekit-extensions-virtual-selection.js +8 -4
  37. package/dist/prosekit-extensions-yjs.js +14 -9
  38. package/package.json +16 -15
@@ -1,15 +1,15 @@
1
1
  import {
2
2
  defineMarkInputRule
3
- } from "./chunk-LAQZC3ZM.js";
3
+ } from "./chunk-BV3SHIMW.js";
4
4
 
5
5
  // src/strike/index.ts
6
6
  import {
7
+ canUseRegexLookbehind,
7
8
  defineCommands,
8
9
  defineKeymap,
9
10
  defineMarkSpec,
10
- union,
11
11
  toggleMark,
12
- canUseRegexLookbehind
12
+ union
13
13
  } from "@prosekit/core";
14
14
  function defineStrikeSpec() {
15
15
  return defineMarkSpec({
@@ -22,5 +22,5 @@ export { TableCellSpecExtension } from './_tsup-dts-rollup.js';
22
22
  export { TableHeaderCellSpecExtension } from './_tsup-dts-rollup.js';
23
23
  export { TableRowSpecExtension } from './_tsup-dts-rollup.js';
24
24
  export { TableSpecExtension } from './_tsup-dts-rollup.js';
25
- export { isCellSelection } from './_tsup-dts-rollup.js';
26
25
  export { findTable } from './_tsup-dts-rollup.js';
26
+ export { isCellSelection } from './_tsup-dts-rollup.js';
@@ -14,7 +14,7 @@ import {
14
14
  selectTableCell,
15
15
  selectTableColumn,
16
16
  selectTableRow
17
- } from "./chunk-HHZL6V6B.js";
17
+ } from "./chunk-HFAZX2J3.js";
18
18
  export {
19
19
  defineTable,
20
20
  defineTableCellSpec,
@@ -1,10 +1,15 @@
1
1
  // src/virtual-selection/index.ts
2
- import { definePlugin } from "@prosekit/core";
2
+ import {
3
+ definePlugin
4
+ } from "@prosekit/core";
3
5
  import {
4
6
  PluginKey,
5
7
  ProseMirrorPlugin
6
8
  } from "@prosekit/pm/state";
7
- import { Decoration, DecorationSet } from "@prosekit/pm/view";
9
+ import {
10
+ Decoration,
11
+ DecorationSet
12
+ } from "@prosekit/pm/view";
8
13
  function defineVirtualSelection() {
9
14
  return definePlugin(virtualSelectionPlugin);
10
15
  }
@@ -23,8 +28,7 @@ var virtualSelectionPlugin = new ProseMirrorPlugin({
23
28
  state: {
24
29
  init: () => false,
25
30
  apply: (tr, value) => {
26
- var _a;
27
- return (_a = getFocusMeta(tr)) != null ? _a : value;
31
+ return getFocusMeta(tr) ?? value;
28
32
  }
29
33
  },
30
34
  props: {
@@ -6,15 +6,17 @@ import {
6
6
  } from "@prosekit/core";
7
7
 
8
8
  // src/yjs/yjs-commands.ts
9
- import { defineCommands } from "@prosekit/core";
9
+ import {
10
+ defineCommands
11
+ } from "@prosekit/core";
10
12
 
11
13
  // src/yjs/yjs-undo-plugin.ts
12
14
  import { definePlugin } from "@prosekit/core";
13
15
  import {
14
- yUndoPluginKey,
15
- yUndoPlugin as originalYUndoPlugin,
16
+ redo as yRedo,
16
17
  undo as yUndo,
17
- redo as yRedo
18
+ yUndoPlugin as originalYUndoPlugin,
19
+ yUndoPluginKey
18
20
  } from "y-prosemirror";
19
21
  function fixYUndoPlugin(yUndoPluginInstance) {
20
22
  const originalUndoPluginView = yUndoPluginInstance.spec.view;
@@ -40,7 +42,7 @@ function fixYUndoPlugin(yUndoPluginInstance) {
40
42
  );
41
43
  undoManager._observers = observers;
42
44
  };
43
- if (viewRet == null ? void 0 : viewRet.destroy) {
45
+ if (viewRet?.destroy) {
44
46
  viewRet.destroy();
45
47
  }
46
48
  }
@@ -86,7 +88,9 @@ function defineYjsCommands() {
86
88
  }
87
89
 
88
90
  // src/yjs/yjs-cursor-plugin.ts
89
- import { definePlugin as definePlugin2 } from "@prosekit/core";
91
+ import {
92
+ definePlugin as definePlugin2
93
+ } from "@prosekit/core";
90
94
  import { yCursorPlugin } from "y-prosemirror";
91
95
  function defineYjsCursorPlugin(options) {
92
96
  const { awareness, ...rest } = options;
@@ -110,7 +114,9 @@ function defineYjsKeymap() {
110
114
  }
111
115
 
112
116
  // src/yjs/yjs-sync-plugin.ts
113
- import { definePlugin as definePlugin3 } from "@prosekit/core";
117
+ import {
118
+ definePlugin as definePlugin3
119
+ } from "@prosekit/core";
114
120
  import { ySyncPlugin } from "y-prosemirror";
115
121
  function defineYjsSyncPlugin(options) {
116
122
  const { fragment, ...rest } = options;
@@ -119,9 +125,8 @@ function defineYjsSyncPlugin(options) {
119
125
 
120
126
  // src/yjs/yjs.ts
121
127
  function defineYjs(options) {
122
- var _a;
123
128
  const { doc, awareness, sync, undo: undo2, cursor } = options;
124
- const fragment = (_a = options.fragment) != null ? _a : doc.getXmlFragment("prosemirror");
129
+ const fragment = options.fragment ?? doc.getXmlFragment("prosemirror");
125
130
  return withPriority(
126
131
  union([
127
132
  defineYjsKeymap(),
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@prosekit/extensions",
3
3
  "type": "module",
4
- "version": "0.7.22",
4
+ "version": "0.7.24",
5
5
  "private": false,
6
6
  "author": {
7
7
  "name": "ocavue",
@@ -216,11 +216,11 @@
216
216
  "prosemirror-dropcursor": "^1.8.1",
217
217
  "prosemirror-flat-list": "^0.5.4",
218
218
  "prosemirror-gapcursor": "^1.3.2",
219
- "prosemirror-highlight": "^0.9.0",
219
+ "prosemirror-highlight": "^0.11.0",
220
220
  "prosemirror-search": "^1.0.0",
221
- "prosemirror-tables": "^1.6.1",
222
- "shiki": "^1.24.0",
223
- "@prosekit/core": "^0.7.13",
221
+ "prosemirror-tables": "^1.6.2",
222
+ "shiki": "^1.26.2",
223
+ "@prosekit/core": "^0.7.15",
224
224
  "@prosekit/pm": "^0.1.9"
225
225
  },
226
226
  "peerDependencies": {
@@ -244,22 +244,23 @@
244
244
  }
245
245
  },
246
246
  "devDependencies": {
247
- "@vitest/browser": "^2.1.6",
247
+ "@vitest/browser": "^3.0.4",
248
248
  "just-pick": "^4.2.0",
249
- "loro-crdt": "^1.1.4",
250
- "loro-prosemirror": "^0.2.0",
249
+ "loro-crdt": "^1.3.0",
250
+ "loro-prosemirror": "^0.2.1",
251
+ "prettier": "^3.4.2",
251
252
  "tsup": "^8.3.5",
252
- "type-fest": "^4.26.1",
253
- "typescript": "^5.6.3",
254
- "vitest": "^2.1.6",
255
- "y-prosemirror": "^1.2.13",
253
+ "type-fest": "^4.32.0",
254
+ "typescript": "~5.7.2",
255
+ "vitest": "^3.0.4",
256
+ "y-prosemirror": "^1.2.15",
256
257
  "y-protocols": "^1.0.6",
257
- "yjs": "^13.6.20",
258
+ "yjs": "^13.6.22",
258
259
  "@prosekit/dev": "0.0.0"
259
260
  },
260
261
  "scripts": {
261
- "build:tsup": "tsup",
262
- "build:tsc": "tsc -b tsconfig.json"
262
+ "build:tsc": "tsc -b tsconfig.json",
263
+ "build:tsup": "tsup"
263
264
  },
264
265
  "types": "./dist/prosekit-extensions.d.ts",
265
266
  "typesVersions": {