@burdenoff/microfe-support 2026.1115.1 → 2026.1118.1

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 (90) hide show
  1. package/dist/support/components/careers/RichTextEditor.js +31 -31
  2. package/dist/support/components/careers/RichTextEditor.js.map +1 -1
  3. package/package.json +1 -1
  4. package/dist/_virtual/_rolldown/runtime.js +0 -6
  5. package/dist/node_modules/@tiptap/core/dist/index.js +0 -3491
  6. package/dist/node_modules/@tiptap/core/dist/index.js.map +0 -1
  7. package/dist/node_modules/@tiptap/core/dist/jsx-runtime/jsx-runtime.js +0 -44
  8. package/dist/node_modules/@tiptap/core/dist/jsx-runtime/jsx-runtime.js.map +0 -1
  9. package/dist/node_modules/@tiptap/core/dist/rolldown-runtime-D7D4PA-g.js +0 -12
  10. package/dist/node_modules/@tiptap/core/dist/rolldown-runtime-D7D4PA-g.js.map +0 -1
  11. package/dist/node_modules/@tiptap/extension-blockquote/dist/index.js +0 -75
  12. package/dist/node_modules/@tiptap/extension-blockquote/dist/index.js.map +0 -1
  13. package/dist/node_modules/@tiptap/extension-bold/dist/index.js +0 -73
  14. package/dist/node_modules/@tiptap/extension-bold/dist/index.js.map +0 -1
  15. package/dist/node_modules/@tiptap/extension-code/dist/index.js +0 -78
  16. package/dist/node_modules/@tiptap/extension-code/dist/index.js.map +0 -1
  17. package/dist/node_modules/@tiptap/extension-code-block/dist/index.js +0 -157
  18. package/dist/node_modules/@tiptap/extension-code-block/dist/index.js.map +0 -1
  19. package/dist/node_modules/@tiptap/extension-document/dist/index.js +0 -11
  20. package/dist/node_modules/@tiptap/extension-document/dist/index.js.map +0 -1
  21. package/dist/node_modules/@tiptap/extension-hard-break/dist/index.js +0 -50
  22. package/dist/node_modules/@tiptap/extension-hard-break/dist/index.js.map +0 -1
  23. package/dist/node_modules/@tiptap/extension-heading/dist/index.js +0 -70
  24. package/dist/node_modules/@tiptap/extension-heading/dist/index.js.map +0 -1
  25. package/dist/node_modules/@tiptap/extension-horizontal-rule/dist/index.js +0 -49
  26. package/dist/node_modules/@tiptap/extension-horizontal-rule/dist/index.js.map +0 -1
  27. package/dist/node_modules/@tiptap/extension-italic/dist/index.js +0 -70
  28. package/dist/node_modules/@tiptap/extension-italic/dist/index.js.map +0 -1
  29. package/dist/node_modules/@tiptap/extension-link/dist/index.js +0 -389
  30. package/dist/node_modules/@tiptap/extension-link/dist/index.js.map +0 -1
  31. package/dist/node_modules/@tiptap/extension-list/dist/index.js +0 -967
  32. package/dist/node_modules/@tiptap/extension-list/dist/index.js.map +0 -1
  33. package/dist/node_modules/@tiptap/extension-paragraph/dist/index.js +0 -46
  34. package/dist/node_modules/@tiptap/extension-paragraph/dist/index.js.map +0 -1
  35. package/dist/node_modules/@tiptap/extension-placeholder/dist/index.js +0 -6
  36. package/dist/node_modules/@tiptap/extension-placeholder/dist/index.js.map +0 -1
  37. package/dist/node_modules/@tiptap/extension-strike/dist/index.js +0 -55
  38. package/dist/node_modules/@tiptap/extension-strike/dist/index.js.map +0 -1
  39. package/dist/node_modules/@tiptap/extension-text/dist/index.js +0 -14
  40. package/dist/node_modules/@tiptap/extension-text/dist/index.js.map +0 -1
  41. package/dist/node_modules/@tiptap/extension-underline/dist/index.js +0 -72
  42. package/dist/node_modules/@tiptap/extension-underline/dist/index.js.map +0 -1
  43. package/dist/node_modules/@tiptap/extensions/dist/index.js +0 -457
  44. package/dist/node_modules/@tiptap/extensions/dist/index.js.map +0 -1
  45. package/dist/node_modules/@tiptap/react/dist/index.js +0 -332
  46. package/dist/node_modules/@tiptap/react/dist/index.js.map +0 -1
  47. package/dist/node_modules/@tiptap/starter-kit/dist/index.js +0 -28
  48. package/dist/node_modules/@tiptap/starter-kit/dist/index.js.map +0 -1
  49. package/dist/node_modules/fast-equals/dist/es/index.js +0 -298
  50. package/dist/node_modules/fast-equals/dist/es/index.js.map +0 -1
  51. package/dist/node_modules/linkifyjs/dist/linkify.js +0 -527
  52. package/dist/node_modules/linkifyjs/dist/linkify.js.map +0 -1
  53. package/dist/node_modules/orderedmap/dist/index.js +0 -68
  54. package/dist/node_modules/orderedmap/dist/index.js.map +0 -1
  55. package/dist/node_modules/prosemirror-commands/dist/index.js +0 -334
  56. package/dist/node_modules/prosemirror-commands/dist/index.js.map +0 -1
  57. package/dist/node_modules/prosemirror-dropcursor/dist/index.js +0 -112
  58. package/dist/node_modules/prosemirror-dropcursor/dist/index.js.map +0 -1
  59. package/dist/node_modules/prosemirror-gapcursor/dist/index.js +0 -168
  60. package/dist/node_modules/prosemirror-gapcursor/dist/index.js.map +0 -1
  61. package/dist/node_modules/prosemirror-history/dist/index.js +0 -219
  62. package/dist/node_modules/prosemirror-history/dist/index.js.map +0 -1
  63. package/dist/node_modules/prosemirror-keymap/dist/index.js +0 -51
  64. package/dist/node_modules/prosemirror-keymap/dist/index.js.map +0 -1
  65. package/dist/node_modules/prosemirror-model/dist/index.js +0 -1775
  66. package/dist/node_modules/prosemirror-model/dist/index.js.map +0 -1
  67. package/dist/node_modules/prosemirror-schema-list/dist/index.js +0 -77
  68. package/dist/node_modules/prosemirror-schema-list/dist/index.js.map +0 -1
  69. package/dist/node_modules/prosemirror-state/dist/index.js +0 -526
  70. package/dist/node_modules/prosemirror-state/dist/index.js.map +0 -1
  71. package/dist/node_modules/prosemirror-transform/dist/index.js +0 -1204
  72. package/dist/node_modules/prosemirror-transform/dist/index.js.map +0 -1
  73. package/dist/node_modules/prosemirror-view/dist/index.js +0 -3355
  74. package/dist/node_modules/prosemirror-view/dist/index.js.map +0 -1
  75. package/dist/node_modules/rope-sequence/dist/index.js +0 -84
  76. package/dist/node_modules/rope-sequence/dist/index.js.map +0 -1
  77. package/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.development.js +0 -55
  78. package/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.development.js.map +0 -1
  79. package/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.production.js +0 -53
  80. package/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.production.js.map +0 -1
  81. package/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.development.js +0 -53
  82. package/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.development.js.map +0 -1
  83. package/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.production.js +0 -45
  84. package/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.production.js.map +0 -1
  85. package/dist/node_modules/use-sync-external-store/shim/index.js +0 -11
  86. package/dist/node_modules/use-sync-external-store/shim/index.js.map +0 -1
  87. package/dist/node_modules/use-sync-external-store/shim/with-selector.js +0 -11
  88. package/dist/node_modules/use-sync-external-store/shim/with-selector.js.map +0 -1
  89. package/dist/node_modules/w3c-keyname/index.js +0 -89
  90. package/dist/node_modules/w3c-keyname/index.js.map +0 -1
