@novaprose/core 0.5.3 → 0.6.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 (47) hide show
  1. package/README.md +51 -17
  2. package/dist/{advlist-FH3K3AAQ.js → advlist-K2U3VPH2.js} +3 -3
  3. package/dist/{autolink-IDJWAL2V.js → autolink-XWDTLY37.js} +2 -2
  4. package/dist/{autoresize-4ZEPQCHP.js → autoresize-UB3GOA6D.js} +2 -2
  5. package/dist/{autosave-DH7SO4UQ.js → autosave-MWNRUNU3.js} +3 -3
  6. package/dist/{charmap-F7EVJ56K.js → charmap-ADLYOIB3.js} +3 -3
  7. package/dist/{chunk-6AL2IS6V.js → chunk-435CRWKA.js} +69 -8
  8. package/dist/chunk-435CRWKA.js.map +1 -0
  9. package/dist/{chunk-55LD2TT2.js → chunk-46RIM5KP.js} +932 -32
  10. package/dist/chunk-46RIM5KP.js.map +1 -0
  11. package/dist/{chunk-YZPJQB3I.js → chunk-7ON7PR5R.js} +106 -25
  12. package/dist/chunk-7ON7PR5R.js.map +1 -0
  13. package/dist/{chunk-6GWG2BLC.js → chunk-HPLT3XRZ.js} +1 -1
  14. package/dist/chunk-HPLT3XRZ.js.map +1 -0
  15. package/dist/{chunk-MOO4PJGI.js → chunk-NPKAIW34.js} +11 -1
  16. package/dist/{chunk-MOO4PJGI.js.map → chunk-NPKAIW34.js.map} +1 -1
  17. package/dist/{directionality-MF5HDXH3.js → directionality-XOHJFSL6.js} +3 -3
  18. package/dist/{emoticons-SONBUCFV.js → emoticons-TP4N4ZGY.js} +3 -3
  19. package/dist/index.cjs +1424 -162
  20. package/dist/index.cjs.map +1 -1
  21. package/dist/index.d.cts +248 -11
  22. package/dist/index.d.ts +248 -11
  23. package/dist/index.js +212 -25
  24. package/dist/index.js.map +1 -1
  25. package/dist/{insertdatetime-X2T4ZY6R.js → insertdatetime-T4SEMQWP.js} +3 -3
  26. package/dist/{nonbreaking-PP4KIJSR.js → nonbreaking-HG5HV6AL.js} +3 -3
  27. package/dist/{quickbars-3WKHLKAR.js → quickbars-4NU4SIPL.js} +5 -5
  28. package/dist/{revisionhistory-FYRVDGRA.js → revisionhistory-3YQPLPLM.js} +6 -6
  29. package/dist/{visualblocks-NPTMWFXD.js → visualblocks-RTAYJOGR.js} +3 -3
  30. package/package.json +1 -1
  31. package/src/style.css +106 -0
  32. package/dist/chunk-55LD2TT2.js.map +0 -1
  33. package/dist/chunk-6AL2IS6V.js.map +0 -1
  34. package/dist/chunk-6GWG2BLC.js.map +0 -1
  35. package/dist/chunk-YZPJQB3I.js.map +0 -1
  36. /package/dist/{advlist-FH3K3AAQ.js.map → advlist-K2U3VPH2.js.map} +0 -0
  37. /package/dist/{autolink-IDJWAL2V.js.map → autolink-XWDTLY37.js.map} +0 -0
  38. /package/dist/{autoresize-4ZEPQCHP.js.map → autoresize-UB3GOA6D.js.map} +0 -0
  39. /package/dist/{autosave-DH7SO4UQ.js.map → autosave-MWNRUNU3.js.map} +0 -0
  40. /package/dist/{charmap-F7EVJ56K.js.map → charmap-ADLYOIB3.js.map} +0 -0
  41. /package/dist/{directionality-MF5HDXH3.js.map → directionality-XOHJFSL6.js.map} +0 -0
  42. /package/dist/{emoticons-SONBUCFV.js.map → emoticons-TP4N4ZGY.js.map} +0 -0
  43. /package/dist/{insertdatetime-X2T4ZY6R.js.map → insertdatetime-T4SEMQWP.js.map} +0 -0
  44. /package/dist/{nonbreaking-PP4KIJSR.js.map → nonbreaking-HG5HV6AL.js.map} +0 -0
  45. /package/dist/{quickbars-3WKHLKAR.js.map → quickbars-4NU4SIPL.js.map} +0 -0
  46. /package/dist/{revisionhistory-FYRVDGRA.js.map → revisionhistory-3YQPLPLM.js.map} +0 -0
  47. /package/dist/{visualblocks-NPTMWFXD.js.map → visualblocks-RTAYJOGR.js.map} +0 -0
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  HTMLSerializer,
3
3
  parseContent
