@vc-shell/framework 1.1.91-alpha.4 → 1.1.91

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 (103) hide show
  1. package/CHANGELOG.md +2757 -1410
  2. package/core/api/platform.ts +9883 -9883
  3. package/core/composables/useNotifications/index.ts +1 -32
  4. package/core/composables/useSettings/index.ts +3 -8
  5. package/core/composables/useUser/index.ts +171 -74
  6. package/core/composables/useUserManagement/index.ts +25 -67
  7. package/core/interceptors/index.ts +56 -19
  8. package/core/plugins/signalR/index.ts +1 -27
  9. package/core/types/index.ts +0 -2
  10. package/dist/core/api/platform.d.ts +1 -1
  11. package/dist/core/api/platform.d.ts.map +1 -1
  12. package/dist/core/composables/useNotifications/index.d.ts.map +1 -1
  13. package/dist/core/composables/useSettings/index.d.ts.map +1 -1
  14. package/dist/core/composables/useUser/index.d.ts +9 -18
  15. package/dist/core/composables/useUser/index.d.ts.map +1 -1
  16. package/dist/core/composables/useUserManagement/index.d.ts +7 -7
  17. package/dist/core/composables/useUserManagement/index.d.ts.map +1 -1
  18. package/dist/core/interceptors/index.d.ts +1 -2
  19. package/dist/core/interceptors/index.d.ts.map +1 -1
  20. package/dist/core/plugins/signalR/index.d.ts +0 -2
  21. package/dist/core/plugins/signalR/index.d.ts.map +1 -1
  22. package/dist/core/types/index.d.ts +1 -1
  23. package/dist/core/types/index.d.ts.map +1 -1
  24. package/dist/framework.js +5682 -5832
  25. package/dist/index.css +1 -1
  26. package/dist/index.d.ts +0 -8
  27. package/dist/index.d.ts.map +1 -1
  28. package/dist/injection-keys.d.ts +1 -2
  29. package/dist/injection-keys.d.ts.map +1 -1
  30. package/dist/shared/components/app-switcher/composables/useAppSwitcher/index.d.ts.map +1 -1
  31. package/dist/shared/components/sign-in/useExternalProvider.d.ts +1 -1
  32. package/dist/shared/components/sign-in/useExternalProvider.d.ts.map +1 -1
  33. package/dist/shared/modules/dynamic/helpers/nodeBuilder.d.ts.map +1 -1
  34. package/dist/tsconfig.tsbuildinfo +1 -1
  35. package/dist/ui/components/organisms/vc-app/vc-app.vue.d.ts.map +1 -1
  36. package/dist/vendor-dompurify-BuxjWxA2.js +553 -0
  37. package/dist/{vendor-prosemirror-gapcursor-K-Pj0iVP.js → vendor-prosemirror-gapcursor-CoNzHXkd.js} +27 -24
  38. package/dist/{vendor-tiptap-core-B000Ay3n.js → vendor-tiptap-core-D6CfVeU0.js} +1838 -1502
  39. package/dist/{vendor-tiptap-extension-blockquote-CHW3QVCH.js → vendor-tiptap-extension-blockquote-C__lIvqD.js} +19 -6
  40. package/dist/{vendor-tiptap-extension-bold-DsNXR7l5.js → vendor-tiptap-extension-bold-DF2R0mPF.js} +13 -10
  41. package/dist/{vendor-tiptap-extension-code-block-DYMOFxJc.js → vendor-tiptap-extension-code-block-B52VzS4M.js} +34 -16
  42. package/dist/{vendor-tiptap-extension-code-BXPfZcyf.js → vendor-tiptap-extension-code-f7eg00IH.js} +11 -8
  43. package/dist/vendor-tiptap-extension-document-UgQIRckz.js +12 -0
  44. package/dist/{vendor-tiptap-extension-hard-break-DfxtqTYW.js → vendor-tiptap-extension-hard-break-CYVqzABZ.js} +11 -9
  45. package/dist/{vendor-tiptap-extension-heading-BqN9fEEm.js → vendor-tiptap-extension-heading-BWwbIXKs.js} +11 -5
  46. package/dist/{vendor-tiptap-extension-horizontal-rule-Dl1wmLAo.js → vendor-tiptap-extension-horizontal-rule-DjIwBCkJ.js} +14 -11
  47. package/dist/{vendor-tiptap-extension-image-Cv28QlbA.js → vendor-tiptap-extension-image-CSFiALl1.js} +18 -8
  48. package/dist/{vendor-tiptap-extension-italic-B3WETSCz.js → vendor-tiptap-extension-italic-S1BFBPoJ.js} +15 -12
  49. package/dist/{vendor-tiptap-extension-link-CTWD6W1U.js → vendor-tiptap-extension-link-BII63Ad6.js} +101 -90
  50. package/dist/vendor-tiptap-extension-list-BiUARt_K.js +707 -0
  51. package/dist/vendor-tiptap-extension-paragraph-C7nR_Mg3.js +41 -0
  52. package/dist/vendor-tiptap-extension-placeholder-BoHVyYJs.js +1 -0
  53. package/dist/vendor-tiptap-extension-strike-D13ERA3E.js +64 -0
  54. package/dist/vendor-tiptap-extension-table-DsqCGn0S.js +368 -0
  55. package/dist/vendor-tiptap-extension-table-cell-qeLCoF6c.js +1 -0
  56. package/dist/vendor-tiptap-extension-table-header-qeLCoF6c.js +1 -0
  57. package/dist/vendor-tiptap-extension-table-row-qeLCoF6c.js +1 -0
  58. package/dist/vendor-tiptap-extension-text-D2Ap05bS.js +13 -0
  59. package/dist/{vendor-tiptap-extension-text-style-BiLsi9B8.js → vendor-tiptap-extension-text-style-6WFGdn9L.js} +1 -1
  60. package/dist/{vendor-tiptap-extension-underline-Bz_pv2E0.js → vendor-tiptap-extension-underline-CiLvGtsw.js} +29 -4
  61. package/dist/{vendor-tiptap-extensions-Crh_nh74.js → vendor-tiptap-extensions-0qImmpYJ.js} +88 -87
  62. package/dist/{vendor-tiptap-markdown-bGlioql8.js → vendor-tiptap-markdown-Dh06r1Sk.js} +1 -1
  63. package/dist/{vendor-tiptap-starter-kit-B3fY431M.js → vendor-tiptap-starter-kit-CQMmSEis.js} +17 -17
  64. package/dist/{vendor-tiptap-vue-3-CqWn44-V.js → vendor-tiptap-vue-3-B0kPYa3w.js} +1 -1
  65. package/dist/{vendor-vueuse-components-sgKpNzof.js → vendor-vueuse-components-B0zqjNRW.js} +1 -1
  66. package/dist/{vendor-vueuse-core-D0cN7FqY.js → vendor-vueuse-core-CYgwn-B2.js} +10 -10
  67. package/dist/{vendor-vueuse-shared-Pt0UEStA.js → vendor-vueuse-shared-B_uDJJ6V.js} +19 -19
  68. package/package.json +5 -7
  69. package/shared/components/app-switcher/components/vc-app-switcher/vc-app-switcher.vue +2 -2
  70. package/shared/components/app-switcher/composables/useAppSwitcher/index.ts +1 -15
  71. package/shared/components/sign-in/useExternalProvider.ts +1 -11
  72. package/shared/modules/dynamic/helpers/nodeBuilder.ts +3 -11
  73. package/ui/components/organisms/vc-app/vc-app.vue +2 -20
  74. package/core/providers/README.md +0 -176
  75. package/core/providers/auth-provider-manager.ts +0 -74
  76. package/core/providers/auth-provider-utils.ts +0 -26
  77. package/core/providers/example-custom-auth-provider.ts +0 -162
  78. package/core/providers/index.ts +0 -3
  79. package/core/providers/platform-auth-provider.ts +0 -207
  80. package/core/types/auth-provider.ts +0 -40
  81. package/dist/core/providers/auth-provider-manager.d.ts +0 -34
  82. package/dist/core/providers/auth-provider-manager.d.ts.map +0 -1
  83. package/dist/core/providers/auth-provider-utils.d.ts +0 -17
  84. package/dist/core/providers/auth-provider-utils.d.ts.map +0 -1
  85. package/dist/core/providers/example-custom-auth-provider.d.ts +0 -45
  86. package/dist/core/providers/example-custom-auth-provider.d.ts.map +0 -1
  87. package/dist/core/providers/index.d.ts +0 -3
  88. package/dist/core/providers/index.d.ts.map +0 -1
  89. package/dist/core/providers/platform-auth-provider.d.ts +0 -34
  90. package/dist/core/providers/platform-auth-provider.d.ts.map +0 -1
  91. package/dist/core/types/auth-provider.d.ts +0 -27
  92. package/dist/core/types/auth-provider.d.ts.map +0 -1
  93. package/dist/vendor-dompurify-C-JbJ3KX.js +0 -536
  94. package/dist/vendor-tiptap-extension-document-Y-jQl_8Q.js +0 -9
  95. package/dist/vendor-tiptap-extension-list-Da9Xfgwa.js +0 -420
  96. package/dist/vendor-tiptap-extension-paragraph-CSda9k3a.js +0 -31
  97. package/dist/vendor-tiptap-extension-placeholder-MI_ltlp7.js +0 -1
  98. package/dist/vendor-tiptap-extension-strike-Di5VtsLj.js +0 -61
  99. package/dist/vendor-tiptap-extension-table-DYCEjlpp.js +0 -311
  100. package/dist/vendor-tiptap-extension-table-cell-D5DL87Xa.js +0 -1
  101. package/dist/vendor-tiptap-extension-table-header-D5DL87Xa.js +0 -1
  102. package/dist/vendor-tiptap-extension-table-row-D5DL87Xa.js +0 -1
  103. package/dist/vendor-tiptap-extension-text-8vtzSN60.js +0 -8
