@glifox/gnosis 0.0.10 → 0.0.12

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.
@@ -0,0 +1,27 @@
1
+ import { Language, LanguageSupport, LanguageDescription } from '@codemirror/language';
2
+ import { MarkdownExtension } from '@lezer/markdown';
3
+ import { Extension } from '@codemirror/state';
4
+ import { HrPlugin } from '../src/plugins/block/hr/plugin';
5
+ import { InlinePlugin } from '../src/plugins/inline/plugin';
6
+ import { ListPlugin } from '../src/plugins/block/list/plugin';
7
+ import { CodePlugin } from '../src/plugins/block/code/plugin';
8
+ import { HeadingPlugin } from '../src/plugins/block/heading/plugin';
9
+ import { QuotePlugin } from './plugins/block/quotes/plugin';
10
+ import { QuoteType } from './plugins/block/quotes/extension';
11
+ import { LinkPlugin } from './plugins/links/link/plugin';
12
+ import { ImagePlugin } from './plugins/links/image/plugin';
13
+ import { HtmlPlugin } from './plugins/block/html/plugin';
14
+ interface MarkdownConfig {
15
+ defaultCodeLanguage?: Language | LanguageSupport;
16
+ codeLanguages?: readonly LanguageDescription[] | ((info: string) => Language | LanguageDescription | null);
17
+ addKeymap?: boolean;
18
+ extensions?: MarkdownExtension[];
19
+ base?: Language;
20
+ completeHTMLTags?: boolean;
21
+ htmlTagLanguage?: LanguageSupport;
22
+ }
23
+ interface GnosisConfig {
24
+ markdown?: MarkdownConfig;
25
+ }
26
+ declare const gnosis: (conf?: GnosisConfig) => Extension[];
27
+ export { gnosis, HrPlugin, InlinePlugin, ListPlugin, CodePlugin, HeadingPlugin, LinkPlugin, QuotePlugin, QuoteType, ImagePlugin, HtmlPlugin, };
package/dist/gnosis.d.ts CHANGED
@@ -1,42 +1,2 @@
1
- import { Language, LanguageSupport, LanguageDescription } from '@codemirror/language';
2
- import { MarkdownExtension } from '@lezer/markdown';
3
- import { Extension } from '@codemirror/state';
4
- import { HrPlugin } from '../src/plugins/block/hr/plugin';
5
- import { InlinePlugin } from '../src/plugins/inline/plugin';
6
- import { ListPlugin } from '../src/plugins/block/list/plugin';
7
- import { CodePlugin } from '../src/plugins/block/code/plugin';
8
- import { HeadingPlugin } from '../src/plugins/block/heading/plugin';
9
- import { QuotePlugin } from './plugins/block/quotes/plugin';
10
- import { QuoteType } from './plugins/block/quotes/extension';
11
- import { LinkPlugin } from './plugins/links/link/plugin';
12
- import { ImagePlugin } from './plugins/links/image/plugin';
13
- import { HtmlPlugin } from './plugins/block/html/plugin';
14
- interface MarkdownConfig {
15
- defaultCodeLanguage?: Language | LanguageSupport;
16
- codeLanguages?: readonly LanguageDescription[] | ((info: string) => Language | LanguageDescription | null);
17
- addKeymap?: boolean;
18
- extensions?: MarkdownExtension[];
19
- base?: Language;
20
- completeHTMLTags?: boolean;
21
- htmlTagLanguage?: LanguageSupport;
22
- }
23
- interface GnosisConfig {
24
- markdown: MarkdownConfig;
25
- }
26
- declare const gnosis: (conf?: GnosisConfig) => Extension[];
27
- export { gnosis, HrPlugin, InlinePlugin, ListPlugin, CodePlugin, HeadingPlugin, LinkPlugin, QuotePlugin, QuoteType, ImagePlugin, HtmlPlugin, };
28
- declare global {
29
- interface Window {
30
- gnosis: typeof gnosis;
31
- HrPlugin: typeof HrPlugin;
32
- InlinePlugin: typeof InlinePlugin;
33
- ListPlugin: typeof ListPlugin;
34
- CodePlugin: typeof CodePlugin;
35
- HeadingPlugin: typeof HeadingPlugin;
36
- LinkPlugin: typeof LinkPlugin;
37
- QuotePlugin: typeof QuotePlugin;
38
- QuoteType: typeof QuoteType;
39
- ImagePlugin: typeof ImagePlugin;
40
- HtmlPlugin: typeof HtmlPlugin;
41
- }
42
- }
1
+ export * from './exports'
2
+ export {}
package/dist/gnosis.mjs CHANGED
@@ -1,15 +1,15 @@
1
- var Y = Object.defineProperty;
2
- var J = (e, t, s) => t in e ? Y(e, t, { enumerable: !0, configurable: !0, writable: !0, value: s }) : e[t] = s;
3
- var v = (e, t, s) => J(e, typeof t != "symbol" ? t + "" : t, s);
4
- import { languages as ee } from "@codemirror/language-data";
5
- import { markdown as te } from "@codemirror/lang-markdown";
6
- import { GFM as ne } from "@lezer/markdown";
7
- import { Tag as se, styleTags as re, tags as B } from "@lezer/highlight";
8
- import { ViewPlugin as oe, Decoration as l, WidgetType as x, EditorView as z } from "@codemirror/view";
1
+ var _ = Object.defineProperty;
2
+ var O = (e, t, s) => t in e ? _(e, t, { enumerable: !0, configurable: !0, writable: !0, value: s }) : e[t] = s;
3
+ var v = (e, t, s) => O(e, typeof t != "symbol" ? t + "" : t, s);
4
+ import { languages as W } from "@codemirror/language-data";
5
+ import { markdown as V } from "@codemirror/lang-markdown";
6
+ import { GFM as F } from "@lezer/markdown";
7
+ import { Tag as U, styleTags as X, tags as B } from "@lezer/highlight";
8
+ import { ViewPlugin as j, Decoration as l, WidgetType as x, EditorView as R } from "@codemirror/view";
9
9
  import { syntaxTree as E } from "@codemirror/language";
10
10
  import { EditorView as T } from "codemirror";
