@novaprose/core 0.5.1 → 0.5.3

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 (42) hide show
  1. package/README.md +2 -2
  2. package/THIRD_PARTY_NOTICES.md +50 -0
  3. package/dist/{autosave-WODRZ7L6.js → autosave-DH7SO4UQ.js} +5 -2
  4. package/dist/autosave-DH7SO4UQ.js.map +1 -0
  5. package/dist/{charmap-LWA7TL3K.js → charmap-F7EVJ56K.js} +5 -2
  6. package/dist/charmap-F7EVJ56K.js.map +1 -0
  7. package/dist/{chunk-2A3IYKPE.js → chunk-55LD2TT2.js} +5 -3
  8. package/dist/{chunk-2A3IYKPE.js.map → chunk-55LD2TT2.js.map} +1 -1
  9. package/dist/{chunk-PHRON5PL.js → chunk-6AL2IS6V.js} +4 -150
  10. package/dist/chunk-6AL2IS6V.js.map +1 -0
  11. package/dist/chunk-MOO4PJGI.js +229 -0
  12. package/dist/chunk-MOO4PJGI.js.map +1 -0
  13. package/dist/{directionality-N62ZB7CF.js → directionality-MF5HDXH3.js} +6 -3
  14. package/dist/directionality-MF5HDXH3.js.map +1 -0
  15. package/dist/{emoticons-WQ3K4J6G.js → emoticons-SONBUCFV.js} +5 -2
  16. package/dist/emoticons-SONBUCFV.js.map +1 -0
  17. package/dist/index.cjs +236 -146
  18. package/dist/index.cjs.map +1 -1
  19. package/dist/index.d.cts +86 -70
  20. package/dist/index.d.ts +86 -70
  21. package/dist/index.js +23 -21
  22. package/dist/index.js.map +1 -1
  23. package/dist/{insertdatetime-2RZ3UUQE.js → insertdatetime-X2T4ZY6R.js} +5 -2
  24. package/dist/insertdatetime-X2T4ZY6R.js.map +1 -0
  25. package/dist/{nonbreaking-L6GNDHVO.js → nonbreaking-PP4KIJSR.js} +5 -2
  26. package/dist/nonbreaking-PP4KIJSR.js.map +1 -0
  27. package/dist/{quickbars-TIRY3RH4.js → quickbars-3WKHLKAR.js} +5 -3
  28. package/dist/{quickbars-TIRY3RH4.js.map → quickbars-3WKHLKAR.js.map} +1 -1
  29. package/dist/{revisionhistory-GDTOULKS.js → revisionhistory-FYRVDGRA.js} +7 -4
  30. package/dist/revisionhistory-FYRVDGRA.js.map +1 -0
  31. package/dist/{visualblocks-V4CQ4XMF.js → visualblocks-NPTMWFXD.js} +5 -2
  32. package/dist/visualblocks-NPTMWFXD.js.map +1 -0
  33. package/package.json +3 -3
  34. package/dist/autosave-WODRZ7L6.js.map +0 -1
  35. package/dist/charmap-LWA7TL3K.js.map +0 -1
  36. package/dist/chunk-PHRON5PL.js.map +0 -1
  37. package/dist/directionality-N62ZB7CF.js.map +0 -1
  38. package/dist/emoticons-WQ3K4J6G.js.map +0 -1
  39. package/dist/insertdatetime-2RZ3UUQE.js.map +0 -1
  40. package/dist/nonbreaking-L6GNDHVO.js.map +0 -1
  41. package/dist/revisionhistory-GDTOULKS.js.map +0 -1
  42. package/dist/visualblocks-V4CQ4XMF.js.map +0 -1
package/dist/index.cjs CHANGED
@@ -97,56 +97,6 @@ var init_plugins = __esm({
97
97
  }
98
98
  });
99
99
 
100
- // src/ui/dom.ts
101
- function h(tag, attrs = {}, ...children) {
102
- const el = document.createElement(tag);
103
- for (const [name, value] of Object.entries(attrs)) {
104
- if (value === null || value === void 0 || value === false) continue;
105
- if (typeof value === "function") {
106
- el.addEventListener(name.replace(/^on/, "").toLowerCase(), value);
107
- } else if (name === "className") {
108
- el.className = String(value);
109
- } else {
110
- el.setAttribute(name, value === true ? "" : String(value));
111
- }
112
- }
113
- for (const child of children.flat()) {
114
- if (child === null || child === void 0 || child === false) continue;
115
- el.append(child);
116
- }
117
- return el;
118
- }
119
- function icon(svg2) {
120
- const span = document.createElement("span");
121
- span.className = "nova-icon";
122
- span.innerHTML = svg2;
123
- return span;
124
- }
125
- function uniqueId(prefix = "nova") {
126
- uid += 1;
127
- return `${prefix}-${uid}`;
128
- }
129
- function formatShortcut(shortcut) {
130
- const parts = shortcut.split("-");
131
- const key3 = parts.pop();
132
- const keyLabel = key3.length === 1 ? key3.toUpperCase() : key3;
133
- if (isMac) {
134
- const map2 = { Mod: "\u2318", Shift: "\u21E7", Alt: "\u2325", Ctrl: "\u2303" };
135
- return parts.map((p) => map2[p] ?? p).join("") + keyLabel;
136
- }
137
- const map = { Mod: "Ctrl", Shift: "Shift", Alt: "Alt", Ctrl: "Ctrl" };
138
- return [...parts.map((p) => map[p] ?? p), keyLabel].join("+");
139
- }
140
- var uid, isMac, FOCUSABLE;
141
- var init_dom = __esm({
142
- "src/ui/dom.ts"() {
143
- "use strict";
144
- uid = 0;
145
- isMac = typeof navigator !== "undefined" && /Mac|iP(hone|[oa]d)/.test(navigator.platform);
146
- FOCUSABLE = 'a[href], button:not([disabled]), input:not([disabled]):not([type="hidden"]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])';
147
- }
148
- });
149
-
150
100
  // src/ui/icons.ts
151
101
  var svg, icons;
