@clevertask/scribe 0.1.7 → 0.1.9
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.
- package/README.md +5 -4
- package/dist/{BarMenu-DC-S5Ggq.js → BarMenu-BG_w4DVo.js} +53 -25
- package/dist/assets/index.css +1 -1
- package/dist/components/Menu/BarMenu.d.ts.map +1 -1
- package/dist/components/Menu/BarMenu.js +1 -1
- package/dist/components/Menu/BubbleMenu.js +2 -2
- package/dist/components/Menu/LinkBubbleMenu.d.ts.map +1 -1
- package/dist/components/Menu/LinkBubbleMenu.js +64 -50
- package/dist/components/Menu/LinkEditor.js +4 -4
- package/dist/components/Menu/Mobile/ListOptionBar.d.ts.map +1 -1
- package/dist/components/Menu/Mobile/ListOptionBar.js +11 -5
- package/dist/components/Menu/linkBubbleMenuPlugin.d.ts +1 -0
- package/dist/components/Menu/linkBubbleMenuPlugin.d.ts.map +1 -1
- package/dist/components/Menu/linkBubbleMenuPlugin.js +4 -2
- package/dist/components/Scribe/extension/emoji/EmojiList.d.ts.map +1 -1
- package/dist/components/Scribe/extension/emoji/EmojiList.js +6 -2
- package/dist/components/Scribe/extension/emoji/suggest.js +2 -2
- package/dist/components/Scribe/extension/extension-link.js +1 -1
- package/dist/components/Scribe/extension/extension-markdown-paste.js +14 -6
- package/dist/components/Scribe/extension/extension-selectedText.js +1 -1
- package/dist/components/Scribe/extension/index.js +1 -1
- package/dist/components/Scribe/extension/slashCommand/SlashCommandList.d.ts.map +1 -1
- package/dist/components/Scribe/extension/slashCommand/SlashCommandList.js +948 -943
- package/dist/components/Scribe/extension/slashCommand/index.js +1 -1
- package/dist/components/Scribe/extension/slashCommand/renderItems.js +2 -2
- package/dist/components/Scribe/extension/tableOfContents.js +2 -2
- package/dist/components/Scribe/index.d.ts +2 -0
- package/dist/components/Scribe/index.d.ts.map +1 -1
- package/dist/components/Scribe/index.js +182 -80
- package/dist/{dist-BQjH-i-q.js → dist-BMKyBtRa.js} +112 -105
- package/dist/{dist-DT3iiwSr.js → dist-BgEySLwo.js} +9 -8
- package/dist/{dist-CnXCIcnl.js → dist-FrapLVQu.js} +16 -9
- package/dist/{extension-CZOsheCI.js → extension-BVGWENts.js} +1306 -1300
- package/dist/{extension-link-DZID_SYl.js → extension-link-CMRfHUc5.js} +5 -5
- package/dist/{floating-ui.dom-rih69525.js → floating-ui.dom-CmJ6iBdh.js} +4 -5
- package/dist/{html-to-markdown-CrNOkSye.js → html-to-markdown-Cta7-ssO.js} +3 -2
- package/dist/main.js +2 -2
- package/dist/{markdown-to-html-DEczPfuq.js → markdown-to-html-DwSNqq2i.js} +8 -6
- package/dist/{menus-CrKTaPWU.js → menus-D9OsP28c.js} +8 -8
- package/dist/{purify.es-DF9CW1cl.js → purify.es-CFiLaBu1.js} +1 -1
- package/dist/{slashCommand-B7CRIaKG.js → slashCommand-B6Iz1i0d.js} +5 -8
- package/dist/{tables-CjOC70rm.js → tables-CXpUVKdw.js} +9 -7
- package/dist/{tippy.esm-D9LL2xiE.js → tippy.esm-DOXqN1Qm.js} +2 -7
- package/dist/utils/html-to-markdown.js +1 -1
- package/dist/utils/index.js +4 -4
- package/dist/utils/markdown-to-html.js +1 -1
- package/package.json +49 -34
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { a as e, i as t } from "./dist-
|
|
2
|
-
import { M as n, N as r, _ as i, f as a, h as o, i as s, j as c, m as l, o as u, r as d, u as f } from "./dist-
|
|
1
|
+
import { a as e, i as t } from "./dist-FrapLVQu.js";
|
|
2
|
+
import { M as n, N as r, _ as i, f as a, h as o, i as s, j as c, m as l, o as u, r as d, u as f } from "./dist-BMKyBtRa.js";
|
|
3
3
|
//#region node_modules/.pnpm/linkifyjs@4.3.3/node_modules/linkifyjs/dist/linkify.mjs
|
|
4
4
|
var p = "aaa1rp3bb0ott3vie4c1le2ogado5udhabi7c0ademy5centure6ountant0s9o1tor4d0s1ult4e0g1ro2tna4f0l1rica5g0akhan5ency5i0g1rbus3force5tel5kdn3l0ibaba4pay4lfinanz6state5y2sace3tom5m0azon4ericanexpress7family11x2fam3ica3sterdam8nalytics7droid5quan4z2o0l2partments8p0le4q0uarelle8r0ab1mco4chi3my2pa2t0e3s0da2ia2sociates9t0hleta5torney7u0ction5di0ble3o3spost5thor3o0s4w0s2x0a2z0ure5ba0by2idu3namex4d1k2r0celona5laycard4s5efoot5gains6seball5ketball8uhaus5yern5b0c1t1va3cg1n2d1e0ats2uty4er2rlin4st0buy5t2f1g1h0arti5i0ble3d1ke2ng0o3o1z2j1lack0friday9ockbuster8g1omberg7ue3m0s1w2n0pparibas9o0ats3ehringer8fa2m1nd2o0k0ing5sch2tik2on4t1utique6x2r0adesco6idgestone9oadway5ker3ther5ussels7s1t1uild0ers6siness6y1zz3v1w1y1z0h3ca0b1fe2l0l1vinklein9m0era3p2non3petown5ital0one8r0avan4ds2e0er0s4s2sa1e1h1ino4t0ering5holic7ba1n1re3c1d1enter4o1rn3f0a1d2g1h0anel2nel4rity4se2t2eap3intai5ristmas6ome4urch5i0priani6rcle4sco3tadel4i0c2y3k1l0aims4eaning6ick2nic1que6othing5ud3ub0med6m1n1o0ach3des3ffee4llege4ogne5m0mbank4unity6pany2re3uter5sec4ndos3struction8ulting7tact3ractors9oking4l1p2rsica5untry4pon0s4rses6pa2r0edit0card4union9icket5own3s1uise0s6u0isinella9v1w1x1y0mru3ou3z2dad1nce3ta1e1ing3sun4y2clk3ds2e0al0er2s3gree4livery5l1oitte5ta3mocrat6ntal2ist5si0gn4v2hl2iamonds6et2gital5rect0ory7scount3ver5h2y2j1k1m1np2o0cs1tor4g1mains5t1wnload7rive4tv2ubai3pont4rban5vag2r2z2earth3t2c0o2deka3u0cation8e1g1mail3erck5nergy4gineer0ing9terprises10pson4quipment8r0icsson6ni3s0q1tate5t1u0rovision8s2vents5xchange6pert3osed4ress5traspace10fage2il1rwinds6th3mily4n0s2rm0ers5shion4t3edex3edback6rrari3ero6i0delity5o2lm2nal1nce1ial7re0stone6mdale6sh0ing5t0ness6j1k1lickr3ghts4r2orist4wers5y2m1o0o0d1tball6rd1ex2sale4um3undation8x2r0ee1senius7l1ogans4ntier7tr2ujitsu5n0d2rniture7tbol5yi3ga0l0lery3o1up4me0s3p1rden4y2b0iz3d0n2e0a1nt0ing5orge5f1g0ee3h1i0ft0s3ves2ing5l0ass3e1obal2o4m0ail3bh2o1x2n1odaddy5ld0point6f2odyear5g0le4p1t1v2p1q1r0ainger5phics5tis4een3ipe3ocery4up4s1t1u0cci3ge2ide2tars5ru3w1y2hair2mburg5ngout5us3bo2dfc0bank7ealth0care8lp1sinki6re1mes5iphop4samitsu7tachi5v2k0t2m1n1ockey4ldings5iday5medepot5goods5s0ense7nda3rse3spital5t0ing5t0els3mail5use3w2r1sbc3t1u0ghes5yatt3undai7ibm2cbc2e1u2d1e0ee3fm2kano4l1m0amat4db2mo0bilien9n0c1dustries8finiti5o2g1k1stitute6urance4e4t0ernational10uit4vestments10o1piranga7q1r0ish4s0maili5t0anbul7t0au2v3jaguar4va3cb2e0ep2tzt3welry6io2ll2m0p2nj2o0bs1urg4t1y2p0morgan6rs3uegos4niper7kaufen5ddi3e0rryhotels6properties14fh2g1h1i0a1ds2m1ndle4tchen5wi3m1n1oeln3matsu5sher5p0mg2n2r0d1ed3uokgroup8w1y0oto4z2la0caixa5mborghini8er3nd0rover6xess5salle5t0ino3robe5w0yer5b1c1ds2ease3clerc5frak4gal2o2xus4gbt3i0dl2fe0insurance9style7ghting6ke2lly3mited4o2ncoln4k2ve1ing5k1lc1p2oan0s3cker3us3l1ndon4tte1o3ve3pl0financial11r1s1t0d0a3u0ndbeck6xe1ury5v1y2ma0drid4if1son4keup4n0agement7go3p1rket0ing3s4riott5shalls7ttel5ba2c0kinsey7d1e0d0ia3et2lbourne7me1orial6n0u2rck0msd7g1h1iami3crosoft7l1ni1t2t0subishi9k1l0b1s2m0a2n1o0bi0le4da2e1i1m1nash3ey2ster5rmon3tgage6scow4to0rcycles9v0ie4p1q1r1s0d2t0n1r2u0seum3ic4v1w1x1y1z2na0b1goya4me2vy3ba2c1e0c1t0bank4flix4work5ustar5w0s2xt0direct7us4f0l2g0o2hk2i0co2ke1on3nja3ssan1y5l1o0kia3rton4w0ruz3tv4p1r0a1w2tt2u1yc2z2obi1server7ffice5kinawa6layan0group9lo3m0ega4ne1g1l0ine5oo2pen3racle3nge4g0anic5igins6saka4tsuka4t2vh3pa0ge2nasonic7ris2s1tners4s1y3y2ccw3e0t2f0izer5g1h0armacy6d1ilips5one2to0graphy6s4ysio5ics1tet2ures6d1n0g1k2oneer5zza4k1l0ace2y0station9umbing5s3m1n0c2ohl2ker3litie5rn2st3r0axi3ess3ime3o0d0uctions8f1gressive8mo2perties3y5tection8u0dential9s1t1ub2w0c2y2qa1pon3uebec3st5racing4dio4e0ad1lestate6tor2y4cipes5d0umbrella9hab3ise0n3t2liance6n0t0als5pair3ort3ublican8st0aurant8view0s5xroth6ich0ardli6oh3l1o1p2o0cks3deo3gers4om3s0vp3u0gby3hr2n2w0e2yukyu6sa0arland6fe0ty4kura4le1on3msclub4ung5ndvik0coromant12ofi4p1rl2s1ve2xo3b0i1s2c0b1haeffler7midt4olarships8ol3ule3warz5ience5ot3d1e0arch3t2cure1ity6ek2lect4ner3rvices6ven3w1x0y3fr2g1h0angrila6rp3ell3ia1ksha5oes2p0ping5uji3w3i0lk2na1gles5te3j1k0i0n2y0pe4l0ing4m0art3ile4n0cf3o0ccer3ial4ftbank4ware6hu2lar2utions7ng1y2y2pa0ce3ort2t3r0l2s1t0ada2ples4r1tebank4farm7c0group6ockholm6rage3e3ream4udio2y3yle4u0cks3pplies3y2ort5rf1gery5zuki5v1watch4iss4x1y0dney4stems6z2tab1ipei4lk2obao4rget4tamotors6r2too4x0i3c0i2d0k2eam2ch0nology8l1masek5nnis4va3f1g1h0d1eater2re6iaa2ckets5enda4ps2res2ol4j0maxx4x2k0maxx5l1m0all4n1o0day3kyo3ols3p1ray3shiba5tal3urs3wn2yota3s3r0ade1ing4ining5vel0ers0insurance16ust3v2t1ube2i1nes3shu4v0s2w1z2ua1bank3s2g1k1nicom3versity8o2ol2ps2s1y1z2va0cations7na1guard7c1e0gas3ntures6risign5mögensberater2ung14sicherung10t2g1i0ajes4deo3g1king4llas4n1p1rgin4sa1ion4va1o3laanderen9n1odka3lvo3te1ing3o2yage5u2wales2mart4ter4ng0gou5tch0es6eather0channel12bcam3er2site5d0ding5ibo2r3f1hoswho6ien2ki2lliamhill9n0dows4e1ners6me2oodside6rk0s2ld3w2s1tc1f3xbox3erox4ihuan4n2xx2yz3yachts4hoo3maxun5ndex5e1odobashi7ga2kohama6u0tube6t1un3za0ppos4ra3ero3ip2m1one3uerich6w2", m = "ελ1υ2бг1ел3дети4ею2католик6ом3мкд2он1сква6онлайн5рг3рус2ф2сайт3рб3укр3қаз3հայ3ישראל5קום3ابوظبي5رامكو5لاردن4بحرين5جزائر5سعودية6عليان5مغرب5مارات5یران5بارت2زار4يتك3ھارت5تونس4سودان3رية5شبكة4عراق2ب2مان4فلسطين6قطر3كاثوليك6وم3مصر2ليسيا5وريتانيا7قع4همراه5پاکستان7ڀارت4कॉम3नेट3भारत0म्3ोत5संगठन5বাংলা5ভারত2ৰত4ਭਾਰਤ4ભારત4ଭାରତ4இந்தியா6லங்கை6சிங்கப்பூர்11భారత్5ಭಾರತ4ഭാരതം5ලංකා4คอม3ไทย3ລາວ3გე2みんな3アマゾン4クラウド4グーグル4コム2ストア3セール3ファッション6ポイント4世界2中信1国1國1文网3亚马逊3企业2佛山2信息2健康2八卦2公司1益2台湾1灣2商城1店1标2嘉里0大酒店5在线2大拿2天主教3娱乐2家電2广东2微博2慈善2我爱你3手机2招聘2政务1府2新加坡2闻2时尚2書籍2机构2淡马锡3游戏2澳門2点看2移动2组织机构4网址1店1站1络2联通2谷歌2购物2通販2集团2電訊盈科4飞利浦3食品2餐厅2香格里拉3港2닷넷1컴2삼성2한국2", h = "numeric", g = "ascii", _ = "alpha", v = "asciinumeric", y = "alphanumeric", b = "domain", x = "emoji", ee = "scheme", S = "slashscheme", C = "whitespace";
|
|
5
5
|
function w(e, t) {
|
|
@@ -511,7 +511,7 @@ function yt(e, t = null, n = null) {
|
|
|
511
511
|
return a;
|
|
512
512
|
}
|
|
513
513
|
//#endregion
|
|
514
|
-
//#region node_modules/.pnpm/@tiptap+extension-link@3.29.
|
|
514
|
+
//#region node_modules/.pnpm/@tiptap+extension-link@3.29.2_@tiptap+core@3.29.2_@tiptap+pm@3.29.2__@tiptap+pm@3.29.2/node_modules/@tiptap/extension-link/dist/index.js
|
|
515
515
|
var bt = "[\0- \xA0 -\u2029 ]", xt = new RegExp(bt), St = RegExp(`${bt}$`), Ct = new RegExp(bt, "g");
|
|
516
516
|
function wt(e) {
|
|
517
517
|
return e.length === 1 ? e[0].isLink : e.length === 3 && e[1].isLink ? ["()", "[]"].includes(e[0].value + e[2].value) : !1;
|
|
@@ -522,8 +522,8 @@ function Tt(n) {
|
|
|
522
522
|
appendTransaction: (e, t, r) => {
|
|
523
523
|
let s = e.some((e) => e.docChanged) && !t.doc.eq(r.doc), c = e.some((e) => e.getMeta("preventAutolink"));
|
|
524
524
|
if (!s || c) return;
|
|
525
|
-
let { tr: l } = r;
|
|
526
|
-
if (o(
|
|
525
|
+
let { tr: l } = r, u = f(t.doc, [...e]);
|
|
526
|
+
if (o(u).forEach(({ newRange: e }) => {
|
|
527
527
|
let t = a(r.doc, e, (e) => e.isTextblock), o, s;
|
|
528
528
|
if (t.length > 1) o = t[0], s = r.doc.textBetween(o.pos, o.pos + o.node.nodeSize, void 0, " ");
|
|
529
529
|
else if (t.length) {
|
|
@@ -294,7 +294,7 @@ var P = function(e) {
|
|
|
294
294
|
overflows: j
|
|
295
295
|
}], !j.every((e) => e <= 0)) {
|
|
296
296
|
let e = (i.flip?.index || 0) + 1, t = k[e];
|
|
297
|
-
if (t && (
|
|
297
|
+
if (t && (f !== "alignment" || S === h(t) || M.every((e) => h(e.placement) !== S || e.overflows[0] > 0))) return {
|
|
298
298
|
data: {
|
|
299
299
|
index: e,
|
|
300
300
|
overflows: M
|
|
@@ -314,9 +314,7 @@ var P = function(e) {
|
|
|
314
314
|
e && (n = e);
|
|
315
315
|
break;
|
|
316
316
|
}
|
|
317
|
-
case "initialPlacement":
|
|
318
|
-
n = o;
|
|
319
|
-
break;
|
|
317
|
+
case "initialPlacement": n = o;
|
|
320
318
|
}
|
|
321
319
|
if (r !== n) return { reset: { placement: n } };
|
|
322
320
|
}
|
|
@@ -601,7 +599,8 @@ function Z(e, t, n) {
|
|
|
601
599
|
if (i) {
|
|
602
600
|
let e = xe(a);
|
|
603
601
|
return t.concat(a, a.visualViewport || [], W(r) ? r : [], e && n ? Z(e) : []);
|
|
604
|
-
}
|
|
602
|
+
}
|
|
603
|
+
return t.concat(r, Z(r, [], n));
|
|
605
604
|
}
|
|
606
605
|
function xe(e) {
|
|
607
606
|
return e.parent && Object.getPrototypeOf(e.parent) ? e.frameElement : null;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as e } from "./purify.es-
|
|
1
|
+
import { t as e } from "./purify.es-CFiLaBu1.js";
|
|
2
2
|
//#region node_modules/.pnpm/turndown@7.2.4/node_modules/turndown/lib/turndown.browser.es.js
|
|
3
3
|
function t(e) {
|
|
4
4
|
for (var t = 1; t < arguments.length; t++) {
|
|
@@ -120,7 +120,8 @@ v.paragraph = {
|
|
|
120
120
|
if (r.headingStyle === "setext" && i < 3) {
|
|
121
121
|
var a = n(i === 1 ? "=" : "-", e.length);
|
|
122
122
|
return "\n\n" + e + "\n" + a + "\n\n";
|
|
123
|
-
}
|
|
123
|
+
}
|
|
124
|
+
return "\n\n" + n("#", i) + " " + e + "\n\n";
|
|
124
125
|
}
|
|
125
126
|
}, v.blockquote = {
|
|
126
127
|
filter: "blockquote",
|
package/dist/main.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { t as e } from "./html-to-markdown-
|
|
2
|
-
import { t } from "./markdown-to-html-
|
|
1
|
+
import { t as e } from "./html-to-markdown-Cta7-ssO.js";
|
|
2
|
+
import { t } from "./markdown-to-html-DwSNqq2i.js";
|
|
3
3
|
import { isInViewport as n } from "./utils/is-in-viewport.js";
|
|
4
4
|
import { convertLegacyMathDelimiters as r } from "./utils/convert-legacy-math-delimiters.js";
|
|
5
5
|
import { SuggestionItemType as i } from "./components/Scribe/extension/slashCommand/items.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as e } from "./purify.es-
|
|
1
|
+
import { t as e } from "./purify.es-CFiLaBu1.js";
|
|
2
2
|
//#region node_modules/.pnpm/marked@18.0.7/node_modules/marked/lib/marked.esm.js
|
|
3
3
|
function t() {
|
|
4
4
|
return {
|
|
@@ -348,7 +348,8 @@ ${c}` : c;
|
|
|
348
348
|
let t = u, a = t.raw + "\n" + e.join("\n"), o = this.blockquote(a);
|
|
349
349
|
i[i.length - 1] = o, n = n.substring(0, n.length - t.raw.length) + o.raw, r = r.substring(0, r.length - t.text.length) + o.text;
|
|
350
350
|
break;
|
|
351
|
-
}
|
|
351
|
+
}
|
|
352
|
+
if (u?.type === "list") {
|
|
352
353
|
let t = u, a = t.raw + "\n" + e.join("\n"), o = this.list(a);
|
|
353
354
|
i[i.length - 1] = o, n = n.substring(0, n.length - u.raw.length) + o.raw, r = r.substring(0, r.length - t.raw.length) + o.raw, e = a.substring(i.at(-1).raw.length).split("\n");
|
|
354
355
|
continue;
|
|
@@ -599,7 +600,8 @@ ${c}` : c;
|
|
|
599
600
|
if (a = [...i].length, r[3] || r[4]) {
|
|
600
601
|
o += a;
|
|
601
602
|
continue;
|
|
602
|
-
}
|
|
603
|
+
}
|
|
604
|
+
if ((r[5] || r[6]) && n % 3 && !((n + a) % 3)) {
|
|
603
605
|
s += a;
|
|
604
606
|
continue;
|
|
605
607
|
}
|
|
@@ -736,7 +738,7 @@ ${c}` : c;
|
|
|
736
738
|
block: L.normal,
|
|
737
739
|
inline: R.normal
|
|
738
740
|
};
|
|
739
|
-
this.options.pedantic ? (t.block = L.pedantic, t.inline = R.pedantic) : this.options.gfm && (t.block = L.gfm, this.options.breaks ?
|
|
741
|
+
this.options.pedantic ? (t.block = L.pedantic, t.inline = R.pedantic) : this.options.gfm && (t.block = L.gfm, t.inline = this.options.breaks ? R.breaks : R.gfm), this.tokenizer.rules = t;
|
|
740
742
|
}
|
|
741
743
|
static get rules() {
|
|
742
744
|
return {
|
|
@@ -1361,14 +1363,14 @@ ${e}</tr>
|
|
|
1361
1363
|
if (!(n in t)) throw Error(`hook '${n}' does not exist`);
|
|
1362
1364
|
if (["options", "block"].includes(n)) continue;
|
|
1363
1365
|
let r = n, i = e.hooks[r], a = t[r];
|
|
1364
|
-
Z.passThroughHooks.has(n) ?
|
|
1366
|
+
t[r] = Z.passThroughHooks.has(n) ? (e) => {
|
|
1365
1367
|
if (this.defaults.async && Z.passThroughHooksRespectAsync.has(n)) return (async () => {
|
|
1366
1368
|
let n = await i.call(t, e);
|
|
1367
1369
|
return a.call(t, n);
|
|
1368
1370
|
})();
|
|
1369
1371
|
let r = i.call(t, e);
|
|
1370
1372
|
return a.call(t, r);
|
|
1371
|
-
} :
|
|
1373
|
+
} : (...e) => {
|
|
1372
1374
|
if (this.defaults.async) return (async () => {
|
|
1373
1375
|
let n = await i.apply(t, e);
|
|
1374
1376
|
return n === !1 && (n = await a.apply(t, e)), n;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { r as e } from "./dist-
|
|
2
|
-
import { a as t, i as n, r } from "./dist-
|
|
3
|
-
import { A as i, C as a, I as o, S as s, n as c } from "./dist-
|
|
4
|
-
import { a as l, c as u, i as d, l as f, n as p, o as m, s as h, t as g, u as _ } from "./floating-ui.dom-
|
|
5
|
-
import { t as v } from "./tables-
|
|
1
|
+
import { r as e } from "./dist-BgEySLwo.js";
|
|
2
|
+
import { a as t, i as n, r } from "./dist-FrapLVQu.js";
|
|
3
|
+
import { A as i, C as a, I as o, S as s, n as c } from "./dist-BMKyBtRa.js";
|
|
4
|
+
import { a as l, c as u, i as d, l as f, n as p, o as m, s as h, t as g, u as _ } from "./floating-ui.dom-CmJ6iBdh.js";
|
|
5
|
+
import { t as v } from "./tables-CXpUVKdw.js";
|
|
6
6
|
import y, { useEffect as b, useLayoutEffect as x, useRef as S, useState as C } from "react";
|
|
7
7
|
import { createPortal as w } from "react-dom";
|
|
8
|
-
//#region node_modules/.pnpm/@tiptap+extension-bubble-menu@3.29.
|
|
8
|
+
//#region node_modules/.pnpm/@tiptap+extension-bubble-menu@3.29.2_@tiptap+core@3.29.2_@tiptap+pm@3.29.2__@tiptap+pm@3.29.2/node_modules/@tiptap/extension-bubble-menu/dist/index.js
|
|
9
9
|
function T(e, t) {
|
|
10
10
|
let n = Math.min(e.top, t.top), r = Math.max(e.bottom, t.bottom), i = Math.min(e.left, t.left), a = Math.max(e.right, t.right) - i, o = r - n;
|
|
11
11
|
return new DOMRect(i, n, a, o);
|
|
@@ -191,7 +191,7 @@ c.create({
|
|
|
191
191
|
}
|
|
192
192
|
});
|
|
193
193
|
//#endregion
|
|
194
|
-
//#region node_modules/.pnpm/@tiptap+extension-floating-menu@3.29.
|
|
194
|
+
//#region node_modules/.pnpm/@tiptap+extension-floating-menu@3.29.2_@floating-ui+dom@1.8.0_@tiptap+core@3.29.2_@tiptap+pm@3.29.2__@tiptap+pm@3.29.2/node_modules/@tiptap/extension-floating-menu/dist/index.js
|
|
195
195
|
var O = class {
|
|
196
196
|
constructor({ editor: e, element: t, view: n, pluginKey: r = "floatingMenu", updateDelay: i = 250, resizeDelay: a = 60, options: o, appendTo: s, shouldShow: c }) {
|
|
197
197
|
this.preventHide = !1, this.isVisible = !1, this.scrollTarget = window, this.shouldShow = ({ view: e, state: t }) => {
|
|
@@ -335,7 +335,7 @@ c.create({
|
|
|
335
335
|
}
|
|
336
336
|
});
|
|
337
337
|
//#endregion
|
|
338
|
-
//#region node_modules/.pnpm/@tiptap+react@3.29.
|
|
338
|
+
//#region node_modules/.pnpm/@tiptap+react@3.29.2_@floating-ui+dom@1.8.0_@tiptap+core@3.29.2_@tiptap+pm@3.29.2__@tip_6ae02cdf395ababc98513a112803373d/node_modules/@tiptap/react/dist/menus/index.js
|
|
339
339
|
function A(e, n) {
|
|
340
340
|
return e ?? new t(n);
|
|
341
341
|
}
|
|
@@ -85,7 +85,7 @@ function O(e) {
|
|
|
85
85
|
for (let r of o(e)) {
|
|
86
86
|
var n = i(r, 2);
|
|
87
87
|
let a = n[0], o = n[1];
|
|
88
|
-
b(e, a) && (_(o) ?
|
|
88
|
+
b(e, a) && (t[a] = _(o) ? D(o) : o && typeof o == "object" && o.constructor === Object ? O(o) : o);
|
|
89
89
|
}
|
|
90
90
|
return t;
|
|
91
91
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { a as e, i as t } from "./dist-
|
|
2
|
-
import { H as n, U as r, d as i, n as a } from "./dist-
|
|
3
|
-
import { a as o, c as s, i as c, r as l } from "./floating-ui.dom-
|
|
4
|
-
//#region node_modules/.pnpm/@tiptap+suggestion@3.29.
|
|
1
|
+
import { a as e, i as t } from "./dist-FrapLVQu.js";
|
|
2
|
+
import { H as n, U as r, d as i, n as a } from "./dist-BMKyBtRa.js";
|
|
3
|
+
import { a as o, c as s, i as c, r as l } from "./floating-ui.dom-CmJ6iBdh.js";
|
|
4
|
+
//#region node_modules/.pnpm/@tiptap+suggestion@3.29.2_@floating-ui+dom@1.8.0_@tiptap+core@3.29.2_@tiptap+pm@3.29.2__@tiptap+pm@3.29.2/node_modules/@tiptap/suggestion/dist/index.js
|
|
5
5
|
function u(e) {
|
|
6
6
|
let { char: t, allowSpaces: n, allowToIncludeChar: r, allowedPrefixes: a, startOfLine: o, $position: s } = e, c = n && !r, l = i(t), u = RegExp(`\\s${l}$`), d = o ? "^" : "", f = r ? "" : l, p = RegExp(c ? `${d}${l}.*?(?=\\s${f}|$)` : `${d}(?:^)?${l}[^\\s${f}]*`, "gm"), m = s.nodeBefore?.isText && s.nodeBefore.text;
|
|
7
7
|
if (!m) return null;
|
|
@@ -255,10 +255,7 @@ function S({ editor: e, pluginKey: t, items: n, renderer: r, minQueryLength: i,
|
|
|
255
255
|
case "updated":
|
|
256
256
|
(i = r?.onUpdate) == null || i.call(r, t);
|
|
257
257
|
break;
|
|
258
|
-
case "stopped":
|
|
259
|
-
(a = r?.onExit) == null || a.call(r, t);
|
|
260
|
-
break;
|
|
261
|
-
default: break;
|
|
258
|
+
case "stopped": (a = r?.onExit) == null || a.call(r, t);
|
|
262
259
|
}
|
|
263
260
|
}
|
|
264
261
|
return {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { C as e, O as t, a as n, c as r, i, o as a, p as o, r as s, s as c } from "./dist-
|
|
2
|
-
import { H as l, U as u, V as d } from "./dist-
|
|
1
|
+
import { C as e, O as t, a as n, c as r, i, o as a, p as o, r as s, s as c } from "./dist-FrapLVQu.js";
|
|
2
|
+
import { H as l, U as u, V as d } from "./dist-BMKyBtRa.js";
|
|
3
3
|
//#region node_modules/.pnpm/prosemirror-tables@1.8.5/node_modules/prosemirror-tables/dist/index.js
|
|
4
4
|
var f, p;
|
|
5
5
|
if (typeof WeakMap < "u") {
|
|
@@ -706,7 +706,7 @@ function Te(e) {
|
|
|
706
706
|
for (let t = l.top; t < l.bottom; t++) {
|
|
707
707
|
let n = l.map.positionAt(t, l.left, l.table);
|
|
708
708
|
t == l.top && (n += i.nodeSize);
|
|
709
|
-
for (let r = l.left, a = 0; r < l.right; r++, a++) r
|
|
709
|
+
for (let r = l.left, a = 0; r < l.right; r++, a++) (r != l.left || t != l.top) && u.insert(d = u.mapping.map(n + l.tableStart, 1), e({
|
|
710
710
|
node: i,
|
|
711
711
|
row: t,
|
|
712
712
|
col: r
|
|
@@ -1007,7 +1007,7 @@ var Ie = d({
|
|
|
1007
1007
|
"Mod-Delete": I
|
|
1008
1008
|
});
|
|
1009
1009
|
function V(e, t, n) {
|
|
1010
|
-
return n.eq(e.selection)
|
|
1010
|
+
return !n.eq(e.selection) && (t && t(e.tr.setSelection(n).scrollIntoView()), !0);
|
|
1011
1011
|
}
|
|
1012
1012
|
function H(e, t) {
|
|
1013
1013
|
return (n, r, i) => {
|
|
@@ -1053,10 +1053,12 @@ function Re(t, n, r) {
|
|
|
1053
1053
|
};
|
|
1054
1054
|
let n = a.$anchorCell.node(-1), o = a.$anchorCell.start(-1), s = m.get(n).rectBetween(a.$anchorCell.pos - o, a.$headCell.pos - o);
|
|
1055
1055
|
return i = Pe(i, s.right - s.left, s.bottom - s.top), B(t.state, t.dispatch, o, s, i), !0;
|
|
1056
|
-
}
|
|
1056
|
+
}
|
|
1057
|
+
if (i) {
|
|
1057
1058
|
let e = b(t.state), n = e.start(-1);
|
|
1058
1059
|
return B(t.state, t.dispatch, n, m.get(e.node(-1)).findCell(e.pos - n), i), !0;
|
|
1059
|
-
}
|
|
1060
|
+
}
|
|
1061
|
+
return !1;
|
|
1060
1062
|
}
|
|
1061
1063
|
function ze(e, t) {
|
|
1062
1064
|
if (t.button != 0 || t.ctrlKey || t.metaKey) return;
|
|
@@ -1116,7 +1118,7 @@ var Be = class {
|
|
|
1116
1118
|
this.node = e, this.defaultCellMinWidth = t, this.dom = document.createElement("div"), this.dom.className = "tableWrapper", this.table = this.dom.appendChild(document.createElement("table")), this.table.style.setProperty("--default-cell-min-width", `${t}px`), this.colgroup = this.table.appendChild(document.createElement("colgroup")), q(e, this.colgroup, this.table, t), this.contentDOM = this.table.appendChild(document.createElement("tbody"));
|
|
1117
1119
|
}
|
|
1118
1120
|
update(e) {
|
|
1119
|
-
return e.type == this.node.type
|
|
1121
|
+
return e.type == this.node.type && (this.node = e, q(e, this.colgroup, this.table, this.defaultCellMinWidth), !0);
|
|
1120
1122
|
}
|
|
1121
1123
|
ignoreMutation(e) {
|
|
1122
1124
|
return e.type == "attributes" && (e.target == this.table || this.colgroup.contains(e.target));
|
|
@@ -518,10 +518,7 @@ function xe(r) {
|
|
|
518
518
|
case a:
|
|
519
519
|
f[p] = f[p] - (i[m] / 2 - o[m] / 2);
|
|
520
520
|
break;
|
|
521
|
-
case "end":
|
|
522
|
-
f[p] = f[p] + (i[m] / 2 - o[m] / 2);
|
|
523
|
-
break;
|
|
524
|
-
default:
|
|
521
|
+
case "end": f[p] = f[p] + (i[m] / 2 - o[m] / 2);
|
|
525
522
|
}
|
|
526
523
|
}
|
|
527
524
|
return f;
|
|
@@ -1444,9 +1441,7 @@ function on(e, t) {
|
|
|
1444
1441
|
case "focus":
|
|
1445
1442
|
W(Pt ? "focusout" : "blur", ae);
|
|
1446
1443
|
break;
|
|
1447
|
-
case "focusin":
|
|
1448
|
-
W("focusout", ae);
|
|
1449
|
-
break;
|
|
1444
|
+
case "focusin": W("focusout", ae);
|
|
1450
1445
|
}
|
|
1451
1446
|
});
|
|
1452
1447
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as e } from "../html-to-markdown-
|
|
1
|
+
import { t as e } from "../html-to-markdown-Cta7-ssO.js";
|
|
2
2
|
export { e as html2md };
|
package/dist/utils/index.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { t as e } from "../dist-
|
|
2
|
-
import { t } from "../html-to-markdown-
|
|
3
|
-
import { t as n } from "../markdown-to-html-
|
|
1
|
+
import { t as e } from "../dist-BMKyBtRa.js";
|
|
2
|
+
import { t } from "../html-to-markdown-Cta7-ssO.js";
|
|
3
|
+
import { t as n } from "../markdown-to-html-DwSNqq2i.js";
|
|
4
4
|
import { isInViewport as r } from "./is-in-viewport.js";
|
|
5
5
|
import { convertLegacyMathDelimiters as i } from "./convert-legacy-math-delimiters.js";
|
|
6
|
-
import { t as a } from "../extension-
|
|
6
|
+
import { t as a } from "../extension-BVGWENts.js";
|
|
7
7
|
//#region lib/utils/create-scribe-editor.ts
|
|
8
8
|
function o({ content: n = "", editable: r = !1, onContentChange: i }) {
|
|
9
9
|
return new e({
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as e } from "../markdown-to-html-
|
|
1
|
+
import { t as e } from "../markdown-to-html-DwSNqq2i.js";
|
|
2
2
|
export { e as md2html };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@clevertask/scribe",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.9",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "A Radix-based Tiptap rich text editor with a Notion-style block interface for viewing and creating content. Perfect for diverse needs like notes, documents, AI chat, Markdown parsing, and comments.",
|
|
6
6
|
"keywords": [
|
|
@@ -29,57 +29,67 @@
|
|
|
29
29
|
"dist"
|
|
30
30
|
],
|
|
31
31
|
"type": "module",
|
|
32
|
-
"main": "dist/main.js",
|
|
33
|
-
"types": "dist/main.d.ts",
|
|
32
|
+
"main": "./dist/main.js",
|
|
33
|
+
"types": "./dist/main.d.ts",
|
|
34
|
+
"exports": {
|
|
35
|
+
".": {
|
|
36
|
+
"types": "./dist/main.d.ts",
|
|
37
|
+
"import": "./dist/main.js",
|
|
38
|
+
"default": "./dist/main.js"
|
|
39
|
+
},
|
|
40
|
+
"./styles.css": "./dist/main.css",
|
|
41
|
+
"./dist/main.css": "./dist/main.css"
|
|
42
|
+
},
|
|
34
43
|
"publishConfig": {
|
|
35
44
|
"access": "public",
|
|
36
45
|
"registry": "https://registry.npmjs.org/"
|
|
37
46
|
},
|
|
38
47
|
"dependencies": {
|
|
39
|
-
"@tiptap/core": "^3.29.
|
|
40
|
-
"@tiptap/extension-emoji": "^3.29.
|
|
41
|
-
"@tiptap/extension-focus": "^3.29.
|
|
42
|
-
"@tiptap/extension-highlight": "^3.29.
|
|
43
|
-
"@tiptap/extension-image": "^3.29.
|
|
44
|
-
"@tiptap/extension-link": "^3.29.
|
|
45
|
-
"@tiptap/extension-mathematics": "^3.29.
|
|
46
|
-
"@tiptap/extension-placeholder": "^3.29.
|
|
47
|
-
"@tiptap/extension-table": "^3.29.
|
|
48
|
-
"@tiptap/extension-table-cell": "^3.29.
|
|
49
|
-
"@tiptap/extension-table-header": "^3.29.
|
|
50
|
-
"@tiptap/extension-table-row": "^3.29.
|
|
51
|
-
"@tiptap/extension-task-item": "^3.29.
|
|
52
|
-
"@tiptap/extension-task-list": "^3.29.
|
|
53
|
-
"@tiptap/extension-typography": "^3.29.
|
|
54
|
-
"@tiptap/pm": "^3.29.
|
|
55
|
-
"@tiptap/react": "^3.29.
|
|
56
|
-
"@tiptap/starter-kit": "^3.29.
|
|
57
|
-
"@tiptap/suggestion": "^3.29.
|
|
48
|
+
"@tiptap/core": "^3.29.2",
|
|
49
|
+
"@tiptap/extension-emoji": "^3.29.2",
|
|
50
|
+
"@tiptap/extension-focus": "^3.29.2",
|
|
51
|
+
"@tiptap/extension-highlight": "^3.29.2",
|
|
52
|
+
"@tiptap/extension-image": "^3.29.2",
|
|
53
|
+
"@tiptap/extension-link": "^3.29.2",
|
|
54
|
+
"@tiptap/extension-mathematics": "^3.29.2",
|
|
55
|
+
"@tiptap/extension-placeholder": "^3.29.2",
|
|
56
|
+
"@tiptap/extension-table": "^3.29.2",
|
|
57
|
+
"@tiptap/extension-table-cell": "^3.29.2",
|
|
58
|
+
"@tiptap/extension-table-header": "^3.29.2",
|
|
59
|
+
"@tiptap/extension-table-row": "^3.29.2",
|
|
60
|
+
"@tiptap/extension-task-item": "^3.29.2",
|
|
61
|
+
"@tiptap/extension-task-list": "^3.29.2",
|
|
62
|
+
"@tiptap/extension-typography": "^3.29.2",
|
|
63
|
+
"@tiptap/pm": "^3.29.2",
|
|
64
|
+
"@tiptap/react": "^3.29.2",
|
|
65
|
+
"@tiptap/starter-kit": "^3.29.2",
|
|
66
|
+
"@tiptap/suggestion": "^3.29.2",
|
|
58
67
|
"clsx": "^2.1.1",
|
|
59
68
|
"dompurify": "^3.4.12",
|
|
60
|
-
"katex": "^0.
|
|
69
|
+
"katex": "^0.17.0",
|
|
61
70
|
"marked": "^18.0.7",
|
|
62
71
|
"tippy.js": "^6.3.7",
|
|
63
72
|
"turndown": "^7.2.4"
|
|
64
73
|
},
|
|
65
74
|
"devDependencies": {
|
|
75
|
+
"@playwright/test": "^1.62.1",
|
|
66
76
|
"@radix-ui/themes": "^3.3.0",
|
|
67
77
|
"@testing-library/dom": "^10.4.1",
|
|
68
78
|
"@testing-library/jest-dom": "^7.0.0",
|
|
69
79
|
"@testing-library/react": "^16.3.2",
|
|
70
|
-
"@types/lodash": "^4.17.
|
|
80
|
+
"@types/lodash": "^4.17.25",
|
|
71
81
|
"@types/node": "^24.13.3",
|
|
72
|
-
"@types/react": "^19.2.
|
|
73
|
-
"@types/react-dom": "^19.2.
|
|
82
|
+
"@types/react": "^19.2.18",
|
|
83
|
+
"@types/react-dom": "^19.2.4",
|
|
74
84
|
"@types/turndown": "^5.0.6",
|
|
75
|
-
"@vitejs/plugin-react": "^6.0.
|
|
85
|
+
"@vitejs/plugin-react": "^6.0.5",
|
|
76
86
|
"glob": "^13.0.6",
|
|
77
|
-
"jsdom": "^
|
|
87
|
+
"jsdom": "^30.0.1",
|
|
78
88
|
"lodash": "^4.18.1",
|
|
79
|
-
"oxfmt": "^0.
|
|
80
|
-
"oxlint": "^1.
|
|
89
|
+
"oxfmt": "^0.61.0",
|
|
90
|
+
"oxlint": "^1.76.0",
|
|
81
91
|
"typescript": "~7.0.2",
|
|
82
|
-
"vite": "^8.
|
|
92
|
+
"vite": "^8.2.0",
|
|
83
93
|
"vite-plugin-lib-inject-css": "^2.2.2",
|
|
84
94
|
"vitest": "^4.1.10"
|
|
85
95
|
},
|
|
@@ -90,14 +100,19 @@
|
|
|
90
100
|
},
|
|
91
101
|
"scripts": {
|
|
92
102
|
"dev": "vite",
|
|
93
|
-
"
|
|
103
|
+
"e2e": "pnpm run e2e:prepare && playwright test && pnpm run e2e:build-consumer",
|
|
104
|
+
"e2e:build-consumer": "pnpm --dir e2e/consumer exec vite build",
|
|
105
|
+
"e2e:dev": "pnpm run e2e:prepare && playwright test --ui",
|
|
106
|
+
"e2e:install": "playwright install --with-deps chromium",
|
|
107
|
+
"e2e:prepare": "pnpm run build && node scripts/prepare-package-consumer.mjs",
|
|
108
|
+
"e2e:serve": "pnpm --dir e2e/consumer exec vite --force --strictPort --host 127.0.0.1 --port 5174",
|
|
109
|
+
"build": "vite build && npm run build:style && tsc -p tsconfig.types.json --noCheck",
|
|
94
110
|
"build:style": "mkdir -p ./dist && cp ./lib/styles/main.css ./dist/main.css",
|
|
95
|
-
"check:browser-bundle": "node scripts/check-browser-bundle.mjs",
|
|
96
111
|
"lint": "oxlint . --report-unused-disable-directives --deny-warnings",
|
|
97
112
|
"preview": "vite preview",
|
|
98
113
|
"fmt": "oxfmt",
|
|
99
114
|
"fmt:check": "oxfmt --check",
|
|
100
115
|
"test": "vitest run --config vitest.config.ts",
|
|
101
|
-
"validate:deps": "pnpm run fmt:check && pnpm run lint && pnpm run test && pnpm run
|
|
116
|
+
"validate:deps": "pnpm run fmt:check && pnpm run lint && pnpm run test && pnpm run e2e:install && pnpm run e2e"
|
|
102
117
|
}
|
|
103
118
|
}
|