@quoreadmin/ui 1.10.25 → 1.10.26

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 (172) hide show
  1. package/dist/index.css +1 -1
  2. package/dist/index10.js +209 -180
  3. package/dist/index149.js +11 -5
  4. package/dist/index15.js +26 -26
  5. package/dist/index16.js +32 -22
  6. package/dist/index186.js +4 -4
  7. package/dist/index193.js +8 -8
  8. package/dist/index195.js +8 -8
  9. package/dist/index198.js +17 -17
  10. package/dist/index201.js +26 -26
  11. package/dist/index202.js +1 -1
  12. package/dist/index203.js +1 -1
  13. package/dist/index206.js +2 -2
  14. package/dist/index208.js +14 -14
  15. package/dist/index209.js +1 -1
  16. package/dist/index210.js +1 -1
  17. package/dist/index211.js +3 -3
  18. package/dist/index212.js +6 -6
  19. package/dist/index213.js +2 -2
  20. package/dist/index214.js +2 -2
  21. package/dist/index215.js +1 -1
  22. package/dist/index219.js +2 -2
  23. package/dist/index230.js +121 -155
  24. package/dist/index231.js +37 -19
  25. package/dist/index232.js +80 -20
  26. package/dist/index233.js +13 -15
  27. package/dist/index234.js +19 -198
  28. package/dist/index235.js +18 -68
  29. package/dist/index236.js +20 -34
  30. package/dist/index237.js +19 -39
  31. package/dist/index238.js +160 -21
  32. package/dist/index239.js +228 -22
  33. package/dist/index240.js +36 -19
  34. package/dist/index241.js +9 -835
  35. package/dist/index242.js +104 -645
  36. package/dist/index243.js +20 -176
  37. package/dist/index244.js +15 -13
  38. package/dist/index245.js +198 -19
  39. package/dist/index246.js +69 -21
  40. package/dist/index247.js +34 -20
  41. package/dist/index248.js +39 -19
  42. package/dist/index249.js +3709 -3
  43. package/dist/index250.js +54 -181
  44. package/dist/index251.js +77 -127
  45. package/dist/index252.js +45 -1216
  46. package/dist/index253.js +207 -119
  47. package/dist/index254.js +10 -20
  48. package/dist/index255.js +57 -22
  49. package/dist/index256.js +61 -22
  50. package/dist/index257.js +49 -33
  51. package/dist/index258.js +81 -29
  52. package/dist/index259.js +727 -19
  53. package/dist/index260.js +47 -20
  54. package/dist/index261.js +64 -2
  55. package/dist/index262.js +11 -2
  56. package/dist/index263.js +637 -3641
  57. package/dist/index264.js +819 -59
  58. package/dist/index265.js +22 -83
  59. package/dist/index266.js +22 -52
  60. package/dist/index267.js +20 -215
  61. package/dist/index268.js +836 -10
  62. package/dist/index269.js +695 -50
  63. package/dist/index270.js +174 -59
  64. package/dist/index271.js +22 -54
  65. package/dist/index272.js +20 -81
  66. package/dist/index273.js +19 -727
  67. package/dist/index274.js +3 -47
  68. package/dist/index275.js +181 -58
  69. package/dist/index276.js +133 -11
  70. package/dist/index277.js +1189 -671
  71. package/dist/index278.js +20 -820
  72. package/dist/index279.js +22 -253
  73. package/dist/index280.js +21 -7
  74. package/dist/index281.js +29 -138
  75. package/dist/index282.js +20 -83
  76. package/dist/index283.js +19 -53
  77. package/dist/index284.js +2 -79
  78. package/dist/index285.js +2 -26
  79. package/dist/index286.js +253 -22
  80. package/dist/index287.js +8 -22
  81. package/dist/index288.js +137 -15
  82. package/dist/index289.js +83 -17
  83. package/dist/index290.js +2 -23
  84. package/dist/index291.js +78 -79
  85. package/dist/index292.js +3 -20
  86. package/dist/index293.js +26 -19
  87. package/dist/index294.js +49 -156
  88. package/dist/index295.js +26 -228
  89. package/dist/index296.js +21 -36
  90. package/dist/index297.js +22 -10
  91. package/dist/index298.js +16 -3
  92. package/dist/index299.js +17 -27
  93. package/dist/index300.js +22 -264
  94. package/dist/index301.js +1533 -5
  95. package/dist/index302.js +372 -136
  96. package/dist/index303.js +2729 -67
  97. package/dist/index304.js +84 -89
  98. package/dist/index305.js +3795 -26
  99. package/dist/index306.js +58 -14
  100. package/dist/index307.js +15 -75
  101. package/dist/index308.js +83 -3
  102. package/dist/index309.js +202 -2
  103. package/dist/index310.js +237 -75
  104. package/dist/index311.js +77 -56
  105. package/dist/index312.js +21 -5
  106. package/dist/index313.js +934 -4
  107. package/dist/index314.js +21 -185
  108. package/dist/index315.js +19 -62
  109. package/dist/index316.js +20 -75
  110. package/dist/index317.js +69 -1534
  111. package/dist/index318.js +19 -386
  112. package/dist/index319.js +19 -2731
  113. package/dist/index320.js +21 -85
  114. package/dist/index321.js +22 -3798
  115. package/dist/index322.js +63 -60
  116. package/dist/index323.js +37 -15
  117. package/dist/index324.js +257 -76
  118. package/dist/index325.js +4 -200
  119. package/dist/index326.js +139 -235
  120. package/dist/index327.js +67 -77
  121. package/dist/index328.js +90 -21
  122. package/dist/index329.js +26 -932
  123. package/dist/index330.js +14 -20
  124. package/dist/index331.js +74 -19
  125. package/dist/index332.js +3 -19
  126. package/dist/index333.js +2 -69
  127. package/dist/index334.js +83 -18
  128. package/dist/index335.js +58 -19
  129. package/dist/index336.js +5 -21
  130. package/dist/index337.js +4 -21
  131. package/dist/index338.js +185 -62
  132. package/dist/index339.js +63 -2
  133. package/dist/index340.js +74 -36
  134. package/dist/index364.js +19 -18
  135. package/dist/index365.js +19 -56
  136. package/dist/index366.js +61 -22
  137. package/dist/index367.js +37 -7
  138. package/dist/index368.js +16 -52
  139. package/dist/index369.js +57 -7
  140. package/dist/index370.js +23 -10
  141. package/dist/index371.js +7 -7
  142. package/dist/index372.js +54 -27
  143. package/dist/index373.js +7 -2
  144. package/dist/index374.js +11 -81
  145. package/dist/index375.js +6 -179
  146. package/dist/index376.js +28 -20
  147. package/dist/index377.js +2 -20
  148. package/dist/index378.js +79 -61
  149. package/dist/index379.js +179 -36
  150. package/dist/index380.js +97 -30
  151. package/dist/index381.js +100 -10
  152. package/dist/index382.js +90 -3
  153. package/dist/index383.js +17 -4
  154. package/dist/index384.js +30 -12
  155. package/dist/index385.js +11 -7
  156. package/dist/index386.js +3 -13
  157. package/dist/index387.js +3 -4
  158. package/dist/index388.js +13 -36
  159. package/dist/index389.js +7 -37
  160. package/dist/index390.js +14 -30
  161. package/dist/index391.js +5 -64
  162. package/dist/index392.js +36 -98
  163. package/dist/index393.js +36 -16
  164. package/dist/index394.js +28 -99
  165. package/dist/index395.js +64 -91
  166. package/dist/index396.js +1 -1
  167. package/dist/index401.js +1 -1
  168. package/dist/index402.js +2 -2
  169. package/dist/index79.js +218 -129
  170. package/dist/src/components/calendar/calendar.d.ts +18 -1
  171. package/package.json +1 -1
  172. package/src/assets/illustrations/pending-to-do.png +0 -0
