@novaprose/core 0.3.0 → 0.4.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.
Files changed (38) hide show
  1. package/dist/{advlist-DEJUHLI6.js → advlist-FH3K3AAQ.js} +2 -2
  2. package/dist/{autolink-ZVHNOOS7.js → autolink-IDJWAL2V.js} +2 -2
  3. package/dist/{autoresize-WT4ONZKK.js → autoresize-4ZEPQCHP.js} +2 -2
  4. package/dist/{autosave-2KI5WGV5.js → autosave-WODRZ7L6.js} +2 -2
  5. package/dist/{charmap-3LM5LZCC.js → charmap-LWA7TL3K.js} +2 -2
  6. package/dist/{chunk-BGG3UVGZ.js → chunk-2A3IYKPE.js} +5 -2
  7. package/dist/chunk-2A3IYKPE.js.map +1 -0
  8. package/dist/{chunk-F6TSOU5U.js → chunk-6GWG2BLC.js} +1 -1
  9. package/dist/chunk-6GWG2BLC.js.map +1 -0
  10. package/dist/{directionality-MTLAIFIQ.js → directionality-N62ZB7CF.js} +2 -2
  11. package/dist/{emoticons-YVGVA76P.js → emoticons-WQ3K4J6G.js} +2 -2
  12. package/dist/index.cjs +591 -145
  13. package/dist/index.cjs.map +1 -1
  14. package/dist/index.d.cts +129 -2
  15. package/dist/index.d.ts +129 -2
  16. package/dist/index.js +461 -20
  17. package/dist/index.js.map +1 -1
  18. package/dist/{insertdatetime-QYWZUYO4.js → insertdatetime-2RZ3UUQE.js} +2 -2
  19. package/dist/{nonbreaking-SIACL5V6.js → nonbreaking-L6GNDHVO.js} +2 -2
  20. package/dist/{quickbars-TYJG6WTF.js → quickbars-TIRY3RH4.js} +2 -2
  21. package/dist/{revisionhistory-ZCRBPP33.js → revisionhistory-GDTOULKS.js} +3 -3
  22. package/dist/{visualblocks-WB6NAEGB.js → visualblocks-V4CQ4XMF.js} +2 -2
  23. package/package.json +1 -1
  24. package/src/style.css +37 -0
  25. package/dist/chunk-BGG3UVGZ.js.map +0 -1
  26. package/dist/chunk-F6TSOU5U.js.map +0 -1
  27. /package/dist/{advlist-DEJUHLI6.js.map → advlist-FH3K3AAQ.js.map} +0 -0
  28. /package/dist/{autolink-ZVHNOOS7.js.map → autolink-IDJWAL2V.js.map} +0 -0
  29. /package/dist/{autoresize-WT4ONZKK.js.map → autoresize-4ZEPQCHP.js.map} +0 -0
  30. /package/dist/{autosave-2KI5WGV5.js.map → autosave-WODRZ7L6.js.map} +0 -0
  31. /package/dist/{charmap-3LM5LZCC.js.map → charmap-LWA7TL3K.js.map} +0 -0
  32. /package/dist/{directionality-MTLAIFIQ.js.map → directionality-N62ZB7CF.js.map} +0 -0
  33. /package/dist/{emoticons-YVGVA76P.js.map → emoticons-WQ3K4J6G.js.map} +0 -0
  34. /package/dist/{insertdatetime-QYWZUYO4.js.map → insertdatetime-2RZ3UUQE.js.map} +0 -0
  35. /package/dist/{nonbreaking-SIACL5V6.js.map → nonbreaking-L6GNDHVO.js.map} +0 -0
  36. /package/dist/{quickbars-TYJG6WTF.js.map → quickbars-TIRY3RH4.js.map} +0 -0
  37. /package/dist/{revisionhistory-ZCRBPP33.js.map → revisionhistory-GDTOULKS.js.map} +0 -0
  38. /package/dist/{visualblocks-WB6NAEGB.js.map → visualblocks-V4CQ4XMF.js.map} +0 -0
@@ -11,7 +11,7 @@ import {
11
11
  } from "./chunk-GHEFKKRC.js";
12
12
  import {
13
13
  definePlugin
14
- } from "./chunk-F6TSOU5U.js";
14
+ } from "./chunk-6GWG2BLC.js";
15
15
 
16
16
  // src/plugins/advlist.ts