@@ -1,457 +0,0 @@
1
- import { Extension as e, callOrReturn as t, getChangedRanges as n, getExtensionField as r, isNodeEmpty as i, isNodeSelection as a } from "../../core/dist/index.js";
2
- import { Plugin as o, PluginKey as s } from "../../../prosemirror-state/dist/index.js";
3
- import { dropCursor as c } from "../../../prosemirror-dropcursor/dist/index.js";
4
- import { Decoration as l, DecorationSet as u } from "../../../prosemirror-view/dist/index.js";
5
- import { gapCursor as d } from "../../../prosemirror-gapcursor/dist/index.js";
6
- import { history as f, redo as p, undo as m } from "../../../prosemirror-history/dist/index.js";
7
- e.create({
8
- name: "characterCount",
9
- addOptions() {
10
- return {
11
- limit: null,
12
- autoTrim: !0,
13
- mode: "textSize",
14
- textCounter: (e) => e.length,
15
- wordCounter: (e) => e.split(" ").filter((e) => e !== "").length
16
- };
17
- },
18
- addStorage() {
19
- return {
20
- characters: () => 0,
21
- words: () => 0
22
- };
23
- },
24
- onBeforeCreate() {
25
- this.storage.characters = (e) => {
26
- let t = e?.node || this.editor.state.doc;
27
- if ((e?.mode || this.options.mode) === "textSize") {
28
- let e = t.textBetween(0, t.content.size, void 0, " ");
29
- return this.options.textCounter(e);
30
- }
31
- return t.nodeSize;
32
- }, this.storage.words = (e) => {
33
- let t = e?.node || this.editor.state.doc, n = t.textBetween(0, t.content.size, " ", " ");
34
- return this.options.wordCounter(n);
35
- };
36
- },
37
- addProseMirrorPlugins() {
38
- let e = !1;
39
- return [new o({
40
- key: new s("characterCount"),
41
- appendTransaction: (t, n, r) => {
42
- if (e) return;
43
- let i = this.options.limit, a = this.options.autoTrim;
44
- if (i == null || i === 0 || a === !1) {
45
- e = !0;
46
- return;
47
- }
48
- let o = this.storage.characters({ node: r.doc });
49
- if (o > i) {
50
- let t = o - i;
51
- console.warn(`[CharacterCount] Initial content exceeded limit of ${i} characters. Content was automatically trimmed.`);
52
- let n = r.tr.deleteRange(0, t);
53
- return e = !0, n;
54
- }
55
- e = !0;
56
- },
57
- filterTransaction: (e, t) => {
58
- let n = this.options.limit;
59
- if (!e.docChanged || n === 0 || n == null) return !0;
60
- let r = this.storage.characters({ node: t.doc }), i = this.storage.characters({ node: e.doc });
61
- if (i <= n || r > n && i > n && i <= r) return !0;
62
- if (r > n && i > n && i > r || !e.getMeta("paste")) return !1;
63
- let a = e.selection.$head.pos, o = a - (i - n), s = a;
64
- return e.deleteRange(o, s), !(this.storage.characters({ node: e.doc }) > n);
65
- }
66
- })];
67
- }
68
- });
69
- var h = e.create({
70
- name: "dropCursor",
71
- addOptions() {
72
- return {
73
- color: "currentColor",
74
- width: 1,
75
- class: void 0
76
- };
77
- },
78
- addProseMirrorPlugins() {
79
- return [c(this.options)];
80
- }
81
- });
82
- e.create({
83
- name: "focus",
84
- addOptions() {
85
- return {
86
- className: "has-focus",
87
- mode: "all"
88
- };
89
- },
90
- addProseMirrorPlugins() {
91
- return [new o({
92
- key: new s("focus"),
93
- props: { decorations: ({ doc: e, selection: t }) => {
94
- let { isEditable: n, isFocused: r } = this.editor, { anchor: i } = t, a = [];
95
- if (!n || !r) return u.create(e, []);
96
- let o = 0;
97
- this.options.mode === "deepest" && e.descendants((e, t) => {
98
- if (!e.isText) {
99
- if (!(i >= t && i <= t + e.nodeSize - 1)) return !1;
100
- o += 1;
101
- }
102
- });
103
- let s = 0;
104
- return e.descendants((e, t) => {
105
- if (e.isText || !(i >= t && i <= t + e.nodeSize - 1)) return !1;
106
- if (s += 1, this.options.mode === "deepest" && o - s > 0 || this.options.mode === "shallowest" && s > 1) return this.options.mode === "deepest";
107
- a.push(l.node(t, t + e.nodeSize, { class: this.options.className }));
108
- }), u.create(e, a);
109
- } }
110
- })];
111
- }
112
- });
113
- var g = e.create({
114
- name: "gapCursor",
115
- addProseMirrorPlugins() {
116
- return [d()];
117
- },
118
- extendNodeSchema(e) {
119
- let n = {
120
- name: e.name,
121
- options: e.options,
122
- storage: e.storage
123
- };
124
- return { allowGapCursor: t(r(e, "allowGapCursor", n)) ?? null };
125
- }
126
- }), _ = "placeholder", v = new s("tiptap__placeholder");
127
- function y(e) {
128
- let { editor: t, placeholder: n, dataAttribute: r, pos: i, node: a, isEmptyDoc: o, hasAnchor: s, classes: { emptyNode: c, emptyEditor: u } } = e, d = [c];
129
- return o && d.push(u), l.node(i, i + a.nodeSize, {
130
- class: d.join(" "),
131
- [r]: typeof n == "function" ? n({
132
- editor: t,
133
- node: a,
134
- pos: i,
135
- hasAnchor: s
136
- }) : n
137
- });
138
- }
139
- function b(e, t) {
140
- return typeof e == "function" ? e(t) : e;
141
- }
142
- function x({ editor: e, options: t, dataAttribute: n, doc: r, selection: a, from: o, to: s }) {
143
- let { anchor: c } = a, l = [], u = e.isEmpty;
144
- return r.nodesBetween(o, s, (r, a) => {
145
- let o = c >= a && c <= a + r.nodeSize, s = !r.isLeaf && i(r);
146
- return r.type.isTextblock && (o || !t.showOnlyCurrent) && s && l.push(y({
147
- editor: e,
148
- isEmptyDoc: u,
149
- dataAttribute: n,
150
- hasAnchor: o,
151
- placeholder: t.placeholder,
152
- classes: {
153
- emptyEditor: t.emptyEditorClass,
154
- emptyNode: b(t.emptyNodeClass, {
155
- editor: e,
156
- node: r,
157
- pos: a,
158
- hasAnchor: o
159
- })
160
- },
161
- node: r,
162
- pos: a
163
- })), t.includeChildren;
164
- }), l;
165
- }
166
- function S({ editor: e, options: t, dataAttribute: n, doc: r, selection: a }) {
167
- if (!e.isEditable && t.showOnlyWhenEditable) return null;
168
- let { anchor: o } = a, s = [], c = e.isEmpty;
169
- if (t.showOnlyCurrent && !t.includeChildren) {
170
- let a = r.resolve(o), l = a.depth > 0 ? a.node(1) : a.nodeAfter, u = a.depth > 0 ? a.before(1) : o;
171
- if (l && l.type.isTextblock && i(l)) {
172
- let r = o >= u && o <= u + l.nodeSize;
173
- s.push(y({
174
- editor: e,
175
- isEmptyDoc: c,
176
- dataAttribute: n,
177
- hasAnchor: r,
178
- placeholder: t.placeholder,
179
- classes: {
180
- emptyEditor: t.emptyEditorClass,
181
- emptyNode: b(t.emptyNodeClass, {
182
- editor: e,
183
- node: l,
184
- pos: u,
185
- hasAnchor: r
186
- })
187
- },
188
- node: l,
189
- pos: u
190
- }));
191
- }
192
- } else s.push(...x({
193
- editor: e,
194
- options: t,
195
- dataAttribute: n,
196
- doc: r,
197
- selection: a,
198
- from: 0,
199
- to: r.content.size
200
- }));
201
- return u.create(r, s);
202
- }
203
- function C(e, t) {
204
- let n = e.resolve(t);
205
- if (n.depth === 0) {
206
- let e = n.nodeAfter ?? n.nodeBefore;
207
- if (!e) return {
208
- from: t,
209
- to: t
210
- };
211
- let r = n.nodeAfter ? t : t - e.nodeSize;
212
- return {
213
- from: r,
214
- to: r + e.nodeSize
215
- };
216
- }
217
- let r = n.before(1);
218
- return {
219
- from: r,
220
- to: r + n.node(1).nodeSize
221
- };
222
- }
223
- function w(e, t) {
224
- return {
225
- from: Math.max(0, t.from),
226
- to: Math.min(e.content.size, t.to)
227
- };
228
- }
229
- function T(e, t, n) {
230
- let r = [];
231
- return e.forEach((e, i) => {
232
- let a = i, o = a + e.nodeSize, s = a + 1, c = o + 1;
233
- s < n && c > t && r.push({
234
- from: a,
235
- to: o
236
- });
237
- }), r;
238
- }
239
- function E(e) {
240
- if (e.length === 0) return [];
241
- let t = [...e].sort((e, t) => e.from - t.from), n = [{ ...t[0] }];
242
- for (let e = 1; e < t.length; e += 1) {
243
- let r = n[n.length - 1], i = t[e];
244
- i.from <= r.to ? r.to = Math.max(r.to, i.to) : n.push({ ...i });
245
- }
246
- return n;
247
- }
248
- function D(e, t) {
249
- let n = T(e, t.from, t.to);
250
- return n.push(w(e, C(e, t.from))), t.to > t.from ? n.push(w(e, C(e, Math.min(t.to, e.content.size + 1) - 1))) : t.from < e.content.size + 1 && n.push(w(e, C(e, Math.min(t.from + 1, e.content.size)))), n;
251
- }
252
- function O(e, t, r) {
253
- let i = [];
254
- if (e.docChanged) {
255
- let t = n(e);
256
- for (let e of t) i.push(...D(r.doc, e.newRange));
257
- }
258
- return e.selectionSet && (i.push(w(r.doc, C(r.doc, e.mapping.map(t.selection.anchor)))), i.push(w(r.doc, C(r.doc, r.selection.anchor)))), E(i);
259
- }
260
- function k(e, t, n) {
261
- let r = Math.max(0, Math.min(e, n.content.size));
262
- return {
263
- from: r,
264
- to: Math.max(r, Math.min(t, n.content.size))
265
- };
266
- }
267
- function A({ decorations: e, ranges: t, editor: n, options: r, dataAttribute: i, doc: a, selection: o }) {
268
- let s = e;
269
- for (let e of t) {
270
- let { from: t, to: c } = k(e.from, e.to, a), l = s.find(t, c).filter((e) => e.from >= t && e.to <= c);
271
- l.length && (s = s.remove(l));
272
- let u = x({
273
- editor: n,
274
- options: r,
275
- dataAttribute: i,
276
- doc: a,
277
- selection: o,
278
- from: t,
279
- to: c
280
- });
281
- u.length && (s = s.add(a, u));
282
- }
283
- return s;
284
- }
285
- function j({ editor: e, options: t, dataAttribute: n }) {
286
- return {
287
- init(r, i) {
288
- return S({
289
- editor: e,
290
- options: t,
291
- dataAttribute: n,
292
- doc: i.doc,
293
- selection: i.selection
294
- }) ?? u.empty;
295
- },
296
- apply(r, i, a, o) {
297
- return !r.docChanged && !r.selectionSet ? i : A({
298
- decorations: i.map(r.mapping, r.doc),
299
- ranges: O(r, a, o),
300
- editor: e,
301
- options: t,
302
- dataAttribute: n,
303
- doc: o.doc,
304
- selection: o.selection
305
- });
306
- }
307
- };
308
- }
309
- function M(e) {
310
- return e.replace(/\s+/g, "-").replace(/[^a-zA-Z0-9-]/g, "").replace(/^[0-9-]+/, "").replace(/^-+/, "").toLowerCase();
311
- }
312
- function N({ editor: e, options: t }) {
313
- let n = t.dataAttribute ? `data-${M(t.dataAttribute)}` : `data-${_}`, r = t.showOnlyCurrent && !t.includeChildren;
314
- return new o({
315
- key: v,
316
- ...r ? {} : { state: j({
317
- editor: e,
318
- options: t,
319
- dataAttribute: n
320
- }) },
321
- props: { decorations: r ? ({ doc: r, selection: i }) => S({
322
- editor: e,
323
- options: t,
324
- dataAttribute: n,
325
- doc: r,
326
- selection: i
327
- }) : (n) => t.showOnlyWhenEditable && !e.isEditable ? u.empty : v.getState(n) ?? u.empty }
328
- });
329
- }
330
- var P = e.create({
331
- name: "placeholder",
332
- addOptions() {
333
- return {
334
- emptyEditorClass: "is-editor-empty",
335
- emptyNodeClass: "is-empty",
336
- dataAttribute: _,
337
- placeholder: "Write something …",
338
- showOnlyWhenEditable: !0,
339
- showOnlyCurrent: !0,
340
- includeChildren: !1
341
- };
342
- },
343
- addProseMirrorPlugins() {
344
- return [N({
345
- editor: this.editor,
346
- options: this.options
347
- })];
348
- }
349
- });
350
- function F(e, t) {
351
- return !e.selection.empty && !a(e.selection) && t.isEditable;
352
- }
353
- function I(e, t) {
354
- return F(e, t) && !t.isFocused && !t.view.dragging;
355
- }
356
- function L() {
357
- var e;
358
- (e = window.getSelection()) == null || e.removeAllRanges();
359
- }
360
- function R(e) {
361
- e.focus();
362
- }
363
- e.create({
364
- name: "selection",
365
- addOptions() {
366
- return { className: "selection" };
367
- },
368
- addProseMirrorPlugins() {
369
- let { editor: e, options: t } = this;
370
- return [new o({
371
- key: new s("selection"),
372
- props: {
373
- decorations(n) {
374
- return I(n, e) ? u.create(n.doc, [l.inline(n.selection.from, n.selection.to, { class: t.className })]) : null;
375
- },
376
- handleDOMEvents: {
377
- blur(t) {
378
- return F(t.state, e) && L(), !1;
379
- },
380
- focus(t) {
381
- return F(t.state, e) && requestAnimationFrame(() => {
382
- !e.isDestroyed && t.hasFocus() && R(t);
383
- }), !1;
384
- }
385
- }
386
- }
387
- })];
388
- }
389
- });
390
- function z({ types: e, node: t }) {
391
- return t && Array.isArray(e) && e.includes(t.type) || t?.type === e;
392
- }
393
- var B = e.create({
394
- name: "trailingNode",
395
- addOptions() {
396
- return {
397
- node: void 0,
398
- notAfter: []
399
- };
400
- },
401
- addProseMirrorPlugins() {
402
- let e = new s(this.name), t = this.options.node || this.editor.schema.topNodeType.contentMatch.defaultType?.name || "paragraph", n = Object.entries(this.editor.schema.nodes).map(([, e]) => e).filter((e) => (this.options.notAfter || []).concat(t).includes(e.name));
403
- return [new o({
404
- key: e,
405
- appendTransaction: (n, r, i) => {
406
- let { doc: a, tr: o, schema: s } = i, c = e.getState(i), l = a.content.size, u = s.nodes[t];
407
- if (!n.some((e) => e.getMeta("skipTrailingNode")) && c) return o.insert(l, u.create());
408
- },
409
- state: {
410
- init: (e, t) => {
411
- let r = t.tr.doc.lastChild;
412
- return !z({
413
- node: r,
414
- types: n
415
- });
416
- },
417
- apply: (e, t) => {
418
- if (!e.docChanged || e.getMeta("__uniqueIDTransaction")) return t;
419
- let r = e.doc.lastChild;
420
- return !z({
421
- node: r,
422
- types: n
423
- });
424
- }
425
- }
426
- })];
427
- }
428
- }), V = e.create({
429
- name: "undoRedo",
430
- addOptions() {
431
- return {
432
- depth: 100,
433
- newGroupDelay: 500
434
- };
435
- },
436
- addCommands() {
437
- return {
438
- undo: () => ({ state: e, dispatch: t }) => m(e, t),
439
- redo: () => ({ state: e, dispatch: t }) => p(e, t)
440
- };
441
- },
442
- addProseMirrorPlugins() {
443
- return [f(this.options)];
444
- },
445
- addKeyboardShortcuts() {
446
- return {
447
- "Mod-z": () => this.editor.commands.undo(),
448
- "Shift-Mod-z": () => this.editor.commands.redo(),
449
- "Mod-y": () => this.editor.commands.redo(),
450
- "Mod-я": () => this.editor.commands.undo(),
451
- "Shift-Mod-я": () => this.editor.commands.redo()
452
- };
453
- }
454
- });
455
- export { _ as DEFAULT_DATA_ATTRIBUTE, h as Dropcursor, g as Gapcursor, v as PLUGIN_KEY, P as Placeholder, B as TrailingNode, V as UndoRedo, M as preparePlaceholderAttribute };
456
-
457
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","names":["Extension","text","word","node","options","initialEvaluationDone","Plugin","PluginKey","limit","autoTrim","initialContentSize","newState","to","tr","transaction","oldSize","state","newSize","pos","from","Dropcursor","dropCursor","selection","decorations","isEditable","isFocused","DecorationSet","doc","maxLevels","anchor","currentLevel","Decoration","Gapcursor","gapCursor","context","extension","callOrReturn","getExtensionField","DEFAULT_DATA_ATTRIBUTE","PLUGIN_KEY","createPlaceholderDecoration","classes","emptyNode","isEmptyDoc","emptyEditor","dataAttribute","placeholder","resolveEmptyNodeClass","emptyNodeClass","props","scanRangeForDecorations","editor","hasAnchor","isEmpty","isNodeEmpty","buildPlaceholderDecorations","resolved","nodeStart","resolveTopLevelRange","nodePos","topLevelPos","toContentRelativeRange","range","getTopLevelBlocksInRange","ranges","offset","nodeEnd","absNodeStart","absNodeEnd","mergeRanges","sorted","a","b","merged","i","last","current","collectBlocksForChange","change","collectRescanRanges","changes","getChangedRanges","oldState","clampRange","clampedFrom","updateDecorationsInRanges","next","existing","decoration","newDecos","createPlaceholderStateField","prev","preparePlaceholderAttribute","attr","createPlaceholderPlugin","useResolvedPath","Placeholder","shouldSyncDomSelection","isNodeSelection","shouldPreserveSelection","clearDomSelection","_window$getSelection","restoreDomSelection","view","nodeEqualsType","types","TrailingNode","plugin","defaultNode","disabledNodes","value","shouldInsertNodeAtEnd","endPosition","type","schema","lastNode","UndoRedo","undo","dispatch","redo","history"],"sources":["../../../../../node_modules/@tiptap/extensions/dist/index.js"],"sourcesContent":["import { Extension, callOrReturn, getChangedRanges, getExtensionField, isNodeEmpty, isNodeSelection } from \"@tiptap/core\";\nimport { Plugin, PluginKey } from \"@tiptap/pm/state\";\nimport { dropCursor } from \"@tiptap/pm/dropcursor\";\nimport { Decoration, DecorationSet } from \"@tiptap/pm/view\";\nimport { gapCursor } from \"@tiptap/pm/gapcursor\";\nimport { history, redo, undo } from \"@tiptap/pm/history\";\n//#region src/character-count/character-count.ts\n/**\n* This extension allows you to count the characters and words of your document.\n* @see https://tiptap.dev/api/extensions/character-count\n*/\nconst CharacterCount = Extension.create({\n\tname: \"characterCount\",\n\taddOptions() {\n\t\treturn {\n\t\t\tlimit: null,\n\t\t\tautoTrim: true,\n\t\t\tmode: \"textSize\",\n\t\t\ttextCounter: (text) => text.length,\n\t\t\twordCounter: (text) => text.split(\" \").filter((word) => word !== \"\").length\n\t\t};\n\t},\n\taddStorage() {\n\t\treturn {\n\t\t\tcharacters: () => 0,\n\t\t\twords: () => 0\n\t\t};\n\t},\n\tonBeforeCreate() {\n\t\tthis.storage.characters = (options) => {\n\t\t\tconst node = (options === null || options === void 0 ? void 0 : options.node) || this.editor.state.doc;\n\t\t\tif (((options === null || options === void 0 ? void 0 : options.mode) || this.options.mode) === \"textSize\") {\n\t\t\t\tconst text = node.textBetween(0, node.content.size, void 0, \" \");\n\t\t\t\treturn this.options.textCounter(text);\n\t\t\t}\n\t\t\treturn node.nodeSize;\n\t\t};\n\t\tthis.storage.words = (options) => {\n\t\t\tconst node = (options === null || options === void 0 ? void 0 : options.node) || this.editor.state.doc;\n\t\t\tconst text = node.textBetween(0, node.content.size, \" \", \" \");\n\t\t\treturn this.options.wordCounter(text);\n\t\t};\n\t},\n\taddProseMirrorPlugins() {\n\t\tlet initialEvaluationDone = false;\n\t\treturn [new Plugin({\n\t\t\tkey: new PluginKey(\"characterCount\"),\n\t\t\tappendTransaction: (transactions, oldState, newState) => {\n\t\t\t\tif (initialEvaluationDone) return;\n\t\t\t\tconst limit = this.options.limit;\n\t\t\t\tconst autoTrim = this.options.autoTrim;\n\t\t\t\tif (limit === null || limit === void 0 || limit === 0 || autoTrim === false) {\n\t\t\t\t\tinitialEvaluationDone = true;\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tconst initialContentSize = this.storage.characters({ node: newState.doc });\n\t\t\t\tif (initialContentSize > limit) {\n\t\t\t\t\tconst over = initialContentSize - limit;\n\t\t\t\t\tconst from = 0;\n\t\t\t\t\tconst to = over;\n\t\t\t\t\tconsole.warn(`[CharacterCount] Initial content exceeded limit of ${limit} characters. Content was automatically trimmed.`);\n\t\t\t\t\tconst tr = newState.tr.deleteRange(from, to);\n\t\t\t\t\tinitialEvaluationDone = true;\n\t\t\t\t\treturn tr;\n\t\t\t\t}\n\t\t\t\tinitialEvaluationDone = true;\n\t\t\t},\n\t\t\tfilterTransaction: (transaction, state) => {\n\t\t\t\tconst limit = this.options.limit;\n\t\t\t\tif (!transaction.docChanged || limit === 0 || limit === null || limit === void 0) return true;\n\t\t\t\tconst oldSize = this.storage.characters({ node: state.doc });\n\t\t\t\tconst newSize = this.storage.characters({ node: transaction.doc });\n\t\t\t\tif (newSize <= limit) return true;\n\t\t\t\tif (oldSize > limit && newSize > limit && newSize <= oldSize) return true;\n\t\t\t\tif (oldSize > limit && newSize > limit && newSize > oldSize) return false;\n\t\t\t\tif (!transaction.getMeta(\"paste\")) return false;\n\t\t\t\tconst pos = transaction.selection.$head.pos;\n\t\t\t\tconst from = pos - (newSize - limit);\n\t\t\t\tconst to = pos;\n\t\t\t\ttransaction.deleteRange(from, to);\n\t\t\t\tif (this.storage.characters({ node: transaction.doc }) > limit) return false;\n\t\t\t\treturn true;\n\t\t\t}\n\t\t})];\n\t}\n});\n//#endregion\n//#region src/drop-cursor/drop-cursor.ts\n/**\n* This extension allows you to add a drop cursor to your editor.\n* A drop cursor is a line that appears when you drag and drop content\n* in-between nodes.\n* @see https://tiptap.dev/api/extensions/dropcursor\n*/\nconst Dropcursor = Extension.create({\n\tname: \"dropCursor\",\n\taddOptions() {\n\t\treturn {\n\t\t\tcolor: \"currentColor\",\n\t\t\twidth: 1,\n\t\t\tclass: void 0\n\t\t};\n\t},\n\taddProseMirrorPlugins() {\n\t\treturn [dropCursor(this.options)];\n\t}\n});\n//#endregion\n//#region src/focus/focus.ts\n/**\n* This extension allows you to add a class to the focused node.\n* @see https://www.tiptap.dev/api/extensions/focus\n*/\nconst Focus = Extension.create({\n\tname: \"focus\",\n\taddOptions() {\n\t\treturn {\n\t\t\tclassName: \"has-focus\",\n\t\t\tmode: \"all\"\n\t\t};\n\t},\n\taddProseMirrorPlugins() {\n\t\treturn [new Plugin({\n\t\t\tkey: new PluginKey(\"focus\"),\n\t\t\tprops: { decorations: ({ doc, selection }) => {\n\t\t\t\tconst { isEditable, isFocused } = this.editor;\n\t\t\t\tconst { anchor } = selection;\n\t\t\t\tconst decorations = [];\n\t\t\t\tif (!isEditable || !isFocused) return DecorationSet.create(doc, []);\n\t\t\t\tlet maxLevels = 0;\n\t\t\t\tif (this.options.mode === \"deepest\") doc.descendants((node, pos) => {\n\t\t\t\t\tif (node.isText) return;\n\t\t\t\t\tif (!(anchor >= pos && anchor <= pos + node.nodeSize - 1)) return false;\n\t\t\t\t\tmaxLevels += 1;\n\t\t\t\t});\n\t\t\t\tlet currentLevel = 0;\n\t\t\t\tdoc.descendants((node, pos) => {\n\t\t\t\t\tif (node.isText) return false;\n\t\t\t\t\tif (!(anchor >= pos && anchor <= pos + node.nodeSize - 1)) return false;\n\t\t\t\t\tcurrentLevel += 1;\n\t\t\t\t\tif (this.options.mode === \"deepest\" && maxLevels - currentLevel > 0 || this.options.mode === \"shallowest\" && currentLevel > 1) return this.options.mode === \"deepest\";\n\t\t\t\t\tdecorations.push(Decoration.node(pos, pos + node.nodeSize, { class: this.options.className }));\n\t\t\t\t});\n\t\t\t\treturn DecorationSet.create(doc, decorations);\n\t\t\t} }\n\t\t})];\n\t}\n});\n//#endregion\n//#region src/gap-cursor/gap-cursor.ts\n/**\n* This extension allows you to add a gap cursor to your editor.\n* A gap cursor is a cursor that appears when you click on a place\n* where no content is present, for example inbetween nodes.\n* @see https://tiptap.dev/api/extensions/gapcursor\n*/\nconst Gapcursor = Extension.create({\n\tname: \"gapCursor\",\n\taddProseMirrorPlugins() {\n\t\treturn [gapCursor()];\n\t},\n\textendNodeSchema(extension) {\n\t\tvar _callOrReturn;\n\t\tconst context = {\n\t\t\tname: extension.name,\n\t\t\toptions: extension.options,\n\t\t\tstorage: extension.storage\n\t\t};\n\t\treturn { allowGapCursor: (_callOrReturn = callOrReturn(getExtensionField(extension, \"allowGapCursor\", context))) !== null && _callOrReturn !== void 0 ? _callOrReturn : null };\n\t}\n});\n//#endregion\n//#region src/placeholder/constants.ts\n/** The default data attribute label */\nconst DEFAULT_DATA_ATTRIBUTE = \"placeholder\";\n/** The plugin key used to store and read the placeholder decoration set */\nconst PLUGIN_KEY = new PluginKey(\"tiptap__placeholder\");\n//#endregion\n//#region src/placeholder/utils/createPlaceholderDecoration.ts\n/**\n* Creates a ProseMirror node decoration that applies a placeholder\n* CSS class and data attribute to an empty node.\n* @param options.editor - The editor instance\n* @param options.pos - The position of the node in the document\n* @param options.node - The ProseMirror node\n* @param options.isEmptyDoc - Whether the entire document is empty\n* @param options.hasAnchor - Whether the selection anchor is within the node\n* @param options.dataAttribute - The data attribute name (e.g. `data-placeholder`)\n* @param options.classes - CSS classes for empty nodes and the empty editor\n* @param options.placeholder - The placeholder text or a function that returns it\n* @returns A ProseMirror node decoration with placeholder classes and data attribute\n*/\nfunction createPlaceholderDecoration(options) {\n\tconst { editor, placeholder, dataAttribute, pos, node, isEmptyDoc, hasAnchor, classes: { emptyNode, emptyEditor } } = options;\n\tconst classes = [emptyNode];\n\tif (isEmptyDoc) classes.push(emptyEditor);\n\treturn Decoration.node(pos, pos + node.nodeSize, {\n\t\tclass: classes.join(\" \"),\n\t\t[dataAttribute]: typeof placeholder === \"function\" ? placeholder({\n\t\t\teditor,\n\t\t\tnode,\n\t\t\tpos,\n\t\t\thasAnchor\n\t\t}) : placeholder\n\t});\n}\n//#endregion\n//#region src/placeholder/utils/buildPlaceholderDecorations.ts\nfunction resolveEmptyNodeClass(emptyNodeClass, props) {\n\treturn typeof emptyNodeClass === \"function\" ? emptyNodeClass(props) : emptyNodeClass;\n}\n/**\n* Scans a document range for empty textblocks that should receive placeholder\n* decorations. Used by the slow path and incremental state updates.\n*/\nfunction scanRangeForDecorations({ editor, options, dataAttribute, doc, selection, from, to }) {\n\tconst { anchor } = selection;\n\tconst decorations = [];\n\tconst isEmptyDoc = editor.isEmpty;\n\tdoc.nodesBetween(from, to, (node, pos) => {\n\t\tconst hasAnchor = anchor >= pos && anchor <= pos + node.nodeSize;\n\t\tconst isEmpty = !node.isLeaf && isNodeEmpty(node);\n\t\tif (!node.type.isTextblock) return options.includeChildren;\n\t\tif ((hasAnchor || !options.showOnlyCurrent) && isEmpty) decorations.push(createPlaceholderDecoration({\n\t\t\teditor,\n\t\t\tisEmptyDoc,\n\t\t\tdataAttribute,\n\t\t\thasAnchor,\n\t\t\tplaceholder: options.placeholder,\n\t\t\tclasses: {\n\t\t\t\temptyEditor: options.emptyEditorClass,\n\t\t\t\temptyNode: resolveEmptyNodeClass(options.emptyNodeClass, {\n\t\t\t\t\teditor,\n\t\t\t\t\tnode,\n\t\t\t\t\tpos,\n\t\t\t\t\thasAnchor\n\t\t\t\t})\n\t\t\t},\n\t\t\tnode,\n\t\t\tpos\n\t\t}));\n\t\treturn options.includeChildren;\n\t});\n\treturn decorations;\n}\n/**\n* Builds the placeholder decorations for the current document state.\n* @param options.editor - The editor instance.\n* @param options.options - The resolved placeholder options.\n* @param options.dataAttribute - The prepared `data-*` attribute name.\n* @param options.doc - The current document node.\n* @param options.selection - The current selection.\n* @returns A decoration set, or `null` when no placeholders should be shown.\n*/\nfunction buildPlaceholderDecorations({ editor, options, dataAttribute, doc, selection }) {\n\tif (!(editor.isEditable || !options.showOnlyWhenEditable)) return null;\n\tconst { anchor } = selection;\n\tconst decorations = [];\n\tconst isEmptyDoc = editor.isEmpty;\n\tif (options.showOnlyCurrent && !options.includeChildren) {\n\t\tconst resolved = doc.resolve(anchor);\n\t\tconst node = resolved.depth > 0 ? resolved.node(1) : resolved.nodeAfter;\n\t\tconst nodeStart = resolved.depth > 0 ? resolved.before(1) : anchor;\n\t\tif (node && node.type.isTextblock && isNodeEmpty(node)) {\n\t\t\tconst hasAnchor = anchor >= nodeStart && anchor <= nodeStart + node.nodeSize;\n\t\t\tdecorations.push(createPlaceholderDecoration({\n\t\t\t\teditor,\n\t\t\t\tisEmptyDoc,\n\t\t\t\tdataAttribute,\n\t\t\t\thasAnchor,\n\t\t\t\tplaceholder: options.placeholder,\n\t\t\t\tclasses: {\n\t\t\t\t\temptyEditor: options.emptyEditorClass,\n\t\t\t\t\temptyNode: resolveEmptyNodeClass(options.emptyNodeClass, {\n\t\t\t\t\t\teditor,\n\t\t\t\t\t\tnode,\n\t\t\t\t\t\tpos: nodeStart,\n\t\t\t\t\t\thasAnchor\n\t\t\t\t\t})\n\t\t\t\t},\n\t\t\t\tnode,\n\t\t\t\tpos: nodeStart\n\t\t\t}));\n\t\t}\n\t} else decorations.push(...scanRangeForDecorations({\n\t\teditor,\n\t\toptions,\n\t\tdataAttribute,\n\t\tdoc,\n\t\tselection,\n\t\tfrom: 0,\n\t\tto: doc.content.size\n\t}));\n\treturn DecorationSet.create(doc, decorations);\n}\n//#endregion\n//#region src/placeholder/utils/resolveTopLevelRange.ts\n/**\n* Resolves a document position to the `[from, to)` range of its containing\n* top-level block node in absolute document positions.\n*/\nfunction resolveTopLevelRange(doc, pos) {\n\tconst resolved = doc.resolve(pos);\n\tif (resolved.depth === 0) {\n\t\tvar _resolved$nodeAfter;\n\t\tconst node = (_resolved$nodeAfter = resolved.nodeAfter) !== null && _resolved$nodeAfter !== void 0 ? _resolved$nodeAfter : resolved.nodeBefore;\n\t\tif (!node) return {\n\t\t\tfrom: pos,\n\t\t\tto: pos\n\t\t};\n\t\tconst nodePos = resolved.nodeAfter ? pos : pos - node.nodeSize;\n\t\treturn {\n\t\t\tfrom: nodePos,\n\t\t\tto: nodePos + node.nodeSize\n\t\t};\n\t}\n\tconst topLevelPos = resolved.before(1);\n\treturn {\n\t\tfrom: topLevelPos,\n\t\tto: topLevelPos + resolved.node(1).nodeSize\n\t};\n}\n/**\n* Clamps a top-level block range from `resolveTopLevelRange` to the document\n* content, giving the positions used by `Node#nodesBetween` and `Node#forEach`\n* offsets.\n*\n* A top-level node at `Node#forEach` offset `n` already sits at document\n* position `n`, so the range must not be shifted: a node decoration spans\n* exactly `[n, n + nodeSize]` and has to stay inside the range to be replaced.\n*/\nfunction toContentRelativeRange(doc, range) {\n\treturn {\n\t\tfrom: Math.max(0, range.from),\n\t\tto: Math.min(doc.content.size, range.to)\n\t};\n}\n/**\n* Returns the top-level block ranges that intersect a document change range.\n* Input `from`/`to` are absolute positions (e.g. from `getChangedRanges`).\n* Returned ranges are content-relative, matching `Node#forEach` offsets.\n*/\nfunction getTopLevelBlocksInRange(doc, from, to) {\n\tconst ranges = [];\n\tdoc.forEach((node, offset) => {\n\t\tconst nodeStart = offset;\n\t\tconst nodeEnd = nodeStart + node.nodeSize;\n\t\tconst absNodeStart = nodeStart + 1;\n\t\tconst absNodeEnd = nodeEnd + 1;\n\t\tif (absNodeStart < to && absNodeEnd > from) ranges.push({\n\t\t\tfrom: nodeStart,\n\t\t\tto: nodeEnd\n\t\t});\n\t});\n\treturn ranges;\n}\n/**\n* Sorts ranges by start position and merges overlapping or adjacent ranges.\n*/\nfunction mergeRanges(ranges) {\n\tif (ranges.length === 0) return [];\n\tconst sorted = [...ranges].sort((a, b) => a.from - b.from);\n\tconst merged = [{ ...sorted[0] }];\n\tfor (let i = 1; i < sorted.length; i += 1) {\n\t\tconst last = merged[merged.length - 1];\n\t\tconst current = sorted[i];\n\t\tif (current.from <= last.to) last.to = Math.max(last.to, current.to);\n\t\telse merged.push({ ...current });\n\t}\n\treturn merged;\n}\n//#endregion\n//#region src/placeholder/utils/placeholderStateField.ts\n/**\n* Expands a single changed range to the top-level blocks it touches.\n* Also resolves blocks at range boundaries so split/merge edits update\n* adjacent empty nodes (e.g. a new paragraph after Enter).\n*/\nfunction collectBlocksForChange(doc, change) {\n\tconst ranges = getTopLevelBlocksInRange(doc, change.from, change.to);\n\tranges.push(toContentRelativeRange(doc, resolveTopLevelRange(doc, change.from)));\n\tif (change.to > change.from) ranges.push(toContentRelativeRange(doc, resolveTopLevelRange(doc, Math.min(change.to, doc.content.size + 1) - 1)));\n\telse if (change.from < doc.content.size + 1) ranges.push(toContentRelativeRange(doc, resolveTopLevelRange(doc, Math.min(change.from + 1, doc.content.size))));\n\treturn ranges;\n}\n/**\n* Collects content-relative top-level block ranges that need placeholder\n* decorations recomputed after a transaction.\n*/\nfunction collectRescanRanges(tr, oldState, newState) {\n\tconst ranges = [];\n\tif (tr.docChanged) {\n\t\tconst changes = getChangedRanges(tr);\n\t\tfor (const change of changes) ranges.push(...collectBlocksForChange(newState.doc, change.newRange));\n\t}\n\tif (tr.selectionSet) {\n\t\tranges.push(toContentRelativeRange(newState.doc, resolveTopLevelRange(newState.doc, tr.mapping.map(oldState.selection.anchor))));\n\t\tranges.push(toContentRelativeRange(newState.doc, resolveTopLevelRange(newState.doc, newState.selection.anchor)));\n\t}\n\treturn mergeRanges(ranges);\n}\n/** Clamps a content-relative range to `[0, doc.content.size]`. */\nfunction clampRange(from, to, doc) {\n\tconst clampedFrom = Math.max(0, Math.min(from, doc.content.size));\n\treturn {\n\t\tfrom: clampedFrom,\n\t\tto: Math.max(clampedFrom, Math.min(to, doc.content.size))\n\t};\n}\n/**\n* Removes and rebuilds placeholder decorations within the given ranges.\n* Only drops decorations fully contained in a range so mapped decorations\n* on neighbouring blocks (e.g. at a block boundary) are kept intact.\n*/\nfunction updateDecorationsInRanges({ decorations, ranges, editor, options, dataAttribute, doc, selection }) {\n\tlet next = decorations;\n\tfor (const range of ranges) {\n\t\tconst { from, to } = clampRange(range.from, range.to, doc);\n\t\tconst existing = next.find(from, to).filter((decoration) => decoration.from >= from && decoration.to <= to);\n\t\tif (existing.length) next = next.remove(existing);\n\t\tconst newDecos = scanRangeForDecorations({\n\t\t\teditor,\n\t\t\toptions,\n\t\t\tdataAttribute,\n\t\t\tdoc,\n\t\t\tselection,\n\t\t\tfrom,\n\t\t\tto\n\t\t});\n\t\tif (newDecos.length) next = next.add(doc, newDecos);\n\t}\n\treturn next;\n}\n/**\n* Creates the incremental `StateField<DecorationSet>` used by the slow path\n* (`showOnlyCurrent: false` or `includeChildren: true`).\n*\n* Decorations are mapped through each transaction and only recomputed for\n* top-level blocks touched by document or selection changes.\n* @param options.editor - The editor instance.\n* @param options.options - The resolved placeholder options.\n* @param options.dataAttribute - The prepared `data-*` attribute name.\n* @returns A ProseMirror state field storing the placeholder decoration set.\n*/\nfunction createPlaceholderStateField({ editor, options, dataAttribute }) {\n\treturn {\n\t\tinit(_config, state) {\n\t\t\tconst decorations = buildPlaceholderDecorations({\n\t\t\t\teditor,\n\t\t\t\toptions,\n\t\t\t\tdataAttribute,\n\t\t\t\tdoc: state.doc,\n\t\t\t\tselection: state.selection\n\t\t\t});\n\t\t\treturn decorations !== null && decorations !== void 0 ? decorations : DecorationSet.empty;\n\t\t},\n\t\tapply(tr, prev, oldState, newState) {\n\t\t\tif (!tr.docChanged && !tr.selectionSet) return prev;\n\t\t\treturn updateDecorationsInRanges({\n\t\t\t\tdecorations: prev.map(tr.mapping, tr.doc),\n\t\t\t\tranges: collectRescanRanges(tr, oldState, newState),\n\t\t\t\teditor,\n\t\t\t\toptions,\n\t\t\t\tdataAttribute,\n\t\t\t\tdoc: newState.doc,\n\t\t\t\tselection: newState.selection\n\t\t\t});\n\t\t}\n\t};\n}\n//#endregion\n//#region src/placeholder/utils/preparePlaceholderAttribute.ts\n/**\n* Prepares the placeholder attribute by ensuring it is properly formatted.\n* @param attr - The placeholder attribute string.\n* @returns The prepared placeholder attribute string.\n*/\nfunction preparePlaceholderAttribute(attr) {\n\treturn attr.replace(/\\s+/g, \"-\").replace(/[^a-zA-Z0-9-]/g, \"\").replace(/^[0-9-]+/, \"\").replace(/^-+/, \"\").toLowerCase();\n}\n//#endregion\n//#region src/placeholder/plugins/PlaceholderPlugin.ts\n/**\n* Creates the ProseMirror plugin that renders placeholder decorations.\n* @param options.editor - The editor instance.\n* @param options.options - The resolved placeholder options.\n* @returns The configured placeholder plugin.\n*/\nfunction createPlaceholderPlugin({ editor, options }) {\n\tconst dataAttribute = options.dataAttribute ? `data-${preparePlaceholderAttribute(options.dataAttribute)}` : `data-${DEFAULT_DATA_ATTRIBUTE}`;\n\tconst useResolvedPath = options.showOnlyCurrent && !options.includeChildren;\n\treturn new Plugin({\n\t\tkey: PLUGIN_KEY,\n\t\t...useResolvedPath ? {} : { state: createPlaceholderStateField({\n\t\t\teditor,\n\t\t\toptions,\n\t\t\tdataAttribute\n\t\t}) },\n\t\tprops: { decorations: useResolvedPath ? ({ doc, selection }) => buildPlaceholderDecorations({\n\t\t\teditor,\n\t\t\toptions,\n\t\t\tdataAttribute,\n\t\t\tdoc,\n\t\t\tselection\n\t\t}) : (state) => {\n\t\t\tvar _PLUGIN_KEY$getState;\n\t\t\tif (options.showOnlyWhenEditable && !editor.isEditable) return DecorationSet.empty;\n\t\t\treturn (_PLUGIN_KEY$getState = PLUGIN_KEY.getState(state)) !== null && _PLUGIN_KEY$getState !== void 0 ? _PLUGIN_KEY$getState : DecorationSet.empty;\n\t\t} }\n\t});\n}\n//#endregion\n//#region src/placeholder/placeholder.ts\n/**\n* This extension allows you to add a placeholder to your editor.\n* A placeholder is a text that appears when the editor or a node is empty.\n* @see https://www.tiptap.dev/api/extensions/placeholder\n*/\nconst Placeholder = Extension.create({\n\tname: \"placeholder\",\n\taddOptions() {\n\t\treturn {\n\t\t\temptyEditorClass: \"is-editor-empty\",\n\t\t\temptyNodeClass: \"is-empty\",\n\t\t\tdataAttribute: DEFAULT_DATA_ATTRIBUTE,\n\t\t\tplaceholder: \"Write something …\",\n\t\t\tshowOnlyWhenEditable: true,\n\t\t\tshowOnlyCurrent: true,\n\t\t\tincludeChildren: false\n\t\t};\n\t},\n\taddProseMirrorPlugins() {\n\t\treturn [createPlaceholderPlugin({\n\t\t\teditor: this.editor,\n\t\t\toptions: this.options\n\t\t})];\n\t}\n});\n//#endregion\n//#region src/selection/selection.ts\n/**\n* Whether the native browser selection should be cleared on blur and restored on focus.\n* Only applies to non-empty text selections in an editable editor.\n*/\nfunction shouldSyncDomSelection(state, editor) {\n\treturn !state.selection.empty && !isNodeSelection(state.selection) && editor.isEditable;\n}\n/**\n* Whether the selection decoration should be rendered to keep the selection\n* visible while the editor is blurred (and not dragging).\n*/\nfunction shouldPreserveSelection(state, editor) {\n\treturn shouldSyncDomSelection(state, editor) && !editor.isFocused && !editor.view.dragging;\n}\nfunction clearDomSelection() {\n\tvar _window$getSelection;\n\t(_window$getSelection = window.getSelection()) === null || _window$getSelection === void 0 || _window$getSelection.removeAllRanges();\n}\n/**\n* Sync the native selection from the editor state.\n* @see https://prosemirror.net/docs/ref/#view.EditorView.focus\n*/\nfunction restoreDomSelection(view) {\n\tview.focus();\n}\n/**\n* This extension allows you to add a class to the selected text when the editor is blurred.\n* It clears the native browser selection on blur (so `::selection` styles do not overlap the\n* decoration) and restores it when the editor is focused again.\n* @see https://www.tiptap.dev/api/extensions/selection\n*/\nconst Selection = Extension.create({\n\tname: \"selection\",\n\taddOptions() {\n\t\treturn { className: \"selection\" };\n\t},\n\taddProseMirrorPlugins() {\n\t\tconst { editor, options } = this;\n\t\treturn [new Plugin({\n\t\t\tkey: new PluginKey(\"selection\"),\n\t\t\tprops: {\n\t\t\t\tdecorations(state) {\n\t\t\t\t\tif (!shouldPreserveSelection(state, editor)) return null;\n\t\t\t\t\treturn DecorationSet.create(state.doc, [Decoration.inline(state.selection.from, state.selection.to, { class: options.className })]);\n\t\t\t\t},\n\t\t\t\thandleDOMEvents: {\n\t\t\t\t\tblur(view) {\n\t\t\t\t\t\tif (!shouldSyncDomSelection(view.state, editor)) return false;\n\t\t\t\t\t\tclearDomSelection();\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t},\n\t\t\t\t\tfocus(view) {\n\t\t\t\t\t\tif (!shouldSyncDomSelection(view.state, editor)) return false;\n\t\t\t\t\t\trequestAnimationFrame(() => {\n\t\t\t\t\t\t\tif (!editor.isDestroyed && view.hasFocus()) restoreDomSelection(view);\n\t\t\t\t\t\t});\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t})];\n\t}\n});\n//#endregion\n//#region src/trailing-node/trailing-node.ts\nconst skipTrailingNodeMeta = \"skipTrailingNode\";\nfunction nodeEqualsType({ types, node }) {\n\treturn node && Array.isArray(types) && types.includes(node.type) || (node === null || node === void 0 ? void 0 : node.type) === types;\n}\n/**\n* This extension allows you to add an extra node at the end of the document.\n* @see https://www.tiptap.dev/api/extensions/trailing-node\n*/\nconst TrailingNode = Extension.create({\n\tname: \"trailingNode\",\n\taddOptions() {\n\t\treturn {\n\t\t\tnode: void 0,\n\t\t\tnotAfter: []\n\t\t};\n\t},\n\taddProseMirrorPlugins() {\n\t\tvar _this$editor$schema$t;\n\t\tconst plugin = new PluginKey(this.name);\n\t\tconst defaultNode = this.options.node || ((_this$editor$schema$t = this.editor.schema.topNodeType.contentMatch.defaultType) === null || _this$editor$schema$t === void 0 ? void 0 : _this$editor$schema$t.name) || \"paragraph\";\n\t\tconst disabledNodes = Object.entries(this.editor.schema.nodes).map(([, value]) => value).filter((node) => (this.options.notAfter || []).concat(defaultNode).includes(node.name));\n\t\treturn [new Plugin({\n\t\t\tkey: plugin,\n\t\t\tappendTransaction: (transactions, __, state) => {\n\t\t\t\tconst { doc, tr, schema } = state;\n\t\t\t\tconst shouldInsertNodeAtEnd = plugin.getState(state);\n\t\t\t\tconst endPosition = doc.content.size;\n\t\t\t\tconst type = schema.nodes[defaultNode];\n\t\t\t\tif (transactions.some((transaction) => transaction.getMeta(\"skipTrailingNode\"))) return;\n\t\t\t\tif (!shouldInsertNodeAtEnd) return;\n\t\t\t\treturn tr.insert(endPosition, type.create());\n\t\t\t},\n\t\t\tstate: {\n\t\t\t\tinit: (_, state) => {\n\t\t\t\t\tconst lastNode = state.tr.doc.lastChild;\n\t\t\t\t\treturn !nodeEqualsType({\n\t\t\t\t\t\tnode: lastNode,\n\t\t\t\t\t\ttypes: disabledNodes\n\t\t\t\t\t});\n\t\t\t\t},\n\t\t\t\tapply: (tr, value) => {\n\t\t\t\t\tif (!tr.docChanged) return value;\n\t\t\t\t\tif (tr.getMeta(\"__uniqueIDTransaction\")) return value;\n\t\t\t\t\tconst lastNode = tr.doc.lastChild;\n\t\t\t\t\treturn !nodeEqualsType({\n\t\t\t\t\t\tnode: lastNode,\n\t\t\t\t\t\ttypes: disabledNodes\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t}\n\t\t})];\n\t}\n});\n//#endregion\n//#region src/undo-redo/undo-redo.ts\n/**\n* This extension allows you to undo and redo recent changes.\n* @see https://www.tiptap.dev/api/extensions/undo-redo\n*\n* **Important**: If the `@tiptap/extension-collaboration` package is used, make sure to remove\n* the `undo-redo` extension, as it is not compatible with the `collaboration` extension.\n*\n* `@tiptap/extension-collaboration` uses its own history implementation.\n*/\nconst UndoRedo = Extension.create({\n\tname: \"undoRedo\",\n\taddOptions() {\n\t\treturn {\n\t\t\tdepth: 100,\n\t\t\tnewGroupDelay: 500\n\t\t};\n\t},\n\taddCommands() {\n\t\treturn {\n\t\t\tundo: () => ({ state, dispatch }) => {\n\t\t\t\treturn undo(state, dispatch);\n\t\t\t},\n\t\t\tredo: () => ({ state, dispatch }) => {\n\t\t\t\treturn redo(state, dispatch);\n\t\t\t}\n\t\t};\n\t},\n\taddProseMirrorPlugins() {\n\t\treturn [history(this.options)];\n\t},\n\taddKeyboardShortcuts() {\n\t\treturn {\n\t\t\t\"Mod-z\": () => this.editor.commands.undo(),\n\t\t\t\"Shift-Mod-z\": () => this.editor.commands.redo(),\n\t\t\t\"Mod-y\": () => this.editor.commands.redo(),\n\t\t\t\"Mod-я\": () => this.editor.commands.undo(),\n\t\t\t\"Shift-Mod-я\": () => this.editor.commands.redo()\n\t\t};\n\t}\n});\n//#endregion\nexport { CharacterCount, DEFAULT_DATA_ATTRIBUTE, Dropcursor, Focus, Gapcursor, PLUGIN_KEY, Placeholder, Selection, TrailingNode, UndoRedo, preparePlaceholderAttribute, skipTrailingNodeMeta };\n\n//# sourceMappingURL=index.js.map"],"ignoreList":[0],"mappings":";;;;;;AAWuBA,EAAU,OAAO;CACvC,MAAM;CACN,aAAa;EACZ,OAAO;GACN,OAAO;GACP,UAAU;GACV,MAAM;GACN,cAAc,MAASC,EAAK;GAC5B,cAAc,MAASA,EAAK,MAAM,GAAG,CAAC,CAAC,QAAQ,MAASC,MAAS,EAAE,CAAC,CAAC;EACtE;CACD;CACA,aAAa;EACZ,OAAO;GACN,kBAAkB;GAClB,aAAa;EACd;CACD;CACA,iBAAiB;EAShB,AARA,KAAK,QAAQ,cAAc,MAAY;GACtC,IAAMC,IAAQC,GAA0D,QAAS,KAAK,OAAO,MAAM;GACnG,KAAMA,GAA0D,QAAS,KAAK,QAAQ,UAAU,YAAY;IAC3G,IAAMH,IAAOE,EAAK,YAAY,GAAGA,EAAK,QAAQ,MAAM,KAAK,GAAG,GAAG;IAC/D,OAAO,KAAK,QAAQ,YAAYF,CAAI;GACrC;GACA,OAAOE,EAAK;EACb,GACA,KAAK,QAAQ,SAAS,MAAY;GACjC,IAAMA,IAAQC,GAA0D,QAAS,KAAK,OAAO,MAAM,KAC7FH,IAAOE,EAAK,YAAY,GAAGA,EAAK,QAAQ,MAAM,KAAK,GAAG;GAC5D,OAAO,KAAK,QAAQ,YAAYF,CAAI;EACrC;CACD;CACA,wBAAwB;EACvB,IAAII,IAAwB;EAC5B,OAAO,CAAC,IAAIC,EAAO;GAClB,KAAK,IAAIC,E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