package/dist/index253.js CHANGED
@@ -1,129 +1,217 @@
1
- import { DomHandler as s, ObjectUtils as h } from "./index180.js";
2
- import E from "./index279.js";
3
- import $ from "./index339.js";
4
- var g = E.extend({
5
- style: $
6
- });
7
- function m(o) {
8
- "@babel/helpers - typeof";
9
- return m = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) {
10
- return typeof e;
11
- } : function(e) {
12
- return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
13
- }, m(o);
14
- }
15
- function v(o, e) {
16
- var t = Object.keys(o);
17
- if (Object.getOwnPropertySymbols) {
18
- var r = Object.getOwnPropertySymbols(o);
19
- e && (r = r.filter(function(n) {
20
- return Object.getOwnPropertyDescriptor(o, n).enumerable;
21
- })), t.push.apply(t, r);
22
- }
23
- return t;
24
- }
25
- function F(o) {
26
- for (var e = 1; e < arguments.length; e++) {
27
- var t = arguments[e] != null ? arguments[e] : {};
28
- e % 2 ? v(Object(t), !0).forEach(function(r) {
29
- S(o, r, t[r]);
30
- }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(o, Object.getOwnPropertyDescriptors(t)) : v(Object(t)).forEach(function(r) {
31
- Object.defineProperty(o, r, Object.getOwnPropertyDescriptor(t, r));
32
- });
33
- }
34
- return o;
35
- }
36
- function S(o, e, t) {
37
- return e = y(e), e in o ? Object.defineProperty(o, e, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : o[e] = t, o;
38
- }
39
- function y(o) {
40
- var e = O(o, "string");
41
- return m(e) == "symbol" ? e : String(e);
42
- }
43
- function O(o, e) {
44
- if (m(o) != "object" || !o) return o;
45
- var t = o[Symbol.toPrimitive];
46
- if (t !== void 0) {
47
- var r = t.call(o, e);
48
- if (m(r) != "object") return r;
49
- throw new TypeError("@@toPrimitive must return a primitive value.");
50
- }
51
- return (e === "string" ? String : Number)(o);
52
- }
53
- var x = g.extend("focustrap", {
54
- mounted: function(e, t) {
55
- var r = t.value || {}, n = r.disabled;
56
- n || (this.createHiddenFocusableElements(e, t), this.bind(e, t), this.autoElementFocus(e, t)), e.setAttribute("data-pd-focustrap", !0), this.$el = e;
1
+ import { Node as C, textblockTypeInputRule as S, mergeAttributes as k } from "./index249.js";
2
+ import { Plugin as w, PluginKey as B, TextSelection as T, Selection as L } from "./index264.js";
3
+ var y = 4, M = /^```([a-z]+)?[\s\n]$/, N = /^~~~([a-z]+)?[\s\n]$/, _ = C.create({
4
+ name: "codeBlock",
5
+ addOptions() {
6
+ return {
7
+ languageClassPrefix: "language-",
8
+ exitOnTripleEnter: !0,
9
+ exitOnArrowDown: !0,
10
+ defaultLanguage: null,
11
+ enableTabIndentation: !1,
12
+ tabSize: y,
13
+ HTMLAttributes: {}
14
+ };
15
+ },
16
+ content: "text*",
17
+ marks: "",
18
+ group: "block",
19
+ code: !0,
20
+ defining: !0,
21
+ addAttributes() {
22
+ return {
23
+ language: {
24
+ default: this.options.defaultLanguage,
25
+ parseHTML: (e) => {
26
+ var t;
27
+ const { languageClassPrefix: r } = this.options;
28
+ if (!r)
29
+ return null;
30
+ const o = [...((t = e.firstElementChild) == null ? void 0 : t.classList) || []].filter((s) => s.startsWith(r)).map((s) => s.replace(r, ""))[0];
31
+ return o || null;
32
+ },
33
+ rendered: !1
34
+ }
35
+ };
36
+ },
37
+ parseHTML() {
38
+ return [
39
+ {
40
+ tag: "pre",
41
+ preserveWhitespace: "full"
42
+ }
43
+ ];
44
+ },
45
+ renderHTML({ node: e, HTMLAttributes: t }) {
46
+ return [
47
+ "pre",
48
+ k(this.options.HTMLAttributes, t),
49
+ [
50
+ "code",
51
+ {
52
+ class: e.attrs.language ? this.options.languageClassPrefix + e.attrs.language : null
53
+ },
54
+ 0
55
+ ]
56
+ ];
57
57
  },
58
- updated: function(e, t) {
59
- var r = t.value || {}, n = r.disabled;
60
- n && this.unbind(e);
58
+ markdownTokenName: "code",
59
+ parseMarkdown: (e, t) => {
60
+ var r, n;
61
+ return ((r = e.raw) == null ? void 0 : r.startsWith("```")) === !1 && ((n = e.raw) == null ? void 0 : n.startsWith("~~~")) === !1 && e.codeBlockStyle !== "indented" ? [] : t.createNode(
62
+ "codeBlock",
63
+ { language: e.lang || null },
64
+ e.text ? [t.createTextNode(e.text)] : []
65
+ );
61
66
  },
62
- unmounted: function(e) {
63
- this.unbind(e);
67
+ renderMarkdown: (e, t) => {
68
+ var r;
69
+ let n = "";
70
+ const a = ((r = e.attrs) == null ? void 0 : r.language) || "";
71
+ return e.content ? n = [`\`\`\`${a}`, t.renderChildren(e.content), "```"].join(`
72
+ `) : n = `\`\`\`${a}
73
+
74
+ \`\`\``, n;
64
75
  },
65
- methods: {
66
- getComputedSelector: function(e) {
67
- return ':not(.p-hidden-focusable):not([data-p-hidden-focusable="true"])'.concat(e ?? "");
68
- },
69
- bind: function(e, t) {
70
- var r = this, n = t.value || {}, u = n.onFocusIn, l = n.onFocusOut;
71
- e.$_pfocustrap_mutationobserver = new MutationObserver(function(c) {
72
- c.forEach(function(f) {
73
- if (f.type === "childList" && !e.contains(document.activeElement)) {
74
- var d = function p(a) {
75
- var i = s.isFocusableElement(a) ? s.isFocusableElement(a, r.getComputedSelector(e.$_pfocustrap_focusableselector)) ? a : s.getFirstFocusableElement(e, r.getComputedSelector(e.$_pfocustrap_focusableselector)) : s.getFirstFocusableElement(a);
76
- return h.isNotEmpty(i) ? i : a.nextSibling && p(a.nextSibling);
77
- };
78
- s.focus(d(f.nextSibling));
76
+ addCommands() {
77
+ return {
78
+ setCodeBlock: (e) => ({ commands: t }) => t.setNode(this.name, e),
79
+ toggleCodeBlock: (e) => ({ commands: t }) => t.toggleNode(this.name, "paragraph", e)
80
+ };
81
+ },
82
+ addKeyboardShortcuts() {
83
+ return {
84
+ "Mod-Alt-c": () => this.editor.commands.toggleCodeBlock(),
85
+ // remove code block when at start of document or code block is empty
86
+ Backspace: () => {
87
+ const { empty: e, $anchor: t } = this.editor.state.selection, r = t.pos === 1;
88
+ return !e || t.parent.type.name !== this.name ? !1 : r || !t.parent.textContent.length ? this.editor.commands.clearNodes() : !1;
89
+ },
90
+ // handle tab indentation
91
+ Tab: ({ editor: e }) => {
92
+ var t;
93
+ if (!this.options.enableTabIndentation)
94
+ return !1;
95
+ const r = (t = this.options.tabSize) != null ? t : y, { state: n } = e, { selection: a } = n, { $from: o, empty: s } = a;
96
+ if (o.parent.type !== this.type)
97
+ return !1;
98
+ const i = " ".repeat(r);
99
+ return s ? e.commands.insertContent(i) : e.commands.command(({ tr: l }) => {
100
+ const { from: c, to: f } = a, u = n.doc.textBetween(c, f, `
101
+ `, `
102
+ `).split(`
103
+ `).map((p) => i + p).join(`
104
+ `);
105
+ return l.replaceWith(c, f, n.schema.text(u)), !0;
106
+ });
107
+ },
108
+ // handle shift+tab reverse indentation
109
+ "Shift-Tab": ({ editor: e }) => {
110
+ var t;
111
+ if (!this.options.enableTabIndentation)
112
+ return !1;
113
+ const r = (t = this.options.tabSize) != null ? t : y, { state: n } = e, { selection: a } = n, { $from: o, empty: s } = a;
114
+ return o.parent.type !== this.type ? !1 : s ? e.commands.command(({ tr: i }) => {
115
+ var l;
116
+ const { pos: c } = o, f = o.start(), h = o.end(), u = n.doc.textBetween(f, h, `
117
+ `, `
118
+ `).split(`
119
+ `);
120
+ let p = 0, g = 0;
121
+ const b = c - f;
122
+ for (let d = 0; d < u.length; d += 1) {
123
+ if (g + u[d].length >= b) {
124
+ p = d;
125
+ break;
126
+ }
127
+ g += u[d].length + 1;
79
128
  }
129
+ const A = ((l = u[p].match(/^ */)) == null ? void 0 : l[0]) || "", v = Math.min(A.length, r);
130
+ if (v === 0)
131
+ return !0;
132
+ let m = f;
133
+ for (let d = 0; d < p; d += 1)
134
+ m += u[d].length + 1;
135
+ return i.delete(m, m + v), c - m <= v && i.setSelection(T.create(i.doc, m)), !0;
136
+ }) : e.commands.command(({ tr: i }) => {
137
+ const { from: l, to: c } = a, x = n.doc.textBetween(l, c, `
138
+ `, `
139
+ `).split(`
140
+ `).map((u) => {
141
+ var p;
142
+ const g = ((p = u.match(/^ */)) == null ? void 0 : p[0]) || "", b = Math.min(g.length, r);
143
+ return u.slice(b);
144
+ }).join(`
145
+ `);
146
+ return i.replaceWith(l, c, n.schema.text(x)), !0;
80
147
  });
81
- }), e.$_pfocustrap_mutationobserver.disconnect(), e.$_pfocustrap_mutationobserver.observe(e, {
82
- childList: !0
83
- }), e.$_pfocustrap_focusinlistener = function(c) {
84
- return u && u(c);
85
- }, e.$_pfocustrap_focusoutlistener = function(c) {
86
- return l && l(c);
87
- }, e.addEventListener("focusin", e.$_pfocustrap_focusinlistener), e.addEventListener("focusout", e.$_pfocustrap_focusoutlistener);
88
- },
89
- unbind: function(e) {
90
- e.$_pfocustrap_mutationobserver && e.$_pfocustrap_mutationobserver.disconnect(), e.$_pfocustrap_focusinlistener && e.removeEventListener("focusin", e.$_pfocustrap_focusinlistener) && (e.$_pfocustrap_focusinlistener = null), e.$_pfocustrap_focusoutlistener && e.removeEventListener("focusout", e.$_pfocustrap_focusoutlistener) && (e.$_pfocustrap_focusoutlistener = null);
91
- },
92
- autoFocus: function(e) {
93
- this.autoElementFocus(this.$el, {
94
- value: F(F({}, e), {}, {
95
- autoFocus: !0
148
+ },
149
+ // exit node on triple enter
150
+ Enter: ({ editor: e }) => {
151
+ if (!this.options.exitOnTripleEnter)
152
+ return !1;
153
+ const { state: t } = e, { selection: r } = t, { $from: n, empty: a } = r;
154
+ if (!a || n.parent.type !== this.type)
155
+ return !1;
156
+ const o = n.parentOffset === n.parent.nodeSize - 2, s = n.parent.textContent.endsWith(`
157
+
158
+ `);
159
+ return !o || !s ? !1 : e.chain().command(({ tr: i }) => (i.delete(n.pos - 2, n.pos), !0)).exitCode().run();
160
+ },
161
+ // exit node on arrow down
162
+ ArrowDown: ({ editor: e }) => {
163
+ if (!this.options.exitOnArrowDown)
164
+ return !1;
165
+ const { state: t } = e, { selection: r, doc: n } = t, { $from: a, empty: o } = r;
166
+ if (!o || a.parent.type !== this.type || !(a.parentOffset === a.parent.nodeSize - 2))
167
+ return !1;
168
+ const i = a.after();
169
+ return i === void 0 ? !1 : n.nodeAt(i) ? e.commands.command(({ tr: c }) => (c.setSelection(L.near(n.resolve(i))), !0)) : e.commands.exitCode();
170
+ }
171
+ };
172
+ },
173
+ addInputRules() {
174
+ return [
175
+ S({
176
+ find: M,
177
+ type: this.type,
178
+ getAttributes: (e) => ({
179
+ language: e[1]
96
180
  })
97
- });
98
- },
99
- autoElementFocus: function(e, t) {
100
- var r = t.value || {}, n = r.autoFocusSelector, u = n === void 0 ? "" : n, l = r.firstFocusableSelector, c = l === void 0 ? "" : l, f = r.autoFocus, d = f === void 0 ? !1 : f, p = s.getFirstFocusableElement(e, "[autofocus]".concat(this.getComputedSelector(u)));
101
- d && !p && (p = s.getFirstFocusableElement(e, this.getComputedSelector(c))), s.focus(p);
102
- },
103
- onFirstHiddenElementFocus: function(e) {
104
- var t, r = e.currentTarget, n = e.relatedTarget, u = n === r.$_pfocustrap_lasthiddenfocusableelement || !((t = this.$el) !== null && t !== void 0 && t.contains(n)) ? s.getFirstFocusableElement(r.parentElement, this.getComputedSelector(r.$_pfocustrap_focusableselector)) : r.$_pfocustrap_lasthiddenfocusableelement;
105
- s.focus(u);
106
- },
107
- onLastHiddenElementFocus: function(e) {
108
- var t, r = e.currentTarget, n = e.relatedTarget, u = n === r.$_pfocustrap_firsthiddenfocusableelement || !((t = this.$el) !== null && t !== void 0 && t.contains(n)) ? s.getLastFocusableElement(r.parentElement, this.getComputedSelector(r.$_pfocustrap_focusableselector)) : r.$_pfocustrap_firsthiddenfocusableelement;
109
- s.focus(u);
110
- },
111
- createHiddenFocusableElements: function(e, t) {
112
- var r = this, n = t.value || {}, u = n.tabIndex, l = u === void 0 ? 0 : u, c = n.firstFocusableSelector, f = c === void 0 ? "" : c, d = n.lastFocusableSelector, p = d === void 0 ? "" : d, a = function(_) {
113
- return s.createElement("span", {
114
- class: "p-hidden-accessible p-hidden-focusable",
115
- tabIndex: l,
116
- role: "presentation",
117
- "aria-hidden": !0,
118
- "data-p-hidden-accessible": !0,
119
- "data-p-hidden-focusable": !0,
120
- onFocus: _?.bind(r)
121
- });
122
- }, i = a(this.onFirstHiddenElementFocus), b = a(this.onLastHiddenElementFocus);
123
- i.$_pfocustrap_lasthiddenfocusableelement = b, i.$_pfocustrap_focusableselector = f, i.setAttribute("data-pc-section", "firstfocusableelement"), b.$_pfocustrap_firsthiddenfocusableelement = i, b.$_pfocustrap_focusableselector = p, b.setAttribute("data-pc-section", "lastfocusableelement"), e.prepend(i), e.append(b);
124
- }
181
+ }),
182
+ S({
183
+ find: N,
184
+ type: this.type,
185
+ getAttributes: (e) => ({
186
+ language: e[1]
187
+ })
188
+ })
189
+ ];
190
+ },
191
+ addProseMirrorPlugins() {
192
+ return [
193
+ // this plugin creates a code block for pasted content from VS Code
194
+ // we can also detect the copied code language
195
+ new w({
196
+ key: new B("codeBlockVSCodeHandler"),
197
+ props: {
198
+ handlePaste: (e, t) => {
199
+ if (!t.clipboardData || this.editor.isActive(this.type.name))
200
+ return !1;
201
+ const r = t.clipboardData.getData("text/plain"), n = t.clipboardData.getData("vscode-editor-data"), a = n ? JSON.parse(n) : void 0, o = a?.mode;
202
+ if (!r || !o)
203
+ return !1;
204
+ const { tr: s, schema: i } = e.state, l = i.text(r.replace(/\r\n?/g, `
205
+ `));
206
+ return s.replaceSelectionWith(this.type.create({ language: o }, l)), s.selection.$from.parent.type !== this.type && s.setSelection(T.near(s.doc.resolve(Math.max(0, s.selection.from - 2)))), s.setMeta("paste", !0), e.dispatch(s), !0;
207
+ }
208
+ }
209
+ })
210
+ ];
125
211
  }
126
212
  });
127
213
  export {
128
- x as default
214
+ _ as CodeBlock,
215
+ M as backtickInputRegex,
216
+ N as tildeInputRegex
129
217
  };
package/dist/index254.js CHANGED
@@ -1,22 +1,12 @@
1
- import r from "./index284.js";
2
- import { openBlock as t, createElementBlock as o, mergeProps as n, createElementVNode as i } from "vue";
3
- var C = {
4
- name: "FilterIcon",
5
- extends: r
6
- }, l = /* @__PURE__ */ i("path", {
7
- d: "M8.64708 14H5.35296C5.18981 13.9979 5.03395 13.9321 4.91858 13.8167C4.8032 13.7014 4.73745 13.5455 4.73531 13.3824V7L0.329431 0.98C0.259794 0.889466 0.217389 0.780968 0.20718 0.667208C0.19697 0.553448 0.219379 0.439133 0.271783 0.337647C0.324282 0.236453 0.403423 0.151519 0.500663 0.0920138C0.597903 0.0325088 0.709548 0.000692754 0.823548 0H13.1765C13.2905 0.000692754 13.4021 0.0325088 13.4994 0.0920138C13.5966 0.151519 13.6758 0.236453 13.7283 0.337647C13.7807 0.439133 13.8031 0.553448 13.7929 0.667208C13.7826 0.780968 13.7402 0.889466 13.6706 0.98L9.26472 7V13.3824C9.26259 13.5455 9.19683 13.7014 9.08146 13.8167C8.96609 13.9321 8.81022 13.9979 8.64708 14ZM5.97061 12.7647H8.02943V6.79412C8.02878 6.66289 8.07229 6.53527 8.15296 6.43177L11.9412 1.23529H2.05884L5.86355 6.43177C5.94422 6.53527 5.98773 6.66289 5.98708 6.79412L5.97061 12.7647Z",
8
- fill: "currentColor"
9
- }, null, -1), p = [l];
10
- function s(e, a, c, d, m, h) {
11
- return t(), o("svg", n({
12
- width: "14",
13
- height: "14",
14
- viewBox: "0 0 14 14",
15
- fill: "none",
16
- xmlns: "http://www.w3.org/2000/svg"
17
- }, e.pti()), p, 16);
18
- }
19
- C.render = s;
1
+ import { Node as n } from "./index249.js";
2
+ var o = n.create({
3
+ name: "doc",
4
+ topNode: !0,
5
+ content: "block+",
6
+ renderMarkdown: (e, r) => e.content ? r.renderChildren(e.content, `
7
+
8
+ `) : ""
9
+ });
20
10
  export {
21
- C as default
11
+ o as Document
22
12
  };
package/dist/index255.js CHANGED
@@ -1,24 +1,59 @@
1
- import C from "./index284.js";
2
- import { openBlock as r, createElementBlock as t, mergeProps as o, createElementVNode as l } from "vue";
3
- var n = {
4
- name: "FilterSlashIcon",
5
- extends: C
6
- }, i = /* @__PURE__ */ l("path", {
7
- "fill-rule": "evenodd",
8
- "clip-rule": "evenodd",
9
- d: "M13.4994 0.0920138C13.5967 0.151519 13.6758 0.236453 13.7283 0.337647C13.7807 0.439133 13.8031 0.553448 13.7929 0.667208C13.7827 0.780968 13.7403 0.889466 13.6707 0.98L11.406 4.06823C11.3099 4.19928 11.1656 4.28679 11.005 4.3115C10.8444 4.33621 10.6805 4.2961 10.5495 4.2C10.4184 4.1039 10.3309 3.95967 10.3062 3.79905C10.2815 3.63843 10.3216 3.47458 10.4177 3.34353L11.9412 1.23529H7.41184C7.24803 1.23529 7.09093 1.17022 6.97509 1.05439C6.85926 0.938558 6.79419 0.781457 6.79419 0.617647C6.79419 0.453837 6.85926 0.296736 6.97509 0.180905C7.09093 0.0650733 7.24803 0 7.41184 0H13.1765C13.2905 0.000692754 13.4022 0.0325088 13.4994 0.0920138ZM4.20008 0.181168H4.24126L13.2013 9.03411C13.3169 9.14992 13.3819 9.3069 13.3819 9.47058C13.3819 9.63426 13.3169 9.79124 13.2013 9.90705C13.1445 9.96517 13.0766 10.0112 13.0016 10.0423C12.9266 10.0735 12.846 10.0891 12.7648 10.0882C12.6836 10.0886 12.6032 10.0728 12.5283 10.0417C12.4533 10.0106 12.3853 9.96479 12.3283 9.90705L9.3142 6.92587L9.26479 6.99999V13.3823C9.26265 13.5455 9.19689 13.7014 9.08152 13.8167C8.96615 13.9321 8.81029 13.9979 8.64714 14H5.35302C5.18987 13.9979 5.03401 13.9321 4.91864 13.8167C4.80327 13.7014 4.73751 13.5455 4.73537 13.3823V6.99999L0.329492 1.02117C0.259855 0.930634 0.21745 0.822137 0.207241 0.708376C0.197031 0.594616 0.21944 0.480301 0.271844 0.378815C0.324343 0.277621 0.403484 0.192687 0.500724 0.133182C0.597964 0.073677 0.709609 0.041861 0.823609 0.0411682H3.86243C3.92448 0.0461551 3.9855 0.060022 4.04361 0.0823446C4.10037 0.10735 4.15311 0.140655 4.20008 0.181168ZM8.02949 6.79411C8.02884 6.66289 8.07235 6.53526 8.15302 6.43176L8.42478 6.05293L3.55773 1.23529H2.0589L5.84714 6.43176C5.92781 6.53526 5.97132 6.66289 5.97067 6.79411V12.7647H8.02949V6.79411Z",
10
- fill: "currentColor"
11
- }, null, -1), p = [i];
12
- function d(e, s, a, c, h, m) {
13
- return r(), t("svg", o({
14
- width: "14",
15
- height: "14",
16
- viewBox: "0 0 14 14",
17
- fill: "none",
18
- xmlns: "http://www.w3.org/2000/svg"
19
- }, e.pti()), p, 16);
20
- }
21
- n.render = d;
1
+ import { Node as l, mergeAttributes as c } from "./index249.js";
2
+ var f = l.create({
3
+ name: "hardBreak",
4
+ markdownTokenName: "br",
5
+ addOptions() {
6
+ return {
7
+ keepMarks: !0,
8
+ HTMLAttributes: {}
9
+ };
10
+ },
11
+ inline: !0,
12
+ group: "inline",
13
+ selectable: !1,
14
+ linebreakReplacement: !0,
15
+ parseHTML() {
16
+ return [{ tag: "br" }];
17
+ },
18
+ renderHTML({ HTMLAttributes: e }) {
19
+ return ["br", c(this.options.HTMLAttributes, e)];
20
+ },
21
+ renderText() {
22
+ return `
23
+ `;
24
+ },
25
+ renderMarkdown: () => `
26
+ `,
27
+ parseMarkdown: () => ({
28
+ type: "hardBreak"
29
+ }),
30
+ addCommands() {
31
+ return {
32
+ setHardBreak: () => ({ commands: e, chain: n, state: a, editor: s }) => e.first([
33
+ () => e.exitCode(),
34
+ () => e.command(() => {
35
+ const { selection: r, storedMarks: o } = a;
36
+ if (r.$from.parent.type.spec.isolating)
37
+ return !1;
38
+ const { keepMarks: i } = this.options, { splittableMarks: d } = s.extensionManager, t = o || r.$to.parentOffset && r.$from.marks();
39
+ return n().insertContent({ type: this.name }).command(({ tr: u, dispatch: k }) => {
40
+ if (k && t && i) {
41
+ const m = t.filter((p) => d.includes(p.type.name));
42
+ u.ensureMarks(m);
43
+ }
44
+ return !0;
45
+ }).run();
46
+ })
47
+ ])
48
+ };
49
+ },
50
+ addKeyboardShortcuts() {
51
+ return {
52
+ "Mod-Enter": () => this.editor.commands.setHardBreak(),
53
+ "Shift-Enter": () => this.editor.commands.setHardBreak()
54
+ };
55
+ }
56
+ });
22
57
  export {
23
- n as default
58
+ f as HardBreak
24
59
  };
package/dist/index256.js CHANGED
@@ -1,24 +1,63 @@
1
- import e from "./index284.js";
2
- import { openBlock as r, createElementBlock as t, mergeProps as o, createElementVNode as n } from "vue";
3
- var l = {
4
- name: "TrashIcon",
5
- extends: e
6
- }, i = /* @__PURE__ */ n("path", {
7
- "fill-rule": "evenodd",
8
- "clip-rule": "evenodd",
9
- d: "M3.44802 13.9955H10.552C10.8056 14.0129 11.06 13.9797 11.3006 13.898C11.5412 13.8163 11.7632 13.6877 11.9537 13.5196C12.1442 13.3515 12.2995 13.1473 12.4104 12.9188C12.5213 12.6903 12.5858 12.442 12.6 12.1884V4.36041H13.4C13.5591 4.36041 13.7117 4.29722 13.8243 4.18476C13.9368 4.07229 14 3.91976 14 3.76071C14 3.60166 13.9368 3.44912 13.8243 3.33666C13.7117 3.22419 13.5591 3.16101 13.4 3.16101H12.0537C12.0203 3.1557 11.9863 3.15299 11.952 3.15299C11.9178 3.15299 11.8838 3.1557 11.8503 3.16101H11.2285C11.2421 3.10893 11.2487 3.05513 11.248 3.00106V1.80966C11.2171 1.30262 10.9871 0.828306 10.608 0.48989C10.229 0.151475 9.73159 -0.0236625 9.22402 0.00257442H4.77602C4.27251 -0.0171866 3.78126 0.160868 3.40746 0.498617C3.03365 0.836366 2.807 1.30697 2.77602 1.80966V3.00106C2.77602 3.0556 2.78346 3.10936 2.79776 3.16101H0.6C0.521207 3.16101 0.443185 3.17652 0.37039 3.20666C0.297595 3.2368 0.231451 3.28097 0.175736 3.33666C0.120021 3.39235 0.0758251 3.45846 0.0456722 3.53121C0.0155194 3.60397 0 3.68196 0 3.76071C0 3.83946 0.0155194 3.91744 0.0456722 3.9902C0.0758251 4.06296 0.120021 4.12907 0.175736 4.18476C0.231451 4.24045 0.297595 4.28462 0.37039 4.31476C0.443185 4.3449 0.521207 4.36041 0.6 4.36041H1.40002V12.1884C1.41426 12.442 1.47871 12.6903 1.58965 12.9188C1.7006 13.1473 1.85582 13.3515 2.04633 13.5196C2.23683 13.6877 2.45882 13.8163 2.69944 13.898C2.94005 13.9797 3.1945 14.0129 3.44802 13.9955ZM2.60002 4.36041H11.304V12.1884C11.304 12.5163 10.952 12.7961 10.504 12.7961H3.40002C2.97602 12.7961 2.60002 12.5163 2.60002 12.1884V4.36041ZM3.95429 3.16101C3.96859 3.10936 3.97602 3.0556 3.97602 3.00106V1.80966C3.97602 1.48183 4.33602 1.20197 4.77602 1.20197H9.24802C9.66403 1.20197 10.048 1.48183 10.048 1.80966V3.00106C10.0473 3.05515 10.054 3.10896 10.0678 3.16101H3.95429ZM5.57571 10.997C5.41731 10.995 5.26597 10.9311 5.15395 10.8191C5.04193 10.7071 4.97808 10.5558 4.97601 10.3973V6.77517C4.97601 6.61612 5.0392 6.46359 5.15166 6.35112C5.26413 6.23866 5.41666 6.17548 5.57571 6.17548C5.73476 6.17548 5.8873 6.23866 5.99976 6.35112C6.11223 6.46359 6.17541 6.61612 6.17541 6.77517V10.3894C6.17647 10.4688 6.16174 10.5476 6.13208 10.6213C6.10241 10.695 6.05841 10.762 6.00261 10.8186C5.94682 10.8751 5.88035 10.92 5.80707 10.9506C5.73378 10.9813 5.65514 10.9971 5.57571 10.997ZM7.99968 10.8214C8.11215 10.9339 8.26468 10.997 8.42373 10.997C8.58351 10.9949 8.73604 10.93 8.84828 10.8163C8.96052 10.7025 9.02345 10.5491 9.02343 10.3894V6.77517C9.02343 6.61612 8.96025 6.46359 8.84778 6.35112C8.73532 6.23866 8.58278 6.17548 8.42373 6.17548C8.26468 6.17548 8.11215 6.23866 7.99968 6.35112C7.88722 6.46359 7.82404 6.61612 7.82404 6.77517V10.3973C7.82404 10.5564 7.88722 10.7089 7.99968 10.8214Z",
10
- fill: "currentColor"
11
- }, null, -1), p = [i];
12
- function d(C, s, a, V, c, H) {
13
- return r(), t("svg", o({
14
- width: "14",
15
- height: "14",
16
- viewBox: "0 0 14 14",
17
- fill: "none",
18
- xmlns: "http://www.w3.org/2000/svg"
19
- }, C.pti()), p, 16);
20
- }
21
- l.render = d;
1
+ import { Node as l, textblockTypeInputRule as i, mergeAttributes as a } from "./index249.js";
2
+ var d = l.create({
3
+ name: "heading",
4
+ addOptions() {
5
+ return {
6
+ levels: [1, 2, 3, 4, 5, 6],
7
+ HTMLAttributes: {}
8
+ };
9
+ },
10
+ content: "inline*",
11
+ group: "block",
12
+ defining: !0,
13
+ addAttributes() {
14
+ return {
15
+ level: {
16
+ default: 1,
17
+ rendered: !1
18
+ }
19
+ };
20
+ },
21
+ parseHTML() {
22
+ return this.options.levels.map((e) => ({
23
+ tag: `h${e}`,
24
+ attrs: { level: e }
25
+ }));
26
+ },
27
+ renderHTML({ node: e, HTMLAttributes: t }) {
28
+ return [`h${this.options.levels.includes(e.attrs.level) ? e.attrs.level : this.options.levels[0]}`, a(this.options.HTMLAttributes, t), 0];
29
+ },
30
+ parseMarkdown: (e, t) => t.createNode("heading", { level: e.depth || 1 }, t.parseInline(e.tokens || [])),
31
+ renderMarkdown: (e, t) => {
32
+ var r;
33
+ const n = (r = e.attrs) != null && r.level ? parseInt(e.attrs.level, 10) : 1, s = "#".repeat(n);
34
+ return e.content ? `${s} ${t.renderChildren(e.content)}` : "";
35
+ },
36
+ addCommands() {
37
+ return {
38
+ setHeading: (e) => ({ commands: t }) => this.options.levels.includes(e.level) ? t.setNode(this.name, e) : !1,
39
+ toggleHeading: (e) => ({ commands: t }) => this.options.levels.includes(e.level) ? t.toggleNode(this.name, "paragraph", e) : !1
40
+ };
41
+ },
42
+ addKeyboardShortcuts() {
43
+ return this.options.levels.reduce(
44
+ (e, t) => ({
45
+ ...e,
46
+ [`Mod-Alt-${t}`]: () => this.editor.commands.toggleHeading({ level: t })
47
+ }),
48
+ {}
49
+ );
50
+ },
51
+ addInputRules() {
52
+ return this.options.levels.map((e) => i({
53
+ find: new RegExp(`^(#{${Math.min(...this.options.levels)},${e}})\\s$`),
54
+ type: this.type,
55
+ getAttributes: {
56
+ level: e
57
+ }
58
+ }));
59
+ }
60
+ });
22
61
  export {
23
- l as default
62
+ d as Heading
24
63
  };
package/dist/index257.js CHANGED
@@ -1,40 +1,56 @@
1
- import { DomHandler as d } from "./index180.js";
2
- import { renderSlot as t, openBlock as a, createBlock as l, Teleport as i, createCommentVNode as u } from "vue";
3
- var p = {
4
- name: "Portal",
5
- props: {
6
- appendTo: {
7
- type: [String, Object],
8
- default: "body"
9
- },
10
- disabled: {
11
- type: Boolean,
12
- default: !1
13
- }
14
- },
15
- data: function() {
1
+ import { Node as m, nodeInputRule as f, canInsertNode as h, isNodeSelection as T, mergeAttributes as y } from "./index249.js";
2
+ import { TextSelection as s, NodeSelection as N } from "./index264.js";
3
+ var M = m.create({
4
+ name: "horizontalRule",
5
+ addOptions() {
16
6
  return {
17
- mounted: !1
7
+ HTMLAttributes: {},
8
+ nextNodeType: "paragraph"
18
9
  };
19
10
  },
20
- mounted: function() {
21
- this.mounted = d.isClient();
11
+ group: "block",
12
+ parseHTML() {
13
+ return [{ tag: "hr" }];
14
+ },
15
+ renderHTML({ HTMLAttributes: n }) {
16
+ return ["hr", y(this.options.HTMLAttributes, n)];
17
+ },
18
+ markdownTokenName: "hr",
19
+ parseMarkdown: (n, o) => o.createNode("horizontalRule"),
20
+ renderMarkdown: () => "---",
21
+ addCommands() {
22
+ return {
23
+ setHorizontalRule: () => ({ chain: n, state: o }) => {
24
+ if (!h(o, o.schema.nodes[this.name]))
25
+ return !1;
26
+ const { selection: i } = o, { $to: l } = i, r = n();
27
+ return T(i) ? r.insertContentAt(l.pos, {
28
+ type: this.name
29
+ }) : r.insertContent({ type: this.name }), r.command(({ state: p, tr: e, dispatch: u }) => {
30
+ if (u) {
31
+ const { $to: t } = e.selection, a = t.end();
32
+ if (t.nodeAfter)
33
+ t.nodeAfter.isTextblock ? e.setSelection(s.create(e.doc, t.pos + 1)) : t.nodeAfter.isBlock ? e.setSelection(N.create(e.doc, t.pos)) : e.setSelection(s.create(e.doc, t.pos));
34
+ else {
35
+ const c = p.schema.nodes[this.options.nextNodeType] || t.parent.type.contentMatch.defaultType, d = c?.create();
36
+ d && (e.insert(a, d), e.setSelection(s.create(e.doc, a + 1)));
37
+ }
38
+ e.scrollIntoView();
39
+ }
40
+ return !0;
41
+ }).run();
42
+ }
43
+ };
22
44
  },
23
- computed: {
24
- inline: function() {
25
- return this.disabled || this.appendTo === "self";
26
- }
45
+ addInputRules() {
46
+ return [
47
+ f({
48
+ find: /^(?:---|—-|___\s|\*\*\*\s)$/,
49
+ type: this.type
50
+ })
51
+ ];
27
52
  }
28
- };
29
- function s(e, f, n, m, o, r) {
30
- return r.inline ? t(e.$slots, "default", {
31
- key: 0
32
- }) : o.mounted ? (a(), l(i, {
33
- key: 1,
34
- to: n.appendTo
35
- }, [t(e.$slots, "default")], 8, ["to"])) : u("", !0);
36
- }
37
- p.render = s;
53
+ });
38
54
  export {
39
- p as default
55
+ M as HorizontalRule
40
56
  };