@quoreadmin/ui 1.10.10 → 1.10.11

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 (226) hide show
  1. package/dist/index.css +1 -1
  2. package/dist/index105.js +1 -1
  3. package/dist/index111.js +1 -1
  4. package/dist/index115.js +1 -1
  5. package/dist/index136.js +1 -1
  6. package/dist/index138.js +146 -146
  7. package/dist/index151.js +2 -2
  8. package/dist/index162.js +1 -1
  9. package/dist/index173.js +2 -2
  10. package/dist/index180.js +228 -1151
  11. package/dist/index182.js +14 -14
  12. package/dist/index183.js +96 -266
  13. package/dist/index184.js +2 -106
  14. package/dist/index185.js +1376 -2
  15. package/dist/index187.js +20 -0
  16. package/dist/index188.js +12 -12
  17. package/dist/index189.js +10 -10
  18. package/dist/index190.js +12 -12
  19. package/dist/index191.js +21 -14
  20. package/dist/index192.js +757 -23
  21. package/dist/index193.js +1144 -759
  22. package/dist/index194.js +1234 -1144
  23. package/dist/index195.js +11248 -1205
  24. package/dist/index196.js +1135 -11213
  25. package/dist/index198.js +17 -17
  26. package/dist/index201.js +29 -29
  27. package/dist/index202.js +2 -2
  28. package/dist/index203.js +2 -2
  29. package/dist/index204.js +1 -1
  30. package/dist/index206.js +2 -2
  31. package/dist/index208.js +14 -14
  32. package/dist/index209.js +1 -1
  33. package/dist/index210.js +1 -1
  34. package/dist/index211.js +3 -3
  35. package/dist/index212.js +6 -6
  36. package/dist/index213.js +158 -30
  37. package/dist/index214.js +224 -112
  38. package/dist/index215.js +32 -31
  39. package/dist/index216.js +10 -26
  40. package/dist/index217.js +83 -31
  41. package/dist/index218.js +404 -48
  42. package/dist/index219.js +22 -43
  43. package/dist/index220.js +32 -3
  44. package/dist/index221.js +116 -9
  45. package/dist/index222.js +35 -18
  46. package/dist/index223.js +26 -10
  47. package/dist/index224.js +36 -10
  48. package/dist/index225.js +48 -36
  49. package/dist/index226.js +43 -21
  50. package/dist/index227.js +3 -87
  51. package/dist/index228.js +9 -407
  52. package/dist/index229.js +19 -22
  53. package/dist/index230.js +10 -127
  54. package/dist/index231.js +9 -37
  55. package/dist/index232.js +39 -80
  56. package/dist/index233.js +21 -20
  57. package/dist/index234.js +126 -19
  58. package/dist/index235.js +34 -16
  59. package/dist/index236.js +80 -20
  60. package/dist/index237.js +9 -9
  61. package/dist/index238.js +19 -160
  62. package/dist/index239.js +11 -11
  63. package/dist/index240.js +13 -15
  64. package/dist/index241.js +19 -198
  65. package/dist/index242.js +140 -49
  66. package/dist/index243.js +20 -34
  67. package/dist/index244.js +21 -39
  68. package/dist/index245.js +194 -156
  69. package/dist/index246.js +66 -224
  70. package/dist/index247.js +34 -37
  71. package/dist/index248.js +39 -9
  72. package/dist/index249.js +253 -22
  73. package/dist/index250.js +7 -21
  74. package/dist/index251.js +138 -20
  75. package/dist/index252.js +78 -831
  76. package/dist/index253.js +21 -701
  77. package/dist/index254.js +22 -176
  78. package/dist/index255.js +13 -15
  79. package/dist/index256.js +836 -20
  80. package/dist/index257.js +701 -19
  81. package/dist/index258.js +176 -3
  82. package/dist/index259.js +21 -186
  83. package/dist/index260.js +19 -132
  84. package/dist/index261.js +20 -1223
  85. package/dist/index262.js +3 -20
  86. package/dist/index263.js +186 -21
  87. package/dist/index264.js +132 -21
  88. package/dist/index265.js +1223 -29
  89. package/dist/index266.js +12 -12
  90. package/dist/index267.js +15 -13
  91. package/dist/index268.js +22 -2
  92. package/dist/index269.js +29 -2
  93. package/dist/index270.js +20 -3636
  94. package/dist/index271.js +20 -55
  95. package/dist/index272.js +2 -77
  96. package/dist/index273.js +2 -52
  97. package/dist/index274.js +2 -215
  98. package/dist/index275.js +79 -10
  99. package/dist/index276.js +3623 -44
  100. package/dist/index277.js +35 -41
  101. package/dist/index278.js +59 -36
  102. package/dist/index279.js +21 -44
  103. package/dist/index280.js +176 -687
  104. package/dist/index281.js +9 -41
  105. package/dist/index282.js +39 -46
  106. package/dist/index283.js +60 -10
  107. package/dist/index284.js +46 -697
  108. package/dist/index285.js +73 -818
  109. package/dist/index286.js +708 -235
  110. package/dist/index287.js +41 -7
  111. package/dist/index288.js +60 -134
  112. package/dist/index289.js +11 -83
  113. package/dist/index290.js +705 -2
  114. package/dist/index291.js +814 -73
  115. package/dist/index292.js +3 -54
  116. package/dist/index293.js +26 -25
  117. package/dist/index294.js +53 -21
  118. package/dist/index295.js +17 -13
  119. package/dist/index296.js +22 -16
  120. package/dist/index297.js +22 -17
  121. package/dist/index298.js +15 -22
  122. package/dist/index299.js +17 -3
  123. package/dist/index300.js +23 -27
  124. package/dist/index301.js +73 -256
  125. package/dist/index302.js +21 -5
  126. package/dist/index303.js +925 -130
  127. package/dist/index304.js +21 -72
  128. package/dist/index305.js +18 -85
  129. package/dist/index306.js +19 -28
  130. package/dist/index307.js +68 -15
  131. package/dist/index308.js +19 -75
  132. package/dist/index309.js +19 -4
  133. package/dist/index310.js +22 -2
  134. package/dist/index311.js +21 -82
  135. package/dist/index312.js +63 -53
  136. package/dist/index313.js +260 -4
  137. package/dist/index314.js +5 -4
  138. package/dist/index315.js +127 -166
  139. package/dist/index316.js +68 -58
  140. package/dist/index317.js +85 -73
  141. package/dist/index318.js +25 -75
  142. package/dist/index319.js +14 -20
  143. package/dist/index320.js +66 -926
  144. package/dist/index321.js +3 -21
  145. package/dist/index322.js +2 -20
  146. package/dist/index323.js +82 -19
  147. package/dist/index324.js +52 -68
  148. package/dist/index325.js +6 -19
  149. package/dist/index326.js +5 -19
  150. package/dist/index327.js +178 -21
  151. package/dist/index328.js +62 -21
  152. package/dist/index329.js +74 -62
  153. package/dist/index330.js +37 -1534
  154. package/dist/index331.js +1494 -346
  155. package/dist/index332.js +330 -2675
  156. package/dist/index333.js +2717 -72
  157. package/dist/index334.js +75 -3781
  158. package/dist/index335.js +3780 -48
  159. package/dist/index336.js +60 -15
  160. package/dist/index337.js +15 -84
  161. package/dist/index338.js +70 -188
  162. package/dist/index339.js +176 -220
  163. package/dist/index340.js +240 -31
  164. package/dist/index341.js +9 -8
  165. package/dist/index342.js +10 -13
  166. package/dist/index343.js +13 -54
  167. package/dist/index344.js +10 -12
  168. package/dist/index345.js +15 -12
  169. package/dist/index346.js +8 -57
  170. package/dist/index347.js +12 -51
  171. package/dist/index348.js +49 -25
  172. package/dist/index349.js +12 -2
  173. package/dist/index350.js +14 -5
  174. package/dist/index351.js +58 -2
  175. package/dist/index352.js +52 -23
  176. package/dist/index353.js +28 -38
  177. package/dist/index354.js +2 -2
  178. package/dist/index355.js +4 -10
  179. package/dist/index356.js +2 -20
  180. package/dist/index357.js +22 -9
  181. package/dist/index358.js +40 -9
  182. package/dist/index359.js +2 -17
  183. package/dist/index360.js +11 -2
  184. package/dist/index361.js +20 -9
  185. package/dist/index362.js +2 -10
  186. package/dist/index363.js +8 -13
  187. package/dist/index364.js +19 -18
  188. package/dist/index365.js +19 -56
  189. package/dist/index366.js +63 -28
  190. package/dist/index367.js +37 -7
  191. package/dist/index368.js +16 -49
  192. package/dist/index369.js +57 -7
  193. package/dist/index370.js +27 -10
  194. package/dist/index371.js +7 -7
  195. package/dist/index372.js +51 -27
  196. package/dist/index373.js +7 -2
  197. package/dist/index374.js +11 -69
  198. package/dist/index375.js +6 -166
  199. package/dist/index376.js +28 -20
  200. package/dist/index377.js +2 -20
  201. package/dist/index378.js +67 -61
  202. package/dist/index379.js +166 -36
  203. package/dist/index380.js +1 -1
  204. package/dist/index381.js +3 -3
  205. package/dist/index384.js +17 -13
  206. package/dist/index385.js +13 -7
  207. package/dist/index386.js +7 -12
  208. package/dist/index387.js +11 -4
  209. package/dist/index388.js +5 -33
  210. package/dist/index389.js +33 -31
  211. package/dist/index390.js +29 -26
  212. package/dist/index391.js +26 -59
  213. package/dist/index392.js +60 -16
  214. package/dist/index393.js +95 -98
  215. package/dist/index394.js +100 -90
  216. package/dist/index395.js +91 -98
  217. package/dist/index401.js +1 -1
  218. package/dist/index402.js +2 -2
  219. package/dist/index50.js +2 -2
  220. package/dist/index62.js +1 -1
  221. package/dist/index78.js +1 -1
  222. package/dist/index88.js +1 -1
  223. package/dist/index92.js +1 -1
  224. package/dist/index98.js +2 -2
  225. package/package.json +1 -1
  226. package/dist/index186.js +0 -1378