11
- import { StateEffect as ie, StateField as ae } from "@codemirror/state";
12
- const m = se.define("none"), ce = re({
11
+ import { StateEffect as G, StateField as K } from "@codemirror/state";
12
+ const m = U.define("none"), Y = X({
13
13
  "Blockquote/...": m,
14
14
  HorizontalRule: m,
15
15
  "ATXHeading1/... SetextHeading1/...": m,
@@ -35,7 +35,7 @@ const m = se.define("none"), ce = re({
35
35
  LinkTitle: m,
36
36
  Paragraph: m,
37
37
  "QuoteType/.. QuoteTypeMark QuoteTypeText": m
38
- }), le = { props: [ce] }, q = (e, t, s = {}) => {
38
+ }), J = { props: [Y] }, q = (e, t, s = {}) => {
39
39
  const o = class {
40
40
  constructor(c) {
41
41
  v(this, "decorations");
@@ -46,7 +46,7 @@ const m = se.define("none"), ce = re({
46
46
  (c.docChanged || c.viewportChanged || c.selectionSet) && (this.decorations = e(c.view, this.conf));
47
47
  }
48
48
  };
49
- return oe.fromClass(o, { decorations: (a) => a.decorations, ...s });
49
+ return j.fromClass(o, { decorations: (a) => a.decorations, ...s });
50
50
  }, M = (e, t, s) => {
51
51
  const o = e.state.selection.ranges;
52
52
  for (let a of o)
@@ -57,7 +57,7 @@ const m = se.define("none"), ce = re({
57
57
  for (const { from: s, to: o } of e.visibleRanges)
58
58
  E(e.state).iterate({ ...t, from: s, to: o });
59
59
  };
60
- function de(e, t) {
60
+ function ee(e, t) {
61
61
  const s = ["Document"], o = {}, a = {
62
62
  HorizontalRule: (r, n, i = !0) => [
63
63
  l.line({ class: "hr " + (i ? "sw" : "") }).range(r),
@@ -68,7 +68,7 @@ function de(e, t) {
68
68
  enter: ({ type: r, from: n, to: i }) => (r.name in a && c.push(...a[r.name](n, i, M(e, n, i))), s.includes(r.name) || r.name in o)
69
69
  }), l.set(c, !1);
70
70
  }
71
- const ue = () => T.baseTheme({
71
+ const te = () => T.baseTheme({
72
72
  "& .hr": { position: "relative" },
73
73
  "& .hr > .mk": { fontSize: "0" },
74
74
  "& .hr.sw > .mk": { fontSize: "inherit" },
@@ -81,11 +81,11 @@ const ue = () => T.baseTheme({
81
81
  width: "calc(100% - 12px)",
82
82
  height: ".2ch"
83
83
  }
84
- }), R = () => [
85
- q(de, {}),
86
- ue()
84
+ }), ne = () => [
85
+ q(ee, {}),
86
+ te()
87
87
  ];
88
- function ge(e, t) {
88
+ function se(e, t) {
89
89
  const s = ["FencedCode"], o = {
90
90
  StrongEmphasis: (r = !0, n, i) => l.mark({ class: "il st " + (r ? "sw" : "") }).range(n, i),
91
91
  Strikethrough: (r = !0, n, i) => l.mark({ class: "il sk " + (r ? "sw" : "") }).range(n, i),
@@ -103,24 +103,25 @@ function ge(e, t) {
103
103
  ), !s.includes(r))
104
104
  }), l.set(c, !1);
105
105
  }
106
- const he = T.baseTheme({
107
- ".it ": { fontStyle: "italic" },
108
- ".st ": { fontWeight: "bold" },
109
- ".sk ": { textDecoration: "line-through" },
110
- ".ic ": {
106
+ const re = T.baseTheme({
107
+ "& .it ": { fontStyle: "italic" },
108
+ "& .st ": { fontWeight: "bold" },
109
+ "& .sk ": { textDecoration: "line-through" },
110
+ "& .ic ": {
111
111
  fontFamily: "monospace",
112
112
  paddingInline: ".6ch",
113
- borderRadius: ".6ch"
113
+ borderRadius: ".6ch",
114
+ backgroundColor: "var(--cm-ic-background, hsl(from black h s l / .2))"
114
115
  }
115
- }), me = T.baseTheme({
116
+ }), oe = T.baseTheme({
116
117
  ".il .mkl": { fontSize: "0" },
117
118
  "&.cm-focused .il.sw > .mkl": { fontSize: "inherit" }
118
- }), N = () => [
119
- q(ge, {}),
120
- he,
121
- me
119
+ }), ie = () => [
120
+ q(se, {}),
121
+ re,
122
+ oe
122
123
  ];
123
- class pe extends x {
124
+ class ae extends x {
124
125
  constructor(s) {
125
126
  super();
126
127
  v(this, "checked", !1);
@@ -137,7 +138,7 @@ class pe extends x {
137
138
  return !1;
138
139
  }
139
140
  }
140
- function fe(e, t) {
141
+ function ce(e, t) {
141
142
  const s = [
142
143
  "Document",
143
144
  "ListItem",
@@ -157,7 +158,7 @@ function fe(e, t) {
157
158
  TaskMarker: (i, d, u, g = !0) => {
158
159
  const C = e.state.doc.sliceString(i + 1, d - 1) === "x";
159
160
  return g ? l.mark({ class: `tm ${C ? "ck" : ""}` }).range(i, d) : l.replace({
160
- widget: new pe(C)
161
+ widget: new ae(C)
161
162
  }).range(i, d);
162
163
  }
163
164
  }, c = {
@@ -189,18 +190,18 @@ function fe(e, t) {
189
190
  }
190
191
  }), l.set(r, !0);
191
192
  }
192
- const Ce = (e, t) => {
193
+ const le = (e, t) => {
193
194
  var o;
194
195
  let s = e.target;
195
- if (s.nodeName === "INPUT" && ((o = s.parentElement) != null && o.classList.contains("TaskMark"))) return ke(t, t.posAtDOM(s));
196
- }, ke = (e, t) => {
196
+ if (s.nodeName === "INPUT" && ((o = s.parentElement) != null && o.classList.contains("TaskMark"))) return de(t, t.posAtDOM(s));
197
+ }, de = (e, t) => {
197
198
  const s = t - 2, o = t - 1;
198
199
  let a = e.state.doc.sliceString(Math.max(0, s), o), c;
199
200
  if (a === "x") c = { from: s, to: o, insert: " " };
200
201
  else if (a === " ") c = { from: s, to: o, insert: "x" };
201
202
  else return !1;
202
203
  return e.dispatch({ changes: c }), !0;
203
- }, be = () => T.baseTheme({
204
+ }, ue = () => T.baseTheme({
204
205
  "& .lm.bl": {
205
206
  position: "relative",
206
207
  paddingInlineStart: "1ch",
@@ -235,17 +236,17 @@ const Ce = (e, t) => {
235
236
  "& .cm-line .lm, & .cm-line .TaskMark, & .cm-line .tm, & .cm-line .ls-text-line": {
236
237
  verticalAlign: "top"
237
238
  }
238
- }), _ = () => [
239
- q(fe, {}, { eventHandlers: { mousedown: Ce } }),
240
- be()
241
- ], we = (e, t) => {
239
+ }), ge = () => [
240
+ q(ce, {}, { eventHandlers: { mousedown: le } }),
241
+ ue()
242
+ ], he = (e, t) => {
242
243
  var o;
243
244
  let s = e.target;
244
245
  if (s.nodeName === "BUTTON" && ((o = s.parentElement) != null && o.classList.contains("wg-codeblock"))) {
245
246
  const a = ["FencedCode", "CodeBlock"];
246
247
  let c = "";
247
248
  const r = {
248
- enter: ({ type: { name: n }, from: i, to: d, node: u }) => (a.includes(n) && (c = Le(t, u.toTree(), i, d)), !a.includes(n))
249
+ enter: ({ type: { name: n }, from: i, to: d, node: u }) => (a.includes(n) && (c = me(t, u.toTree(), i, d)), !a.includes(n))
249
250
  };
250
251
  return E(t.state).iterate({
251
252
  ...r,
@@ -253,7 +254,7 @@ const Ce = (e, t) => {
253
254
  to: t.posAtDOM(s) + 2
254
255
  }), navigator.clipboard.writeText(c), !0;
255
256
  }
256
- }, Le = (e, t, s, o) => {
257
+ }, me = (e, t, s, o) => {
257
258
  const a = ["CodeMark", "CodeInfo"];
258
259
  let c = e.state.doc.sliceString(s, o), r = /* @__PURE__ */ new Set();
259
260
  t.iterate({
@@ -282,11 +283,11 @@ class A extends x {
282
283
  return !1;
283
284
  }
284
285
  }
285
- const Te = (e) => `<svg class="cb-icon" viewBox="0 0 18 18" fill="none" xmlns="http://www.w3.org/2000/svg">
286
+ const pe = (e) => `<svg class="cb-icon" viewBox="0 0 18 18" fill="none" xmlns="http://www.w3.org/2000/svg">
286
287
  <path class="cb-icon-path cb.i1" fill-rule="evenodd" clip-rule="evenodd" d="M15 0C15.5304 0 16.0391 0.210714 16.4142 0.585786C16.7893 0.960859 17 1.46957 17 2V12C17 12.5304 16.7893 13.0391 16.4142 13.4142C16.0391 13.7893 15.5304 14 15 14H14V6C14 4.93913 13.5786 3.92172 12.8284 3.17157C12.0783 2.42143 11.0609 2 10 2H7C6.64895 1.99924 6.30395 2.09135 6 2.267V2C6 1.46957 6.21071 0.960859 6.58579 0.585786C6.96086 0.210714 7.46957 0 8 0H15Z"/>
287
288
  <path class="cb-icon-path cb.i1" fill-rule="evenodd" clip-rule="evenodd" d="M5 4.054V8H1.2C1.27464 7.84448 1.3691 7.69928 1.481 7.568L3.941 4.698C4.2169 4.37661 4.58771 4.15111 5 4.054ZM7 4V8C7 8.53043 6.78929 9.03914 6.41421 9.41421C6.03914 9.78929 5.53043 10 5 10H1V16C1 16.5304 1.21071 17.0391 1.58579 17.4142C1.96086 17.7893 2.46957 18 3 18H10C10.5304 18 11.0391 17.7893 11.4142 17.4142C11.7893 17.0391 12 16.5304 12 16V6C12 5.46957 11.7893 4.96086 11.4142 4.58579C11.0391 4.21071 10.5304 4 10 4H7Z"/>
288
289
  </svg>`;
289
- class qe extends x {
290
+ class fe extends x {
290
291
  constructor(t, s) {
291
292
  super(), this.type = t, this.code = s;
292
293
  }
@@ -294,7 +295,7 @@ class qe extends x {
294
295
  let t = document.createElement("span");
295
296
  t.setAttribute("aria-hidden", "true"), t.className = "wg-codeblock";
296
297
  let s = document.createElement("button");
297
- return s.className = "wg-codeblock-btn", s.innerHTML = Te(), t.appendChild(s), t;
298
+ return s.className = "wg-codeblock-btn", s.innerHTML = pe(), t.appendChild(s), t;
298
299
  }
299
300
  ignoreEvent() {
300
301
  return !1;
@@ -306,8 +307,8 @@ function D(e, t) {
306
307
  mode: s
307
308
  /* type, mark */
308
309
  } = t, o = ["Document", "Blockquote", "ListItem", "BulletList", "OrderedList"], a = {
309
- FencedCode: P,
310
- CodeBlock: P
310
+ FencedCode: Z,
311
+ CodeBlock: Z
311
312
  }, c = {
312
313
  CodeMark: (n, i, d) => [l.mark({ class: "cb-mk" }).range(i, d)],
313
314
  CodeInfo: (n, i, d) => [l.mark({ class: "cb-mi" }).range(i, d)]
@@ -320,10 +321,10 @@ function D(e, t) {
320
321
  mark: l.set(r, !0)
321
322
  }[s];
322
323
  }
323
- const P = (e, t, s) => {
324
+ const Z = (e, t, s) => {
324
325
  const o = [], a = H[H.length - 1], c = ["BulletList", "OrderedList", "ListItem"].some((p) => p === a.name), r = ["Blockquote"].some((p) => p === a.name), n = e.state.doc.lineAt(t), i = t - n.from, d = i > 0, u = M(e, n.from, s);
325
326
  u || o.push(
326
- l.widget({ widget: new qe("view.state.sliceDoc(from, to)", "code"), side: 0 }).range(t + 1)
327
+ l.widget({ widget: new fe("view.state.sliceDoc(from, to)", "code"), side: 0 }).range(t + 1)
327
328
  );
328
329
  const g = n.number, C = e.state.doc.sliceString(t, s).split(`
329
330
  `).length;
@@ -362,7 +363,7 @@ const P = (e, t, s) => {
362
363
  o.push(l.line({ class: "cb-line" }).range(h));
363
364
  }
364
365
  return o;
365
- }, Me = () => {
366
+ }, Ce = () => {
366
367
  const o = "4px", a = "1lh";
367
368
  return T.baseTheme({
368
369
  ".cb-start": { borderRadius: `${o} ${o} 0 0` },
@@ -430,14 +431,17 @@ const P = (e, t, s) => {
430
431
  boxSizing: "border-box",
431
432
  maxHeight: "100%",
432
433
  width: "5ch"
434
+ },
435
+ "& .cb-content": {
436
+ backgroundColor: "var(--cm-ic-background, hsl(from black h s l / .1))"
433
437
  }
434
438
  });
435
- }, O = () => [
439
+ }, ke = () => [
436
440
  q(D, { mode: "mark" }),
437
- q(D, { mode: "type" }, { eventHandlers: { mousedown: we } }),
438
- Me()
441
+ q(D, { mode: "type" }, { eventHandlers: { mousedown: he } }),
442
+ Ce()
439
443
  ];
440
- function ye(e, t) {
444
+ function be(e, t) {
441
445
  const s = ["Document"], o = {
442
446
  ATXHeading1: (r, n = !0) => l.line({ class: "h1 hg " + (n ? "sw" : "") }).range(r),
443
447
  ATXHeading2: (r, n = !0) => l.line({ class: "h2 hg " + (n ? "sw" : "") }).range(r),
@@ -452,32 +456,33 @@ function ye(e, t) {
452
456
  enter: ({ type: r, from: n, to: i }) => (r.name in o && c.push(o[r.name](n, M(e, n, i))), r.name in a && c.push(a[r.name](n, i + 1)), s.includes(r.name) || r.name in o)
453
457
  }), l.set(c, !1);
454
458
  }
455
- const xe = T.baseTheme({
456
- ".h1 ": { fontSize: "2.6rem" },
457
- ".h2 ": { fontSize: "2.0rem" },
458
- ".h3 ": { fontSize: "1.8rem" },
459
- ".h4 ": { fontSize: "1.6rem" },
460
- ".h5 ": { fontSize: "1.4rem" },
461
- ".h6 ": { fontSize: "1.2rem" }
462
- }), ve = T.baseTheme({
463
- ".hg .mk": { fontSize: "0" },
459
+ const we = T.baseTheme({
460
+ "& .h1 ": { fontSize: "2.00em", fontWeight: "bolder" },
461
+ "& .h2 ": { fontSize: "1.55em", fontWeight: "bolder" },
462
+ "& .h3 ": { fontSize: "1.35em", fontWeight: "bolder" },
463
+ "& .h4 ": { fontSize: "1.25em", fontWeight: "bolder" },
464
+ "& .h5 ": { fontSize: "1.25em", fontWeight: "semi-bold" },
465
+ "& .h6 ": { fontSize: "1.25em", fontWeight: "normal" },
466
+ "& .hg ": { lineHeight: "1.5lh" }
467
+ }), Le = T.baseTheme({
468
+ "& .hg .mk": { fontSize: "0" },
464
469
  "&.cm-focused .hg.sw .mk": { fontSize: "inherit" }
465
- }), V = () => [
466
- q(ye, {}),
467
- xe,
468
- ve
469
- ], He = (e) => `<svg class="qt-icon qt-caution" width="400" height="400" viewBox="0 0 400 400" fill="none" xmlns="http://www.w3.org/2000/svg">
470
+ }), Te = () => [
471
+ q(be, {}),
472
+ we,
473
+ Le
474
+ ], qe = (e) => `<svg class="qt-icon qt-caution" width="400" height="400" viewBox="0 0 400 400" fill="none" xmlns="http://www.w3.org/2000/svg">
470
475
  <path fill-rule="evenodd" clip-rule="evenodd" d="M196.094 54.176C191.229 54.988 188.782 56.222 167.834 68.423C158.562 73.823 147.197 80.435 142.578 83.117C137.959 85.799 129.961 90.458 124.805 93.47C119.648 96.482 111.211 101.406 106.055 104.413C84.503 116.982 82.78 118.066 79.627 121.029C76.043 124.397 73.548 127.986 71.861 132.199C69.426 138.28 69.543 135.024 69.435 199.872L69.336 259.18L70.21 263.086C72.901 275.106 75.333 277.456 99.826 291.697C130.626 309.606 166.896 330.685 175.781 335.841C190.902 344.615 195.154 346.196 201.915 345.563C208.158 344.978 210.107 344.123 225.391 335.264C255.218 317.977 294.844 294.867 311.417 285.093C322.591 278.504 327.153 273.047 329.413 263.569L330.273 259.961V199.609V139.258L329.396 135.938C327.721 129.594 324.327 124.148 319.504 120.066C316.509 117.531 317.424 118.075 248.047 77.651C205.151 52.657 205.162 52.662 196.094 54.176ZM206.746 110.34C212.104 111.475 216.464 114.838 218.945 119.75C220.313 122.457 220.428 126.187 219.575 140.039C219.323 144.121 218.592 157.129 217.95 168.945C214.743 227.944 214.663 228.952 212.917 232.683C208.369 242.403 195.202 244.021 188.814 235.646C185.935 231.872 185.59 229.751 184.375 208.398C183.935 200.664 182.688 180.01 181.605 162.5C178.965 119.84 178.966 119.825 183.963 114.828C188.541 110.25 197.755 108.434 206.746 110.34ZM205.105 254.139C220.433 258.641 225.321 277.899 213.857 288.623C198.306 303.17 174.003 287.211 181.04 267.073C184.452 257.309 195.564 251.336 205.105 254.139Z"/>
471
- </svg>`, $e = (e) => `<svg class="qt-icon qt-warning" width="400" height="400" viewBox="0 0 400 400" fill="none" xmlns="http://www.w3.org/2000/svg">
476
+ </svg>`, Me = (e) => `<svg class="qt-icon qt-warning" width="400" height="400" viewBox="0 0 400 400" fill="none" xmlns="http://www.w3.org/2000/svg">
472
477
  <path fill-rule="evenodd" clip-rule="evenodd" d="M195.982 53.527C185.35 55.195 178.527 60.217 172.381 70.898C165.461 82.925 148.022 114.138 122.184 160.742C115.633 172.559 100.427 199.98 88.394 221.68C57.505 277.38 55.934 280.238 54.25 283.76C45.588 301.882 55.075 322.592 74.884 328.805L78.32 329.883L198.438 329.99C278.577 330.062 319.42 329.965 321.154 329.699C337.809 327.15 349.594 312.698 348.718 295.898C348.297 287.827 348.329 287.895 328.438 252.148C310.272 219.501 297.79 196.996 280.665 166.016C235.38 84.092 225.675 66.998 222.278 63.175C216.156 56.285 204.847 52.136 195.982 53.527ZM209.263 116.46C218.176 119.751 220.681 125.503 219.95 141.003C219.711 146.059 219.256 155.732 218.938 162.5C218.62 169.268 218.011 180.43 217.584 187.305C216.759 200.593 216.366 207.385 215.42 224.66C215.058 231.282 214.609 236.196 214.259 237.373C210.281 250.771 189.551 250.542 185.792 237.058C185.226 235.025 184.802 229.702 183.979 214.258C183.761 210.176 183.323 202.881 183.006 198.047C182.213 185.991 181.756 178.028 181.054 164.063C180.724 157.51 180.287 149.424 180.081 146.094C178.833 125.858 181.444 119.151 191.797 115.99C194.231 115.247 206.901 115.588 209.263 116.46ZM205.893 260.709C224.265 266.28 227.749 290.936 211.55 300.733C192.458 312.28 170.521 292.287 180.334 272.284C184.884 263.009 196.351 257.816 205.893 260.709Z"/>
473
- </svg>`, Se = (e) => `<svg class="qt-icon qt-important" width="400" height="400" viewBox="0 0 400 400" fill="none" xmlns="http://www.w3.org/2000/svg">
478
+ </svg>`, ye = (e) => `<svg class="qt-icon qt-important" width="400" height="400" viewBox="0 0 400 400" fill="none" xmlns="http://www.w3.org/2000/svg">
474
479
  <path fill-rule="evenodd" clip-rule="evenodd" d="M190.234 64.334C153.518 67.16 117.751 87.08 95.346 117.181C46.258 183.13 68.9 277.91 142.564 314.837C228.927 358.129 330.405 294.361 330.594 196.68C330.742 119.807 265.747 58.523 190.234 64.334ZM219.531 126.465C220.494 126.947 221.218 127.78 221.98 129.284L223.062 131.421L222.957 139.621L222.852 147.822L221.875 148.263C213.74 151.931 214.67 145.87 214.532 196.094C214.395 245.634 214.025 242.228 219.783 244.354C223.193 245.613 223.047 245.172 223.047 254.214C223.047 263.28 222.791 264.649 220.681 266.868L219.262 268.359H200.09H180.919L179.769 267.392C177.295 265.31 176.926 263.501 177.043 254.054C177.131 246.999 177.246 245.543 177.734 245.295C178.057 245.131 179.5 244.445 180.943 243.77C182.568 243.01 183.905 242.067 184.459 241.291L185.352 240.039L185.456 197.305C185.559 155.268 185.548 154.545 184.78 152.959C183.999 151.347 181.2 149.279 178.906 148.622C176.957 148.063 176.953 148.047 176.953 139.659C176.953 129.986 177.595 127.658 180.624 126.34C182.693 125.439 217.703 125.552 219.531 126.465Z"/>
475
- </svg>`, Be = (e) => `<svg class="qt-icon qt-note" width="400" height="400" viewBox="0 0 400 400" fill="none" xmlns="http://www.w3.org/2000/svg">
480
+ </svg>`, xe = (e) => `<svg class="qt-icon qt-note" width="400" height="400" viewBox="0 0 400 400" fill="none" xmlns="http://www.w3.org/2000/svg">
476
481
  <path fill-rule="evenodd" clip-rule="evenodd" d="M107.227 63.8769C101.558 65.1289 95.375 67.9369 91.406 71.0639C90.01 72.1639 88.215 73.5439 87.417 74.1299C86.62 74.7159 85.96 75.3819 85.952 75.6099C85.944 75.8379 85.612 76.3739 85.214 76.8009C81.982 80.2699 78.079 87.8199 76.776 93.1259L75.781 97.1769V198.907C75.781 262.894 75.922 301.425 76.16 302.76C76.368 303.928 76.623 305.38 76.726 305.987C78.4 315.889 87.879 327.367 98.558 332.423C107.578 336.694 98.739 336.366 201.563 336.242L291.602 336.133L294.27 335.228C309.157 330.183 318.557 320.61 322.536 306.445L323.633 302.539V228.516C323.633 144.681 323.906 151.756 320.402 144.774L318.615 141.211L286.943 109.57C269.523 92.1679 253.932 76.5229 252.297 74.8049C246.111 68.3049 241.836 65.3209 236.902 64.0589C233.006 63.0629 111.686 62.8929 107.227 63.8769ZM233.77 78.3359C236.715 80.5619 300.292 144.132 300.799 145.356C301.574 147.227 300.841 149.245 299.01 150.282L297.461 151.159L274.127 151.165C258.248 151.17 250.198 151.032 248.931 150.734C240.06 148.649 234.561 144.527 231.043 137.327C228.119 131.344 228.085 130.936 228.21 104.035L228.32 80.5309L229.275 79.5149C229.801 78.9559 230.767 78.3419 231.424 78.1519C233.014 77.6899 232.904 77.6809 233.77 78.3359ZM192.354 175.195C194.09 176.288 194.73 177.166 196.549 180.952C197.924 183.813 194.551 189.489 190.695 190.803C187.744 191.808 132.089 191.686 129.883 190.669C122.396 187.22 123.011 176.607 130.837 174.194C131.386 174.024 145.033 173.917 161.164 173.954L190.492 174.023L192.354 175.195ZM269.587 217.641C271.831 218.313 276.709 223.047 275.158 223.047C275.018 223.047 275.115 223.301 275.373 223.611C277.4 226.054 274.593 231.969 270.523 233.832L268.466 234.774L199.37 234.672L130.273 234.57L128.645 233.465C122.49 229.288 123.57 220.238 130.522 217.722C132.38 217.05 267.351 216.971 269.587 217.641ZM247.509 261.237C249.631 262.341 252.9 266.371 252.223 267.048C252.125 267.146 252.179 267.824 252.344 268.555C252.508 269.285 252.542 269.985 252.417 270.109C252.293 270.233 252.148 270.627 252.096 270.984C251.721 273.539 250.106 275.678 247.498 277.074L245.898 277.93L189.258 278.036C138.155 278.132 132.426 278.082 130.664 277.516C122.018 274.742 123.019 262.33 132.031 260.562C132.783 260.414 158.711 260.317 189.648 260.347L245.898 260.4L247.509 261.237Z"/>
477
- </svg>`, Ee = (e) => `<svg class="qt-icon qt-tip" width="400" height="400" viewBox="0 0 400 400" fill="none" xmlns="http://www.w3.org/2000/svg">
482
+ </svg>`, ve = (e) => `<svg class="qt-icon qt-tip" width="400" height="400" viewBox="0 0 400 400" fill="none" xmlns="http://www.w3.org/2000/svg">
478
483
  <path fill-rule="evenodd" clip-rule="evenodd" d="M197.813 54.2439C196.932 54.6529 195.79 55.5789 195.274 56.3019L194.336 57.6169L194.219 70.8359L194.102 84.0549L195.076 85.3319C197.802 88.9059 203.271 88.5369 205.364 84.6369C206.151 83.1699 206.872 60.7239 206.215 58.1479C205.842 56.6839 203.21 53.9059 202.196 53.9059C201.901 53.9059 201.155 53.8149 200.537 53.7039C199.864 53.5829 198.772 53.7989 197.813 54.2439ZM116.233 86.0419C113.323 87.6899 112.27 91.6249 113.92 94.6849C115.402 97.4339 131.364 113.194 132.973 113.496C138.573 114.546 142.477 110.343 140.971 104.883C140.465 103.049 125.118 87.2169 122.574 85.9039C120.632 84.9019 118.15 84.9559 116.233 86.0419ZM277.93 85.7559C276.466 86.4829 260.132 103.191 259.49 104.618C257.281 109.529 261.871 114.699 267.084 113.171C268.604 112.726 283.491 98.5359 285.985 95.1559C289.892 89.8619 283.853 82.8139 277.93 85.7559ZM192.578 105.326C174.207 107.647 159.188 115.505 147.608 128.855C123.664 156.459 124.119 191.541 148.828 223.047C160.759 238.26 165.383 249.444 166.996 266.992C167.829 276.054 168.682 277.986 172.825 280.204C174.652 281.182 221.998 281.773 225.389 280.86C229.012 279.884 232.583 275.584 232.967 271.735C233.077 270.63 233.363 267.529 233.603 264.844C234.904 250.229 238.454 241.734 249.573 226.622C261.236 210.772 265.303 202.299 269.01 186.133C271.624 174.731 269.08 156.872 263.028 144.145C251.295 119.471 219.462 101.931 192.578 105.326ZM88.992 165.981C83.602 166.183 82.734 166.309 81.765 167.028C77.932 169.873 77.932 174.66 81.766 177.503C83.099 178.491 104.15 178.988 108.11 178.124C114.214 176.794 115.972 170.208 111.179 166.626C109.976 165.727 101.966 165.494 88.992 165.981ZM289.847 166.481C285.102 168.919 285.171 174.882 289.974 177.45C292.2 178.64 314.187 179.022 317.07 177.921C322.542 175.831 321.886 167.919 316.118 166.457C312.336 165.498 291.723 165.517 289.847 166.481ZM132.14 230.477C129.964 231.352 113.316 248.951 113.059 250.648C112.263 255.894 117.791 260.112 122.389 257.768C124.057 256.918 139.906 240.858 140.656 239.258C143.226 233.779 137.81 228.195 132.14 230.477ZM262.386 230.871C259.487 232.447 258.349 236.857 260.122 239.648C261.348 241.579 276.261 256.486 277.701 257.219C282.933 259.885 288.816 254.457 286.416 249.179C285.559 247.294 271.67 232.693 269.4 231.29C267.429 230.071 264.211 229.879 262.386 230.871ZM174.576 292.561C170.753 293.719 169.922 295.59 169.922 303.033C169.922 310.255 170.618 312.154 173.969 314.076L175.977 315.227L200.113 315.231C223.446 315.234 224.301 315.208 225.774 314.457C229.279 312.669 230.367 309.882 230.446 302.493L230.504 297.04L229.29 295.365C226.903 292.07 228.123 292.201 200.195 292.23C186.66 292.243 175.131 292.392 174.576 292.561ZM180.946 325.217C179.882 325.963 179.759 328.554 180.683 330.774C185.032 341.224 208.831 343.084 217.528 333.654C220.185 330.773 221.108 326.967 219.531 325.391C218.456 324.315 182.465 324.154 180.946 325.217Z"/>
479
- </svg>`, Q = { tip: Ee, note: Be, important: Se, warning: $e, caution: He, none: () => "" };
480
- class Ie extends x {
484
+ </svg>`, Q = { tip: ve, note: xe, important: ye, warning: Me, caution: qe, none: () => "" };
485
+ class He extends x {
481
486
  constructor(t) {
482
487
  super(), this.type = t;
483
488
  }
@@ -492,7 +497,7 @@ class Ie extends x {
492
497
  return this.type === t.type;
493
498
  }
494
499
  }
495
- function Ae(e, t) {
500
+ function $e(e, t) {
496
501
  const s = ["Document", "ListItem", "BulletList", "OrderedList"], o = {
497
502
  none: "bq-none-mark",
498
503
  note: "bq-note-mark",
@@ -508,7 +513,7 @@ function Ae(e, t) {
508
513
  }).range(n, i);
509
514
  },
510
515
  QuoteType: (n, i, d) => l.widget({
511
- widget: new Ie(d),
516
+ widget: new He(d),
512
517
  side: 1
513
518
  }).range(n),
514
519
  BlockquoteLine: (n, i) => l.line({ class: "bq-line " + (i ? "sw" : "") }).range(n),
@@ -526,7 +531,7 @@ function Ae(e, t) {
526
531
  let f = 0;
527
532
  return {
528
533
  enter({ name: w, node: I, from: $, to: S }) {
529
- w === "Blockquote" && b.push(De(n, I)), w === "QuoteMark" && (g.push(a[w]($, S, b[L])), f = S, L++), w === "QuoteType" && g.push(a[w]($, S, b[L - 1]));
534
+ w === "Blockquote" && b.push(Se(n, I)), w === "QuoteMark" && (g.push(a[w]($, S, b[L])), f = S, L++), w === "QuoteType" && g.push(a[w]($, S, b[L - 1]));
530
535
  },
531
536
  leave({ name: w, from: I, to: $ }) {
532
537
  w === "Paragraph" && f < k && g.push(a.quoteLine(f, k, f - h));
@@ -550,12 +555,12 @@ function Ae(e, t) {
550
555
  }
551
556
  }), l.set(r, !0);
552
557
  }
553
- const De = (e, t) => {
558
+ const Se = (e, t) => {
554
559
  const s = t.getChild("QuoteType");
555
560
  if (!s) return "none";
556
561
  const o = s.getChild("QuoteTypeText");
557
562
  return o ? e.state.sliceDoc(o.from, o.to).toLowerCase() : "none";
558
- }, Pe = () => T.baseTheme({
563
+ }, Be = () => T.baseTheme({
559
564
  "& .qt-mk": {
560
565
  // outline: "1px red solid",
561
566
  position: "relative",
@@ -578,8 +583,8 @@ const De = (e, t) => {
578
583
  "& .bq-line.sw .bq-none-mark, .bq-none-mark::after": { color: "var(--bq-none-mark, light-dark(black, white))" },
579
584
  "&.cm-focused .bq-line.sw .bq-note-mark, .bq-note-mark::after": { color: "var(--bq-note-mark, blue)" },
580
585
  "&.cm-focused .bq-line.sw .bq-tip-mark, .bq-tip-mark::after": { color: "var(--bq-tip-mark, green)" },
581
- "&.cm-focused .bq-line.sw .bq-warning-mark, .bq-warning-mark::after": { color: "var(--bq-warning-mark, peach)" },
582
- "&.cm-focused .bq-line.sw .bq-important-mark, .bq-important-mark::after": { color: "var(--bq-important-mark, rebbecapurple)" },
586
+ "&.cm-focused .bq-line.sw .bq-warning-mark, .bq-warning-mark::after": { color: "var(--bq-warning-mark, peru)" },
587
+ "&.cm-focused .bq-line.sw .bq-important-mark, .bq-important-mark::after": { color: "var(--bq-important-mark, rebeccapurple)" },
583
588
  "&.cm-focused .bq-line.sw .bq-caution-mark, .bq-caution-mark::after": { color: "var(--bq-caution-mark, red)" },
584
589
  "& .bq-text-line": {
585
590
  lineHeight: "1lh",
@@ -601,13 +606,13 @@ const De = (e, t) => {
601
606
  },
602
607
  "& .wg-qt-icon > .qt-tip": { fill: "var(--bq-tip-mark, green)" },
603
608
  "& .wg-qt-icon > .qt-note": { fill: "var(--bq-note-mark, blue)" },
604
- "& .wg-qt-icon > .qt-important": { fill: "var(--bq-important-mark, rebbecapurple)" },
605
- "& .wg-qt-icon > .qt-warning": { fill: "var(--bq-warning-mark, peach)" },
609
+ "& .wg-qt-icon > .qt-important": { fill: "var(--bq-important-mark, rebeccapurple)" },
610
+ "& .wg-qt-icon > .qt-warning": { fill: "var(--bq-warning-mark, peru)" },
606
611
  "& .wg-qt-icon > .qt-caution": { fill: "var(--bq-caution-mark, red)" }
607
- }), F = () => [
608
- q(Ae, {}),
609
- Pe()
610
- ], Qe = {
612
+ }), Ee = () => [
613
+ q($e, {}),
614
+ Be()
615
+ ], Ie = {
611
616
  name: "QuoteTypeParser",
612
617
  parse(e, t) {
613
618
  if ((() => {
@@ -627,14 +632,14 @@ const De = (e, t) => {
627
632
  }
628
633
  return !1;
629
634
  }
630
- }, U = {
635
+ }, Ae = {
631
636
  defineNodes: [
632
637
  { name: "QuoteType", style: { "QuoteType/...": B.content } },
633
638
  { name: "QuoteTypeMark", style: B.processingInstruction },
634
639
  { name: "QuoteTypeText", style: B.bool }
635
640
  ],
636
- parseBlock: [Qe]
637
- }, X = (e, t, s) => {
641
+ parseBlock: [Ie]
642
+ }, N = (e, t, s) => {
638
643
  const o = e.state.sliceDoc(t, s), a = o.match(/\[(.*)\]/);
639
644
  return a !== null && a.length > 1 ? {
640
645
  text: a[1],
@@ -642,7 +647,7 @@ const De = (e, t) => {
642
647
  to: t + 1 + a[1].length
643
648
  } : { text: null };
644
649
  };
645
- function Ze(e, t) {
650
+ function De(e, t) {
646
651
  const s = ["FencedCode", "Image", "Link"], o = {
647
652
  Link: {
648
653
  marks: ["LinkMark"],
@@ -675,27 +680,27 @@ function Ze(e, t) {
675
680
  C = e.state.sliceDoc(p, h), c.push(a.URL(p, h, C));
676
681
  }
677
682
  if (d.getChild("Image") === null) {
678
- const { text: p, from: h, to: k } = X(e, n, i);
683
+ const { text: p, from: h, to: k } = N(e, n, i);
679
684
  p !== null && C !== null && c.push(a.TextDec(h, k, C));
680
685
  }
681
686
  return !1;
682
687
  }
683
688
  }), l.set(c, !0);
684
689
  }
685
- const ze = (e, t) => e.ctrlKey ? Re(
690
+ const Ze = (e, t) => e.ctrlKey ? Qe(
686
691
  e.target
687
692
  /* as HTMLElement */
688
- ) : !1, Re = (e) => {
693
+ ) : !1, Qe = (e) => {
689
694
  if (e.nodeName === "A" && e.href && e.classList.contains("url"))
690
695
  return window.open(e.href, e.target), !0;
691
- }, Ne = T.baseTheme({
696
+ }, ze = T.baseTheme({
692
697
  ".lk-mk, .link > .lk-url": { display: "none" },
693
698
  "&.cm-focused .link.sw .lk-mk, &.cm-focused .link.sw .lk-url": { display: "inherit" }
694
- }), W = () => [
695
- q(Ze, {}, { eventHandlers: { mousedown: ze } }),
696
- Ne
699
+ }), Re = () => [
700
+ q(De, {}, { eventHandlers: { mousedown: Ze } }),
701
+ ze
697
702
  ];
698
- class _e extends x {
703
+ class Ne extends x {
699
704
  constructor(t, s = null, o = "[image]") {
700
705
  super(), this.img = t, this.url = s, this.alt = o;
701
706
  }
@@ -714,15 +719,15 @@ class _e extends x {
714
719
  return !1;
715
720
  }
716
721
  }
717
- function Oe(e, t) {
722
+ function Pe(e, t) {
718
723
  const s = ["FencedCode", "Image"], o = [];
719
724
  return y(e, {
720
725
  enter: ({ type: { name: a }, from: c, to: r, node: n }) => {
721
726
  if (a === "Image" && !M(e, c, r)) {
722
- const { from: i, to: d } = n.getChild("URL"), u = e.state.sliceDoc(i, d), { text: g } = X(e, c, r);
727
+ const { from: i, to: d } = n.getChild("URL"), u = e.state.sliceDoc(i, d), { text: g } = N(e, c, r);
723
728
  o.push(
724
729
  l.replace({
725
- widget: new _e(u, Ve(e, n), g)
730
+ widget: new Ne(u, _e(e, n), g)
726
731
  }).range(c, r)
727
732
  );
728
733
  }
@@ -730,25 +735,25 @@ function Oe(e, t) {
730
735
  }
731
736
  }), l.set(o, !1);
732
737
  }
733
- const Ve = (e, t) => {
738
+ const _e = (e, t) => {
734
739
  const o = t.parent.getChild("URL");
735
740
  if (o !== null) {
736
741
  const { from: a, to: c } = o;
737
742
  return e.state.sliceDoc(a, c);
738
743
  }
739
744
  return null;
740
- }, Fe = (e, t) => e.ctrlKey ? Ue(
745
+ }, Oe = (e, t) => e.ctrlKey ? We(
741
746
  e.target
742
747
  /* as HTMLElement */
743
- ) : !1, Ue = (e) => {
748
+ ) : !1, We = (e) => {
744
749
  const t = e.parentElement ?? !1;
745
750
  if (e.nodeName === "IMG" && t && t.nodeName === "A" && t.classList.contains("url"))
746
751
  return !0;
747
- }, Xe = T.baseTheme({}), j = () => [
748
- q(Oe, {}, { eventHandlers: { mousedown: Fe } }),
749
- Xe
752
+ }, Ve = T.baseTheme({}), Fe = () => [
753
+ q(Pe, {}, { eventHandlers: { mousedown: Oe } }),
754
+ Ve
750
755
  ];
751
- class Z extends x {
756
+ class z extends x {
752
757
  constructor(t, s = !1) {
753
758
  super(), this.content = t, this.tag = s;
754
759
  }
@@ -767,20 +772,20 @@ class Z extends x {
767
772
  return t.content === this.content;
768
773
  }
769
774
  }
770
- const G = ie.define(), We = ae.define({
775
+ const P = G.define(), Ue = K.define({
771
776
  create(e) {
772
777
  return l.none;
773
778
  },
774
779
  update(e, t) {
775
780
  e = e.map(t.changes);
776
781
  for (let s of t.effects)
777
- if (s.is(G))
782
+ if (s.is(P))
778
783
  return s.value;
779
784
  return e;
780
785
  },
781
- provide: (e) => z.decorations.from(e)
786
+ provide: (e) => R.decorations.from(e)
782
787
  });
783
- function je(e) {
788
+ function Xe(e) {
784
789
  const t = [
785
790
  /<br>/,
786
791
  /<img .*\/>/
@@ -788,7 +793,7 @@ function je(e) {
788
793
  HTMLBlock: (a, c) => {
789
794
  const r = e.state.doc.sliceString(a, c);
790
795
  return [l.replace({
791
- widget: new Z(r),
796
+ widget: new z(r),
792
797
  inclusive: !1
793
798
  }).range(a, c)];
794
799
  },
@@ -796,7 +801,7 @@ function je(e) {
796
801
  const r = e.state.doc.sliceString(a, c);
797
802
  return console.log(r), t.some((n) => n.test(r)) ? (console.log(r), [
798
803
  l.replace({
799
- widget: new Z(r, !0),
804
+ widget: new z(r, !0),
800
805
  inclusive: !1
801
806
  }).range(a, c)
802
807
  ]) : [];
@@ -808,7 +813,7 @@ function je(e) {
808
813
  }
809
814
  }), l.set(o);
810
815
  }
811
- const Ge = T.baseTheme({
816
+ const je = T.baseTheme({
812
817
  "& .cm-html-widget": {
813
818
  all: "unset"
814
819
  // outline: "red solid 2px",
@@ -820,16 +825,16 @@ const Ge = T.baseTheme({
820
825
  marginTop: "0"
821
826
  },
822
827
  "& .cm-widgetBuffer": { display: "none" }
823
- }), Ke = z.updateListener.of((e) => {
828
+ }), Ge = R.updateListener.of((e) => {
824
829
  if (e.selectionSet || e.docChanged || e.focusChanged || e.geometryChanged) {
825
- const t = je(e.view);
826
- e.view.dispatch({ effects: G.of(t) });
830
+ const t = Xe(e.view);
831
+ e.view.dispatch({ effects: P.of(t) });
827
832
  }
828
- }), K = () => [
829
- We,
830
- Ke,
831
- Ge
832
- ], Ye = (e) => {
833
+ }), Ke = () => [
834
+ Ue,
835
+ Ge,
836
+ je
837
+ ], ct = (e) => {
833
838
  const {
834
839
  markdown: {
835
840
  defaultCodeLanguage: t,
@@ -843,38 +848,37 @@ const Ge = T.baseTheme({
843
848
  // theme
844
849
  } = e ?? {}, i = {
845
850
  defaultCodeLanguage: t,
846
- codeLanguages: s || ee,
851
+ codeLanguages: s || W,
847
852
  addKeymap: o,
848
853
  base: a,
849
854
  completeHTMLTags: c,
850
855
  htmlTagLanguage: r,
851
- extensions: [...n, ne, le, U]
856
+ extensions: [...n, F, J, Ae]
852
857
  };
853
858
  return [
854
- te(i),
855
- R(),
856
- N(),
857
- _(),
858
- O(),
859
- V(),
860
- W(),
861
- F(),
862
- j(),
863
- K()
859
+ V(i),
860
+ ne(),
861
+ ie(),
862
+ ge(),
863
+ ke(),
864
+ Te(),
865
+ Re(),
866
+ Ee(),
867
+ Fe(),
868
+ Ke()
864
869
  // (theme) ? themeVariant.of(catppuccin(theme)) : [],
865
870
  ];
866
871
  };
867
- typeof window < "u" && (window.gnosis = Ye, window.HrPlugin = R, window.InlinePlugin = N, window.ListPlugin = _, window.CodePlugin = O, window.HeadingPlugin = V, window.LinkPlugin = W, window.QuotePlugin = F, window.QuoteType = U, window.ImagePlugin = j, window.HtmlPlugin = K);
868
872
  export {
869
- O as CodePlugin,
870
- V as HeadingPlugin,
871
- R as HrPlugin,
872
- K as HtmlPlugin,
873
- j as ImagePlugin,
874
- N as InlinePlugin,
875
- W as LinkPlugin,
876
- _ as ListPlugin,
877
- F as QuotePlugin,
878
- U as QuoteType,
879
- Ye as gnosis
873
+ ke as CodePlugin,
874
+ Te as HeadingPlugin,
875
+ ne as HrPlugin,
876
+ Ke as HtmlPlugin,
877
+ Fe as ImagePlugin,
878
+ ie as InlinePlugin,
879
+ Re as LinkPlugin,
880
+ ge as ListPlugin,
881
+ Ee as QuotePlugin,
882
+ Ae as QuoteType,
883
+ ct as gnosis
880
884
  };
@@ -1,10 +1,10 @@
1
- (function(h,L){typeof exports=="object"&&typeof module<"u"?L(exports,require("@codemirror/language-data"),require("@codemirror/lang-markdown"),require("@lezer/markdown"),require("@lezer/highlight"),require("@codemirror/view"),require("@codemirror/language"),require("codemirror"),require("@codemirror/state")):typeof define=="function"&&define.amd?define(["exports","@codemirror/language-data","@codemirror/lang-markdown","@lezer/markdown","@lezer/highlight","@codemirror/view","@codemirror/language","codemirror","@codemirror/state"],L):(h=typeof globalThis<"u"?globalThis:h||self,L(h.gnosis={},h.languageData,h.langMarkdown,h.markdown,h.highlight,h.view,h.language,h.codemirror,h.state))})(this,function(h,L,H,te,S,l,B,q,F){"use strict";var Re=Object.defineProperty;var Ne=(h,L,H)=>L in h?Re(h,L,{enumerable:!0,configurable:!0,writable:!0,value:H}):h[L]=H;var E=(h,L,H)=>Ne(h,typeof L!="symbol"?L+"":L,H);const p=S.Tag.define("none"),ne={props:[S.styleTags({"Blockquote/...":p,HorizontalRule:p,"ATXHeading1/... SetextHeading1/...":p,"ATXHeading2/... SetextHeading2/...":p,"ATXHeading3/...":p,"ATXHeading4/...":p,"ATXHeading5/...":p,"ATXHeading6/...":p,"Comment CommentBlock":p,Escape:p,Entity:p,"Emphasis/...":p,"StrongEmphasis/...":p,"Strikethrough/...":p,"TableHeader/...":p,"Link/... Image/...":p,"OrderedList/... BulletList/...":p,"BlockQuote/...":p,"InlineCode CodeText":p,"URL Autolink":p,"HeaderMark HardBreak QuoteMark ListMark LinkMark EmphasisMark CodeMark StrikethroughMark":p,"CodeInfo LinkLabel TaskMarker TableDelimiter":p,LinkTitle:p,Paragraph:p,"QuoteType/.. QuoteTypeMark QuoteTypeText":p})]},M=(e,n,r={})=>{const s=class{constructor(c){E(this,"decorations");E(this,"conf");this.conf=n,this.decorations=e(c,this.conf)}update(c){(c.docChanged||c.viewportChanged||c.selectionSet)&&(this.decorations=e(c.view,this.conf))}};return l.ViewPlugin.fromClass(s,{decorations:a=>a.decorations,...r})},D=(e,n,r)=>{const s=e.state.selection.ranges;for(let a of s)if(a.from>=n&&a.from<=r||a.to>=n&&a.to<=r||a.from<=n&&a.to>=r)return!0;return!1},x=(e,n)=>{for(const{from:r,to:s}of e.visibleRanges)B.syntaxTree(e.state).iterate({...n,from:r,to:s})};function oe(e,n){const r=["Document"],s={},a={HorizontalRule:(o,t,i=!0)=>[l.Decoration.line({class:"hr "+(i?"sw":"")}).range(o),l.Decoration.mark({class:"mk"}).range(o,t)]},c=[];return x(e,{enter:({type:o,from:t,to:i})=>(o.name in a&&c.push(...a[o.name](t,i,D(e,t,i))),r.includes(o.name)||o.name in s)}),l.Decoration.set(c,!1)}const re=()=>q.EditorView.baseTheme({"& .hr":{position:"relative"},"& .hr > .mk":{fontSize:"0"},"& .hr.sw > .mk":{fontSize:"inherit"},"&light .hr::before ":{backgroundColor:"var(--cm-hr, black)"},"&dark .hr::before ":{backgroundColor:"var(--cm-hr, white)"},"&.cm-focused .hr.sw::before":{width:"0",height:"0"},"& .hr::before":{content:'""',position:"absolute",width:"calc(100% - 12px)",height:".2ch"}}),P=()=>[M(oe,{}),re()];function se(e,n){const r=["FencedCode"],s={StrongEmphasis:(o=!0,t,i)=>l.Decoration.mark({class:"il st "+(o?"sw":"")}).range(t,i),Strikethrough:(o=!0,t,i)=>l.Decoration.mark({class:"il sk "+(o?"sw":"")}).range(t,i),InlineCode:(o=!0,t,i)=>l.Decoration.mark({class:"il ic "+(o?"sw":"")}).range(t,i),Emphasis:(o=!0,t,i)=>l.Decoration.mark({class:"il it "+(o?"sw":"")}).range(t,i),Mark:(o,t)=>l.Decoration.mark({class:"mkl"}).range(o,t)},a=["EmphasisMark","CodeMark","StrikethroughMark"],c=[];return x(e,{enter:({type:{name:o},from:t,to:i})=>a.includes(o)?(c.push(s.Mark(t,i)),!1):(o in s&&c.push(s[o](D(e,t,i),t,i)),!r.includes(o))}),l.Decoration.set(c,!1)}const ie=q.EditorView.baseTheme({".it ":{fontStyle:"italic"},".st ":{fontWeight:"bold"},".sk ":{textDecoration:"line-through"},".ic ":{fontFamily:"monospace",paddingInline:".6ch",borderRadius:".6ch"}}),ae=q.EditorView.baseTheme({".il .mkl":{fontSize:"0"},"&.cm-focused .il.sw > .mkl":{fontSize:"inherit"}}),A=()=>[M(se,{}),ie,ae];class ce extends l.WidgetType{constructor(r){super();E(this,"checked",!1);this.checked=r}toDOM(){let r=document.createElement("span");r.setAttribute("aria-hidden","true"),r.className="TaskMark";let s=r.appendChild(document.createElement("input"));return s.type="checkbox",s.checked=this.checked,r}ignoreEvent(){return!1}}function le(e,n){const r=["Document","ListItem","Task","Blockquote"],s={BulletList:{class:"bl",offset:2},OrderedList:{class:"ol",offset:3}},a={ListMark:(i,d,u,g=!0)=>l.Decoration.mark({class:`${u.class} lm ${g?"sw":""}`}).range(i,d),TaskMarker:(i,d,u,g=!0)=>{const C=e.state.doc.sliceString(i+1,d-1)==="x";return g?l.Decoration.mark({class:`tm ${C?"ck":""}`}).range(i,d):l.Decoration.replace({widget:new ce(C)}).range(i,d)}},c={ListItem:(i,d,u,g)=>{const C=u.offset+(g?4:0),f=i+C,m=`calc(100% - ${Math.max(0,C)+4}ch)`;return f>=d?[]:[l.Decoration.mark({class:"ls-text-line",attributes:{style:`width: ${m}`}}).range(f,d)]}},o=[],t=[];return x(e,{enter:({name:i,from:d,to:u,node:g})=>i in s?(t.push({name:i,from:d,to:u}),!0):(i in a&&o.push(a[i](d,u,s[t.slice(-1)[0].name],D(e,d,u))),i in c&&o.push(...c[i](d,u,s[t.slice(-1)[0].name],g.getChild("Task")!==null)),r.includes(i)),leave:({name:i,from:d,to:u})=>{const g=t.slice(-1)[0];g&&g.name===i&&g.from===d&&g.to===u&&t.pop()}}),l.Decoration.set(o,!0)}const de=(e,n)=>{var s;let r=e.target;if(r.nodeName==="INPUT"&&((s=r.parentElement)!=null&&s.classList.contains("TaskMark")))return ue(n,n.posAtDOM(r))},ue=(e,n)=>{const r=n-2,s=n-1;let a=e.state.doc.sliceString(Math.max(0,r),s),c;if(a==="x")c={from:r,to:s,insert:" "};else if(a===" ")c={from:r,to:s,insert:"x"};else return!1;return e.dispatch({changes:c}),!0},ge=()=>q.EditorView.baseTheme({"& .lm.bl":{position:"relative",paddingInlineStart:"1ch",color:"transparent"},"& .lm.bl::before":{content:'""',display:"inline",position:"absolute",borderRadius:"50%",top:"50%",left:".5ch",transform:"translate(0, -50%)",height:".4em",width:".4em"},"&light .lm.bl::before":{backgroundColor:"var(--cm-list-bullet, light-dark(black, white))"},"&dark .lm.bl::before":{backgroundColor:"var(--cm-list-bullet, light-dark(black, white))"},"&.cm-focused .lm.bl.sw, &.cm-focused .lm.bl.sw::before":{backgroundColor:"transparent",color:"inherit"},"& .ls-text-line":{display:"inline-block",ariaHidden:"true"},"& .cm-line .lm, & .cm-line .TaskMark, & .cm-line .tm, & .cm-line .ls-text-line":{verticalAlign:"top"}}),Q=()=>[M(le,{},{eventHandlers:{mousedown:de}}),ge()],he=(e,n)=>{var s;let r=e.target;if(r.nodeName==="BUTTON"&&((s=r.parentElement)!=null&&s.classList.contains("wg-codeblock"))){const a=["FencedCode","CodeBlock"];let c="";const o={enter:({type:{name:t},from:i,to:d,node:u})=>(a.includes(t)&&(c=me(n,u.toTree(),i,d)),!a.includes(t))};return B.syntaxTree(n.state).iterate({...o,from:n.posAtDOM(r),to:n.posAtDOM(r)+2}),navigator.clipboard.writeText(c),!0}},me=(e,n,r,s)=>{const a=["CodeMark","CodeInfo"];let c=e.state.doc.sliceString(r,s),o=new Set;n.iterate({enter({type:{name:u},from:g,node:C}){a.includes(u)&&o.add(e.state.doc.lineAt(g+r).number)}});const t=e.state.doc.lineAt(r),i=r-t.from,d=[];return c.split(`
1
+ (function(h,w){typeof exports=="object"&&typeof module<"u"?w(exports,require("@codemirror/language-data"),require("@codemirror/lang-markdown"),require("@lezer/markdown"),require("@lezer/highlight"),require("@codemirror/view"),require("@codemirror/language"),require("codemirror"),require("@codemirror/state")):typeof define=="function"&&define.amd?define(["exports","@codemirror/language-data","@codemirror/lang-markdown","@lezer/markdown","@lezer/highlight","@codemirror/view","@codemirror/language","codemirror","@codemirror/state"],w):(h=typeof globalThis<"u"?globalThis:h||self,w(h.gnosis={},h.languageData,h.langMarkdown,h.markdown,h.highlight,h.view,h.language,h.CodeMirror,h.state))})(this,function(h,w,H,ee,S,l,I,q,P){"use strict";var Re=Object.defineProperty;var We=(h,w,H)=>w in h?Re(h,w,{enumerable:!0,configurable:!0,writable:!0,value:H}):h[w]=H;var E=(h,w,H)=>We(h,typeof w!="symbol"?w+"":w,H);const p=S.Tag.define("none"),te={props:[S.styleTags({"Blockquote/...":p,HorizontalRule:p,"ATXHeading1/... SetextHeading1/...":p,"ATXHeading2/... SetextHeading2/...":p,"ATXHeading3/...":p,"ATXHeading4/...":p,"ATXHeading5/...":p,"ATXHeading6/...":p,"Comment CommentBlock":p,Escape:p,Entity:p,"Emphasis/...":p,"StrongEmphasis/...":p,"Strikethrough/...":p,"TableHeader/...":p,"Link/... Image/...":p,"OrderedList/... BulletList/...":p,"BlockQuote/...":p,"InlineCode CodeText":p,"URL Autolink":p,"HeaderMark HardBreak QuoteMark ListMark LinkMark EmphasisMark CodeMark StrikethroughMark":p,"CodeInfo LinkLabel TaskMarker TableDelimiter":p,LinkTitle:p,Paragraph:p,"QuoteType/.. QuoteTypeMark QuoteTypeText":p})]},M=(e,n,r={})=>{const s=class{constructor(c){E(this,"decorations");E(this,"conf");this.conf=n,this.decorations=e(c,this.conf)}update(c){(c.docChanged||c.viewportChanged||c.selectionSet)&&(this.decorations=e(c.view,this.conf))}};return l.ViewPlugin.fromClass(s,{decorations:a=>a.decorations,...r})},D=(e,n,r)=>{const s=e.state.selection.ranges;for(let a of s)if(a.from>=n&&a.from<=r||a.to>=n&&a.to<=r||a.from<=n&&a.to>=r)return!0;return!1},x=(e,n)=>{for(const{from:r,to:s}of e.visibleRanges)I.syntaxTree(e.state).iterate({...n,from:r,to:s})};function ne(e,n){const r=["Document"],s={},a={HorizontalRule:(o,t,i=!0)=>[l.Decoration.line({class:"hr "+(i?"sw":"")}).range(o),l.Decoration.mark({class:"mk"}).range(o,t)]},c=[];return x(e,{enter:({type:o,from:t,to:i})=>(o.name in a&&c.push(...a[o.name](t,i,D(e,t,i))),r.includes(o.name)||o.name in s)}),l.Decoration.set(c,!1)}const oe=()=>q.EditorView.baseTheme({"& .hr":{position:"relative"},"& .hr > .mk":{fontSize:"0"},"& .hr.sw > .mk":{fontSize:"inherit"},"&light .hr::before ":{backgroundColor:"var(--cm-hr, black)"},"&dark .hr::before ":{backgroundColor:"var(--cm-hr, white)"},"&.cm-focused .hr.sw::before":{width:"0",height:"0"},"& .hr::before":{content:'""',position:"absolute",width:"calc(100% - 12px)",height:".2ch"}}),Q=()=>[M(ne,{}),oe()];function re(e,n){const r=["FencedCode"],s={StrongEmphasis:(o=!0,t,i)=>l.Decoration.mark({class:"il st "+(o?"sw":"")}).range(t,i),Strikethrough:(o=!0,t,i)=>l.Decoration.mark({class:"il sk "+(o?"sw":"")}).range(t,i),InlineCode:(o=!0,t,i)=>l.Decoration.mark({class:"il ic "+(o?"sw":"")}).range(t,i),Emphasis:(o=!0,t,i)=>l.Decoration.mark({class:"il it "+(o?"sw":"")}).range(t,i),Mark:(o,t)=>l.Decoration.mark({class:"mkl"}).range(o,t)},a=["EmphasisMark","CodeMark","StrikethroughMark"],c=[];return x(e,{enter:({type:{name:o},from:t,to:i})=>a.includes(o)?(c.push(s.Mark(t,i)),!1):(o in s&&c.push(s[o](D(e,t,i),t,i)),!r.includes(o))}),l.Decoration.set(c,!1)}const se=q.EditorView.baseTheme({"& .it ":{fontStyle:"italic"},"& .st ":{fontWeight:"bold"},"& .sk ":{textDecoration:"line-through"},"& .ic ":{fontFamily:"monospace",paddingInline:".6ch",borderRadius:".6ch",backgroundColor:"var(--cm-ic-background, hsl(from black h s l / .2))"}}),ie=q.EditorView.baseTheme({".il .mkl":{fontSize:"0"},"&.cm-focused .il.sw > .mkl":{fontSize:"inherit"}}),Z=()=>[M(re,{}),se,ie];class ae extends l.WidgetType{constructor(r){super();E(this,"checked",!1);this.checked=r}toDOM(){let r=document.createElement("span");r.setAttribute("aria-hidden","true"),r.className="TaskMark";let s=r.appendChild(document.createElement("input"));return s.type="checkbox",s.checked=this.checked,r}ignoreEvent(){return!1}}function ce(e,n){const r=["Document","ListItem","Task","Blockquote"],s={BulletList:{class:"bl",offset:2},OrderedList:{class:"ol",offset:3}},a={ListMark:(i,d,u,g=!0)=>l.Decoration.mark({class:`${u.class} lm ${g?"sw":""}`}).range(i,d),TaskMarker:(i,d,u,g=!0)=>{const C=e.state.doc.sliceString(i+1,d-1)==="x";return g?l.Decoration.mark({class:`tm ${C?"ck":""}`}).range(i,d):l.Decoration.replace({widget:new ae(C)}).range(i,d)}},c={ListItem:(i,d,u,g)=>{const C=u.offset+(g?4:0),f=i+C,m=`calc(100% - ${Math.max(0,C)+4}ch)`;return f>=d?[]:[l.Decoration.mark({class:"ls-text-line",attributes:{style:`width: ${m}`}}).range(f,d)]}},o=[],t=[];return x(e,{enter:({name:i,from:d,to:u,node:g})=>i in s?(t.push({name:i,from:d,to:u}),!0):(i in a&&o.push(a[i](d,u,s[t.slice(-1)[0].name],D(e,d,u))),i in c&&o.push(...c[i](d,u,s[t.slice(-1)[0].name],g.getChild("Task")!==null)),r.includes(i)),leave:({name:i,from:d,to:u})=>{const g=t.slice(-1)[0];g&&g.name===i&&g.from===d&&g.to===u&&t.pop()}}),l.Decoration.set(o,!0)}const le=(e,n)=>{var s;let r=e.target;if(r.nodeName==="INPUT"&&((s=r.parentElement)!=null&&s.classList.contains("TaskMark")))return de(n,n.posAtDOM(r))},de=(e,n)=>{const r=n-2,s=n-1;let a=e.state.doc.sliceString(Math.max(0,r),s),c;if(a==="x")c={from:r,to:s,insert:" "};else if(a===" ")c={from:r,to:s,insert:"x"};else return!1;return e.dispatch({changes:c}),!0},ue=()=>q.EditorView.baseTheme({"& .lm.bl":{position:"relative",paddingInlineStart:"1ch",color:"transparent"},"& .lm.bl::before":{content:'""',display:"inline",position:"absolute",borderRadius:"50%",top:"50%",left:".5ch",transform:"translate(0, -50%)",height:".4em",width:".4em"},"&light .lm.bl::before":{backgroundColor:"var(--cm-list-bullet, light-dark(black, white))"},"&dark .lm.bl::before":{backgroundColor:"var(--cm-list-bullet, light-dark(black, white))"},"&.cm-focused .lm.bl.sw, &.cm-focused .lm.bl.sw::before":{backgroundColor:"transparent",color:"inherit"},"& .ls-text-line":{display:"inline-block",ariaHidden:"true"},"& .cm-line .lm, & .cm-line .TaskMark, & .cm-line .tm, & .cm-line .ls-text-line":{verticalAlign:"top"}}),V=()=>[M(ce,{},{eventHandlers:{mousedown:le}}),ue()],ge=(e,n)=>{var s;let r=e.target;if(r.nodeName==="BUTTON"&&((s=r.parentElement)!=null&&s.classList.contains("wg-codeblock"))){const a=["FencedCode","CodeBlock"];let c="";const o={enter:({type:{name:t},from:i,to:d,node:u})=>(a.includes(t)&&(c=he(n,u.toTree(),i,d)),!a.includes(t))};return I.syntaxTree(n.state).iterate({...o,from:n.posAtDOM(r),to:n.posAtDOM(r)+2}),navigator.clipboard.writeText(c),!0}},he=(e,n,r,s)=>{const a=["CodeMark","CodeInfo"];let c=e.state.doc.sliceString(r,s),o=new Set;n.iterate({enter({type:{name:u},from:g,node:C}){a.includes(u)&&o.add(e.state.doc.lineAt(g+r).number)}});const t=e.state.doc.lineAt(r),i=r-t.from,d=[];return c.split(`
2
2
  `).forEach((u,g)=>{o.has(g+t.number)||d.push(u.slice(i))}),d.join(`
3
- `)};class U extends l.WidgetType{constructor(r,s,a){super();E(this,"classes","");this.classes=r,this.width=s,this.marginLeft=a}toDOM(){let r=document.createElement("span");return r.setAttribute("aria-hidden","true"),r.className=this.classes+" vacio",r.textContent=" ",r.style.width=this.width,r.style.marginLeft=this.marginLeft,r}ignoreEvent(){return!1}}const pe=e=>`<svg class="cb-icon" viewBox="0 0 18 18" fill="none" xmlns="http://www.w3.org/2000/svg">
3
+ `)};class $ extends l.WidgetType{constructor(r,s,a){super();E(this,"classes","");this.classes=r,this.width=s,this.marginLeft=a}toDOM(){let r=document.createElement("span");return r.setAttribute("aria-hidden","true"),r.className=this.classes+" vacio",r.textContent=" ",r.style.width=this.width,r.style.marginLeft=this.marginLeft,r}ignoreEvent(){return!1}}const me=e=>`<svg class="cb-icon" viewBox="0 0 18 18" fill="none" xmlns="http://www.w3.org/2000/svg">
4
4
  <path class="cb-icon-path cb.i1" fill-rule="evenodd" clip-rule="evenodd" d="M15 0C15.5304 0 16.0391 0.210714 16.4142 0.585786C16.7893 0.960859 17 1.46957 17 2V12C17 12.5304 16.7893 13.0391 16.4142 13.4142C16.0391 13.7893 15.5304 14 15 14H14V6C14 4.93913 13.5786 3.92172 12.8284 3.17157C12.0783 2.42143 11.0609 2 10 2H7C6.64895 1.99924 6.30395 2.09135 6 2.267V2C6 1.46957 6.21071 0.960859 6.58579 0.585786C6.96086 0.210714 7.46957 0 8 0H15Z"/>
5
5
  <path class="cb-icon-path cb.i1" fill-rule="evenodd" clip-rule="evenodd" d="M5 4.054V8H1.2C1.27464 7.84448 1.3691 7.69928 1.481 7.568L3.941 4.698C4.2169 4.37661 4.58771 4.15111 5 4.054ZM7 4V8C7 8.53043 6.78929 9.03914 6.41421 9.41421C6.03914 9.78929 5.53043 10 5 10H1V16C1 16.5304 1.21071 17.0391 1.58579 17.4142C1.96086 17.7893 2.46957 18 3 18H10C10.5304 18 11.0391 17.7893 11.4142 17.4142C11.7893 17.0391 12 16.5304 12 16V6C12 5.46957 11.7893 4.96086 11.4142 4.58579C11.0391 4.21071 10.5304 4 10 4H7Z"/>
6
- </svg>`;class fe extends l.WidgetType{constructor(n,r){super(),this.type=n,this.code=r}toDOM(){let n=document.createElement("span");n.setAttribute("aria-hidden","true"),n.className="wg-codeblock";let r=document.createElement("button");return r.className="wg-codeblock-btn",r.innerHTML=pe(),n.appendChild(r),n}ignoreEvent(){return!1}}const I=[];function X(e,n){const{mode:r}=n,s=["Document","Blockquote","ListItem","BulletList","OrderedList"],a={FencedCode:j,CodeBlock:j},c={CodeMark:(t,i,d)=>[l.Decoration.mark({class:"cb-mk"}).range(i,d)],CodeInfo:(t,i,d)=>[l.Decoration.mark({class:"cb-mi"}).range(i,d)]},o=[];return x(e,{enter:({type:{name:t},from:i,to:d})=>(r==="type"&&t in a&&o.push(...a[t](e,i,d)),r==="mark"&&t in c&&o.push(...c[t](e,i,d)),s.includes(t)||t in a?(I.push({name:t,from:i,to:d}),!0):!1),Leave:({type:{name:t},from:i,to:d})=>s.includes(t)||t in a?(I.pop(),!0):!1}),{type:l.Decoration.set(o,!0),mark:l.Decoration.set(o,!0)}[r]}const j=(e,n,r)=>{const s=[],a=I[I.length-1],c=["BulletList","OrderedList","ListItem"].some(f=>f===a.name),o=["Blockquote"].some(f=>f===a.name),t=e.state.doc.lineAt(n),i=n-t.from,d=i>0,u=D(e,t.from,r);u||s.push(l.Decoration.widget({widget:new fe("view.state.sliceDoc(from, to)","code"),side:0}).range(n+1));const g=t.number,C=e.state.doc.sliceString(n,r).split(`
7
- `).length;for(let f=g;f<C+g;f++){const{from:m,to:b}=e.state.doc.line(f),y="100% - 1.2ch",w=["cb-content"];u&&w.push("sw"),f===g&&w.push("cb-start"),f===C+g-1&&w.push("cb-end");const k=Math.max(m+i,0);if(b<k)w.push("free"),s.push(l.Decoration.widget({widget:new U(w.join(" "),`calc(${y} - ${k-m}ch)`,`calc(${k-b}ch + 2px)`),side:1}).range(b)),console.log("Hello World");else if(k===b)w.push("wg"),s.push(l.Decoration.widget({widget:new U(w.join(" "),`calc(${y} - ${k-m}ch)`),side:1}).range(k));else if(c||o||d){const T={style:`width: calc(${y} - ${k-m}ch)`};b>k&&s.push(l.Decoration.mark({class:w.join(" "),attributes:T}).range(k,b)),m!==k&&c&&s.push(l.Decoration.mark({class:"cb-listsp"}).range(m,k)),m!==k&&d&&s.push(l.Decoration.mark({class:"cb-spacer"}).range(m,k)),m!==k&&o&&s.push(l.Decoration.mark({class:"cb-quote bq"}).range(m,k))}else if(m!==b){const T={style:`width: calc(${y})`};s.push(l.Decoration.mark({class:w.join(" "),attributes:T}).range(m,b))}s.push(l.Decoration.line({class:"cb-line"}).range(m))}return s},ke=()=>{const s="4px",a="1lh";return q.EditorView.baseTheme({".cb-start":{borderRadius:`${s} ${s} 0 0`},".cb-end ":{borderRadius:`0 0 ${s} ${s}`},".cb-start.cb-end":{borderRadius:`${s}`},".cb-content":{display:"inline-block",marginLeft:"2px",paddingLeft:"6px",paddingRigth:"0px",position:"relative"},".cb-content.wg":{cursor:"text"},".cb-content.wg.start":{maxWidth:"1px",Width:"1px",paddingLeft:"5px"},".cb-content.wg.end":{marginLeft:"0",paddingLeft:"0"},".cb-mi, .cb-mk":{color:"transparent"},"&.cm-focused .cb-content.sw > .cb-mi, &.cm-focused .cb-content.sw > .cb-mk":{color:"inherit"},"&.cm-focused .cb-content.sw .wg-codeblock":{display:"none",opacity:"0"},".wg-codeblock":{display:"inline-block",position:"absolute",top:"0",right:"0",zIndex:"100",margin:".05lh"},".wg-codeblock-btn":{padding:"0",display:"inline-flex",borderRadius:"999999px",background:"transparent",border:"none",outline:"none",justifyContent:"center",alignItems:"center",height:`calc(${a} + 4px )`,width:"5ch"},".cb-icon":{width:a,height:a,pointerEvents:"none",fill:"currentColor",opacity:"0.7"},".wg-codeblock-btn:hover":{background:"rgba(0, 0, 0, 0.07)"},".wg-codeblock-btn:hover .cb-icon":{opacity:"1"},".cb-content.cb-start.cb-end .wg-codeblock":{marginTop:"0",marginBottom:"0",top:"0",bottom:"0"},".cb-content.cb-start.cb-end .wg-codeblock-btn":{boxSizing:"border-box",maxHeight:"100%",width:"5ch"}})},z=()=>[M(X,{mode:"mark"}),M(X,{mode:"type"},{eventHandlers:{mousedown:he}}),ke()];function Ce(e,n){const r=["Document"],s={ATXHeading1:(o,t=!0)=>l.Decoration.line({class:"h1 hg "+(t?"sw":"")}).range(o),ATXHeading2:(o,t=!0)=>l.Decoration.line({class:"h2 hg "+(t?"sw":"")}).range(o),ATXHeading3:(o,t=!0)=>l.Decoration.line({class:"h3 hg "+(t?"sw":"")}).range(o),ATXHeading4:(o,t=!0)=>l.Decoration.line({class:"h4 hg "+(t?"sw":"")}).range(o),ATXHeading5:(o,t=!0)=>l.Decoration.line({class:"h5 hg "+(t?"sw":"")}).range(o),ATXHeading6:(o,t=!0)=>l.Decoration.line({class:"h6 hg "+(t?"sw":"")}).range(o)},a={HeaderMark:(o,t)=>l.Decoration.mark({class:"mk"}).range(o,t)},c=[];return x(e,{enter:({type:o,from:t,to:i})=>(o.name in s&&c.push(s[o.name](t,D(e,t,i))),o.name in a&&c.push(a[o.name](t,i+1)),r.includes(o.name)||o.name in s)}),l.Decoration.set(c,!1)}const be=q.EditorView.baseTheme({".h1 ":{fontSize:"2.6rem"},".h2 ":{fontSize:"2.0rem"},".h3 ":{fontSize:"1.8rem"},".h4 ":{fontSize:"1.6rem"},".h5 ":{fontSize:"1.4rem"},".h6 ":{fontSize:"1.2rem"}}),we=q.EditorView.baseTheme({".hg .mk":{fontSize:"0"},"&.cm-focused .hg.sw .mk":{fontSize:"inherit"}}),Z=()=>[M(Ce,{}),be,we],v={tip:e=>`<svg class="qt-icon qt-tip" width="400" height="400" viewBox="0 0 400 400" fill="none" xmlns="http://www.w3.org/2000/svg">
6
+ </svg>`;class pe extends l.WidgetType{constructor(n,r){super(),this.type=n,this.code=r}toDOM(){let n=document.createElement("span");n.setAttribute("aria-hidden","true"),n.className="wg-codeblock";let r=document.createElement("button");return r.className="wg-codeblock-btn",r.innerHTML=me(),n.appendChild(r),n}ignoreEvent(){return!1}}const B=[];function R(e,n){const{mode:r}=n,s=["Document","Blockquote","ListItem","BulletList","OrderedList"],a={FencedCode:W,CodeBlock:W},c={CodeMark:(t,i,d)=>[l.Decoration.mark({class:"cb-mk"}).range(i,d)],CodeInfo:(t,i,d)=>[l.Decoration.mark({class:"cb-mi"}).range(i,d)]},o=[];return x(e,{enter:({type:{name:t},from:i,to:d})=>(r==="type"&&t in a&&o.push(...a[t](e,i,d)),r==="mark"&&t in c&&o.push(...c[t](e,i,d)),s.includes(t)||t in a?(B.push({name:t,from:i,to:d}),!0):!1),Leave:({type:{name:t},from:i,to:d})=>s.includes(t)||t in a?(B.pop(),!0):!1}),{type:l.Decoration.set(o,!0),mark:l.Decoration.set(o,!0)}[r]}const W=(e,n,r)=>{const s=[],a=B[B.length-1],c=["BulletList","OrderedList","ListItem"].some(f=>f===a.name),o=["Blockquote"].some(f=>f===a.name),t=e.state.doc.lineAt(n),i=n-t.from,d=i>0,u=D(e,t.from,r);u||s.push(l.Decoration.widget({widget:new pe("view.state.sliceDoc(from, to)","code"),side:0}).range(n+1));const g=t.number,C=e.state.doc.sliceString(n,r).split(`
7
+ `).length;for(let f=g;f<C+g;f++){const{from:m,to:b}=e.state.doc.line(f),y="100% - 1.2ch",L=["cb-content"];u&&L.push("sw"),f===g&&L.push("cb-start"),f===C+g-1&&L.push("cb-end");const k=Math.max(m+i,0);if(b<k)L.push("free"),s.push(l.Decoration.widget({widget:new $(L.join(" "),`calc(${y} - ${k-m}ch)`,`calc(${k-b}ch + 2px)`),side:1}).range(b)),console.log("Hello World");else if(k===b)L.push("wg"),s.push(l.Decoration.widget({widget:new $(L.join(" "),`calc(${y} - ${k-m}ch)`),side:1}).range(k));else if(c||o||d){const T={style:`width: calc(${y} - ${k-m}ch)`};b>k&&s.push(l.Decoration.mark({class:L.join(" "),attributes:T}).range(k,b)),m!==k&&c&&s.push(l.Decoration.mark({class:"cb-listsp"}).range(m,k)),m!==k&&d&&s.push(l.Decoration.mark({class:"cb-spacer"}).range(m,k)),m!==k&&o&&s.push(l.Decoration.mark({class:"cb-quote bq"}).range(m,k))}else if(m!==b){const T={style:`width: calc(${y})`};s.push(l.Decoration.mark({class:L.join(" "),attributes:T}).range(m,b))}s.push(l.Decoration.line({class:"cb-line"}).range(m))}return s},fe=()=>{const s="4px",a="1lh";return q.EditorView.baseTheme({".cb-start":{borderRadius:`${s} ${s} 0 0`},".cb-end ":{borderRadius:`0 0 ${s} ${s}`},".cb-start.cb-end":{borderRadius:`${s}`},".cb-content":{display:"inline-block",marginLeft:"2px",paddingLeft:"6px",paddingRigth:"0px",position:"relative"},".cb-content.wg":{cursor:"text"},".cb-content.wg.start":{maxWidth:"1px",Width:"1px",paddingLeft:"5px"},".cb-content.wg.end":{marginLeft:"0",paddingLeft:"0"},".cb-mi, .cb-mk":{color:"transparent"},"&.cm-focused .cb-content.sw > .cb-mi, &.cm-focused .cb-content.sw > .cb-mk":{color:"inherit"},"&.cm-focused .cb-content.sw .wg-codeblock":{display:"none",opacity:"0"},".wg-codeblock":{display:"inline-block",position:"absolute",top:"0",right:"0",zIndex:"100",margin:".05lh"},".wg-codeblock-btn":{padding:"0",display:"inline-flex",borderRadius:"999999px",background:"transparent",border:"none",outline:"none",justifyContent:"center",alignItems:"center",height:`calc(${a} + 4px )`,width:"5ch"},".cb-icon":{width:a,height:a,pointerEvents:"none",fill:"currentColor",opacity:"0.7"},".wg-codeblock-btn:hover":{background:"rgba(0, 0, 0, 0.07)"},".wg-codeblock-btn:hover .cb-icon":{opacity:"1"},".cb-content.cb-start.cb-end .wg-codeblock":{marginTop:"0",marginBottom:"0",top:"0",bottom:"0"},".cb-content.cb-start.cb-end .wg-codeblock-btn":{boxSizing:"border-box",maxHeight:"100%",width:"5ch"},"& .cb-content":{backgroundColor:"var(--cm-ic-background, hsl(from black h s l / .1))"}})},N=()=>[M(R,{mode:"mark"}),M(R,{mode:"type"},{eventHandlers:{mousedown:ge}}),fe()];function ke(e,n){const r=["Document"],s={ATXHeading1:(o,t=!0)=>l.Decoration.line({class:"h1 hg "+(t?"sw":"")}).range(o),ATXHeading2:(o,t=!0)=>l.Decoration.line({class:"h2 hg "+(t?"sw":"")}).range(o),ATXHeading3:(o,t=!0)=>l.Decoration.line({class:"h3 hg "+(t?"sw":"")}).range(o),ATXHeading4:(o,t=!0)=>l.Decoration.line({class:"h4 hg "+(t?"sw":"")}).range(o),ATXHeading5:(o,t=!0)=>l.Decoration.line({class:"h5 hg "+(t?"sw":"")}).range(o),ATXHeading6:(o,t=!0)=>l.Decoration.line({class:"h6 hg "+(t?"sw":"")}).range(o)},a={HeaderMark:(o,t)=>l.Decoration.mark({class:"mk"}).range(o,t)},c=[];return x(e,{enter:({type:o,from:t,to:i})=>(o.name in s&&c.push(s[o.name](t,D(e,t,i))),o.name in a&&c.push(a[o.name](t,i+1)),r.includes(o.name)||o.name in s)}),l.Decoration.set(c,!1)}const Ce=q.EditorView.baseTheme({"& .h1 ":{fontSize:"2.00em",fontWeight:"bolder"},"& .h2 ":{fontSize:"1.55em",fontWeight:"bolder"},"& .h3 ":{fontSize:"1.35em",fontWeight:"bolder"},"& .h4 ":{fontSize:"1.25em",fontWeight:"bolder"},"& .h5 ":{fontSize:"1.25em",fontWeight:"semi-bold"},"& .h6 ":{fontSize:"1.25em",fontWeight:"normal"},"& .hg ":{lineHeight:"1.5lh"}}),be=q.EditorView.baseTheme({"& .hg .mk":{fontSize:"0"},"&.cm-focused .hg.sw .mk":{fontSize:"inherit"}}),O=()=>[M(ke,{}),Ce,be],_={tip:e=>`<svg class="qt-icon qt-tip" width="400" height="400" viewBox="0 0 400 400" fill="none" xmlns="http://www.w3.org/2000/svg">
8
8
  <path fill-rule="evenodd" clip-rule="evenodd" d="M197.813 54.2439C196.932 54.6529 195.79 55.5789 195.274 56.3019L194.336 57.6169L194.219 70.8359L194.102 84.0549L195.076 85.3319C197.802 88.9059 203.271 88.5369 205.364 84.6369C206.151 83.1699 206.872 60.7239 206.215 58.1479C205.842 56.6839 203.21 53.9059 202.196 53.9059C201.901 53.9059 201.155 53.8149 200.537 53.7039C199.864 53.5829 198.772 53.7989 197.813 54.2439ZM116.233 86.0419C113.323 87.6899 112.27 91.6249 113.92 94.6849C115.402 97.4339 131.364 113.194 132.973 113.496C138.573 114.546 142.477 110.343 140.971 104.883C140.465 103.049 125.118 87.2169 122.574 85.9039C120.632 84.9019 118.15 84.9559 116.233 86.0419ZM277.93 85.7559C276.466 86.4829 260.132 103.191 259.49 104.618C257.281 109.529 261.871 114.699 267.084 113.171C268.604 112.726 283.491 98.5359 285.985 95.1559C289.892 89.8619 283.853 82.8139 277.93 85.7559ZM192.578 105.326C174.207 107.647 159.188 115.505 147.608 128.855C123.664 156.459 124.119 191.541 148.828 223.047C160.759 238.26 165.383 249.444 166.996 266.992C167.829 276.054 168.682 277.986 172.825 280.204C174.652 281.182 221.998 281.773 225.389 280.86C229.012 279.884 232.583 275.584 232.967 271.735C233.077 270.63 233.363 267.529 233.603 264.844C234.904 250.229 238.454 241.734 249.573 226.622C261.236 210.772 265.303 202.299 269.01 186.133C271.624 174.731 269.08 156.872 263.028 144.145C251.295 119.471 219.462 101.931 192.578 105.326ZM88.992 165.981C83.602 166.183 82.734 166.309 81.765 167.028C77.932 169.873 77.932 174.66 81.766 177.503C83.099 178.491 104.15 178.988 108.11 178.124C114.214 176.794 115.972 170.208 111.179 166.626C109.976 165.727 101.966 165.494 88.992 165.981ZM289.847 166.481C285.102 168.919 285.171 174.882 289.974 177.45C292.2 178.64 314.187 179.022 317.07 177.921C322.542 175.831 321.886 167.919 316.118 166.457C312.336 165.498 291.723 165.517 289.847 166.481ZM132.14 230.477C129.964 231.352 113.316 248.951 113.059 250.648C112.263 255.894 117.791 260.112 122.389 257.768C124.057 256.918 139.906 240.858 140.656 239.258C143.226 233.779 137.81 228.195 132.14 230.477ZM262.386 230.871C259.487 232.447 258.349 236.857 260.122 239.648C261.348 241.579 276.261 256.486 277.701 257.219C282.933 259.885 288.816 254.457 286.416 249.179C285.559 247.294 271.67 232.693 269.4 231.29C267.429 230.071 264.211 229.879 262.386 230.871ZM174.576 292.561C170.753 293.719 169.922 295.59 169.922 303.033C169.922 310.255 170.618 312.154 173.969 314.076L175.977 315.227L200.113 315.231C223.446 315.234 224.301 315.208 225.774 314.457C229.279 312.669 230.367 309.882 230.446 302.493L230.504 297.04L229.29 295.365C226.903 292.07 228.123 292.201 200.195 292.23C186.66 292.243 175.131 292.392 174.576 292.561ZM180.946 325.217C179.882 325.963 179.759 328.554 180.683 330.774C185.032 341.224 208.831 343.084 217.528 333.654C220.185 330.773 221.108 326.967 219.531 325.391C218.456 324.315 182.465 324.154 180.946 325.217Z"/>
9
9
  </svg>`,note:e=>`<svg class="qt-icon qt-note" width="400" height="400" viewBox="0 0 400 400" fill="none" xmlns="http://www.w3.org/2000/svg">
10
10
  <path fill-rule="evenodd" clip-rule="evenodd" d="M107.227 63.8769C101.558 65.1289 95.375 67.9369 91.406 71.0639C90.01 72.1639 88.215 73.5439 87.417 74.1299C86.62 74.7159 85.96 75.3819 85.952 75.6099C85.944 75.8379 85.612 76.3739 85.214 76.8009C81.982 80.2699 78.079 87.8199 76.776 93.1259L75.781 97.1769V198.907C75.781 262.894 75.922 301.425 76.16 302.76C76.368 303.928 76.623 305.38 76.726 305.987C78.4 315.889 87.879 327.367 98.558 332.423C107.578 336.694 98.739 336.366 201.563 336.242L291.602 336.133L294.27 335.228C309.157 330.183 318.557 320.61 322.536 306.445L323.633 302.539V228.516C323.633 144.681 323.906 151.756 320.402 144.774L318.615 141.211L286.943 109.57C269.523 92.1679 253.932 76.5229 252.297 74.8049C246.111 68.3049 241.836 65.3209 236.902 64.0589C233.006 63.0629 111.686 62.8929 107.227 63.8769ZM233.77 78.3359C236.715 80.5619 300.292 144.132 300.799 145.356C301.574 147.227 300.841 149.245 299.01 150.282L297.461 151.159L274.127 151.165C258.248 151.17 250.198 151.032 248.931 150.734C240.06 148.649 234.561 144.527 231.043 137.327C228.119 131.344 228.085 130.936 228.21 104.035L228.32 80.5309L229.275 79.5149C229.801 78.9559 230.767 78.3419 231.424 78.1519C233.014 77.6899 232.904 77.6809 233.77 78.3359ZM192.354 175.195C194.09 176.288 194.73 177.166 196.549 180.952C197.924 183.813 194.551 189.489 190.695 190.803C187.744 191.808 132.089 191.686 129.883 190.669C122.396 187.22 123.011 176.607 130.837 174.194C131.386 174.024 145.033 173.917 161.164 173.954L190.492 174.023L192.354 175.195ZM269.587 217.641C271.831 218.313 276.709 223.047 275.158 223.047C275.018 223.047 275.115 223.301 275.373 223.611C277.4 226.054 274.593 231.969 270.523 233.832L268.466 234.774L199.37 234.672L130.273 234.57L128.645 233.465C122.49 229.288 123.57 220.238 130.522 217.722C132.38 217.05 267.351 216.971 269.587 217.641ZM247.509 261.237C249.631 262.341 252.9 266.371 252.223 267.048C252.125 267.146 252.179 267.824 252.344 268.555C252.508 269.285 252.542 269.985 252.417 270.109C252.293 270.233 252.148 270.627 252.096 270.984C251.721 273.539 250.106 275.678 247.498 277.074L245.898 277.93L189.258 278.036C138.155 278.132 132.426 278.082 130.664 277.516C122.018 274.742 123.019 262.33 132.031 260.562C132.783 260.414 158.711 260.317 189.648 260.347L245.898 260.4L247.509 261.237Z"/>
@@ -14,5 +14,5 @@
14
14
  <path fill-rule="evenodd" clip-rule="evenodd" d="M195.982 53.527C185.35 55.195 178.527 60.217 172.381 70.898C165.461 82.925 148.022 114.138 122.184 160.742C115.633 172.559 100.427 199.98 88.394 221.68C57.505 277.38 55.934 280.238 54.25 283.76C45.588 301.882 55.075 322.592 74.884 328.805L78.32 329.883L198.438 329.99C278.577 330.062 319.42 329.965 321.154 329.699C337.809 327.15 349.594 312.698 348.718 295.898C348.297 287.827 348.329 287.895 328.438 252.148C310.272 219.501 297.79 196.996 280.665 166.016C235.38 84.092 225.675 66.998 222.278 63.175C216.156 56.285 204.847 52.136 195.982 53.527ZM209.263 116.46C218.176 119.751 220.681 125.503 219.95 141.003C219.711 146.059 219.256 155.732 218.938 162.5C218.62 169.268 218.011 180.43 217.584 187.305C216.759 200.593 216.366 207.385 215.42 224.66C215.058 231.282 214.609 236.196 214.259 237.373C210.281 250.771 189.551 250.542 185.792 237.058C185.226 235.025 184.802 229.702 183.979 214.258C183.761 210.176 183.323 202.881 183.006 198.047C182.213 185.991 181.756 178.028 181.054 164.063C180.724 157.51 180.287 149.424 180.081 146.094C178.833 125.858 181.444 119.151 191.797 115.99C194.231 115.247 206.901 115.588 209.263 116.46ZM205.893 260.709C224.265 266.28 227.749 290.936 211.55 300.733C192.458 312.28 170.521 292.287 180.334 272.284C184.884 263.009 196.351 257.816 205.893 260.709Z"/>
15
15
  </svg>`,caution:e=>`<svg class="qt-icon qt-caution" width="400" height="400" viewBox="0 0 400 400" fill="none" xmlns="http://www.w3.org/2000/svg">
16
16
  <path fill-rule="evenodd" clip-rule="evenodd" d="M196.094 54.176C191.229 54.988 188.782 56.222 167.834 68.423C158.562 73.823 147.197 80.435 142.578 83.117C137.959 85.799 129.961 90.458 124.805 93.47C119.648 96.482 111.211 101.406 106.055 104.413C84.503 116.982 82.78 118.066 79.627 121.029C76.043 124.397 73.548 127.986 71.861 132.199C69.426 138.28 69.543 135.024 69.435 199.872L69.336 259.18L70.21 263.086C72.901 275.106 75.333 277.456 99.826 291.697C130.626 309.606 166.896 330.685 175.781 335.841C190.902 344.615 195.154 346.196 201.915 345.563C208.158 344.978 210.107 344.123 225.391 335.264C255.218 317.977 294.844 294.867 311.417 285.093C322.591 278.504 327.153 273.047 329.413 263.569L330.273 259.961V199.609V139.258L329.396 135.938C327.721 129.594 324.327 124.148 319.504 120.066C316.509 117.531 317.424 118.075 248.047 77.651C205.151 52.657 205.162 52.662 196.094 54.176ZM206.746 110.34C212.104 111.475 216.464 114.838 218.945 119.75C220.313 122.457 220.428 126.187 219.575 140.039C219.323 144.121 218.592 157.129 217.95 168.945C214.743 227.944 214.663 228.952 212.917 232.683C208.369 242.403 195.202 244.021 188.814 235.646C185.935 231.872 185.59 229.751 184.375 208.398C183.935 200.664 182.688 180.01 181.605 162.5C178.965 119.84 178.966 119.825 183.963 114.828C188.541 110.25 197.755 108.434 206.746 110.34ZM205.105 254.139C220.433 258.641 225.321 277.899 213.857 288.623C198.306 303.17 174.003 287.211 181.04 267.073C184.452 257.309 195.564 251.336 205.105 254.139Z"/>
17
- </svg>`,none:()=>""};class Le extends l.WidgetType{constructor(n){super(),this.type=n}toDOM(){let n=document.createElement("span");return n.setAttribute("aria-hidden","true"),n.className="wg-qt-icon",n.innerHTML=this.type in v?v[this.type]():"",n}ignoreEvent(){return!1}eq(n){return this.type===n.type}}function Te(e,n){const r=["Document","ListItem","BulletList","OrderedList"],s={none:"bq-none-mark",note:"bq-note-mark",tip:"bq-tip-mark",warning:"bq-warning-mark",important:"bq-important-mark",caution:"bq-caution-mark"},a={QuoteMark:(t,i,d)=>{const u=["qt-mk"];return d in s?u.push(s[d]):u.push(s.none),l.Decoration.mark({class:u.join(" ")}).range(t,i)},QuoteType:(t,i,d)=>l.Decoration.widget({widget:new Le(d),side:1}).range(t),BlockquoteLine:(t,i)=>l.Decoration.line({class:"bq-line "+(i?"sw":"")}).range(t),quoteLine:(t,i,d)=>{const u=`calc(100% - ${Math.max(0,d)+1.2}ch)`;return l.Decoration.mark({class:"bq-text-line",attributes:{style:`width: ${u}`}}).range(t,i)}},c=(t,i,d,u)=>{const g=[],C=d.number,f=(m,b)=>{let y=0;const w=[];let k=0;return{enter({name:T,node:ee,from:_,to:W}){T==="Blockquote"&&w.push(qe(t,ee)),T==="QuoteMark"&&(g.push(a[T](_,W,w[y])),k=W,y++),T==="QuoteType"&&g.push(a[T](_,W,w[y-1]))},leave({name:T,from:ee,to:_}){T==="Paragraph"&&k<b&&g.push(a.quoteLine(k,b,k-m))}}};for(let m=C;m<u+C;m++){const{from:b,to:y}=t.state.doc.line(m),{from:w,to:k}=i,T=D(t,w,k);g.push(a.BlockquoteLine(b,T)),B.syntaxTree(t.state).iterate({from:b,to:y,...f(b,y)})}return g},o=[];return x(e,{enter:({name:t,from:i,to:d,node:u})=>{if(t==="Blockquote"){const g=e.state.sliceDoc(i,d).split(`
18
- `),C=e.state.doc.lineAt(i);o.push(...c(e,u,C,g.length))}return r.includes(t)}}),l.Decoration.set(o,!0)}const qe=(e,n)=>{const r=n.getChild("QuoteType");if(!r)return"none";const s=r.getChild("QuoteTypeText");return s?e.state.sliceDoc(s.from,s.to).toLowerCase():"none"},ye=()=>q.EditorView.baseTheme({"& .qt-mk":{position:"relative",color:"transparent",verticalAlign:"top"},"& .qt-mk::after":{position:"absolute",content:'" "',backgroundColor:"currentColor",top:"-100vh",width:"4px",height:"200vh",zIndex:"-1"},"&.cm-focused .bq-line.sw .qt-mk::after":{opacity:.3},"& .bq-line":{lineHeight:"1.2lh",overflowY:"hidden"},"& .bq-line.sw .bq-none-mark, .bq-none-mark::after":{color:"var(--bq-none-mark, light-dark(black, white))"},"&.cm-focused .bq-line.sw .bq-note-mark, .bq-note-mark::after":{color:"var(--bq-note-mark, blue)"},"&.cm-focused .bq-line.sw .bq-tip-mark, .bq-tip-mark::after":{color:"var(--bq-tip-mark, green)"},"&.cm-focused .bq-line.sw .bq-warning-mark, .bq-warning-mark::after":{color:"var(--bq-warning-mark, peach)"},"&.cm-focused .bq-line.sw .bq-important-mark, .bq-important-mark::after":{color:"var(--bq-important-mark, rebbecapurple)"},"&.cm-focused .bq-line.sw .bq-caution-mark, .bq-caution-mark::after":{color:"var(--bq-caution-mark, red)"},"& .bq-text-line":{lineHeight:"1lh",display:"inline-block",paddingLeft:"6px",textIndent:"-7px",ariaHidden:"true"},"& .bq-text-line *":{verticalAlign:"middle"},"& .wg-qt-icon":{display:"inline-block"},"& .wg-qt-icon > .qt-icon":{paddingLeft:"1ch",width:"2em",height:"2em"},"& .wg-qt-icon > .qt-tip":{fill:"var(--bq-tip-mark, green)"},"& .wg-qt-icon > .qt-note":{fill:"var(--bq-note-mark, blue)"},"& .wg-qt-icon > .qt-important":{fill:"var(--bq-important-mark, rebbecapurple)"},"& .wg-qt-icon > .qt-warning":{fill:"var(--bq-warning-mark, peach)"},"& .wg-qt-icon > .qt-caution":{fill:"var(--bq-caution-mark, red)"}}),V=()=>[M(Te,{}),ye()],Me={name:"QuoteTypeParser",parse(e,n){if((()=>{for(let s=0;s<e.depth;s++)if(e.parentType(s).name==="Blockquote")return!0;return!1})()){const s=n.text.match(/^(\s*>\s*)+(\[!\w+\])\s*$/);if(s&&s[2]){const a=s[2],c=n.text.indexOf(a),o=c+a.length,t=e.elt("QuoteType",e.lineStart+c,e.lineStart+o);t.children=[e.elt("QuoteTypeMark",e.lineStart+c,e.lineStart+c+2),e.elt("QuoteTypeText",e.lineStart+c+2,e.lineStart+o-1),e.elt("QuoteTypeMark",e.lineStart+o-1,e.lineStart+o)],e.addElement(t)}}return!1}},$={defineNodes:[{name:"QuoteType",style:{"QuoteType/...":S.tags.content}},{name:"QuoteTypeMark",style:S.tags.processingInstruction},{name:"QuoteTypeText",style:S.tags.bool}],parseBlock:[Me]},G=(e,n,r)=>{const s=e.state.sliceDoc(n,r),a=s.match(/\[(.*)\]/);return a!==null&&a.length>1?{text:a[1],from:n+s.indexOf(a[1]),to:n+1+a[1].length}:{text:null}};function De(e,n){const r=["FencedCode","Image","Link"],s={Link:{marks:["LinkMark"],url:"URL"}},a={Link:(o,t,i)=>l.Decoration.mark({class:"link "+(i?"sw":"")}).range(o,t),LinkMark:(o,t)=>l.Decoration.mark({class:"lk-mk"}).range(o,t),TextDec:(o,t,i)=>l.Decoration.mark({class:"lk-text url",tagName:"a",attributes:{href:i,target:"_blank"}}).range(o,t),URL:(o,t,i)=>l.Decoration.mark({class:"lk-url url",tagName:"a",attributes:{href:i,target:"_blank"}}).range(o,t)},c=[];return x(e,{enter:({type:{name:o},from:t,to:i,node:d})=>{if(o==="URL"&&c.push(a.URL(t,i,e.state.sliceDoc(t,i))),!(o in s))return!r.includes(o);c.push(a.Link(t,i,D(e,t,i)));const u=s[o].marks.flatMap(f=>d.getChildren(f));c.push(...u.map(({from:f,to:m})=>a.LinkMark(f,m)));const g=d.getChild(s[o].url);let C=null;if(g!==null){const{from:f,to:m}=g;C=e.state.sliceDoc(f,m),c.push(a.URL(f,m,C))}if(d.getChild("Image")===null){const{text:f,from:m,to:b}=G(e,t,i);f!==null&&C!==null&&c.push(a.TextDec(m,b,C))}return!1}}),l.Decoration.set(c,!0)}const xe=(e,n)=>e.ctrlKey?He(e.target):!1,He=e=>{if(e.nodeName==="A"&&e.href&&e.classList.contains("url"))return window.open(e.href,e.target),!0},Se=q.EditorView.baseTheme({".lk-mk, .link > .lk-url":{display:"none"},"&.cm-focused .link.sw .lk-mk, &.cm-focused .link.sw .lk-url":{display:"inherit"}}),R=()=>[M(De,{},{eventHandlers:{mousedown:xe}}),Se];class Ee extends l.WidgetType{constructor(n,r=null,s="[image]"){super(),this.img=n,this.url=r,this.alt=s}toDOM(){let n=document.createElement("img");if(n.src=this.img,n.alt=this.alt,n.style.minWidth="100px",this.url){let r=document.createElement("a");return r.href=this.url,r.target="_blank",r.classList.add("url"),r.appendChild(n),r}else return n}eq(n){return this.img===n.img}ignoreEvent(){return!1}}function Ie(e,n){const r=["FencedCode","Image"],s=[];return x(e,{enter:({type:{name:a},from:c,to:o,node:t})=>{if(a==="Image"&&!D(e,c,o)){const{from:i,to:d}=t.getChild("URL"),u=e.state.sliceDoc(i,d),{text:g}=G(e,c,o);s.push(l.Decoration.replace({widget:new Ee(u,Be(e,t),g)}).range(c,o))}return!r.includes(a)}}),l.Decoration.set(s,!1)}const Be=(e,n)=>{const s=n.parent.getChild("URL");if(s!==null){const{from:a,to:c}=s;return e.state.sliceDoc(a,c)}return null},Pe=(e,n)=>e.ctrlKey?Ae(e.target):!1,Ae=e=>{const n=e.parentElement??!1;if(e.nodeName==="IMG"&&n&&n.nodeName==="A"&&n.classList.contains("url"))return!0},Qe=q.EditorView.baseTheme({}),N=()=>[M(Ie,{},{eventHandlers:{mousedown:Pe}}),Qe];class K extends l.WidgetType{constructor(n,r=!1){super(),this.content=n,this.tag=r}toDOM(){const n=document.createElement("div");n.className="cm-html-widget",n.setAttribute("aria-hidden","true");const r=this.content.replace(/^```html\n?/,"").replace(/```$/,"").trim();return n.innerHTML=(this.tag?'<span class="cm-rendered-tag">RTAG</span>':"")+r,n.querySelectorAll("script").forEach(s=>{s.parentNode.removeChild(s)}),n}ignoreEvent(n){return n.type==="click"}eq(n){return n.content===this.content}}const Y=F.StateEffect.define(),ze=F.StateField.define({create(e){return l.Decoration.none},update(e,n){e=e.map(n.changes);for(let r of n.effects)if(r.is(Y))return r.value;return e},provide:e=>l.EditorView.decorations.from(e)});function Ze(e){const n=[/<br>/,/<img .*\/>/],r={HTMLBlock:(a,c)=>{const o=e.state.doc.sliceString(a,c);return[l.Decoration.replace({widget:new K(o),inclusive:!1}).range(a,c)]},HTMLTag:(a,c)=>{const o=e.state.doc.sliceString(a,c);return console.log(o),n.some(t=>t.test(o))?(console.log(o),[l.Decoration.replace({widget:new K(o,!0),inclusive:!1}).range(a,c)]):[]}},s=[];return x(e,{enter:({type:a,from:c,to:o,node:t})=>{a.name in r&&(!D(e,c,o)||!e.hasFocus)&&s.push(...r[a.name](c,o))}}),l.Decoration.set(s)}const Ve=q.EditorView.baseTheme({"& .cm-html-widget":{all:"unset"},"& .cm-html-widget > *":{paddingTop:"0",paddingBottom:"0",marginBottom:"0",marginTop:"0"},"& .cm-widgetBuffer":{display:"none"}}),$e=l.EditorView.updateListener.of(e=>{if(e.selectionSet||e.docChanged||e.focusChanged||e.geometryChanged){const n=Ze(e.view);e.view.dispatch({effects:Y.of(n)})}}),O=()=>[ze,$e,Ve],J=e=>{const{markdown:{defaultCodeLanguage:n,codeLanguages:r,addKeymap:s,base:a,completeHTMLTags:c,htmlTagLanguage:o,extensions:t=[]}={}}=e??{},i={defaultCodeLanguage:n,codeLanguages:r||L.languages,addKeymap:s,base:a,completeHTMLTags:c,htmlTagLanguage:o,extensions:[...t,te.GFM,ne,$]};return[H.markdown(i),P(),A(),Q(),z(),Z(),R(),V(),N(),O()]};typeof window<"u"&&(window.gnosis=J,window.HrPlugin=P,window.InlinePlugin=A,window.ListPlugin=Q,window.CodePlugin=z,window.HeadingPlugin=Z,window.LinkPlugin=R,window.QuotePlugin=V,window.QuoteType=$,window.ImagePlugin=N,window.HtmlPlugin=O),h.CodePlugin=z,h.HeadingPlugin=Z,h.HrPlugin=P,h.HtmlPlugin=O,h.ImagePlugin=N,h.InlinePlugin=A,h.LinkPlugin=R,h.ListPlugin=Q,h.QuotePlugin=V,h.QuoteType=$,h.gnosis=J,Object.defineProperty(h,Symbol.toStringTag,{value:"Module"})});
17
+ </svg>`,none:()=>""};class Le extends l.WidgetType{constructor(n){super(),this.type=n}toDOM(){let n=document.createElement("span");return n.setAttribute("aria-hidden","true"),n.className="wg-qt-icon",n.innerHTML=this.type in _?_[this.type]():"",n}ignoreEvent(){return!1}eq(n){return this.type===n.type}}function we(e,n){const r=["Document","ListItem","BulletList","OrderedList"],s={none:"bq-none-mark",note:"bq-note-mark",tip:"bq-tip-mark",warning:"bq-warning-mark",important:"bq-important-mark",caution:"bq-caution-mark"},a={QuoteMark:(t,i,d)=>{const u=["qt-mk"];return d in s?u.push(s[d]):u.push(s.none),l.Decoration.mark({class:u.join(" ")}).range(t,i)},QuoteType:(t,i,d)=>l.Decoration.widget({widget:new Le(d),side:1}).range(t),BlockquoteLine:(t,i)=>l.Decoration.line({class:"bq-line "+(i?"sw":"")}).range(t),quoteLine:(t,i,d)=>{const u=`calc(100% - ${Math.max(0,d)+1.2}ch)`;return l.Decoration.mark({class:"bq-text-line",attributes:{style:`width: ${u}`}}).range(t,i)}},c=(t,i,d,u)=>{const g=[],C=d.number,f=(m,b)=>{let y=0;const L=[];let k=0;return{enter({name:T,node:J,from:A,to:z}){T==="Blockquote"&&L.push(Te(t,J)),T==="QuoteMark"&&(g.push(a[T](A,z,L[y])),k=z,y++),T==="QuoteType"&&g.push(a[T](A,z,L[y-1]))},leave({name:T,from:J,to:A}){T==="Paragraph"&&k<b&&g.push(a.quoteLine(k,b,k-m))}}};for(let m=C;m<u+C;m++){const{from:b,to:y}=t.state.doc.line(m),{from:L,to:k}=i,T=D(t,L,k);g.push(a.BlockquoteLine(b,T)),I.syntaxTree(t.state).iterate({from:b,to:y,...f(b,y)})}return g},o=[];return x(e,{enter:({name:t,from:i,to:d,node:u})=>{if(t==="Blockquote"){const g=e.state.sliceDoc(i,d).split(`
18
+ `),C=e.state.doc.lineAt(i);o.push(...c(e,u,C,g.length))}return r.includes(t)}}),l.Decoration.set(o,!0)}const Te=(e,n)=>{const r=n.getChild("QuoteType");if(!r)return"none";const s=r.getChild("QuoteTypeText");return s?e.state.sliceDoc(s.from,s.to).toLowerCase():"none"},qe=()=>q.EditorView.baseTheme({"& .qt-mk":{position:"relative",color:"transparent",verticalAlign:"top"},"& .qt-mk::after":{position:"absolute",content:'" "',backgroundColor:"currentColor",top:"-100vh",width:"4px",height:"200vh",zIndex:"-1"},"&.cm-focused .bq-line.sw .qt-mk::after":{opacity:.3},"& .bq-line":{lineHeight:"1.2lh",overflowY:"hidden"},"& .bq-line.sw .bq-none-mark, .bq-none-mark::after":{color:"var(--bq-none-mark, light-dark(black, white))"},"&.cm-focused .bq-line.sw .bq-note-mark, .bq-note-mark::after":{color:"var(--bq-note-mark, blue)"},"&.cm-focused .bq-line.sw .bq-tip-mark, .bq-tip-mark::after":{color:"var(--bq-tip-mark, green)"},"&.cm-focused .bq-line.sw .bq-warning-mark, .bq-warning-mark::after":{color:"var(--bq-warning-mark, peru)"},"&.cm-focused .bq-line.sw .bq-important-mark, .bq-important-mark::after":{color:"var(--bq-important-mark, rebeccapurple)"},"&.cm-focused .bq-line.sw .bq-caution-mark, .bq-caution-mark::after":{color:"var(--bq-caution-mark, red)"},"& .bq-text-line":{lineHeight:"1lh",display:"inline-block",paddingLeft:"6px",textIndent:"-7px",ariaHidden:"true"},"& .bq-text-line *":{verticalAlign:"middle"},"& .wg-qt-icon":{display:"inline-block"},"& .wg-qt-icon > .qt-icon":{paddingLeft:"1ch",width:"2em",height:"2em"},"& .wg-qt-icon > .qt-tip":{fill:"var(--bq-tip-mark, green)"},"& .wg-qt-icon > .qt-note":{fill:"var(--bq-note-mark, blue)"},"& .wg-qt-icon > .qt-important":{fill:"var(--bq-important-mark, rebeccapurple)"},"& .wg-qt-icon > .qt-warning":{fill:"var(--bq-warning-mark, peru)"},"& .wg-qt-icon > .qt-caution":{fill:"var(--bq-caution-mark, red)"}}),F=()=>[M(we,{}),qe()],ye={name:"QuoteTypeParser",parse(e,n){if((()=>{for(let s=0;s<e.depth;s++)if(e.parentType(s).name==="Blockquote")return!0;return!1})()){const s=n.text.match(/^(\s*>\s*)+(\[!\w+\])\s*$/);if(s&&s[2]){const a=s[2],c=n.text.indexOf(a),o=c+a.length,t=e.elt("QuoteType",e.lineStart+c,e.lineStart+o);t.children=[e.elt("QuoteTypeMark",e.lineStart+c,e.lineStart+c+2),e.elt("QuoteTypeText",e.lineStart+c+2,e.lineStart+o-1),e.elt("QuoteTypeMark",e.lineStart+o-1,e.lineStart+o)],e.addElement(t)}}return!1}},U={defineNodes:[{name:"QuoteType",style:{"QuoteType/...":S.tags.content}},{name:"QuoteTypeMark",style:S.tags.processingInstruction},{name:"QuoteTypeText",style:S.tags.bool}],parseBlock:[ye]},X=(e,n,r)=>{const s=e.state.sliceDoc(n,r),a=s.match(/\[(.*)\]/);return a!==null&&a.length>1?{text:a[1],from:n+s.indexOf(a[1]),to:n+1+a[1].length}:{text:null}};function Me(e,n){const r=["FencedCode","Image","Link"],s={Link:{marks:["LinkMark"],url:"URL"}},a={Link:(o,t,i)=>l.Decoration.mark({class:"link "+(i?"sw":"")}).range(o,t),LinkMark:(o,t)=>l.Decoration.mark({class:"lk-mk"}).range(o,t),TextDec:(o,t,i)=>l.Decoration.mark({class:"lk-text url",tagName:"a",attributes:{href:i,target:"_blank"}}).range(o,t),URL:(o,t,i)=>l.Decoration.mark({class:"lk-url url",tagName:"a",attributes:{href:i,target:"_blank"}}).range(o,t)},c=[];return x(e,{enter:({type:{name:o},from:t,to:i,node:d})=>{if(o==="URL"&&c.push(a.URL(t,i,e.state.sliceDoc(t,i))),!(o in s))return!r.includes(o);c.push(a.Link(t,i,D(e,t,i)));const u=s[o].marks.flatMap(f=>d.getChildren(f));c.push(...u.map(({from:f,to:m})=>a.LinkMark(f,m)));const g=d.getChild(s[o].url);let C=null;if(g!==null){const{from:f,to:m}=g;C=e.state.sliceDoc(f,m),c.push(a.URL(f,m,C))}if(d.getChild("Image")===null){const{text:f,from:m,to:b}=X(e,t,i);f!==null&&C!==null&&c.push(a.TextDec(m,b,C))}return!1}}),l.Decoration.set(c,!0)}const De=(e,n)=>e.ctrlKey?xe(e.target):!1,xe=e=>{if(e.nodeName==="A"&&e.href&&e.classList.contains("url"))return window.open(e.href,e.target),!0},He=q.EditorView.baseTheme({".lk-mk, .link > .lk-url":{display:"none"},"&.cm-focused .link.sw .lk-mk, &.cm-focused .link.sw .lk-url":{display:"inherit"}}),j=()=>[M(Me,{},{eventHandlers:{mousedown:De}}),He];class Se extends l.WidgetType{constructor(n,r=null,s="[image]"){super(),this.img=n,this.url=r,this.alt=s}toDOM(){let n=document.createElement("img");if(n.src=this.img,n.alt=this.alt,n.style.minWidth="100px",this.url){let r=document.createElement("a");return r.href=this.url,r.target="_blank",r.classList.add("url"),r.appendChild(n),r}else return n}eq(n){return this.img===n.img}ignoreEvent(){return!1}}function Ee(e,n){const r=["FencedCode","Image"],s=[];return x(e,{enter:({type:{name:a},from:c,to:o,node:t})=>{if(a==="Image"&&!D(e,c,o)){const{from:i,to:d}=t.getChild("URL"),u=e.state.sliceDoc(i,d),{text:g}=X(e,c,o);s.push(l.Decoration.replace({widget:new Se(u,Be(e,t),g)}).range(c,o))}return!r.includes(a)}}),l.Decoration.set(s,!1)}const Be=(e,n)=>{const s=n.parent.getChild("URL");if(s!==null){const{from:a,to:c}=s;return e.state.sliceDoc(a,c)}return null},Ie=(e,n)=>e.ctrlKey?Ae(e.target):!1,Ae=e=>{const n=e.parentElement??!1;if(e.nodeName==="IMG"&&n&&n.nodeName==="A"&&n.classList.contains("url"))return!0},ze=q.EditorView.baseTheme({}),v=()=>[M(Ee,{},{eventHandlers:{mousedown:Ie}}),ze];class G extends l.WidgetType{constructor(n,r=!1){super(),this.content=n,this.tag=r}toDOM(){const n=document.createElement("div");n.className="cm-html-widget",n.setAttribute("aria-hidden","true");const r=this.content.replace(/^```html\n?/,"").replace(/```$/,"").trim();return n.innerHTML=(this.tag?'<span class="cm-rendered-tag">RTAG</span>':"")+r,n.querySelectorAll("script").forEach(s=>{s.parentNode.removeChild(s)}),n}ignoreEvent(n){return n.type==="click"}eq(n){return n.content===this.content}}const K=P.StateEffect.define(),Pe=P.StateField.define({create(e){return l.Decoration.none},update(e,n){e=e.map(n.changes);for(let r of n.effects)if(r.is(K))return r.value;return e},provide:e=>l.EditorView.decorations.from(e)});function Qe(e){const n=[/<br>/,/<img .*\/>/],r={HTMLBlock:(a,c)=>{const o=e.state.doc.sliceString(a,c);return[l.Decoration.replace({widget:new G(o),inclusive:!1}).range(a,c)]},HTMLTag:(a,c)=>{const o=e.state.doc.sliceString(a,c);return console.log(o),n.some(t=>t.test(o))?(console.log(o),[l.Decoration.replace({widget:new G(o,!0),inclusive:!1}).range(a,c)]):[]}},s=[];return x(e,{enter:({type:a,from:c,to:o,node:t})=>{a.name in r&&(!D(e,c,o)||!e.hasFocus)&&s.push(...r[a.name](c,o))}}),l.Decoration.set(s)}const Ze=q.EditorView.baseTheme({"& .cm-html-widget":{all:"unset"},"& .cm-html-widget > *":{paddingTop:"0",paddingBottom:"0",marginBottom:"0",marginTop:"0"},"& .cm-widgetBuffer":{display:"none"}}),Ve=l.EditorView.updateListener.of(e=>{if(e.selectionSet||e.docChanged||e.focusChanged||e.geometryChanged){const n=Qe(e.view);e.view.dispatch({effects:K.of(n)})}}),Y=()=>[Pe,Ve,Ze],$e=e=>{const{markdown:{defaultCodeLanguage:n,codeLanguages:r,addKeymap:s,base:a,completeHTMLTags:c,htmlTagLanguage:o,extensions:t=[]}={}}=e??{},i={defaultCodeLanguage:n,codeLanguages:r||w.languages,addKeymap:s,base:a,completeHTMLTags:c,htmlTagLanguage:o,extensions:[...t,ee.GFM,te,U]};return[H.markdown(i),Q(),Z(),V(),N(),O(),j(),F(),v(),Y()]};h.CodePlugin=N,h.HeadingPlugin=O,h.HrPlugin=Q,h.HtmlPlugin=Y,h.ImagePlugin=v,h.InlinePlugin=Z,h.LinkPlugin=j,h.ListPlugin=V,h.QuotePlugin=F,h.QuoteType=U,h.gnosis=$e,Object.defineProperty(h,Symbol.toStringTag,{value:"Module"})});
@@ -0,0 +1 @@
1
+ export function CodePlugin(): import('@codemirror/state').Extension[];
@@ -0,0 +1 @@
1
+ export function HeadingPlugin(): import('@codemirror/state').Extension[];
@@ -0,0 +1 @@
1
+ export function HrPlugin(): import('@codemirror/state').Extension[];
@@ -0,0 +1 @@
1
+ export function HtmlPlugin(): (import('@codemirror/state').Extension | import('@codemirror/state').StateField<any>)[];
@@ -0,0 +1 @@
1
+ export function ListPlugin(): import('@codemirror/state').Extension[];
@@ -0,0 +1,15 @@
1
+ export namespace QuoteType {
2
+ let defineNodes: ({
3
+ name: string;
4
+ style: {
5
+ "QuoteType/...": import("@lezer/highlight").Tag;
6
+ };
7
+ } | {
8
+ name: string;
9
+ style: import("@lezer/highlight").Tag;
10
+ })[];
11
+ let parseBlock: {
12
+ name: string;
13
+ parse(cx: any, line: any): boolean;
14
+ }[];
15
+ }
@@ -0,0 +1 @@
1
+ export function QuotePlugin(): import('@codemirror/state').Extension[];
@@ -0,0 +1 @@
1
+ export function InlinePlugin(): import('@codemirror/state').Extension[];
@@ -0,0 +1 @@
1
+ export function ImagePlugin(): import('@codemirror/state').Extension[];
@@ -0,0 +1 @@
1
+ export function LinkPlugin(): import('@codemirror/state').Extension[];
package/dist/tags.d.ts ADDED
@@ -0,0 +1,3 @@
1
+ export declare const unsetMarks: {
2
+ props: import('@lezer/common').NodePropSource[];
3
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@glifox/gnosis",
3
- "version": "0.0.10",
3
+ "version": "0.0.12",
4
4
  "author": "feraxhp",
5
5
  "license": "MIT",
6
6
  "main": "dist/gnosis.umd.js",