@@ -1,5 +1,5 @@
1
- import { N as r, w as o, h as e, m as n } from "./vendor-tiptap-core-B000Ay3n.js";
2
- var u = /^\s*>\s$/, a = r.create({
1
+ import { N as a, w as u, h as o, m as l } from "./vendor-tiptap-core-D6CfVeU0.js";
2
+ var c = /^\s*>\s$/, k = a.create({
3
3
  name: "blockquote",
4
4
  addOptions() {
5
5
  return {
@@ -13,7 +13,20 @@ var u = /^\s*>\s$/, a = r.create({
13
13
  return [{ tag: "blockquote" }];
14
14
  },
15
15
  renderHTML({ HTMLAttributes: t }) {
16
- return /* @__PURE__ */ e("blockquote", { ...n(this.options.HTMLAttributes, t), children: /* @__PURE__ */ e("slot", {}) });
16
+ return /* @__PURE__ */ o("blockquote", { ...l(this.options.HTMLAttributes, t), children: /* @__PURE__ */ o("slot", {}) });
17
+ },
18
+ parseMarkdown: (t, e) => e.createNode("blockquote", void 0, e.parseChildren(t.tokens || [])),
19
+ renderMarkdown: (t, e) => {
20
+ if (!t.content)
21
+ return "";
22
+ const n = [];
23
+ return t.content.forEach((r) => {
24
+ const s = e.renderChildren(r).split(`
25
+ `).map((i) => `> ${i}`).join(`
26
+ `);
27
+ n.push(s);
28
+ }), n.flatMap((r) => [r, "> "]).slice(0, -1).join(`
29
+ `);
17
30
  },
18
31
  addCommands() {
19
32
  return {
@@ -29,13 +42,13 @@ var u = /^\s*>\s$/, a = r.create({
29
42
  },
30
43
  addInputRules() {
31
44
  return [
32
- o({
33
- find: u,
45
+ u({
46
+ find: c,
34
47
  type: this.type
35
48
  })
36
49
  ];
37
50
  }
38
51
  });
39
52
  export {
40
- a as B
53
+ k as B
41
54
  };
@@ -1,5 +1,5 @@
1
- import { M as a, a as e, b as r, h as s, m as n } from "./vendor-tiptap-core-B000Ay3n.js";
2
- var o = /(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))$/, d = /(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))/g, u = /(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))$/, i = /(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))/g, g = a.create({
1
+ import { M as a, a as r, b as s, h as n, m as o } from "./vendor-tiptap-core-D6CfVeU0.js";
2
+ var d = /(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))$/, l = /(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))/g, u = /(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))$/, i = /(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))/g, m = a.create({
3
3
  name: "bold",
4
4
  addOptions() {
5
5
  return {
@@ -26,8 +26,11 @@ var o = /(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))$/, d = /(?:^|\s)(\*
26
26
  ];
27
27
  },
28
28
  renderHTML({ HTMLAttributes: t }) {
29
- return /* @__PURE__ */ s("strong", { ...n(this.options.HTMLAttributes, t), children: /* @__PURE__ */ s("slot", {}) });
29
+ return /* @__PURE__ */ n("strong", { ...o(this.options.HTMLAttributes, t), children: /* @__PURE__ */ n("slot", {}) });
30
30
  },
31
+ markdownTokenName: "strong",
32
+ parseMarkdown: (t, e) => e.applyMark("bold", e.parseInline(t.tokens || [])),
33
+ renderMarkdown: (t, e) => `**${e.renderChildren(t)}**`,
31
34
  addCommands() {
32
35
  return {
33
36
  setBold: () => ({ commands: t }) => t.setMark(this.name),
@@ -43,11 +46,11 @@ var o = /(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))$/, d = /(?:^|\s)(\*
43
46
  },
44
47
  addInputRules() {
45
48
  return [
46
- r({
47
- find: o,
49
+ s({
50
+ find: d,
48
51
  type: this.type
49
52
  }),
50
- r({
53
+ s({
51
54
  find: u,
52
55
  type: this.type
53
56
  })
@@ -55,11 +58,11 @@ var o = /(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))$/, d = /(?:^|\s)(\*
55
58
  },
56
59
  addPasteRules() {
57
60
  return [
58
- e({
59
- find: d,
61
+ r({
62
+ find: l,
60
63
  type: this.type
61
64
  }),
62
- e({
65
+ r({
63
66
  find: i,
64
67
  type: this.type
65
68
  })
@@ -67,5 +70,5 @@ var o = /(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))$/, d = /(?:^|\s)(\*
67
70
  }
68
71
  });
69
72
  export {
70
- g as B
73
+ m as B
71
74
  };
@@ -1,6 +1,6 @@
1
- import { N as C, t as v, m as k } from "./vendor-tiptap-core-B000Ay3n.js";
2
- import { P as L, a as B, T, S as P } from "./vendor-prosemirror-state-DUZYoLys.js";
3
- var S = 4, I = /^```([a-z]+)?[\s\n]$/, w = /^~~~([a-z]+)?[\s\n]$/, z = C.create({
1
+ import { N as C, t as S, m as k } from "./vendor-tiptap-core-D6CfVeU0.js";
2
+ import { P as w, a as B, T, S as L } from "./vendor-prosemirror-state-DUZYoLys.js";
3
+ var y = 4, M = /^```([a-z]+)?[\s\n]$/, N = /^~~~([a-z]+)?[\s\n]$/, $ = C.create({
4
4
  name: "codeBlock",
5
5
  addOptions() {
6
6
  return {
@@ -9,7 +9,7 @@ var S = 4, I = /^```([a-z]+)?[\s\n]$/, w = /^~~~([a-z]+)?[\s\n]$/, z = C.create(
9
9
  exitOnArrowDown: !0,
10
10
  defaultLanguage: null,
11
11
  enableTabIndentation: !1,
12
- tabSize: S,
12
+ tabSize: y,
13
13
  HTMLAttributes: {}
14
14
  };
15
15
  },
@@ -55,6 +55,24 @@ var S = 4, I = /^```([a-z]+)?[\s\n]$/, w = /^~~~([a-z]+)?[\s\n]$/, z = C.create(
55
55
  ]
56
56
  ];
57
57
  },
58
+ markdownTokenName: "code",
59
+ parseMarkdown: (e, t) => {
60
+ var r;
61
+ return ((r = e.raw) == null ? void 0 : r.startsWith("```")) === !1 && e.codeBlockStyle !== "indented" ? [] : t.createNode(
62
+ "codeBlock",
63
+ { language: e.lang || null },
64
+ e.text ? [t.createTextNode(e.text)] : []
65
+ );
66
+ },
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;
75
+ },
58
76
  addCommands() {
59
77
  return {
60
78
  setCodeBlock: (e) => ({ commands: t }) => t.setNode(this.name, e),
@@ -74,7 +92,7 @@ var S = 4, I = /^```([a-z]+)?[\s\n]$/, w = /^~~~([a-z]+)?[\s\n]$/, z = C.create(
74
92
  var t;
75
93
  if (!this.options.enableTabIndentation)
76
94
  return !1;
77
- const r = (t = this.options.tabSize) != null ? t : S, { state: n } = e, { selection: a } = n, { $from: o, empty: s } = a;
95
+ const r = (t = this.options.tabSize) != null ? t : y, { state: n } = e, { selection: a } = n, { $from: o, empty: s } = a;
78
96
  if (o.parent.type !== this.type)
79
97
  return !1;
80
98
  const i = " ".repeat(r);
@@ -92,7 +110,7 @@ var S = 4, I = /^```([a-z]+)?[\s\n]$/, w = /^~~~([a-z]+)?[\s\n]$/, z = C.create(
92
110
  var t;
93
111
  if (!this.options.enableTabIndentation)
94
112
  return !1;
95
- const r = (t = this.options.tabSize) != null ? t : S, { state: n } = e, { selection: a } = n, { $from: o, empty: s } = a;
113
+ const r = (t = this.options.tabSize) != null ? t : y, { state: n } = e, { selection: a } = n, { $from: o, empty: s } = a;
96
114
  return o.parent.type !== this.type ? !1 : s ? e.commands.command(({ tr: i }) => {
97
115
  var l;
98
116
  const { pos: c } = o, f = o.start(), h = o.end(), u = n.doc.textBetween(f, h, `
@@ -108,13 +126,13 @@ var S = 4, I = /^```([a-z]+)?[\s\n]$/, w = /^~~~([a-z]+)?[\s\n]$/, z = C.create(
108
126
  }
109
127
  g += u[d].length + 1;
110
128
  }
111
- const A = ((l = u[p].match(/^ */)) == null ? void 0 : l[0]) || "", y = Math.min(A.length, r);
112
- if (y === 0)
129
+ const A = ((l = u[p].match(/^ */)) == null ? void 0 : l[0]) || "", v = Math.min(A.length, r);
130
+ if (v === 0)
113
131
  return !0;
114
132
  let m = f;
115
133
  for (let d = 0; d < p; d += 1)
116
134
  m += u[d].length + 1;
117
- return i.delete(m, m + y), c - m <= y && i.setSelection(T.create(i.doc, m)), !0;
135
+ return i.delete(m, m + v), c - m <= v && i.setSelection(T.create(i.doc, m)), !0;
118
136
  }) : e.commands.command(({ tr: i }) => {
119
137
  const { from: l, to: c } = a, x = n.doc.textBetween(l, c, `
120
138
  `, `
@@ -148,21 +166,21 @@ var S = 4, I = /^```([a-z]+)?[\s\n]$/, w = /^~~~([a-z]+)?[\s\n]$/, z = C.create(
148
166
  if (!o || a.parent.type !== this.type || !(a.parentOffset === a.parent.nodeSize - 2))
149
167
  return !1;
150
168
  const i = a.after();
151
- return i === void 0 ? !1 : n.nodeAt(i) ? e.commands.command(({ tr: c }) => (c.setSelection(P.near(n.resolve(i))), !0)) : e.commands.exitCode();
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();
152
170
  }
153
171
  };
154
172
  },
155
173
  addInputRules() {
156
174
  return [
157
- v({
158
- find: I,
175
+ S({
176
+ find: M,
159
177
  type: this.type,
160
178
  getAttributes: (e) => ({
161
179
  language: e[1]
162
180
  })
163
181
  }),
164
- v({
165
- find: w,
182
+ S({
183
+ find: N,
166
184
  type: this.type,
167
185
  getAttributes: (e) => ({
168
186
  language: e[1]
@@ -174,7 +192,7 @@ var S = 4, I = /^```([a-z]+)?[\s\n]$/, w = /^~~~([a-z]+)?[\s\n]$/, z = C.create(
174
192
  return [
175
193
  // this plugin creates a code block for pasted content from VS Code
176
194
  // we can also detect the copied code language
177
- new L({
195
+ new w({
178
196
  key: new B("codeBlockVSCodeHandler"),
179
197
  props: {
180
198
  handlePaste: (e, t) => {
@@ -193,5 +211,5 @@ var S = 4, I = /^```([a-z]+)?[\s\n]$/, w = /^~~~([a-z]+)?[\s\n]$/, z = C.create(
193
211
  }
194
212
  });
195
213
  export {
196
- z as C
214
+ $ as C
197
215
  };
@@ -1,5 +1,5 @@
1
- import { M as t, a as r, b as a, m as s } from "./vendor-tiptap-core-B000Ay3n.js";
2
- var d = /(^|[^`])`([^`]+)`(?!`)$/, n = /(^|[^`])`([^`]+)`(?!`)/g, o = t.create({
1
+ import { M as r, a, b as n, m as d } from "./vendor-tiptap-core-D6CfVeU0.js";
2
+ var s = /(^|[^`])`([^`]+)`(?!`)$/, o = /(^|[^`])`([^`]+)`(?!`)/g, i = r.create({
3
3
  name: "code",
4
4
  addOptions() {
5
5
  return {
@@ -13,8 +13,11 @@ var d = /(^|[^`])`([^`]+)`(?!`)$/, n = /(^|[^`])`([^`]+)`(?!`)/g, o = t.create({
13
13
  return [{ tag: "code" }];
14
14
  },
15
15
  renderHTML({ HTMLAttributes: e }) {
16
- return ["code", s(this.options.HTMLAttributes, e), 0];
16
+ return ["code", d(this.options.HTMLAttributes, e), 0];
17
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)}\`` : "",
18
21
  addCommands() {
19
22
  return {
20
23
  setCode: () => ({ commands: e }) => e.setMark(this.name),
@@ -29,21 +32,21 @@ var d = /(^|[^`])`([^`]+)`(?!`)$/, n = /(^|[^`])`([^`]+)`(?!`)/g, o = t.create({
29
32
  },
30
33
  addInputRules() {
31
34
  return [
32
- a({
33
- find: d,
35
+ n({
36
+ find: s,
34
37
  type: this.type
35
38
  })
36
39
  ];
37
40
  },
38
41
  addPasteRules() {
39
42
  return [
40
- r({
41
- find: n,
43
+ a({
44
+ find: o,
42
45
  type: this.type
43
46
  })
44
47
  ];
45
48
  }
46
49
  });
47
50
  export {
48
- o as C
51
+ i as C
49
52
  };
@@ -0,0 +1,12 @@
1
+ import { N as n } from "./vendor-tiptap-core-D6CfVeU0.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
+ });
10
+ export {
11
+ o as D
12
+ };
@@ -1,4 +1,4 @@
1
- import { N as l, m as c } from "./vendor-tiptap-core-B000Ay3n.js";
1
+ import { N as l, m as c } from "./vendor-tiptap-core-D6CfVeU0.js";
2
2
  var M = l.create({
3
3
  name: "hardBreak",
4
4
  addOptions() {
@@ -21,19 +21,21 @@ var M = l.create({
21
21
  return `
22
22
  `;
23
23
  },
24
+ renderMarkdown: (e, r) => r.indent(`
25
+ `),
24
26
  addCommands() {
25
27
  return {
26
- setHardBreak: () => ({ commands: e, chain: n, state: s, editor: a }) => e.first([
28
+ setHardBreak: () => ({ commands: e, chain: r, state: a, editor: s }) => e.first([
27
29
  () => e.exitCode(),
28
30
  () => e.command(() => {
29
- const { selection: r, storedMarks: i } = s;
30
- if (r.$from.parent.type.spec.isolating)
31
+ const { selection: t, storedMarks: i } = a;
32
+ if (t.$from.parent.type.spec.isolating)
31
33
  return !1;
32
- const { keepMarks: o } = this.options, { splittableMarks: d } = a.extensionManager, t = i || r.$to.parentOffset && r.$from.marks();
33
- return n().insertContent({ type: this.name }).command(({ tr: u, dispatch: m }) => {
34
- if (m && t && o) {
35
- const p = t.filter((k) => d.includes(k.type.name));
36
- u.ensureMarks(p);
34
+ const { keepMarks: o } = this.options, { splittableMarks: d } = s.extensionManager, n = i || t.$to.parentOffset && t.$from.marks();
35
+ return r().insertContent({ type: this.name }).command(({ tr: u, dispatch: m }) => {
36
+ if (m && n && o) {
37
+ const k = n.filter((p) => d.includes(p.type.name));
38
+ u.ensureMarks(k);
37
39
  }
38
40
  return !0;
39
41
  }).run();
@@ -1,5 +1,5 @@
1
- import { N as s, t as n, m as r } from "./vendor-tiptap-core-B000Ay3n.js";
2
- var a = s.create({
1
+ import { N as l, t as a, m as i } from "./vendor-tiptap-core-D6CfVeU0.js";
2
+ var d = l.create({
3
3
  name: "heading",
4
4
  addOptions() {
5
5
  return {
@@ -25,7 +25,13 @@ var a = s.create({
25
25
  }));
26
26
  },
27
27
  renderHTML({ node: e, HTMLAttributes: t }) {
28
- return [`h${this.options.levels.includes(e.attrs.level) ? e.attrs.level : this.options.levels[0]}`, r(this.options.HTMLAttributes, t), 0];
28
+ return [`h${this.options.levels.includes(e.attrs.level) ? e.attrs.level : this.options.levels[0]}`, i(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 s = (r = e.attrs) != null && r.level ? parseInt(e.attrs.level, 10) : 1, n = "#".repeat(s);
34
+ return e.content ? `${n} ${t.renderChildren(e.content)}` : "";
29
35
  },
30
36
  addCommands() {
31
37
  return {
@@ -43,7 +49,7 @@ var a = s.create({
43
49
  );
44
50
  },
45
51
  addInputRules() {
46
- return this.options.levels.map((e) => n({
52
+ return this.options.levels.map((e) => a({
47
53
  find: new RegExp(`^(#{${Math.min(...this.options.levels)},${e}})\\s$`),
48
54
  type: this.type,
49
55
  getAttributes: {
@@ -53,5 +59,5 @@ var a = s.create({
53
59
  }
54
60
  });
55
61
  export {
56
- a as H
62
+ d as H
57
63
  };
@@ -1,6 +1,6 @@
1
- import { N as f, n as m, c as h, i as T, m as y } from "./vendor-tiptap-core-B000Ay3n.js";
2
- import { T as r, N as A } from "./vendor-prosemirror-state-DUZYoLys.js";
3
- var S = f.create({
1
+ import { N as m, n as f, c as h, i as T, m as N } from "./vendor-tiptap-core-D6CfVeU0.js";
2
+ import { T as s, N as y } from "./vendor-prosemirror-state-DUZYoLys.js";
3
+ var H = m.create({
4
4
  name: "horizontalRule",
5
5
  addOptions() {
6
6
  return {
@@ -13,24 +13,27 @@ var S = f.create({
13
13
  return [{ tag: "hr" }];
14
14
  },
15
15
  renderHTML({ HTMLAttributes: o }) {
16
- return ["hr", y(this.options.HTMLAttributes, o)];
16
+ return ["hr", N(this.options.HTMLAttributes, o)];
17
17
  },
18
+ markdownTokenName: "hr",
19
+ parseMarkdown: (o, n) => n.createNode("horizontalRule"),
20
+ renderMarkdown: () => "---",
18
21
  addCommands() {
19
22
  return {
20
23
  setHorizontalRule: () => ({ chain: o, state: n }) => {
21
24
  if (!h(n, n.schema.nodes[this.name]))
22
25
  return !1;
23
- const { selection: i } = n, { $to: l } = i, s = o();
24
- return T(i) ? s.insertContentAt(l.pos, {
26
+ const { selection: i } = n, { $to: l } = i, r = o();
27
+ return T(i) ? r.insertContentAt(l.pos, {
25
28
  type: this.name
26
- }) : s.insertContent({ type: this.name }), s.command(({ state: p, tr: e, dispatch: u }) => {
29
+ }) : r.insertContent({ type: this.name }), r.command(({ state: p, tr: e, dispatch: u }) => {
27
30
  if (u) {
28
31
  const { $to: t } = e.selection, a = t.end();
29
32
  if (t.nodeAfter)
30
- t.nodeAfter.isTextblock ? e.setSelection(r.create(e.doc, t.pos + 1)) : t.nodeAfter.isBlock ? e.setSelection(A.create(e.doc, t.pos)) : e.setSelection(r.create(e.doc, t.pos));
33
+ t.nodeAfter.isTextblock ? e.setSelection(s.create(e.doc, t.pos + 1)) : t.nodeAfter.isBlock ? e.setSelection(y.create(e.doc, t.pos)) : e.setSelection(s.create(e.doc, t.pos));
31
34
  else {
32
35
  const c = p.schema.nodes[this.options.nextNodeType] || t.parent.type.contentMatch.defaultType, d = c?.create();
33
- d && (e.insert(a, d), e.setSelection(r.create(e.doc, a + 1)));
36
+ d && (e.insert(a, d), e.setSelection(s.create(e.doc, a + 1)));
34
37
  }
35
38
  e.scrollIntoView();
36
39
  }
@@ -41,7 +44,7 @@ var S = f.create({
41
44
  },
42
45
  addInputRules() {
43
46
  return [
44
- m({
47
+ f({
45
48
  find: /^(?:---|—-|___\s|\*\*\*\s)$/,
46
49
  type: this.type
47
50
  })
@@ -49,5 +52,5 @@ var S = f.create({
49
52
  }
50
53
  });
51
54
  export {
52
- S as H
55
+ H
53
56
  };
@@ -1,5 +1,5 @@
1
- import { N as i, n as s, m as a } from "./vendor-tiptap-core-B000Ay3n.js";
2
- var l = /(?:^|\s)(!\[(.+|:?)]\((\S+)(?:(?:\s+)["'](\S+)["'])?\))$/, o = i.create({
1
+ import { N as o, n as c, m as p } from "./vendor-tiptap-core-D6CfVeU0.js";
2
+ var g = /(?:^|\s)(!\[(.+|:?)]\((\S+)(?:(?:\s+)["'](\S+)["'])?\))$/, f = o.create({
3
3
  name: "image",
4
4
  addOptions() {
5
5
  return {
@@ -42,7 +42,17 @@ var l = /(?:^|\s)(!\[(.+|:?)]\((\S+)(?:(?:\s+)["'](\S+)["'])?\))$/, o = i.create
42
42
  ];
43
43
  },
44
44
  renderHTML({ HTMLAttributes: t }) {
45
- return ["img", a(this.options.HTMLAttributes, t)];
45
+ return ["img", p(this.options.HTMLAttributes, t)];
46
+ },
47
+ parseMarkdown: (t, e) => e.createNode("image", {
48
+ src: t.href,
49
+ title: t.title,
50
+ alt: t.text
51
+ }),
52
+ renderMarkdown: (t) => {
53
+ var e, r, n, l, a, s;
54
+ const i = (r = (e = t.attrs) == null ? void 0 : e.src) != null ? r : "", u = (l = (n = t.attrs) == null ? void 0 : n.alt) != null ? l : "", d = (s = (a = t.attrs) == null ? void 0 : a.title) != null ? s : "";
55
+ return d ? `![${u}](${i} "${d}")` : `![${u}](${i})`;
46
56
  },
47
57
  addCommands() {
48
58
  return {
@@ -54,17 +64,17 @@ var l = /(?:^|\s)(!\[(.+|:?)]\((\S+)(?:(?:\s+)["'](\S+)["'])?\))$/, o = i.create
54
64
  },
55
65
  addInputRules() {
56
66
  return [
57
- s({
58
- find: l,
67
+ c({
68
+ find: g,
59
69
  type: this.type,
60
70
  getAttributes: (t) => {
61
- const [, , e, n, r] = t;
62
- return { src: n, alt: e, title: r };
71
+ const [, , e, r, n] = t;
72
+ return { src: r, alt: e, title: n };
63
73
  }
64
74
  })
65
75
  ];
66
76
  }
67
77
  });
68
78
  export {
69
- o as I
79
+ f as I
70
80
  };
@@ -1,5 +1,5 @@
1
- import { M as r, a as e, b as s, m as a } from "./vendor-tiptap-core-B000Ay3n.js";
2
- var n = /(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))$/, i = /(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))/g, l = /(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))$/, u = /(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))/g, d = r.create({
1
+ import { M as s, a as r, b as a, m as n } from "./vendor-tiptap-core-D6CfVeU0.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
3
  name: "italic",
4
4
  addOptions() {
5
5
  return {
@@ -25,7 +25,7 @@ var n = /(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))$/, i = /(?:^|\s)(\*(?!\s+\*
25
25
  ];
26
26
  },
27
27
  renderHTML({ HTMLAttributes: t }) {
28
- return ["em", a(this.options.HTMLAttributes, t), 0];
28
+ return ["em", n(this.options.HTMLAttributes, t), 0];
29
29
  },
30
30
  addCommands() {
31
31
  return {
@@ -34,6 +34,9 @@ var n = /(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))$/, i = /(?:^|\s)(\*(?!\s+\*
34
34
  unsetItalic: () => ({ commands: t }) => t.unsetMark(this.name)
35
35
  };
36
36
  },
37
+ markdownTokenName: "em",
38
+ parseMarkdown: (t, e) => e.applyMark("italic", e.parseInline(t.tokens || [])),
39
+ renderMarkdown: (t, e) => `*${e.renderChildren(t)}*`,
37
40
  addKeyboardShortcuts() {
38
41
  return {
39
42
  "Mod-i": () => this.editor.commands.toggleItalic(),
@@ -42,29 +45,29 @@ var n = /(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))$/, i = /(?:^|\s)(\*(?!\s+\*
42
45
  },
43
46
  addInputRules() {
44
47
  return [
45
- s({
46
- find: n,
48
+ a({
49
+ find: i,
47
50
  type: this.type
48
51
  }),
49
- s({
50
- find: l,
52
+ a({
53
+ find: o,
51
54
  type: this.type
52
55
  })
53
56
  ];
54
57
  },
55
58
  addPasteRules() {
56
59
  return [
57
- e({
58
- find: i,
60
+ r({
61
+ find: d,
59
62
  type: this.type
60
63
  }),
61
- e({
62
- find: u,
64
+ r({
65
+ find: l,
63
66
  type: this.type
64
67
  })
65
68
  ];
66
69
  }
67
70
  });
68
71
  export {
69
- d as I
72
+ m as I
70
73
  };