package/dist/index277.js CHANGED
@@ -1,63 +1,57 @@
1
- import { Node as l, textblockTypeInputRule as i, mergeAttributes as a } from "./index270.js";
2
- var d = l.create({
3
- name: "heading",
1
+ import { Node as a, wrappingInputRule as c, mergeAttributes as d } from "./index276.js";
2
+ import { createElement as i } from "./index337.js";
3
+ var l = /^\s*>\s$/, g = a.create({
4
+ name: "blockquote",
4
5
  addOptions() {
5
6
  return {
6
- levels: [1, 2, 3, 4, 5, 6],
7
7
  HTMLAttributes: {}
8
8
  };
9
9
  },
10
- content: "inline*",
10
+ content: "block+",
11
11
  group: "block",
12
12
  defining: !0,
13
- addAttributes() {
14
- return {
15
- level: {
16
- default: 1,
17
- rendered: !1
18
- }
19
- };
20
- },
21
13
  parseHTML() {
22
- return this.options.levels.map((e) => ({
23
- tag: `h${e}`,
24
- attrs: { level: e }
25
- }));
14
+ return [{ tag: "blockquote" }];
26
15
  },
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];
16
+ renderHTML({ HTMLAttributes: t }) {
17
+ return /* @__PURE__ */ i("blockquote", { ...d(this.options.HTMLAttributes, t), children: /* @__PURE__ */ i("slot", {}) });
29
18
  },
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)}` : "";
19
+ parseMarkdown: (t, e) => e.createNode("blockquote", void 0, e.parseChildren(t.tokens || [])),
20
+ renderMarkdown: (t, e) => {
21
+ if (!t.content)
22
+ return "";
23
+ const r = ">", n = [];
24
+ return t.content.forEach((u) => {
25
+ const s = e.renderChildren([u]).split(`
26
+ `).map((o) => o.trim() === "" ? r : `${r} ${o}`);
27
+ n.push(s.join(`
28
+ `));
29
+ }), n.join(`
30
+ ${r}
31
+ `);
35
32
  },
36
33
  addCommands() {
37
34
  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
35
+ setBlockquote: () => ({ commands: t }) => t.wrapIn(this.name),
36
+ toggleBlockquote: () => ({ commands: t }) => t.toggleWrap(this.name),
37
+ unsetBlockquote: () => ({ commands: t }) => t.lift(this.name)
40
38
  };
41
39
  },
42
40
  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
- );
41
+ return {
42
+ "Mod-Shift-b": () => this.editor.commands.toggleBlockquote()
43
+ };
50
44
  },
51
45
  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
- }));
46
+ return [
47
+ c({
48
+ find: l,
49
+ type: this.type
50
+ })
51
+ ];
59
52
  }
60
53
  });
61
54
  export {
62
- d as Heading
55
+ g as Blockquote,
56
+ l as inputRegex
63
57
  };
package/dist/index278.js CHANGED
@@ -1,56 +1,79 @@
1
- import { Node as m, nodeInputRule as f, canInsertNode as h, isNodeSelection as T, mergeAttributes as y } from "./index270.js";
2
- import { TextSelection as s, NodeSelection as N } from "./index285.js";
3
- var M = m.create({
4
- name: "horizontalRule",
1
+ import { Mark as a, markPasteRule as r, markInputRule as s, mergeAttributes as o } from "./index276.js";
2
+ import { createElement as n } from "./index337.js";
3
+ var d = /(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))$/, l = /(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))/g, i = /(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))$/, u = /(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))/g, p = a.create({
4
+ name: "bold",
5
5
  addOptions() {
6
6
  return {
7
- HTMLAttributes: {},
8
- nextNodeType: "paragraph"
7
+ HTMLAttributes: {}
9
8
  };
10
9
  },
11
- group: "block",
12
10
  parseHTML() {
13
- return [{ tag: "hr" }];
11
+ return [
12
+ {
13
+ tag: "strong"
14
+ },
15
+ {
16
+ tag: "b",
17
+ getAttrs: (t) => t.style.fontWeight !== "normal" && null
18
+ },
19
+ {
20
+ style: "font-weight=400",
21
+ clearMark: (t) => t.type.name === this.name
22
+ },
23
+ {
24
+ style: "font-weight",
25
+ getAttrs: (t) => /^(bold(er)?|[5-9]\d{2,})$/.test(t) && null
26
+ }
27
+ ];
14
28
  },
15
- renderHTML({ HTMLAttributes: n }) {
16
- return ["hr", y(this.options.HTMLAttributes, n)];
29
+ renderHTML({ HTMLAttributes: t }) {
30
+ return /* @__PURE__ */ n("strong", { ...o(this.options.HTMLAttributes, t), children: /* @__PURE__ */ n("slot", {}) });
17
31
  },
18
- markdownTokenName: "hr",
19
- parseMarkdown: (n, o) => o.createNode("horizontalRule"),
20
- renderMarkdown: () => "---",
32
+ markdownTokenName: "strong",
33
+ parseMarkdown: (t, e) => e.applyMark("bold", e.parseInline(t.tokens || [])),
34
+ renderMarkdown: (t, e) => `**${e.renderChildren(t)}**`,
21
35
  addCommands() {
22
36
  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
- }
37
+ setBold: () => ({ commands: t }) => t.setMark(this.name),
38
+ toggleBold: () => ({ commands: t }) => t.toggleMark(this.name),
39
+ unsetBold: () => ({ commands: t }) => t.unsetMark(this.name)
40
+ };
41
+ },
42
+ addKeyboardShortcuts() {
43
+ return {
44
+ "Mod-b": () => this.editor.commands.toggleBold(),
45
+ "Mod-B": () => this.editor.commands.toggleBold()
43
46
  };
44
47
  },
45
48
  addInputRules() {
46
49
  return [
47
- f({
48
- find: /^(?:---|—-|___\s|\*\*\*\s)$/,
50
+ s({
51
+ find: d,
52
+ type: this.type
53
+ }),
54
+ s({
55
+ find: i,
56
+ type: this.type
57
+ })
58
+ ];
59
+ },
60
+ addPasteRules() {
61
+ return [
62
+ r({
63
+ find: l,
64
+ type: this.type
65
+ }),
66
+ r({
67
+ find: u,
49
68
  type: this.type
50
69
  })
51
70
  ];
52
71
  }
53
72
  });
54
73
  export {
55
- M as HorizontalRule
74
+ p as Bold,
75
+ d as starInputRegex,
76
+ l as starPasteRegex,
77
+ i as underscoreInputRegex,
78
+ u as underscorePasteRegex
56
79
  };
package/dist/index279.js CHANGED
@@ -1,54 +1,37 @@
1
- import { Mark as s, markPasteRule as r, markInputRule as a, mergeAttributes as n } from "./index270.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",
1
+ import { Mark as r, markPasteRule as n, markInputRule as a, mergeAttributes as d } from "./index276.js";
2
+ var o = /(^|[^`])`([^`]+)`(?!`)$/, u = /(^|[^`])`([^`]+)`(?!`)/g, i = r.create({
3
+ name: "code",
4
4
  addOptions() {
5
5
  return {
6
6
  HTMLAttributes: {}
7
7
  };
8
8
  },
9
+ excludes: "_",
10
+ code: !0,
11
+ exitable: !0,
9
12
  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
- ];
13
+ return [{ tag: "code" }];
26
14
  },
27
- renderHTML({ HTMLAttributes: t }) {
28
- return ["em", n(this.options.HTMLAttributes, t), 0];
15
+ renderHTML({ HTMLAttributes: e }) {
16
+ return ["code", d(this.options.HTMLAttributes, e), 0];
29
17
  },
18
+ markdownTokenName: "codespan",
19
+ parseMarkdown: (e, t) => t.applyMark("code", [{ type: "text", text: e.text || "" }]),
20
+ renderMarkdown: (e, t) => e.content ? `\`${t.renderChildren(e.content)}\`` : "",
30
21
  addCommands() {
31
22
  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)
23
+ setCode: () => ({ commands: e }) => e.setMark(this.name),
24
+ toggleCode: () => ({ commands: e }) => e.toggleMark(this.name),
25
+ unsetCode: () => ({ commands: e }) => e.unsetMark(this.name)
35
26
  };
36
27
  },
37
- markdownTokenName: "em",
38
- parseMarkdown: (t, e) => e.applyMark("italic", e.parseInline(t.tokens || [])),
39
- renderMarkdown: (t, e) => `*${e.renderChildren(t)}*`,
40
28
  addKeyboardShortcuts() {
41
29
  return {
42
- "Mod-i": () => this.editor.commands.toggleItalic(),
43
- "Mod-I": () => this.editor.commands.toggleItalic()
30
+ "Mod-e": () => this.editor.commands.toggleCode()
44
31
  };
45
32
  },
46
33
  addInputRules() {
47
34
  return [
48
- a({
49
- find: i,
50
- type: this.type
51
- }),
52
35
  a({
53
36
  find: o,
54
37
  type: this.type
@@ -57,21 +40,15 @@ var i = /(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))$/, d = /(?:^|\s)(\*(?!\s+\*
57
40
  },
58
41
  addPasteRules() {
59
42
  return [
60
- r({
61
- find: d,
62
- type: this.type
63
- }),
64
- r({
65
- find: l,
43
+ n({
44
+ find: u,
66
45
  type: this.type
67
46
  })
68
47
  ];
69
48
  }
70
49
  });
71
50
  export {
72
- m as Italic,
73
- i as starInputRegex,
74
- d as starPasteRegex,
75
- o as underscoreInputRegex,
76
- l as underscorePasteRegex
51
+ i as Code,
52
+ o as inputRegex,
53
+ u as pasteRegex
77
54
  };