@quoreadmin/ui 1.7.3 → 1.7.4

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 (202) hide show
  1. package/dist/index140.js +361 -307
  2. package/dist/index142.js +1 -1
  3. package/dist/index171.js +14 -14
  4. package/dist/index172.js +3 -3
  5. package/dist/index175.js +4 -4
  6. package/dist/index182.js +10 -10
  7. package/dist/index184.js +9 -9
  8. package/dist/index186.js +36 -1190
  9. package/dist/{index189.js → index187.js} +17 -17
  10. package/dist/index188.js +1190 -36
  11. package/dist/index190.js +27 -27
  12. package/dist/index191.js +2 -2
  13. package/dist/index192.js +2 -2
  14. package/dist/index193.js +1 -1
  15. package/dist/index195.js +2 -2
  16. package/dist/index197.js +14 -14
  17. package/dist/index198.js +1 -1
  18. package/dist/index199.js +1 -1
  19. package/dist/index200.js +3 -3
  20. package/dist/index201.js +6 -6
  21. package/dist/index202.js +29 -84
  22. package/dist/index203.js +109 -400
  23. package/dist/index204.js +36 -22
  24. package/dist/index205.js +26 -33
  25. package/dist/index206.js +31 -111
  26. package/dist/index207.js +9 -36
  27. package/dist/index208.js +19 -26
  28. package/dist/index209.js +10 -36
  29. package/dist/index210.js +10 -9
  30. package/dist/index211.js +50 -18
  31. package/dist/index212.js +43 -10
  32. package/dist/index213.js +4 -10
  33. package/dist/index214.js +36 -48
  34. package/dist/index215.js +21 -43
  35. package/dist/index216.js +87 -3
  36. package/dist/index217.js +403 -35
  37. package/dist/index218.js +22 -21
  38. package/dist/index219.js +126 -21
  39. package/dist/index220.js +37 -21
  40. package/dist/index221.js +80 -20
  41. package/dist/index222.js +20 -836
  42. package/dist/index223.js +19 -701
  43. package/dist/index224.js +19 -175
  44. package/dist/index225.js +1 -1
  45. package/dist/index226.js +11 -11
  46. package/dist/index227.js +160 -21
  47. package/dist/index228.js +228 -20
  48. package/dist/index229.js +36 -19
  49. package/dist/index230.js +10 -20
  50. package/dist/index231.js +161 -3
  51. package/dist/index232.js +19 -186
  52. package/dist/index233.js +21 -132
  53. package/dist/index234.js +167 -129
  54. package/dist/index235.js +46 -1199
  55. package/dist/index236.js +31 -124
  56. package/dist/index237.js +39 -19
  57. package/dist/index238.js +3632 -22
  58. package/dist/index239.js +55 -20
  59. package/dist/index240.js +77 -22
  60. package/dist/index241.js +46 -32
  61. package/dist/index242.js +215 -29
  62. package/dist/index243.js +10 -20
  63. package/dist/index244.js +57 -20
  64. package/dist/index245.js +61 -2
  65. package/dist/index246.js +54 -2
  66. package/dist/index247.js +74 -160
  67. package/dist/index248.js +707 -212
  68. package/dist/index249.js +39 -37
  69. package/dist/index250.js +64 -10
  70. package/dist/index251.js +11 -22
  71. package/dist/index252.js +689 -183
  72. package/dist/index253.js +813 -63
  73. package/dist/index254.js +22 -34
  74. package/dist/index255.js +20 -38
  75. package/dist/index256.js +20 -80
  76. package/dist/index257.js +836 -20
  77. package/dist/index258.js +701 -19
  78. package/dist/index259.js +170 -3626
  79. package/dist/index260.js +22 -55
  80. package/dist/index261.js +20 -77
  81. package/dist/index262.js +20 -52
  82. package/dist/index263.js +3 -215
  83. package/dist/index264.js +187 -10
  84. package/dist/index265.js +128 -52
  85. package/dist/index266.js +1214 -52
  86. package/dist/index267.js +20 -54
  87. package/dist/index268.js +22 -75
  88. package/dist/index269.js +21 -722
  89. package/dist/index270.js +29 -39
  90. package/dist/index271.js +20 -64
  91. package/dist/index272.js +20 -11
  92. package/dist/index273.js +2 -705
  93. package/dist/index274.js +2 -820
  94. package/dist/index279.js +2 -79
  95. package/dist/index280.js +71 -71
  96. package/dist/index281.js +3 -22
  97. package/dist/index282.js +24 -932
  98. package/dist/index283.js +53 -21
  99. package/dist/index284.js +18 -12
  100. package/dist/index285.js +13 -11
  101. package/dist/index286.js +21 -68
  102. package/dist/index287.js +14 -17
  103. package/dist/index288.js +14 -16
  104. package/dist/index289.js +21 -52
  105. package/dist/index290.js +1518 -22
  106. package/dist/index291.js +386 -22
  107. package/dist/index292.js +2731 -63
  108. package/dist/index293.js +86 -2
  109. package/dist/index294.js +3770 -26
  110. package/dist/index295.js +59 -21
  111. package/dist/index296.js +15 -22
  112. package/dist/index297.js +84 -16
  113. package/dist/index298.js +201 -16
  114. package/dist/index299.js +246 -23
  115. package/dist/index300.js +235 -3
  116. package/dist/index301.js +4 -25
  117. package/dist/index302.js +123 -1507
  118. package/dist/index303.js +61 -379
  119. package/dist/index304.js +81 -2725
  120. package/dist/index305.js +26 -83
  121. package/dist/index306.js +9 -3770
  122. package/dist/index307.js +72 -57
  123. package/dist/index308.js +4 -15
  124. package/dist/index309.js +2 -84
  125. package/dist/index310.js +74 -193
  126. package/dist/index311.js +54 -246
  127. package/dist/index312.js +4 -233
  128. package/dist/index313.js +4 -5
  129. package/dist/index314.js +166 -121
  130. package/dist/index315.js +58 -63
  131. package/dist/index316.js +73 -85
  132. package/dist/index317.js +75 -25
  133. package/dist/index318.js +21 -8
  134. package/dist/index319.js +926 -66
  135. package/dist/index320.js +21 -3
  136. package/dist/index321.js +20 -2
  137. package/dist/index322.js +19 -82
  138. package/dist/index323.js +66 -51
  139. package/dist/index324.js +19 -6
  140. package/dist/index325.js +19 -5
  141. package/dist/index326.js +21 -178
  142. package/dist/index327.js +21 -62
  143. package/dist/index328.js +62 -74
  144. package/dist/index330.js +8 -19
  145. package/dist/index331.js +12 -19
  146. package/dist/index332.js +51 -60
  147. package/dist/index333.js +12 -37
  148. package/dist/index334.js +13 -8
  149. package/dist/index335.js +57 -12
  150. package/dist/index336.js +48 -51
  151. package/dist/index337.js +28 -9
  152. package/dist/index338.js +2 -14
  153. package/dist/index339.js +5 -58
  154. package/dist/index340.js +2 -52
  155. package/dist/index341.js +22 -30
  156. package/dist/index342.js +41 -2
  157. package/dist/index343.js +2 -5
  158. package/dist/index344.js +11 -2
  159. package/dist/index345.js +19 -22
  160. package/dist/index346.js +14 -38
  161. package/dist/index347.js +10 -2
  162. package/dist/index348.js +9 -10
  163. package/dist/index349.js +2 -20
  164. package/dist/index350.js +8 -16
  165. package/dist/index351.js +10 -10
  166. package/dist/index352.js +13 -9
  167. package/dist/index353.js +21 -2
  168. package/dist/index354.js +56 -9
  169. package/dist/index355.js +28 -9
  170. package/dist/index356.js +7 -14
  171. package/dist/index357.js +49 -18
  172. package/dist/index358.js +6 -56
  173. package/dist/index359.js +10 -27
  174. package/dist/index360.js +7 -7
  175. package/dist/index361.js +27 -51
  176. package/dist/index362.js +2 -6
  177. package/dist/index363.js +69 -11
  178. package/dist/index364.js +166 -6
  179. package/dist/index365.js +20 -28
  180. package/dist/index366.js +20 -2
  181. package/dist/index367.js +61 -67
  182. package/dist/index368.js +36 -166
  183. package/dist/index369.js +100 -16
  184. package/dist/index370.js +91 -98
  185. package/dist/index371.js +95 -98
  186. package/dist/index372.js +30 -90
  187. package/dist/index373.js +10 -30
  188. package/dist/index374.js +3 -10
  189. package/dist/index375.js +3 -3
  190. package/dist/index376.js +13 -4
  191. package/dist/index377.js +7 -13
  192. package/dist/index378.js +12 -7
  193. package/dist/index379.js +4 -11
  194. package/dist/index380.js +33 -5
  195. package/dist/index381.js +31 -33
  196. package/dist/index382.js +26 -29
  197. package/dist/index383.js +59 -26
  198. package/dist/index384.js +16 -60
  199. package/dist/index385.js +1 -1
  200. package/dist/index390.js +1 -1
  201. package/dist/index391.js +2 -2
  202. package/package.json +1 -1