4
- } from "./chunk-55LD2TT2.js";
5
- import "./chunk-6AL2IS6V.js";
6
- import "./chunk-YZPJQB3I.js";
4
+ } from "./chunk-46RIM5KP.js";
5
+ import "./chunk-435CRWKA.js";
6
+ import "./chunk-7ON7PR5R.js";
7
7
  import {
8
8
  pickLabels
9
9
  } from "./chunk-6RJENZXT.js";
@@ -13,11 +13,11 @@ import {
13
13
  } from "./chunk-HZRIBOPW.js";
14
14
  import {
15
15
  icons
16
- } from "./chunk-MOO4PJGI.js";
16
+ } from "./chunk-NPKAIW34.js";
17
17
  import "./chunk-GHEFKKRC.js";
18
18
  import {
19
19
  definePlugin
20
- } from "./chunk-6GWG2BLC.js";
20
+ } from "./chunk-HPLT3XRZ.js";
21
21
 
22
22
  // src/plugins/revisionhistory.ts
23
23
  import { Node as PMNode } from "prosemirror-model";
@@ -457,4 +457,4 @@ var revisionhistory_default = definePlugin({
457
457
  export {
458
458
  revisionhistory_default as default
459
459
  };
460
- //# sourceMappingURL=revisionhistory-FYRVDGRA.js.map
460
+ //# sourceMappingURL=revisionhistory-3YQPLPLM.js.map
@@ -4,10 +4,10 @@ import {
4
4
  import "./chunk-HZRIBOPW.js";
5
5
  import {
6
6
  icons
7
- } from "./chunk-MOO4PJGI.js";
7
+ } from "./chunk-NPKAIW34.js";
8
8
  import {
9
9
  definePlugin
10
- } from "./chunk-6GWG2BLC.js";
10
+ } from "./chunk-HPLT3XRZ.js";
11
11
 
12
12
  // src/plugins/visualblocks.ts
13
13
  var ICON = icons.visualBlocks;
@@ -43,4 +43,4 @@ var visualblocks_default = definePlugin({
43
43
  export {
44
44
  visualblocks_default as default
45
45
  };
46
- //# sourceMappingURL=visualblocks-NPTMWFXD.js.map
46
+ //# sourceMappingURL=visualblocks-RTAYJOGR.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@novaprose/core",
3
- "version": "0.5.3",
3
+ "version": "0.6.0",
4
4
  "description": "NovaProse: embeddable rich text (WYSIWYG) editor built on ProseMirror. Secure by default, accessible, TinyMCE-compatible plugin and toolbar names.",
5
5
  "keywords": [
6
6
  "wysiwyg",
package/src/style.css CHANGED
@@ -912,6 +912,8 @@ html.nova-fullscreen-lock body {
912
912
  border-radius: 0 0 var(--nova-radius) var(--nova-radius);
913
913
  color: var(--nova-muted);
914
914
  font-size: 12px;
915
+ /* Служебная строка: не выделяется при перетаскивании ручки размера. */
916
+ user-select: none;
915
917
  }
916
918
 
917
919
  .nova-path {
@@ -923,6 +925,45 @@ html.nova-fullscreen-lock body {
923
925
 
924
926
  .nova-wordcount {
925
927
  flex: none;
928
+ margin-left: auto;
929
+ }
930
+
931
+ .nova-resize-handle {
932
+ display: grid;
933
+ flex: none;
934
+ place-items: center;
935
+ width: 20px;
936
+ height: 20px;
937
+ margin-right: -8px;
938
+ border-radius: 4px;
939
+ color: var(--nova-subtle);
940
+ cursor: ns-resize;
941
+ touch-action: none;
942
+ }
943
+
944
+ .nova-editor[data-resize='both'] .nova-resize-handle {
945
+ cursor: nwse-resize;
946
+ }
947
+
948
+ .nova-resize-handle:hover {
949
+ color: var(--nova-fg);
950
+ }
951
+
952
+ .nova-resize-handle:focus-visible {
953
+ outline: 2px solid var(--nova-accent);
954
+ outline-offset: 1px;
955
+ }
956
+
957
+ /* ======================= отключённый редактор ======================= */
958
+
959
+ .nova-disabled .nova-content,
960
+ .nova-disabled .nova-header,
961
+ .nova-disabled .nova-statusbar {
962
+ opacity: 0.55;
963
+ }
964
+
965
+ .nova-disabled .nova-prosemirror {
966
+ cursor: not-allowed;
926
967
  }
927
968
 
928
969
  /* ======================= оверлеи ======================= */
@@ -1016,6 +1057,15 @@ html.nova-fullscreen-lock body {
1016
1057
  background: var(--nova-border);
1017
1058
  }
1018
1059
 
1060
+ .nova-menu-heading {
1061
+ padding: 8px 10px 4px;
1062
+ color: var(--nova-muted);
1063
+ font-size: 11px;
1064
+ font-weight: 600;
1065
+ letter-spacing: 0.02em;
1066
+ text-transform: uppercase;
1067
+ }
1068
+
1019
1069
  /* ---------- автокомплитер / слэш-команды ---------- */
1020
1070
 
1021
1071
  .nova-ac {
@@ -1362,6 +1412,24 @@ html.nova-fullscreen-lock body {
1362
1412
  font-size: 12px;
1363
1413
  }
1364
1414
 
1415
+ .nova-input-group {
1416
+ display: flex;
1417
+ gap: 6px;
1418
+ }
1419
+
1420
+ .nova-input-group .nova-input {
1421
+ flex: 1;
1422
+ min-width: 0;
1423
+ }
1424
+
1425
+ .nova-input-action {
1426
+ flex: none;
1427
+ width: 36px;
1428
+ height: 36px;
1429
+ padding: 0;
1430
+ justify-content: center;
1431
+ }
1432
+
1365
1433
  .nova-input {
1366
1434
  width: 100%;
1367
1435
  height: 36px;
@@ -1538,6 +1606,17 @@ html.nova-fullscreen-lock body {
1538
1606
 
1539
1607
  /* ======================= обязательные стили ProseMirror ======================= */
1540
1608
 
1609
+ /* Служебная картинка ProseMirror после нередактируемого элемента в конце абзаца (переменная,
1610
+ упоминание, картинка). Обязательный стиль ProseMirror: иначе общий сброс сайта вроде
1611
+ img { display: block } превращает её в лишнюю пустую строку. */
1612
+ .nova-prosemirror img.ProseMirror-separator {
1613
+ display: inline !important;
1614
+ width: auto !important;
1615
+ height: auto !important;
1616
+ margin: 0 !important;
1617
+ border: none !important;
1618
+ }
1619
+
1541
1620
  .ProseMirror-hideselection *::selection {
1542
1621
  background: transparent;
1543
1622
  }
@@ -2305,3 +2384,30 @@ div.nova-diff-removed {
2305
2384
  line-height: 1.5;
2306
2385
  overflow-wrap: anywhere;
2307
2386
  }
2387
+
2388
+ /* ======================= переменные (mergetags) ======================= */
2389
+
2390
+ .nova-mergetag {
2391
+ display: inline-block;
2392
+ padding: 0 6px;
2393
+ border-radius: 4px;
2394
+ background: var(--nova-active);
2395
+ color: var(--nova-active-fg);
2396
+ font-size: 0.9em;
2397
+ font-weight: 500;
2398
+ line-height: 1.5;
2399
+ white-space: nowrap;
2400
+ cursor: default;
2401
+ user-select: none;
2402
+ }
2403
+
2404
+ .nova-mergetag.is-unknown {
2405
+ outline: 1px dashed var(--nova-active-fg);
2406
+ outline-offset: -1px;
2407
+ background: transparent;
2408
+ }
2409
+
2410
+ .nova-mergetag.is-selected {
2411
+ outline: 2px solid var(--nova-accent);
2412
+ outline-offset: 1px;
2413
+ }