17
17
  var LABELS = {
@@ -104,4 +104,4 @@ var advlist_default = definePlugin({
104
104
  export {
105
105
  advlist_default as default
106
106
  };
107
- //# sourceMappingURL=advlist-DEJUHLI6.js.map
107
+ //# sourceMappingURL=advlist-FH3K3AAQ.js.map
@@ -4,7 +4,7 @@ import {
4
4
  } from "./chunk-GHEFKKRC.js";
5
5
  import {
6
6
  definePlugin
7
- } from "./chunk-F6TSOU5U.js";
7
+ } from "./chunk-6GWG2BLC.js";
8
8
 
9
9
  // src/plugins/autolink.ts
10
10
  import { InputRule, inputRules } from "prosemirror-inputrules";
@@ -86,4 +86,4 @@ var autolink_default = definePlugin({
86
86
  export {
87
87
  autolink_default as default
88
88
  };
89
- //# sourceMappingURL=autolink-ZVHNOOS7.js.map
89
+ //# sourceMappingURL=autolink-IDJWAL2V.js.map
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  definePlugin
3
- } from "./chunk-F6TSOU5U.js";
3
+ } from "./chunk-6GWG2BLC.js";
4
4
 
5
5
  // src/plugins/autoresize.ts
6
6
  var autoresize_default = definePlugin({
@@ -23,4 +23,4 @@ var autoresize_default = definePlugin({
23
23
  export {
24
24
  autoresize_default as default
25
25
  };
26
- //# sourceMappingURL=autoresize-WT4ONZKK.js.map
26
+ //# sourceMappingURL=autoresize-4ZEPQCHP.js.map
@@ -4,7 +4,7 @@ import {
4
4
  import "./chunk-HZRIBOPW.js";
5
5
  import {
6
6
  definePlugin
7
- } from "./chunk-F6TSOU5U.js";
7
+ } from "./chunk-6GWG2BLC.js";
8
8
 
9
9
  // src/plugins/autosave.ts
10
10
  var ICON = '<svg viewBox="0 0 24 24" width="18" height="18" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M3 12a9 9 0 1 0 3-6.7L3 8"/><path d="M3 3v5h5"/><path d="M12 7v5l3 2"/></svg>';
@@ -96,4 +96,4 @@ var autosave_default = definePlugin({
96
96
  export {
97
97
  autosave_default as default
98
98
  };
99
- //# sourceMappingURL=autosave-2KI5WGV5.js.map
99
+ //# sourceMappingURL=autosave-WODRZ7L6.js.map
@@ -7,7 +7,7 @@ import {
7
7
  import "./chunk-HZRIBOPW.js";
8
8
  import {
9
9
  definePlugin
10
- } from "./chunk-F6TSOU5U.js";
10
+ } from "./chunk-6GWG2BLC.js";
11
11
 
12
12
  // src/plugins/charmap.ts
13
13
  var ICON = '<svg viewBox="0 0 24 24" width="18" height="18" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M5 20h4v-3a7 7 0 1 1 6 0v3h4"/></svg>';
@@ -194,4 +194,4 @@ var charmap_default = definePlugin({
194
194
  export {
195
195
  charmap_default as default
196
196
  };
197
- //# sourceMappingURL=charmap-3LM5LZCC.js.map
197
+ //# sourceMappingURL=charmap-LWA7TL3K.js.map
@@ -56,7 +56,7 @@ import {
56
56
  loadPlugin,
57
57
  orderPlugins,
58
58
  resolveEntries
59
- } from "./chunk-F6TSOU5U.js";
59
+ } from "./chunk-6GWG2BLC.js";
60
60
 
61
61
  // src/i18n/en.ts
62
62
  var en = {
@@ -4588,6 +4588,7 @@ var Editor = class {
4588
4588
  mode;
4589
4589
  pluginsByName = /* @__PURE__ */ new Map();
4590
4590
  commandOverrides = /* @__PURE__ */ new Map();
4591
+ transactionTransforms = [];
4591
4592
  cleanups = [];
4592
4593
  /** Ограничения контента (validElements/invalidElements/validStyles) или null — без ограничений. */
4593
4594
  contentRules;
@@ -4856,6 +4857,7 @@ var Editor = class {
4856
4857
  }
4857
4858
  handleTransaction(tr, view = this.view) {
4858
4859
  if (view.isDestroyed) return;
4860
+ for (const transform of this.transactionTransforms) tr = transform(tr, view.state, this);
4859
4861
  view.updateState(view.state.apply(tr));
4860
4862
  if (!this.view) return;
4861
4863
  this.toolbar?.update();
@@ -4901,6 +4903,7 @@ var Editor = class {
4901
4903
  for (const [name, command] of Object.entries(plugin.commands ?? {})) {
4902
4904
  if (command) this.commandOverrides.set(name, command);
4903
4905
  }
4906
+ if (plugin.transformTransaction) this.transactionTransforms.push(plugin.transformTransaction);
4904
4907
  }
4905
4908
  exec(command) {
4906
4909
  const cmd = typeof command === "string" ? this.resolveCommand(command) : command;
@@ -5041,4 +5044,4 @@ export {
5041
5044
  parseContent,
5042
5045
  createEditor
5043
5046
  };
5044
- //# sourceMappingURL=chunk-BGG3UVGZ.js.map
5047
+ //# sourceMappingURL=chunk-2A3IYKPE.js.map