152
102
  var init_icons = __esm({
@@ -154,153 +104,280 @@ var init_icons = __esm({
154
104
  "use strict";
155
105
  svg = (body) => `<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">${body}</svg>`;
156
106
  icons = {
157
- undo: svg('<path d="M9 14 4 9l5-5"/><path d="M4 9h11a5 5 0 0 1 0 10h-3"/>'),
158
- redo: svg('<path d="m15 14 5-5-5-5"/><path d="M20 9H9a5 5 0 0 0 0 10h3"/>'),
159
- bold: svg('<path d="M7 5h6a3.5 3.5 0 0 1 0 7H7z"/><path d="M7 12h7a3.5 3.5 0 0 1 0 7H7z"/>'),
160
- italic: svg('<path d="M14 5h-4M14 19h-4M14 5l-4 14"/>'),
161
- underline: svg('<path d="M7 4v6a5 5 0 0 0 10 0V4"/><path d="M5 20h14"/>'),
107
+ undo: svg(
108
+ '<path d="M9 14 4 9l5-5" /><path d="M4 9h10.5a5.5 5.5 0 0 1 5.5 5.5a5.5 5.5 0 0 1-5.5 5.5H11" />'
109
+ ),
110
+ redo: svg(
111
+ '<path d="m15 14 5-5-5-5" /><path d="M20 9H9.5A5.5 5.5 0 0 0 4 14.5A5.5 5.5 0 0 0 9.5 20H13" />'
112
+ ),
113
+ bold: svg('<path d="M6 12h9a4 4 0 010 8H7a1 1 0 01-1-1V5a1 1 0 011-1h7a4 4 0 010 8" />'),
114
+ italic: svg(
115
+ '<line x1="19" x2="10" y1="4" y2="4" /><line x1="14" x2="5" y1="20" y2="20" /><line x1="15" x2="9" y1="4" y2="20" />'
116
+ ),
117
+ underline: svg('<path d="M6 4v6a6 6 0 0 0 12 0V4" /><line x1="4" x2="20" y1="20" y2="20" />'),
162
118
  strike: svg(
163
- '<path d="M4 12h16"/><path d="M16 7a4 3 0 0 0-4-2c-2.5 0-4 1.3-4 3"/><path d="M8 17a4 3 0 0 0 4 2c2.5 0 4-1.3 4-3"/>'
119
+ '<path d="M16 4H9a3 3 0 0 0-2.83 4" /><path d="M14 12a4 4 0 0 1 0 8H6" /><line x1="4" x2="20" y1="12" y2="12" />'
164
120
  ),
165
- code: svg('<path d="m9 8-4 4 4 4"/><path d="m15 8 4 4-4 4"/>'),
121
+ code: svg('<path d="m16 18 6-6-6-6" /><path d="m8 6-6 6 6 6" />'),
166
122
  subscript: svg(
167
- '<path d="m4 6 8 9M12 6l-8 9"/><path d="M20 20h-4c0-1.5 4-2 4-4a1.5 1.5 0 0 0-3-.5"/>'
123
+ '<path d="m4 5 8 8" /><path d="m12 5-8 8" /><path d="M20 19h-4c0-1.5.44-2 1.5-2.5S20 15.33 20 14c0-.47-.17-.93-.48-1.29a2.11 2.11 0 0 0-2.62-.44c-.42.24-.74.62-.9 1.07" />'
168
124
  ),
169
125
  superscript: svg(
170
- '<path d="m4 9 8 9M12 9l-8 9"/><path d="M20 10h-4c0-1.5 4-2 4-4a1.5 1.5 0 0 0-3-.5"/>'
126
+ '<path d="m4 19 8-8" /><path d="m12 19-8-8" /><path d="M20 12h-4c0-1.5.442-2 1.5-2.5S20 8.334 20 7.002c0-.472-.17-.93-.484-1.29a2.105 2.105 0 0 0-2.617-.436c-.42.239-.738.614-.899 1.06" />'
171
127
  ),
172
128
  bulletList: svg(
173
- '<circle cx="5" cy="7" r="1"/><circle cx="5" cy="12" r="1"/><circle cx="5" cy="17" r="1"/><path d="M9 7h11M9 12h11M9 17h11"/>'
129
+ '<path d="M3 5h.01" /><path d="M3 12h.01" /><path d="M3 19h.01" /><path d="M8 5h13" /><path d="M8 12h13" /><path d="M8 19h13" />'
174
130
  ),
175
131
  orderedList: svg(
176
- '<path d="M4 5h1v4M4 9h2"/><path d="M4 14h2l-2 3h2"/><path d="M10 7h10M10 12h10M10 17h10"/>'
132
+ '<path d="M11 5h10" /><path d="M11 12h10" /><path d="M11 19h10" /><path d="M4 4h1v5" /><path d="M4 9h2" /><path d="M6.5 20H3.4c0-1 2.6-1.925 2.6-3.5a1.5 1.5 0 0 0-2.6-1.02" />'
133
+ ),
134
+ indent: svg(
135
+ '<path d="M21 5H11" /><path d="M21 12H11" /><path d="M21 19H11" /><path d="m3 8 4 4-4 4" />'
136
+ ),
137
+ outdent: svg(
138
+ '<path d="M21 5H11" /><path d="M21 12H11" /><path d="M21 19H11" /><path d="m7 8-4 4 4 4" />'
177
139
  ),
178
- indent: svg('<path d="M4 6h16M10 12h10M4 18h16"/><path d="m4 10 3 2-3 2"/>'),
179
- outdent: svg('<path d="M4 6h16M10 12h10M4 18h16"/><path d="m7 10-3 2 3 2"/>'),
180
140
  blockquote: svg(
181
- '<path d="M6 17c-1.5 0-2.5-1-2.5-3 0-3 2-6 5-7"/><path d="M15 17c-1.5 0-2.5-1-2.5-3 0-3 2-6 5-7"/><circle cx="6" cy="14" r="2.5"/><circle cx="15" cy="14" r="2.5"/>'
141
+ '<path d="M17 5H3" /><path d="M21 12H8" /><path d="M21 19H8" /><path d="M3 12v7" />'
182
142
  ),
183
143
  codeBlock: svg(
184
- '<rect x="3" y="4" width="18" height="16" rx="2"/><path d="m9 10-2 2 2 2M15 10l2 2-2 2"/>'
144
+ '<path d="m10 9-3 3 3 3" /><path d="m14 15 3-3-3-3" /><rect x="3" y="3" width="18" height="18" rx="2" />'
185
145
  ),
186
- alignLeft: svg('<path d="M4 6h16M4 10h10M4 14h16M4 18h10"/>'),
187
- alignCenter: svg('<path d="M4 6h16M7 10h10M4 14h16M7 18h10"/>'),
188
- alignRight: svg('<path d="M4 6h16M10 10h10M4 14h16M10 18h10"/>'),
189
- alignJustify: svg('<path d="M4 6h16M4 10h16M4 14h16M4 18h16"/>'),
190
- horizontalRule: svg('<path d="M4 12h16"/><path d="M8 7h8M8 17h8" opacity=".4"/>'),
146
+ alignLeft: svg('<path d="M21 5H3" /><path d="M15 12H3" /><path d="M17 19H3" />'),
147
+ alignCenter: svg('<path d="M21 5H3" /><path d="M17 12H7" /><path d="M19 19H5" />'),
148
+ alignRight: svg('<path d="M21 5H3" /><path d="M21 12H9" /><path d="M21 19H7" />'),
149
+ alignJustify: svg('<path d="M3 5h18" /><path d="M3 12h18" /><path d="M3 19h18" />'),
150
+ horizontalRule: svg('<path d="m16 16-4 4-4-4" /><path d="M3 12h18" /><path d="m8 8 4-4 4 4" />'),
191
151
  link: svg(
192
- '<path d="M10 14a4 4 0 0 0 5.7 0l3-3a4 4 0 0 0-5.7-5.7l-1 1"/><path d="M14 10a4 4 0 0 0-5.7 0l-3 3a4 4 0 0 0 5.7 5.7l1-1"/>'
152
+ '<path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71" /><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71" />'
193
153
  ),
194
154
  unlink: svg(
195
- '<path d="M10 14a4 4 0 0 0 5.7 0l3-3a4 4 0 0 0-5.7-5.7l-1 1"/><path d="M14 10a4 4 0 0 0-5.7 0l-3 3a4 4 0 0 0 5.7 5.7l1-1"/><path d="M3 3l18 18"/>'
155
+ '<path d="m18.84 12.25 1.72-1.71h-.02a5.004 5.004 0 0 0-.12-7.07 5.006 5.006 0 0 0-6.95 0l-1.72 1.71" /><path d="m5.17 11.75-1.71 1.71a5.004 5.004 0 0 0 .12 7.07 5.006 5.006 0 0 0 6.95 0l1.71-1.71" /><line x1="8" x2="8" y1="2" y2="5" /><line x1="2" x2="5" y1="8" y2="8" /><line x1="16" x2="16" y1="19" y2="22" /><line x1="19" x2="22" y1="16" y2="16" />'
196
156
  ),
197
157
  image: svg(
198
- '<rect x="3" y="4" width="18" height="16" rx="2"/><circle cx="9" cy="10" r="2"/><path d="m21 16-5-5-9 9"/>'
158
+ '<rect width="18" height="18" x="3" y="3" rx="2" ry="2" /><circle cx="9" cy="9" r="2" /><path d="m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21" />'
159
+ ),
160
+ clearFormatting: svg(
161
+ '<path d="M4 7V4h16v3" /><path d="M5 20h6" /><path d="M13 4 8 20" /><path d="m15 15 5 5" /><path d="m20 15-5 5" />'
199
162
  ),
200
- clearFormatting: svg('<path d="M6 5h12M12 5l-3 14"/><path d="m15 15 5 5M20 15l-5 5"/>'),
201
- // «T²» — меню дополнительного форматирования
202
163
  formatMore: svg(
203
- '<path d="M3 7h10M8 7v12"/><path d="M21 11h-4c0-1.5 4-2 4-4a1.5 1.5 0 0 0-3-.5"/>'
164
+ '<path d="M12 4v16" /><path d="M4 7V5a1 1 0 0 1 1-1h14a1 1 0 0 1 1 1v2" /><path d="M9 20h6" />'
204
165
  ),
205
- // Картинка: обтекание слева / по центру / справа — прямоугольник + строки текста
206
166
  imageLeft: svg(
207
- '<rect x="3" y="5" width="8" height="8" rx="1"/><path d="M14 6h7M14 10h7M3 17h18M3 20h12"/>'
167
+ '<rect width="9" height="6" x="6" y="14" rx="2" /><rect width="16" height="6" x="6" y="4" rx="2" /><path d="M2 2v20" />'
168
+ ),
169
+ imageCenter: svg(
170
+ '<path d="M12 2v20" /><path d="M8 10H4a2 2 0 0 1-2-2V6c0-1.1.9-2 2-2h4" /><path d="M16 10h4a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2h-4" /><path d="M8 20H7a2 2 0 0 1-2-2v-2c0-1.1.9-2 2-2h1" /><path d="M16 14h1a2 2 0 0 1 2 2v2a2 2 0 0 1-2 2h-1" />'
208
171
  ),
209
- imageCenter: svg('<rect x="7" y="4" width="10" height="9" rx="1"/><path d="M3 17h18M6 20h12"/>'),
210
172
  imageRight: svg(
211
- '<rect x="13" y="5" width="8" height="8" rx="1"/><path d="M3 6h7M3 10h7M3 17h18M9 20h12"/>'
173
+ '<rect width="16" height="6" x="2" y="4" rx="2" /><rect width="9" height="6" x="9" y="14" rx="2" /><path d="M22 22V2" />'
174
+ ),
175
+ resize: svg(
176
+ '<path d="M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7" /><path d="M14 15H9v-5" /><path d="M16 3h5v5" /><path d="M21 3 9 15" />'
212
177
  ),
213
- resize: svg('<path d="M15 3h6v6M9 21H3v-6"/><path d="m21 3-7 7M3 21l7-7"/>'),
214
178
  altText: svg(
215
- '<rect x="3" y="5" width="18" height="14" rx="2"/><path d="M7 15l2.5-6 2.5 6M7.8 13h3.4M15 9v6h3"/>'
179
+ '<rect width="18" height="14" x="3" y="5" rx="2" ry="2" /><path d="M7 15h4M15 15h2M7 11h2M13 11h4" />'
180
+ ),
181
+ trash: svg(
182
+ '<path d="M10 11v6" /><path d="M14 11v6" /><path d="M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6" /><path d="M3 6h18" /><path d="M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2" />'
216
183
  ),
217
- trash: svg('<path d="M4 7h16M10 11v6M14 11v6"/><path d="M6 7l1 13h10l1-13M9 7V4h6v3"/>'),
218
- paragraph: svg('<path d="M13 4v16M17 4v16M19 4H9.5a4.5 4.5 0 0 0 0 9H13"/>'),
219
- h1: svg('<path d="M4 6v12M12 6v12M4 12h8"/><path d="m16 9 3-2v11"/>'),
184
+ paragraph: svg(
185
+ '<path d="M13 4v16" /><path d="M17 4v16" /><path d="M19 4H9.5a4.5 4.5 0 0 0 0 9H13" />'
186
+ ),
187
+ h1: svg('<path d="M4 12h8" /><path d="M4 18V6" /><path d="M12 18V6" /><path d="m17 12 3-2v8" />'),
220
188
  h2: svg(
221
- '<path d="M4 6v12M12 6v12M4 12h8"/><path d="M16 9.5a2.5 2.5 0 1 1 5 .5c0 1.5-5 4-5 8h5"/>'
189
+ '<path d="M4 12h8" /><path d="M4 18V6" /><path d="M12 18V6" /><path d="M21 18h-4c0-4 4-3 4-6 0-1.5-2-2.5-4-1" />'
190
+ ),
191
+ h3: svg(
192
+ '<path d="M4 12h8" /><path d="M4 18V6" /><path d="M12 18V6" /><path d="M17.5 10.5c1.7-1 3.5 0 3.5 1.5a2 2 0 0 1-2 2" /><path d="M17 17.5c2 1.5 4 .3 4-1.5a2 2 0 0 0-2-2" />'
222
193
  ),
223
- h3: svg('<path d="M4 6v12M12 6v12M4 12h8"/><path d="M16 7.5h4.5l-2.5 3.5a3 3 0 1 1-2.5 5"/>'),
224
- // Планшет буфера обмена с буквой T — «вставить как текст»
225
194
  pasteText: svg(
226
- '<rect x="5" y="4" width="14" height="17" rx="2"/><path d="M9 4V3h6v1M9 10h6M12 10v7"/>'
195
+ '<rect width="8" height="4" x="8" y="2" rx="1" ry="1" /><path d="M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2" /><path d="M9 12v-1h6v1" /><path d="M11 17h2" /><path d="M12 11v6" />'
227
196
  ),
228
- // ---------- таблицы ----------
229
197
  table: svg(
230
- '<rect x="3" y="4" width="18" height="16" rx="1.5"/><path d="M3 10h18M3 15h18M9 4v16M15 4v16"/>'
198
+ '<path d="M12 3v18" /><rect width="18" height="18" x="3" y="3" rx="2" /><path d="M3 9h18" /><path d="M3 15h18" />'
199
+ ),
200
+ rowBefore: svg(
201
+ '<path d="M12 2v6" /><path d="M18.464 3H19a2 2 0 012 2v14a2 2 0 01-2 2H5a2 2 0 01-2-2V5a2 2 0 012-2h.535" /><path d="M21 12H3" /><path d="M9 5h6" />'
202
+ ),
203
+ rowAfter: svg(
204
+ '<path d="M12 22v-6" /><path d="M18.464 21H19a2 2 0 002-2V5a2 2 0 00-2-2H5a2 2 0 00-2 2v14a2 2 0 002 2h.535" /><path d="M21 12H3" /><path d="M9 19h6" />'
231
205
  ),
232
- rowBefore: svg('<rect x="3" y="12" width="18" height="8" rx="1"/><path d="M12 3v6M9 6h6"/>'),
233
- rowAfter: svg('<rect x="3" y="4" width="18" height="8" rx="1"/><path d="M12 15v6M9 18h6"/>'),
234
206
  rowDelete: svg(
235
- '<rect x="3" y="8" width="18" height="8" rx="1"/><path d="m10 10 4 4M14 10l-4 4"/>'
207
+ '<path d="M16 5H3" /><path d="M11 12H3" /><path d="M16 19H3" /><path d="m15.5 9.5 5 5" /><path d="m20.5 9.5-5 5" />'
208
+ ),
209
+ colBefore: svg(
210
+ '<path d="M12 3v18" /><path d="M3 5.536V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-.535" /><path d="M5 15V9" /><path d="M8 12H2" />'
211
+ ),
212
+ colAfter: svg(
213
+ '<path d="M12 3v18" /><path d="M16 12h6" /><path d="M19 15V9" /><path d="M21 5.536V5a2 2 0 00-2-2H5a2 2 0 00-2 2v14a2 2 0 002 2h14a2 2 0 002-2v-.535" />'
236
214
  ),
237
- colBefore: svg('<rect x="12" y="3" width="8" height="18" rx="1"/><path d="M3 12h6M6 9v6"/>'),
238
- colAfter: svg('<rect x="4" y="3" width="8" height="18" rx="1"/><path d="M15 12h6M18 9v6"/>'),
239
215
  colDelete: svg(
240
- '<rect x="8" y="3" width="8" height="18" rx="1"/><path d="m10 10 4 4M14 10l-4 4"/>'
216
+ '<g transform="rotate(90 12 12)"><path d="M16 5H3" /><path d="M11 12H3" /><path d="M16 19H3" /><path d="m15.5 9.5 5 5" /><path d="m20.5 9.5-5 5" /></g>'
241
217
  ),
242
218
  merge: svg(
243
- '<rect x="3" y="5" width="18" height="14" rx="1"/><path d="M6 12h4M14 12h4M8 10l2 2-2 2M16 10l-2 2 2 2"/>'
219
+ '<path d="M12 21v-6" /><path d="M12 9V3" /><path d="M3 15h18" /><path d="M3 9h18" /><rect width="18" height="18" x="3" y="3" rx="2" />'
244
220
  ),
245
221
  split: svg(
246
- '<rect x="3" y="5" width="18" height="14" rx="1"/><path d="M12 5v14M5 12h4M15 12h4M7 10l-2 2 2 2M17 10l2 2-2 2"/>'
222
+ '<path d="M12 15V9" /><path d="M3 15h18" /><path d="M3 9h18" /><rect width="18" height="18" x="3" y="3" rx="2" />'
247
223
  ),
248
- rowHeader: svg(
249
- '<rect x="3" y="4" width="18" height="16" rx="1.5"/><path d="M3 9.5h18"/><path d="M4 5h16v4H4z" fill="currentColor" opacity=".35" stroke="none"/>'
224
+ rowHeader: svg('<rect width="18" height="18" x="3" y="3" rx="2" /><path d="M3 9h18" />'),
225
+ colHeader: svg('<rect width="18" height="18" x="3" y="3" rx="2" /><path d="M9 3v18" />'),
226
+ sort: svg(
227
+ '<path d="m3 16 4 4 4-4" /><path d="M7 20V4" /><path d="M11 4h10" /><path d="M11 8h7" /><path d="M11 12h4" />'
250
228
  ),
251
- colHeader: svg(
252
- '<rect x="3" y="4" width="18" height="16" rx="1.5"/><path d="M9.5 4v16"/><path d="M4 5h5v14H4z" fill="currentColor" opacity=".35" stroke="none"/>'
253
- ),
254
- sort: svg('<path d="M7 4v16M4 17l3 3 3-3"/><path d="M14 6h7M14 11h5M14 16h3"/>'),
255
229
  tableProps: svg(
256
- '<rect x="3" y="4" width="18" height="16" rx="2"/><path d="M3 10h18M9 10v10"/><path d="M15 15h3"/>'
230
+ '<path d="M15 3v18" /><rect width="18" height="18" x="3" y="3" rx="2" /><path d="M21 9H3" /><path d="M21 15H3" />'
257
231
  ),
258
232
  cellProps: svg(
259
- '<rect x="3" y="4" width="18" height="16" rx="2"/><path d="M3 10h18M9 4v16"/><rect x="11" y="12" width="8" height="6" rx="1"/>'
233
+ '<path d="M10.6 21H5a2 2 0 01-2-2V5a2 2 0 012-2h14a2 2 0 012 2v5.6" /><path d="m14.305 19.53.923-.382" /><path d="M15 3v7.6" /><path d="m15.229 16.852-.924-.383" /><path d="m16.852 15.228-.383-.923" /><path d="m16.852 20.772-.383.924" /><path d="m19.148 15.228.383-.923" /><path d="m19.53 21.696-.382-.924" /><path d="m20.773 16.852.922-.383" /><path d="m20.773 19.148.922.383" /><path d="M9 3v18" /><circle cx="18" cy="18" r="3" />'
260
234
  ),
261
235
  tableDelete: svg(
262
- '<rect x="3" y="4" width="13" height="12" rx="1"/><path d="M3 10h13M9.5 4v12"/><path d="m17 15 4 4M21 15l-4 4"/>'
236
+ '<path d="M12 3v17a1 1 0 0 1-1 1H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2v6a1 1 0 0 1-1 1H3" /><path d="m16.5 16.5 5 5" /><path d="m16.5 21.5 5-5" />'
237
+ ),
238
+ chevronUp: svg('<path d="m18 15-6-6-6 6" />'),
239
+ search: svg('<path d="m21 21-4.34-4.34" /><circle cx="11" cy="11" r="8" />'),
240
+ fullscreen: svg(
241
+ '<path d="M8 3H5a2 2 0 0 0-2 2v3" /><path d="M21 8V5a2 2 0 0 0-2-2h-3" /><path d="M3 16v3a2 2 0 0 0 2 2h3" /><path d="M16 21h3a2 2 0 0 0 2-2v-3" />'
242
+ ),
243
+ fullscreenExit: svg(
244
+ '<path d="M8 3v3a2 2 0 0 1-2 2H3" /><path d="M21 8h-3a2 2 0 0 1-2-2V3" /><path d="M3 16h3a2 2 0 0 1 2 2v3" /><path d="M16 21v-3a2 2 0 0 1 2-2h3" />'
263
245
  ),
264
- chevronUp: svg('<path d="m7 14 5-5 5 5"/>'),
265
- search: svg('<circle cx="11" cy="11" r="6.5"/><path d="m20 20-4.2-4.2"/>'),
266
- fullscreen: svg('<path d="M4 9V4h5M20 9V4h-5M4 15v5h5M20 15v5h-5"/>'),
267
- fullscreenExit: svg('<path d="M9 4v5H4M15 4v5h5M9 20v-5H4M15 20v-5h5"/>'),
268
246
  preview: svg(
269
- '<path d="M2 12s3.6-7 10-7 10 7 10 7-3.6 7-10 7S2 12 2 12z"/><circle cx="12" cy="12" r="3"/>'
247
+ '<path d="M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0" /><circle cx="12" cy="12" r="3" />'
270
248
  ),
271
- sourceCode: svg('<path d="m8 7-5 5 5 5M16 7l5 5-5 5M14 4l-4 16"/>'),
249
+ sourceCode: svg('<path d="m18 16 4-4-4-4" /><path d="m6 8-4 4 4 4" /><path d="m14.5 4-5 16" />'),
272
250
  help: svg(
273
- '<circle cx="12" cy="12" r="9"/><path d="M9.5 9.5a2.5 2.5 0 1 1 3.5 2.3c-.6.3-1 .9-1 1.6v.6"/><circle cx="12" cy="17" r=".6" fill="currentColor"/>'
251
+ '<circle cx="12" cy="12" r="10" /><path d="M9 9.5a3 2.5 0 016 0c0 2-2 2-3 3.5" /><path d="M12 17h.01" />'
274
252
  ),
275
253
  print: svg(
276
- '<path d="M7 9V3h10v6"/><rect x="3" y="9" width="18" height="8" rx="2"/><path d="M7 14h10v7H7z"/>'
254
+ '<path d="M6 18H4a2 2 0 0 1-2-2v-5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2v5a2 2 0 0 1-2 2h-2" /><path d="M6 9V3a1 1 0 0 1 1-1h10a1 1 0 0 1 1 1v6" /><rect x="6" y="14" width="12" height="8" rx="1" />'
277
255
  ),
278
- check: svg('<path d="m5 12 5 5 9-10"/>'),
279
- close: svg('<path d="M6 6l12 12M18 6 6 18"/>'),
280
- chevronDown: svg('<path d="m7 10 5 5 5-5"/>'),
256
+ check: svg('<path d="M20 6 9 17l-5-5" />'),
257
+ close: svg('<path d="M18 6 6 18" /><path d="m6 6 12 12" />'),
258
+ chevronDown: svg('<path d="m6 9 6 6 6-6" />'),
281
259
  more: svg(
282
- '<circle cx="5" cy="12" r="1.2" fill="currentColor"/><circle cx="12" cy="12" r="1.2" fill="currentColor"/><circle cx="19" cy="12" r="1.2" fill="currentColor"/>'
260
+ '<circle cx="12" cy="12" r="1" /><circle cx="19" cy="12" r="1" /><circle cx="5" cy="12" r="1" />'
261
+ ),
262
+ textColor: svg('<path d="M4 20h16" /><path d="m6 16 6-12 6 12" /><path d="M8 12h8" />'),
263
+ highlight: svg(
264
+ '<path d="m9 11-6 6v3h9l3-3" /><path d="m22 12-4.6 4.6a2 2 0 0 1-2.8 0l-5.2-5.2a2 2 0 0 1 0-2.8L14 4" />'
283
265
  ),
284
- // Буква «A» — цвет полоски под ней задаётся через currentColor у .nova-color-bar
285
- textColor: svg('<path d="m6 16 6-12 6 12"/><path d="M8.5 11h7"/>'),
286
- highlight: svg('<path d="m14 4 6 6-8 8H6v-6z"/><path d="m11 7 6 6"/>'),
287
266
  lineHeight: svg(
288
- '<path d="M11 6h10M11 12h10M11 18h10"/><path d="m3 8 3-3 3 3M3 16l3 3 3-3M6 5v14"/>'
267
+ '<path d="M15 14H9" /><path d="M21 21H3" /><path d="M21 3H3" /><path d="m8 16 3.453-7.648a.6.6 0 011.094.001L16 16" />'
289
268
  ),
290
269
  upload: svg(
291
- '<path d="M12 16V4"/><path d="m7 9 5-5 5 5"/><path d="M4 16v3a1 1 0 0 0 1 1h14a1 1 0 0 0 1-1v-3"/>'
270
+ '<path d="M12 3v12" /><path d="m17 8-5-5-5 5" /><path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4" />'
292
271
  ),
293
272
  externalLink: svg(
294
- '<path d="M14 4h6v6"/><path d="M20 4 10 14"/><path d="M18 14v5a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1h5"/>'
273
+ '<path d="M21 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h6" /><path d="m21 3-9 9" /><path d="M15 3h6v6" />'
295
274
  ),
296
275
  copy: svg(
297
- '<rect x="8" y="8" width="12" height="12" rx="2"/><path d="M16 8V5a1 1 0 0 0-1-1H5a1 1 0 0 0-1 1v10a1 1 0 0 0 1 1h3"/>'
276
+ '<rect width="14" height="14" x="8" y="8" rx="2" ry="2" /><path d="M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2" />'
277
+ ),
278
+ edit: svg(
279
+ '<path d="M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z" /><path d="m15 5 4 4" />'
280
+ ),
281
+ anchor: svg(
282
+ '<path d="M12 6v16" /><path d="m19 13 2-1a9 9 0 0 1-18 0l2 1" /><path d="M9 11h6" /><circle cx="12" cy="4" r="2" />'
283
+ ),
284
+ save: svg(
285
+ '<path d="M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z" /><path d="M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7" /><path d="M7 3v4a1 1 0 0 0 1 1h7" />'
286
+ ),
287
+ charmap: svg(
288
+ '<path d="M3 20h4.5a.5.5 0 0 0 .5-.5v-.282a.52.52 0 0 0-.247-.437 8 8 0 1 1 8.494-.001.52.52 0 0 0-.247.438v.282a.5.5 0 0 0 .5.5H21" />'
289
+ ),
290
+ commentAdd: svg(
291
+ '<path d="M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z" /><path d="M12 8v6" /><path d="M9 11h6" />'
298
292
  ),
299
- edit: svg('<path d="M4 20h4L19 9l-4-4L4 16z"/><path d="m13 7 4 4"/>')
293
+ comments: svg(
294
+ '<path d="M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z" /><path d="M7 11h10" /><path d="M7 15h6" /><path d="M7 7h8" />'
295
+ ),
296
+ emoji: svg(
297
+ '<path d="M15 10V9" /><path d="M16.472 15a6 6 0 01-8.943 0" /><path d="M9 10V9" /><circle cx="12" cy="12" r="10" />'
298
+ ),
299
+ dateTime: svg(
300
+ '<path d="M16 2v3" /><path d="M17 15.5v1.7l1 .625" /><path d="M21 8.936V5a2 2 0 00-2-2H5a2 2 0 00-2 2v14a2 2 0 002 2h3.935" /><path d="M3 9h9.873" /><path d="M8 2v3" /><circle cx="17" cy="17" r="5" />'
301
+ ),
302
+ media: svg(
303
+ '<rect x="3" y="3" width="18" height="18" rx="2" /><path d="M9 9.003a1 1 0 0 1 1.517-.859l4.997 2.997a1 1 0 0 1 0 1.718l-4.997 2.997A1 1 0 0 1 9 14.996z" />'
304
+ ),
305
+ nonBreaking: svg('<path d="M22 17v1c0 .5-.5 1-1 1H3c-.5 0-1-.5-1-1v-1" />'),
306
+ pageBreak: svg(
307
+ '<path d="M5.42 9.42 8 12" /><circle cx="4" cy="8" r="2" /><path d="m14 6-8.58 8.58" /><circle cx="4" cy="16" r="2" /><path d="M10.8 14.8 14 18" /><path d="M16 12h-2" /><path d="M22 12h-2" />'
308
+ ),
309
+ history: svg(
310
+ '<path d="M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8" /><path d="M3 3v5h5" /><path d="M12 7v5l4 2" />'
311
+ ),
312
+ suggest: svg(
313
+ '<path d="M13 21h8" /><path d="M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z" />'
314
+ ),
315
+ review: svg(
316
+ '<path d="M13 5h8" /><path d="M13 12h8" /><path d="M13 19h8" /><path d="m3 17 2 2 4-4" /><path d="m3 7 2 2 4-4" />'
317
+ ),
318
+ visualBlocks: svg(
319
+ '<path d="M5 3a2 2 0 0 0-2 2" /><path d="M19 3a2 2 0 0 1 2 2" /><path d="M21 19a2 2 0 0 1-2 2" /><path d="M5 21a2 2 0 0 1-2-2" /><path d="M9 3h1" /><path d="M9 21h1" /><path d="M14 3h1" /><path d="M14 21h1" /><path d="M3 9v1" /><path d="M21 9v1" /><path d="M3 14v1" /><path d="M21 14v1" />'
320
+ ),
321
+ ltr: svg(
322
+ '<path d="M10 3v11" /><path d="M10 9H7a1 1 0 0 1 0-6h8" /><path d="M14 3v11" /><path d="m18 14 4 4H2" /><path d="m22 18-4 4" />'
323
+ ),
324
+ rtl: svg(
325
+ '<path d="M14 3v11" /><path d="M14 9h-3a3 3 0 0 1 0-6h9" /><path d="M18 3v11" /><path d="M22 18H2l4-4" /><path d="m6 22-4-4" />'
326
+ )
300
327
  };
301
328
  }
302
329
  });
303
330
 
331
+ // src/ui/dom.ts
332
+ function h(tag, attrs = {}, ...children) {
333
+ const el = document.createElement(tag);
334
+ for (const [name, value] of Object.entries(attrs)) {
335
+ if (value === null || value === void 0 || value === false) continue;
336
+ if (typeof value === "function") {
337
+ el.addEventListener(name.replace(/^on/, "").toLowerCase(), value);
338
+ } else if (name === "className") {
339
+ el.className = String(value);
340
+ } else {
341
+ el.setAttribute(name, value === true ? "" : String(value));
342
+ }
343
+ }
344
+ for (const child of children.flat()) {
345
+ if (child === null || child === void 0 || child === false) continue;
346
+ el.append(child);
347
+ }
348
+ return el;
349
+ }
350
+ function icon(svg2) {
351
+ const span = document.createElement("span");
352
+ span.className = "nova-icon";
353
+ span.innerHTML = svg2;
354
+ return span;
355
+ }
356
+ function uniqueId(prefix = "nova") {
357
+ uid += 1;
358
+ return `${prefix}-${uid}`;
359
+ }
360
+ function formatShortcut(shortcut) {
361
+ const parts = shortcut.split("-");
362
+ const key3 = parts.pop();
363
+ const keyLabel = key3.length === 1 ? key3.toUpperCase() : key3;
364
+ if (isMac) {
365
+ const map2 = { Mod: "\u2318", Shift: "\u21E7", Alt: "\u2325", Ctrl: "\u2303" };
366
+ return parts.map((p) => map2[p] ?? p).join("") + keyLabel;
367
+ }
368
+ const map = { Mod: "Ctrl", Shift: "Shift", Alt: "Alt", Ctrl: "Ctrl" };
369
+ return [...parts.map((p) => map[p] ?? p), keyLabel].join("+");
370
+ }
371
+ var uid, isMac, FOCUSABLE;
372
+ var init_dom = __esm({
373
+ "src/ui/dom.ts"() {
374
+ "use strict";
375
+ uid = 0;
376
+ isMac = typeof navigator !== "undefined" && /Mac|iP(hone|[oa]d)/.test(navigator.platform);
377
+ FOCUSABLE = 'a[href], button:not([disabled]), input:not([disabled]):not([type="hidden"]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])';
378
+ }
379
+ });
380
+
304
381
  // src/ui/dialog.ts
305
382
  function openDialog(options) {
306
383
  const titleId = uniqueId("nova-dialog-title");
@@ -1645,8 +1722,9 @@ var ICON4, LABELS7, FORMATS, insertdatetime_default;
1645
1722
  var init_insertdatetime = __esm({
1646
1723
  "src/plugins/insertdatetime.ts"() {
1647
1724
  "use strict";
1725
+ init_icons();
1648
1726
  init_plugins();
1649
- ICON4 = '<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"><rect x="3" y="5" width="18" height="16" rx="2"/><path d="M3 10h18M8 3v4M16 3v4"/><path d="M12 13v3l2 1"/></svg>';
1727
+ ICON4 = icons.dateTime;
1650
1728
  LABELS7 = {
1651
1729
  en: {
1652
1730
  title: "Insert date/time",
@@ -2755,9 +2833,10 @@ var ICON5, LABELS8, SYMBOLS, charmap_default;
2755
2833
  var init_charmap = __esm({
2756
2834
  "src/plugins/charmap.ts"() {
2757
2835
  "use strict";
2836
+ init_icons();
2758
2837
  init_plugins();
2759
2838
  init_shared();
2760
- ICON5 = '<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>';
2839
+ ICON5 = icons.charmap;
2761
2840
  LABELS8 = {
2762
2841
  en: {
2763
2842
  title: "Special character",
@@ -2950,9 +3029,10 @@ var ICON6, LABELS9, EMOJI, emoticons_default;
2950
3029
  var init_emoticons = __esm({
2951
3030
  "src/plugins/emoticons.ts"() {
2952
3031
  "use strict";
3032
+ init_icons();
2953
3033
  init_plugins();
2954
3034
  init_shared();
2955
- ICON6 = '<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"><circle cx="12" cy="12" r="9"/><path d="M8 14s1.5 2 4 2 4-2 4-2"/><path d="M9 9h.01M15 9h.01"/></svg>';
3035
+ ICON6 = icons.emoji;
2956
3036
  LABELS9 = {
2957
3037
  en: {
2958
3038
  title: "Emoji",
@@ -3164,11 +3244,12 @@ var import_prosemirror_keymap4, NBSP, ICON7, LABELS10, nonbreaking_default;
3164
3244
  var init_nonbreaking = __esm({
3165
3245
  "src/plugins/nonbreaking.ts"() {
3166
3246
  "use strict";
3247
+ init_icons();
3167
3248
  import_prosemirror_keymap4 = require("prosemirror-keymap");
3168
3249
  init_plugins();
3169
3250
  init_shared();
3170
3251
  NBSP = String.fromCharCode(160);
3171
- ICON7 = '<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="M4 9v5h16V9"/></svg>';
3252
+ ICON7 = icons.nonBreaking;
3172
3253
  LABELS10 = { en: { title: "Nonbreaking space" }, ru: { title: "\u041D\u0435\u0440\u0430\u0437\u0440\u044B\u0432\u043D\u044B\u0439 \u043F\u0440\u043E\u0431\u0435\u043B" } };
3173
3254
  nonbreaking_default = definePlugin({
3174
3255
  name: "nonbreaking",
@@ -3308,9 +3389,10 @@ var ICON8, LABELS11, autosave_default;
3308
3389
  var init_autosave = __esm({
3309
3390
  "src/plugins/autosave.ts"() {
3310
3391
  "use strict";
3392
+ init_icons();
3311
3393
  init_plugins();
3312
3394
  init_shared();
3313
- ICON8 = '<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>';
3395
+ ICON8 = icons.save;
3314
3396
  LABELS11 = {
3315
3397
  en: {
3316
3398
  restore: "Restore last draft",
@@ -3431,9 +3513,10 @@ var ICON9, LABELS12, visualblocks_default;
3431
3513
  var init_visualblocks = __esm({
3432
3514
  "src/plugins/visualblocks.ts"() {
3433
3515
  "use strict";
3516
+ init_icons();
3434
3517
  init_plugins();
3435
3518
  init_shared();
3436
- ICON9 = '<svg viewBox="0 0 24 24" width="18" height="18" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" stroke-dasharray="3 3" aria-hidden="true"><rect x="3" y="4" width="18" height="6" rx="1"/><rect x="3" y="14" width="18" height="6" rx="1"/></svg>';
3519
+ ICON9 = icons.visualBlocks;
3437
3520
  LABELS12 = { en: { title: "Show blocks" }, ru: { title: "\u041F\u043E\u043A\u0430\u0437\u0430\u0442\u044C \u0431\u043B\u043E\u043A\u0438" } };
3438
3521
  visualblocks_default = definePlugin({
3439
3522
  name: "visualblocks",
@@ -3494,12 +3577,13 @@ var ICONS, LABELS13, directionality_default;
3494
3577
  var init_directionality = __esm({
3495
3578
  "src/plugins/directionality.ts"() {
3496
3579
  "use strict";
3580
+ init_icons();
3497
3581
  init_commands();
3498
3582
  init_plugins();
3499
3583
  init_shared();
3500
3584
  ICONS = {
3501
- ltr: '<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="M9 4v10M13 4v10M7 4h9M5 19h14l-3-3M19 19l-3 3"/></svg>',
3502
- rtl: '<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="M11 4v10M15 4v10M9 4h9M19 19H5l3-3M5 19l3 3"/></svg>'
3585
+ ltr: icons.ltr,
3586
+ rtl: icons.rtl
3503
3587
  };
3504
3588
  LABELS13 = {
3505
3589
  en: { ltr: "Left to right", rtl: "Right to left" },
@@ -9237,6 +9321,7 @@ var import_prosemirror_model10, import_prosemirror_history3, import_prosemirror_
9237
9321
  var init_revisionhistory = __esm({
9238
9322
  "src/plugins/revisionhistory.ts"() {
9239
9323
  "use strict";
9324
+ init_icons();
9240
9325
  import_prosemirror_model10 = require("prosemirror-model");
9241
9326
  import_prosemirror_history3 = require("prosemirror-history");
9242
9327
  import_prosemirror_state18 = require("prosemirror-state");
@@ -9285,7 +9370,7 @@ var init_revisionhistory = __esm({
9285
9370
  versions: "\u0412\u0435\u0440\u0441\u0438\u0438"
9286
9371
  }
9287
9372
  };
9288
- ICON10 = '<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>';
9373
+ ICON10 = icons.history;
9289
9374
  serializer = new HTMLSerializer();
9290
9375
  revisionhistory_default = definePlugin({
9291
9376
  name: "revisionhistory",
@@ -9417,12 +9502,13 @@ module.exports = __toCommonJS(index_exports);
9417
9502
  init_plugins();
9418
9503
 
9419
9504
  // src/plugins/anchor.ts
9505
+ init_icons();
9420
9506
  var import_prosemirror_state = require("prosemirror-state");
9421
9507
  init_plugins();
9422
9508
  init_dialog();
9423
9509
  init_dom();
9424
9510
  init_shared();
9425
- 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"><circle cx="12" cy="5" r="2"/><path d="M12 7v14M5 12H3a9 9 0 0 0 18 0h-2"/></svg>';
9511
+ var ICON = icons.anchor;
9426
9512
  var LABELS = {
9427
9513
  en: {
9428
9514
  title: "Anchor",
@@ -9511,6 +9597,7 @@ var anchor_default = definePlugin({
9511
9597
  });
9512
9598
 
9513
9599
  // src/plugins/comments.ts
9600
+ init_icons();
9514
9601
  var import_prosemirror_state2 = require("prosemirror-state");
9515
9602
  var import_prosemirror_view = require("prosemirror-view");
9516
9603
  var import_prosemirror_keymap = require("prosemirror-keymap");
@@ -9673,8 +9760,8 @@ var LABELS3 = {
9673
9760
  count: "\u041A\u043E\u043C\u043C\u0435\u043D\u0442\u0430\u0440\u0438\u0435\u0432: {count}"
9674
9761
  }
9675
9762
  };
9676
- var ICON_ADD = '<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="M21 12a8 8 0 0 1-11.6 7.1L4 20l1-4.6A8 8 0 1 1 21 12z"/><path d="M12 8v8M8 12h8"/></svg>';
9677
- var ICON_SHOW = '<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="M21 12a8 8 0 0 1-11.6 7.1L4 20l1-4.6A8 8 0 1 1 21 12z"/><path d="M8.5 10h7M8.5 14h4"/></svg>';
9763
+ var ICON_ADD = icons.commentAdd;
9764
+ var ICON_SHOW = icons.comments;
9678
9765
  var SHORTCUT = "Mod-Alt-m";
9679
9766
  var commentsKey = new import_prosemirror_state2.PluginKey("nova-comments");
9680
9767
  var controllers = /* @__PURE__ */ new WeakMap();
@@ -9992,6 +10079,7 @@ var comments_default = definePlugin({
9992
10079
  });
9993
10080
 
9994
10081
  // src/plugins/suggestions.ts
10082
+ init_icons();
9995
10083
  var import_prosemirror_model = require("prosemirror-model");
9996
10084
  var import_prosemirror_state3 = require("prosemirror-state");
9997
10085
  var import_prosemirror_transform = require("prosemirror-transform");
@@ -10033,10 +10121,10 @@ var LABELS4 = {
10033
10121
  none: "\u041F\u0440\u0430\u0432\u043E\u043A \u043D\u0435\u0442"
10034
10122
  }
10035
10123
  };
10036
- var ICON_TOGGLE = '<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="M12 20h9"/><path d="M16.5 3.5a2.1 2.1 0 0 1 3 3L7 19l-4 1 1-4z"/></svg>';
10037
- var ICON_REVIEW = '<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="M9 11l3 3 8-8"/><path d="M20 12v7a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h11"/></svg>';
10038
- var ICON_ACCEPT = '<svg viewBox="0 0 24 24" width="18" height="18" fill="none" stroke="currentColor" stroke-width="2.4" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M5 12l5 5 9-10"/></svg>';
10039
- var ICON_REJECT = '<svg viewBox="0 0 24 24" width="18" height="18" fill="none" stroke="currentColor" stroke-width="2.4" stroke-linecap="round" aria-hidden="true"><path d="M6 6l12 12M18 6L6 18"/></svg>';
10124
+ var ICON_TOGGLE = icons.suggest;
10125
+ var ICON_REVIEW = icons.review;
10126
+ var ICON_ACCEPT = icons.check;
10127
+ var ICON_REJECT = icons.close;
10040
10128
  var suggestionsKey = new import_prosemirror_state3.PluginKey("nova-suggestions");
10041
10129
  var OWN = "nova-suggestions-own";
10042
10130
  var PALETTE2 = ["#1a7f37", "#8250df", "#bf3989", "#0969da", "#bc4c00", "#1b7c83"];
@@ -10418,6 +10506,7 @@ var suggestions_default = definePlugin({
10418
10506
  });
10419
10507
 
10420
10508
  // src/plugins/media.ts
10509
+ init_icons();
10421
10510
  var import_prosemirror_state4 = require("prosemirror-state");
10422
10511
  init_plugins();
10423
10512
  init_schema();
@@ -10437,7 +10526,7 @@ function parseMediaUrl(url) {
10437
10526
  if (VIDEO_FILE.test(value)) return { kind: "video", src: value };
10438
10527
  return null;
10439
10528
  }
10440
- var ICON2 = '<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"><rect x="2" y="5" width="20" height="14" rx="2"/><path d="m10 9 5 3-5 3z"/></svg>';
10529
+ var ICON2 = icons.media;
10441
10530
  var LABELS5 = {
10442
10531
  en: {
10443
10532
  title: "Video",
@@ -10608,9 +10697,10 @@ var media_default = definePlugin({
10608
10697
  });
10609
10698
 
10610
10699
  // src/plugins/pagebreak.ts
10700
+ init_icons();
10611
10701
  init_plugins();
10612
10702
  init_shared();
10613
- var ICON3 = '<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="M6 3v5h12V3M6 21v-5h12v5"/><path d="M3 12h2M9 12h2M15 12h2M21 12h-0"/></svg>';
10703
+ var ICON3 = icons.pageBreak;
10614
10704
  var LABELS6 = { en: { title: "Page break" }, ru: { title: "\u0420\u0430\u0437\u0440\u044B\u0432 \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u044B" } };
10615
10705
  var pagebreak_default = definePlugin({
10616
10706
  name: "pagebreak",