package/dist/index245.js CHANGED
@@ -1,4 +1,63 @@
1
- var a = {};
1
+ import { Node as l, textblockTypeInputRule as i, mergeAttributes as a } from "./index238.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
+ });
2
61
  export {
3
- a as default
62
+ d as Heading
4
63
  };
package/dist/index246.js CHANGED
@@ -1,4 +1,56 @@
1
- var a = {};
1
+ import { Node as m, nodeInputRule as f, canInsertNode as h, isNodeSelection as T, mergeAttributes as y } from "./index238.js";
2
+ import { TextSelection as s, NodeSelection as N } from "./index253.js";
3
+ var M = m.create({
4
+ name: "horizontalRule",
5
+ addOptions() {
6
+ return {
7
+ HTMLAttributes: {},
8
+ nextNodeType: "paragraph"
9
+ };
10
+ },
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
+ };
44
+ },
45
+ addInputRules() {
46
+ return [
47
+ f({
48
+ find: /^(?:---|—-|___\s|\*\*\*\s)$/,
49
+ type: this.type
50
+ })
51
+ ];
52
+ }
53
+ });
2
54
  export {
3
- a as default
55
+ M as HorizontalRule
4
56
  };
package/dist/index247.js CHANGED
@@ -1,163 +1,77 @@
1
- import { toDate as m, isValidDate as M, getWeek as l } from "./index249.js";
2
- import h from "./index250.js";
3
- var Y = /\[([^\]]+)]|YYYY|YY?|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|m{1,2}|s{1,2}|Z{1,2}|S{1,3}|w{1,2}|x|X|a|A/g;
4
- function r(n) {
5
- for (var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 2, e = "".concat(Math.abs(n)), u = n < 0 ? "-" : ""; e.length < t; )
6
- e = "0".concat(e);
7
- return u + e;
8
- }
9
- function c(n) {
10
- return Math.round(n.getTimezoneOffset() / 15) * 15;
11
- }
12
- function g(n) {
13
- var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : "", e = n > 0 ? "-" : "+", u = Math.abs(n), o = Math.floor(u / 60), a = u % 60;
14
- return e + r(o, 2) + t + r(a, 2);
15
- }
16
- var d = function(t, e, u) {
17
- var o = t < 12 ? "AM" : "PM";
18
- return u ? o.toLocaleLowerCase() : o;
19
- }, i = {
20
- Y: function(t) {
21
- var e = t.getFullYear();
22
- return e <= 9999 ? "".concat(e) : "+".concat(e);
23
- },
24
- // Year: 00, 01, ..., 99
25
- YY: function(t) {
26
- return r(t.getFullYear(), 4).substr(2);
27
- },
28
- // Year: 1900, 1901, ..., 2099
29
- YYYY: function(t) {
30
- return r(t.getFullYear(), 4);
31
- },
32
- // Month: 1, 2, ..., 12
33
- M: function(t) {
34
- return t.getMonth() + 1;
35
- },
36
- // Month: 01, 02, ..., 12
37
- MM: function(t) {
38
- return r(t.getMonth() + 1, 2);
39
- },
40
- MMM: function(t, e) {
41
- return e.monthsShort[t.getMonth()];
42
- },
43
- MMMM: function(t, e) {
44
- return e.months[t.getMonth()];
45
- },
46
- // Day of month: 1, 2, ..., 31
47
- D: function(t) {
48
- return t.getDate();
49
- },
50
- // Day of month: 01, 02, ..., 31
51
- DD: function(t) {
52
- return r(t.getDate(), 2);
53
- },
54
- // Hour: 0, 1, ... 23
55
- H: function(t) {
56
- return t.getHours();
57
- },
58
- // Hour: 00, 01, ..., 23
59
- HH: function(t) {
60
- return r(t.getHours(), 2);
61
- },
62
- // Hour: 1, 2, ..., 12
63
- h: function(t) {
64
- var e = t.getHours();
65
- return e === 0 ? 12 : e > 12 ? e % 12 : e;
66
- },
67
- // Hour: 01, 02, ..., 12
68
- hh: function() {
69
- var t = i.h.apply(i, arguments);
70
- return r(t, 2);
71
- },
72
- // Minute: 0, 1, ..., 59
73
- m: function(t) {
74
- return t.getMinutes();
75
- },
76
- // Minute: 00, 01, ..., 59
77
- mm: function(t) {
78
- return r(t.getMinutes(), 2);
79
- },
80
- // Second: 0, 1, ..., 59
81
- s: function(t) {
82
- return t.getSeconds();
83
- },
84
- // Second: 00, 01, ..., 59
85
- ss: function(t) {
86
- return r(t.getSeconds(), 2);
87
- },
88
- // 1/10 of second: 0, 1, ..., 9
89
- S: function(t) {
90
- return Math.floor(t.getMilliseconds() / 100);
91
- },
92
- // 1/100 of second: 00, 01, ..., 99
93
- SS: function(t) {
94
- return r(Math.floor(t.getMilliseconds() / 10), 2);
95
- },
96
- // Millisecond: 000, 001, ..., 999
97
- SSS: function(t) {
98
- return r(t.getMilliseconds(), 3);
99
- },
100
- // Day of week: 0, 1, ..., 6
101
- d: function(t) {
102
- return t.getDay();
103
- },
104
- // Day of week: 'Su', 'Mo', ..., 'Sa'
105
- dd: function(t, e) {
106
- return e.weekdaysMin[t.getDay()];
107
- },
108
- // Day of week: 'Sun', 'Mon',..., 'Sat'
109
- ddd: function(t, e) {
110
- return e.weekdaysShort[t.getDay()];
111
- },
112
- // Day of week: 'Sunday', 'Monday', ...,'Saturday'
113
- dddd: function(t, e) {
114
- return e.weekdays[t.getDay()];
115
- },
116
- // AM, PM
117
- A: function(t, e) {
118
- var u = e.meridiem || d;
119
- return u(t.getHours(), t.getMinutes(), !1);
120
- },
121
- // am, pm
122
- a: function(t, e) {
123
- var u = e.meridiem || d;
124
- return u(t.getHours(), t.getMinutes(), !0);
125
- },
126
- // Timezone: -01:00, +00:00, ... +12:00
127
- Z: function(t) {
128
- return g(c(t), ":");
129
- },
130
- // Timezone: -0100, +0000, ... +1200
131
- ZZ: function(t) {
132
- return g(c(t));
133
- },
134
- // Seconds timestamp: 512969520
135
- X: function(t) {
136
- return Math.floor(t.getTime() / 1e3);
137
- },
138
- // Milliseconds timestamp: 512969520900
139
- x: function(t) {
140
- return t.getTime();
141
- },
142
- w: function(t, e) {
143
- return l(t, {
144
- firstDayOfWeek: e.firstDayOfWeek,
145
- firstWeekContainsDate: e.firstWeekContainsDate
146
- });
147
- },
148
- ww: function(t, e) {
149
- return r(i.w(t, e), 2);
1
+ import { Mark as s, markPasteRule as r, markInputRule as a, mergeAttributes as n } from "./index238.js";
2
+ var i = /(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))$/, d = /(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))/g, o = /(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))$/, l = /(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))/g, m = s.create({
3
+ name: "italic",
4
+ addOptions() {
5
+ return {
6
+ HTMLAttributes: {}
7
+ };
8
+ },
9
+ parseHTML() {
10
+ return [
11
+ {
12
+ tag: "em"
13
+ },
14
+ {
15
+ tag: "i",
16
+ getAttrs: (t) => t.style.fontStyle !== "normal" && null
17
+ },
18
+ {
19
+ style: "font-style=normal",
20
+ clearMark: (t) => t.type.name === this.name
21
+ },
22
+ {
23
+ style: "font-style=italic"
24
+ }
25
+ ];
26
+ },
27
+ renderHTML({ HTMLAttributes: t }) {
28
+ return ["em", n(this.options.HTMLAttributes, t), 0];
29
+ },
30
+ addCommands() {
31
+ return {
32
+ setItalic: () => ({ commands: t }) => t.setMark(this.name),
33
+ toggleItalic: () => ({ commands: t }) => t.toggleMark(this.name),
34
+ unsetItalic: () => ({ commands: t }) => t.unsetMark(this.name)
35
+ };
36
+ },
37
+ markdownTokenName: "em",
38
+ parseMarkdown: (t, e) => e.applyMark("italic", e.parseInline(t.tokens || [])),
39
+ renderMarkdown: (t, e) => `*${e.renderChildren(t)}*`,
40
+ addKeyboardShortcuts() {
41
+ return {
42
+ "Mod-i": () => this.editor.commands.toggleItalic(),
43
+ "Mod-I": () => this.editor.commands.toggleItalic()
44
+ };
45
+ },
46
+ addInputRules() {
47
+ return [
48
+ a({
49
+ find: i,
50
+ type: this.type
51
+ }),
52
+ a({
53
+ find: o,
54
+ type: this.type
55
+ })
56
+ ];
57
+ },
58
+ addPasteRules() {
59
+ return [
60
+ r({
61
+ find: d,
62
+ type: this.type
63
+ }),
64
+ r({
65
+ find: l,
66
+ type: this.type
67
+ })
68
+ ];
150
69
  }
151
- };
152
- function v(n, t) {
153
- var e = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, u = t ? String(t) : "YYYY-MM-DDTHH:mm:ss.SSSZ", o = m(n);
154
- if (!M(o))
155
- return "Invalid Date";
156
- var a = e.locale || h;
157
- return u.replace(Y, function(f, s) {
158
- return s || (typeof i[f] == "function" ? "".concat(i[f](o, a)) : f);
159
- });
160
- }
70
+ });
161
71
  export {
162
- v as format
72
+ m as Italic,
73
+ i as starInputRegex,
74
+ d as starPasteRegex,
75
+ o as underscoreInputRegex,
76
+ l as underscorePasteRegex
163
77
  };